价格显示问题

This commit is contained in:
liuyuan
2025-04-18 17:56:33 +08:00
parent 648a993d14
commit 380ed58d17
179 changed files with 17322 additions and 2750 deletions

View File

@@ -14,15 +14,15 @@
<view :class="`common_radius_box goods_box popup_content`">
<view class="title title_box">
<!-- <view class="title_price" v-if="selectGoodsData.isVipPrice==1&&selectGoodsData.vipPrice!=null&&selectGoodsData.vipPrice!=0">
<view class="title_price" v-if="selectGoodsData.isVipPrice==1&&selectGoodsData.vipPrice!=null&&selectGoodsData.vipPrice!=0">
{{selectGoodsData.vipPrice}}
<text style=" font-weight: normal; padding-left: 15rpx; font-size: 26rpx;">VIP到手价</text>
</view>
<view class="title_price" v-else-if="selectGoodsData.activityPrice&&selectGoodsData.activityPrice>0">
{{selectGoodsData.activityPrice}}
<text style=" font-weight: normal; padding-left: 15rpx; font-size: 26rpx; color: #999;">活动价</text>
</view> -->
<text class="title_price">
</view>
<text class="title_price" v-else>
{{selectGoodsData.price}}
</text>
<u-icon
@@ -68,20 +68,11 @@
<view :class="`goods_info `">
<view class="name">{{ slotProps.row.productName }}</view>
<view class="price">
<!-- <view class="goods_price" v-if="slotProps.row.isVipPrice==1&&slotProps.row.vipPrice!=null&&slotProps.row.vipPrice!=0">
{{slotProps.row.vipPrice}}
<text class="line_text">{{slotProps.row.price}}</text>
</view>
<view class="goods_price" v-else-if="slotProps.row.activityPrice&&slotProps.row.activityPrice>0">
{{slotProps.row.activityPrice}}
<text class="line_text">{{slotProps.row.price}}</text>
</view> -->
<text>
{{slotProps.row.price}}
</text>
<!-- <text class="goods_text" v-if="slotProps.row.isVipPrice==1&&slotProps.row.vipPrice!=null&&slotProps.row.vipPrice!=0">
<text v-html="getPrice(slotProps)"></text>
<text class="goods_text" v-if="slotProps.row.isVipPrice==1&&slotProps.row.vipPrice!=null&&slotProps.row.vipPrice!=0">
VIP优惠
</text> -->
</text>
</view>
</view>
</view>
@@ -129,6 +120,38 @@ export default {
...mapState(["userInfo"]),
},
methods: {
getPrice(slotProps) {
if (
Number(slotProps.row.isVipPrice) === 1 &&
Number(slotProps.row.vipPrice) > 0
) {
return `
<text style="color: #e97512; font-size: 28rpx; font-weight: bold;">
${Number(slotProps.row.vipPrice).toFixed(2)}
</text>
<text
style="color: #8a8a8a; font-size: 22rpx; 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: 28rpx; font-weight: bold;">
${Number(slotProps.row.activityPrice).toFixed(2)}
</text>
<text
style="color: #8a8a8a; font-size: 22rpx; margin-left: 4px; font-weight: bold; text-decoration: line-through;"
>
${Number(slotProps.row.price).toFixed(2)}
</text>
`;
} else {
return `<span style="color: #e97512;font-size: 28rpx;font-weight: bold;">
${Number(slotProps.row.price).toFixed(2)}</span>
`;
}
},
// 放大图片
previewImage(url) {
console.log(url);

View File

@@ -9,8 +9,7 @@
</view>
</z-nav-bar>
<view class="cateList">
<view class="labels_block" v-if="id!=75&&labelsList.length>0">
<!-- <view class="labels_block" v-if="labelsList.length>0" :style="`top: ${45 + statusBarHeight}px;`"> -->
<view class="labels_block" v-if="labelsList.length>0" :style="`top: ${45 + statusBarHeight}px;`">
<view class="labels_item"
:style="{ width: labelsList.length > 0 ? `${100 / labelsList.length}%` : '100%' }"
v-for="(tabData,tabIndex) in labelsList" :key="tabIndex"
@@ -54,7 +53,7 @@
<text v-if="statusNull" class="text_null">暂无数据</text>
</view>
<view class="xlcp_block" :class="XL_id==78?'xlcp_block_2':''" v-if="statusXLCP" style=" margin-top: 0;">
<view class="xlcp_block" :class="XL_id==78?'xlcp_block_2':''" v-if="statusXLCP">
<view class="form_block" v-if="XL_id==77">
<view class="form_item" v-for="(item,index) in formList" :key="index">
<text class="form_title">{{item.title}}</text>

View File

@@ -153,7 +153,7 @@
</span>
<span>¥</span>{{ orderContet.shippingMoney }}
</view>
<!-- <view class="orderReal" v-if="orderContet.orderType == 'order'&&orderContet.vipDiscountAmount&&orderContet.vipDiscountAmount>0">
<view class="orderReal" v-if="orderContet.orderType == 'order'&&orderContet.vipDiscountAmount&&orderContet.vipDiscountAmount>0">
<span style="color: red; margin-right: 10rpx; float: left;">VIP专享立减 :
</span>
<span style=" color: red;">-¥{{orderContet.vipDiscountAmount}}</span>
@@ -162,18 +162,76 @@
<span style="color: red; margin-right: 10rpx; float: left;">活动立减 :
</span>
<span style=" color: red;">-¥{{orderContet.districtMoney}}</span>
</view> -->
<view class="orderReal" v-if="orderContet.orderType == 'order'">
<span style="color: #666; margin-right: 10rpx; float: left">积分 :
</span>
<span v-if="orderContet.jfDeduction > 0">-</span> <span>¥</span>{{ orderContet.jfDeduction }}
</view>
</view>
<view class="orderReal" v-if="orderContet.jfDeduction > 0">
<span style="color: #666; margin-right: 10rpx; float: left"
>积分抵扣:
</span>
<span style="color: #fa2d12" v-if="orderContet.jfDeduction > 0"
>-&nbsp;&nbsp;</span
>
<span style="color: #fa2d12"> {{ orderContet.jfDeduction }}</span>
</view>
<view
class="orderReal"
v-if="orderContet.paymentMethod == 4 && orderContet.realMoney > 0"
>
<span style="color: #666; margin-right: 10rpx; float: left"
>天医币抵扣:
</span>
<span style="color: #fa2d12">-&nbsp;&nbsp;</span>
<span style="color: #fa2d12">¥{{ orderContet.realMoney }}</span>
</view>
<view class="orderReal" v-if="orderContet.orderStatus != 0">
<span style="color: #666; margin-right: 10rpx; float: left">
实付款 :
实付款:
</span>
<b style="color: red;"><span>¥</span>{{ orderContet.realMoney }}</b>
<b v-if="orderContet.orderType == 'point'" style="color: #dd3c0c"
>¥ {{ orderContet.bookBuyConfigEntity.realMoney }}</b
>
<b style="color: #dd3c0c" v-else>
<template v-if="orderContet.realMoney > 0&&orderContet.jfDeduction>0">
¥{{ orderContet.realMoney }}
<text style="font-size: 24rpx;margin-left: 10rpx;">
<span
style=""
v-if="orderContet.paymentMethod == 1"
>微信支付</span
>
<span
style=""
v-if="orderContet.paymentMethod == 2"
>支付宝支付</span
>
<span
style=""
v-if="orderContet.paymentMethod == 3"
>苹果支付</span
>
<span
style=""
v-if="orderContet.paymentMethod == 4"
>
天医币支付
</span>
</text>
</template>
<template v-if="orderContet.realMoney == 0&&orderContet.jfDeduction==0">¥0</template>
<text
style="margin: 0 4rpx"
v-if="
orderContet.realMoney > 0 && orderContet.jfDeduction > 0
"
>
+
</text>
<text v-if="orderContet.jfDeduction > 0"
>{{ orderContet.jfDeduction }} 积分</text
>
</b>
</view>
<view class="orderReal" v-if="orderContet.remark">
<span style="color: #666; margin-right: 10rpx; float: left">

View File

@@ -13,7 +13,7 @@
<view class="goods_box">
<view class="curriulum_title_box">
<view v-if="this.options.isMiaosha == 1" class="miaosha_box">
<!-- <view class="price_box"
<view class="price_box"
v-if="curriculumData.isVipPrice==1&&curriculumData.vipPrice!=null&&curriculumData.vipPrice!=0
||curriculumData.activityPrice && curriculumData.activityPrice > 0">
<view class="price_left">
@@ -44,8 +44,8 @@
</text>
<text class="xianshimaiosha" v-else-if="curriculumData.activityPrice && curriculumData.activityPrice > 0">活动立减</text>
</view>
</view> -->
<view class="putong">
</view>
<view class="putong" v-else>
<template>
<text class="aui-text-danger price">
¥{{ curriculumData.price }}

View File

@@ -27,14 +27,14 @@
<view class="order_top common_radius_box color_shandow goods_box">
<view class="curriulum_title_box goods_item" style=" position: relative;" v-for="(v, i) in goodsDataList">
<!-- <text class="goods_item_vip" v-if="v.isVipPrice==1&&v.vipPrice!=null&&v.vipPrice!=0">VIP优惠</text> -->
<text class="goods_item_vip" v-if="v.isVipPrice==1&&v.vipPrice!=null&&v.vipPrice!=0">VIP优惠</text>
<image class="goods_item_img" :src="v.productImages" mode="aspectFit">
</image>
<view class="normal_box">
<view class="normal_box_top">
<view class="curriulum_title">{{ v.productName }} </view>
<view class="price_box">
<!-- <view class="vip_price" v-if="v.isVipPrice==1&&v.vipPrice!=null&&v.vipPrice!=0">
<view class="vip_price" v-if="v.isVipPrice==1&&v.vipPrice!=null&&v.vipPrice!=0">
<text class="vip_price_jg">{{ v.vipPrice }}</text>
<text class="vip_price_text">VIP到手价</text>
<text class="vip_price_line">{{ v.price }}</text>
@@ -43,8 +43,8 @@
<text class="vip_price_jg">{{ v.activityPrice }}</text>
<text class="vip_price_text">活动价</text>
<text class="vip_price_line">{{ v.price }}</text>
</text> -->
<text>{{ v.price }}</text>
</text>
<text v-else>{{ v.price }}</text>
<view>
x 1
@@ -92,13 +92,13 @@
<text style="color: #aaa; margin-left: 10rpx">
(全部积分{{ initData.user.jf }})</text>
</template>
<!-- <template v-else-if="v.type == 5">
<template v-else-if="v.type == 5">
<text class="type_text_red">活动立减</text>
</template>
<template v-else-if="v.type == 6">
<text class="type_text_red">VIP专享立减</text>
</template> -->
</template>
<text v-else>{{ v.text }}</text>
</view>
<view class="right">
@@ -110,12 +110,12 @@
<template v-if="v.type == 3">
<text style="color: #fe6035"> -{{ jfNumberShow }}</text>
</template>
<!-- <template v-if="v.type == 5">
<template v-if="v.type == 5">
<text class="type_text_red">-{{districtAmount}}</text>
</template>
<template v-if="v.type == 6">
<text class="type_text_red">-{{vipPrice}}</text>
</template> -->
</template>
</view>
</view>
@@ -149,7 +149,7 @@
<text v-else> {{ v.text }}</text>
</view>
<template v-if="isDefaultCurrency">
<radio :value="v.value" color="#7dc1f0"
<radio :value="v.value" color="#7dc1f0" v-if="i == 2"
:checked="selectPayIndex == i ? true : false" @click="radioChange(i)" size="10" />
</template>
<template v-else>
@@ -213,10 +213,19 @@
<common-goods-nav :iconList="[]" :customButton="customButton" @submit="goBuyJie">
<!-- leftSlot -->
<template slot="leftSlot" slot-scope="slotProps">
<view class="price_box order_bottom_box"><text class="number">{{ number }}</text>
<text class="price">合计
<text class="total">{{ actualPayment }}</text>
<view class="price_box order_bottom_box">
<text class="price">合计:
<text class="total">
<template v-if="actualPayment>0">
{{ Number(actualPayment).toFixed(2) }}
</template>
<text style="margin: 0 4rpx;" v-if="actualPayment>0&&jfNumber>0">
+
</text>
<text v-if="jfNumber>0">{{ jfNumber }} 积分</text>
</text>
</text>
</view>
</template>
@@ -269,21 +278,32 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
isDefaultCurrency: {
immediate: true,
handler(newRoute) {
if (this.isDefaultCurrency) {
if (platform == "ios") {
this.selectPayIndex = 0;
} else {
this.selectPayIndex = 0;
}
} else {
if (platform == "ios") {
this.selectPayIndex = 0;
} else {
this.selectPayIndex = 0;
}
}
this.payType = this.payList[this.selectPayIndex].type;
this.$forceUpdate();
if (this.isDefaultCurrency) {
if (platform == "ios") {
this.selectPayIndex = 0;
} else {
this.selectPayIndex = 0;
}
} else {
if (platform == "ios") {
this.selectPayIndex = 0;
} else {
this.selectPayIndex = 0;
}
}
this.payType = this.payList[this.selectPayIndex].type;
if (this.actualPayment == 0) {
var that = this;
this.payList.forEach((e, i) => {
if (e.type == 4) {
that.selectPayIndex = i;
that.payType = 4;
}
});
this.$forceUpdate();
}
this.$forceUpdate();
},
},
},
@@ -370,7 +390,7 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
freightNum: "book/buyOrder/calculateTransportPrice", //运费
},
customButton: [{
width: "340rpx",
width: "300rpx",
text: "立即支付",
backgroundColor: "linear-gradient(90deg, #294a97 0%, #7dc1f0 80%)",
color: "#fff",
@@ -558,12 +578,21 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
this.jfNumberShow = this.jfNumber.toFixed(2);
}
this.actualPayment = this.totalPrice - this.jfNumber + this.freightNum;
this.actualPayment = this.totalPrice - this.jfNumber - this.vipPrice - this.districtAmount + this.freightNum;
// 如果实际支付金额为0设置支付方式为默认货币
if (this.actualPayment == 0) {
this.isDefaultCurrency = true;
console.log("this.actualPayment at line 1097:", this.actualPayment);
this.isDefaultCurrency = true;
this.payList.forEach((e, i) => {
if (e.type == 4) {
this.selectPayIndex = i;
this.payType = 4;
}
});
this.$forceUpdate();
} else {
this.isDefaultCurrency = false;
this.isDefaultCurrency = false;
}
this.$forceUpdate();
});
@@ -597,17 +626,17 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
},
];
//如果是活动
// if(this.goodsDataList[0].activityPrice&&this.goodsDataList[0].activityPrice>0&&!this.goodsDataList[0].vipPrice>0){
// this.priceBreakdownList.push({
// type: 5,
// })
// }
// //如果是vip
// if(this.goodsDataList[0].isVipPrice==1&&this.goodsDataList[0].vipPrice!=null&&this.goodsDataList[0].vipPrice!=0){
// this.priceBreakdownList.push({
// type: 6,
// })
// }
if(this.goodsDataList[0].activityPrice&&this.goodsDataList[0].activityPrice>0&&!this.goodsDataList[0].vipPrice>0){
this.priceBreakdownList.push({
type: 5,
})
}
//如果是vip
if(this.goodsDataList[0].isVipPrice==1&&this.goodsDataList[0].vipPrice!=null&&this.goodsDataList[0].vipPrice!=0){
this.priceBreakdownList.push({
type: 6,
})
}
var data = {
uid: this.userInfo.id,
@@ -753,8 +782,8 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
if (!this.isShowAddress) {
if (this.initData.user.jf >= that.totalPrice) {
this.jfNumber = that.totalPrice;
this.jfNumberMax = that.totalPrice;
this.jfNumber = that.totalPrice - that.vipPrice - that.districtAmount;
this.jfNumberMax = that.totalPrice - that.vipPrice - that.districtAmount;
} else {
this.jfNumber = this.initData.user.jf;
this.jfNumberMax = this.initData.user.jf;
@@ -766,23 +795,13 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
that.jfNumberShow = that.jfNumber.toFixed(2);
that.actualPayment = that.totalPrice - that.jfNumber;
}
that.actualPayment = that.actualPayment + that.freightNum;
that.actualPayment = that.actualPayment + that.freightNum - that.vipPrice- that.districtAmount;
} else {
that.actualPayment = that.totalPrice + that.freightNum;
that.actualPayment = that.totalPrice + that.freightNum - that.vipPrice - that.districtAmount;
}
if (this.actualPayment == 0 && !this.isShowAddress) {
this.isDefaultCurrency = true;
this.payList = [
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
];
this.selectPayIndex = 0;
this.payType = 4;
this.isDefaultCurrency = true;
} else {
this.isDefaultCurrency = false;
}
@@ -1212,9 +1231,8 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
.price {
width: auto;
font-size: 30rpx;
font-size: 28rpx;
font-weight: 600;
float: right;
margin-right: 10rpx;
color: #333;
}
@@ -1378,7 +1396,6 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
.number {
font-size: 26rpx;
margin-right: 15rpx;
margin-top: 5rpx;
}
.price {
@@ -1395,7 +1412,6 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
width: calc(100% - 220rpx);
height: auto;
position: relative;
// overflow: hidden;
}
}
@@ -1409,6 +1425,7 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
.order_bottom_box {
display: flex;
align-items: center;
justify-content: center;
}
.pay_box {

View File

@@ -37,13 +37,22 @@
</view>
<view class="cate_box">
<scroll-view scroll-x="true">
<view class="cate_list" v-if="cateList.length>0">
<view class="cate_list" v-if="$platform!='android'&&cateList.length>0">
<view class="cate_item_box" v-if="item.id!=75" v-for="(item, index) in cateList" @click="handleClickCate(item)">
<view class="cate_item_border">
<image :src="item.icon"></image>
</view>
<view class="cate_item_name" v-if="index==2">心身健康科学</view>
<view class="cate_item_name" v-else>{{ item.title }}</view>
</view>
</view>
<view class="cate_list" v-if="$platform=='android'&&cateList.length>0">
<view class="cate_item_box" v-for="(item, index) in cateList" @click="handleClickCate(item)">
<view class="cate_item_border">
<image :src="item.icon"></image>
</view>
<view class="cate_item_name" v-if="$platform!='android'&&index==2">心身健康科学</view>
<view class="cate_item_name" v-else>{{ item.title }}</view>
<view class="cate_item_name">{{ item.title }}</view>
</view>
</view>
</scroll-view>
@@ -66,7 +75,7 @@
<view class="miaosha_list">
<view class="miaosha_item" @click="goGoodsDetail(v)"
v-for="(v, i) in seckillLst">
<!-- <text class="miaosha_youhui" v-if="$platform=='android'&&v.isVipPrice==1&&v.vipPrice!=null&&v.vipPrice!=0">VIP优惠</text> -->
<text class="miaosha_youhui" v-if="v.isVipPrice==1&&v.vipPrice!=null&&v.vipPrice!=0">VIP优惠</text>
<image class="book_image" :src="v.productImages" mode="aspectFit"></image>
<view class="book_name">{{ v.productName }}</view>
</view>

View File

@@ -23,7 +23,7 @@
</view>
<view class="userInfoBox">
<view class="name">{{ userMes.nickname ? userMes.nickname : "未设置" }}</view>
<!-- <view class="phone" v-if="userMes.tel">手机号({{ userMes.tel }})</view> -->
<view class="phone" v-if="userMes.tel&&$platform=='android'">手机号({{ userMes.tel }})</view>
<view class="vip_type" v-if="$platform=='android'&&textList.length>0">
<view class="vip_type_item" v-for="(item,index) in textList" :key="index">
{{item}}<image src="@/static/icon/chao_vip.png"></image>

View File

@@ -115,7 +115,8 @@
font-weight: 700;
">
<text style="font-size: 20rpx"></text>
{{item2.product.price ? item2.product.price : ""}}
<text v-if="item2.product.price>=0">{{item2.product.price}}</text>
</view>
</view>
<view class="btns flexbox" style="margin-top: 10rpx">
@@ -138,67 +139,64 @@
</view>
<view style="margin-top: 10rpx; overflow: hidden">
<view class="btns flexbox" style="float: right; width: auto !important">
<view class="right flexbox opbtns" style="
width: auto;
line-height: 44rpx;
letter-spacing: 1rpx;
display: flex;
align-items: center;
">
<view style="
line-height: 46rpx;
color: #000;
font-size: 28rpx;
font-weight: 500;
margin-right: 10rpx;
">实付款</view>
<view style="
line-height: 46rpx;
color: #333;
font-size: 30rpx;
font-weight: 700;
">
<text style="font-size: 20rpx"></text>
{{ slotProps.row.realMoney || slotProps.row.realMoney == 0 ? slotProps.row.realMoney: "" }}
</view>
</view>
</view>
<view class="btns flexbox" style="
margin-top: 0rpx;
float: right;
width: auto;
margin-left: 20rpx;"
v-if="
(slotProps.row.addressId == 0 ||
slotProps.row.addressId == null) &&
slotProps.row.orderType == 'order' &&
slotProps.row.jfDeduction > 0
">
<view class="right flexbox opbtns" style="
line-height: 44rpx;
letter-spacing: 1rpx;
display: flex;
align-items: center;
"><text style="color: #9b9b9b"> </text>
<view style="
line-height: 46rpx;
color: #9b9b9b;
font-size: 24rpx;
font-weight: 500;
margin-right: 10rpx;
">积分抵扣</view>
<view style="
line-height: 46rpx;
color: #9b9b9b;
font-size: 26rpx;
font-weight: 700;
">
<text style="font-size: 20rpx">¥</text>
{{ slotProps.row.jfDeduction }}
</view>
</view><text style="color: #9b9b9b"></text>
</view>
<view
class="btns flexbox"
style="float: right; width: auto !important"
>
<view
class="right flexbox opbtns"
style="
width: auto;
line-height: 44rpx;
letter-spacing: 1rpx;
display: flex;
align-items: center;
"
>
<view
style="
line-height: 46rpx;
color: #000;
font-size: 28rpx;
font-weight: 500;
margin-right: 10rpx;
"
>实付款</view
>
<view
style="
line-height: 46rpx;
color: #333;
font-size: 30rpx;
font-weight: 700;
"
>
<text v-if="slotProps.row.orderType == 'point'">
{{ slotProps.row.bookBuyConfigEntity.realMoney }}
</text>
<text v-if="slotProps.row.orderType != 'point'">
<text v-if="slotProps.row.realMoney && slotProps.row.realMoney > 0">
{{ slotProps.row.realMoney }}
</text>
<text v-if="slotProps.row.realMoney==0&&slotProps.row.jfDeduction==0">
0
</text>
<text
style="margin: 0 4rpx"
v-if="
slotProps.row.realMoney > 0 &&
slotProps.row.jfDeduction > 0
"
>
+
</text>
</text>
<text v-if="slotProps.row.jfDeduction > 0">{{ slotProps.row.jfDeduction }} 积分</text>
</view>
</view>
</view>
</view>
<view class="operation_box boxShadow" v-if="slotProps.row.isShowMore == true">

View File

@@ -42,7 +42,7 @@
</view>
</view>
<view class="right">
<u-icon @click="toLogin()" class="editIcon" name="shopping-cart-fill"
<u-icon class="editIcon" name="shopping-cart-fill"
color="#FF2B57" size="30"
style="display: inline-block; margin-left: 10rpx"></u-icon>
</view>
@@ -56,8 +56,7 @@
<view class="shiting_content">
<view class="catalogueList">
<view class="chapter_content">
<courseDescription :isCondition="true" :dataList="slotProps.dataList"
@hancleClick="toLogin()" label="title">
<courseDescription :isCondition="true" :dataList="slotProps.dataList" label="title">
<template slot="labelSlot" slot-scope="slotProps">
<view :style="`${
slotProps.row.isAudition==1
@@ -218,21 +217,6 @@
});
return list;
},
//登录
toLogin(){
uni.showModal({
title: '提示',
content: '为了方便您后期用不同的设备查阅订购的记录,请先完成登录或注册。',
confirmText: '确认',
success(res){
if (res.confirm) {
uni.navigateTo({
url: '/pages/user/login'
})
}
}
})
}
}
};
</script>

View File

@@ -5,7 +5,7 @@
<view class="cate_box">
<scroll-view scroll-x="true">
<view class="cate_list" v-if="cateList.length>0">
<view class="cate_item_box" v-for="(item, index) in cateList" @click="handleClickCate(item)">
<view class="cate_item_box" v-if="item.id!=75" v-for="(item, index) in cateList" @click="handleClickCate(item)">
<view class="cate_item_border">
<image :src="item.icon"></image>
</view>
@@ -258,7 +258,7 @@ export default {
align-items: center;
.cate_item_box {
width: 20%;
width: 25%;
padding: 40rpx 0 30rpx;
text-align: center;

View File

@@ -12,7 +12,7 @@
<view class="list_item_title">{{item.title}}</view>
<view class="list_item_content" v-html="item.content"></view>
<view class="list_item_bt">
<text class="list_item_study" @click="toLogin()">了解课程</text>
<text class="list_item_study">了解课程</text>
</view>
</view>
</view>
@@ -20,7 +20,7 @@
</view>
<view class="xlcp_block" v-if="statusXLCP">
<view class="level_block" @click="toLogin()">
<view class="level_block">
<view class="level_item">自恋型人格障碍诊断标准</view>
</view>
</view>
@@ -44,13 +44,13 @@ export default {
},
onLoad(options) {
this.title = options.title;
this.id = options.id;
//如果是心理评测
if(this.id==75){
this.statusXLCP = true;
this.getData();
//针对身心医学的判断
if(options.title=='心身医学'){
this.title = '心身健康科学'
}else{
this.getData();
this.title = options.title;
}
},
methods: {
@@ -74,20 +74,6 @@ export default {
this.statusNull = true;
}
});
},
toLogin(){
uni.showModal({
title: '提示',
content: '为了方便您后期用不同的设备查阅订购的记录,请先完成登录或注册。',
confirmText: '确认',
success(res){
if (res.confirm) {
uni.navigateTo({
url: '/pages/user/login'
})
}
}
})
}
}
};

View File

@@ -1,10 +1,6 @@
<template>
<view class="commonPage commonPageBox">
<view class="bg_top">
<u-icon @click="goSetting()" class="setIcon" labelColor="#294a97" labelPos="bottom" label="设置" name="setting"
:style="`top:${(20 + statusBarHeight) * 2}rpx`" color="#294a97" size="22"></u-icon>
</view>
<view class="mine_box" :style="`top:${(80 + statusBarHeight) * 2}rpx`">
<view class="per_mes">
<view class="per_mes_user">

View File

@@ -313,7 +313,7 @@ export default {
quantity: 1,
manualFinishTransaction: true, // 3.5.1+ 支持,设置此参数后需要开发者主动关闭订单,参见下面的关闭订单方法 finishTransaction()
}
this.transaction = await this.requestPayment(orderInfo)
that.transaction = await that.requestPayment(orderInfo)
},
iapCheck(result) {
let that = this;
@@ -323,8 +323,8 @@ export default {
productId: result.payment.productid.slice(1), // 产品id
orderId: result.payment.username, // 系统订单号
receiptData: result.transactionReceipt, // 苹果返回收据
//sandBox: true, //测试数据
//body: that.stepsCj.priceTypeId // 充值类型id
// sandBox: true, //测试数据
// body: that.stepsCj.priceTypeId // 充值类型id
};
$http
.request({
@@ -337,7 +337,7 @@ export default {
})
.then((res) => {
if (res.code == 0) {
this.transaction = null
that.transaction = null
uni.hideLoading()
uni.showToast({
title: '充值成功!',