tijiao
This commit is contained in:
@@ -2,8 +2,8 @@ let baseUrl = "";
|
||||
let socketUrl = "";
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 开发环境
|
||||
//baseUrl = "https://api.nuttyreading.com/"; //线上正式
|
||||
baseUrl = "http://192.168.110.100:9200/pb/"; //张川川
|
||||
baseUrl = "https://api.nuttyreading.com/"; //线上正式
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; //张川川
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
// 生产环境11
|
||||
baseUrl = "https://api.nuttyreading.com/";
|
||||
|
||||
4
main.js
4
main.js
@@ -86,6 +86,8 @@ import config from 'uview-ui/libs/config/config'
|
||||
Vue.component("mescroll-body", MescrollBody);
|
||||
import commonList from '@/pages/component/commonComponents/list.vue'
|
||||
Vue.component('common-list', commonList);
|
||||
import commonOrderSubmit from '@/pages/component/commonComponents/orderSubmit.vue'
|
||||
Vue.component('common-order-submit', commonOrderSubmit);
|
||||
import commonVideo from '@/pages/component/commonComponents/video/index.vue'
|
||||
Vue.component('common-video', commonVideo);
|
||||
import commonCoupon from '@/pages/component/commonComponents/coupon/index.vue'
|
||||
@@ -108,6 +110,8 @@ import commonAddress from '@/pages/component/commonComponents/address/index.vue'
|
||||
Vue.component('common-address', commonAddress);
|
||||
import commonSelectGoods from '@/pages/component/commonComponents/selectGoods.vue'
|
||||
Vue.component('common-select-goods', commonSelectGoods);
|
||||
import commonSelectVip from '@/pages/component/commonComponents/selectVip.vue'
|
||||
Vue.component('common-select-vip', commonSelectVip);
|
||||
import commonAdvertisement from '@/pages/component/commonComponents/advertisement.vue'
|
||||
Vue.component('common-advertisement', commonAdvertisement);
|
||||
import commonVideoIos from '@/pages/component/commonComponents/video/ios.nvue'
|
||||
|
||||
2311
pages/component/commonComponents/orderSubmit.vue
Normal file
2311
pages/component/commonComponents/orderSubmit.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -176,6 +176,7 @@ export default {
|
||||
"customButtonGroup1",
|
||||
"buyOptions",
|
||||
"isFudu", // 是否复读
|
||||
"type", // 页面类型
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
|
||||
393
pages/component/commonComponents/selectVip.vue
Normal file
393
pages/component/commonComponents/selectVip.vue
Normal file
@@ -0,0 +1,393 @@
|
||||
<template>
|
||||
<view
|
||||
class="container commonPageBox commonDetailPage"
|
||||
style="height: auto !important; padding-bottom: 0 !important"
|
||||
>
|
||||
<u-popup
|
||||
:show="show"
|
||||
v-if="show"
|
||||
mode="bottom"
|
||||
@close="close"
|
||||
class="popup_box"
|
||||
>
|
||||
<view class="popup_top">
|
||||
<!-- @click="previewImage(selectGoodsData.productImages)" -->
|
||||
<view class="product_image">
|
||||
<image
|
||||
src="@/static/icon/vip.png"
|
||||
mode="aspectFit"
|
||||
class="goods_image"
|
||||
></image>
|
||||
</view>
|
||||
<view class="title">已选:{{ selectGoodsData.title }} {{ selectGoodsData.year }}年</view>
|
||||
</view>
|
||||
|
||||
<view :class="`common_radius_box goods_box popup_content`">
|
||||
<view class="title title_box"
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
<text style="color: #e97512; font-weight: bold;font-size: 30rpx;">
|
||||
¥{{ Number(selectGoodsData.rebateFee).toFixed(2) }}</text
|
||||
>
|
||||
</text>
|
||||
<u-icon
|
||||
name="close"
|
||||
color="#333"
|
||||
size="18"
|
||||
@click="close"
|
||||
style="display: inline-block"
|
||||
></u-icon
|
||||
></view>
|
||||
<view class="title title_list"
|
||||
><text>VIP商品列表({{ goodsList.length }})</text></view
|
||||
>
|
||||
|
||||
<common-list
|
||||
imgUrl="url"
|
||||
isNoIcon
|
||||
imgMode="aspectFit"
|
||||
defaultUrl=""
|
||||
:isCondition="true"
|
||||
:dataList="goodsList"
|
||||
@hancleClick="selectGoods"
|
||||
label="title"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
|
||||
<!-- isSelectGoods -->
|
||||
<view
|
||||
class="related_courses_name"
|
||||
:class="`goods_item ${
|
||||
(
|
||||
selectGoodsData &&
|
||||
selectGoodsData.id == slotProps.row.id)
|
||||
? 'isSelectGoods color_shandow'
|
||||
: ''
|
||||
}`"
|
||||
>
|
||||
<view class="image_box" style="margin-right: 10rpx">
|
||||
<image
|
||||
src="@/static/icon/vip.png"
|
||||
mode="aspectFit"
|
||||
class="goods_image"
|
||||
></image>
|
||||
</view>
|
||||
|
||||
<view :class="`goods_info just`" style="">
|
||||
<view class="name">{{ slotProps.row.title }}<text style="color: #ff2e4d;margin-left: 10rpx;">{{ slotProps.row.year }}年</text></view>
|
||||
<view class="flex_box" style="align-items: center">
|
||||
<!-- <text style="color: #999; text-decoration: line-through; margin-right: 20rpx;"
|
||||
v-if="slotProps.row.activityPrice > 0 && slotProps.row.activityPrice < slotProps.row.price" >¥{{slotProps.row.price}}</text>
|
||||
<view class="price" style="color: #258feb"
|
||||
>¥{{ slotProps.row.activityPrice?slotProps.row.activityPrice:slotProps.row.price }}</view
|
||||
></view
|
||||
> -->
|
||||
<text ><span style="color: #e97512;">
|
||||
¥{{Number(slotProps.row.rebateFee).toFixed(2)}}</span>
|
||||
</text>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
||||
</template>
|
||||
</common-list>
|
||||
|
||||
<view class="goods_nav_box">
|
||||
<uni-goods-nav
|
||||
:fill="true"
|
||||
:options="buyOptions"
|
||||
:button-group="customButtonGroup1"
|
||||
@click="onHandleClickBuy"
|
||||
@buttonClick="onHandleClickBuy"
|
||||
/>
|
||||
</view>
|
||||
<!-- <view>
|
||||
<text @click="handleClickClose">取消</text>
|
||||
<text @click="handleClickGoBuy">立即购买</text>
|
||||
</view>-->
|
||||
</view>
|
||||
</u-popup></view
|
||||
>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
props: [
|
||||
"goodsList",
|
||||
"label",
|
||||
"isCondition",
|
||||
"imgUrl",
|
||||
"imgMode",
|
||||
"className",
|
||||
"col",
|
||||
"defaultUrl",
|
||||
"isScroll",
|
||||
"selectGoodsData",
|
||||
"customButtonGroup1",
|
||||
"buyOptions",
|
||||
"isFudu", // 是否复读
|
||||
"type", // 页面类型
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
onHide() {
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
getPrice(slotProps) {
|
||||
if (
|
||||
Number(slotProps.row.isVipPrice) === 1 &&
|
||||
Number(slotProps.row.vipPrice) > 0
|
||||
) {
|
||||
return `
|
||||
<text style="color: #e97512; font-size: 12px; font-weight: bold;">
|
||||
¥${Number(slotProps.row.vipPrice).toFixed(2)}
|
||||
</text>
|
||||
<text
|
||||
style="color: #8a8a8a; font-size: 10px; margin-left: 4px; font-weight: bold; text-decoration: line-through;"
|
||||
>
|
||||
¥${Number(slotProps.row.price).toFixed(2)}
|
||||
</text>
|
||||
`;
|
||||
} else if (Number(slotProps.row.activityPrice) > 0) {
|
||||
return `
|
||||
<text style="color: #e97512; font-size: 12px; font-weight: bold;">
|
||||
¥${Number(slotProps.row.activityPrice).toFixed(2)}
|
||||
</text>
|
||||
<text
|
||||
style="color: #8a8a8a; font-size: 10px; margin-left: 4px; font-weight: bold; text-decoration: line-through;"
|
||||
>
|
||||
¥${Number(slotProps.row.price).toFixed(2)}
|
||||
</text>
|
||||
`;
|
||||
} else {
|
||||
return `<span style="color: #e97512;">
|
||||
¥${Number(slotProps.row.price).toFixed(2)}</span>
|
||||
`;
|
||||
}
|
||||
},
|
||||
// 放大图片
|
||||
previewImage(url) {
|
||||
console.log(url);
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
longPressActions: {
|
||||
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||
success: function (res) {
|
||||
// console.log(res,'+++++')
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
selectGoods(data) {
|
||||
this.$emit("selectGoods", data);
|
||||
},
|
||||
open() {
|
||||
this.show = true;
|
||||
},
|
||||
gotoDetail(v) {
|
||||
this.$emit("hancleClick", v);
|
||||
},
|
||||
onHandleClickBuy() {
|
||||
// this.$emit("selectGoodsData", this.selectGoodsData);
|
||||
setTimeout(() => {
|
||||
this.$emit("onHandleClickBuy");
|
||||
}, 200);
|
||||
|
||||
},
|
||||
},
|
||||
onBackPress() {
|
||||
// #ifdef APP-PLUS
|
||||
plus.key.hideSoftKeybord();
|
||||
// #endif
|
||||
},
|
||||
|
||||
components: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
.goods_item {
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 20rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
border: 2rpx solid #fff;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.title {
|
||||
box-sizing: border-box;
|
||||
// font-weight: bold;
|
||||
margin-bottom: 40rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.image_box {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
float: left;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.goods_image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.goods_info {
|
||||
width: calc(100%);
|
||||
// padding: 10rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
// height: 100rpx;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: space-between;
|
||||
float: left;
|
||||
.name {
|
||||
font-size: 26rpx;
|
||||
// font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
.price {
|
||||
font-size: 26rpx;
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
.isSelectGoods {
|
||||
color: $themeColor !important;
|
||||
.name {
|
||||
color: $themeColor !important;
|
||||
}
|
||||
.price {
|
||||
color: $themeColor !important;
|
||||
}
|
||||
border: 2rpx solid $themeColor;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
/deep/.list_item {
|
||||
// border-bottom: none;
|
||||
padding: 10rpx 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
.goods_image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.curriulum_box {
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
|
||||
.curriulum_title_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.curriulum_title {
|
||||
width: calc(100% - 80rpx);
|
||||
|
||||
font-size: 38rpx;
|
||||
line-height: 40rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods_box {
|
||||
background-color: #fff;
|
||||
// margin-top: 20rpx;
|
||||
// padding: 40rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
|
||||
.curriulum_title_box {
|
||||
width: calc(100%) !important;
|
||||
padding-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.curriulum_title {
|
||||
width: calc(100%);
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
// line-height: 40rpx;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
margin-top: 80rpx;
|
||||
margin-bottom: 0rpx;
|
||||
// padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
.popup_box {
|
||||
padding-top: 30rpx;
|
||||
|
||||
background-color: transparent;
|
||||
.popup_top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 0 20rpx;
|
||||
.title {
|
||||
margin-bottom: 0;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
.popup_content {
|
||||
padding-bottom: 140rpx;
|
||||
}
|
||||
/deep/.list_item {
|
||||
// border-bottom: none;
|
||||
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.product_image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 10rpx;
|
||||
// background-color: #f5f5f5;
|
||||
// margin: 0 auto;
|
||||
}
|
||||
}
|
||||
/deep/.u-popup__content {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
/deep/.u-popup__content__close {
|
||||
color: #fff !important;
|
||||
}
|
||||
.title_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-left: 0;
|
||||
.title_price {
|
||||
color: #ef1224;
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@
|
||||
color: #258feb !important;
|
||||
font-weight: bold;
|
||||
"
|
||||
>{{ slotProps.row.score }}</text
|
||||
>{{ slotProps.row.score }}<text style="font-size: 30rpx;margin-left: 4rpx;">湖分</text></text
|
||||
>
|
||||
</template>
|
||||
</common-list>
|
||||
|
||||
@@ -1,124 +1,198 @@
|
||||
<template>
|
||||
<view style=" position: relative;
|
||||
padding: 0 0;
|
||||
font-size: 28rpx;
|
||||
;
|
||||
" class="commonPageeeee commonPageBox">
|
||||
<view
|
||||
style="position: relative; padding: 0 0; font-size: 28rpx"
|
||||
class="commonPageeeee commonPageBox"
|
||||
>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<view class="setIcon" @click="goSetting">
|
||||
<u-icon class="" labelColor="#258feb" labelPos="bottom" label="设置" name="setting"
|
||||
:style="`top:${(10 + statusBarHeight) * 2}rpx`" color="#258feb" size="28"></u-icon>
|
||||
<u-icon
|
||||
class=""
|
||||
labelColor="#258feb"
|
||||
labelPos="bottom"
|
||||
label="设置"
|
||||
name="setting"
|
||||
:style="`top:${(10 + statusBarHeight) * 2}rpx`"
|
||||
color="#258feb"
|
||||
size="28"
|
||||
></u-icon>
|
||||
</view>
|
||||
|
||||
<view class="bg_top flex_box flex_between">
|
||||
<view class="per_mes">
|
||||
<view class="per_mes_user" :style="hasVipType2 ? 'width: 170rpx;' : ''">
|
||||
<view style="width: 120rpx; height: 120rpx; display: inline-block;">
|
||||
<image @click="goUserInfo" :src="userMes.avatar" v-if="userMes.avatar"
|
||||
class="per_mes_img color_shandow"></image>
|
||||
<image src="@/static/icon/home_icon_logo.png" v-else
|
||||
class="per_mes_img color_shandow"></image>
|
||||
<view style="width: 120rpx; height: 120rpx; display: inline-block">
|
||||
<image
|
||||
@click="goUserInfo"
|
||||
:src="userMes.avatar"
|
||||
v-if="userMes.avatar"
|
||||
class="per_mes_img color_shandow"
|
||||
></image>
|
||||
<image
|
||||
src="@/static/icon/home_icon_logo.png"
|
||||
v-else
|
||||
class="per_mes_img color_shandow"
|
||||
></image>
|
||||
</view>
|
||||
<view class="user_vip_box" v-if="hasVipType1 || hasVipType2">
|
||||
<view class="user_vip super" :style="hasVipType2?'width: 170rpx;':''">
|
||||
<view class="user_vip_item" v-if="hasVipType1"><text>医学</text><image src="@/static/icon/chao_svip.png"></image></view>
|
||||
<view class="user_vip_item" v-if="hasVipType2"><text>国学心理学</text><image src="@/static/icon/chao_svip.png"></image></view>
|
||||
<view
|
||||
class="user_vip super"
|
||||
:style="hasVipType2 ? 'width: 170rpx;' : ''"
|
||||
>
|
||||
<view class="user_vip_item" v-if="hasVipType1"
|
||||
><text>医学</text
|
||||
><image src="@/static/icon/chao_svip.png"></image
|
||||
></view>
|
||||
<view class="user_vip_item" v-if="hasVipType2"
|
||||
><text>国学心理学</text
|
||||
><image src="@/static/icon/chao_svip.png"></image
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="userInfoBox" style="margin-left: 20rpx;">
|
||||
<view class="userInfoBox" style="margin-left: 20rpx">
|
||||
<template>
|
||||
<view class="name">{{ userMes.nickname ? userMes.nickname : "未设置" }}</view>
|
||||
<view class="name">{{
|
||||
userMes.nickname ? userMes.nickname : "未设置"
|
||||
}}</view>
|
||||
</template>
|
||||
<template v-if="userMes.tel">
|
||||
<view class="phone">手机号:({{ userMes.tel }})</view>
|
||||
</template>
|
||||
<template v-if="textList.length > 0">
|
||||
<view class="vip_type">
|
||||
<view class="vip_type_item" :class="textList.length>4?'vip_type_item_len':''" v-for="(item,index) in textList" :key="index">
|
||||
<view
|
||||
class="vip_type_item"
|
||||
:class="textList.length > 4 ? 'vip_type_item_len' : ''"
|
||||
v-for="(item, index) in textList"
|
||||
:key="index"
|
||||
>
|
||||
{{ item }}<image src="@/static/icon/chao_vip.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="mine_box" :style="`top:${(45 + statusBarHeight) * 2}rpx`">
|
||||
<view style="
|
||||
padding: 20rpx; overflow: hidden;
|
||||
">
|
||||
<view style="padding: 20rpx; overflow: hidden">
|
||||
<view class="chong_zhi boxShadow box_fillet vip_box">
|
||||
<view class="noVip">
|
||||
<view style="display: flex; align-items: center;">
|
||||
<view style="display: flex; align-items: center">
|
||||
<view class="zhanghu PM_font" style="text-align: left">
|
||||
<image class="vip_image" style="width:80rpx;height:80rpx;margin-left: 10rpx;" src="@/static/vip.png" mode="aspectFit"></image>
|
||||
<text style="color: #fff; font-size: 60rpx;" v-if="vipList.length==0">VIP</text>
|
||||
<image
|
||||
class="vip_image"
|
||||
style="width: 80rpx; height: 80rpx; margin-left: 10rpx"
|
||||
src="@/static/vip.png"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<text
|
||||
style="color: #fff; font-size: 60rpx"
|
||||
v-if="vipList.length == 0"
|
||||
>VIP</text
|
||||
>
|
||||
</view>
|
||||
<view class="vip_infor" v-if="vipList && vipList.length > 0">
|
||||
<view class="vip_infor_item" v-for="(item, index) in vipList" :key="index" :class="{expired: isExpired(item.endTime)}">
|
||||
<view
|
||||
class="vip_infor_item"
|
||||
v-for="(item, index) in vipList"
|
||||
:key="index"
|
||||
:class="{ expired: isExpired(item.endTime) }"
|
||||
>
|
||||
<text>{{ item.text }}VIP</text>
|
||||
<text v-if="isExpired(item.endTime)">({{item.endTime.split(' ')[0]}} 已到期)</text>
|
||||
<text v-else>(有效期到 {{item.endTime.split(' ')[0]}})</text>
|
||||
<text v-if="isExpired(item.endTime)"
|
||||
>({{ item.endTime.split(" ")[0] }} 已到期)</text
|
||||
>
|
||||
<text v-else
|
||||
>(有效期到 {{ item.endTime.split(" ")[0] }})</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="vip_null" style=" padding-left: 30rpx;">办理VIP,畅享更多专属权益</view>
|
||||
<view v-else class="vip_null" style="padding-left: 30rpx"
|
||||
>办理VIP,畅享更多专属权益</view
|
||||
>
|
||||
</view>
|
||||
<view class="vip_btn" @click="onPageJump('/pages/mine/vip/index')"><button v-if="vipList.length==0">办理</button><button v-else>续费</button></view>
|
||||
<view class="vip_btn" @click="onPageJump('/pages/mine/vip/index')"
|
||||
><button v-if="vipList.length == 0">办理</button
|
||||
><button v-else>续费</button></view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<!-- end -->
|
||||
<view class="chong_zhi boxShadow box_fillet chongzhi_box">
|
||||
<view class="chong_list">
|
||||
<view class="left">
|
||||
<view class="chong_list_item" style="
|
||||
<view
|
||||
class="chong_list_item"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
" @click="onPageJump('/pages/mine/wallet/index/index')">
|
||||
"
|
||||
@click="onPageJump('/pages/mine/wallet/index/index')"
|
||||
>
|
||||
<view class="pay_item_img">
|
||||
天医币<u-icon @click.native.stop="openInfo()" name="question-circle"
|
||||
style="float: right; margin: 0 6rpx"></u-icon>
|
||||
天医币<u-icon
|
||||
@click.native.stop="openInfo()"
|
||||
name="question-circle"
|
||||
style="float: right; margin: 0 6rpx"
|
||||
></u-icon>
|
||||
</view>
|
||||
<view class="text" style="line-height: 40rpx; display: flex">{{userMes.peanutCoin ? userMes.peanutCoin : 0}}</view>
|
||||
<view class="text" style="line-height: 40rpx; display: flex">{{
|
||||
userMes.peanutCoin ? userMes.peanutCoin : 0
|
||||
}}</view>
|
||||
</view>
|
||||
|
||||
<view class="chong_list_item" style="
|
||||
<view
|
||||
class="chong_list_item"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
" @click="onPageJump('/pages/mine/wallet/jf/index')">
|
||||
<view class="pay_item_img">
|
||||
积分
|
||||
</view>
|
||||
"
|
||||
@click="onPageJump('/pages/mine/wallet/jf/index')"
|
||||
>
|
||||
<view class="pay_item_img"> 积分 </view>
|
||||
|
||||
<view class="text" style="line-height: 40rpx">{{userMes.jf ? userMes.jf : 0}}</view>
|
||||
<view class="text" style="line-height: 40rpx">{{
|
||||
userMes.jf ? userMes.jf : 0
|
||||
}}</view>
|
||||
</view>
|
||||
<view class="chong_list_item" style="
|
||||
<view
|
||||
class="chong_list_item"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
" @click="onPageJump('/pages/mine/wallet/couponList')">
|
||||
<view class="pay_item_img">
|
||||
优惠券
|
||||
</view>
|
||||
"
|
||||
@click="onPageJump('/pages/mine/wallet/couponList')"
|
||||
>
|
||||
<view class="pay_item_img"> 优惠券 </view>
|
||||
|
||||
<view class="text" style="line-height: 40rpx">{{userCouponNum}}</view>
|
||||
<view class="text" style="line-height: 40rpx">{{
|
||||
userCouponNum
|
||||
}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chong_list_item" style="
|
||||
<view
|
||||
class="chong_list_item"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 0;
|
||||
justify-content: center;
|
||||
">
|
||||
<view class="chong_btn" v-if="iosHide"
|
||||
@click="onPageJump('/pages/mine/wallet/recharge/index')">充 值</view>
|
||||
"
|
||||
>
|
||||
<view
|
||||
class="chong_btn"
|
||||
v-if="iosHide"
|
||||
@click="onPageJump('/pages/mine/wallet/recharge/index')"
|
||||
>充 值</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -126,18 +200,31 @@
|
||||
|
||||
<view class="list_box">
|
||||
<view class="xiugai boxShadow box_fillet">
|
||||
<common-list :dataList="pageList" @hancleClick="handleClickTab" label="name">
|
||||
<common-list
|
||||
:dataList="pageList"
|
||||
@hancleClick="handleClickTab"
|
||||
label="name"
|
||||
>
|
||||
<template slot="rightSlot" slot-scope="slotProps">
|
||||
<text class="fdButtonBox aui-text-success"
|
||||
style="line-height: 40rpx; font-size: 50rpx;">{{ slotProps.row.content }}</text>
|
||||
<text
|
||||
class="fdButtonBox aui-text-success"
|
||||
v-if="slotProps.row.contentType&&slotProps.row.contentType == 'hufen'&&hufenNumber>0"
|
||||
style="line-height: 40rpx; font-size: 40rpx;color: #258feb;float: right;"
|
||||
>{{ hufenNumber }}<text style="font-size: 30rpx;margin-left: 4rpx;">湖分</text></text
|
||||
>
|
||||
</template>
|
||||
</common-list>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-modal :show="signShow" :content="signContent" :showCancelButton="true" @cancel="signShow = false"
|
||||
@confirm="signOut">
|
||||
<u-modal
|
||||
:show="signShow"
|
||||
:content="signContent"
|
||||
:showCancelButton="true"
|
||||
@cancel="signShow = false"
|
||||
@confirm="signOut"
|
||||
>
|
||||
</u-modal>
|
||||
<!-- 分享弹窗 -->
|
||||
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
|
||||
@@ -156,12 +243,18 @@
|
||||
</view>
|
||||
|
||||
<view class="bottom">
|
||||
<view class="button_box" style="
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
">
|
||||
<u-button style="width: 200rpx; float: center" :plain="true" text="知道啦" color="#9b9b9b"
|
||||
size="small" @click="infoShow = false"></u-button>
|
||||
<view
|
||||
class="button_box"
|
||||
style="align-items: center; justify-content: center"
|
||||
>
|
||||
<u-button
|
||||
style="width: 200rpx; float: center"
|
||||
:plain="true"
|
||||
text="知道啦"
|
||||
color="#9b9b9b"
|
||||
size="small"
|
||||
@click="infoShow = false"
|
||||
></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -169,20 +262,17 @@
|
||||
</u-popup>
|
||||
<music-play :playData="playData"></music-play>
|
||||
<z-navigation></z-navigation>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import musicPlay from "@/components/music.vue";
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from "vuex";
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
hufenNumber: 0,
|
||||
roleObj: {},
|
||||
infoShow: false, // 显示电子书相关
|
||||
showEbook: false, // 显示电子书相关
|
||||
@@ -193,10 +283,11 @@
|
||||
userCouponNum: 0, // 优惠券数量
|
||||
directorShow: false, // 主任是否显示班级入口
|
||||
monitorShow: false, // 其他管理是否显示班级入口
|
||||
pageList: [{
|
||||
pageList: [
|
||||
{
|
||||
name: "我的订单",
|
||||
url: "/pages/bookShop/orderList?type=mine",
|
||||
type: "switchTab"
|
||||
type: "switchTab",
|
||||
},
|
||||
{
|
||||
name: "我的证书",
|
||||
@@ -212,6 +303,7 @@
|
||||
name: "我的湖分",
|
||||
url: "/pages/hufen/hufen",
|
||||
type: "pageJump",
|
||||
contentType: "hufen",
|
||||
},
|
||||
{
|
||||
name: "个人资料",
|
||||
@@ -231,14 +323,14 @@
|
||||
{
|
||||
name: "问题反馈/申诉",
|
||||
url: "/pages/user/workOrder",
|
||||
type: "workOrder"
|
||||
}
|
||||
type: "workOrder",
|
||||
},
|
||||
],
|
||||
//vip
|
||||
vipList: [],
|
||||
textList: [], //普通vip文字
|
||||
hasVipType1: false,
|
||||
hasVipType2: false
|
||||
hasVipType2: false,
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
@@ -252,8 +344,9 @@
|
||||
//页面显示
|
||||
async onShow() {
|
||||
this.getData();
|
||||
this.getUserRole()
|
||||
await this.getUserCouponList()
|
||||
this.gethufenData();
|
||||
this.getUserRole();
|
||||
await this.getUserCouponList();
|
||||
//获取vip身份
|
||||
this.textList = [];
|
||||
this.getUserVipType();
|
||||
@@ -264,6 +357,20 @@
|
||||
//方法
|
||||
methods: {
|
||||
...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
|
||||
@@ -271,12 +378,12 @@
|
||||
url: "common/coupon/getCouponHistoryList",
|
||||
method: "POST",
|
||||
data: {
|
||||
"page":1,
|
||||
"limit":10,
|
||||
"getType":"",//获取类型 0 后台赠送 1 主动获取
|
||||
"status":"0",//使用状态 0 未使用 1 已使用 2 已过期
|
||||
"userInfo":"",//用户信息
|
||||
"userId":this.userInfo.id
|
||||
page: 1,
|
||||
limit: 10,
|
||||
getType: "", //获取类型 0 后台赠送 1 主动获取
|
||||
status: "0", //使用状态 0 未使用 1 已使用 2 已过期
|
||||
userInfo: "", //用户信息
|
||||
userId: this.userInfo.id,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -284,11 +391,11 @@
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code != 0) return this.$commonJS.showToast(res.errMsg);
|
||||
this.userCouponNum = res.couponList.total
|
||||
|
||||
}).catch(e => {
|
||||
this.$commonJS.showToast(e.errMsg);
|
||||
this.userCouponNum = res.couponList.total;
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$commonJS.showToast(e.errMsg);
|
||||
});
|
||||
},
|
||||
openInfo() {
|
||||
this.infoShow = true;
|
||||
@@ -321,8 +428,8 @@
|
||||
break;
|
||||
case "workOrder":
|
||||
uni.navigateTo({
|
||||
url: `${v.url}?name=userPage`
|
||||
})
|
||||
url: `${v.url}?name=userPage`,
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -370,7 +477,7 @@
|
||||
},
|
||||
//判断过期的vip
|
||||
isExpired(dateString) {
|
||||
const dataTime = new Date(dateString.replace(' ', 'T'));
|
||||
const dataTime = new Date(dateString.replace(" ", "T"));
|
||||
//获取当前时间的Date对象
|
||||
const currentTime = new Date();
|
||||
//比较两个时间
|
||||
@@ -378,71 +485,71 @@
|
||||
},
|
||||
// 获取用户的角色信息
|
||||
getUserRole() {
|
||||
this.$http.post("common/class/getRoleType").then((res) => {
|
||||
this.roleObj = res.result
|
||||
var zhurenIndex = this.pageList.findIndex(item => {
|
||||
return item.name == '主任教学'
|
||||
})
|
||||
this.$http
|
||||
.post("common/class/getRoleType")
|
||||
.then((res) => {
|
||||
this.roleObj = res.result;
|
||||
var zhurenIndex = this.pageList.findIndex((item) => {
|
||||
return item.name == "主任教学";
|
||||
});
|
||||
if (zhurenIndex > -1) {
|
||||
this.pageList.splice(zhurenIndex, 1)
|
||||
this.pageList.splice(zhurenIndex, 1);
|
||||
}
|
||||
var banzhangIndex = this.pageList.findIndex(item => {
|
||||
return item.name == '班级管理'
|
||||
})
|
||||
var banzhangIndex = this.pageList.findIndex((item) => {
|
||||
return item.name == "班级管理";
|
||||
});
|
||||
if (banzhangIndex > -1) {
|
||||
this.pageList.splice(banzhangIndex, 1)
|
||||
this.pageList.splice(banzhangIndex, 1);
|
||||
}
|
||||
var yonghuIndex = this.pageList.findIndex(item => {
|
||||
return item.name == '我的班级'
|
||||
})
|
||||
var yonghuIndex = this.pageList.findIndex((item) => {
|
||||
return item.name == "我的班级";
|
||||
});
|
||||
if (yonghuIndex > -1) {
|
||||
this.pageList.splice(yonghuIndex, 1)
|
||||
this.pageList.splice(yonghuIndex, 1);
|
||||
}
|
||||
if (this.roleObj.isDirector) {
|
||||
var n = this.pageList.find(item => {
|
||||
return item.name == '主任教学'
|
||||
})
|
||||
var n = this.pageList.find((item) => {
|
||||
return item.name == "主任教学";
|
||||
});
|
||||
if (!n) {
|
||||
var item = {
|
||||
name: "主任教学",
|
||||
url: "/pages/miniClass/DirectorModalList?type=mine",
|
||||
type: "pageJump"
|
||||
}
|
||||
type: "pageJump",
|
||||
};
|
||||
this.pageList.splice(3, 0, item);
|
||||
}
|
||||
}
|
||||
// 是班长
|
||||
if (this.roleObj.isCommittee) {
|
||||
var n = this.pageList.find(item => {
|
||||
return item.name == '班级管理'
|
||||
})
|
||||
var n = this.pageList.find((item) => {
|
||||
return item.name == "班级管理";
|
||||
});
|
||||
if (!n) {
|
||||
var item = {
|
||||
name: "班级管理",
|
||||
url: "/pages/miniClass/MonitorClassList?type=mine",
|
||||
type: "pageJump"
|
||||
}
|
||||
type: "pageJump",
|
||||
};
|
||||
this.pageList.splice(3, 0, item);
|
||||
}
|
||||
}
|
||||
// 是学员
|
||||
if (this.roleObj.isStudent) {
|
||||
var n = this.pageList.find(item => {
|
||||
return item.name == '我的班级'
|
||||
})
|
||||
var n = this.pageList.find((item) => {
|
||||
return item.name == "我的班级";
|
||||
});
|
||||
if (!n) {
|
||||
var item = {
|
||||
name: "我的班级",
|
||||
url: "/pages/miniClass/myClassList?type=mine",
|
||||
type: "pageJump"
|
||||
}
|
||||
type: "pageJump",
|
||||
};
|
||||
this.pageList.splice(3, 0, item);
|
||||
}
|
||||
}
|
||||
|
||||
}).catch(e => {
|
||||
|
||||
})
|
||||
.catch((e) => {});
|
||||
},
|
||||
//获取个人信息
|
||||
getData() {
|
||||
@@ -507,7 +614,8 @@
|
||||
},
|
||||
//获取vip身份
|
||||
getUserVipType() {
|
||||
this.$http.request({
|
||||
this.$http
|
||||
.request({
|
||||
url: "common/userVip/getUserVipType",
|
||||
method: "POST",
|
||||
data: {},
|
||||
@@ -518,12 +626,14 @@
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.vipList = res.list;
|
||||
this.hasVipType1 = this.vipList.some(item => item.type === 1);
|
||||
this.hasVipType2 = this.vipList.some(item => item.type === 2);
|
||||
this.hasVipType1 = this.vipList.some((item) => item.type === 1);
|
||||
this.hasVipType2 = this.vipList.some((item) => item.type === 2);
|
||||
|
||||
//筛选出来已过期的
|
||||
let listAll = this.vipList;
|
||||
let list = this.vipList.filter(item => !this.isExpired(item.endTime));
|
||||
let list = this.vipList.filter(
|
||||
(item) => !this.isExpired(item.endTime)
|
||||
);
|
||||
|
||||
//全部的 vip模块展示
|
||||
if (listAll.length > 0) {
|
||||
@@ -532,14 +642,14 @@
|
||||
this.textList = [];
|
||||
}
|
||||
|
||||
console.log('-------listAll',listAll)
|
||||
console.log("-------listAll", listAll);
|
||||
//筛选过期以后的 昵称模块展示需要
|
||||
if (list.length > 0) {
|
||||
list = this.showDataList(list);
|
||||
} else {
|
||||
this.textList = [];
|
||||
}
|
||||
console.log('-------list',list)
|
||||
console.log("-------list", list);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -547,34 +657,34 @@
|
||||
showDataList(list) {
|
||||
this.textList = [];
|
||||
list.forEach((item, index) => {
|
||||
if(item.type=='4'){
|
||||
item.text = '中医学';
|
||||
if (item.type == "4") {
|
||||
item.text = "中医学";
|
||||
this.textList.push(item.text);
|
||||
}else if(item.type=='5'){
|
||||
item.text = '针灸学';
|
||||
} else if (item.type == "5") {
|
||||
item.text = "针灸学";
|
||||
this.textList.push(item.text);
|
||||
}else if(item.type=='6'){
|
||||
item.text = '肿瘤学';
|
||||
} else if (item.type == "6") {
|
||||
item.text = "肿瘤学";
|
||||
this.textList.push(item.text);
|
||||
}else if(item.type=='7'){
|
||||
item.text = '国学';
|
||||
} else if (item.type == "7") {
|
||||
item.text = "国学";
|
||||
this.textList.push(item.text);
|
||||
}else if(item.type=='8'){
|
||||
item.text = '心理学';
|
||||
} else if (item.type == "8") {
|
||||
item.text = "心理学";
|
||||
this.textList.push(item.text);
|
||||
}else if(item.type=='9'){
|
||||
item.text = '中西汇通学';
|
||||
} else if (item.type == "9") {
|
||||
item.text = "中西汇通学";
|
||||
this.textList.push(item.text);
|
||||
}else if(item.type=='1'){
|
||||
item.text = '医学S';
|
||||
}else if(item.type=='2'){
|
||||
item.text = '国学心理学S';
|
||||
} else if (item.type == "1") {
|
||||
item.text = "医学S";
|
||||
} else if (item.type == "2") {
|
||||
item.text = "国学心理学S";
|
||||
}
|
||||
});
|
||||
|
||||
return this.textList;
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@@ -663,7 +773,14 @@
|
||||
// background-image: url("@/static/icon/mine_bg.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%, #bfe3f0 80%, #fdf0ed 100%);
|
||||
background-image: linear-gradient(
|
||||
-60deg,
|
||||
#fdf0ed 0%,
|
||||
#bfe3f0 40%,
|
||||
#e4eefa 60%,
|
||||
#bfe3f0 80%,
|
||||
#fdf0ed 100%
|
||||
);
|
||||
// background-color: #d8f8e4 !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,69 +2,148 @@
|
||||
<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':'',
|
||||
<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">
|
||||
(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_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;">
|
||||
<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,0)">去办理</text>
|
||||
<text class="vip_item_btn" v-else @click="openorderModal(item,0)">去续费</text>
|
||||
<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 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-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
|
||||
class="vip_price_v"
|
||||
v-for="(item_price, index_price) in item.vcbList"
|
||||
:key="index_price"
|
||||
@click="openorderModal(item, index_price)"
|
||||
>
|
||||
{{ item_price.year }}年<text>{{ item_price.rebateFee }}</text
|
||||
>元
|
||||
</text>
|
||||
</view>
|
||||
<view class="vip_price" v-if="item.yanqiList&&item.yanqiList.length>0">
|
||||
<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({state:item.state,...item_yq},1)">
|
||||
{{item_yq.year}}年<text>{{item_yq.rebateFee}}</text>元
|
||||
<text
|
||||
class="vip_price_v"
|
||||
v-for="(item_yq, index_yq) in item.yanqiList"
|
||||
:key="index_yq"
|
||||
@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;" 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>
|
||||
<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>
|
||||
<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
|
||||
>
|
||||
<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>优惠;
|
||||
<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 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>
|
||||
|
||||
<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="
|
||||
<!-- <u-icon name="close" color="#333" size="18" @click="closeOrderModalShow" style="
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 20rpx;
|
||||
"></u-icon>
|
||||
"></u-icon> -->
|
||||
<orderPay ref="orderPay" :dataInfo="selectVipData"></orderPay>
|
||||
</view>
|
||||
</u-popup>
|
||||
@@ -78,85 +157,118 @@ export default{
|
||||
data() {
|
||||
return {
|
||||
type: 0,
|
||||
text: '', //针对不同type展示文案
|
||||
text: "", //针对不同type展示文案
|
||||
list: [],
|
||||
buyOptions: [],
|
||||
customButtonGroup1: [
|
||||
{
|
||||
with: 200,
|
||||
text: "立即购买",
|
||||
backgroundColor: "linear-gradient(90deg, #3C77BE 0%,#258feb 100%)",
|
||||
color: "#fff",
|
||||
},
|
||||
],
|
||||
goodsList: [],
|
||||
selectGoodsData: {},
|
||||
orderModalShow: false,
|
||||
selectVipData: {}
|
||||
}
|
||||
selectVipData: {},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
orderPay
|
||||
orderPay,
|
||||
},
|
||||
onLoad() {
|
||||
this.getData();
|
||||
},
|
||||
onShow(){
|
||||
|
||||
},
|
||||
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({
|
||||
title: '加载中'
|
||||
})
|
||||
$http.request({
|
||||
title: "加载中",
|
||||
});
|
||||
$http
|
||||
.request({
|
||||
url: "common/userVip/getVipBuyConfigList",
|
||||
method: "POST",
|
||||
data: {},
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 0) {
|
||||
this.list = res.res;
|
||||
}
|
||||
}).catch(e => {
|
||||
|
||||
});
|
||||
})
|
||||
.catch((e) => {});
|
||||
},
|
||||
//点击购买
|
||||
openorderModal(item, type) {
|
||||
console.log('item at line 120:', item)
|
||||
if(this.$platform=='ios'){
|
||||
return false
|
||||
console.log("item at line 120:", item);
|
||||
if (this.$platform == "ios") {
|
||||
return false;
|
||||
}
|
||||
let text = '';
|
||||
let text = "";
|
||||
//如果是右侧按钮点击展示
|
||||
//判断点击类型是vip价格还是延期价格
|
||||
if(type==0){
|
||||
if(item.state==null){ //没有vip
|
||||
|
||||
if (item.state == null) {
|
||||
//没有vip
|
||||
this.selectVipData.list = item.vcbList;
|
||||
this.selectVipData.id = item.vcbList[0].id;
|
||||
// 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;
|
||||
// this.selectVipData.id = item.yanqiList[0].id;
|
||||
}
|
||||
|
||||
if(type){
|
||||
this.selectVipData.type = type;
|
||||
}
|
||||
|
||||
this.selectVipData.title = item.title + '-' + item.year + '年';
|
||||
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() {
|
||||
this.orderModalShow = false;
|
||||
this.selectVipData = {};
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@@ -195,7 +307,9 @@ export default{
|
||||
.vip_price {
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
.vip_price text,.vip_qx text,.vip_qx_v{
|
||||
.vip_price text,
|
||||
.vip_qx text,
|
||||
.vip_qx_v {
|
||||
display: inline-block;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
@@ -261,7 +375,6 @@ export default{
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
|
||||
.vip_item_overdue {
|
||||
background: rgba(220, 223, 225, 0.9) !important;
|
||||
opacity: 0.75;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 4.2 KiB |
Reference in New Issue
Block a user