Commit 6d0199e6 authored by mengcuiguang's avatar mengcuiguang

修改vip弹窗,添加vip返回挽留

parent 7375eeb9
...@@ -92,7 +92,7 @@ let apiRequest = function({ ...@@ -92,7 +92,7 @@ let apiRequest = function({
option.data = data; option.data = data;
} }
} }
console.log('123')
// token处理 // token处理
let token = readToken(); let token = readToken();
if (!checkTokenWhiteList(token, url, urlModule)) { if (!checkTokenWhiteList(token, url, urlModule)) {
...@@ -123,7 +123,7 @@ let apiRequest = function({ ...@@ -123,7 +123,7 @@ let apiRequest = function({
...header ...header
} }
} }
console.log('123')
printInfo("start Req", option); printInfo("start Req", option);
let requestTask = uni.request({ let requestTask = uni.request({
...option, ...option,
......
<template> <template>
<view style="z-index: 999;"> <view>
<uni-popup type="bottom" ref="coinPop" :maskClick="false" :isMaskClick="false"> <uni-popup type="bottom" ref="coinPop" :maskClick="false" :isMaskClick="false">
<view style="position: relative;"> <view style="position: relative;">
<view v-if="agreeFlag" <view v-if="agreeFlag"
...@@ -16,28 +16,22 @@ ...@@ -16,28 +16,22 @@
<view class="body" style="width: 100%;height: 100%;background-color: white;"> <view class="body" style="width: 100%;height: 100%;background-color: white;">
<scroll-view scroll-y> <scroll-view scroll-y>
<view style="display: flex;flex-direction: column;"> <view style="display: flex;flex-direction: column;align-items: flex-end;">
<view style="display: flex;flex-direction: row;"> <view style="display: flex;flex-direction: row;">
<view v-if="agreementDto != null" @click="handleUnsign" <view @click="handleAgree" style="margin-top: 12rpx;margin-right: 10rpx;">付费须知></view>
style="margin-top: 12rpx;margin-left: 10rpx;">自动续费管理></view> <image @click="handleClose"
style="width: 30rpx;height: 30rpx;display: flex;align-items: right;margin-top: 20rpx;margin-right: 20rpx;margin-bottom: 10rpx;"
<view style="margin-top: 12rpx;margin-left: auto;display: flex;flex-direction: row;">
<view @click="handleAgree" style="margin-right: 10rpx;">付费须知></view>
<image @click="handleClickClose"
style="width: 30rpx;height: 30rpx;display: flex;align-items: right;margin-top: 20rpx;margin-left: auto;margin-right: 20rpx;margin-bottom: 10rpx;"
src="@/static/index/ic_quit_white.png"></image> src="@/static/index/ic_quit_white.png"></image>
</view> </view>
</view>
</view> </view>
<view class="section"> <view class="section">
<view class="pack-box"> <view class="pack-box">
<view class="pack-item" :class="[{active: index==selectedIndex}]" <view class="pack-item" :class="[{active: index==selectedIndex}]"
v-for='(item, index) in vipList' :key='index' @click="choosePack(item, index)"> v-for='(item, index) in vipList' :key='index' @click="choosePack(item, index)">
<view style="display: flex;flex-direction: column;align-items: center;"> <view style="display: flex;flex-direction: column;padding-left: 4rpx;">
<view class="price row"> <view class="price row">
{{item.firstPayPrice<=0 ? '免费试用' : item.firstPayPrice+'元'}} {{item.firstPayPrice}}
</view> </view>
<view class="name row" v-if="item.title!=null&&item.title!=''"> <view class="name row" v-if="item.title!=null&&item.title!=''">
...@@ -62,10 +56,6 @@ ...@@ -62,10 +56,6 @@
</view> </view>
</view> </view>
<text class="trialStyle" v-show="hintText!=null&&hintText!=''">
{{hintText}}
</text>
<view style="display: flex;flex-direction: column;align-items: center;"> <view style="display: flex;flex-direction: column;align-items: center;">
<view style="font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;"> <view style="font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;">
订单中如有疑问,请在个人中心联系客服</view> 订单中如有疑问,请在个人中心联系客服</view>
...@@ -83,8 +73,7 @@ ...@@ -83,8 +73,7 @@
<script> <script>
import common from '@/mixins/common'; import common from '@/mixins/common';
import { import {
message, message
navigateTo
} from '@/utils/fun'; } from '@/utils/fun';
export default { export default {
name: 'coinPopup', name: 'coinPopup',
...@@ -106,11 +95,10 @@ ...@@ -106,11 +95,10 @@
data() { data() {
return { return {
vipList: [], vipList: [],
backvipBean: null,
selectedIndex: 0, selectedIndex: 0,
agreeFlag: false, agreeFlag: false,
userBean: {}, userBean: {},
agreementDto: null,
hintText: '',
os: 'android', os: 'android',
titleText: '超多精彩小说一键解锁', titleText: '超多精彩小说一键解锁',
showClone: false showClone: false
...@@ -120,18 +108,29 @@ ...@@ -120,18 +108,29 @@
// 支付完成回调 // 支付完成回调
paySuccess(largeType) { paySuccess(largeType) {
this.$emit('paySuccess', largeType); this.$emit('paySuccess', largeType);
this.handleClose(); this.$refs.coinPop.close('bottom');
this.$emit("close", {
detail: {
data: null
}
})
}, },
handleShow() { handleShow() {
let that = this; let that = this;
this.$refs.coinPop.open('bottom'); this.$refs.coinPop.open('bottom');
// 内容重置
if (this.vipList.length > 0) {
this.vipList = [];
this.selectedIndex = 0;
this.backvipBean = null;
}
if (wx.getSystemInfoSync().platform === 'ios') { if (tt.getSystemInfoSync().platform === 'ios') {
this.os = 'ios'; this.os = 'ios';
} }
this.post({ this.post({
url: '/vip/getVipProducts/cyc', url: '/vip/getVipProductsV1',
data: { data: {
bookId: that.vedioId bookId: that.vedioId
}, },
...@@ -139,132 +138,143 @@ ...@@ -139,132 +138,143 @@
success: ({ success: ({
data data
}) => { }) => {
this.vipList = data.list; // this.vipList = data.list;
if (data.list != null) { if (data.list != null) {
this.hintText = this.vipList[0].trailRemark;
for (let i = 0; i < data.list.length; i++) { for (let i = 0; i < data.list.length; i++) {
// 当前选中
if (data.list[i].activityType == 1) { if (data.list[i].activityType == 1) {
this.selectedIndex = i; this.selectedIndex = i;
break;
} }
// 筛选产品
if (data.list[i].abtype == 1) {
// 返回弹窗产品
this.backvipBean = data.list[i];
} else {
this.vipList.push(data.list[i]);
} }
} }
}
} }
}); });
this.post({ this.post({
url: '/vip/getOrderList', url: '/user/baseMsg',
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
console.log("agreement=", data.agreement); this.userBean = data;
if (data.agreement == undefined) {
console.log("agreement=22222");
this.agreementDto = null;
} else {
this.agreementDto = data.agreement;
}
} }
}); });
}, },
handleUnsign() {
if (this.agreementDto) {
let params = JSON.stringify(this.agreementDto)
navigateTo(`/pagesA/unsign/unsign?params=` + params)
}
},
handleAgree() { handleAgree() {
this.agreeFlag = true this.agreeFlag = true
}, },
handleClickClose() {
this.$refs.coinPop.close('bottom');
this.$emit('clickClose');
this.$emit('close');
},
handleClose() { handleClose() {
// 兼容vip界面返回弹窗
if (this.backvipBean == null) {
// 不跳转返回弹窗
this.$refs.coinPop.close('bottom'); this.$refs.coinPop.close('bottom');
this.$emit('close'); }
this.$emit("close", {
detail: {
data: this.backvipBean
}
})
}, },
choosePack(item, index) { choosePack(item, index) {
this.selectedIndex = index; this.selectedIndex = index;
if (this.vipList[this.selectedIndex].trailRemark != null) {
this.hintText = this.vipList[this.selectedIndex].trailRemark;
} else {
this.hintText = '';
}
this.handlePay(); this.handlePay();
}, },
handlePay() { handlePay() {
let that = this;
var vipBean = this.vipList[this.selectedIndex];
if (this.os == 'ios') { if (this.os == 'ios') {
message.notify('暂不支持ios系统~'); message.notify('iOS暂不支持购买');
} else { return
}
let that = this;
let vipBean = this.vipList[this.selectedIndex];
// 抖音支付
this.post({ this.post({
url: '/vip/getVipPayParams/wechat', url: '/vip/getVipPayParams/douyin',
data: { data: {
pid: vipBean.pid, bookId: that.vedioId,
payChannel: 'WEIXIN' os: that.os,
pid: vipBean.pid
}, },
showLoading: true, showLoading: true,
success: ({ success: ({
data data
}) => { }) => {
if (vipBean.firstPayPrice == 0) { that.ttPrePay(data, vipBean.largeType);
//签约
that.wxSign(data, vipBean.largeType);
} else {
//普通支付
that.wxPay(data, vipBean.largeType);
}
} }
}); });
}
}, },
wxPay(wxData, largeType) { ttPrePay(ttData, largeType) {
let wxParams = wxData.params; if (!tt.canIUse('requestOrder')) {
message.notify('请升级抖音APP版本.');
return
}
uni.showLoading({
title: '加载中...'
});
let that = this; let that = this;
// 发起微信支付 tt.requestOrder({
wx.requestPayment({ data: ttData.params.data,
timeStamp: wxParams.timeStamp, byteAuthorization: ttData.params.byteAuthorization,
nonceStr: wxParams.nonceStr,
package: wxParams.packageStr,
signType: wxParams.signType,
paySign: wxParams.paySign,
success(res) { success(res) {
that.queryOrderStatus(largeType, wxData.tidStr); that.ttPay(largeType, res.orderId, ttData);
}, },
fail(res) {} fail(res) {
}) uni.hideLoading();
console.log('ttPrePay', res.errMsg);
// message.notify(res.errMsg);
},
});
}, },
wxSign(wxData, largeType) { ttPay(largeType, oid, ttData) {
let wxParams = wxData.params; uni.hideLoading();
if (!tt.canIUse('getOrderPayment')) {
message.notify('请升级抖音APP版本!');
return
}
let that = this; let that = this;
// 发起微信签约 if (this.os == 'ios') {
wx.navigateToMiniProgram({ if (!tt.canIUse('getOrderPayment.object.imId')) {
appId: "wxbd687630cd02ce1d", message.notify('请升级抖音APP版本~');
path: 'pages/index/index', return
extraData: wxData.params, }
tt.getOrderPayment({
orderId: oid,
imId: ttData.imId,
success(res) { success(res) {
console.log("wxSign suc=", res); that.queryOrderStatus(largeType, ttData.tidStr);
if (res.return_code == 'SUCCESS') { },
console.log("wxSign suc1111"); fail(res) {
// 成功跳转到签约小程序 console.log('ios pay', res.errMsg);
that.queryOrderStatus(largeType, wxData.tidStr); // message.notify(res.errMsg);
},
});
} else { } else {
// 签约失败 tt.getOrderPayment({
console.log("wxSign fail22222"); orderId: oid,
} success(res) {
that.queryOrderStatus(largeType, ttData.tidStr);
}, },
fail(res) { fail(res) {
// 未成功跳转到签约小程序 console.log('android pay', res.errMsg);
console.log("wxSign fail=3333", res); // message.notify(res.errMsg);
},
});
} }
})
}, },
queryOrderStatus(largeType, tid) { queryOrderStatus(largeType, tid) {
let that = this; let that = this;
...@@ -287,6 +297,13 @@ ...@@ -287,6 +297,13 @@
handler: function(newVal, oldVal) { handler: function(newVal, oldVal) {
if (newVal) { if (newVal) {
this.handleShow(); this.handleShow();
} else {
// 兼容vip界面返回弹窗
if (this.backvipBean != null) {
// 跳转了返回弹窗
this.$refs.coinPop.close('bottom');
}
} }
}, },
immediate: true immediate: true
...@@ -320,22 +337,29 @@ ...@@ -320,22 +337,29 @@
flex-wrap: wrap; flex-wrap: wrap;
.active { .active {
background-color: #f4c98b !important; // border: 6rpx solid #EDC260 !important;
border: 6rpx solid #fd5350 !important; background-repeat: no-repeat !important;
background-size: 100% !important;
background-origin: border-box !important;
background-image: url(https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_vip_enable.png) !important;
} }
.pack-item { .pack-item {
margin-bottom: 25rpx; margin-bottom: 25rpx;
margin-right: 22rpx; margin-right: 22rpx;
width: calc(45%); width: calc(46%);
height: 190rpx; height: 210rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
background: #f5f5f5; // background: #f5f5f5;
border: 6rpx solid #f5f5f5; // border: 6rpx solid #f5f5f5;
border-radius: 10rpx; // border-radius: 10rpx;
position: relative; position: relative;
background-repeat: no-repeat;
background-size: 100%;
background-origin: border-box;
background-image: url(https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_vip_none.png);
.row { .row {
margin: 8rpx 15rpx; margin: 8rpx 15rpx;
...@@ -348,32 +372,25 @@ ...@@ -348,32 +372,25 @@
.name { .name {
width: calc(90%); width: calc(90%);
text-align: center; font-size: 30rpx;
font-size: 29rpx; color: #220601;
color: #333;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.price { .price {
font-size: 40rpx; font-size: 45rpx;
color: #fd5350; color: black;
margin-top: 5rpx;
font-weight: 700; font-weight: 700;
} }
.origin { .origin {
color: #5A3C0F; color: black;
// background: #5a1505; // background: #5a1505;
background-image: linear-gradient(90deg, #F3DEBE, #EAC180); // background-image: linear-gradient(90deg, #F3DEBE, #EAC180);
font-size: 22rpx; font-size: 30rpx;
border-radius: 20rpx;
height: 30rpx;
line-height: 30rpx;
padding-top: 4rpx;
padding-bottom: 3rpx;
padding-left: 16rpx;
padding-right: 16rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
...@@ -382,30 +399,22 @@ ...@@ -382,30 +399,22 @@
.cut-down { .cut-down {
position: absolute; position: absolute;
top: 0; top: 0;
color: #fff; right: 0;
background: #ff502f; color: #fff6ee;
font-size: 22rpx; background: #65533f;
border-radius: 15rpx; font-size: 30rpx;
height: 30rpx; border-top-left-radius: 25rpx;
line-height: 30rpx; border-top-right-radius: 0;
padding-top: 6rpx; border-bottom-left-radius: 0;
padding-bottom: 3rpx; border-bottom-right-radius: 25rpx;
padding-left: 16rpx; height: 36rpx;
padding-right: 16rpx; line-height: 36rpx;
padding-top: 8rpx;
padding-bottom: 4rpx;
padding-left: 24rpx;
padding-right: 24rpx;
transform: translate(0, -50%); transform: translate(0, -50%);
} }
} }
} }
.trialStyle {
display: flex;
align-items: center;
font-size: 30rpx;
color: darkgray;
margin-left: 20rpx;
margin-right: 20rpx;
word-wrap: break-word;
word-break: break-all;
white-space: pre-line;
}
</style> </style>
\ No newline at end of file
...@@ -2,46 +2,42 @@ ...@@ -2,46 +2,42 @@
<view class="body"> <view class="body">
<view v-if="showMask" class="show-mask flex-v" @click="showMask=false"> <view v-if="showMask" class="show-mask flex-v" @click="showMask=false">
<view class="mt-30" style="width: 90%;text-align: right;"> <view class="mt-30" style="width: 90%;text-align: right;">
<image style="width: 30rpx;height: 30rpx;padding:6rpx; <image style="width: 30rpx;height: 30rpx;" src="@/static/index/ic_quit_white.png" mode="widthFix" />
border-radius: 40rpx;border: 2px solid darkgray;" src="@/static/index/ic_quit_white.png" />
</view> </view>
<text class="mt-10" style="font-size: 46rpx;">如何继续使用?</text> <text class="mt-10" style="font-size: 46rpx;">如何继续使用?</text>
<text class="m-10">找到“河狸小故事”小程序</text> <text class="m-10">找到“逸想小说阁”小程序</text>
<image class="mt-30" mode="widthFix" :src="maskImage1"></image> <image class="mt-30" mode="widthFix" :src="maskImage1"></image>
<image :src="maskImage2" mode="widthFix"></image> <image :src="maskImage2" mode="widthFix"></image>
</view> </view>
<view style="display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;"> <view class="avatar-root">
<image class="avatar" src="@/static/images/logo.png"></image> <image class="avatar" src="@/static/images/logo.png"></image>
<view style="padding-left: 30rpx;font-size: 22rpx;"> <view class="icon-root">
<view style="font-size: 34rpx;color: black;margin-bottom: 10rpx;">书友{{userBean.idcode}}</view> <view class="idcode">书友{{userBean.idcode}}</view>
<view v-if="isVip()" <view v-if="isVip()" class="icon-lable1">
style="color: #9B4029;border-radius: 20rpx;width:130rpx;text-align:center;background:linear-gradient(90deg,#F9BEA9,#FFDACA);">
普通用户 普通用户
</view> </view>
<view v-else <view v-else class="icon-lable2">
style="color: #392F2C;border-radius: 20rpx;width:130rpx;text-align:center;background:linear-gradient(90deg,#FAD198,#F7C98C);">
畅读VIP</view> 畅读VIP</view>
</view> </view>
</view> </view>
<view class="vip-label"> <view class="vip-label">
<image style="width: 100%;position: absolute;z-index: 1;" mode="widthFix" <image class="vip-bg" mode="widthFix"
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_book_my.png"></image> src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_book_my.png"></image>
<view class="flex-v" style="z-index: 10;margin-left: 180rpx;"> <view class="flex-v" style="z-index: 10;margin-left: 180rpx;">
<view style="font-size: 34rpx;color: #FFE5BA;"> <view class="vip-title">
{{ isVip() ? '开通VIP会员' : 'VIP会员'}} {{ isVip() ? '开通VIP会员' : 'VIP会员'}}
</view> </view>
<view v-if="isVip()" style="font-size: 28rpx;color: #ADABAA;margin-top: 12rpx;"> <view class="vip-hint1" v-if="isVip()">
开通会员享更多福利</view> 开通会员享更多福利</view>
<view v-else style="font-size: 28rpx;color: #b5b5b5;margin-top: 12rpx;"> <view class="vip-hint2" v-else>
到期时间:{{userBean.expireTime*1000 | formatDate('yyyy-MM-dd')}}</view> 到期时间:{{userBean.expireTime*1000 | formatDate('yyyy-MM-dd')}}</view>
</view> </view>
<view @click="handleCoinPay" <view class="vip-btn" @click="handleCoinPay">
style="width: 160rpx;height: 60rpx;background:linear-gradient(90deg,#FAD198,#F7C98C);border-radius:30rpx;color: #4F301D;font-size: 30rpx;text-align: center;line-height: 60rpx;z-index: 10;margin-right: 20rpx;">
{{ isVip() ? '去开通' : '已开通'}} {{ isVip() ? '去开通' : '已开通'}}
</view> </view>
</view> </view>
...@@ -51,25 +47,13 @@ ...@@ -51,25 +47,13 @@
<image class="setting-img" src="@/static/setting/setting_wddd.png"></image> <image class="setting-img" src="@/static/setting/setting_wddd.png"></image>
我的订单 我的订单
</view> </view>
<view v-if="false" class="item" @click="handleDotRecord">
<image class="setting-img" src="@/static/images/logo.png"></image>
书豆记录
</view>
<view v-if="false" class="item" @click="handleUseDotRecord">
<image class="setting-img" src="@/static/images/logo.png"></image>
消费记录
</view>
<view class="item" @click="handleReadRecord"> <view class="item" @click="handleReadRecord">
<image class="setting-img" src="@/static/setting/setting_ydjl.png"></image> <image class="setting-img" src="@/static/setting/setting_ydjl.png"></image>
阅读记录 阅读记录
</view> </view>
<view v-if="false" class="item" @click="handleFind">
<image class="setting-img" src="@/static/images/logo.png"></image>
如何找到我
</view>
<view class="item" @click="handleUnsign"> <view class="item" @click="handleUnsign">
<image class="setting-img" src="@/static/setting/setting_qxdy.png"></image> <image class="setting-img" src="@/static/setting/setting_qxdy.png"></image>
取消订阅 如何找到我
</view> </view>
<view class="item" @click="handlecdk"> <view class="item" @click="handlecdk">
<image class="setting-img" src="@/static/setting/setting_dhhy.png"></image> <image class="setting-img" src="@/static/setting/setting_dhhy.png"></image>
...@@ -81,11 +65,10 @@ ...@@ -81,11 +65,10 @@
</view> </view>
</view> </view>
<!-- <view style="display: flex;justify-content: center;margin-top: 20rpx;font-size: 26rpx;color: gray;"> <coin-popup :show="showAnimate" @close="coinClose($event)" @paySuccess="paySuccess">
{{ versionName }}
</view> -->
<coin-popup :show="showAnimate" @close="showAnimate = false" @paySuccess="paySuccess">
</coin-popup> </coin-popup>
<vipback-popup :show="showVipbackPop" :vipBean="backvipBean" @vipbackclose="vipbackClose()"
@vipbackpaySuccess="vipbackpaySuccess" />
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" /> <kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</view> </view>
</template> </template>
...@@ -97,7 +80,7 @@ ...@@ -97,7 +80,7 @@
import CoinPopup from "@/components/coin-popup/coin-popup.vue"; import CoinPopup from "@/components/coin-popup/coin-popup.vue";
import KefuPopup from "@/components/kefu-popup/kefu-popup.vue"; import KefuPopup from "@/components/kefu-popup/kefu-popup.vue";
import VipbackPopup from '@/components/vipback-popup/vipback-popup.vue';
import { import {
navigateTo, navigateTo,
message, message,
...@@ -114,17 +97,20 @@ ...@@ -114,17 +97,20 @@
name: 'index', name: 'index',
mixins: [common], mixins: [common],
components: { components: {
VipbackPopup,
CoinPopup, CoinPopup,
KefuPopup KefuPopup
}, },
data() { data() {
return { return {
showMask: false, showMask: false,
showVipbackPop: false,
showKefuPop: false, showKefuPop: false,
maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png', 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', maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png',
statusBarHeight: app.globalData.statusBarHeight, statusBarHeight: app.globalData.statusBarHeight,
userBean: {}, userBean: {},
backvipBean: null,
showAnimate: false, showAnimate: false,
versionName: '', versionName: '',
vipLabelBg: 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_book_my.png', vipLabelBg: 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_book_my.png',
...@@ -177,8 +163,7 @@ ...@@ -177,8 +163,7 @@
navigateTo(`/pagesD/readerRecord/readerRecord`) navigateTo(`/pagesD/readerRecord/readerRecord`)
}, },
handleCoinPay() { handleCoinPay() {
// this.showAnimate = true; this.showAnimate = true;
navigateTo(`/pagesA/vipPay/vipPay`)
}, },
handlePayRecord() { handlePayRecord() {
navigateTo(`/pagesD/payRecord/payRecord`) navigateTo(`/pagesD/payRecord/payRecord`)
...@@ -190,13 +175,7 @@ ...@@ -190,13 +175,7 @@
navigateTo(`/pagesA/cdkey/cdkey`) navigateTo(`/pagesA/cdkey/cdkey`)
}, },
handleUnsign() { handleUnsign() {
if (this.agreementDto) { this.showMask = true
let params = JSON.stringify(this.agreementDto)
navigateTo(`/pagesA/unsign/unsign?params=` + params)
return
}
message.notify('您未订阅会员');
}, },
handlePhone() { handlePhone() {
this.showKefuPop = true this.showKefuPop = true
...@@ -215,6 +194,39 @@ ...@@ -215,6 +194,39 @@
this.userBean = data; this.userBean = data;
} }
}); });
},
coinClose(e) {
let item = e.detail.data;
if (item != null) {
this.backvipBean = item;
setTimeout(() => {
this.showVipbackPop = true;
}, 300);
} else {
this.showAnimate = false;
}
console.log('mymymymymy', item);
},
vipbackClose() {
this.showAnimate = false;
this.showVipbackPop = false;
},
vipbackpaySuccess(largeType) {
// largeType=vip 开通vip
// largeType=point 购买书豆
message.notify('支付成功');
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
this.userBean = data;
}
});
this.vipbackClose();
} }
} }
}; };
...@@ -238,7 +250,7 @@ ...@@ -238,7 +250,7 @@
position: relative; position: relative;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 60rpx 30rpx; margin: 70rpx 30rpx;
align-items: center; align-items: center;
} }
...@@ -286,4 +298,75 @@ ...@@ -286,4 +298,75 @@
width: 90%; width: 90%;
} }
} }
.avatar-root {
display: flex;
flex-direction: row;
align-items: center;
margin: 30rpx 20rpx;
padding-left: 10rpx;
}
.icon-root {
padding-left: 30rpx;
font-size: 22rpx;
}
.idcode {
font-size: 34rpx;
color: black;
margin-bottom: 10rpx;
}
.icon-lable1 {
color: #9B4029;
border-radius: 20rpx;
width: 130rpx;
text-align: center;
background: linear-gradient(90deg, #F9BEA9, #FFDACA);
}
.icon-lable2 {
color: #392F2C;
border-radius: 20rpx;
width: 130rpx;
text-align: center;
background: linear-gradient(90deg, #FAD198, #F7C98C);
}
.vip-bg {
width: 100%;
position: absolute;
z-index: 1;
}
.vip-title {
font-size: 34rpx;
color: #FFE5BA;
}
.vip-hint1 {
font-size: 28rpx;
color: #ADABAA;
margin-top: 12rpx;
}
.vip-hint2 {
font-size: 28rpx;
color: #b5b5b5;
margin-top: 12rpx;
}
.vip-btn {
width: 160rpx;
height: 60rpx;
background: linear-gradient(90deg, #FAD198, #F7C98C);
border-radius: 30rpx;
color: #4F301D;
font-size: 30rpx;
text-align: center;
line-height: 60rpx;
z-index: 10;
margin-right: 20rpx;
}
</style> </style>
\ No newline at end of file
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
<view class="container"> <view class="container">
<image @click="onClose" style="width: 50rpx; height: 50rpx;margin-left:auto;margin-right: 30rpx; <image @click="onClose" style="width: 50rpx; height: 50rpx;margin-left:auto;margin-right: 30rpx;
margin-bottom: 30rpx;" src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_close_white.png"></image> margin-bottom: 30rpx;" src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_close_white.png"></image>
<view class="content"> <view class="content">
<button class="button1" type="default" size="default" <text style="font-size: 40rpx;margin-bottom: 15rpx;">客服时间: 工作日9:00-18:00</text>
@click="tapMakePhoneCall">客服电话:400-096-9950</button> <text class="button1" @click="tapMakePhoneCall">客服电话</text>
<!-- <button class="button2" open-type="im" data-im-id="93264117800">客服在线</button> --> <button class="button2" open-type="im" data-im-id="93264117800">在线客服</button>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
...@@ -15,8 +16,6 @@ ...@@ -15,8 +16,6 @@
</template> </template>
<script> <script>
// import uniPopuo from 'uniPopuo'
export default { export default {
name: 'kefuPopup', name: 'kefuPopup',
props: { props: {
...@@ -40,7 +39,7 @@ ...@@ -40,7 +39,7 @@
}, },
tapMakePhoneCall() { tapMakePhoneCall() {
let that = this let that = this
wx.makePhoneCall({ tt.makePhoneCall({
phoneNumber: "4000969950", phoneNumber: "4000969950",
success(res) { success(res) {
// 调用成功 makePhoneCall:ok // 调用成功 makePhoneCall:ok
......
<template>
<uni-popup type="center" ref="vipback" :maskClick="false" :isMaskClick="false">
<view class="dialog">
<view class="dialog-container">
<view class="dialog-content">
<text style="font-size: 42rpx; color: #6C6A6A;">
{{vipBean.topTitle}}
</text>
<view style="display: flex;flex-direction: row;margin-top: 30rpx;">
<view style="font-size: 42rpx;color: #333232;margin-top: 18rpx;"></view>
<view style="font-size: 60rpx;color: #F32E2E;font-weight: 777;">{{vipBean.firstPayPrice}}</view>
<view style="font-size: 42rpx;color: #333232;margin-top: 18rpx;"></view>
</view>
<text style="margin-top: 30rpx; font-size: 38rpx; color: #F32E2E">
{{vipBean.remarks}}
</text>
<image @click="handlePay"
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_book_vip_btn.png"
style="height: 112rpx;margin-top: 100rpx;" mode="heightFix"></image>
</view>
<image src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_book_vip_.png"
style="height: 624rpx;" mode="heightFix"></image>
</view>
<image @click="handleClose" style="width: 50rpx; height: 50rpx;margin:40rpx auto;"
src="@/static/video/close.png">
</image>
</view>
</uni-popup>
</template>
<script>
import common from '@/mixins/common';
import {
message
} from '@/utils/fun';
export default {
name: 'vipbackPopup',
mixins: [common],
props: {
show: {
type: Boolean,
default: false
},
vipBean: {
type: Object,
default: function() {
return {}
}
}
},
data() {
return {
os: 'android'
};
},
watch: {
show: {
handler: function(newVal, oldVal) {
if (newVal) {
this.showdialog();
}
},
immediate: true
}
},
methods: {
showdialog() {
this.$refs.vipback.open();
console.log('vipback-', this.vipBean);
if (tt.getSystemInfoSync().platform === 'ios') {
this.os = 'ios';
}
},
handlePay() {
if (this.os == 'ios') {
message.notify('iOS暂不支持购买');
return
}
let that = this;
// 抖音支付
this.post({
url: '/vip/getVipPayParams/douyin',
data: {
os: that.os,
pid: that.vipBean.pid
},
showLoading: true,
success: ({
data
}) => {
that.ttPrePay(data, that.vipBean.largeType);
}
});
},
ttPrePay(ttData, largeType) {
if (!tt.canIUse('requestOrder')) {
message.notify('请升级抖音APP版本.');
return
}
tt.showLoading({
title: '加载中...'
});
let that = this;
tt.requestOrder({
data: ttData.params.data,
byteAuthorization: ttData.params.byteAuthorization,
success(res) {
that.ttPay(largeType, res.orderId, ttData);
},
fail(res) {
tt.hideLoading();
console.log('ttPrePay', res.errMsg);
// message.notify(res.errMsg);
},
});
},
ttPay(largeType, oid, ttData) {
tt.hideLoading();
if (!tt.canIUse('getOrderPayment')) {
message.notify('请升级抖音APP版本!');
return
}
let that = this;
if (this.os == 'ios') {
if (!tt.canIUse('getOrderPayment.object.imId')) {
message.notify('请升级抖音APP版本~');
return
}
tt.getOrderPayment({
orderId: oid,
imId: ttData.imId,
success(res) {
that.queryOrderStatus(largeType, ttData.tidStr);
},
fail(res) {
console.log('ios pay', res.errMsg);
// message.notify(res.errMsg);
},
});
} else {
tt.getOrderPayment({
orderId: oid,
success(res) {
that.queryOrderStatus(largeType, ttData.tidStr);
},
fail(res) {
console.log('android pay', res.errMsg);
// message.notify(res.errMsg);
},
});
}
},
queryOrderStatus(largeType, tid) {
let that = this;
this.post({
data: {
tid: tid
},
url: '/vip/queryVipOrder',
showLoading: true,
success: ({
data
}) => {
that.vipbackpaySuccess(largeType);
}
});
},
vipbackpaySuccess(largeType) {
this.$emit('vipbackpaySuccess', largeType);
this.handleClose();
},
handleClose() {
this.$refs.vipback.close();
this.$emit('vipbackclose');
}
}
}
</script>
<style lang="less">
.dialog {
height: 100%;
display: flex;
flex-direction: column;
padding-bottom: 290rpx;
}
.dialog-container {
position: relative;
}
.dialog-content {
position: absolute;
top: 16%;
left: 50%;
width: 500rpx;
margin-left: -250rpx;
display: flex;
flex-direction: column;
align-items: center;
}
</style>
\ No newline at end of file
...@@ -14,9 +14,16 @@ ...@@ -14,9 +14,16 @@
<bean-pop v-if="bookData.isUnlock==0 && userInfo.bookLegumes<bookData.bookLegumes" :show='showBean' <bean-pop v-if="bookData.isUnlock==0 && userInfo.bookLegumes<bookData.bookLegumes" :show='showBean'
@close='closeBeanPop'></bean-pop> --> @close='closeBeanPop'></bean-pop> -->
<recommend-pop :show='showRecommend' @close='closeRecommendPop' :bookId="bookId"></recommend-pop> <recommend-pop :show='showRecommend' @close='closeRecommendPop' :bookId="bookId"></recommend-pop>
<coin-popup v-if="bookData.isUnlock==0 && !isVip()" :show="showVip" @close="closeVipPop" <!-- <coin-popup v-if="bookData.isUnlock==0 && !isVip()" :show="showVip" @close="closeVipPop"
:vedioId="bookData.id" @paySuccess="paySuccess">
</coin-popup> -->
<coin-popup v-if="bookData.isUnlock==0 && !isVip()" :show="showVip" @close="coinClose($event)"
:vedioId="bookData.id" @paySuccess="paySuccess"> :vedioId="bookData.id" @paySuccess="paySuccess">
</coin-popup> </coin-popup>
<vipback-popup :show="showVipbackPop" :vipBean="backvipBean" @vipbackclose="vipbackClose()"
@vipbackpaySuccess="vipbackpaySuccess" />
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</template> </template>
<c-login :isShareLink="true"></c-login> <c-login :isShareLink="true"></c-login>
<popup :show="showMoibleLogin" @close="showMoibleLogin=false"> <popup :show="showMoibleLogin" @close="showMoibleLogin=false">
...@@ -53,6 +60,8 @@ ...@@ -53,6 +60,8 @@
import SettingPop from "./components/setting-pop.vue"; import SettingPop from "./components/setting-pop.vue";
import VipPop from "./components/vip-pop.vue"; import VipPop from "./components/vip-pop.vue";
import BeanPop from "./components/bean-pop.vue"; import BeanPop from "./components/bean-pop.vue";
import VipbackPopup from '@/components/vipback-popup/vipback-popup.vue';
import CoinPopup from "@/components/coin-popup/coin-popup.vue";
import RecommendPop from "./components/recommend-pop.vue"; import RecommendPop from "./components/recommend-pop.vue";
import SystemInfoMixin from "../../../common/mixins/system-info-mixin.js"; import SystemInfoMixin from "../../../common/mixins/system-info-mixin.js";
import { import {
...@@ -86,6 +95,8 @@ ...@@ -86,6 +95,8 @@
VipPop, VipPop,
BeanPop, BeanPop,
RecommendPop, RecommendPop,
VipbackPopup,
CoinPopup,
}, },
data() { data() {
return { return {
...@@ -101,6 +112,8 @@ ...@@ -101,6 +112,8 @@
showBeanOpen: 0, showBeanOpen: 0,
showMoibleLogin: false, showMoibleLogin: false,
mobileLoginLock: false, mobileLoginLock: false,
showVipbackPop: false,
backvipBean: null,
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -346,6 +359,35 @@ ...@@ -346,6 +359,35 @@
// 点击封面,暂无 // 点击封面,暂无
tapThumb(e) { tapThumb(e) {
gotoBookCoverPage(this.bookData.id); gotoBookCoverPage(this.bookData.id);
},
coinClose(e) {
let item = e.detail.data;
if (item != null) {
this.backvipBean = item;
setTimeout(() => {
this.showVipbackPop = true;
}, 300);
} else {
this.showVip = false;
setTimeout(() => {
this.showRecommend = true;
}, 300);
}
console.log('mymymymymy', item);
},
vipbackClose() {
this.showVip = false;
this.showVipbackPop = false;
setTimeout(() => {
this.showRecommend = true;
}, 300);
},
vipbackpaySuccess(largeType) {
this.$set(this.bookData, "isUnlock", true);
this.vipbackClose();
} }
} }
} }
......
...@@ -14,16 +14,17 @@ ...@@ -14,16 +14,17 @@
"style": { "style": {
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000" "navigationBarTextStyle": "black"
} }
}, },
// #endif // #endif
{ {
"path": "pages/home", "path": "pages/home",
"style": { "style": {
"navigationBarTitleText": "逸想小说阁",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000" "navigationBarTextStyle": "black"
} }
}, { }, {
"path": "pages/brower/brower", "path": "pages/brower/brower",
......
...@@ -18,6 +18,12 @@ ...@@ -18,6 +18,12 @@
</view> </view>
</z-paging> </z-paging>
<view class="box-wrap" @click="handleKefu">
<image src="../../static/ic_service.png"></image>
<text>客服时间:</text>
<text>每天9:00-18:00</text>
</view>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</view> </view>
</template> </template>
<script> <script>
...@@ -28,7 +34,8 @@ ...@@ -28,7 +34,8 @@
mixins: [common], mixins: [common],
data() { data() {
return { return {
dataList: [] dataList: [],
showKefuPop: false
}; };
}, },
methods: { methods: {
...@@ -51,6 +58,9 @@ ...@@ -51,6 +58,9 @@
this.$refs.paging.complete(data.list); this.$refs.paging.complete(data.list);
} }
}); });
},
handleKefu() {
this.showKefuPop = true
} }
} }
}; };
...@@ -60,4 +70,23 @@ ...@@ -60,4 +70,23 @@
.body { .body {
background-color: whitesmoke; background-color: whitesmoke;
} }
.box-wrap {
position: absolute;
bottom: 20%;
right: 6%;
z-index: 999;
display: flex;
flex-direction: column;
align-items: center;
image {
width: 100rpx;
height: 100rpx;
}
text {
color: #2c2c2c;
}
}
</style> </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