From c34e1ebbabaec123d735149e47df856c4cf837c5 Mon Sep 17 00:00:00 2001 From: 叶松 <2217086471@qq.com> Date: 星期一, 27 十一月 2023 16:30:45 +0800 Subject: [PATCH] 扫码跳转小程序部分完成需要测试,隐患地点改为下拉框 --- xcx/pages/loginIndex/index.vue | 132 ++++++++++++++++++++++--------------------- 1 files changed, 68 insertions(+), 64 deletions(-) diff --git a/xcx/pages/loginIndex/index.vue b/xcx/pages/loginIndex/index.vue index 2f25e41..a194043 100644 --- a/xcx/pages/loginIndex/index.vue +++ b/xcx/pages/loginIndex/index.vue @@ -40,7 +40,8 @@ </template> </u-input> </u-form-item> - <u-text type="primary" text="立即注册" @click="navGotoRegister()"></u-text> + <!-- <u-text type="primary" text="立即注册" @click="navGotoRegister()"></u-text> --> + <u-text type="primary" text="管理员电话:13800138008"></u-text> <view class="login_content_button"> <u-button type="primary" @@ -92,69 +93,72 @@ }, onShow() { const that = this; - uni.clearStorage(); - uni.clearStorageSync(); - wx.getSetting({ - complete: (info) => { - if(!info.authSetting['scope.userInfo']) { - uni.showModal({ - title: '提示', - content: '是否授权获取您的信息,该信息仅用于确认身份信息', - success: function (res) { - if (res.confirm) { - wx.login({ - success(res) { - uni.$u.toast('授权成功!'); - that.$api.system.getUserInfo(res.code).then((res) => { - if(res.success) { - uni.setStorageSync('openId', res.data.openid); - that.$api.system.changeWChartUser({ - openId: res.data.openid - }).then((reslut) => { - console.log(reslut); - that.switchUserInfo(reslut.data.regstatus, reslut.data.reginfo); - }) - } else { - uni.$u.toast(res.statusMsg); - } - }) - }, - fail: (err) => { - console.log(err,'---'); - } - }) - } else if (res.cancel) { - wx.exitMiniProgram({ - success: (res) => { - console.log(res,'--'); - } - }) - } - } - }); - } else { - wx.login({ - success(res) { - that.$api.system.getUserInfo(res.code).then((res) => { - if(res.success) { - uni.setStorageSync('openId', res.data.openid); - that.$api.system.changeWChartUser({ - openId: res.data.openid - }).then((reslut) => { - that.switchUserInfo(reslut.data.regstatus, reslut.data.reginfo); - }) - } else { - uni.$u.toast(res.statusMsg); - } - }) - }, - fail: (err) => { - console.log(err,'---'); - } - }) - } - } - }) + // uni.clearStorage(); + // uni.clearStorageSync(); + // wx.getSetting({ + // complete: (info) => { + // if(!info.authSetting['scope.userInfo']) { + // uni.showModal({ + // title: '提示', + // content: '是否授权获取您的信息,该信息仅用于确认身份信息', + // success: function (res) { + // if (res.confirm) { + // wx.login({ + // success(res) { + // uni.$u.toast('授权成功!'); + // that.$api.system.getUserInfo(res.code).then((res) => { + // if(res.success) { + // uni.setStorageSync('openId', res.data.openid); + // that.$api.system.changeWChartUser({ + // openId: res.data.openid + // }).then((reslut) => { + // console.log(reslut); + // that.switchUserInfo(reslut.data.regstatus, reslut.data.reginfo); + // }) + // } else { + // uni.$u.toast(res.statusMsg); + // } + // }) + // }, + // fail: (err) => { + // console.log(err,'---'); + // } + // }) + // } else if (res.cancel) { + // wx.exitMiniProgram({ + // success: (res) => { + // console.log(res,'--'); + // } + // }) + // } + // } + // }); + // } else { + // wx.login({ + // success(res) { + // that.$api.system.getUserInfo(res.code).then((res) => { + // if(res.success) { + // uni.setStorageSync('openId', res.data.openid); + // that.$api.system.changeWChartUser({ + // openId: res.data.openid + // }).then((reslut) => { + // that.switchUserInfo(reslut.data.regstatus, reslut.data.reginfo); + // // uni.navigateTo({ + // // url: '../../robePages/safeManage/addHidden' + // // }) + // }) + // } else { + // uni.$u.toast(res.statusMsg); + // } + // }) + // }, + // fail: (err) => { + // console.log(err,'---'); + // } + // }) + // } + // } + // }) }, onReady() { this.$refs.form.setRules(this.rulesLogin); -- Gitblit v1.9.3