|
|
|
@ -19,7 +19,7 @@ |
|
|
|
|
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="action-btn"> |
|
|
|
|
<button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button> |
|
|
|
|
<button :disabled="btnDisabled" :loading="btnDisabled" @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
@ -51,7 +51,8 @@ |
|
|
|
|
loginname: "laobaigan", |
|
|
|
|
password: "LBGxcx@2023!", |
|
|
|
|
}, |
|
|
|
|
tentId: null |
|
|
|
|
tentId: null, |
|
|
|
|
btnDisabled:false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
@ -93,16 +94,22 @@ |
|
|
|
|
this.$modal.msgError("请输入您的密码") |
|
|
|
|
} else { |
|
|
|
|
this.$modal.loading("登录中,请耐心等待...") |
|
|
|
|
this.btnDisabled = true |
|
|
|
|
this.$Request.post(this.$config.handheldDevicedoLogin, this.loginForm).then(res => { |
|
|
|
|
if (res.status == 200) { |
|
|
|
|
uni.setStorageSync('sname', res.data.sname); |
|
|
|
|
this.$modal.closeLoading() |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
this.btnDisabled = false |
|
|
|
|
uni.redirectTo({ |
|
|
|
|
url: '/pages/index' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}).catch(err => { |
|
|
|
|
this.$modal.closeLoading() |
|
|
|
|
console.log(err, '错误信息') |
|
|
|
|
this.btnDisabled = false; |
|
|
|
|
this.loginForm.loginname="laobaigan"; |
|
|
|
|
this.loginForm.password="LBGxcx@2023!"; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|