tijiao
This commit is contained in:
@@ -247,10 +247,10 @@
|
||||
<template slot="rightSlot" slot-scope="slotProps">
|
||||
<text
|
||||
class="fdButtonBox aui-text-success"
|
||||
style="line-height: 40rpx"
|
||||
>{{ slotProps.row.content }}</text
|
||||
v-if="slotProps.row.contentType&&slotProps.row.contentType == 'hufen'&&hufenNumber>0"
|
||||
style="line-height: 40rpx; font-size: 40rpx;color: #3AB3AE;float: right;"
|
||||
>{{ hufenNumber }}<text style="font-size: 30rpx;margin-left: 4rpx;">湖分</text></text
|
||||
>
|
||||
|
||||
<view> </view>
|
||||
</template>
|
||||
</common-list>
|
||||
@@ -316,7 +316,7 @@ import $http from "@/config/requestConfig.js";
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
return {hufenNumber: 0,
|
||||
userCouponNum: 0,
|
||||
come: "1",
|
||||
orderList: [
|
||||
@@ -384,7 +384,11 @@ export default {
|
||||
url: "/pages/bookShop/orderList?type=mine",
|
||||
|
||||
type: "switchTab",
|
||||
},
|
||||
},{
|
||||
name: "我的湖分",
|
||||
url: "/pages/hufen/hufen",
|
||||
type: "pageJump", contentType: "hufen",
|
||||
},
|
||||
{
|
||||
name: "个人资料",
|
||||
url: "/pages/mine/userInfo/persData",
|
||||
@@ -430,6 +434,7 @@ export default {
|
||||
onShow() {
|
||||
this.getBookList();
|
||||
this.getData();
|
||||
this.gethufenData();
|
||||
//获取vip身份
|
||||
this.textList = [];
|
||||
this.getUserVipType();
|
||||
@@ -443,7 +448,20 @@ export default {
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
...mapMutations(["setUserInfo"]),
|
||||
...mapMutations(["setUserInfo"]), async gethufenData() {
|
||||
await this.$http
|
||||
.post("common/userContribution/getUserContribution")
|
||||
.then((res) => {
|
||||
console.log("res at line 296:", res);
|
||||
if (res.code == 0) {
|
||||
this.hufenNumber = res.total;
|
||||
} else {
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e, "报错");
|
||||
});
|
||||
},
|
||||
async getUserCouponList() {
|
||||
await this.$http
|
||||
.request({
|
||||
@@ -1432,7 +1450,7 @@ uni-page-body {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 10rpx;
|
||||
background: linear-gradient(90deg, #258feb 0%, #00e1ec 100%);
|
||||
background: linear-gradient(90deg, #3AB3AE 0%, #00e1ec 100%);
|
||||
border-radius: 20rpx;
|
||||
font-size: 18rpx;
|
||||
line-height: 40rpx;
|
||||
|
||||
@@ -736,7 +736,7 @@ export default {
|
||||
//console.log('中等密码-----',value)
|
||||
this.passNote =
|
||||
"请至少使用大小写字母、数字、符号两种类型组合的密码,长度为8位。";
|
||||
this.passStr = "<span style='color:#2979ff'>密码强度中等!</span>";
|
||||
this.passStr = "<span style='color:#117e4c'>密码强度中等!</span>";
|
||||
this.passwordOk = true;
|
||||
} else if (enoughRegex.test(value)) {
|
||||
//console.log('弱密码-----',value)
|
||||
|
||||
351
pages/mine/vip/index copy.vue
Normal file
351
pages/mine/vip/index copy.vue
Normal file
@@ -0,0 +1,351 @@
|
||||
<template>
|
||||
|
||||
<view class="commonPageBox">
|
||||
<z-nav-bar title="VIP"></z-nav-bar>
|
||||
<view class="vip_block">
|
||||
<view
|
||||
class="vip_item"
|
||||
:class="[
|
||||
item.type == 1 || item.type == 2 ? 'vip_item_special' : '',
|
||||
item.state == 1 ? 'vip_item_overdue' : '',
|
||||
(item.type == 1 && item.state == 0) ||
|
||||
(item.type == 2 && item.state == 0)
|
||||
? 'vip_item_bg_1'
|
||||
: '',
|
||||
item.type != 1 && item.type != 2 && item.state == 0
|
||||
? 'vip_item_bg_2'
|
||||
: '',
|
||||
]"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
>
|
||||
<view>
|
||||
<text class="vip_item_title">{{ item.title }}</text>
|
||||
<text class="vip_item_tip" v-if="item.tip && item.tip < 100"
|
||||
><uni-icons type="info" size="17" color="#ff1f00"></uni-icons>还有{{item.tip}}天到期</text
|
||||
>
|
||||
<text class="vip_item_flag" v-if="item.state == 1">
|
||||
<uni-icons type="info" size="17" color="#999"></uni-icons>已过期
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="vip_price" style="padding-top: 10rpx">
|
||||
<text class="font_bold">课程价格:</text>
|
||||
<view class="vip_qx_v">一年<text class="vip_fee line">{{ item.originalPrice || 0 }}</text>元</view>
|
||||
</view>
|
||||
<view v-if="$platform!='ios'">
|
||||
<text
|
||||
class="vip_item_btn"
|
||||
v-if="item.state == null"
|
||||
@click="openorderModal(item, 0)"
|
||||
>去办理</text
|
||||
>
|
||||
<text class="vip_item_btn" v-else @click="openorderModal(item, 0)"
|
||||
>去续费</text
|
||||
>
|
||||
</view>
|
||||
|
||||
<view class="vip_price" v-if="item.vcbList && item.vcbList.length > 0">
|
||||
<text class="font_bold" v-if="item.type == 1 || item.type == 2"
|
||||
>超级VIP价格:</text
|
||||
>
|
||||
<text class="font_bold" v-else>VIP价格:</text>
|
||||
<text
|
||||
class="vip_price_v"
|
||||
v-for="(item_price, index_price) in item.vcbList"
|
||||
:key="index_price"
|
||||
@click="openorderModal(item_price)"
|
||||
>
|
||||
{{ item_price.year }}年<text>{{ item_price.rebateFee }}</text
|
||||
>元
|
||||
</text>
|
||||
</view>
|
||||
<view
|
||||
class="vip_price"
|
||||
v-if="item.yanqiList && item.yanqiList.length > 0"
|
||||
>
|
||||
<text class="font_bold">延期价格:</text>
|
||||
<text
|
||||
class="vip_price_v"
|
||||
v-for="(item_yq, index_yq) in item.yanqiList"
|
||||
:key="index_yq"
|
||||
@click="openorderModal(item_yq, 1)"
|
||||
>
|
||||
{{ item_yq.year }}年<text>{{ item_yq.rebateFee }}</text
|
||||
>元
|
||||
</text>
|
||||
</view>
|
||||
<view class="vip_qx">
|
||||
<text class="font_bold" style="display: block">VIP权限:</text>
|
||||
<view class="vip_qx_v" v-if="item.type == 1"
|
||||
>无限制观看吴门医述APP中医学、中西汇通学、针灸学、肿瘤学四个板块任意课程;</view
|
||||
>
|
||||
<view class="vip_qx_v" v-else-if="item.type == 2"
|
||||
>无限制观看众妙之门APP与吴门医述APP心理学板块任意课程;</view
|
||||
>
|
||||
<view class="vip_qx_v" v-else-if="item.type == 7"
|
||||
>无限制观看众妙之门APP任意课程;</view
|
||||
>
|
||||
<view class="vip_qx_v" v-else
|
||||
>无限制观看吴门医述APP{{
|
||||
item.title.replace(/VIP/g, "")
|
||||
}}板块任意课程;</view
|
||||
>
|
||||
|
||||
<view class="vip_qx_v">
|
||||
<text v-if="item.type == 1 || item.type == 2">{{
|
||||
item.title.replace(/超级VIP/g, "")
|
||||
}}</text>
|
||||
<text v-else>{{ item.title.replace(/VIP/g, "") }}</text>
|
||||
培训班报名享受<text
|
||||
class="vip_fee"
|
||||
v-if="item.type == 1 || item.type == 2"
|
||||
>8折</text
|
||||
><text class="vip_fee" v-else>9折</text>优惠
|
||||
</view>
|
||||
<view class="vip_qx_v"
|
||||
>疯子读书APP购书享受<text
|
||||
class="vip_fee"
|
||||
v-if="item.type == 1 || item.type == 2"
|
||||
>8折</text
|
||||
><text class="vip_fee" v-else>9折</text>优惠</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-popup :show="orderModalShow" mode="bottom" :round="20">
|
||||
<view class="orderModalShow popup_box">
|
||||
<u-icon
|
||||
name="close"
|
||||
color="#333"
|
||||
size="18"
|
||||
@click="closeOrderModalShow"
|
||||
style="
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 20rpx;
|
||||
"
|
||||
></u-icon>
|
||||
<orderPay ref="orderPay" :dataInfo="selectVipData"></orderPay>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import orderPay from "./order.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
type: 0,
|
||||
text: "", //针对不同type展示文案
|
||||
list: [],
|
||||
orderModalShow: false,
|
||||
selectVipData: {},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
orderPay,
|
||||
},
|
||||
onLoad() {
|
||||
this.getData();
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
//获取数据
|
||||
getData() {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
$http
|
||||
.request({
|
||||
url: "common/userVip/getVipBuyConfigList",
|
||||
method: "POST",
|
||||
data: {},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 0) {
|
||||
this.list = res.res;
|
||||
}
|
||||
})
|
||||
.catch((e) => {});
|
||||
},
|
||||
//点击购买
|
||||
openorderModal(item, type) {
|
||||
if(this.$platform=='ios'){
|
||||
return false
|
||||
}
|
||||
let text = "";
|
||||
//如果是右侧按钮点击展示
|
||||
//判断点击类型是vip价格还是延期价格
|
||||
if (type == 0) {
|
||||
if (item.state == null) {
|
||||
//没有vip
|
||||
this.selectVipData.list = item.vcbList;
|
||||
this.selectVipData.id = item.vcbList[0].id;
|
||||
} else {
|
||||
this.selectVipData.list = item.yanqiList;
|
||||
this.selectVipData.id = item.yanqiList[0].id;
|
||||
}
|
||||
} else {
|
||||
this.selectVipData.id = item.id;
|
||||
}
|
||||
|
||||
if (type) {
|
||||
this.selectVipData.type = type;
|
||||
}
|
||||
|
||||
this.selectVipData.title = item.title + "-" + item.year + "年";
|
||||
this.selectVipData.lastFee = item.rebateFee;
|
||||
|
||||
this.orderModalShow = true;
|
||||
console.log("-----selectVipData-----", this.selectVipData);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.orderPay.initPrepareOrder();
|
||||
});
|
||||
},
|
||||
//关闭
|
||||
closeOrderModalShow() {
|
||||
this.orderModalShow = false;
|
||||
this.selectVipData = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.commonPageBox {
|
||||
height: 100% !important;
|
||||
}
|
||||
.vip_block {
|
||||
padding: 20rpx;
|
||||
}
|
||||
.vip_item {
|
||||
width: 100%;
|
||||
padding: 30rpx 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 0px 5px 0px #a7bbe4;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
.vip_item_title {
|
||||
display: inline-block;
|
||||
height: 46rpx;
|
||||
line-height: 46rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
padding: 0 12rpx;
|
||||
border-radius: 15rpx;
|
||||
background-image: linear-gradient(90deg, #3AB3AE 0%, #00e1ec 100%);
|
||||
}
|
||||
.vip_item_special .vip_item_title {
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
font-size: 26rpx;
|
||||
background-image: linear-gradient(90deg, #ff1f00 0%, #fa9f93 100%);
|
||||
}
|
||||
.vip_price {
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
.vip_price text,
|
||||
.vip_qx text,
|
||||
.vip_qx_v {
|
||||
display: inline-block;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.vip_item_used {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
bottom: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #427ec5;
|
||||
font-weight: bold;
|
||||
}
|
||||
.vip_item_btn {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 30rpx;
|
||||
font-size: 23rpx;
|
||||
line-height: 40rpx;
|
||||
border: 1rpx solid #ff1f00;
|
||||
color: #ff1f00;
|
||||
padding: 0 12rpx;
|
||||
border-radius: 15rpx;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.font_bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.vip_fee {
|
||||
font-size: 34rpx !important;
|
||||
color: #ff1f00;
|
||||
font-weight: bold;
|
||||
padding: 0 5rpx;
|
||||
}
|
||||
.vip_price_v {
|
||||
font-size: 26rpx !important;
|
||||
color: #ff1f00;
|
||||
border: 1rpx solid #ff1f00;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 15rpx;
|
||||
margin-bottom: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.vip_price_yq {
|
||||
font-size: 26rpx !important;
|
||||
color: #427ec5;
|
||||
border: 1rpx solid #427ec5;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 15rpx;
|
||||
margin-bottom: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.line {
|
||||
text-decoration: line-through;
|
||||
color: #3AB3AE ;
|
||||
font-style: italic;
|
||||
}
|
||||
.vip_item_flag {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.vip_item_flag text {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.vip_item_overdue {
|
||||
background: rgba(220, 223, 225, 0.9) !important;
|
||||
opacity: 0.75;
|
||||
}
|
||||
.vip_item_overdue .vip_item_title {
|
||||
background-image: none;
|
||||
font-size: 32rpx;
|
||||
color: #000;
|
||||
padding: 0;
|
||||
}
|
||||
.vip_item_bg_1 {
|
||||
background: rgba(227, 120, 125, 0.3) !important;
|
||||
}
|
||||
.vip_item_bg_2 {
|
||||
background: rgba(64, 148, 222, 0.3) !important;
|
||||
}
|
||||
.vip_item_tip {
|
||||
color: #ff1f00;
|
||||
font-size: 26rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.vip_item_tip text {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
|
||||
<view class="commonPageBox">
|
||||
<z-nav-bar title="VIP"></z-nav-bar>
|
||||
<z-nav-bar title="VIP" bgColor="#3AB3AE" fontColor="#fff"></z-nav-bar>
|
||||
<view class="vip_block">
|
||||
<view
|
||||
class="vip_item"
|
||||
@@ -22,7 +21,9 @@
|
||||
<view>
|
||||
<text class="vip_item_title">{{ item.title }}</text>
|
||||
<text class="vip_item_tip" v-if="item.tip && item.tip < 100"
|
||||
><uni-icons type="info" size="17" color="#ff1f00"></uni-icons>还有{{item.tip}}天到期</text
|
||||
><uni-icons type="info" size="17" color="#ff1f00"></uni-icons>还有{{
|
||||
item.tip
|
||||
}}天到期</text
|
||||
>
|
||||
<text class="vip_item_flag" v-if="item.state == 1">
|
||||
<uni-icons type="info" size="17" color="#999"></uni-icons>已过期
|
||||
@@ -31,19 +32,22 @@
|
||||
|
||||
<view class="vip_price" style="padding-top: 10rpx">
|
||||
<text class="font_bold">课程价格:</text>
|
||||
<view class="vip_qx_v">一年<text class="vip_fee line">{{ item.originalPrice || 0 }}</text>元</view>
|
||||
<view class="vip_qx_v"
|
||||
>一年<text class="vip_fee line">{{ item.originalPrice || 0 }}</text
|
||||
>元</view
|
||||
>
|
||||
</view>
|
||||
<view v-if="$platform != 'ios'">
|
||||
<text
|
||||
class="vip_item_btn"
|
||||
v-if="item.state == null"
|
||||
@click="openorderModal(item)"
|
||||
>去办理</text
|
||||
>
|
||||
<text class="vip_item_btn" v-else @click="openorderModal(item)"
|
||||
>去续费</text
|
||||
>
|
||||
</view>
|
||||
<view v-if="$platform!='ios'">
|
||||
<text
|
||||
class="vip_item_btn"
|
||||
v-if="item.state == null"
|
||||
@click="openorderModal(item, 0)"
|
||||
>去办理</text
|
||||
>
|
||||
<text class="vip_item_btn" v-else @click="openorderModal(item, 0)"
|
||||
>去续费</text
|
||||
>
|
||||
</view>
|
||||
|
||||
<view class="vip_price" v-if="item.vcbList && item.vcbList.length > 0">
|
||||
<text class="font_bold" v-if="item.type == 1 || item.type == 2"
|
||||
@@ -54,7 +58,7 @@
|
||||
class="vip_price_v"
|
||||
v-for="(item_price, index_price) in item.vcbList"
|
||||
:key="index_price"
|
||||
@click="openorderModal(item_price)"
|
||||
@click="openorderModal(item, index_price)"
|
||||
>
|
||||
{{ item_price.year }}年<text>{{ item_price.rebateFee }}</text
|
||||
>元
|
||||
@@ -69,14 +73,20 @@
|
||||
class="vip_price_v"
|
||||
v-for="(item_yq, index_yq) in item.yanqiList"
|
||||
:key="index_yq"
|
||||
@click="openorderModal(item_yq, 1)"
|
||||
@click="openorderModal({ state: item.state, ...item }, index_yq)"
|
||||
>
|
||||
{{ item_yq.year }}年<text>{{ item_yq.rebateFee }}</text
|
||||
>元
|
||||
</text>
|
||||
</view>
|
||||
<view class="vip_qx">
|
||||
<text class="font_bold" style="display: block">VIP权限:</text>
|
||||
<text
|
||||
class="font_bold"
|
||||
style="display: block"
|
||||
v-if="item.type == 1 || item.type == 2"
|
||||
>超级VIP权限:</text
|
||||
>
|
||||
<text class="font_bold" style="display: block" v-else>VIP权限:</text>
|
||||
<view class="vip_qx_v" v-if="item.type == 1"
|
||||
>无限制观看吴门医述APP中医学、中西汇通学、针灸学、肿瘤学四个板块任意课程;</view
|
||||
>
|
||||
@@ -101,33 +111,39 @@
|
||||
class="vip_fee"
|
||||
v-if="item.type == 1 || item.type == 2"
|
||||
>8折</text
|
||||
><text class="vip_fee" v-else>9折</text>优惠
|
||||
><text class="vip_fee" v-else>9折</text>优惠;
|
||||
</view>
|
||||
<view class="vip_qx_v"
|
||||
>疯子读书APP购书享受<text
|
||||
class="vip_fee"
|
||||
v-if="item.type == 1 || item.type == 2"
|
||||
>8折</text
|
||||
><text class="vip_fee" v-else>9折</text>优惠</view
|
||||
><text class="vip_fee" v-else>9折</text>优惠。</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<common-select-vip
|
||||
type="vip"
|
||||
:isCondition="true"
|
||||
ref="commonSelectGoods"
|
||||
:selectGoodsData="selectGoodsData"
|
||||
:goodsList="goodsList"
|
||||
:buyOptions="buyOptions"
|
||||
:customButtonGroup1="customButtonGroup1"
|
||||
@selectGoods="handleClickSelectGoods"
|
||||
@onHandleClickBuy="goBuy()"
|
||||
>
|
||||
</common-select-vip>
|
||||
<u-popup :show="orderModalShow" mode="bottom" :round="20">
|
||||
<view class="orderModalShow popup_box">
|
||||
<u-icon
|
||||
name="close"
|
||||
color="#333"
|
||||
size="18"
|
||||
@click="closeOrderModalShow"
|
||||
style="
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 20rpx;
|
||||
"
|
||||
></u-icon>
|
||||
<!-- <u-icon name="close" color="#333" size="18" @click="closeOrderModalShow" style="
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 20rpx;
|
||||
"></u-icon> -->
|
||||
<orderPay ref="orderPay" :dataInfo="selectVipData"></orderPay>
|
||||
</view>
|
||||
</u-popup>
|
||||
@@ -143,6 +159,17 @@ export default {
|
||||
type: 0,
|
||||
text: "", //针对不同type展示文案
|
||||
list: [],
|
||||
buyOptions: [],
|
||||
customButtonGroup1: [
|
||||
{
|
||||
with: 200,
|
||||
text: "立即购买",
|
||||
backgroundColor: "linear-gradient(90deg, #3AB3AE 0%,#3AB3AE 100%)",
|
||||
color: "#fff",
|
||||
},
|
||||
],
|
||||
goodsList: [],
|
||||
selectGoodsData: {},
|
||||
orderModalShow: false,
|
||||
selectVipData: {},
|
||||
};
|
||||
@@ -155,6 +182,27 @@ export default {
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
handleClickSelectGoods(data) {
|
||||
this.selectGoodsData = data;
|
||||
console.log('this.selectGoodsData at line 186:', this.selectGoodsData)
|
||||
this.$forceUpdate();
|
||||
},
|
||||
goBuy() {
|
||||
// this.$refs.commonSelectGoods.close();
|
||||
var mynavData = JSON.stringify({
|
||||
|
||||
goods:[this.selectGoodsData],
|
||||
typeId: 0,
|
||||
navTitle: "",
|
||||
title: "",
|
||||
isVip: true,
|
||||
|
||||
}); // 这里转换成 字符串
|
||||
console.log('mynavData at line 192:', mynavData)
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/order/index?data=${mynavData}`,
|
||||
});
|
||||
},
|
||||
//获取数据
|
||||
getData() {
|
||||
uni.showLoading({
|
||||
@@ -179,37 +227,40 @@ export default {
|
||||
},
|
||||
//点击购买
|
||||
openorderModal(item, type) {
|
||||
if(this.$platform=='ios'){
|
||||
return false
|
||||
}
|
||||
console.log("item at line 120:", item);
|
||||
if (this.$platform == "ios") {
|
||||
return false;
|
||||
}
|
||||
let text = "";
|
||||
//如果是右侧按钮点击展示
|
||||
//判断点击类型是vip价格还是延期价格
|
||||
if (type == 0) {
|
||||
if (item.state == null) {
|
||||
//没有vip
|
||||
this.selectVipData.list = item.vcbList;
|
||||
this.selectVipData.id = item.vcbList[0].id;
|
||||
} else {
|
||||
this.selectVipData.list = item.yanqiList;
|
||||
this.selectVipData.id = item.yanqiList[0].id;
|
||||
}
|
||||
} else {
|
||||
this.selectVipData.id = item.id;
|
||||
}
|
||||
|
||||
if (type) {
|
||||
this.selectVipData.type = type;
|
||||
if (item.state == null) {
|
||||
//没有vip
|
||||
this.selectVipData.list = item.vcbList;
|
||||
// this.selectVipData.id = item.vcbList[0].id;
|
||||
} else {
|
||||
this.selectVipData.list = item.yanqiList;
|
||||
// this.selectVipData.id = item.yanqiList[0].id;
|
||||
}
|
||||
|
||||
this.selectVipData.title = item.title + "-" + item.year + "年";
|
||||
this.selectVipData.lastFee = item.rebateFee;
|
||||
this.selectVipData.state = item.state;
|
||||
|
||||
this.orderModalShow = true;
|
||||
console.log("-----selectVipData-----", this.selectVipData);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.orderPay.initPrepareOrder();
|
||||
this.goodsList = this.selectVipData.list.map((e) => {
|
||||
return { ...e };
|
||||
});
|
||||
this.selectGoodsData = this.selectVipData.list[type ? type : 0];
|
||||
this.$refs.commonSelectGoods.open();
|
||||
this.show = true;
|
||||
|
||||
// this.orderModalShow = true;
|
||||
// console.log("-----selectVipData-----", this.selectVipData);
|
||||
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.orderPay.initPrepareOrder();
|
||||
// });
|
||||
},
|
||||
//关闭
|
||||
closeOrderModalShow() {
|
||||
@@ -245,7 +296,7 @@ export default {
|
||||
color: #fff;
|
||||
padding: 0 12rpx;
|
||||
border-radius: 15rpx;
|
||||
background-image: linear-gradient(90deg, #258feb 0%, #00e1ec 100%);
|
||||
background-image: linear-gradient(90deg, #3AB3AE 0%, #00e1ec 100%);
|
||||
}
|
||||
.vip_item_special .vip_item_title {
|
||||
height: 50rpx;
|
||||
@@ -312,7 +363,7 @@ export default {
|
||||
}
|
||||
.line {
|
||||
text-decoration: line-through;
|
||||
color: #258feb;
|
||||
color: #3AB3AE;
|
||||
font-style: italic;
|
||||
}
|
||||
.vip_item_flag {
|
||||
|
||||
@@ -285,8 +285,8 @@ export default {
|
||||
detailInfo: {},
|
||||
fdButtonStyle: {
|
||||
width: "90rpx",
|
||||
"border-color": "#258feb",
|
||||
color: "#258feb",
|
||||
"border-color": "#3AB3AE ",
|
||||
color: "#3AB3AE ",
|
||||
float: "right",
|
||||
"margin-right": "20rpx",
|
||||
"margin-left": "30rpx",
|
||||
@@ -511,6 +511,14 @@ export default {
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
paymentMethod: this.payType, //1微信2支付宝3苹果支付4虚拟币
|
||||
orderMoney: this.dataInfo.lastFee, //订单金额
|
||||
realMoney: Number(this.dataInfo.lastFee - this.jfNumber), //实际金额
|
||||
shippingMoney: 0, //运费
|
||||
jfDeduction: this.jfNumber, //积分抵扣
|
||||
vipBuyConfigId: this.dataInfo.id,
|
||||
come: 2, //订单来源,0疯子读书1国学众妙之门2医学吴门医
|
||||
|
||||
paymentMethod: this.payType, //1微信2支付宝3苹果支付4虚拟币
|
||||
orderMoney: this.dataInfo.lastFee, //订单金额
|
||||
realMoney: this.dataInfo.lastFee, //实际金额
|
||||
@@ -536,55 +544,30 @@ export default {
|
||||
icon: "none",
|
||||
image: "../../../static/icon/ic_close.png",
|
||||
});
|
||||
} else {
|
||||
if (that.payType == 2) {
|
||||
// 常规支付
|
||||
uni.showToast({
|
||||
title: "正在支付",
|
||||
icon: "loading",
|
||||
});
|
||||
await setPay(
|
||||
{
|
||||
typePay: "alipay",
|
||||
subject: "vip",
|
||||
totalAmount: res.money,
|
||||
type: 2,
|
||||
relevanceoid: res.orderSn,
|
||||
customerId: that.userInfo.id,
|
||||
},
|
||||
(res) => {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
console.log(res, "支付支付");
|
||||
if (res.success) {
|
||||
uni.showToast({
|
||||
title: "支付成功",
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: "/pages/bookShop/orderList?type=order",
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
console.log("延迟调用 失败提示");
|
||||
uni.showToast({
|
||||
title: "支付失败",
|
||||
image: "../../../static/icon/ic_close.png",
|
||||
});
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
);
|
||||
} else if (this.payType == 1) {
|
||||
// 微信支付
|
||||
let data1 = {
|
||||
orderSn: res.orderSn,
|
||||
buyOrderId: null,
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (that.payType == 2) {
|
||||
// 常规支付
|
||||
uni.showToast({
|
||||
title: "正在支付",
|
||||
icon: "loading",
|
||||
});
|
||||
await setPay(
|
||||
{
|
||||
typePay: "alipay",
|
||||
subject: "vip",
|
||||
totalAmount: res.money,
|
||||
};
|
||||
setWXPay(data1, (res) => {
|
||||
type: 2,
|
||||
relevanceoid: res.orderSn,
|
||||
customerId: that.userInfo.id,
|
||||
},
|
||||
(res) => {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
console.log(res, "支付支付");
|
||||
if (res.success) {
|
||||
uni.showToast({
|
||||
title: "支付成功",
|
||||
@@ -595,33 +578,61 @@ export default {
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
if (res.data.errMsg.indexOf("User canceled") != -1) {
|
||||
uni.showToast({
|
||||
title: "用户取消支付",
|
||||
icon: "none",
|
||||
image: "../../../static/icon/ic_close.png",
|
||||
});
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
console.log("延迟调用 失败提示");
|
||||
uni.showToast({
|
||||
title: "支付失败",
|
||||
icon: "none",
|
||||
image: "../../../static/icon/ic_close.png",
|
||||
});
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
});
|
||||
} else if (this.payType == 4) {
|
||||
// 天医币支付
|
||||
uni.showToast({
|
||||
title: "购买成功",
|
||||
icon: "success",
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: "/pages/bookShop/orderList?type=order",
|
||||
}
|
||||
);
|
||||
} else if (this.payType == 1) {
|
||||
// 微信支付
|
||||
let data1 = {
|
||||
orderSn: res.orderSn,
|
||||
buyOrderId: null,
|
||||
totalAmount: res.money,
|
||||
};
|
||||
setWXPay(data1, (res) => {
|
||||
if (res.success) {
|
||||
uni.showToast({
|
||||
title: "支付成功",
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: "/pages/bookShop/orderList?type=order",
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
if (res.data.errMsg.indexOf("User canceled") != -1) {
|
||||
uni.showToast({
|
||||
title: "用户取消支付",
|
||||
icon: "none",
|
||||
image: "../../../static/icon/ic_close.png",
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "支付失败",
|
||||
icon: "none",
|
||||
image: "../../../static/icon/ic_close.png",
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (this.payType == 4) {
|
||||
console.log('4 at line 624:', 4)
|
||||
// 天医币支付
|
||||
uni.showToast({
|
||||
title: "购买成功",
|
||||
icon: "success",
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: "/pages/bookShop/orderList?type=order",
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1171,7 +1182,7 @@ export default {
|
||||
border-color: #e6e6e6;
|
||||
border-left-color: transparent;
|
||||
border-style: solid;
|
||||
// background-color: #258feb;
|
||||
// background-color: #3AB3AE ;
|
||||
|
||||
border-top-right-radius: 10rpx;
|
||||
border-bottom-right-radius: 10rpx;
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
isNoIcon="true"
|
||||
label="orderType"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<view class="label_content AC_List">
|
||||
<template slot="labelSlot" slot-scope="slotProps" >
|
||||
<view class="label_content AC_List" @click="slotProps.row.relationId?goClick(slotProps.row.relationId):''">
|
||||
<view class="left">
|
||||
<view class="title">{{ slotProps.row.orderType }}</view>
|
||||
</view>
|
||||
@@ -247,7 +247,13 @@ export default {
|
||||
musicPlay,
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
methods: { goClick(id){
|
||||
uni.navigateTo({
|
||||
url: "/pages/bookShop/orderLCont?orderId=" +
|
||||
id
|
||||
|
||||
});
|
||||
},
|
||||
// 获取
|
||||
getData() {
|
||||
var data = {
|
||||
@@ -400,7 +406,7 @@ export default {
|
||||
overflow: hidden;
|
||||
|
||||
.left {
|
||||
width: calc(100% - 120rpx) !important;
|
||||
width: calc(100% - 200rpx) !important;
|
||||
font-weight: 700;
|
||||
float: left;
|
||||
color: #333;
|
||||
@@ -431,13 +437,14 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.AC_mark {
|
||||
.AC_mark {width: 100%;
|
||||
font-size: 28rpx;
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 15rpx;
|
||||
// white-space: nowrap;
|
||||
color: #343434;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.AC_time {
|
||||
|
||||
Reference in New Issue
Block a user