1
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
"type" : "uni-app:app-ios"
|
"type" : "uni-app:app-ios"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -136,9 +136,16 @@
|
|||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
style="color: #c0c4cc; font-size: 26rpx; font-weight: 700"
|
style="color: #e97512; font-size: 26rpx; font-weight: 700"
|
||||||
>
|
>
|
||||||
×{{ item.quantity ? item.quantity : "" }}</view
|
<view style="text-align: right;font-size: 30rpx;margin-bottom: 10rpx;">
|
||||||
|
¥{{ item.price }}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view style="text-align: right;color: #333;">
|
||||||
|
×{{ item.quantity ? item.quantity : "" }}
|
||||||
|
</view>
|
||||||
|
</view
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="btns flexbox" style="margin-top: 10rpx">
|
<!-- <view class="btns flexbox" style="margin-top: 10rpx">
|
||||||
@@ -241,10 +248,46 @@
|
|||||||
</span>
|
</span>
|
||||||
<span>¥</span>{{ orderContet.shippingMoney }}
|
<span>¥</span>{{ orderContet.shippingMoney }}
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
|
class="orderReal"
|
||||||
|
v-if="
|
||||||
|
orderContet.orderType == 'order' &&
|
||||||
|
orderContet.districtMoney &&
|
||||||
|
orderContet.districtMoney > 0
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<span style="color: #666; margin-right: 10rpx; float: left">
|
||||||
|
活动立减:
|
||||||
|
</span>
|
||||||
|
<span style="color: #fa2d12"
|
||||||
|
>- ¥{{ orderContet.districtMoney }}</span
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="orderReal"
|
||||||
|
v-if="
|
||||||
|
orderContet.orderType == 'order' &&
|
||||||
|
orderContet.vipDiscountAmount &&
|
||||||
|
orderContet.vipDiscountAmount > 0
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<span style="color: #666; margin-right: 10rpx; float: left">
|
||||||
|
<span
|
||||||
|
style="color: #f94f04; font-weight: bold; margin-right: 2px"
|
||||||
|
>VIP</span
|
||||||
|
>
|
||||||
|
专享立减:
|
||||||
|
</span>
|
||||||
|
<span style="color: #fa2d12"
|
||||||
|
>- ¥{{ orderContet.vipDiscountAmount }}</span
|
||||||
|
>
|
||||||
|
</view>
|
||||||
<view
|
<view
|
||||||
class="orderReal"
|
class="orderReal"
|
||||||
v-if="orderContet.couponId && orderContet.couponId != null"
|
v-if="orderContet.couponId && orderContet.couponId != null"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
<span style="color: #666; margin-right: 10rpx; float: left"
|
<span style="color: #666; margin-right: 10rpx; float: left"
|
||||||
>优惠券 :
|
>优惠券 :
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container commonPageBox commonDetailPage" style="height: auto !important;padding-bottom: 0 !important;">
|
<view
|
||||||
<u-popup :show="show" v-if="show" mode="bottom" @close="close" class="popup_box">
|
class="container commonPageBox commonDetailPage"
|
||||||
|
style="height: auto !important; padding-bottom: 0 !important"
|
||||||
|
>
|
||||||
|
<u-popup
|
||||||
|
:show="show"
|
||||||
|
v-if="show"
|
||||||
|
mode="bottom"
|
||||||
|
@close="close"
|
||||||
|
class="popup_box"
|
||||||
|
>
|
||||||
<view class="popup_top">
|
<view class="popup_top">
|
||||||
<!-- @click="previewImage(selectGoodsData.productImages)" -->
|
<!-- @click="previewImage(selectGoodsData.productImages)" -->
|
||||||
<view class="product_image">
|
<view class="product_image">
|
||||||
@@ -15,7 +24,30 @@
|
|||||||
|
|
||||||
<view :class="`common_radius_box goods_box popup_content`">
|
<view :class="`common_radius_box goods_box popup_content`">
|
||||||
<view class="title title_box"
|
<view class="title title_box"
|
||||||
><text class="title_price">¥{{ selectGoodsData.activityPrice?selectGoodsData.activityPrice:selectGoodsData.price }}</text
|
><text class="title_price"
|
||||||
|
>
|
||||||
|
|
||||||
|
<text v-if="selectGoodsData.isVipPrice==1&&selectGoodsData.vipPrice!=0&&selectGoodsData.vipPrice!=null">
|
||||||
|
<text style="color: #e97512;font-weight: bold;">¥{{(selectGoodsData.vipPrice).toFixed(2)}}</text>
|
||||||
|
<text style="color: #fa2d12;font-size: 12px;margin-left: 4px;">VIP到手价</text>
|
||||||
|
<!-- <text style="color: #8a8a8a;font-size: 10px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">¥{{(selectGoodsData.price).toFixed(2)}}</text> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text
|
||||||
|
v-else-if="selectGoodsData.activityPrice && selectGoodsData.activityPrice > 0">
|
||||||
|
<text style="color: #e97512;font-weight: bold;">¥{{(selectGoodsData.activityPrice).toFixed(2)}}</text>
|
||||||
|
<text style="color: #613804;font-size: 12px;margin-left: 4px;">活动价</text>
|
||||||
|
<!-- <text style="color: #8a8a8a;font-size: 10px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">¥{{(selectGoodsData.price).toFixed(2)}}</text> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text v-else style="color: #e97512;font-weight: bold;"> ¥{{Number(selectGoodsData.price).toFixed(2)}}</text>
|
||||||
|
</text
|
||||||
>
|
>
|
||||||
<u-icon
|
<u-icon
|
||||||
name="close"
|
name="close"
|
||||||
@@ -44,13 +76,16 @@
|
|||||||
<view
|
<view
|
||||||
class="related_courses_name"
|
class="related_courses_name"
|
||||||
:class="`goods_item ${
|
:class="`goods_item ${
|
||||||
!isFudu && selectGoodsData &&
|
(!isFudu &&
|
||||||
selectGoodsData.productId == slotProps.row.productId || isFudu && selectGoodsData.productName == slotProps.row.productName
|
selectGoodsData &&
|
||||||
|
selectGoodsData.productId == slotProps.row.productId) ||
|
||||||
|
(isFudu &&
|
||||||
|
selectGoodsData.productName == slotProps.row.productName)
|
||||||
? 'isSelectGoods color_shandow'
|
? 'isSelectGoods color_shandow'
|
||||||
: ''
|
: ''
|
||||||
}`"
|
}`"
|
||||||
>
|
>
|
||||||
<view class="image_box" style="margin-right: 10rpx; ">
|
<view class="image_box" style="margin-right: 10rpx">
|
||||||
<image
|
<image
|
||||||
:src="slotProps.row.productImages"
|
:src="slotProps.row.productImages"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
@@ -58,17 +93,93 @@
|
|||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view :class="`goods_info flex_box just`" style="justify-content: space-between;">
|
<view :class="`goods_info just`" style="">
|
||||||
<view class="name">{{ slotProps.row.productName }}</view>
|
<view class="name">{{ slotProps.row.productName }}</view>
|
||||||
<view class="flex_box">
|
<view class="flex_box" style="align-items: center;">
|
||||||
<text style="color: #999; text-decoration: line-through; margin-right: 20rpx;"
|
<!-- <text style="color: #999; text-decoration: line-through; margin-right: 20rpx;"
|
||||||
v-if="slotProps.row.activityPrice > 0 && slotProps.row.activityPrice < slotProps.row.price" >¥{{slotProps.row.price}}</text>
|
v-if="slotProps.row.activityPrice > 0 && slotProps.row.activityPrice < slotProps.row.price" >¥{{slotProps.row.price}}</text>
|
||||||
<view class="price" style="color: #258feb"
|
<view class="price" style="color: #258feb"
|
||||||
>¥{{ slotProps.row.activityPrice?slotProps.row.activityPrice:slotProps.row.price }}</view
|
>¥{{ slotProps.row.activityPrice?slotProps.row.activityPrice:slotProps.row.price }}</view
|
||||||
></view
|
></view
|
||||||
>
|
> -->
|
||||||
</view>
|
|
||||||
|
<text
|
||||||
|
class="price"
|
||||||
|
v-if="
|
||||||
|
slotProps.row.isVipPrice == 1 &&
|
||||||
|
slotProps.row.vipPrice != 0 &&
|
||||||
|
slotProps.row.vipPrice != null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
style="color: #e97512; font-size: 12px; font-weight: bold"
|
||||||
|
>¥{{ slotProps.row.vipPrice.toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
<!-- <text style="color: #fa2d12; font-size: 10px; margin-left: 4px"
|
||||||
|
>VIP到手价</text
|
||||||
|
> -->
|
||||||
|
<text
|
||||||
|
style="
|
||||||
|
color: #8a8a8a;
|
||||||
|
font-size: 10px;
|
||||||
|
margin-left: 4px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: line-through;
|
||||||
|
"
|
||||||
|
>¥{{ Number(slotProps.row.price).toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text
|
||||||
|
v-else-if="
|
||||||
|
slotProps.row.activityPrice &&
|
||||||
|
slotProps.row.activityPrice > 0
|
||||||
|
"
|
||||||
|
class="price"
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
style="color: #e97512; font-size: 12px; font-weight: bold"
|
||||||
|
>¥{{ slotProps.row.activityPrice.toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
<!-- <text style="color: #613804; font-size: 10px; margin-left: 4px"
|
||||||
|
>活动价</text
|
||||||
|
> -->
|
||||||
|
<text
|
||||||
|
style="
|
||||||
|
color: #8a8a8a;
|
||||||
|
font-size: 10px;
|
||||||
|
margin-left: 4px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: line-through;
|
||||||
|
"
|
||||||
|
>¥{{ Number(slotProps.row.price).toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text v-else class="price"
|
||||||
|
>¥{{ Number(slotProps.row.price).toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
|
||||||
|
<text
|
||||||
|
v-if="
|
||||||
|
slotProps.row.isVipPrice == 1 &&
|
||||||
|
slotProps.row.vipPrice != 0 &&
|
||||||
|
slotProps.row.vipPrice != null
|
||||||
|
"
|
||||||
|
style="
|
||||||
|
z-index: 10;
|
||||||
|
|
||||||
|
margin-left: 10rpx;
|
||||||
|
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #f94f04;
|
||||||
|
|
||||||
|
font-weight: bold;
|
||||||
|
"
|
||||||
|
>VIP优惠</text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
||||||
@@ -109,7 +220,7 @@ export default {
|
|||||||
"selectGoodsData",
|
"selectGoodsData",
|
||||||
"customButtonGroup1",
|
"customButtonGroup1",
|
||||||
"buyOptions",
|
"buyOptions",
|
||||||
"isFudu", // 是否复读
|
"isFudu", // 是否复读
|
||||||
],
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -166,7 +277,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import '@/style/mixin.scss';
|
@import "@/style/mixin.scss";
|
||||||
.goods_item {
|
.goods_item {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -199,9 +310,9 @@ export default {
|
|||||||
// padding: 10rpx 20rpx;
|
// padding: 10rpx 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// height: 100rpx;
|
// height: 100rpx;
|
||||||
display: flex;
|
// display: flex;
|
||||||
align-items: center;
|
// align-items: center;
|
||||||
justify-content: space-between;
|
// justify-content: space-between;
|
||||||
float: left;
|
float: left;
|
||||||
.name {
|
.name {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
|||||||
@@ -273,17 +273,92 @@
|
|||||||
<view class="list supermarketBox">
|
<view class="list supermarketBox">
|
||||||
<scroll-view class="scroll-view_H" scroll-x="true">
|
<scroll-view class="scroll-view_H" scroll-x="true">
|
||||||
<view class="item" v-for="(item, index) in tjProList" :key="index" @click="goToGoodsList(item)">
|
<view class="item" v-for="(item, index) in tjProList" :key="index" @click="goToGoodsList(item)">
|
||||||
<view class="imgcontainer">
|
<view class="imgcontainer" style="position: relative;">
|
||||||
|
|
||||||
|
<view v-if="item.isVipPrice==1&&item.vipPrice!=0&&item.vipPrice!=null"
|
||||||
|
style="z-index:10;position: absolute;top: 10rpx;left: 10rpx;text-align: center;font-size: 22rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 120rpx; padding:4px;box-sizing: border-box;">
|
||||||
|
VIP优惠</view>
|
||||||
<image :src="item.productImages" mode="aspectFit"></image>
|
<image :src="item.productImages" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
{{ item.productName }}
|
{{ item.productName }}
|
||||||
</view>
|
</view>
|
||||||
|
<text
|
||||||
|
class="price"
|
||||||
|
v-if="
|
||||||
|
item.isVipPrice == 1 &&
|
||||||
|
item.vipPrice != 0 &&
|
||||||
|
item.vipPrice != null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
style="color: #e97512; font-size: 12px; font-weight: bold"
|
||||||
|
>¥{{ item.vipPrice.toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
<!-- <text style="color: #fa2d12; font-size: 10px; margin-left: 4px"
|
||||||
|
>VIP到手价</text
|
||||||
|
> -->
|
||||||
|
<text
|
||||||
|
style="
|
||||||
|
color: #8a8a8a;
|
||||||
|
font-size: 10px;
|
||||||
|
margin-left: 4px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: line-through;
|
||||||
|
"
|
||||||
|
>¥{{ Number(item.price) }}</text
|
||||||
|
>
|
||||||
|
</text>
|
||||||
|
|
||||||
<view class="price" v-if="item.activityPrice && item.activityPrice > 0">
|
<text
|
||||||
|
v-else-if="item.activityPrice && item.activityPrice > 0"
|
||||||
|
class="price"
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
style="color: #e97512; font-size: 12px; font-weight: bold"
|
||||||
|
>¥{{ item.activityPrice }}</text
|
||||||
|
>
|
||||||
|
<!-- <text style="color: #613804; font-size: 10px; margin-left: 4px"
|
||||||
|
>活动价</text
|
||||||
|
> -->
|
||||||
|
<text
|
||||||
|
style="
|
||||||
|
color: #8a8a8a;
|
||||||
|
font-size: 10px;
|
||||||
|
margin-left: 4px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: line-through;
|
||||||
|
"
|
||||||
|
>¥{{ Number(item.price)}}</text
|
||||||
|
>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text v-else class="price" style="color: #e97512 !important;"
|
||||||
|
>¥{{ Number(item.price) }}</text
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- <text
|
||||||
|
v-if="
|
||||||
|
item.isVipPrice == 1 &&
|
||||||
|
item.vipPrice != 0 &&
|
||||||
|
item.vipPrice != null
|
||||||
|
"
|
||||||
|
style="
|
||||||
|
z-index: 10;
|
||||||
|
|
||||||
|
margin-left: 10rpx;
|
||||||
|
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #f94f04;
|
||||||
|
|
||||||
|
font-weight: bold;
|
||||||
|
"
|
||||||
|
>VIP优惠</text
|
||||||
|
> -->
|
||||||
|
<!-- <view class="price" v-if="item.activityPrice && item.activityPrice > 0">
|
||||||
¥{{ item.activityPrice }}
|
¥{{ item.activityPrice }}
|
||||||
</view>
|
</view>
|
||||||
<view class="price" v-else> ¥{{ item.price }} </view>
|
<view class="price" v-else> ¥{{ item.price }} </view> -->
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -32,35 +32,76 @@
|
|||||||
|
|
||||||
<view class="goods_box">
|
<view class="goods_box">
|
||||||
<view class="curriulum_title_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_box">
|
||||||
<view class="price_left">
|
<view class="price_left" v-if="curriculumData">
|
||||||
<template
|
|
||||||
v-if="
|
<text
|
||||||
curriculumData.activityPrice &&
|
class="price"
|
||||||
curriculumData.activityPrice > 0
|
v-if="
|
||||||
"
|
curriculumData.isVipPrice == 1 &&
|
||||||
|
curriculumData.vipPrice != 0 &&
|
||||||
|
curriculumData.vipPrice != null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
>¥{{ curriculumData.vipPrice.toFixed(2) }}</text
|
||||||
>
|
>
|
||||||
<text class="aui-text-danger price">
|
<!-- <text style="color: #fa2d12; font-size: 10px; margin-left: 4px"
|
||||||
¥{{ curriculumData.activityPrice }}
|
>VIP到手价</text
|
||||||
</text>
|
> -->
|
||||||
<text class="price original_price"
|
<text
|
||||||
>原价:¥{{ curriculumData.price }}
|
style="
|
||||||
</text>
|
color: #8a8a8a;
|
||||||
</template>
|
font-size: 14px;
|
||||||
<template v-else>
|
margin-left: 4px;
|
||||||
<text class="aui-text-danger price">
|
font-weight: bold;
|
||||||
¥{{ curriculumData.price }}
|
text-decoration: line-through;
|
||||||
</text>
|
"
|
||||||
</template>
|
>¥{{ 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"
|
<view class="price original_price sales_number"
|
||||||
>已售 {{ curriculumData.sumSales }}件
|
>已售 {{ curriculumData.sumSales }}件
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="xianshimaiosha_box">
|
<view class="xianshimaiosha_box" >
|
||||||
<text class="xianshimaiosha">秒杀商品</text>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -68,6 +109,7 @@
|
|||||||
>{{ curriculumData.productName }}
|
>{{ curriculumData.productName }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
v-else
|
v-else
|
||||||
class="normal_box"
|
class="normal_box"
|
||||||
@@ -87,9 +129,9 @@
|
|||||||
>原价:¥{{ curriculumData.price }}
|
>原价:¥{{ curriculumData.price }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else-if="curriculumData.price">
|
||||||
<text class="aui-text-danger price">
|
<text class="aui-text-danger price">
|
||||||
¥{{ curriculumData.price }}
|
¥{{ Number(curriculumData.price).toFixed(2) }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
<text
|
<text
|
||||||
|
|||||||
@@ -42,8 +42,29 @@
|
|||||||
<view class="order_top common_radius_box color_shandow goods_box">
|
<view class="order_top common_radius_box color_shandow goods_box">
|
||||||
<view
|
<view
|
||||||
class="curriulum_title_box goods_item"
|
class="curriulum_title_box goods_item"
|
||||||
|
style="position: relative"
|
||||||
v-for="(v, i) in goodsDataList"
|
v-for="(v, i) in goodsDataList"
|
||||||
>
|
>
|
||||||
|
<span
|
||||||
|
v-if="v.isVipPrice == 1 && v.vipPrice != 0 && v.vipPrice != null"
|
||||||
|
style="
|
||||||
|
position: absolute;
|
||||||
|
z-index: 10;
|
||||||
|
top: 4px;
|
||||||
|
left: 0px;
|
||||||
|
margin-right: 10px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 18rpx;
|
||||||
|
background-color: #f94f04;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 4px;
|
||||||
|
width: 80rpx;
|
||||||
|
padding: 2px 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
"
|
||||||
|
>VIP优惠</span
|
||||||
|
>
|
||||||
<image
|
<image
|
||||||
v-if="v.productImages && v.productImages != ''"
|
v-if="v.productImages && v.productImages != ''"
|
||||||
class="goods_item_img"
|
class="goods_item_img"
|
||||||
@@ -58,9 +79,12 @@
|
|||||||
@click="goDetail(item.productId)"
|
@click="goDetail(item.productId)"
|
||||||
></image>
|
></image>
|
||||||
<view class="normal_box">
|
<view class="normal_box">
|
||||||
<view class="normal_box_top" style="justify-content: space-between;position: relative;">
|
<view
|
||||||
|
class="normal_box_top"
|
||||||
|
style="justify-content: space-between; position: relative"
|
||||||
|
>
|
||||||
<view class="curriulum_title">{{ v.productName }} </view>
|
<view class="curriulum_title">{{ v.productName }} </view>
|
||||||
<view
|
<!-- <view
|
||||||
style="
|
style="
|
||||||
width: 120rpx !important;
|
width: 120rpx !important;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -75,8 +99,8 @@
|
|||||||
: v.price
|
: v.price
|
||||||
}}
|
}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view
|
<!-- <view
|
||||||
v-if="v.activityPrice > 0 && v.activityPrice < v.price"
|
v-if="v.activityPrice > 0 && v.activityPrice < v.price"
|
||||||
style="
|
style="
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -86,9 +110,54 @@
|
|||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
"
|
"
|
||||||
>原价:¥{{ v.price }}</view>
|
>原价:¥{{ v.price }}</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
|
<text
|
||||||
|
v-if="
|
||||||
|
v.isVipPrice == 1 && v.vipPrice != 0 && v.vipPrice != null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<text style="color: #e97512; font-size: 12px; font-weight: bold"
|
||||||
|
>¥{{ v.vipPrice.toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
<text style="color: #fa2d12; font-size: 10px; margin-left: 4px"
|
||||||
|
>VIP到手价</text
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
style="
|
||||||
|
color: #8a8a8a;
|
||||||
|
font-size: 10px;
|
||||||
|
margin-left: 4px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: line-through;
|
||||||
|
"
|
||||||
|
>¥{{ Number(v.price).toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text v-else-if="v.activityPrice && v.activityPrice > 0">
|
||||||
|
<text style="color: #e97512; font-size: 12px; font-weight: bold"
|
||||||
|
>¥{{ v.activityPrice.toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
<text style="color: #613804; font-size: 10px; margin-left: 4px"
|
||||||
|
>活动价</text
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
style="
|
||||||
|
color: #8a8a8a;
|
||||||
|
font-size: 10px;
|
||||||
|
margin-left: 4px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: line-through;
|
||||||
|
"
|
||||||
|
>¥{{ Number(v.price).toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text v-else style="font-size: 12px"
|
||||||
|
>¥{{ Number(v.price).toFixed(2) }}</text
|
||||||
|
>
|
||||||
<u-number-box v-model="orderNumber" style="float: right">
|
<u-number-box v-model="orderNumber" style="float: right">
|
||||||
<view slot="minus" class="minus">
|
<view slot="minus" class="minus">
|
||||||
<u-icon name="minus" size="12"></u-icon>
|
<u-icon name="minus" size="12"></u-icon>
|
||||||
@@ -168,19 +237,30 @@
|
|||||||
style="display: inline-block"
|
style="display: inline-block"
|
||||||
></u-icon>
|
></u-icon>
|
||||||
|
|
||||||
<text> {{ v.text }}</text>
|
<text v-if="v.type == 6">
|
||||||
<template v-if="v.type == 4">
|
<span
|
||||||
|
style="color: #f94f04; font-weight: bold; margin-right: 2px"
|
||||||
|
>VIP</span
|
||||||
|
>
|
||||||
|
专享立减</text
|
||||||
|
>
|
||||||
|
<text v-else> {{ v.text }}</text>
|
||||||
|
<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">
|
||||||
<template v-if="v.type == 1"> ¥{{ totalPrice }}</template>
|
<template v-if="v.type == 1">
|
||||||
|
¥{{ Number(totalPrice).toFixed(2) }}</template
|
||||||
|
>
|
||||||
<template v-if="v.type == 2">
|
<template v-if="v.type == 2">
|
||||||
<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">
|
||||||
@@ -239,6 +319,16 @@
|
|||||||
<template v-if="v.type == 4">
|
<template v-if="v.type == 4">
|
||||||
<text style="color: #fe6035"> -¥{{ jfNumberShow }}</text>
|
<text style="color: #fe6035"> -¥{{ jfNumberShow }}</text>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="v.type == 5">
|
||||||
|
<text style="color: #fa2d12"
|
||||||
|
>- ¥{{ districtAmount.toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
<template v-if="v.type == 6">
|
||||||
|
<text style="color: #fa2d12"
|
||||||
|
>- ¥{{ vipPrice.toFixed(2) }}</text
|
||||||
|
>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -269,44 +359,55 @@
|
|||||||
<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>
|
||||||
<!-- 商品是安卓环境支付,或者商品列表中没有课程 -->
|
<!-- 商品是安卓环境支付,或者商品列表中没有课程 -->
|
||||||
<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">
|
<template v-if="isDefaultCurrency">
|
||||||
<radio v-if="i == 2" :value="v.value" color="#258feb"
|
<radio
|
||||||
:checked="selectPayIndex == i ? true : false" @click="radioChange(i)" size="10" />
|
v-if="i == 2"
|
||||||
</template>
|
:value="v.value"
|
||||||
<template v-else>
|
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)"
|
||||||
</template>
|
size="10"
|
||||||
</view>
|
/>
|
||||||
</view>
|
</template>
|
||||||
<template v-if="selectPayIndex==2||$platform=='ios'">
|
<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
|
<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"
|
||||||
>
|
>
|
||||||
@@ -369,8 +470,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<common-sticky
|
<common-sticky
|
||||||
label="title"
|
label="title"
|
||||||
@@ -397,13 +498,15 @@
|
|||||||
<text class="price"
|
<text class="price"
|
||||||
>合计:
|
>合计:
|
||||||
|
|
||||||
<text class="total">¥{{ actualPayment }}</text>
|
<text class="total"
|
||||||
|
>¥{{ Number(actualPayment).toFixed(2) }}</text
|
||||||
|
>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</common-goods-nav>
|
</common-goods-nav>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-popup :show="show" mode="right">
|
<u-popup :show="show" mode="right">
|
||||||
<common-address
|
<common-address
|
||||||
backState="3000"
|
backState="3000"
|
||||||
@@ -478,22 +581,25 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
isDefaultCurrency: {
|
isDefaultCurrency: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(newRoute) { console.log('this.isDefaultCurrency at line 482:', this.isDefaultCurrency)
|
handler(newRoute) {
|
||||||
|
console.log(
|
||||||
|
"this.isDefaultCurrency at line 482:",
|
||||||
|
this.isDefaultCurrency
|
||||||
|
);
|
||||||
if (this.isDefaultCurrency) {
|
if (this.isDefaultCurrency) {
|
||||||
|
if (platform == "ios") {
|
||||||
if (platform == "ios") {
|
this.selectPayIndex = 0;
|
||||||
this.selectPayIndex = 0;
|
} else {
|
||||||
} else {
|
this.selectPayIndex = 0;
|
||||||
this.selectPayIndex = 0;
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (platform == "ios") {
|
if (platform == "ios") {
|
||||||
this.selectPayIndex = 0;
|
this.selectPayIndex = 0;
|
||||||
} else {
|
} else {
|
||||||
this.selectPayIndex = 0;
|
this.selectPayIndex = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.payType = this.payList[this.selectPayIndex].type;
|
this.payType = this.payList[this.selectPayIndex].type;
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -502,7 +608,10 @@ export default {
|
|||||||
handler(newRoute) {
|
handler(newRoute) {
|
||||||
if (this.orderNumber >= 1) {
|
if (this.orderNumber >= 1) {
|
||||||
this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
await this.getActiveCouponList();
|
await this.getGoodsList();
|
||||||
|
// await this.getVipFei();
|
||||||
|
// await this.getDistrictAmount();
|
||||||
|
// await this.getActiveCouponList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
@@ -511,6 +620,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
vipPrice: 0,
|
||||||
|
districtAmount: 0,
|
||||||
historyOrderInfo: undefined, //上一个订单的参数
|
historyOrderInfo: undefined, //上一个订单的参数
|
||||||
isDefaultCurrency: false,
|
isDefaultCurrency: false,
|
||||||
isShowAddress: false,
|
isShowAddress: false,
|
||||||
@@ -650,27 +761,12 @@ export default {
|
|||||||
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.getGoodsList();
|
||||||
var list = [...this.options.goods];
|
|
||||||
list = list.map((e) => e.goodsType);
|
|
||||||
this.haveCourse = list.some((ele) => ele === "05");
|
|
||||||
|
|
||||||
if (this.options.sourceType == "curriculum") {
|
|
||||||
this.goToInfo = {
|
|
||||||
url: "/pages/curriculum/order/index/index",
|
|
||||||
type: 2,
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
this.goToInfo = {
|
|
||||||
url: "/pages/bookShop/orderList",
|
|
||||||
type: 1,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
that.initPrepareOrder();
|
|
||||||
},
|
},
|
||||||
async onShow() {
|
async onShow() {
|
||||||
this.curCouponId = undefined;
|
this.curCouponId = undefined;
|
||||||
var that = this;
|
var that = this;
|
||||||
|
// this.getGoodsList();
|
||||||
await uni.$on("returnData", function (data) {
|
await uni.$on("returnData", function (data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
that.addressData = {
|
that.addressData = {
|
||||||
@@ -683,49 +779,160 @@ export default {
|
|||||||
|
|
||||||
that.getUserAddress();
|
that.getUserAddress();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(platform=='ios'){
|
if (platform == "ios") {
|
||||||
this.payList= [
|
this.payList = [
|
||||||
{
|
{
|
||||||
text: "天医币",
|
text: "天医币",
|
||||||
imgUrl: require("@/static/icon/pay_3.png"),
|
imgUrl: require("@/static/icon/pay_3.png"),
|
||||||
type: 4,
|
type: 4,
|
||||||
value: "2",
|
value: "2",
|
||||||
},
|
},
|
||||||
]
|
];
|
||||||
this.selectPayIndex = 0;
|
this.selectPayIndex = 0;
|
||||||
this.payType=4
|
this.payType = 4;
|
||||||
}else{
|
} else {
|
||||||
this.payList= [{
|
this.payList = [
|
||||||
text: "支付宝",
|
{
|
||||||
imgUrl: require("@/static/icon/pay_1.png"),
|
text: "支付宝",
|
||||||
type: 2,
|
imgUrl: require("@/static/icon/pay_1.png"),
|
||||||
value: "0",
|
type: 2,
|
||||||
},
|
value: "0",
|
||||||
{
|
},
|
||||||
text: "微信",
|
{
|
||||||
imgUrl: require("@/static/icon/pay_2.png"),
|
text: "微信",
|
||||||
type: 1,
|
imgUrl: require("@/static/icon/pay_2.png"),
|
||||||
value: "1",
|
type: 1,
|
||||||
},
|
value: "1",
|
||||||
{
|
},
|
||||||
text: "天医币",
|
{
|
||||||
imgUrl: require("@/static/icon/pay_3.png"),
|
text: "天医币",
|
||||||
type: 4,
|
imgUrl: require("@/static/icon/pay_3.png"),
|
||||||
value: "2",
|
type: 4,
|
||||||
},
|
value: "2",
|
||||||
]
|
},
|
||||||
this.selectPayIndex = 1;
|
];
|
||||||
this.payType=1
|
this.selectPayIndex = 1;
|
||||||
}
|
this.payType = 1;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userInfo"]),
|
...mapState(["userInfo"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getGoodsList() {
|
||||||
|
this.$http
|
||||||
|
.request({
|
||||||
|
// url: "book/buyOrder/calculateTransportPrice/",
|
||||||
|
url: "/book/buyOrder/getShopProductListByIds",
|
||||||
|
// url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
productIds: this.options.goods.map((e) => e.productId).toString(),
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async (res) => {
|
||||||
|
this.goodsDataList = res.shopProductList;
|
||||||
|
console.log("this.goodsDataList at line 780:", this.goodsDataList);
|
||||||
|
await this.getVipFei();
|
||||||
|
await this.getDistrictAmount();
|
||||||
|
await this.getActiveCouponList();
|
||||||
|
var list = [...this.goodsDataList];
|
||||||
|
list = list.map((e) => e.goodsType);
|
||||||
|
this.haveCourse = list.some((ele) => ele === "05");
|
||||||
|
|
||||||
|
if (this.options.sourceType == "curriculum") {
|
||||||
|
this.goToInfo = {
|
||||||
|
url: "/pages/curriculum/order/index/index",
|
||||||
|
type: 2,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
this.goToInfo = {
|
||||||
|
url: "/pages/bookShop/orderList",
|
||||||
|
type: 1,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
this.initPrepareOrder();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async getVipFei() {
|
||||||
|
let key = [];
|
||||||
|
let dataToString = "";
|
||||||
|
// console.log(this.adressMoRen, '默认地址')
|
||||||
|
this.goodsDataList.forEach((item, index) => {
|
||||||
|
key.push({
|
||||||
|
productId: item.productId,
|
||||||
|
quantity: this.orderNumber,
|
||||||
|
});
|
||||||
|
// dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
|
||||||
|
});
|
||||||
|
// console.log(key,'this.adressMoRen.areaidpath')
|
||||||
|
|
||||||
|
await $http
|
||||||
|
.request({
|
||||||
|
// url: "book/buyOrder/calculateTransportPrice/",
|
||||||
|
url: "/book/buyOrder/getVipDiscountAmount",
|
||||||
|
// url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
productList: key,
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async(res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
console.log("res.code at line 538:", res);
|
||||||
|
this.vipPrice = res.discountAmount;
|
||||||
|
// console.log('需要的运费', res.result)
|
||||||
|
await this.getTotalPrice();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async getDistrictAmount() {
|
||||||
|
let key = [];
|
||||||
|
let dataToString = "";
|
||||||
|
|
||||||
|
this.goodsDataList.forEach((item, index) => {
|
||||||
|
key.push({
|
||||||
|
productId: item.productId,
|
||||||
|
quantity: this.orderNumber,
|
||||||
|
});
|
||||||
|
// dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
|
||||||
|
});
|
||||||
|
console.log(key, "this.adressMoRen.areaidpath");
|
||||||
|
|
||||||
|
await $http
|
||||||
|
.request({
|
||||||
|
// url: "book/buyOrder/calculateTransportPrice/",
|
||||||
|
url: "/book/buyOrder/getDistrictAmount",
|
||||||
|
// url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
productList: key,
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async(res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
console.log("res.code at line 538111111111111111:", res);
|
||||||
|
this.districtAmount = res.districtAmount;
|
||||||
|
// console.log('需要的运费', res.result)
|
||||||
|
await this.getTotalPrice();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
closeCoupon() {
|
closeCoupon() {
|
||||||
this.showCouponPup = false;
|
this.showCouponPup = false;
|
||||||
},
|
},
|
||||||
@@ -742,13 +949,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 查询商品可用优惠券
|
// 查询商品可用优惠券
|
||||||
async getActiveCouponList() {
|
async getActiveCouponList() {
|
||||||
if (this.goodsDataList.length <= 0) {
|
// if (this.goodsDataList.length <= 0) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: "商品参数错误,无法获取优惠券",
|
// title: "商品参数错误,无法获取优惠券",
|
||||||
icon: "none",
|
// icon: "none",
|
||||||
});
|
// });
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
var list = [];
|
var list = [];
|
||||||
this.goodsDataList.forEach((e) => {
|
this.goodsDataList.forEach((e) => {
|
||||||
@@ -849,7 +1056,12 @@ export default {
|
|||||||
couponAmount = this.curCoupon.couponEntity.couponAmount;
|
couponAmount = this.curCoupon.couponEntity.couponAmount;
|
||||||
}
|
}
|
||||||
this.actualPayment =
|
this.actualPayment =
|
||||||
this.totalPrice - couponAmount - this.jfNumber + this.freightNum;
|
this.totalPrice -
|
||||||
|
couponAmount -
|
||||||
|
this.jfNumber +
|
||||||
|
this.freightNum -
|
||||||
|
this.districtAmount -
|
||||||
|
this.vipPrice;
|
||||||
|
|
||||||
if (this.actualPayment == 0) {
|
if (this.actualPayment == 0) {
|
||||||
this.isDefaultCurrency = true;
|
this.isDefaultCurrency = true;
|
||||||
@@ -902,6 +1114,7 @@ export default {
|
|||||||
imgUrl: "",
|
imgUrl: "",
|
||||||
type: 2,
|
type: 2,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
text: "优惠券",
|
text: "优惠券",
|
||||||
imgUrl: "",
|
imgUrl: "",
|
||||||
@@ -909,6 +1122,27 @@ export default {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
this.goodsDataList[0].activityPrice &&
|
||||||
|
this.goodsDataList[0].activityPrice > 0
|
||||||
|
) {
|
||||||
|
this.priceBreakdownList.push({
|
||||||
|
text: "活动立减",
|
||||||
|
imgUrl: "",
|
||||||
|
type: 5,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
this.goodsDataList[0].isVipPrice &&
|
||||||
|
this.goodsDataList[0].vipPrice &&
|
||||||
|
this.goodsDataList[0].vipPrice > 0
|
||||||
|
) {
|
||||||
|
this.priceBreakdownList.push({
|
||||||
|
text: "VIP专享立减",
|
||||||
|
imgUrl: "",
|
||||||
|
type: 6,
|
||||||
|
});
|
||||||
|
}
|
||||||
var data = {
|
var data = {
|
||||||
uid: this.userInfo.id,
|
uid: this.userInfo.id,
|
||||||
productList: this.goodsDataList.map((e) => {
|
productList: this.goodsDataList.map((e) => {
|
||||||
@@ -932,8 +1166,10 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
console.log('res at line 1168:', res)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.initData = res.data;
|
this.initData = res.data;
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
"this.initData at line 初始化课程订单信息:",
|
"this.initData at line 初始化课程订单信息:",
|
||||||
this.initData
|
this.initData
|
||||||
@@ -946,8 +1182,6 @@ export default {
|
|||||||
type: 4,
|
type: 4,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
@@ -1056,10 +1290,10 @@ export default {
|
|||||||
var that = this;
|
var that = this;
|
||||||
for (var i = this.goodsDataList.length - 1; i >= 0; i--) {
|
for (var i = this.goodsDataList.length - 1; i >= 0; i--) {
|
||||||
s +=
|
s +=
|
||||||
this.goodsDataList[i].activityPrice &&
|
// this.goodsDataList[i].activityPrice &&
|
||||||
this.goodsDataList[i].activityPrice > 0
|
// this.goodsDataList[i].activityPrice > 0
|
||||||
? this.goodsDataList[i].activityPrice
|
// ? this.goodsDataList[i].activityPrice
|
||||||
: this.goodsDataList[i].price;
|
this.goodsDataList[i].price;
|
||||||
}
|
}
|
||||||
that.totalPrice = s * this.orderNumber;
|
that.totalPrice = s * this.orderNumber;
|
||||||
var couponAmount = 0;
|
var couponAmount = 0;
|
||||||
@@ -1072,7 +1306,8 @@ export default {
|
|||||||
couponAmount = 0;
|
couponAmount = 0;
|
||||||
}
|
}
|
||||||
if (!this.isShowAddress) {
|
if (!this.isShowAddress) {
|
||||||
if (this.initData.user.jf >= that.totalPrice) {
|
if(that.initData.user&&that.initData.user.jf){
|
||||||
|
if (this.initData.user.jf >= that.totalPrice) {
|
||||||
this.jfNumber = that.totalPrice - couponAmount;
|
this.jfNumber = that.totalPrice - couponAmount;
|
||||||
this.jfNumberMax = that.totalPrice - couponAmount;
|
this.jfNumberMax = that.totalPrice - couponAmount;
|
||||||
console.log("this.jfNumberMax at line 1303:", this.jfNumberMax);
|
console.log("this.jfNumberMax at line 1303:", this.jfNumberMax);
|
||||||
@@ -1085,6 +1320,10 @@ export default {
|
|||||||
this.jfNumberMax = this.initData.user.jf;
|
this.jfNumberMax = this.initData.user.jf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
this.jfNumber=0
|
||||||
|
}
|
||||||
|
|
||||||
if (that.jfNumber == 0 || that.jfNumber == null) {
|
if (that.jfNumber == 0 || that.jfNumber == null) {
|
||||||
that.jfNumberShow = "0.00";
|
that.jfNumberShow = "0.00";
|
||||||
that.actualPayment = that.totalPrice - couponAmount;
|
that.actualPayment = that.totalPrice - couponAmount;
|
||||||
@@ -1092,9 +1331,18 @@ export default {
|
|||||||
that.jfNumberShow = that.jfNumber.toFixed(2);
|
that.jfNumberShow = that.jfNumber.toFixed(2);
|
||||||
that.actualPayment = that.totalPrice - that.jfNumber - couponAmount;
|
that.actualPayment = that.totalPrice - that.jfNumber - couponAmount;
|
||||||
}
|
}
|
||||||
that.actualPayment = that.actualPayment + that.freightNum;
|
that.actualPayment =
|
||||||
|
that.actualPayment +
|
||||||
|
that.freightNum -
|
||||||
|
that.districtAmount -
|
||||||
|
that.vipPrice;
|
||||||
} else {
|
} else {
|
||||||
that.actualPayment = that.totalPrice + that.freightNum - couponAmount;
|
that.actualPayment =
|
||||||
|
that.totalPrice +
|
||||||
|
that.freightNum -
|
||||||
|
couponAmount -
|
||||||
|
that.districtAmount -
|
||||||
|
that.vipPrice;
|
||||||
}
|
}
|
||||||
if (this.actualPayment == 0 && !this.isShowAddress) {
|
if (this.actualPayment == 0 && !this.isShowAddress) {
|
||||||
this.isDefaultCurrency = true;
|
this.isDefaultCurrency = true;
|
||||||
@@ -1188,6 +1436,8 @@ export default {
|
|||||||
? this.curCoupon.couponEntity.couponName
|
? this.curCoupon.couponEntity.couponName
|
||||||
: "", //优惠券名称
|
: "", //优惠券名称
|
||||||
districtMoney: 0, //优惠金额
|
districtMoney: 0, //优惠金额
|
||||||
|
vipDiscountAmount: this.vipPrice, //折扣金额
|
||||||
|
districtMoney: this.districtAmount, //折扣金额
|
||||||
|
|
||||||
productList: this.goodsDataList.map((e) => {
|
productList: this.goodsDataList.map((e) => {
|
||||||
return {
|
return {
|
||||||
@@ -1234,7 +1484,7 @@ export default {
|
|||||||
that.submitorder(data);
|
that.submitorder(data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//支付操作
|
//支付操作
|
||||||
async submitorder(data) {
|
async submitorder(data) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "正在请求订单",
|
title: "正在请求订单",
|
||||||
@@ -1705,7 +1955,7 @@ export default {
|
|||||||
|
|
||||||
.curriulum_title {
|
.curriulum_title {
|
||||||
// width: calc(100% - 80rpx);
|
// width: calc(100% - 80rpx);
|
||||||
width: calc(100% - 130rpx);
|
width: calc(100%);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
// line-height: 40rpx;
|
// line-height: 40rpx;
|
||||||
@@ -1934,7 +2184,7 @@ export default {
|
|||||||
|
|
||||||
.price {
|
.price {
|
||||||
.total {
|
.total {
|
||||||
font-size: 38rpx;
|
font-size: 30rpx;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
BIN
static/icon/zhijiang.png
Normal file
BIN
static/icon/zhijiang.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
Reference in New Issue
Block a user