Commit 5b8deb53 authored by jyx's avatar jyx

开通vip更新我的页面状态

parent 26c71fb4
<template>
<view v-if="localActiviteFlag==1" class="body">
<view v-if="localActiviteFlag==1" class="body">
<view style="height: 92%;">
<bookshelf v-show="currentPage==0" ref="index" />
<warehouse v-show="currentPage==1" ref="recommend" />
......@@ -35,22 +35,22 @@
我的
</view>
</view>
</view>
<view v-else class="body">
<view
:style="'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+10+'px;'">
<image class="avatar" src="@/static/logo-about.png"></image>
<view>
<view style="font-size: 34rpx;color: black;margin-left: 30rpx;">用户ID:{{localIdcode}}</view>
<view style="font-size: 26rpx;color: #b5b5b5;margin-left: 30rpx;margin-top: 10rpx;">
书中自有颜如玉,书中自有黄金屋,书中自有千钟黍</view>
</view>
</view>
<view style="height: 92%;">
<warehouse v-show="currentPage==1" ref="recommend" />
</view>
</view>
<view v-else class="body">
<view
:style="'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+10+'px;'">
<image class="avatar" src="@/static/logo-about.png"></image>
<view>
<view style="font-size: 34rpx;color: black;margin-left: 30rpx;">用户ID:{{localIdcode}}</view>
<view style="font-size: 26rpx;color: #b5b5b5;margin-left: 30rpx;margin-top: 10rpx;">
书中自有颜如玉,书中自有黄金屋,书中自有千钟黍</view>
</view>
</view>
<view style="height: 92%;">
<warehouse v-show="currentPage==1" ref="recommend" />
</view>
</view>
</template>
......@@ -77,13 +77,13 @@
data() {
return {
currentPage: 1,
localActiviteFlag: 0,
localActiviteFlag: 0,
localIdcode: 0,
}
},
onLoad(options) {
let index = options.index ?? ''
this.localActiviteFlag = options.activiteFlag;
this.localActiviteFlag = options.activiteFlag;
this.localIdcode = options.idcode;
if (index != '' && index != undefined) {
this.currentPage = index
......@@ -106,14 +106,23 @@
mounted() {
// 渲染完成 初始化首页数据
this.loadComponentData();
let that = this
if (this.localActiviteFlag == 1) {
let that = this
uni.$on('goWareHouse', function(data) {
that.tabChange(1)
})
}
uni.$on('refreshPreviousPage', (data) => {
if (data.vipFlag == '1') {
// 开通vip刷新状态
if (that.currentPage == 2) {
that.$refs.user.show();
}
}
});
},
methods: {
tabChange(index) {
......@@ -144,14 +153,14 @@
.body {
height: 100%;
background-color: whitesmoke;
}
.avatar {
background-color: #d8d8d8;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
overflow: hidden;
//box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
}
.avatar {
background-color: #d8d8d8;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
overflow: hidden;
//box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
}
</style>
\ No newline at end of file
......@@ -209,7 +209,12 @@
message.notify('支付成功')
setTimeout(() => {
navigateBack();
uni.$emit('refreshPreviousPage', {
vipFlag: '1'
});
uni.navigateBack({
delta: 1,
});
}, 1000);
},
fail(res) {
......
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