mirror of
http://36.133.248.69:3088/admin/RentWeAppFront.git
synced 2026-06-07 06:22:27 +08:00
修复bug以及优化
This commit is contained in:
@@ -129,7 +129,6 @@
|
||||
data() {
|
||||
const life = uni.getStorageSync('lifeData') || {}
|
||||
return {
|
||||
user:{},
|
||||
bgPath1: '/public/static/center/my-bg.png',
|
||||
bgPath2: '/public/static/center/my-bg2.png',
|
||||
unsignContractNum:0,
|
||||
@@ -163,8 +162,11 @@
|
||||
},
|
||||
staticHost() {
|
||||
return this.$config.staticUrl
|
||||
}
|
||||
|
||||
},
|
||||
user() {
|
||||
return uni.getStorageSync('userInfo') || {}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
@@ -177,7 +179,6 @@
|
||||
onUnload() {
|
||||
uni.$off('updateAvatar')
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.$checkToken(this.$getToken())
|
||||
this.loadUserInfo()
|
||||
@@ -193,14 +194,18 @@
|
||||
loadUserInfo(){
|
||||
let userInfo = uni.getStorageSync('userInfo');
|
||||
if(!userInfo) {
|
||||
console.log("缓存中用户信息为空")
|
||||
return
|
||||
}
|
||||
console.log(userInfo)
|
||||
console.log("查询用户信息")
|
||||
let url = `/login/userInfo`;
|
||||
this.$u.get(url, {}, {
|
||||
'WT': this.$getToken(),
|
||||
'USERTYPE': userInfo.userType
|
||||
}).then(obj => {
|
||||
if(obj.flag){
|
||||
console.log("更新缓存中用户信息")
|
||||
uni.setStorageSync('userInfo', {
|
||||
userType: obj.data.userType,
|
||||
oaAuth: obj.data.oaAuth,
|
||||
@@ -211,7 +216,7 @@
|
||||
})
|
||||
}
|
||||
});
|
||||
this.user = uni.getStorageSync('userInfo');
|
||||
|
||||
},
|
||||
logout() {
|
||||
this.$u.vuex('vuex_token', '');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<image :src="staticHost + '/public/static/index/index_bg.png'" mode="aspectFill" class="bg"></image>
|
||||
<float-guide :initX="280" :initY="400" :videoSrc="staticHost + '/public/static/index/guide.mp4'" />
|
||||
<!-- 搜索栏 -->
|
||||
<view class="index-title">
|
||||
伍家国投
|
||||
@@ -106,9 +107,11 @@
|
||||
|
||||
<script>
|
||||
import SearchBar from '../../components/searchBar/SearchBar.vue';
|
||||
import floatGuide from '../../components/floatGuide/floatGuide.vue';
|
||||
export default {
|
||||
components: {
|
||||
SearchBar
|
||||
SearchBar,
|
||||
floatGuide
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user