Commit 231c8653 by zhaoxiqing

gsb

parent 37d51e32
......@@ -18,7 +18,6 @@ class ecompanywxuserCtl extends CtlBase {
// 通过用户id保存用户,目前只有北京酷酷在用
async saveuser(q, p, req) {
var ecompany_id = Number(p.ecompany_id);
try {
if(!await this.idcardClient.checkIDCard(p.id_no)) {
return system.getErrResult2("您的身份证号格式错误");
......@@ -46,11 +45,19 @@ class ecompanywxuserCtl extends CtlBase {
if(rs == -104) {
return system.getErrResult2("签约失败,女限制18-55岁之间");
}
if(rs == -105){
return system.getErrResult2("推送异常");
}
if(rs == -201) {
return system.getErrResult2("提交失败,您填写的身份证号码已经录入系统");
}
if(rs.code != ''){
return system.getErrResult2(rs.msg);
}
return system.getResult2(rs);
} catch (e) {
console.log(e);
return system.getErrResult2("您的网络不稳, 请稍后重试");
......@@ -174,4 +181,4 @@ class ecompanywxuserCtl extends CtlBase {
}
}
}
module.exports = ecompanywxuserCtl;
\ No newline at end of file
module.exports = ecompanywxuserCtl;
......@@ -2,6 +2,7 @@ const system = require("../../system");
const ServiceBase = require("../sve.base");
const moment = require("moment");
const md5 = require("MD5");
const axios = require("axios");
class EcompanywxuserService extends ServiceBase {
constructor() {
......@@ -75,19 +76,35 @@ class EcompanywxuserService extends ServiceBase {
param.sign = md5(signArr.join("&")).toUpperCase();
console.log(JSON.stringify(param));
try {
var rs = await this.restClient.execPost(param, busi.postwxurl);
if (rs.stdout) {
let rsData = JSON.parse(rs.stdout);
if (rsData.code == "0") {
let rs = await axios({
method: 'post',
url: busi.postwxurl,
data: param,
});
if (rs.status == 200) {
let rsData = rs.data;
if (rsData.msg == 'success') {
user.isSend = true;
user.save();
return rsData;
}
return rsData;
}
// var rs = await this.restClient.execPost(param, busi.postwxurl);
// if (rs.stdout) {
// let rsData = JSON.parse(rs.stdout);
// if (rsData.code == "0") {
// user.isSend = true;
// user.save();
// }
// }
} catch (error) {
console.log(error);
}
}
return 1;
return -105;
}
async saveEcidUser(wxuser) {
......@@ -216,4 +233,4 @@ class EcompanywxuserService extends ServiceBase {
return uuid.join('');
}
}
module.exports = EcompanywxuserService;
\ No newline at end of file
module.exports = EcompanywxuserService;
......@@ -189,7 +189,7 @@
-webkit-transform: translate(0, 0) rotate(-180deg);
}
}
.el-input__inner {
border: none;
border-radius: 0px;
......@@ -281,4 +281,4 @@
<script src="/js/vue/base64.js"></script>
<script src="/js/vue/axios.min.js"></script>
<script src="/js/wxsign.js"></script>
</html>
\ No newline at end of file
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment