This commit is contained in:
2025-03-13 09:42:15 +08:00
parent 59823a2ca1
commit d49f771baf
14 changed files with 516 additions and 364 deletions

View File

@@ -37,51 +37,75 @@
<view class="goods_box">
<view class="curriulum_title_box">
<view v-if="this.options.isMiaosha == 1" class="miaosha_box">
<view v-if="(curriculumData.isVipPrice == 1 &&
curriculumData.vipPrice != 0 &&
curriculumData.vipPrice != null)|| curriculumData.activityPrice &&
curriculumData.activityPrice > 0" class="miaosha_box">
<view class="price_box">
<view class="price_left">
<template
v-if="
curriculumData.activityPrice &&
curriculumData.activityPrice > 0
"
<view class="price_left" v-if="curriculumData">
<text
class="price"
v-if="
curriculumData.isVipPrice == 1 &&
curriculumData.vipPrice != 0 &&
curriculumData.vipPrice != null
"
>
<text
>¥{{ curriculumData.vipPrice.toFixed(2) }}</text
>
<text class="aui-text-danger price">
¥{{ curriculumData.activityPrice }}
</text>
<text class="price original_price"
>原价:¥{{ curriculumData.price }}
</text>
</template>
<template v-else>
<text class="aui-text-danger price">
¥{{ curriculumData.price }}
</text>
</template>
<!-- <text style="color: #fa2d12; font-size: 10px; margin-left: 4px"
>VIP到手价</text
> -->
<text
style="
color: #8a8a8a;
font-size: 14px;
margin-left: 4px;
font-weight: bold;
text-decoration: line-through;
"
>¥{{ Number(curriculumData.price).toFixed(2) }}</text
>
</text>
<text
v-else-if="curriculumData.activityPrice && curriculumData.activityPrice > 0"
class="price"
>
<text
>¥{{ curriculumData.activityPrice.toFixed(2) }}</text
>
<!-- <text style="color: #613804; font-size: 10px; margin-left: 4px"
>活动价</text
> -->
<text
style="
color: #8a8a8a;
font-size: 14px;
margin-left: 4px;
font-weight: bold;
text-decoration: line-through;
"
>¥{{ Number(curriculumData.price).toFixed(2) }}</text
>
</text>
<text v-else-if="curriculumData&&curriculumData.price>0" class="price"
>¥{{ Number(curriculumData.price).toFixed(2) }}</text
>
<view class="price original_price sales_number"
>已售 {{ curriculumData.sumSales }}件
</view>
</view>
<view class="xianshimaiosha_box">
<text
class="xianshimaiosha"
v-if="
curriculumData.isVipPrice == 1 &&
curriculumData.vipPrice != 0 &&
curriculumData.vipPrice != null
"
>VIP优惠</text
>
<text
class="xianshimaiosha"
v-else-if="
curriculumData.activityPrice &&
curriculumData.activityPrice > 0
"
>活动立减</text
>
<view class="xianshimaiosha_box" >
<text class="xianshimaiosha" v-if="curriculumData.isVipPrice == 1 &&
curriculumData.vipPrice != 0 &&
curriculumData.vipPrice != null">VIP优惠</text>
<text class="xianshimaiosha" v-else-if=" curriculumData.activityPrice &&
curriculumData.activityPrice > 0">活动立减</text>
</view>
</view>
@@ -89,7 +113,12 @@
>{{ curriculumData.productName }}
</view>
</view>
<view v-else class="normal_box">
<view
v-else
class="normal_box"
style="padding-top: 10rpx; padding-bottom: 10rpx"
>
<view class="price_box">
<template
v-if="
@@ -104,9 +133,9 @@
>原价:¥{{ curriculumData.price }}
</text>
</template>
<template v-else>
<template v-else-if="curriculumData.price">
<text class="aui-text-danger price">
¥{{ curriculumData.price }}
¥{{ Number(curriculumData.price).toFixed(2) }}
</text>
</template>
<text
@@ -116,7 +145,7 @@
</text>
</view>
<view class="curriulum_title" style="margin-top: 40rpx"
<view class="curriulum_title" style="margin-top: 20rpx"
>{{ curriculumData.productName }}
</view>
</view>

View File

@@ -87,21 +87,12 @@
<image class="goods_item_img" :src="v.productImages" mode="aspectFit">
</image>
<view class="normal_box">
<view class="normal_box_top" style="justify-content: space-between">
<view class="normal_box_top" style="height: auto;min-height: 100rpx;">
<view
class="curriulum_title"
style="width: calc(100% - 160rpx); font-size: 14px"
style="width: calc(100%); font-size: 14px"
>{{ v.productName }}
</view>
<u-number-box
:min="1"
:input-width="30"
v-model="orderNumber"
button-size="20"
></u-number-box>
</view>
<view>
<view>
<text
v-if="
v.isVipPrice == 1 && v.vipPrice != 0 && v.vipPrice != null
@@ -147,7 +138,20 @@
<text v-else style="font-size: 14px"
>¥{{ Number(v.price).toFixed(2) }}</text
>
</view> </view>
<!-- <uni-number-box
:min="1"
:step="1"
:positive-integer="true"
:input-width="30"
v-model="orderNumber"
button-size="20"
input-type="number"
/> -->
</view>
<uni-number-box v-model="orderNumber" :step="1" :min="1" :width="18" style="float: right;"/>
</view>
</view>
<view class="pay_box" style="margin-top: 20rpx">
@@ -455,7 +459,7 @@
<!-- leftSlot -->
<template slot="leftSlot" slot-scope="slotProps">
<view class="price_box order_bottom_box"
><text class="number">共{{ number }}件</text>
><text class="number">共{{ orderNumber }}件</text>
<text class="price"
>合计:
@@ -689,7 +693,7 @@ export default {
},
customButton: [
{
width: "300rpx",
width: "250rpx",
text: "立即支付",
backgroundColor: "linear-gradient(90deg, #3AB3AE 0%, #117e4c 100%)",
color: "#fff",
@@ -872,7 +876,7 @@ export default {
if (res.code == 0) {
console.log(
"res.code at line 53899999999999999999999999999999999:",
res,
res
);
this.vipPrice = res.discountAmount;
// console.log('需要的运费', res.result)
@@ -940,7 +944,7 @@ export default {
this.jfNumber -
this.districtAmount -
this.vipPrice +
this.freightNum,
this.freightNum
).toFixed(2);
if (this.actualPayment == 0) {
@@ -950,7 +954,7 @@ export default {
}
console.log(
"this.isDefaultCurrency at line 692:",
this.isDefaultCurrency,
this.isDefaultCurrency
);
this.$forceUpdate();
});
@@ -1204,22 +1208,21 @@ export default {
} else {
that.jfNumberShow = that.jfNumber.toFixed(2);
that.actualPayment = Number(that.totalPrice - that.jfNumber).toFixed(
2,
2
);
}
that.actualPayment = Number(
that.actualPayment +
that.totalPrice +
that.freightNum -
that.districtAmount -
that.vipPrice,
that.vipPrice
).toFixed(2);
} else {
that.actualPayment = Number(
that.totalPrice +
that.freightNum -
couponAmount -
that.districtAmount -
that.vipPrice,
that.vipPrice
).toFixed(2);
}
@@ -1259,7 +1262,7 @@ export default {
this.orderModalShowInfo = v;
console.log(
"this.orderModalShowInfo at line 727:",
this.orderModalShowInfo,
this.orderModalShowInfo
);
this.orderModalShow = true;
if (this.orderModalShowInfo.type == "remark") {
@@ -1411,7 +1414,7 @@ export default {
// });
// }, 1000)
}
},
}
);
} else if (this.payType == 1) {
// 微信支付
@@ -2420,7 +2423,7 @@ export default {
/deep/.goods_nav_box {
.left {
margin-top: -10rpx;
width: calc(100% - 220rpx);
width: calc(100% - 180rpx);
height: auto;
position: relative;
// overflow: hidden;