|
|
|
@ -1,7 +1,7 @@ |
|
|
|
//获取应用实例
|
|
|
|
import Dialog from '../../components/dialog/dialog' |
|
|
|
import { config, headerFactoryId, wechatApplet, loginWechat, postCaptcha, loginCaptcha, loginPwd, verifyCode, applyEmplyee } from "../../api/user" |
|
|
|
import { sconfig, loginToken, getUserInfo, bindingAdmin, bindCustomer } from "../../api/saas" |
|
|
|
import { config, headerFactoryId, wechatApplet, loginWechat, postCaptcha, loginCaptcha, loginPwd, verifyCode, bindAccount, applyEmplyee } from "../../api/user" |
|
|
|
import { sconfig, loginToken, getUserInfo, bindingFactory, bindCustomer } from "../../api/saas" |
|
|
|
import { pconfig } from "../../api/payment" |
|
|
|
import { zconfig } from "../../api/ztb" |
|
|
|
import { mconfig } from "../../api/moment" |
|
|
|
@ -382,14 +382,27 @@ Page({ |
|
|
|
return |
|
|
|
} |
|
|
|
this.setData({loging: true}) |
|
|
|
if(this.data.metaData.qrPage == '/page/index/yaoqing'){ |
|
|
|
bindingAdmin(this.data.metaData).then(result => { |
|
|
|
if(this.data.metaData.qrPage == '/page/inde/ztbsaas/yaoqing'){ |
|
|
|
// 绑定企业主账号
|
|
|
|
var param = {joiningEnterprisePublicInvitationId: this.data.enterpriseId, userName: this.data.metaData.userName} |
|
|
|
bindAccount(param).then(result => { |
|
|
|
this.data.metaData = null |
|
|
|
this.fetchUserInfo(app.globalData.token) |
|
|
|
}).catch(error => { |
|
|
|
this.setData({loging: false}) |
|
|
|
util.showToast(error) |
|
|
|
}) |
|
|
|
} else if(this.data.metaData.qrPage == '/page/index/yaoqing'){ |
|
|
|
// 绑定工厂主账号
|
|
|
|
bindingFactory(this.data.metaData).then(result => { |
|
|
|
this.data.metaData = null |
|
|
|
this.fetchUserInfo(app.globalData.token) |
|
|
|
}).catch(error => { |
|
|
|
this.setData({loging: false}) |
|
|
|
util.showToast(error) |
|
|
|
}) |
|
|
|
} else if(this.data.metaData.qrPage == '/page/index/shenqing'){ |
|
|
|
// 绑定申请成为员工
|
|
|
|
applyEmplyee(this.data.metaData).then(result => { |
|
|
|
this.data.metaData = null |
|
|
|
this.setData({loging: false}) |
|
|
|
|