1.兼容中国台湾、中国香港手机号码 2.增加相关书籍模块
This commit is contained in:
@@ -238,7 +238,7 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template slot="leftSlot" slot-scope="slotProps1"> </template>
|
||||
<template slot="leftSlot" slot-scope="slotProps1"></template>
|
||||
<template slot="rightSlot" slot-scope="slotProps1">
|
||||
<text
|
||||
class="fdButtonBox aui-text-success"
|
||||
@@ -318,6 +318,73 @@
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template slot="tjProList" slot-scope="slotProps">
|
||||
<view class="linkPro" v-if="tjProList.length > 0">
|
||||
<uni-section style="padding: 0 20rpx;" class="mb-10 graybg" title="相关书籍" type="line"></uni-section>
|
||||
<view class="list supermarketBox">
|
||||
<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="imgcontainer" style="position: relative;">
|
||||
<view v-if="item.isVipPrice==1&&item.vipPrice!=0&&item.vipPrice!=null"
|
||||
style="z-index:10;position: absolute;top:0;left:0;text-align: center;font-size: 20rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px; line-height: 30rpx; padding:10rpx;box-sizing: border-box;">
|
||||
VIP优惠</view>
|
||||
<image :src="item.productImages" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="name">
|
||||
{{ item.productName }}
|
||||
</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: #8a8a8a;
|
||||
font-size: 10px;
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
text-decoration: line-through;
|
||||
"
|
||||
>¥{{ Number(item.price) }}</text
|
||||
>
|
||||
</text>
|
||||
|
||||
<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: #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
|
||||
>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</common-anchor-link>
|
||||
<common-select-goods
|
||||
:isFudu="isFudu"
|
||||
@@ -477,10 +544,11 @@ export default {
|
||||
goodsList: "sociology/product/getProductListForCourse",
|
||||
startStudyForMF: "sociology/course/startStudyForMF",
|
||||
newPayment:"common/courseRelearn/courseCatalogueCanRelearn", // 检查复读地址
|
||||
newPaymentList:"common/courseRelearn/relearnShopProductList", // 获取复读列表
|
||||
newPaymentList:"common/courseRelearn/relearnShopProductList", // 获取复读列表
|
||||
},
|
||||
userVip: null, //是否有vip
|
||||
textList: [], //转化文字集合
|
||||
tjProList: [], //相关书籍
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -948,6 +1016,15 @@ export default {
|
||||
courseList: [...list],
|
||||
};
|
||||
}
|
||||
|
||||
if (
|
||||
res.data.shopProductList &&
|
||||
res.data.shopProductList.length > 0
|
||||
) {
|
||||
this.tjProList = res.data.shopProductList;
|
||||
} else {
|
||||
this.tjProList = [];
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
that.$refs.commonAnchorLink.getDistanceArr();
|
||||
@@ -983,6 +1060,17 @@ export default {
|
||||
});
|
||||
return result;
|
||||
},
|
||||
|
||||
//相关书籍跳转
|
||||
goToGoodsList(data) {
|
||||
if (data.delFlag == -1) {
|
||||
this.$commonJS.showToast("商品已下架");
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/index/index?isMiaosha=1&id=${data.productId}`,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
onBackPress() {
|
||||
// #ifdef APP-PLUS
|
||||
@@ -1000,13 +1088,7 @@ export default {
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px solid #dadbde;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
background-color: #fff;
|
||||
white-space: nowrap;
|
||||
padding: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.contentBox {
|
||||
height: calc(100% - 50px);
|
||||
@@ -1861,4 +1943,56 @@ export default {
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.linkPro {
|
||||
padding-top: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
background: linear-gradient(108deg, #f0fbf4 0%, #d1e8da 100%) !important;
|
||||
|
||||
.more {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.scroll-view_H {
|
||||
white-space: nowrap;
|
||||
padding: 10rpx 10rpx 20rpx;
|
||||
margin-top: 12rpx;
|
||||
|
||||
.item {
|
||||
padding: 10rpx;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
padding-bottom: 0;
|
||||
width: 210rpx !important;
|
||||
margin-right: 8rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 260rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
display: block;
|
||||
margin-top: 2rpx;
|
||||
color: #666;
|
||||
font-size: 28rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
/deep/.uni-section-header__decoration{
|
||||
width: 14px;
|
||||
height: 34px;
|
||||
background-color: #018f89 !important;
|
||||
}
|
||||
/deep/.distraction{
|
||||
font-size: 32rpx !important;
|
||||
color: #018f89 !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user