工单
This commit is contained in:
@@ -97,6 +97,9 @@
|
||||
<button @click="onSubmit" class="active" v-if="btnShow">登 录</button>
|
||||
<button v-else>登 录</button>
|
||||
</view>
|
||||
<view class="loginHelp" v-if="submitClickNum > 0">
|
||||
<text>登陆遇到问题?</text><text class="link" @click="onPageJump('/pages/user/workOrder','login')">去反馈问题</text>
|
||||
</view>
|
||||
<!-- <view class="password_register" style="margin: 0 auto; text-align: center; display: block;">
|
||||
<button @click="onPageJump('/pages/user/register')">注册账号</button>
|
||||
<text v-if="type == 1000" @click="onPageJump('/pages/user/forget')">忘记密码?</text>
|
||||
@@ -246,7 +249,7 @@
|
||||
quShow: false,
|
||||
quCodeList: [], // 国家区域码
|
||||
quCode: 86,
|
||||
|
||||
submitClickNum:0, // 登陆按钮点击次数
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
@@ -268,6 +271,7 @@
|
||||
this.getCountyCode()
|
||||
this.getSettlement()
|
||||
},
|
||||
|
||||
//方法
|
||||
methods: {
|
||||
...mapMutations(['setUserInfo']),
|
||||
@@ -364,9 +368,10 @@
|
||||
},
|
||||
|
||||
|
||||
onPageJump(url) {
|
||||
onPageJump(url,name) {
|
||||
console.log('点击了');
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
url: `${url}?name=${name}`
|
||||
});
|
||||
},
|
||||
onInput() {
|
||||
@@ -488,8 +493,7 @@
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
let httpData = {};
|
||||
if (this.type == 2000) {
|
||||
if (this.brand == 3000) {
|
||||
@@ -539,6 +543,7 @@
|
||||
this.$http
|
||||
.get('book/user/registerOrLogin', httpData)
|
||||
.then(res => {
|
||||
this.submitClickNum = 0
|
||||
res.userInfo.token = res.token.token;
|
||||
this.setUserInfo(res.userInfo);
|
||||
// socket.init();
|
||||
@@ -546,15 +551,17 @@
|
||||
title: '登录成功',
|
||||
duration: 1000,
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: '/pages/peanut/home'
|
||||
});
|
||||
}, 1000);
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title:'登陆失败',
|
||||
icon:'none'
|
||||
})
|
||||
this.submitClickNum += 1
|
||||
});
|
||||
} else {
|
||||
if (!this.phoneEmail) {
|
||||
@@ -577,6 +584,7 @@
|
||||
this.$http
|
||||
.post('book/user/login', httpData)
|
||||
.then(res => {
|
||||
this.submitClickNum = 0
|
||||
res.userInfo.token = res.token.token;
|
||||
this.setUserInfo(res.userInfo);
|
||||
// socket.init();
|
||||
@@ -589,6 +597,12 @@
|
||||
url: '/pages/peanut/home'
|
||||
});
|
||||
}, 1000);
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title:'登陆失败',
|
||||
icon:'none'
|
||||
})
|
||||
this.submitClickNum += 1
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -839,7 +853,11 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
|
||||
|
||||
.loginHelp{border: 1px solid #f5dab1; margin-top: 16rpx; font-size: 26rpx; text-align: center;
|
||||
padding: 10rpx; background-color: #fdf6ec; border-radius: 15rpx;
|
||||
.link{color: #e6a23c;}
|
||||
}
|
||||
.phoneNumberInput {
|
||||
width: calc(100% - 160rpx);
|
||||
// width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user