| | |
| | | </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" |
| | |
| | | data() { |
| | | return { |
| | | formLogin: { |
| | | // username: '18103009188', |
| | | username: '', |
| | | // username: '14798989898', |
| | | password: '' |
| | | }, |
| | | rulesLogin: { |
| | |
| | | }, |
| | | 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); |
| | |
| | | width: 100%; |
| | | height: 50%; |
| | | // background: #556DFE; |
| | | background: url('http://filemanage.thhy-tj.com:8888/group1/M00/00/04/bx5d1GR1awaAOSrGAADytgHWrpk815.png') no-repeat; |
| | | background: url('https://szpipe.thhy-tj.com/group1/M00/00/04/bx5d1GR1awaAOSrGAADytgHWrpk815.png') no-repeat; |
| | | background-size: 100% 100%; |
| | | border-radius: 0 0 20px 20px; |
| | | |