优惠券
This commit is contained in:
@@ -1001,6 +1001,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 取消订单
|
// 取消订单
|
||||||
canceOrder(item) {
|
canceOrder(item) {
|
||||||
|
console.log('item.orderSn',item);
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "确定要取消订单吗?",
|
content: "确定要取消订单吗?",
|
||||||
@@ -1011,7 +1012,9 @@ export default {
|
|||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.$http
|
this.$http
|
||||||
.get("book/buyOrder/cancelOrder?orderSn=" + item.orderSn)
|
.post(
|
||||||
|
"book/buyOrder/appDelete?orderId=" + item.orderId
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -799,7 +799,7 @@
|
|||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
console.log("res at line 493:", res);
|
console.log("res at line 493:", res);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.getCourseDescriptionData();
|
this.getCourseDescriptionData(v);
|
||||||
// this.$commonJS.showToast("");
|
// this.$commonJS.showToast("");
|
||||||
}
|
}
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
@@ -812,6 +812,10 @@
|
|||||||
showCancel:false
|
showCancel:false
|
||||||
})
|
})
|
||||||
}else {
|
}else {
|
||||||
|
this.getCourseDescriptionData(v);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getCourseDescriptionData(v){
|
||||||
this.$http
|
this.$http
|
||||||
.request({
|
.request({
|
||||||
url: this.urlList.goodsList,
|
url: this.urlList.goodsList,
|
||||||
@@ -836,7 +840,6 @@
|
|||||||
|
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
})
|
})
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
this.$http.post("common/user/getUserInfo").then((res) => {
|
this.$http.post("common/user/getUserInfo").then((res) => {
|
||||||
|
|||||||
@@ -4,29 +4,13 @@
|
|||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<z-nav-bar title="商品详情" bgColor="#258feb" fontColor="#fff"></z-nav-bar>
|
<z-nav-bar title="商品详情" bgColor="#258feb" fontColor="#fff"></z-nav-bar>
|
||||||
|
|
||||||
<view
|
<view class="contentBox commonPageContentBox" v-if="!this.$store.state.loadingShow">
|
||||||
class="contentBox commonPageContentBox"
|
|
||||||
v-if="!this.$store.state.loadingShow"
|
|
||||||
>
|
|
||||||
<!-- :indicator-dots="true" -->
|
<!-- :indicator-dots="true" -->
|
||||||
<swiper
|
<swiper :autoplay="true" :interval="3000" :duration="1000"
|
||||||
:autoplay="true"
|
style="width: 100%; height: 750rpx; background-color: #f5f5f5">
|
||||||
:interval="3000"
|
<swiper-item v-for="(item, index) in swiperList" :key="index" style="width: 100%; height: 100%">
|
||||||
:duration="1000"
|
|
||||||
style="width: 100%; height: 750rpx; background-color: #f5f5f5"
|
|
||||||
>
|
|
||||||
<swiper-item
|
|
||||||
v-for="(item, index) in swiperList"
|
|
||||||
:key="index"
|
|
||||||
style="width: 100%; height: 100%"
|
|
||||||
>
|
|
||||||
<!-- <image :src="curriculumData.explainsImg" mode="widthFix" class="headImage"></image> -->
|
<!-- <image :src="curriculumData.explainsImg" mode="widthFix" class="headImage"></image> -->
|
||||||
<image
|
<image :src="item" mode="aspectFit" style="width: 100%; height: 100%" @click="previewImage(item)">
|
||||||
:src="item"
|
|
||||||
mode="aspectFit"
|
|
||||||
style="width: 100%; height: 100%"
|
|
||||||
@click="previewImage(item)"
|
|
||||||
>
|
|
||||||
</image>
|
</image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@@ -36,17 +20,14 @@
|
|||||||
<view v-if="this.options.isMiaosha==1" class="miaosha_box">
|
<view v-if="this.options.isMiaosha==1" class="miaosha_box">
|
||||||
<view class="price_box">
|
<view class="price_box">
|
||||||
<view class="price_left">
|
<view class="price_left">
|
||||||
<template
|
<template v-if="
|
||||||
v-if="
|
|
||||||
curriculumData.activityPrice &&
|
curriculumData.activityPrice &&
|
||||||
curriculumData.activityPrice > 0
|
curriculumData.activityPrice > 0
|
||||||
"
|
">
|
||||||
>
|
|
||||||
<text class="aui-text-danger price">
|
<text class="aui-text-danger price">
|
||||||
¥{{ curriculumData.activityPrice }}
|
¥{{ curriculumData.activityPrice }}
|
||||||
</text>
|
</text>
|
||||||
<text class="price original_price"
|
<text class="price original_price">原价:¥{{ curriculumData.price }}
|
||||||
>原价:¥{{ curriculumData.price }}
|
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@@ -55,8 +36,7 @@
|
|||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<view class="price original_price sales_number"
|
<view class="price original_price sales_number">已售 {{ curriculumData.sumSales }}件
|
||||||
>已售 {{ curriculumData.sumSales }}件
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -72,23 +52,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="curriulum_title"
|
<view class="curriulum_title">{{ curriculumData.productName }}
|
||||||
>{{ curriculumData.productName }}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="normal_box">
|
<view v-else class="normal_box">
|
||||||
<view class="price_box">
|
<view class="price_box">
|
||||||
<template
|
<template v-if="
|
||||||
v-if="
|
|
||||||
curriculumData.activityPrice &&
|
curriculumData.activityPrice &&
|
||||||
curriculumData.activityPrice > 0
|
curriculumData.activityPrice > 0
|
||||||
"
|
">
|
||||||
>
|
|
||||||
<text class="aui-text-danger price">
|
<text class="aui-text-danger price">
|
||||||
¥{{ curriculumData.activityPrice }}
|
¥{{ curriculumData.activityPrice }}
|
||||||
</text>
|
</text>
|
||||||
<text class="price original_price"
|
<text class="price original_price">原价:¥{{ curriculumData.price }}
|
||||||
>原价:¥{{ curriculumData.price }}
|
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@@ -96,15 +72,12 @@
|
|||||||
¥{{ curriculumData.price }}
|
¥{{ curriculumData.price }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
<text
|
<text class="price original_price sales_number" style="float: right">已售
|
||||||
class="price original_price sales_number"
|
{{ curriculumData.sumSales }}件
|
||||||
style="float: right"
|
|
||||||
>已售 {{ curriculumData.sumSales }}件
|
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="curriulum_title" style="margin-top: 40rpx;"
|
<view class="curriulum_title" style="margin-top: 40rpx;">{{ curriculumData.productName }}
|
||||||
>{{ curriculumData.productName }}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -113,89 +86,35 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<common-sticky
|
<common-sticky label="title" :itemStyle="`width:${
|
||||||
label="title"
|
|
||||||
:itemStyle="`width:${
|
|
||||||
cateList.length == 2 ? '50' : '33'
|
cateList.length == 2 ? '50' : '33'
|
||||||
}%;padding-left: 15px; padding-right: 15px; height: 68rpx;`"
|
}%;padding-left: 15px; padding-right: 15px; height: 68rpx;`" :list="cateList"
|
||||||
:list="cateList"
|
:currentCateIndex="currentCateIndex" @handleselectCate="handleselectCate">
|
||||||
:currentCateIndex="currentCateIndex"
|
|
||||||
@handleselectCate="handleselectCate"
|
|
||||||
>
|
|
||||||
</common-sticky>
|
</common-sticky>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- <view :class="`priceDetail`" v-if="this.statusList[this.currentStatusIndex].type == 'price'">
|
|
||||||
|
|
||||||
<scroll-view scroll-y="true" class="scroll-Y">
|
|
||||||
<price ref="priceDetail" type="price" :oid="this.statusList[this.currentStatusIndex].oid"></price>
|
|
||||||
|
|
||||||
</scroll-view>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view :class="`priceDetail`" v-else-if="this.statusList[this.currentStatusIndex].type == 'purchaseNotice'">
|
|
||||||
|
|
||||||
<scroll-view scroll-y="true" class="scroll-Y">
|
|
||||||
<price ref="purchaseNotice" :oid="this.statusList[this.currentStatusIndex].oid"></price>
|
|
||||||
|
|
||||||
</scroll-view>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<view :class="`dataList `">
|
<view :class="`dataList `">
|
||||||
<view
|
<view class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font"
|
||||||
class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font"
|
style="background-color: #C7E9FB">
|
||||||
style="background-color: #C7E9FB"
|
|
||||||
>
|
|
||||||
<view class="left" style="color: #258feb;">
|
<view class="left" style="color: #258feb;">
|
||||||
<u-icon
|
<u-icon name="grid" color="#258feb" size="23"
|
||||||
name="grid"
|
style="display: inline-block; margin-right: 10rpx"></u-icon>
|
||||||
color="#258feb"
|
商品规格
|
||||||
size="23"
|
|
||||||
style="display: inline-block; margin-right: 10rpx"
|
|
||||||
></u-icon>
|
|
||||||
商品规格</view
|
|
||||||
>
|
|
||||||
|
|
||||||
<text class="right" @click="openPopup"
|
|
||||||
>共{{ goodsList.length }}种商品可选择</text
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
<common-goods-list
|
|
||||||
imgUrl="url"
|
<text class="right" @click="openPopup">共{{ goodsList.length }}种商品可选择</text>
|
||||||
isNoIcon
|
</view>
|
||||||
imgMode="aspectFit"
|
<common-goods-list imgUrl="url" isNoIcon imgMode="aspectFit" class="color_shandow" defaultUrl=""
|
||||||
class="color_shandow"
|
:isCondition="true" :dataList="goodsList" @hancleClick="selectGoods" label="title">
|
||||||
defaultUrl=""
|
|
||||||
:isCondition="true"
|
|
||||||
:dataList="goodsList"
|
|
||||||
@hancleClick="selectGoods"
|
|
||||||
label="title"
|
|
||||||
>
|
|
||||||
<template slot="labelSlot" slot-scope="slotProps">
|
<template slot="labelSlot" slot-scope="slotProps">
|
||||||
<!-- isSelectGoods -->
|
<!-- isSelectGoods -->
|
||||||
<view
|
<view class="related_courses_name goodsList" :class="`goods_item ${
|
||||||
class="related_courses_name goodsList"
|
|
||||||
:class="`goods_item ${
|
|
||||||
selectGoodsData &&
|
selectGoodsData &&
|
||||||
selectGoodsData.productId == slotProps.row.productId
|
selectGoodsData.productId == slotProps.row.productId
|
||||||
? ''
|
? ''
|
||||||
: ''
|
: ''
|
||||||
}`"
|
}`">
|
||||||
>
|
|
||||||
<view class="image_box">
|
<view class="image_box">
|
||||||
<image
|
<image :src="slotProps.row.productImages" mode="aspectFit" class="goods_image"></image>
|
||||||
:src="slotProps.row.productImages"
|
|
||||||
mode="aspectFit"
|
|
||||||
class="goods_image"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -233,39 +152,21 @@
|
|||||||
</common-goods-list>
|
</common-goods-list>
|
||||||
</view>
|
</view>
|
||||||
<view :class="`dataList parameterList`" v-if="booksList.length > 0">
|
<view :class="`dataList parameterList`" v-if="booksList.length > 0">
|
||||||
<view
|
<view class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font">
|
||||||
class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font"
|
|
||||||
>
|
|
||||||
<view class="left" style="color:#3C77BE !important">
|
<view class="left" style="color:#3C77BE !important">
|
||||||
<u-icon
|
<u-icon name="list" color="#3C77BE" size="23"
|
||||||
name="list"
|
style="display: inline-block; margin-right: 10rpx"></u-icon>
|
||||||
color="#3C77BE"
|
书籍信息
|
||||||
size="23"
|
</view>
|
||||||
style="display: inline-block; margin-right: 10rpx"
|
|
||||||
></u-icon>
|
|
||||||
书籍信息</view
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<common-list
|
<common-list imgUrl="url" isNoIcon imgMode="aspectFit" class="color_shandow parameter_box book_box"
|
||||||
imgUrl="url"
|
defaultUrl="" :isCondition="true" :dataList="booksList" label="title">
|
||||||
isNoIcon
|
|
||||||
imgMode="aspectFit"
|
|
||||||
class="color_shandow parameter_box book_box"
|
|
||||||
defaultUrl=""
|
|
||||||
:isCondition="true"
|
|
||||||
:dataList="booksList"
|
|
||||||
label="title"
|
|
||||||
>
|
|
||||||
<template slot="labelSlot" slot-scope="slotProps">
|
<template slot="labelSlot" slot-scope="slotProps">
|
||||||
<!-- isSelectGoods -->
|
<!-- isSelectGoods -->
|
||||||
<view class="related_courses_name" :class="`goods_item `">
|
<view class="related_courses_name" :class="`goods_item `">
|
||||||
<view class="image_box" style="margin-right: 10rpx">
|
<view class="image_box" style="margin-right: 10rpx">
|
||||||
<image
|
<image :src="slotProps.row.images" mode="aspectFit" class="goods_image"></image>
|
||||||
:src="slotProps.row.images"
|
|
||||||
mode="aspectFit"
|
|
||||||
class="goods_image"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view :class="`goods_info `">
|
<view :class="`goods_info `">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
@@ -279,39 +180,21 @@
|
|||||||
</common-list>
|
</common-list>
|
||||||
</view>
|
</view>
|
||||||
<view :class="`dataList parameterList`" v-if="coursesList.length > 0">
|
<view :class="`dataList parameterList`" v-if="coursesList.length > 0">
|
||||||
<view
|
<view class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font">
|
||||||
class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font"
|
|
||||||
>
|
|
||||||
<view class="left" style="color: #018f89 !important">
|
<view class="left" style="color: #018f89 !important">
|
||||||
<u-icon
|
<u-icon name="list" color="#018F89" size="23"
|
||||||
name="list"
|
style="display: inline-block; margin-right: 10rpx"></u-icon>
|
||||||
color="#018F89"
|
课程信息
|
||||||
size="23"
|
</view>
|
||||||
style="display: inline-block; margin-right: 10rpx"
|
|
||||||
></u-icon>
|
|
||||||
课程信息</view
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<common-list
|
<common-list imgUrl="url" isNoIcon imgMode="aspectFit" class="color_shandow parameter_box" defaultUrl=""
|
||||||
imgUrl="url"
|
:isCondition="true" :dataList="coursesList" label="title">
|
||||||
isNoIcon
|
|
||||||
imgMode="aspectFit"
|
|
||||||
class="color_shandow parameter_box"
|
|
||||||
defaultUrl=""
|
|
||||||
:isCondition="true"
|
|
||||||
:dataList="coursesList"
|
|
||||||
label="title"
|
|
||||||
>
|
|
||||||
<template slot="labelSlot" slot-scope="slotProps">
|
<template slot="labelSlot" slot-scope="slotProps">
|
||||||
<!-- isSelectGoods -->
|
<!-- isSelectGoods -->
|
||||||
<view class="related_courses_name" :class="`goods_item `">
|
<view class="related_courses_name" :class="`goods_item `">
|
||||||
<view class="image_box" style="margin-right: 10rpx">
|
<view class="image_box" style="margin-right: 10rpx">
|
||||||
<image
|
<image :src="slotProps.row.images" mode="aspectFit" class="goods_image"></image>
|
||||||
:src="slotProps.row.images"
|
|
||||||
mode="aspectFit"
|
|
||||||
class="goods_image"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view :class="`goods_info `">
|
<view :class="`goods_info `">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
@@ -324,42 +207,49 @@
|
|||||||
</template>
|
</template>
|
||||||
</common-list>
|
</common-list>
|
||||||
</view>
|
</view>
|
||||||
|
<template v-if="canGetCouponList.length > 0">
|
||||||
|
<u-divider text="购买本商品赠送如下优惠券" :hairline="true" textColor="#333" lineColor="#b0b0b0"></u-divider>
|
||||||
|
<view class="tanchu">
|
||||||
|
<view class="listBox" >
|
||||||
|
<view style="max-height: 40vh;overflow-y: scroll;" :class="'youhuiItem'"
|
||||||
|
v-for="(item,index) in canGetCouponList" :key="index">
|
||||||
|
<view style="width: 25%;color:#fd6004;text-align: center;">
|
||||||
|
<text>¥</text>
|
||||||
|
<b style="font-size: 60rpx;">{{item.couponEntity.couponAmount}}</b>
|
||||||
|
</view>
|
||||||
|
<view style="width: 68%;padding-left: 5%;">
|
||||||
|
<view>
|
||||||
|
<text
|
||||||
|
style="display: inline-block; font-size: 30rpx; margin-right: 6rpx; color:rgb(253, 96, 4);">{{item.couponEntity.couponName}}</text>
|
||||||
|
<!-- <text class="border_radius_10"
|
||||||
|
style="font-size: 24rpx; background-color: #fad4bd; color: #666;">{{item.couponEntity.couponRange | couponType}}</text> -->
|
||||||
|
</view>
|
||||||
|
<text
|
||||||
|
style="display: block;font-size: 20rpx;color: #999;margin-top: 4rpx;">说明:{{item.couponEntity.remark}}</text>
|
||||||
|
|
||||||
<u-divider
|
</view>
|
||||||
text="商品参数"
|
</view>
|
||||||
:hairline="true"
|
<!-- <view style="font-size: 20rpx;color: #aaa;margin-top: 30rpx;">* 每笔订单只能使用一张优惠价</view> -->
|
||||||
textColor="#333"
|
</view>
|
||||||
lineColor="#b0b0b0"
|
</view>
|
||||||
></u-divider>
|
</template>
|
||||||
|
<u-divider text="商品参数" :hairline="true" textColor="#333" lineColor="#b0b0b0"></u-divider>
|
||||||
<view class="parameter_info_box">
|
<view class="parameter_info_box">
|
||||||
<common-list
|
<common-list imgUrl="url" isNoIcon imgMode="aspectFit" class="parameter_box parameter_info"
|
||||||
imgUrl="url"
|
defaultUrl="" :isCondition="true" :dataList="parameterList" @hancleClick="selectGoods" label="name">
|
||||||
isNoIcon
|
|
||||||
imgMode="aspectFit"
|
|
||||||
class="parameter_box parameter_info"
|
|
||||||
defaultUrl=""
|
|
||||||
:isCondition="true"
|
|
||||||
:dataList="parameterList"
|
|
||||||
@hancleClick="selectGoods"
|
|
||||||
label="name"
|
|
||||||
>
|
|
||||||
<template slot="labelSlot" slot-scope="slotProps">
|
<template slot="labelSlot" slot-scope="slotProps">
|
||||||
<!-- isSelectGoods -->
|
<!-- isSelectGoods -->
|
||||||
<view
|
<view class="related_courses_name" :class="`goods_item ${
|
||||||
class="related_courses_name"
|
|
||||||
:class="`goods_item ${
|
|
||||||
selectGoodsData &&
|
selectGoodsData &&
|
||||||
selectGoodsData.productId == slotProps.row.productId
|
selectGoodsData.productId == slotProps.row.productId
|
||||||
? ''
|
? ''
|
||||||
: ''
|
: ''
|
||||||
}`"
|
}`">
|
||||||
>
|
|
||||||
<view :class="`goods_info `">
|
<view :class="`goods_info `">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<text style="color: #333"> {{ slotProps.row.name }}:</text>
|
<text style="color: #333"> {{ slotProps.row.name }}:</text>
|
||||||
<text v-if="slotProps.row.isTime">
|
<text v-if="slotProps.row.isTime">
|
||||||
{{ slotProps.row.value | formatDate }}</text
|
{{ slotProps.row.value | formatDate }}</text>
|
||||||
>
|
|
||||||
<text v-else> {{ slotProps.row.value }}</text>
|
<text v-else> {{ slotProps.row.value }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -399,12 +289,7 @@
|
|||||||
</common-list>
|
</common-list>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-divider
|
<u-divider text="商品详情" :hairline="true" textColor="#333" lineColor="#b0b0b0"></u-divider>
|
||||||
text="商品详情"
|
|
||||||
:hairline="true"
|
|
||||||
textColor="#333"
|
|
||||||
lineColor="#b0b0b0"
|
|
||||||
></u-divider>
|
|
||||||
<view class="small_class_teaching_box" style="background-color: #B7E0E2">
|
<view class="small_class_teaching_box" style="background-color: #B7E0E2">
|
||||||
<view class="common_divider divider_box"> </view>
|
<view class="common_divider divider_box"> </view>
|
||||||
|
|
||||||
@@ -454,28 +339,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view class="small_class_teaching_box related_courses_box" v-if="relatedCoursesList.length > 0">
|
||||||
class="small_class_teaching_box related_courses_box"
|
|
||||||
v-if="relatedCoursesList.length > 0"
|
|
||||||
>
|
|
||||||
<view class="small_class_teaching_top">
|
<view class="small_class_teaching_top">
|
||||||
<view class="small_class_teaching_top_left">
|
<view class="small_class_teaching_top_left">
|
||||||
<image
|
<image src="@/static/icon/course_ic.png" mode="aspectFil" class="icon1"></image>
|
||||||
src="@/static/icon/course_ic.png"
|
|
||||||
mode="aspectFil"
|
|
||||||
class="icon1"
|
|
||||||
></image>
|
|
||||||
<text>相关课程</text>
|
<text>相关课程</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="small_class_teaching_content">
|
<view class="small_class_teaching_content">
|
||||||
<common-curriculum-list
|
<common-curriculum-list imgUrl="url" :isCondition="true" :dataList="relatedCoursesList"
|
||||||
imgUrl="url"
|
@hancleClick="goCourseDescription" label="title">
|
||||||
:isCondition="true"
|
|
||||||
:dataList="relatedCoursesList"
|
|
||||||
@hancleClick="goCourseDescription"
|
|
||||||
label="title"
|
|
||||||
>
|
|
||||||
<template slot="labelSlot" slot-scope="slotProps">
|
<template slot="labelSlot" slot-scope="slotProps">
|
||||||
<view class="related_courses_name hidden1">{{
|
<view class="related_courses_name hidden1">{{
|
||||||
slotProps.row.title
|
slotProps.row.title
|
||||||
@@ -488,8 +361,7 @@
|
|||||||
<!-- {{ slotProps.row.bxType }} -->
|
<!-- {{ slotProps.row.bxType }} -->
|
||||||
|
|
||||||
<text class="aui-text-danger">
|
<text class="aui-text-danger">
|
||||||
¥{{ slotProps.row.courseFee }}</text
|
¥{{ slotProps.row.courseFee }}</text>
|
||||||
>
|
|
||||||
|
|
||||||
<view> </view>
|
<view> </view>
|
||||||
</template>
|
</template>
|
||||||
@@ -498,13 +370,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods_nav_box" v-if="!this.$store.state.loadingShow">
|
<view class="goods_nav_box" v-if="!this.$store.state.loadingShow">
|
||||||
<uni-goods-nav
|
<uni-goods-nav :fill="true" :options="buyOptions" :button-group="customButtonGroup1"
|
||||||
:fill="true"
|
@click="onHandleClickBuy" @buttonClick="onHandleClickBuy1" />
|
||||||
:options="buyOptions"
|
|
||||||
:button-group="customButtonGroup1"
|
|
||||||
@click="onHandleClickBuy"
|
|
||||||
@buttonClick="onHandleClickBuy1"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<!--
|
<!--
|
||||||
<u-modal
|
<u-modal
|
||||||
@@ -515,82 +382,43 @@
|
|||||||
@confirm="hancleModalConfirm"
|
@confirm="hancleModalConfirm"
|
||||||
@cancel="hancleModalCancel"
|
@cancel="hancleModalCancel"
|
||||||
></u-modal> -->
|
></u-modal> -->
|
||||||
<common-select-goods
|
<common-select-goods ref="commonSelectGoods" :selectGoodsData="selectGoodsData" :goodsList="goodsList"
|
||||||
ref="commonSelectGoods"
|
:buyOptions="buyOptions" :customButtonGroup1="customButtonGroup1" @selectGoods="selectGoods"
|
||||||
:selectGoodsData="selectGoodsData"
|
@onHandleClickBuy="onHandleClickBuy"></common-select-goods>
|
||||||
:goodsList="goodsList"
|
<u-popup :show="showInfo" mode="bottom" @close="closeShowInfo" class="popup_box">
|
||||||
:buyOptions="buyOptions"
|
|
||||||
:customButtonGroup1="customButtonGroup1"
|
|
||||||
@selectGoods="selectGoods"
|
|
||||||
@onHandleClickBuy="onHandleClickBuy"
|
|
||||||
></common-select-goods>
|
|
||||||
<u-popup
|
|
||||||
:show="showInfo"
|
|
||||||
mode="bottom"
|
|
||||||
@close="closeShowInfo"
|
|
||||||
class="popup_box"
|
|
||||||
>
|
|
||||||
<view class="popup_top">
|
<view class="popup_top">
|
||||||
<view class="product_image">
|
<view class="product_image">
|
||||||
<image
|
<image :src="selectGoodsData.productImages" mode="aspectFit" class="goods_image"></image>
|
||||||
:src="selectGoodsData.productImages"
|
|
||||||
mode="aspectFit"
|
|
||||||
class="goods_image"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="title">已选:{{ selectGoodsData.productName }}</view>
|
<view class="title">已选:{{ selectGoodsData.productName }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<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.price }}</text><u-icon
|
||||||
><text class="title_price">¥{{ selectGoodsData.price }}</text
|
name="close" color="#333" size="18" @click="close" style="display: inline-block"></u-icon>
|
||||||
><u-icon
|
</view>
|
||||||
name="close"
|
<view class="title title_list"><text>商品列表({{ goodsList.length }})</text></view>
|
||||||
color="#333"
|
|
||||||
size="18"
|
|
||||||
@click="close"
|
|
||||||
style="display: inline-block"
|
|
||||||
></u-icon
|
|
||||||
></view>
|
|
||||||
<view class="title title_list"
|
|
||||||
><text>商品列表({{ goodsList.length }})</text></view
|
|
||||||
>
|
|
||||||
|
|
||||||
<common-list
|
<common-list imgUrl="url" isNoIcon imgMode="aspectFit" defaultUrl="" :isCondition="true"
|
||||||
imgUrl="url"
|
:dataList="goodsList" @hancleClick="selectGoods" label="title">
|
||||||
isNoIcon
|
|
||||||
imgMode="aspectFit"
|
|
||||||
defaultUrl=""
|
|
||||||
:isCondition="true"
|
|
||||||
:dataList="goodsList"
|
|
||||||
@hancleClick="selectGoods"
|
|
||||||
label="title"
|
|
||||||
>
|
|
||||||
<template slot="labelSlot" slot-scope="slotProps">
|
<template slot="labelSlot" slot-scope="slotProps">
|
||||||
<!-- isSelectGoods -->
|
<!-- isSelectGoods -->
|
||||||
<view
|
<view class="related_courses_name" :class="`goods_item ${
|
||||||
class="related_courses_name"
|
|
||||||
:class="`goods_item ${
|
|
||||||
selectGoodsData &&
|
selectGoodsData &&
|
||||||
selectGoodsData.productId == slotProps.row.productId
|
selectGoodsData.productId == slotProps.row.productId
|
||||||
? '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" mode="aspectFit" class="goods_image"></image>
|
||||||
:src="slotProps.row.productImages"
|
|
||||||
mode="aspectFit"
|
|
||||||
class="goods_image"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view :class="`goods_info `">
|
<view :class="`goods_info `">
|
||||||
<view class="name">{{ slotProps.row.productName }}</view>
|
<view class="name">{{ slotProps.row.productName }}</view>
|
||||||
<view class="price" style="color: #258feb">{{
|
<view class="price" style="color: #258feb">{{
|
||||||
slotProps.row.price
|
slotProps.row.price
|
||||||
}}</view></view
|
}}</view>
|
||||||
>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
||||||
@@ -598,13 +426,8 @@
|
|||||||
</common-list>
|
</common-list>
|
||||||
|
|
||||||
<view class="goods_nav_box">
|
<view class="goods_nav_box">
|
||||||
<uni-goods-nav
|
<uni-goods-nav :fill="true" :options="buyOptions" :button-group="customButtonGroup1"
|
||||||
:fill="true"
|
@click="onHandleClickBuy" @buttonClick="onHandleClickBuy" />
|
||||||
:options="buyOptions"
|
|
||||||
:button-group="customButtonGroup1"
|
|
||||||
@click="onHandleClickBuy"
|
|
||||||
@buttonClick="onHandleClickBuy"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <view>
|
<!-- <view>
|
||||||
<text @click="handleClickClose">取消</text>
|
<text @click="handleClickClose">取消</text>
|
||||||
@@ -620,7 +443,9 @@
|
|||||||
import courseDescription from "@/pages/component/commonComponents/list";
|
import courseDescription from "@/pages/component/commonComponents/list";
|
||||||
|
|
||||||
import $http from "@/config/requestConfig.js";
|
import $http from "@/config/requestConfig.js";
|
||||||
import { mapState } from "vuex";
|
import {
|
||||||
|
mapState
|
||||||
|
} from "vuex";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
courseDescription, //课程说明
|
courseDescription, //课程说明
|
||||||
@@ -673,8 +498,7 @@ export default {
|
|||||||
playData: {},
|
playData: {},
|
||||||
taiHuClassInfo: {},
|
taiHuClassInfo: {},
|
||||||
searchValue: "",
|
searchValue: "",
|
||||||
teachingList: [
|
teachingList: [{
|
||||||
{
|
|
||||||
title: "临床实践",
|
title: "临床实践",
|
||||||
|
|
||||||
type: "02",
|
type: "02",
|
||||||
@@ -712,6 +536,7 @@ export default {
|
|||||||
limitTitle: "提示",
|
limitTitle: "提示",
|
||||||
limitContent: "",
|
limitContent: "",
|
||||||
scrollViewHeight: 0,
|
scrollViewHeight: 0,
|
||||||
|
canGetCouponList: [], // 可获得优惠券列表
|
||||||
urlList: {
|
urlList: {
|
||||||
list: "app/phone.do?getCourseDetail_new",
|
list: "app/phone.do?getCourseDetail_new",
|
||||||
curriculumInfo: "app/phone.do?getCourseInfo",
|
curriculumInfo: "app/phone.do?getCourseInfo",
|
||||||
@@ -719,14 +544,12 @@ export default {
|
|||||||
goodsList: "book/shopproduct/getGlProductList",
|
goodsList: "book/shopproduct/getGlProductList",
|
||||||
visitorDetailInfo: "visitor/getProductDetail", // 游客状态下的商品详情
|
visitorDetailInfo: "visitor/getProductDetail", // 游客状态下的商品详情
|
||||||
},
|
},
|
||||||
customButtonGroup1: [
|
customButtonGroup1: [{
|
||||||
{
|
|
||||||
with: 200,
|
with: 200,
|
||||||
text: "立即购买",
|
text: "立即购买",
|
||||||
backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)",
|
backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)",
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
},
|
}, ],
|
||||||
],
|
|
||||||
requestType: '', // 数据请求类型是否为游客登陆状态
|
requestType: '', // 数据请求类型是否为游客登陆状态
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -810,6 +633,32 @@ export default {
|
|||||||
...mapState(["userInfo"]),
|
...mapState(["userInfo"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取购买后可获得优惠券列表
|
||||||
|
async getCanGetCouponList() {
|
||||||
|
await this.$http
|
||||||
|
.request({
|
||||||
|
url: "common/coupon/couponToProductList",
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
"page": 1,
|
||||||
|
"limit": 100,
|
||||||
|
"productId": this.curriculumData.productId
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async (res) => {
|
||||||
|
if (res.code != 0) return this.$commonJS.showToast(res.errMsg);
|
||||||
|
console.log('res优惠券', res);
|
||||||
|
this.canGetCouponList = res.couponToShopproductPage.records
|
||||||
|
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e);
|
||||||
|
this.$commonJS.showToast(e.errMsg);
|
||||||
|
})
|
||||||
|
},
|
||||||
closeShowInfo() {
|
closeShowInfo() {
|
||||||
this.showInfo = false;
|
this.showInfo = false;
|
||||||
},
|
},
|
||||||
@@ -872,16 +721,14 @@ export default {
|
|||||||
"this.selectGoodsDatathis.selectGoodsDatathis.selectGoodsData"
|
"this.selectGoodsDatathis.selectGoodsDatathis.selectGoodsData"
|
||||||
);
|
);
|
||||||
var mynavData = JSON.stringify({
|
var mynavData = JSON.stringify({
|
||||||
goods: [
|
goods: [{
|
||||||
{
|
|
||||||
productImages: this.selectGoodsData.productImages,
|
productImages: this.selectGoodsData.productImages,
|
||||||
productId: this.selectGoodsData.productId,
|
productId: this.selectGoodsData.productId,
|
||||||
productName: this.selectGoodsData.productName,
|
productName: this.selectGoodsData.productName,
|
||||||
activityPrice: this.selectGoodsData.activityPrice,
|
activityPrice: this.selectGoodsData.activityPrice,
|
||||||
price: this.selectGoodsData.price,
|
price: this.selectGoodsData.price,
|
||||||
goodsType: this.selectGoodsData.goodsType,
|
goodsType: this.selectGoodsData.goodsType,
|
||||||
},
|
}, ],
|
||||||
],
|
|
||||||
|
|
||||||
navTitle: this.options.navTitle,
|
navTitle: this.options.navTitle,
|
||||||
title: this.options.title,
|
title: this.options.title,
|
||||||
@@ -938,8 +785,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.modalInfo = {
|
this.modalInfo = {
|
||||||
title: "提示信息",
|
title: "提示信息",
|
||||||
content:
|
content: "用户您好,该课程已到期,通过支付" +
|
||||||
"用户您好,该课程已到期,通过支付" +
|
|
||||||
fee +
|
fee +
|
||||||
"元,本门课程可获得" +
|
"元,本门课程可获得" +
|
||||||
days +
|
days +
|
||||||
@@ -1009,6 +855,7 @@ export default {
|
|||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
that.selectGoodsData = res.data.GLProducts[0];
|
that.selectGoodsData = res.data.GLProducts[0];
|
||||||
that.curriculumData = res.data.detail;
|
that.curriculumData = res.data.detail;
|
||||||
|
await this.getCanGetCouponList()
|
||||||
that.booksList = res.data.books ? res.data.books : [];
|
that.booksList = res.data.books ? res.data.books : [];
|
||||||
that.coursesList = res.data.courses ? res.data.courses : [];
|
that.coursesList = res.data.courses ? res.data.courses : [];
|
||||||
that.goodsList = res.data.GLProducts;
|
that.goodsList = res.data.GLProducts;
|
||||||
@@ -1328,7 +1175,9 @@ export default {
|
|||||||
transformData(inputData) {
|
transformData(inputData) {
|
||||||
const result = {};
|
const result = {};
|
||||||
inputData.forEach((item) => {
|
inputData.forEach((item) => {
|
||||||
const { letter } = item;
|
const {
|
||||||
|
letter
|
||||||
|
} = item;
|
||||||
if (!result[letter]) {
|
if (!result[letter]) {
|
||||||
result[letter] = [];
|
result[letter] = [];
|
||||||
}
|
}
|
||||||
@@ -1498,6 +1347,117 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import '@/style/mixin.scss';
|
@import '@/style/mixin.scss';
|
||||||
|
|
||||||
|
.tanchu {
|
||||||
|
padding: 0 30rpx 40rpx 30rpx;
|
||||||
|
position: relative;
|
||||||
|
// max-height: 60vh;
|
||||||
|
// overflow-y: scroll;
|
||||||
|
|
||||||
|
.dp_title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
margin-bottom: 50rpx;
|
||||||
|
color: #555;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dp_add {
|
||||||
|
position: absolute;
|
||||||
|
top: 40rpx;
|
||||||
|
right: 30rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
background-color: #fd6004;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 5rpx 10rpx;
|
||||||
|
|
||||||
|
.u-icon {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.addressItem {
|
||||||
|
border: 2px dashed #d9d9d9;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx 10rpx;
|
||||||
|
margin: 25rpx 0 0 0;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
.addrContent {
|
||||||
|
margin-left: 40rpx;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.addrContentTop {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
margin: 0 0 15rpx 0;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.userName {
|
||||||
|
font-size: 35rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userTel {
|
||||||
|
font-size: 25rpx;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userMoren {
|
||||||
|
border: 1px solid #fd6004;
|
||||||
|
color: #fd6004;
|
||||||
|
padding: 3rpx 10rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin: 0 0 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.chooseCheck {
|
||||||
|
position: absolute;
|
||||||
|
top: 3rpx;
|
||||||
|
right: 6rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.addrContentBottom {
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.addressItem.addItem_style {
|
||||||
|
border-color: #fd6004;
|
||||||
|
}
|
||||||
|
|
||||||
|
.youhuiItem {
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx 10rpx;
|
||||||
|
margin: 25rpx 0 0 0;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.youhuiItem>view {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.youhuiItem.youItem_style {
|
||||||
|
border-color: #fd6004;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.u-grid-list {
|
.u-grid-list {
|
||||||
// height: 40rpx;
|
// height: 40rpx;
|
||||||
}
|
}
|
||||||
@@ -2040,12 +2000,14 @@ export default {
|
|||||||
border: 2rpx solid #fff;
|
border: 2rpx solid #fff;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// font-weight: bold;
|
// font-weight: bold;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image_box {
|
.image_box {
|
||||||
width: 70rpx;
|
width: 70rpx;
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
@@ -2057,6 +2019,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods_info {
|
.goods_info {
|
||||||
width: calc(100%);
|
width: calc(100%);
|
||||||
// padding: 10rpx 20rpx;
|
// padding: 10rpx 20rpx;
|
||||||
@@ -2066,27 +2029,34 @@ export default {
|
|||||||
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;
|
||||||
// font-weight: 600;
|
// font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.isSelectGoods {
|
.isSelectGoods {
|
||||||
color: $themeColor !important;
|
color: $themeColor !important;
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
color: $themeColor !important;
|
color: $themeColor !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
color: $themeColor !important;
|
color: $themeColor !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
border: 2rpx solid $themeColor;
|
border: 2rpx solid $themeColor;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.list_item {
|
/deep/.list_item {
|
||||||
// border-bottom: none;
|
// border-bottom: none;
|
||||||
padding: 10rpx 0 !important;
|
padding: 10rpx 0 !important;
|
||||||
@@ -2101,17 +2071,21 @@ export default {
|
|||||||
border: none !important;
|
border: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.parameter_box {
|
.parameter_box {
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods_item {
|
.goods_item {
|
||||||
padding-top: 5rpx !important;
|
padding-top: 5rpx !important;
|
||||||
padding-bottom: 5rpx !important;
|
padding-bottom: 5rpx !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.parameter_info_box {
|
.parameter_info_box {
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.parameter_info {
|
.parameter_info {
|
||||||
/deep/.list_item {
|
/deep/.list_item {
|
||||||
// border-bottom: none;
|
// border-bottom: none;
|
||||||
@@ -2119,10 +2093,12 @@ export default {
|
|||||||
border: none !important;
|
border: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods_item {
|
.goods_item {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.goodsList {
|
.goodsList {
|
||||||
.image_box {
|
.image_box {
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
@@ -2131,23 +2107,28 @@ export default {
|
|||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.u-popup__content {
|
/deep/.u-popup__content {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.u-popup__content__close {
|
/deep/.u-popup__content__close {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title_box {
|
.title_box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
|
||||||
.title_price {
|
.title_price {
|
||||||
color: #ef1224;
|
color: #ef1224;
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title_list {
|
.title_list {
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
@@ -2157,6 +2138,7 @@ export default {
|
|||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods_info {
|
.goods_info {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
<template v-if="v.type == 3">
|
<template v-if="v.type == 3">
|
||||||
<template v-if="!curCoupon.id">
|
<template v-if="!curCoupon.id">
|
||||||
<template v-if="couponHistoryList.length > 0">
|
<template v-if="couponHistoryList.length > 0">
|
||||||
<text style="color: #999" @click="showCouponPup = true">可用({{couponHistoryList.length}})张</text>
|
<text style="color: #999" @click="showCouponPup = true">共({{couponHistoryList.length}})张</text>
|
||||||
<text @click="showCouponPup = true" style="display: inline-block; margin-left: 20rpx; background-color: #fe6035; color: #fff; border-radius: 30rpx;font-size: 26rpx; border: 4rpx #fe6035 solid; ">选择优惠券</text>
|
<text @click="showCouponPup = true" style="display: inline-block; margin-left: 20rpx; background-color: #fe6035; color: #fff; border-radius: 30rpx;font-size: 26rpx; border: 4rpx #fe6035 solid; ">选择优惠券</text>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
|||||||
@@ -1,22 +1,297 @@
|
|||||||
<template>
|
<template>
|
||||||
<view >
|
<view >
|
||||||
优惠券列表
|
<public-module></public-module>
|
||||||
|
<z-nav-bar title="我的优惠券"></z-nav-bar>
|
||||||
|
<view class="">
|
||||||
|
<view class="">
|
||||||
|
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="tabClick" :current="curTagIndex"
|
||||||
|
:activeStyle="activeStyle" :scrollable="false" :list="tabList"
|
||||||
|
itemStyle="padding-left:10rpx; background-color:#fff; padding-right: 10rpx; height: 50px; font-size:26rpx"></u-tabs>
|
||||||
|
</view>
|
||||||
|
<!-- -->
|
||||||
|
<view class="tanchu">
|
||||||
|
<view class="listBox" v-if="list.length > 0">
|
||||||
|
<view style="max-height: 40vh;overflow-y: scroll;" :class="'youhuiItem'"
|
||||||
|
v-for="(item,index) in list" :key="index" >
|
||||||
|
<view style="width: 25%;color:#fd6004;text-align: center;">
|
||||||
|
<text>¥</text>
|
||||||
|
<b style="font-size: 45rpx;">{{item.couponEntity.couponAmount}}</b>
|
||||||
|
<text
|
||||||
|
style="display: block;color: #666;font-size: 25rpx;margin-top: 10rpx;">满{{item.couponEntity.useLevel}}元可用</text>
|
||||||
|
</view>
|
||||||
|
<view style="width: 68%;padding-left: 5%;">
|
||||||
|
<view>
|
||||||
|
<text style="display: inline-block; margin-right: 6rpx;">{{item.couponEntity.couponName}}</text>
|
||||||
|
<text class="border_radius_10" style="font-size: 24rpx; background-color: #fad4bd; color: #666;">{{item.couponEntity.couponRange | couponType}}</text>
|
||||||
|
</view>
|
||||||
|
<text
|
||||||
|
style="display: block;font-size: 20rpx;color: #999;margin-top: 10rpx;">到期时间:{{item.effectType == 0 ? '永久有效' : item.endTime}}</text>
|
||||||
|
<text
|
||||||
|
style="display: block;font-size: 20rpx;color: #999;margin-top: 4rpx;">说明:{{item.couponEntity.remark}}</text>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view style="font-size: 20rpx;color: #aaa;margin-top: 30rpx;">* 每笔订单只能使用一张优惠价</view> -->
|
||||||
|
</view>
|
||||||
|
<view class="" v-else>
|
||||||
|
<u-divider v-show="listStatus == 2" text="已加载全部"></u-divider>
|
||||||
|
<u-divider v-show="listStatus == 3" text="暂无数据"></u-divider>
|
||||||
|
<u-divider v-show="listStatus == 1" text="加载中..."></u-divider>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<z-navigation></z-navigation>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import $http from '@/config/requestConfig.js';
|
||||||
|
import {
|
||||||
|
mapState
|
||||||
|
} from "vuex";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
list:[], // 优惠券列表
|
||||||
|
listStatus:88,
|
||||||
|
curTagIndex:0, // 当前索引
|
||||||
|
tabList: [{
|
||||||
|
name: '未使用',
|
||||||
|
id: '0'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '已使用',
|
||||||
|
id: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '已过期',
|
||||||
|
id: '2'
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
activeStyle:{
|
||||||
|
background:'#fff',
|
||||||
|
color:'#666',
|
||||||
|
padding:"10rpx",
|
||||||
|
borderRadius:"10rpx"
|
||||||
|
},
|
||||||
|
page:0,
|
||||||
|
limit:15,
|
||||||
|
status:0,
|
||||||
|
flag:false, // 请求标记
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
onLoad() {
|
||||||
|
this.page = 1
|
||||||
|
this.getUserCouponList()
|
||||||
|
},
|
||||||
|
async onReachBottom() {
|
||||||
|
console.log('触底',this.listStatus,this.flag);
|
||||||
|
|
||||||
|
if(this.listStatus != 1 && this.listStatus != 2){
|
||||||
|
if(!this.flag){
|
||||||
|
this.page++
|
||||||
|
await this.getUserCouponList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
filters:{
|
||||||
|
couponType(type){
|
||||||
|
// 0无限制 1课程卷 2课程品类卷
|
||||||
|
var str = ''
|
||||||
|
switch (type){
|
||||||
|
case 0:
|
||||||
|
str = '全场通用'
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
str = '指定课程可用'
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
str = '指定课程品类可用'
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["userInfo"]),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async tabClick(e) {
|
||||||
|
console.log('e', e);
|
||||||
|
this.status = e.id
|
||||||
|
// this.curTagIndex = e.index
|
||||||
|
this.page = 0
|
||||||
|
this.page += 1
|
||||||
|
this.list = []
|
||||||
|
await this.getUserCouponList()
|
||||||
|
|
||||||
|
},
|
||||||
|
async getUserCouponList(){
|
||||||
|
console.log('进入函数了妈');
|
||||||
|
this.listStatus = 1
|
||||||
|
this.flag = true
|
||||||
|
uni.showLoading({
|
||||||
|
title:'加载中'
|
||||||
|
})
|
||||||
|
await this.$http
|
||||||
|
.request({
|
||||||
|
url: "common/coupon/getCouponHistoryList",
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
"page": this.page,
|
||||||
|
"limit": this.limit,
|
||||||
|
"getType":"",//获取类型 0 后台赠送 1 主动获取
|
||||||
|
"status": this.status,//使用状态 0 未使用 1 已使用 2 已过期
|
||||||
|
"userInfo":"",//用户信息
|
||||||
|
"userId":this.userInfo.id
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async (res) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
if(res.code != 0) return this.$commonJS.showToast(res.errMsg);
|
||||||
|
if(res.couponList.records.length > 0){
|
||||||
|
this.list = this.list.concat(res.couponList.records)
|
||||||
|
if (res.couponList.pages > this.page) {
|
||||||
|
this.listStatus = 0
|
||||||
|
} else {
|
||||||
|
this.listStatus = 2
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.listStatus = 3 // 暂无数据
|
||||||
|
}
|
||||||
|
this.flag = false
|
||||||
|
|
||||||
|
|
||||||
|
}).catch(e => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log(e);
|
||||||
|
this.flag = false
|
||||||
|
this.listStatus = 3
|
||||||
|
console.log(e, '数据报错')
|
||||||
|
this.$commonJS.showToast(e.errMsg);
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss" scoped>
|
||||||
|
.btnBox {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
.tanchu {
|
||||||
|
padding: 0 30rpx 40rpx 30rpx;
|
||||||
|
position: relative;
|
||||||
|
// max-height: 60vh;
|
||||||
|
// overflow-y: scroll;
|
||||||
|
|
||||||
|
.dp_title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
margin-bottom: 50rpx;
|
||||||
|
color: #555;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dp_add {
|
||||||
|
position: absolute;
|
||||||
|
top: 40rpx;
|
||||||
|
right: 30rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
background-color: #fd6004;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 5rpx 10rpx;
|
||||||
|
|
||||||
|
.u-icon {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.addressItem {
|
||||||
|
border: 2px dashed #d9d9d9;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx 10rpx;
|
||||||
|
margin: 25rpx 0 0 0;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
.addrContent {
|
||||||
|
margin-left: 40rpx;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.addrContentTop {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
margin: 0 0 15rpx 0;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.userName {
|
||||||
|
font-size: 35rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userTel {
|
||||||
|
font-size: 25rpx;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userMoren {
|
||||||
|
border: 1px solid #fd6004;
|
||||||
|
color: #fd6004;
|
||||||
|
padding: 3rpx 10rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin: 0 0 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.chooseCheck {
|
||||||
|
position: absolute;
|
||||||
|
top: 3rpx;
|
||||||
|
right: 6rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.addrContentBottom {
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.addressItem.addItem_style {
|
||||||
|
border-color: #fd6004;
|
||||||
|
}
|
||||||
|
|
||||||
|
.youhuiItem {
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx 10rpx;
|
||||||
|
margin: 25rpx 0 0 0;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.youhuiItem>view {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.youhuiItem.youItem_style {
|
||||||
|
border-color: #fd6004;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user