|
|
@@ -34,7 +34,7 @@
|
|
|
<button class="admin-button-com small blue buttonText" @click="mobileLogin()">本机号码一键登录</button>
|
|
|
</view>
|
|
|
<!-- #endif -->
|
|
|
- <view style="color:#999999;font-size:25upx;margin-top:55upx;">
|
|
|
+ <view style="color:#999999;font-size:25upx;margin-top:55upx;" v-if="showAccountLogin">
|
|
|
<checkbox-group @change="agreeItem">
|
|
|
<label style="display:flex;align-items:center;justify-content:center;">
|
|
|
<checkbox value="1" style="transform:scale(0.8)" :checked="agree == 1" />
|
|
|
@@ -202,13 +202,11 @@ export default {
|
|
|
that.hasMobileNet = false
|
|
|
}
|
|
|
},
|
|
|
- wxPhoneLogin(e){
|
|
|
- let that = this
|
|
|
- let currentMiniOpenId = uni.getStorageSync('currentMiniOpenId')
|
|
|
- if (e.detail.errMsg === "getPhoneNumber:ok") {
|
|
|
- // 检查是否勾选协议
|
|
|
- this.checkAgreement(function(){
|
|
|
- wxMobileLogin({ iv: e.detail.iv, encryptedData: e.detail.encryptedData,miniOpenId:currentMiniOpenId }).then(subRes => {
|
|
|
+ wxPhoneLogin(e){
|
|
|
+ let that = this
|
|
|
+ let currentMiniOpenId = uni.getStorageSync('currentMiniOpenId')
|
|
|
+ if (e.detail.errMsg === "getPhoneNumber:ok") {
|
|
|
+ wxMobileLogin({ iv: e.detail.iv, encryptedData: e.detail.encryptedData,miniOpenId:currentMiniOpenId }).then(subRes => {
|
|
|
uni.hideLoading()
|
|
|
if(subRes.data && subRes.data.hasNoOpenId && subRes.data.hasNoOpenId ==1){
|
|
|
that.$util.confirmModal({content:'网络异常,请重新操作'},() => {
|
|
|
@@ -244,29 +242,26 @@ export default {
|
|
|
that.$store.commit('setDictionariesInfo', { ...res.data.dict, ...res.data })
|
|
|
that.$store.commit('setMyShopInfo', { ...res.data.shop, ...res.data })
|
|
|
})
|
|
|
- that.$store.commit('setLoginInfo', { ...subRes.data.admin, ...subRes.data })
|
|
|
- getShopInfo(true).then(res => { uni.setNavigationBarTitle({ title: res.name }) })
|
|
|
- that.setUserShopAll()
|
|
|
+ that.$store.commit('setLoginInfo', { ...subRes.data.admin, ...subRes.data })
|
|
|
+ getShopInfo(true).then(res => { uni.setNavigationBarTitle({ title: res.name }) })
|
|
|
+ that.setUserShopAll()
|
|
|
|
|
|
- uni.navigateBack()
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$msg("登录失败");
|
|
|
- }
|
|
|
- },
|
|
|
- mobileLogin(){
|
|
|
- let that = this
|
|
|
+ uni.navigateBack()
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$msg("登录失败");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mobileLogin(){
|
|
|
+ let that = this
|
|
|
|
|
|
- // 先检查协议
|
|
|
- this.checkAgreement(function(){
|
|
|
- uni.showLoading({mask:true})
|
|
|
- uni.preLogin({
|
|
|
- provider: 'univerify',
|
|
|
- success:()=>{
|
|
|
- uni.hideLoading()
|
|
|
- uni.login({
|
|
|
+ uni.showLoading({mask:true})
|
|
|
+ uni.preLogin({
|
|
|
+ provider: 'univerify',
|
|
|
+ success:()=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ uni.login({
|
|
|
provider: 'univerify',
|
|
|
// 自定义登录框样式
|
|
|
univerifyStyle: {
|
|
|
@@ -340,11 +335,10 @@ export default {
|
|
|
} else {
|
|
|
uni.showToast({title: '登录失败...', duration: 3000, icon:'none'})
|
|
|
}
|
|
|
- console.log(res)
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
loginFun(){
|
|
|
let that = this
|
|
|
let mobile = this.mobile
|