ios放开vip模块

This commit is contained in:
liuyuan
2025-02-21 10:52:38 +08:00
parent 179a2c492e
commit 98f74b1532
6 changed files with 153 additions and 532 deletions

View File

@@ -12,8 +12,8 @@
"src" : "图片路径" "src" : "图片路径"
} }
], ],
"versionName" : "1.0.52", "versionName" : "1.0.53",
"versionCode" : 1052, "versionCode" : 1053,
"app-plus" : { "app-plus" : {
"nvueCompiler" : "uni-app", "nvueCompiler" : "uni-app",
"compatible" : { "compatible" : {

View File

@@ -4,7 +4,7 @@
<public-module></public-module> <public-module></public-module>
<z-nav-bar title="课程介绍"></z-nav-bar> <z-nav-bar title="课程介绍"></z-nav-bar>
<view class="contentBox commonPageContentBox"> <view class="contentBox commonPageContentBox">
<view v-if="goBuyTitle && isAndorid" class="describe_block"> <view v-if="goBuyTitle" class="describe_block">
<view style=" display: flex;"> <view style=" display: flex;">
<uni-icons type="info" size="20" color="#fff"></uni-icons> <uni-icons type="info" size="20" color="#fff"></uni-icons>
<text>{{goBuyTitle}}</text> <text>{{goBuyTitle}}</text>
@@ -13,7 +13,7 @@
立即购买 立即购买
</button> </button>
</view> </view>
<view class="curseImg" :style="isAndorid?'padding-top:80rpx;':''"> <view class="curseImg" style="padding-top:80rpx;">
<image v-if="!course.image" src="/static/nobg.jpg" mode="widthFix"></image> <image v-if="!course.image" src="/static/nobg.jpg" mode="widthFix"></image>
<image v-else :src="course.image" mode="widthFix"></image> <image v-else :src="course.image" mode="widthFix"></image>
</view> </view>
@@ -213,7 +213,7 @@
@click="handleClickGetGoodsList(librayList[curIndex])" text="购买课程"></u-button> @click="handleClickGetGoodsList(librayList[curIndex])" text="购买课程"></u-button>
<u-button class="btn" type="success" size="small" <u-button class="btn" type="success" size="small"
@click="goNewPay(librayList[curIndex])" text="复读" v-if="showNewPayBtn"></u-button> @click="goNewPay(librayList[curIndex])" text="复读" v-if="showNewPayBtn"></u-button>
<u-button size="small" v-if="isAndorid" class="btn" type="primary" <u-button size="small" class="btn" type="primary"
@click="onPageJump('/pages/mine/vip/index')" text="开通VIP"></u-button> @click="onPageJump('/pages/mine/vip/index')" text="开通VIP"></u-button>
</view> </view>
</view> </view>
@@ -537,7 +537,6 @@
newPayment:"common/courseRelearn/courseCatalogueCanRelearn", // 检查复读地址 newPayment:"common/courseRelearn/courseCatalogueCanRelearn", // 检查复读地址
newPaymentList:"common/courseRelearn/relearnShopProductList", // 获取复读列表 newPaymentList:"common/courseRelearn/relearnShopProductList", // 获取复读列表
}, },
isAndorid: true,
oprateOsName: '', oprateOsName: '',
linkClassList: [], // 可加入关联班级数组 linkClassList: [], // 可加入关联班级数组
classInfo: [], // 所在班级信息 classInfo: [], // 所在班级信息
@@ -571,7 +570,6 @@
//是否是vip //是否是vip
this.getCourseByVip(); this.getCourseByVip();
this.getSayList(); this.getSayList();
this.getOS();
}, },
onPageScroll(e) { onPageScroll(e) {
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
@@ -902,18 +900,6 @@
this.classInfo = {} this.classInfo = {}
}); });
}, },
// 获得操作系统
getOS() {
let oprateOs = "";
oprateOs = uni.getSystemInfoSync().platform;
this.oprateOsName = uni.getSystemInfoSync().platform;
console.log('oprateOs', oprateOs)
if (oprateOs == "android") {
this.isAndorid = true;
} else {
this.isAndorid = false;
}
},
async checkPermision() { async checkPermision() {
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE") var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
if (result != 1) { if (result != 1) {

View File

@@ -20,7 +20,6 @@
:key="index" :key="index"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
> >
<!-- <image :src="curriculumData.explainsImg" mode="widthFix" class="headImage"></image> -->
<image <image
:src="item" :src="item"
mode="aspectFit" mode="aspectFit"
@@ -62,13 +61,6 @@
<view class="xianshimaiosha_box"> <view class="xianshimaiosha_box">
<text class="xianshimaiosha">秒杀商品</text> <text class="xianshimaiosha">秒杀商品</text>
<!-- <view class="countdown">
<text style="margin-right: 8rpx;">距结束</text>
<uni-countdown :day="1" :hour="2" :minute="30" :second="0" color="#FFFFFF"
:font-size="12" backgroundColor="#000" />
</view> -->
</view> </view>
</view> </view>
@@ -130,43 +122,6 @@
itemClass="itemCouponClass" itemClass="itemCouponClass"
> >
</common-coupon> </common-coupon>
<!-- <view
style="max-height: 40vh; overflow-y: scroll"
:class="'youhuiItem'"
v-for="(item, index) in canGetCouponList"
:key="index"
>
<view style="width: 25%; color: #f31440; text-align: center">
<text>¥</text>
<b style="font-size: 60rpx">{{
item.couponEntity.couponAmount
}}</b>
</view>
<view style="width: calc(100% - 27%); padding-left: 2%">
<view>
<text
style="
display: inline-block;
font-size: 30rpx;
line-height: 34rpx;
margin-right: 6rpx;
margin-bottom: 10rpx;
color: #f10833;
"
>{{ item.couponEntity.couponName }}</text
>
</view>
<text
style="
display: block;
font-size: 24rpx;
color: #999;
margin-top: 4rpx;
"
>说明:{{ item.couponEntity.remark }}</text
>
</view>
</view> -->
</view> </view>
</view> </view>
</template> </template>
@@ -231,38 +186,7 @@
></image> ></image>
</view> </view>
</view> </view>
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
</template> </template>
<!-- <template slot="rightSlot" slot-scope="slotProps">
<view v-if="slotProps.row.surplusNum" class="related_courses_right">
<view class="progress_icon" style=""><u-line-progress activeColor="#258feb" height="14"
:percentage="30" :showText="false" showText></u-line-progress></view>
<view
:class="slotProps.row.surplusNum < 30 ? 'aui-text-danger dateReminder' : 'dateReminder'">
距&nbsp;{{ slotProps.row.surplusNum }}&nbsp;天到期</view>
</view>
<view v-if="slotProps.row.inType == '03'" class="fdButtonBox">
<u-button type="primary" :plain="true" text="复读一月" :customStyle="fdButtonStyle" size="small"
@click.native.stop="fnRelearn(slotProps.row.inType, 30, slotProps.row.courseFee)"></u-button>
<u-button type="primary" :plain="true" text="复读三月" :customStyle="fdButtonStyle" size="small"
@click.native.stop="fnRelearn(slotProps.row.inType, 90, slotProps.row.courseFee)"></u-button>
</view>
<view>
</view>
</template> -->
</common-goods-list> </common-goods-list>
</view> </view>
<view :class="`dataList parameterList`" v-if="booksList.length > 0"> <view :class="`dataList parameterList`" v-if="booksList.length > 0">
@@ -306,8 +230,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
</template> </template>
</common-list> </common-list>
</view> </view>
@@ -352,8 +274,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
</template> </template>
</common-list> </common-list>
</view> </view>
@@ -397,38 +317,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
</template> </template>
<!-- <template slot="rightSlot" slot-scope="slotProps">
<view v-if="slotProps.row.surplusNum" class="related_courses_right">
<view class="progress_icon" style=""><u-line-progress activeColor="#258feb" height="14"
:percentage="30" :showText="false" showText></u-line-progress></view>
<view
:class="slotProps.row.surplusNum < 30 ? 'aui-text-danger dateReminder' : 'dateReminder'">
距&nbsp;{{ slotProps.row.surplusNum }}&nbsp;天到期</view>
</view>
<view v-if="slotProps.row.inType == '03'" class="fdButtonBox">
<u-button type="primary" :plain="true" text="复读一月" :customStyle="fdButtonStyle" size="small"
@click.native.stop="fnRelearn(slotProps.row.inType, 30, slotProps.row.courseFee)"></u-button>
<u-button type="primary" :plain="true" text="复读三月" :customStyle="fdButtonStyle" size="small"
@click.native.stop="fnRelearn(slotProps.row.inType, 90, slotProps.row.courseFee)"></u-button>
</view>
<view>
</view>
</template> -->
</common-list> </common-list>
</view> </view>
@@ -442,48 +331,9 @@
<view class="common_divider divider_box"> </view> <view class="common_divider divider_box"> </view>
<common-rich-detail :detailInfo="detailInfo" style="padding: 10rpx"> <common-rich-detail :detailInfo="detailInfo" style="padding: 10rpx">
<template #richHeadImg> <template #richHeadImg></template>
<!-- <image :src="curriculumData.imgUrl" mode="widthFix" class="headImage"></image> -->
<!-- <image :src="detailInfo.imgUrl" v-if="detailInfo.imgUrl" mode="widthFix" class="headImage"></image> -->
</template>
</common-rich-detail> </common-rich-detail>
<!-- <view class="small_class_teaching_top">
<view class="small_class_teaching_top_left">
<image src="@/static/icon/course_ic.png" mode="aspectFil" class="icon1"></image>
<text>小班教学</text>
</view>
<text>{{ curriculumInfo.remainingDays }}</text>
</view> -->
<view class="small_class_teaching_content"> <view class="small_class_teaching_content">
<!-- <view class="top">
<view class="top_item" v-for="(v, i) in teachingList">
{{ v.title }}
</view>
</view> -->
<!-- <view class="schedule">
<view class="icon_box">
<image src="@/static/icon/course_07.png" mode="aspectFil" class="icon1">学习进度</image>
</view>
<view class="progress_box">
<view class="progress_icon" style=""><u-line-progress activeColor="#258feb" height="18"
:percentage="30" :showText="false" showText></u-line-progress></view>
<image src="@/static/icon/curriculum_05.png" mode="aspectFil" class="icon1" />
<image src="@/static/icon/curriculum_07.png" mode="aspectFil" class="icon2" />
</view>
</view> -->
</view> </view>
</view> </view>
@@ -514,12 +364,9 @@
slotProps.row.title slotProps.row.title
}}</view> }}</view>
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
</template> </template>
<template slot="rightSlot" slot-scope="slotProps"> <template slot="rightSlot" slot-scope="slotProps">
<!-- {{ slotProps.row.bxType }} -->
<text class="aui-text-danger"> <text class="aui-text-danger">
¥{{ slotProps.row.courseFee }}</text ¥{{ slotProps.row.courseFee }}</text
> >
@@ -539,15 +386,6 @@
@buttonClick="onHandleClickBuy1" @buttonClick="onHandleClickBuy1"
/> />
</view> </view>
<!--
<u-modal
:show="show"
:title="modalInfo.title"
:content="modalInfo.content"
showCancelButton
@confirm="hancleModalConfirm"
@cancel="hancleModalCancel"
></u-modal> -->
<common-select-goods <common-select-goods
ref="commonSelectGoods" ref="commonSelectGoods"
:selectGoodsData="selectGoodsData" :selectGoodsData="selectGoodsData"
@@ -625,8 +463,6 @@
}}</view> }}</view>
</view> </view>
</view> </view>
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
</template> </template>
</common-list> </common-list>
@@ -639,10 +475,6 @@
@buttonClick="onHandleClickBuy" @buttonClick="onHandleClickBuy"
/> />
</view> </view>
<!-- <view>
<text @click="handleClickClose">取消</text>
<text @click="handleClickGoBuy">立即购买</text>
</view>-->
</view> </view>
</u-popup> </u-popup>
</view> </view>
@@ -665,24 +497,7 @@ export default {
parameterList: [], parameterList: [],
booksList: [], booksList: [],
coursesList: [], coursesList: [],
buyOptions: [ buyOptions: [],
// {
// icon: 'chat',
// text: '客服'
// },
// {
// icon: "shop",
// text: "店铺",
// // info: 2,
// infoBackgroundColor: "#007aff",
// infoColor: "#f5f5f5",
// },
// {
// icon: 'cart',
// text: '购物车',
// info: 2
// }
],
swiperList: [], swiperList: [],
goodsList: [], goodsList: [],

View File

@@ -37,8 +37,6 @@
style="" style=""
></image> ></image>
</view> </view>
<!-- </view> -->
</view> </view>
<view class="order_top common_radius_box color_shandow goods_box"> <view class="order_top common_radius_box color_shandow goods_box">
@@ -170,11 +168,10 @@
style="display: inline-block" style="display: inline-block"
></u-icon> ></u-icon>
<text> {{ v.text }}</text <text> {{ v.text }}</text>
><template v-if="v.type == 4"> <template v-if="v.type == 4">
<text style="color: #aaa; margin-left: 10rpx"> <text style="color: #aaa; margin-left: 10rpx">
(全部积分{{ initData.user.jf }})</text (全部积分{{ initData.user.jf }})</text>
>
</template> </template>
</view> </view>
<view class="right"> <view class="right">
@@ -183,8 +180,7 @@
<text> <text>
{{ {{
isShowAddress ? freightNum.toFixed(2) : Number(0).toFixed(2) isShowAddress ? freightNum.toFixed(2) : Number(0).toFixed(2)
}}</text }}</text>
>
</template> </template>
<template v-if="v.type == 3"> <template v-if="v.type == 3">
<template v-if="!curCoupon.id"> <template v-if="!curCoupon.id">
@@ -219,7 +215,6 @@
<template v-else> <template v-else>
<text style="color: #999">暂无可用优惠券</text> <text style="color: #999">暂无可用优惠券</text>
</template> </template>
<!-- <text style="color: #fe6035"> -{{ jfNumberShow }}</text> -->
</template> </template>
<template v-else> <template v-else>
<text style="color: #fe6035" <text style="color: #fe6035"
@@ -274,107 +269,44 @@
<view class="order_top common_radius_box color_shandow goods_box pay_box"> <view class="order_top common_radius_box color_shandow goods_box pay_box">
<view class="title">支付方式</view> <view class="title">支付方式</view>
<!-- 商品是安卓环境支付或者商品列表中没有课程 --> <!-- 商品是安卓环境支付或者商品列表中没有课程 -->
<template v-if="isAndorid || (!isAndorid && !haveCourse)"> <view
<view class="curriulum_title_box goods_item pay_item"
class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payList"
v-for="(v, i) in payList" >
> <view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
<view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'"> <view class="left">
<view class="left"> <image
<image class="pay_item_img"
class="pay_item_img" :src="v.imgUrl"
:src="v.imgUrl" mode="aspectFil"
mode="aspectFil" :style="v.style"
:style="v.style" >
> </image>
</image> <template v-if="v.type == 4">
<template v-if="v.type == 4"> <text> {{ v.text }}</text>
<text> {{ v.text }}</text> <text
<text style="color: #258feb; font-weight: 600; margin-left: 10rpx"
style="color: #258feb; font-weight: 600; margin-left: 10rpx" >
> (余额{{
(余额{{ initData && initData.user ? initData.user.peanutCoin : 0
initData && initData.user ? initData.user.peanutCoin : 0 }})</text
}})</text >
> </template>
</template>
<text v-else> {{ v.text }}</text> <text v-else> {{ v.text }}</text>
</view> </view>
<template v-if="isDefaultCurrency">
<radio <template v-if="isDefaultCurrency">
v-if="i == 2" <radio v-if="i == 2" :value="v.value" color="#258feb"
:value="v.value" :checked="selectPayIndex == i ? true : false" @click="radioChange(i)" size="10" />
color="#258feb" </template>
:checked="selectPayIndex == i ? true : false" <template v-else>
@click="radioChange(i)" <radio :value="v.value" color="#258feb" :checked="selectPayIndex == i ? true : false"
size="10" @click="radioChange(i)" size="10" />
/> </template>
</template> </view>
<template v-else> </view>
<radio <template v-if="selectPayIndex==2||$platform=='ios'">
:value="v.value"
color="#258feb"
:checked="selectPayIndex == i ? true : false"
@click="radioChange(i)"
size="10"
/>
</template>
</view>
</view>
</template>
<!-- ios 支付列表 -->
<template v-else>
<view
class="curriulum_title_box goods_item pay_item"
v-for="(v, i) in payListIOS"
:key="i"
>
<view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
<view class="left">
<image
class="pay_item_img"
:src="v.imgUrl"
mode="aspectFil"
:style="v.style"
>
</image>
<template v-if="v.type == 4">
<text> {{ v.text }}</text>
<text
style="color: #258feb; font-weight: 600; margin-left: 10rpx"
>
(余额{{
initData && initData.user ? initData.user.peanutCoin : 0
}})</text
>
</template>
<text v-else> {{ v.text }}</text>
</view>
<template v-if="isDefaultCurrency">
<radio
v-if="i == 2"
:value="v.value"
color="#258feb"
:checked="selectPayIndex == i ? true : false"
@click="radioChange(i)"
size="10"
/>
</template>
<template v-else>
<radio
:value="v.value"
color="#258feb"
:checked="selectPayIndex == i ? true : false"
@click="radioChange(i)"
size="10"
/>
</template>
</view>
</view>
</template>
<template v-if="beizhuShow">
<view <view
class="goods_detail_list_title bg_box_shandow color_shandow bg_color" class="goods_detail_list_title bg_box_shandow color_shandow bg_color"
> >
@@ -389,7 +321,7 @@
<view class="linlanzhifu"> <view class="linlanzhifu">
<u-icon <u-icon
name="error-circle" name="error-circle"
color="#018F89" color="#258feb"
size="20" size="20"
style="display: inline-block; margin-right: 10rpx" style="display: inline-block; margin-right: 10rpx"
></u-icon> ></u-icon>
@@ -437,8 +369,8 @@
</view> </view>
</view> </view>
</template> </template>
</view> </view>
<template> <template>
<common-sticky <common-sticky
label="title" label="title"
@@ -480,7 +412,6 @@
@selectAddress="selectAddress" @selectAddress="selectAddress"
></common-address ></common-address
></u-popup> ></u-popup>
<!-- @close="closeOrderModalShow" -->
<u-popup :show="orderModalShow" mode="bottom" :round="20"> <u-popup :show="orderModalShow" mode="bottom" :round="20">
<view class="orderModalShow popup_box"> <view class="orderModalShow popup_box">
<u-icon <u-icon
@@ -548,36 +479,20 @@ export default {
isDefaultCurrency: { isDefaultCurrency: {
immediate: true, immediate: true,
handler(newRoute) { handler(newRoute) {
console.log("this.isDefaultCurrency", this.isDefaultCurrency, platform);
if (this.isDefaultCurrency) { if (this.isDefaultCurrency) {
if (platform == "ios") { if (platform == "ios") {
if (!this.haveCourse) { this.selectPayIndex = 0;
// 没有课程类型 } else {
this.selectPayIndex = 2; this.selectPayIndex = 0;
this.payType = this.payList[this.selectPayIndex].type; }
} else {
this.selectPayIndex = 0;
this.payType = this.payListIOS[this.selectPayIndex].type;
}
} else {
this.selectPayIndex = 2;
this.payType = this.payList[this.selectPayIndex].type;
}
} else { } else {
if (platform == "ios") { if (platform == "ios") {
if (!this.haveCourse) { this.selectPayIndex = 0;
// 没有课程类型 } else {
this.selectPayIndex = 1; this.selectPayIndex = 0;
this.payType = this.payList[this.selectPayIndex].type; }
} else {
this.selectPayIndex = 0;
this.payType = this.payListIOS[this.selectPayIndex].type;
}
} else {
this.selectPayIndex = 1;
this.payType = this.payList[this.selectPayIndex].type;
}
} }
this.payType = this.payList[this.selectPayIndex].type;
this.$forceUpdate(); this.$forceUpdate();
}, },
}, },
@@ -617,34 +532,7 @@ export default {
}, },
selectPayIndex: 1, selectPayIndex: 1,
farePrice: 0, farePrice: 0,
payList: [ payList: [],
{
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
value: "0",
},
{
text: "微信",
imgUrl: require("@/static/icon/pay_2.png"),
type: 1,
value: "1",
},
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
],
payListIOS: [
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
],
priceBreakdownList: [], priceBreakdownList: [],
orderInfoList: [ orderInfoList: [
{ {
@@ -765,7 +653,7 @@ export default {
var list = [...this.options.goods]; var list = [...this.options.goods];
list = list.map((e) => e.goodsType); list = list.map((e) => e.goodsType);
this.haveCourse = list.some((ele) => ele === "05"); this.haveCourse = list.some((ele) => ele === "05");
console.log("list--------->", list, this.haveCourse);
if (this.options.sourceType == "curriculum") { if (this.options.sourceType == "curriculum") {
this.goToInfo = { this.goToInfo = {
url: "/pages/curriculum/order/index/index", url: "/pages/curriculum/order/index/index",
@@ -781,10 +669,8 @@ export default {
}, },
async onShow() { async onShow() {
this.curCouponId = undefined; this.curCouponId = undefined;
console.log("调用了onShow方法");
var that = this; var that = this;
await uni.$on("returnData", function (data) { await uni.$on("returnData", function (data) {
console.log("data at line 415:", data);
if (data) { if (data) {
that.addressData = { that.addressData = {
...data, ...data,
@@ -796,12 +682,44 @@ export default {
that.getUserAddress(); that.getUserAddress();
} else { } else {
console.log("没有接受到数据");
} }
}); });
// #ifdef APP-PLUS
this.getOS(); if(platform=='ios'){
// #endif this.payList= [
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
]
this.selectPayIndex = 0;
this.payType=4
}else{
this.payList= [{
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
value: "0",
},
{
text: "微信",
imgUrl: require("@/static/icon/pay_2.png"),
type: 1,
value: "1",
},
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
]
this.selectPayIndex = 1;
this.payType=2
}
}, },
computed: { computed: {
...mapState(["userInfo"]), ...mapState(["userInfo"]),
@@ -909,21 +827,6 @@ export default {
}); });
}); });
}, },
// 获得操作系统
getOS() {
let oprateOs = "";
oprateOs = uni.getSystemInfoSync().platform;
if (oprateOs == "android") {
this.isAndorid = true;
} else {
this.isAndorid = false;
if (this.haveCourse && !this.isAndorid) {
this.selectPayIndex = 0;
this.payType = this.payListIOS[0].type;
this.beizhuShow = true;
}
}
},
handleChangejf(val) { handleChangejf(val) {
var value = val; var value = val;
this.$nextTick(() => { this.$nextTick(() => {
@@ -1372,7 +1275,6 @@ export default {
image: "../../../static/icon/ic_close.png", image: "../../../static/icon/ic_close.png",
}); });
} else { } else {
console.log("that.payType at line 607:", that.payType);
uni.showToast({ uni.showToast({
title: "下单成功,即将进行支付", title: "下单成功,即将进行支付",
icon: "none", icon: "none",
@@ -1431,7 +1333,6 @@ export default {
}; };
setWXPay(data1, (res) => { setWXPay(data1, (res) => {
if (res.success) { if (res.success) {
// this.buyingFlag = false
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: "支付成功", title: "支付成功",
@@ -1498,13 +1399,7 @@ export default {
}); });
}, },
radioChange(index) { radioChange(index) {
if (index == this.selectPayIndex) {
return;
}
this.selectPayIndex = index; this.selectPayIndex = index;
this.selectPayIndex == 2
? (this.beizhuShow = true)
: (this.beizhuShow = false);
this.payType = this.payList[this.selectPayIndex].type; this.payType = this.payList[this.selectPayIndex].type;
this.$forceUpdate(); this.$forceUpdate();
}, },

View File

@@ -20,7 +20,7 @@
<image src="@/static/icon/home_icon_logo.png" v-else <image src="@/static/icon/home_icon_logo.png" v-else
class="per_mes_img color_shandow"></image> class="per_mes_img color_shandow"></image>
</view> </view>
<view class="user_vip_box" v-if="isAndorid&&hasVipType1 || isAndorid&&hasVipType2"> <view class="user_vip_box" v-if="hasVipType1 || hasVipType2">
<view class="user_vip super" :style="hasVipType2?'width: 170rpx;':''"> <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="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_item" v-if="hasVipType2"><text>国学心理学</text><image src="@/static/icon/chao_svip.png"></image></view>
@@ -34,7 +34,7 @@
<template v-if="userMes.tel"> <template v-if="userMes.tel">
<view class="phone">手机号({{ userMes.tel }})</view> <view class="phone">手机号({{ userMes.tel }})</view>
</template> </template>
<template v-if="isAndorid&&textList.length>0"> <template v-if="textList.length>0">
<view class="vip_type"> <view class="vip_type">
<view class="vip_type_item" v-for="(item,index) in textList" :key="index"> <view class="vip_type_item" v-for="(item,index) in textList" :key="index">
{{item}}<image src="@/static/icon/chao_vip.png"></image> {{item}}<image src="@/static/icon/chao_vip.png"></image>
@@ -50,8 +50,8 @@
<view style=" <view style="
padding: 20rpx; overflow: hidden; padding: 20rpx; overflow: hidden;
"> ">
<!-- vip 只有安卓才显示-->
<view v-if="isAndorid" class="chong_zhi boxShadow box_fillet vip_box" <view class="chong_zhi boxShadow box_fillet vip_box"
@click="onPageJump('/pages/mine/vip/index')"> @click="onPageJump('/pages/mine/vip/index')">
<view class="noVip"> <view class="noVip">
<view style="display: flex; align-items: center;"> <view style="display: flex; align-items: center;">
@@ -204,8 +204,6 @@
userCouponNum:0, // 优惠券数量 userCouponNum:0, // 优惠券数量
directorShow: false, // 主任是否显示班级入口 directorShow: false, // 主任是否显示班级入口
monitorShow: false, // 其他管理是否显示班级入口 monitorShow: false, // 其他管理是否显示班级入口
isAndorid: true,
platform: null, // 设备系统
pageList: [{ pageList: [{
name: "我的订单", name: "我的订单",
url: "/pages/bookShop/orderList?type=mine", url: "/pages/bookShop/orderList?type=mine",
@@ -248,8 +246,6 @@
onLoad(e) { onLoad(e) {
// 隐藏原生的tabbar // 隐藏原生的tabbar
uni.hideTabBar(); uni.hideTabBar();
this.getOS();
this.platform = uni.getSystemInfoSync().platform;
}, },
computed: { computed: {
...mapState(["userInfo"]), ...mapState(["userInfo"]),
@@ -331,16 +327,6 @@
break; break;
} }
}, },
// 获得操作系统
getOS() {
let oprateOs = "";
oprateOs = uni.getSystemInfoSync().platform;
if (oprateOs == "android") {
this.isAndorid = true;
} else {
this.isAndorid = false;
}
},
haveSelected(data) { haveSelected(data) {
if (data.index == 0) { if (data.index == 0) {
// 分享到好友 // 分享到好友
@@ -1011,7 +997,6 @@
} }
.vip_btn{ .vip_btn{
margin-right: 15rpx; margin-right: 15rpx;
height: 50rpx;
} }
.vip_btn button{ .vip_btn button{
background: none; background: none;

View File

@@ -10,8 +10,8 @@
<u-tag :text="`已选:${dataInfo.title}`" bgColor="#DCF2FA" borderColor="#DCF2FA" color="#258feb" <u-tag :text="`已选:${dataInfo.title}`" bgColor="#DCF2FA" borderColor="#DCF2FA" color="#258feb"
plain></u-tag> plain></u-tag>
</view> </view>
<view v-if="dataInfo.list&&dataInfo.list.length>0" style="margin: 20rpx 0 40rpx;"> <view v-if="dataInfo.list&&dataInfo.list.length>0">
{{dataInfo.list[0].title}}价格<text v-if="dataInfo.title.includes('国学与心理学')"><br/></text> {{dataInfo.list[0].title}}<text v-if="dataInfo.type==1">延期价格</text><text v-else>价格</text>
<text v-for="(item,index) in dataInfo.list" :key="index" <text v-for="(item,index) in dataInfo.list" :key="index"
class="list_choose" class="list_choose"
:class="activeIndex==index?'list_choose_active':''" :class="activeIndex==index?'list_choose_active':''"
@@ -20,7 +20,7 @@
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payList"> <view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payList">
<view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'"> <view :class="i != 2 ? 'bgGrey top' : 'top'">
<view class="left"> <view class="left">
<image class="pay_item_img" :src="v.imgUrl" mode="aspectFil" :style="v.style"> <image class="pay_item_img" :src="v.imgUrl" mode="aspectFil" :style="v.style">
</image> </image>
@@ -34,17 +34,12 @@
<text v-else> {{ v.text }}</text> <text v-else> {{ v.text }}</text>
</view> </view>
<template v-if="isDefaultCurrency">
<radio v-if="i == 2" :value="v.value" color="#258feb" <radio :value="v.value" color="#258feb" :checked="selectPayIndex == i ? true : false"
:checked="selectPayIndex == i ? true : false" @click="radioChange(i)" size="10" /> @click="radioChange(i)" size="10" />
</template>
<template v-else>
<radio :value="v.value" color="#258feb" :checked="selectPayIndex == i ? true : false"
@click="radioChange(i)" size="10" />
</template>
</view> </view>
</view> </view>
<template v-if="selectPayIndex == 2"> <template v-if="selectPayIndex == 2||$platform=='ios'">
<view class="goods_detail_list_title bg_box_shandow color_shandow bg_color"> <view class="goods_detail_list_title bg_box_shandow color_shandow bg_color">
<view class="linlanzhifu" style=" <view class="linlanzhifu" style="
width: 100%; width: 100%;
@@ -116,9 +111,7 @@
setWXPay setWXPay
} from "@/config/utils"; } from "@/config/utils";
import $http from "@/config/requestConfig.js"; import $http from "@/config/requestConfig.js";
const { const { platform } = uni.getSystemInfoSync();
platform
} = uni.getSystemInfoSync();
import { import {
mapState mapState
} from "vuex"; } from "vuex";
@@ -127,27 +120,7 @@
components: { components: {
courseDescription, //课程说明 courseDescription, //课程说明
}, },
watch: { watch:{
isDefaultCurrency: {
immediate: true,
handler(newRoute) {
if (this.isDefaultCurrency) {
if (platform == "ios") {
this.selectPayIndex = 2;
} else {
this.selectPayIndex = 2;
}
} else {
if (platform == "ios") {
this.selectPayIndex = 1;
} else {
this.selectPayIndex = 1;
}
}
this.payType = this.payList[this.selectPayIndex].type;
this.$forceUpdate();
},
},
lastFee:{ lastFee:{
immediate: true, immediate: true,
handler(newRoute) { handler(newRoute) {
@@ -178,25 +151,7 @@
}, },
selectPayIndex: 1, selectPayIndex: 1,
farePrice: 0, farePrice: 0,
payList: [{ payList: [],
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
value: "0",
},
{
text: "微信",
imgUrl: require("@/static/icon/pay_2.png"),
type: 1,
value: "1",
},
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
],
priceBreakdownList: [], priceBreakdownList: [],
number: 1, number: 1,
detailInfo: {}, detailInfo: {},
@@ -267,14 +222,45 @@
activeIndex: 0, //选择付款 下标 activeIndex: 0, //选择付款 下标
}; };
}, },
created(){
//判断是什么系统
if(platform=='ios'){
this.payList = [
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
}]
this.selectPayIndex = 0;
this.payType=4
}else{
this.payList = [{
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
value: "0",
},
{
text: "微信",
imgUrl: require("@/static/icon/pay_2.png"),
type: 1,
value: "1",
},
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
}]
this.selectPayIndex = 1;
this.payType=2
}
},
async onLoad(options) { async onLoad(options) {
var that = this; var that = this;
this.options = JSON.parse(options.data); this.options = JSON.parse(options.data);
this.goodsDataList = this.options.goods; this.goodsDataList = this.options.goods;
this.goToInfo = {
url: "/pages/bookShop/orderList",
type: 1,
};
}, },
async onShow() { async onShow() {
var that = this; var that = this;
@@ -353,45 +339,9 @@
}); });
}, },
// 获取订单初始话 // 获取订单初始话
handleFresh() { handleFresh() {
this.show = false; this.show = false;
}, },
getTotalPrice() {
var s = 0;
var that = this;
for (var i = this.goodsDataList.length - 1; i >= 0; i--) {
s += this.goodsDataList[i].price ? this.goodsDataList[i].price : 0;
}
that.totalPrice = s;
//
if (!this.isShowAddress) {
if (this.initData.user.jf >= that.totalPrice) {
this.jfNumber = that.totalPrice;
this.jfNumberMax = that.totalPrice;
} else {
this.jfNumber = this.initData.user.jf;
this.jfNumberMax = this.initData.user.jf;
}
if (that.jfNumber == 0 || that.jfNumber == null) {
that.jfNumberShow = "0.00";
that.actualPayment = that.totalPrice;
} else {
that.jfNumberShow = that.jfNumber.toFixed(2);
that.actualPayment = that.totalPrice - that.jfNumber;
}
that.actualPayment = that.actualPayment + that.freightNum;
} else {
that.actualPayment = that.totalPrice + that.freightNum;
}
if (this.actualPayment == 0 && !this.isShowAddress) {
this.isDefaultCurrency = true;
} else {
this.isDefaultCurrency = false;
}
this.$forceUpdate();
},
selectAddress(data) { selectAddress(data) {
this.show = false; this.show = false;
}, },
@@ -548,9 +498,6 @@
chooseYear(item,index){ chooseYear(item,index){
this.activeIndex = index; this.activeIndex = index;
this.dataInfo.lastFee = item.rebateFee; this.dataInfo.lastFee = item.rebateFee;
console.log('----this.dataInfo',this.dataInfo);
}, },
radioChange(index) { radioChange(index) {
this.selectPayIndex = index; this.selectPayIndex = index;
@@ -661,14 +608,6 @@
await that.getDetailInfo(); await that.getDetailInfo();
}); });
}, },
getPriceData() {
var that = this;
setTimeout(() => {
that.$nextTick(() => {
that.$refs.priceDetail.getTotalPrice();
});
}, 100);
},
// 检查是有权限使用搜索功能 // 检查是有权限使用搜索功能
checkDisable() { checkDisable() {
console.log("点击了"); console.log("点击了");
@@ -1312,10 +1251,11 @@
border:1rpx solid #999; border:1rpx solid #999;
color: #999; color: #999;
border-radius: 10rpx; border-radius: 10rpx;
margin: 20rpx 30rpx 20rpx 0; margin-right: 20rpx;
padding: 0 30rpx; margin-bottom: 30rpx;
padding: 0 20rpx;
font-size: 28rpx; font-size: 28rpx;
line-height: 50rpx; line-height: 40rpx;
} }
.list_choose_active{ .list_choose_active{
border:1rpx solid #ff1f00; border:1rpx solid #ff1f00;