Commit 2a635e44 authored by jyx's avatar jyx

会员可进入VIP页面

parent 29455c48
<template>
<view class="body">
<!-- <z-paging style="height: 100%;"> -->
<view v-if="showMask" class="show-mask flex-v" @click="showMask=false">
<view class="mt-30" style="width: 90%;text-align: right;">
<image style="width: 30rpx;height: 30rpx;padding:6rpx;
border-radius: 40rpx;border: 2px solid darkgray;" src="@/static/index/ic_quit_white.png" />
</view>
<text class="mt-10" style="font-size: 46rpx;">如何继续使用?</text>
<text class="m-10">找到“灵思小说阁”小程序</text>
<image class="mt-30" mode="widthFix" :src="maskImage1"></image>
<image :src="maskImage2" mode="widthFix"></image>
</view>
<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:{{userBean.idcode}}</view>
<view style="font-size: 26rpx;color: #b5b5b5;margin-left: 30rpx;margin-top: 10rpx;">
书中自有颜如玉,书中自有黄金屋,书中自有千钟黍</view>
</view>
</view>
<read-time-count-row id='count' ref='timeCount' @resize='resizeTimeCount'></read-time-count-row>
<view style="display: flex;height: 200rpx;margin:30rpx 20rpx;background: #263358;border-radius: 20rpx;">
<view style="flex-grow: 2; margin-left: 20rpx;">
<view style="width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;">
<view style="display: flex;align-items: center;">
<image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_vip.png"></image>
<view style="font-size: 36rpx;font-weight: 777;color: white;">
{{userBean.expireTime<=0 ? '开通VIP会员' : 'VIP会员'}}
</view>
</view>
<view v-if="userBean.expireTime<=0" style="font-size: 28rpx;color: #b5b5b5;margin-top: 20rpx;">
开通会员享更多福利</view>
<view v-else style="font-size: 28rpx;color: #b5b5b5;margin-top: 20rpx;">
到期时间:{{userBean.expireTime*1000 | formatDate('yyyy-MM-dd')}}</view>
</view>
</view>
<view v-if="userBean.expireTime<=0" style="width: 220rpx;">
<view
style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
<view @click="handleCoinPay"
style="width: 160rpx;height: 60rpx;background-color: #fff;border-radius:30rpx;color: 263358;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;">
去开通
</view>
</view>
</view>
</view>
<view class="infobg" style="margin: 20rpx;">
<view class="item arrow" @click="handlePayRecord">
我的订单
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view v-if="false" class="item arrow" @click="handleDotRecord">
书豆记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view v-if="false" class="item arrow" @click="handleUseDotRecord">
消费记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view class="item arrow" @click="handleReadRecord">
阅读记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view class="item arrow" @click="handleFind">
如何找到我
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view class="item arrow" @click="handlecdk">
兑换会员
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view class="item arrow" @click="handlePhone">
联系客服
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
</view>
<view style="display: flex;justify-content: center;margin-top: 20rpx;font-size: 26rpx;color: gray;">
{{ versionName }}
</view>
<!-- </z-paging> -->
<coin-popup :show="showAnimate" @close="showAnimate = false" @paySuccess="paySuccess">
</coin-popup>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</view>
</template>
<script>
import common from '@/mixins/common';
import kefuPopup from '@/components/kefu-popup/kefu-popup.vue';
import {
VERSION_CODE
} from "@/utils/utils.js"
import {
navigateTo,
message,
alert,
loading
} from '@/utils/fun.js';
import {
openUrl
} from '@/utils/app+.js';
const app = getApp();
export default {
name: 'index',
mixins: [common],
components: {
kefuPopup
},
data() {
return {
showMask: false,
showKefuPop: false,
maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png',
maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png',
statusBarHeight: app.globalData.statusBarHeight,
userBean: {},
showAnimate: false,
versionName: ''
};
},
methods: {
resizeTimeCount() {
this.initHeight();
},
refreshTimeCount() {
let ref = this.$refs.timeCount;
if (ref) {
ref.refresh();
}
},
initHeight() {
const query = uni.createSelectorQuery().in(this);
query.select("#count").boundingClientRect();
},
show() {
this.versionName='v '+VERSION_CODE
// 更新阅读时间统计
this.refreshTimeCount();
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
this.userBean = data;
}
});
},
hide() {
},
handleDotRecord() {
// 书豆记录
navigateTo(`/pagesD/dotRecord/dotRecord`)
},
handleUseDotRecord() {
// 书豆消费记录
navigateTo(`/pagesD/useDotRecord/useDotRecord`)
},
handleReadRecord() {
navigateTo(`/pagesD/readerRecord/readerRecord`)
},
handleCoinPay() {
this.showAnimate = true;
},
handlePayRecord() {
navigateTo(`/pagesD/payRecord/payRecord`)
},
handleFind() {
this.showMask = true
},
handlecdk() {
navigateTo(`/pagesA/cdkey/cdkey`)
},
handlePhone() {
this.showKefuPop = true
},
paySuccess(largeType) {
// largeType=vip 开通vip
// largeType=point 购买书豆
message.notify('支付成功');
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
this.userBean = data;
}
});
}
}
};
</script>
<style lang="scss">
@import '@/scss/uni.scss';
.body {
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)
}
.vip-item {
width: 100%;
padding: 10rpx 40rpx;
.content {
width: 90%;
margin: auto;
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 20rpx 40rpx;
background: #263358;
color: #fff;
border-radius: 18rpx;
}
.item {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
margin-right: 20rpx;
}
.item:last-child {
margin-right: 0;
}
.row {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 15rpx;
}
.row:last-child {
margin-bottom: 0;
}
.title {
font-size: 38rpx;
font-weight: 700;
font-style: italic;
}
.desc {
font-size: 26rpx;
color: #b5b5b5;
}
.button {
height: 40rpx;
line-height: 70rpx;
border-radius: 35rpx;
width: 160rpx;
background: #fff;
color: #263358;
text-align: center;
font-size: 30rpx;
font-weight: 700;
font-style: italic;
}
}
.show-mask {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
position: absolute;
z-index: 999;
color: white;
align-items: center;
image {
width: 90%;
}
}
<template>
<view class="body">
<!-- <z-paging style="height: 100%;"> -->
<view v-if="showMask" class="show-mask flex-v" @click="showMask=false">
<view class="mt-30" style="width: 90%;text-align: right;">
<image style="width: 30rpx;height: 30rpx;padding:6rpx;
border-radius: 40rpx;border: 2px solid darkgray;" src="@/static/index/ic_quit_white.png" />
</view>
<text class="mt-10" style="font-size: 46rpx;">如何继续使用?</text>
<text class="m-10">找到“灵思小说阁”小程序</text>
<image class="mt-30" mode="widthFix" :src="maskImage1"></image>
<image :src="maskImage2" mode="widthFix"></image>
</view>
<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:{{userBean.idcode}}</view>
<view style="font-size: 26rpx;color: #b5b5b5;margin-left: 30rpx;margin-top: 10rpx;">
书中自有颜如玉,书中自有黄金屋,书中自有千钟黍</view>
</view>
</view>
<read-time-count-row id='count' ref='timeCount' @resize='resizeTimeCount'></read-time-count-row>
<view style="display: flex;height: 200rpx;margin:30rpx 20rpx;background: #263358;border-radius: 20rpx;">
<view style="flex-grow: 2; margin-left: 20rpx;">
<view style="width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;">
<view style="display: flex;align-items: center;">
<image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_vip.png"></image>
<view style="font-size: 36rpx;font-weight: 777;color: white;">
{{userBean.expireTime<=0 ? '开通VIP会员' : 'VIP会员'}}
</view>
</view>
<view v-if="userBean.expireTime<=0" style="font-size: 28rpx;color: #b5b5b5;margin-top: 20rpx;">
开通会员享更多福利</view>
<view v-else style="font-size: 28rpx;color: #b5b5b5;margin-top: 20rpx;">
到期时间:{{userBean.expireTime*1000 | formatDate('yyyy-MM-dd')}}</view>
</view>
</view>
<view style="width: 220rpx;">
<view
style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
<view @click="handleCoinPay"
style="width: 160rpx;height: 60rpx;background-color: #fff;border-radius:30rpx;color: 263358;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;">
{{userBean.expireTime<=0 ? '去开通' : '立即续费'}}
</view>
</view>
</view>
</view>
<view class="infobg" style="margin: 20rpx;">
<view class="item arrow" @click="handlePayRecord">
我的订单
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view v-if="false" class="item arrow" @click="handleDotRecord">
书豆记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view v-if="false" class="item arrow" @click="handleUseDotRecord">
消费记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view class="item arrow" @click="handleReadRecord">
阅读记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view class="item arrow" @click="handleFind">
如何找到我
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view class="item arrow" @click="handlecdk">
兑换会员
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view class="item arrow" @click="handlePhone">
联系客服
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
</view>
<view style="display: flex;justify-content: center;margin-top: 20rpx;font-size: 26rpx;color: gray;">
{{ versionName }}
</view>
<!-- </z-paging> -->
<coin-popup :show="showAnimate" @close="showAnimate = false" @paySuccess="paySuccess">
</coin-popup>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</view>
</template>
<script>
import common from '@/mixins/common';
import kefuPopup from '@/components/kefu-popup/kefu-popup.vue';
import {
VERSION_CODE
} from "@/utils/utils.js"
import {
navigateTo,
message,
alert,
loading
} from '@/utils/fun.js';
import {
openUrl
} from '@/utils/app+.js';
const app = getApp();
export default {
name: 'index',
mixins: [common],
components: {
kefuPopup
},
data() {
return {
showMask: false,
showKefuPop: false,
maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png',
maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png',
statusBarHeight: app.globalData.statusBarHeight,
userBean: {},
showAnimate: false,
versionName: ''
};
},
methods: {
resizeTimeCount() {
this.initHeight();
},
refreshTimeCount() {
let ref = this.$refs.timeCount;
if (ref) {
ref.refresh();
}
},
initHeight() {
const query = uni.createSelectorQuery().in(this);
query.select("#count").boundingClientRect();
},
show() {
this.versionName = 'v ' + VERSION_CODE
// 更新阅读时间统计
this.refreshTimeCount();
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
this.userBean = data;
}
});
},
hide() {
},
handleDotRecord() {
// 书豆记录
navigateTo(`/pagesD/dotRecord/dotRecord`)
},
handleUseDotRecord() {
// 书豆消费记录
navigateTo(`/pagesD/useDotRecord/useDotRecord`)
},
handleReadRecord() {
navigateTo(`/pagesD/readerRecord/readerRecord`)
},
handleCoinPay() {
this.showAnimate = true;
},
handlePayRecord() {
navigateTo(`/pagesD/payRecord/payRecord`)
},
handleFind() {
this.showMask = true
},
handlecdk() {
navigateTo(`/pagesA/cdkey/cdkey`)
},
handlePhone() {
this.showKefuPop = true
},
paySuccess(largeType) {
// largeType=vip 开通vip
// largeType=point 购买书豆
message.notify('支付成功');
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
this.userBean = data;
}
});
}
}
};
</script>
<style lang="scss">
@import '@/scss/uni.scss';
.body {
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)
}
.vip-item {
width: 100%;
padding: 10rpx 40rpx;
.content {
width: 90%;
margin: auto;
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 20rpx 40rpx;
background: #263358;
color: #fff;
border-radius: 18rpx;
}
.item {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
margin-right: 20rpx;
}
.item:last-child {
margin-right: 0;
}
.row {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 15rpx;
}
.row:last-child {
margin-bottom: 0;
}
.title {
font-size: 38rpx;
font-weight: 700;
font-style: italic;
}
.desc {
font-size: 26rpx;
color: #b5b5b5;
}
.button {
height: 40rpx;
line-height: 70rpx;
border-radius: 35rpx;
width: 160rpx;
background: #fff;
color: #263358;
text-align: center;
font-size: 30rpx;
font-weight: 700;
font-style: italic;
}
}
.show-mask {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
position: absolute;
z-index: 999;
color: white;
align-items: center;
image {
width: 90%;
}
}
</style>
\ No newline at end of file
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