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

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

View File

@@ -10,8 +10,8 @@
<u-tag :text="`已选:${dataInfo.title}`" bgColor="#DCF2FA" borderColor="#DCF2FA" color="#258feb"
plain></u-tag>
</view>
<view v-if="dataInfo.list&&dataInfo.list.length>0" style="margin: 20rpx 0 40rpx;">
{{dataInfo.list[0].title}}价格<text v-if="dataInfo.title.includes('国学与心理学')"><br/></text>
<view v-if="dataInfo.list&&dataInfo.list.length>0">
{{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"
class="list_choose"
: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="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
<view :class="i != 2 ? 'bgGrey top' : 'top'">
<view class="left">
<image class="pay_item_img" :src="v.imgUrl" mode="aspectFil" :style="v.style">
</image>
@@ -34,17 +34,12 @@
<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>
<radio :value="v.value" color="#258feb" :checked="selectPayIndex == i ? true : false"
@click="radioChange(i)" size="10" />
</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="linlanzhifu" style="
width: 100%;
@@ -116,9 +111,7 @@
setWXPay
} from "@/config/utils";
import $http from "@/config/requestConfig.js";
const {
platform
} = uni.getSystemInfoSync();
const { platform } = uni.getSystemInfoSync();
import {
mapState
} from "vuex";
@@ -127,27 +120,7 @@
components: {
courseDescription, //课程说明
},
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();
},
},
watch:{
lastFee:{
immediate: true,
handler(newRoute) {
@@ -178,25 +151,7 @@
},
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",
},
],
payList: [],
priceBreakdownList: [],
number: 1,
detailInfo: {},
@@ -267,14 +222,45 @@
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) {
var that = this;
this.options = JSON.parse(options.data);
this.goodsDataList = this.options.goods;
this.goToInfo = {
url: "/pages/bookShop/orderList",
type: 1,
};
},
async onShow() {
var that = this;
@@ -353,45 +339,9 @@
});
},
// 获取订单初始话
handleFresh() {
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) {
this.show = false;
},
@@ -548,9 +498,6 @@
chooseYear(item,index){
this.activeIndex = index;
this.dataInfo.lastFee = item.rebateFee;
console.log('----this.dataInfo',this.dataInfo);
},
radioChange(index) {
this.selectPayIndex = index;
@@ -661,14 +608,6 @@
await that.getDetailInfo();
});
},
getPriceData() {
var that = this;
setTimeout(() => {
that.$nextTick(() => {
that.$refs.priceDetail.getTotalPrice();
});
}, 100);
},
// 检查是有权限使用搜索功能
checkDisable() {
console.log("点击了");
@@ -1312,10 +1251,11 @@
border:1rpx solid #999;
color: #999;
border-radius: 10rpx;
margin: 20rpx 30rpx 20rpx 0;
padding: 0 30rpx;
margin-right: 20rpx;
margin-bottom: 30rpx;
padding: 0 20rpx;
font-size: 28rpx;
line-height: 50rpx;
line-height: 40rpx;
}
.list_choose_active{
border:1rpx solid #ff1f00;