AI弹窗
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<!-- Login.vue -->
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="logo">
|
||||
@@ -11,14 +12,14 @@
|
||||
<view class="input-item flex align-center">
|
||||
<view class="iconfont icon-password icon"></view>
|
||||
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-btn">
|
||||
<button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="xieyi text-center">
|
||||
<text class="text-grey1">柳州市网信办 柳州职业技术学院</text>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -39,22 +40,22 @@
|
||||
showPassword: false
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
login() {
|
||||
let sdata= {
|
||||
let sdata = {
|
||||
username: this.username,
|
||||
password: this.password
|
||||
};
|
||||
doLogin(sdata).then(res=>{
|
||||
doLogin(sdata).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync('token', res.token);
|
||||
uni.setStorageSync('token', res.token);
|
||||
uni.showToast({
|
||||
title: "登录成功",
|
||||
icon: "success"
|
||||
});
|
||||
getInfo().then(res=>{
|
||||
uni.setStorageSync("roles",res.roles[0])
|
||||
getInfo().then(res => {
|
||||
uni.setStorageSync("roles", res.roles[0])
|
||||
})
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
@@ -65,19 +66,19 @@
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "error"
|
||||
|
||||
|
||||
})
|
||||
} else{
|
||||
} else {
|
||||
console.log('11');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
|
||||
togglePassword() {
|
||||
this.showPassword = !this.showPassword;
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user