Commit 42fd5dc3 authored by Morson's avatar Morson

修改信息缓存问题,删除调试代码

parent b4fb3328
......@@ -11,11 +11,6 @@ export default {
// 微信小程序平台编号,空--家维广场,1--自营平台
wxAppNo: 1,
//授权提示 图标
icon_auth_notice: "https://qn-static.banshouhui.com/auth_notice.png",
//授权提示新 图标
icon_auth_notice_new:
"https://qn-static.banshouhui.com/auth_notice_new.png",
// 服务规范教程视频
service_standard: {
course1: {
......@@ -47,8 +42,6 @@ export default {
// 授权用户信息
authUserInfo: "",
// 用户入驻信息
settledInfo: {},
navHeight: 0, //导航栏高度
rpxScreenHeight: 0, // 照相视框高度
safeHeight: 0, // 安全高度
......@@ -81,7 +74,7 @@ export default {
// 版本更新
await this.updateApp();
// 系统自动登录
// 系统自动登录::每次运行小程序重新获取用户信息
await this.autoLogin();
},
onShow: async function () {
......@@ -100,11 +93,6 @@ export default {
getSystemInfo() {
try {
let a = wx.getSystemInfoSync();
// this.globalData.platform = systemInfo.platform, this.globalData.pixelRatio = a.pixelRatio,
// this.globalData.statusBarHeight = a.statusBarHeight, this.globalData.navHeight = a.statusBarHeight / a.screenWidth * 750 + 90,
// this.globalData.rpxScreenHeight = a.screenHeight / a.screenWidth * 750, this.globalData.screenWidth = a.screenWidth,
// this.globalData.screenHeight = a.screenHeight;
this.globalData.navHeight =
(a.statusBarHeight / a.screenWidth) * 750 + 90;
this.globalData.rpxScreenHeight =
......@@ -138,11 +126,11 @@ export default {
*/
async autoLogin() {
let that = this;
// 如果token不为空,则跳过自动登录
if (that.vuex_token) {
return;
// 如果token不为空,则跳过自动登录
if(that.vuex_token) {
return false
}
await login.oauth().then(async (res) => {
await login.oauth().then(async (res) => {
if (res.code) {
let params = {
code: res.code,
......@@ -180,6 +168,7 @@ export default {
this.$u.vuex("vuex_user", null);
this.$u.vuex("vuex_wx_uid", "");
}
this.$u.vuex("vuex_settled", null);
},
/* 版本更新 */
......
......@@ -97,6 +97,7 @@ const install = (Vue, vm) => {
vm.$u.vuex('vuex_token', '');
vm.$u.vuex('vuex_user', null);
vm.$u.vuex('vuex_wx_uid', '');
vm.$u.vuex("vuex_settled", null);
toLoginPage()
case 403://没有权限访问
case 500:
......
......@@ -49,17 +49,17 @@
},
computed: {
settled() {
return this.vuex_settled && this.vuex_settled.record || null
return this.vuex_token && this.vuex_settled && this.vuex_settled.record || null
},
avatar() {
return this.vuex_settled && this.vuex_settled.avatar || ''
return this.vuex_settled && this.vuex_settled.avatar
},
name() {
return this.settled && (this.settled.id_card_name
|| this.settled.nickname || this.settled.name) || ''
|| this.settled.nickname || this.settled.name)
},
mobile() {
return this.settled && this.settled.mobile || ''
return this.settled && this.settled.mobile
},
items() {
return [{
......@@ -239,8 +239,9 @@
.list-view {
background-color: #FFFFFF;
border-radius: 16rpx 16rpx 0 0;
border-radius: 32rpx 32rpx 0 0;
overflow: hidden;
padding-top: 16rpx;
.item-title {
font-size: 32rpx;
......
......@@ -209,6 +209,7 @@ export default {
this.$u.vuex('vuex_user', null);
this.$u.vuex('vuex_wx_uid', '');
}
this.$u.vuex('vuex_settled', null);
},
setLoginStatus(authed = true) {
......
......@@ -4,7 +4,7 @@
:border-bottom="false" title-bold></u-navbar>
<view class="wallet-content-view">
<view class="header-view">
<image class="header-image" mode="widthFix" :src="qianbaobeijing"></image>
<image class="header-image" :src="qianbaobeijing"></image>
</view>
<view class="survey-view">
<view class="survey-top-view">
......@@ -35,7 +35,7 @@
</view>
</view>
<view class="content-list-right">
<text class="content-list-right-text">点击查看</text>
<text class="content-list-right-text">{{ item.value }}</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
......@@ -90,11 +90,13 @@
return [{
title: '结算账单',
content: '展示您已提现的账单信息',
icon: this.imageUrl + 'jiesuan.png'
icon: this.imageUrl + 'jiesuan.png',
value: '点击查看'
}, {
title: '收入流水',
content: this.statementContent,
icon: this.imageUrl + 'liushui.png'
icon: this.imageUrl + 'liushui.png',
value: '查看全部'
}]
},
items() {
......@@ -191,9 +193,10 @@
position: absolute;
width: 100%;
padding-top: 10rpx;
padding-left: 6rpx;
padding-left: 14rpx;
.header-image {
width: 100%;
width: 730rpx;
height: 420rpx;
}
}
......
......@@ -73,7 +73,7 @@
return this.loading || this.info.payableRecordExtendDtos && this.info.payableRecordExtendDtos.length
},
banner() {
return this.imageUrl + 'Bill.png'
return this.imageUrl + 'receipt.png'
},
},
onLoad() {
......
......@@ -72,8 +72,8 @@
number: this.data.statementList.length
}
},
endTime() {
this.$u.DateTimeFormat(new Date().getTime(), 'YYYY-MM-DD')
endTime() {
this.moment().format('YYYY-MM-DD')
},
items() {
return {
......@@ -90,7 +90,7 @@
return process.uniEnv.qn_base_url
},
banner() {
return this.imageUrl + 'Bill.png'
return this.imageUrl + 'receipt.png'
},
hasInfo() {
return this.loading || this.data.statementList && this.data.statementList.length
......
......@@ -108,7 +108,7 @@
self.loadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore'
}
} else {
self.$u.toast(res.message);
self.$u.toast('请求失败');
}
self.loaded = true
});
......
......@@ -2,7 +2,6 @@ import {
mapState
} from 'vuex'
import store from "@/store/index"
console.log(store, store.state, 'store')
// 尝试将用户在根目录中的store/index.js的vuex的state变量,全部加载到全局变量中
let $uStoreKey = [];
......
......@@ -63,6 +63,5 @@ const store = new Vuex.Store({
}
}
})
console.log(store,'store----------------')
export default store
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment