优化登录
This commit is contained in:
@@ -265,6 +265,8 @@ const handleLogin = () => {
|
|||||||
const currentVillageId = res.data.currentVillageId || 0
|
const currentVillageId = res.data.currentVillageId || 0
|
||||||
uni.setStorageSync('currentVillageId', currentVillageId)
|
uni.setStorageSync('currentVillageId', currentVillageId)
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
// 标记引导页已看过,下次启动跳过引导
|
||||||
|
uni.setStorageSync('hasShowGuide', true)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '登录成功',
|
title: '登录成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
|
|||||||
@@ -223,6 +223,8 @@ const handleLogin = () => {
|
|||||||
})
|
})
|
||||||
permStore.setPerm(res.data.user.permissions)
|
permStore.setPerm(res.data.user.permissions)
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
// 标记引导页已看过,下次启动跳过引导
|
||||||
|
uni.setStorageSync('hasShowGuide', true)
|
||||||
if (rememberPwd.value) {
|
if (rememberPwd.value) {
|
||||||
uni.setStorageSync('rememberPhone', phoneNumber.value)
|
uni.setStorageSync('rememberPhone', phoneNumber.value)
|
||||||
uni.setStorageSync('rememberPassword', password.value)
|
uni.setStorageSync('rememberPassword', password.value)
|
||||||
@@ -242,13 +244,13 @@ const handleLogin = () => {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({ title: res.msg, icon: 'error' })
|
uni.showToast({ title: res.msg, icon: 'none' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.msg,
|
title: err.msg,
|
||||||
icon: 'error'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="guide-page">
|
<view class="guide-page" v-if="!token">
|
||||||
<view class="status-bar"></view>
|
<view class="status-bar"></view>
|
||||||
<!-- 引导内容滑动容器 -->
|
<!-- 引导内容滑动容器 -->
|
||||||
<swiper
|
<swiper
|
||||||
|
|||||||
Reference in New Issue
Block a user