This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</view>
|
||||
<view class="input-row">
|
||||
<image class="iconfont2" src="/static/ic_login_code.png" />
|
||||
<input class="login-input" type="text" placeholder="请输入验证码" v-model="password"/>
|
||||
<input class="login-input" type="text" placeholder="请输入验证码" v-model="password" />
|
||||
<button class="code-btn">获取校验码</button>
|
||||
</view>
|
||||
<view class="protocol-row">
|
||||
@@ -57,9 +57,9 @@
|
||||
activeColor: '#007aff',
|
||||
checked: false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getUserInfo()
|
||||
},
|
||||
onLoad() {
|
||||
this.getUserInfo()
|
||||
},
|
||||
methods: {
|
||||
async submit() {
|
||||
@@ -85,27 +85,30 @@
|
||||
this.$store.commit('$uStore', {
|
||||
name: 'vuex_token',
|
||||
value: res.data.access_token
|
||||
});
|
||||
});
|
||||
this.getUserInfo()
|
||||
// setTimeout(() => {
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/sys/home/home'
|
||||
// });
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/sys/home/home'
|
||||
// });
|
||||
// }, 500);
|
||||
}
|
||||
},
|
||||
getUserInfo(){
|
||||
this.$u.api.getUserInfo({loginCheck: true}).then(res => {
|
||||
if (res.code == '200'){
|
||||
this.$store.commit('$uStore', {
|
||||
name: 'vuex_user',
|
||||
value: res.data.user
|
||||
});
|
||||
uni.reLaunch({
|
||||
url: '/pages/sys/home/home'
|
||||
});
|
||||
}
|
||||
});
|
||||
getUserInfo() {
|
||||
this.$u.api.getUserInfo({
|
||||
loginCheck: true
|
||||
}).then(res => {
|
||||
if (res.code == '200') {
|
||||
this.$store.commit('$uStore', {
|
||||
name: 'vuex_user',
|
||||
value: res.data.user
|
||||
});
|
||||
uni.$emit("loginSuccess");
|
||||
uni.reLaunch({
|
||||
url: '/pages/sys/home/home'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCheckboxChange(e) {
|
||||
this.checked = e.target.checked;
|
||||
|
Reference in New Issue
Block a user