修改登录
parent
a66b4fc5c4
commit
7a02804fc9
|
@ -127,6 +127,12 @@
|
||||||
"navigationBarTitleText": "登录"
|
"navigationBarTitleText": "登录"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/login",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "登录"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/register",
|
"path": "pages/register",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<text @click="handlePrivacy" class="text-blue-400">《隐私协议》</text>
|
<text @click="handlePrivacy" class="text-blue-400">《隐私协议》</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button @click="wxLogin">微信登录</button>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ export default {
|
||||||
codeUrl: "",
|
codeUrl: "",
|
||||||
captchaEnabled: true,
|
captchaEnabled: true,
|
||||||
// 用户注册开关
|
// 用户注册开关
|
||||||
register: false,
|
register: true,
|
||||||
globalConfig: getApp().globalData.config,
|
globalConfig: getApp().globalData.config,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "admin",
|
username: "admin",
|
||||||
|
@ -128,6 +128,7 @@ export default {
|
||||||
this.$store.dispatch('Login', this.loginForm).then(() => {
|
this.$store.dispatch('Login', this.loginForm).then(() => {
|
||||||
this.$modal.closeLoading()
|
this.$modal.closeLoading()
|
||||||
this.loginSuccess()
|
this.loginSuccess()
|
||||||
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
this.getCode()
|
this.getCode()
|
||||||
|
@ -137,7 +138,9 @@ export default {
|
||||||
// 登录成功后,处理函数
|
// 登录成功后,处理函数
|
||||||
loginSuccess(result) {
|
loginSuccess(result) {
|
||||||
// 设置用户信息
|
// 设置用户信息
|
||||||
|
this.$store.dispatch('GetUserInfo');
|
||||||
this.$store.dispatch('GetInfo').then(res => {
|
this.$store.dispatch('GetInfo').then(res => {
|
||||||
|
this.$store.dispatch('getQNDomainInfo')
|
||||||
this.$tab.reLaunch('/pages/index')
|
this.$tab.reLaunch('/pages/index')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,7 @@ const info = () => {
|
||||||
}
|
}
|
||||||
info();
|
info();
|
||||||
function handleToLogin() {
|
function handleToLogin() {
|
||||||
proxy.$tab.reLaunch('/pages/loginInfo/login')
|
proxy.$tab.reLaunch('/pages/login')
|
||||||
}
|
}
|
||||||
const handleToUserInfo = () => {
|
const handleToUserInfo = () => {
|
||||||
proxy.$tab.navigateTo('/pages/mine/info/userInfo')
|
proxy.$tab.navigateTo('/pages/mine/info/userInfo')
|
||||||
|
|
|
@ -37,7 +37,7 @@ const request = config => {
|
||||||
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
|
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
store.dispatch('LogOut').then(res => {
|
store.dispatch('LogOut').then(res => {
|
||||||
uni.reLaunch({ url: '/pages/loginInfo/login' })
|
uni.reLaunch({ url: '/pages/login' })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -38,7 +38,7 @@ export default function upload(config) {
|
||||||
showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
|
showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
store.dispatch('LogOut').then(res => {
|
store.dispatch('LogOut').then(res => {
|
||||||
uni.reLaunch({ url: '/pages/loginInfo/login' })
|
uni.reLaunch({ url: '/pages/login' })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue