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