修改bug
This commit is contained in:
@@ -183,6 +183,7 @@
|
||||
getBannarList,
|
||||
getReloadUserInfo
|
||||
} from "/pageSubPack/api/api.js"
|
||||
import { requireLogin } from '@/common/checkLogin.js'
|
||||
|
||||
|
||||
// 列表数据状态
|
||||
@@ -199,19 +200,6 @@
|
||||
const lastUserId = ref('')
|
||||
const pageReady = ref(false)
|
||||
|
||||
// =======工具方法=======
|
||||
const requireLogin = () => {
|
||||
const token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
uni.showToast({ title: '请先登录', icon: 'none' })
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: '/pageSubPack/loginSub/login?mode=pwd' })
|
||||
}, 1000)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// =======方法=======
|
||||
const formatDate = (date) => {
|
||||
if (!date) return ''
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
} from 'vue';
|
||||
import { getUserProfile } from '../../pageSubPack/api/apiSub';
|
||||
import {onShow} from '@dcloudio/uni-app'
|
||||
import { requireLogin } from '@/common/checkLogin.js'
|
||||
|
||||
|
||||
const list = ref([{
|
||||
@@ -97,6 +98,7 @@
|
||||
|
||||
// 返回
|
||||
const onItemClick = (item) => {
|
||||
if (!requireLogin()) return
|
||||
if (item.title == '我的房屋') {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myHouseIndex',
|
||||
@@ -130,6 +132,7 @@
|
||||
}
|
||||
}
|
||||
const goSetting = () => {
|
||||
if (!requireLogin()) return
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/settingIndex',
|
||||
success: res => {},
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
import {
|
||||
ref
|
||||
} from 'vue';
|
||||
import { requireLogin } from '@/common/checkLogin.js'
|
||||
|
||||
|
||||
const commonFuncList = ref([{
|
||||
@@ -138,7 +139,7 @@
|
||||
// --方法----
|
||||
|
||||
const handleFuncClick = (item) => {
|
||||
|
||||
if (!requireLogin()) return
|
||||
uni.setStorageSync('sourcePage', 'serviceIndex')
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
@@ -147,6 +148,7 @@
|
||||
|
||||
// banner跳转
|
||||
function bannnerClick(){
|
||||
if (!requireLogin()) return
|
||||
uni.navigateTo({ url: '/pageSubPack/online-repair/onlineRepair'})
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user