提交优惠券
This commit is contained in:
@@ -5,37 +5,80 @@
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">请选择优惠券</view>
|
||||
<template v-if="list.length > 0">
|
||||
<view style="max-height:40vh;overflow-y: scroll;">
|
||||
<view :class="youhuiIndex === index ? 'youhuiItem youItem_style' : 'youhuiItem'"
|
||||
v-for="(item,index) in list" :key="index" @click="choseYouhui(index)">
|
||||
<view style="width: 25%;color:#fd6004;text-align: center;">
|
||||
<view style="max-height: 40vh; overflow-y: scroll">
|
||||
<view v-for="(item, index) in list" :key="index">
|
||||
<view
|
||||
:class="`youhuiItem ${
|
||||
youhuiIndex === index ? ' youItem_style' : ''
|
||||
} ${item.canUse === 0 ? 'disableSelect' : ''}`"
|
||||
@click="choseYouhui(index)"
|
||||
><text
|
||||
class="border_radius_10"
|
||||
style="
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 10rpx;
|
||||
font-size: 25rpx;
|
||||
background-color: #ffe3e9;
|
||||
color: #c81346;
|
||||
padding: 6rpx;
|
||||
"
|
||||
>{{ item.couponEntity.couponRange | couponType }}</text
|
||||
>
|
||||
<view
|
||||
style="width: 25%; color: #ff0043; text-align: center"
|
||||
class="couponPrice"
|
||||
>
|
||||
<text>¥</text>
|
||||
<b style="font-size: 45rpx;">{{item.couponEntity.couponAmount}}</b>
|
||||
<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>
|
||||
class="useLevel"
|
||||
style="
|
||||
display: block;
|
||||
color: #666;
|
||||
font-size: 25rpx;
|
||||
margin-top: 10rpx;
|
||||
"
|
||||
>满{{ item.couponEntity.useLevel }}元可用</text
|
||||
>
|
||||
</view>
|
||||
<view style="width: 68%;padding-left: 5%;">
|
||||
<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>
|
||||
<text
|
||||
style="
|
||||
display: inline-block;
|
||||
margin-right: 6rpx;
|
||||
line-height: 36rpx;
|
||||
"
|
||||
>{{ item.couponEntity.couponName }}</text
|
||||
>
|
||||
</view>
|
||||
<text
|
||||
style="display: block;font-size: 20rpx;color: #999;margin-top: 10rpx;">到期时间:{{item.effectType == 0 ? '永久有效' : item.endTime}}</text>
|
||||
style="
|
||||
display: block;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
"
|
||||
>有效期至:{{
|
||||
item.effectType == 0 ? "永久有效" : item.endTime
|
||||
}}</text
|
||||
>
|
||||
<template v-if="item.canUse == 0">
|
||||
<view class="" style="font-size:20rpx; display: inline-block; padding:0 10rpx ; background-color: #d9d9d9; border-radius: 10rpx;">
|
||||
<text
|
||||
style="color: #999; "
|
||||
>不可用:</text>
|
||||
<text
|
||||
style="color: #999; "
|
||||
>{{item.canUseReason}}</text>
|
||||
<view
|
||||
class=""
|
||||
style="font-size: 20rpx; display: inline-block"
|
||||
>
|
||||
<text style="color: #333">不可用原因:</text>
|
||||
<text style="color: #333">{{ item.canUseReason }}</text>
|
||||
</view>
|
||||
</template>
|
||||
<text v-else
|
||||
style="display: block;font-size: 20rpx;color: #999;margin-top: 4rpx;">说明:{{item.couponEntity.remark}}</text>
|
||||
|
||||
</view>
|
||||
<view style="width: 7%;">
|
||||
<view
|
||||
style="width: 7%; position: absolute; right: 20rpx; top: 43%"
|
||||
>
|
||||
<!-- <view class="" style="background-color: #d9d9d9; border-radius: 10rpx; 0 0 10rpx; text-align: center;" v-if="item.canUse == 0">
|
||||
<text
|
||||
style="color: #999; "
|
||||
@@ -44,25 +87,72 @@
|
||||
|
||||
<template v-if="item.canUse == 1">
|
||||
<text
|
||||
style="border: 1px solid #d9d9d9;width: 35rpx;height:35rpx;display:inline-block;border-radius: 30rpx;"
|
||||
v-if="youhuiIndex !== index"></text>
|
||||
style="
|
||||
border: 1px solid #d9d9d9;
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
display: inline-block;
|
||||
border-radius: 30rpx;
|
||||
"
|
||||
v-if="youhuiIndex !== index"
|
||||
></text>
|
||||
|
||||
<u-icon name="checkmark-circle-fill" color="#fd6004" size="20" v-if="youhuiIndex === index">
|
||||
<u-icon
|
||||
name="checkmark-circle-fill"
|
||||
color="#fd6004"
|
||||
size="20"
|
||||
v-if="youhuiIndex === index"
|
||||
>
|
||||
</u-icon>
|
||||
</template>
|
||||
</view>
|
||||
<br clear="both">
|
||||
<br clear="both" />
|
||||
</view>
|
||||
<u-collapse
|
||||
v-if="source != 'goodsDetail' && item.couponEntity.remark"
|
||||
style="
|
||||
margin-top: 0rpx;
|
||||
z-index: 10 !important;
|
||||
background-color: #fafafa;
|
||||
border-bottom-left-radius: 10rpx;
|
||||
border-bottom-right-radius: 10rpx;
|
||||
"
|
||||
:border="false"
|
||||
>
|
||||
<u-collapse-item title="详细信息" name="Docs guide">
|
||||
<view
|
||||
v-if="item.couponEntity.remark"
|
||||
style="
|
||||
font-size: 22rpx;
|
||||
width: 100%;
|
||||
margin-right: 20rpx !important;
|
||||
"
|
||||
>使用说明:{{ item.couponEntity.remark }}</view
|
||||
>
|
||||
</u-collapse-item>
|
||||
</u-collapse>
|
||||
</view>
|
||||
|
||||
<!-- <view style="font-size: 20rpx;color: #aaa;margin-top: 30rpx;">* 每笔订单只能使用一张优惠价</view> -->
|
||||
</view>
|
||||
<view class="btnBox flex_box flex_between">
|
||||
<view class="" style="width: 48%;">
|
||||
<button type="default" @click="confirmCoupon('none')">不使用优惠券</button>
|
||||
<view class="btnBox flex_box flex_between" v-if="selectcouponList.length>0">
|
||||
<view class="" style="width: 48%">
|
||||
<button type="default" @click="confirmCoupon('none')">
|
||||
不使用优惠券
|
||||
</button>
|
||||
</view>
|
||||
<view class="" style="width: 48%;">
|
||||
<view class="" style="width: 48%">
|
||||
<button type="primary" @click="confirmCoupon()">选好了</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnBox flex_box flex_between" v-else>
|
||||
<view class="" style="width: 100%">
|
||||
<button type="default" @click="confirmCoupon('none')">
|
||||
取消
|
||||
</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<view class="" v-else>
|
||||
<u-divider text="暂无可用优惠券哦"></u-divider>
|
||||
@@ -75,79 +165,79 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "orderCoupon",
|
||||
props: ['list', 'curCouponId','sumMeony'],
|
||||
props: ["list", "curCouponId", "sumMeony", "addressId",'selectcouponList'],
|
||||
data() {
|
||||
return {
|
||||
youhuiShow: true,
|
||||
youhuiIndex: undefined
|
||||
youhuiIndex: undefined,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log('进入了', this.curCouponId, this.sumMeony);
|
||||
console.log("进入了", this.curCouponId, this.sumMeony);
|
||||
if (this.curCouponId) {
|
||||
this.youhuiIndex = this.list.findIndex(item => item.couponEntity.id === this.curCouponId);
|
||||
console.log('查找后的结果', this.youhuiIndex);
|
||||
this.youhuiIndex = this.list.findIndex(
|
||||
(item) => item.couponEntity.id === this.curCouponId
|
||||
);
|
||||
console.log("查找后的结果", this.youhuiIndex);
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
couponType(type) {
|
||||
// 0无限制 1课程卷 2课程品类卷
|
||||
var str = ''
|
||||
var str = "";
|
||||
switch (type) {
|
||||
case 0:
|
||||
str = '全场通用'
|
||||
str = "全场通用";
|
||||
break;
|
||||
case 1:
|
||||
str = '指定课程可用'
|
||||
str = "指定课程可用";
|
||||
break;
|
||||
case 2:
|
||||
str = '指定课程品类可用'
|
||||
str = "指定课程品类可用";
|
||||
break;
|
||||
}
|
||||
return str
|
||||
}
|
||||
return str;
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
closePup() {
|
||||
this.youhuiIndex = undefined
|
||||
this.$emit('close')
|
||||
this.youhuiIndex = undefined;
|
||||
this.$emit("close");
|
||||
},
|
||||
// 确定选中优惠券
|
||||
confirmCoupon(str) {
|
||||
console.log(str, '6666');
|
||||
if (str && str == 'none') {
|
||||
console.log(str, "6666");
|
||||
if (str && str == "none") {
|
||||
// 清空优惠券操作
|
||||
this.$emit('confirmCoupon')
|
||||
this.$emit("confirmCoupon");
|
||||
setTimeout(() => {
|
||||
this.closePup()
|
||||
}, 300)
|
||||
return
|
||||
this.closePup();
|
||||
}, 300);
|
||||
return;
|
||||
}
|
||||
if (this.youhuiIndex == 0 || this.youhuiIndex) {
|
||||
this.$emit('confirmCoupon', this.list[this.youhuiIndex])
|
||||
this.$emit("confirmCoupon", this.list[this.youhuiIndex]);
|
||||
setTimeout(() => {
|
||||
this.closePup()
|
||||
}, 300)
|
||||
this.closePup();
|
||||
}, 300);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请选择您要使用的优惠券',
|
||||
icon: "none"
|
||||
})
|
||||
title: "请选择您要使用的优惠券",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
},
|
||||
// 选择优惠券
|
||||
choseYouhui(e) {
|
||||
if (this.list[e].canUse == 0) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
console.log('选中优惠券e', e);
|
||||
this.youhuiIndex = e
|
||||
console.log("选中优惠券e", e);
|
||||
this.youhuiIndex = e;
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -225,7 +315,6 @@
|
||||
margin: 0 0 0 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.chooseCheck {
|
||||
position: absolute;
|
||||
top: 3rpx;
|
||||
@@ -239,23 +328,40 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.addressItem.addItem_style {
|
||||
border-color: #fd6004;
|
||||
}
|
||||
|
||||
.youhuiItem {
|
||||
position: relative;
|
||||
background: linear-gradient(to top right, #fff, #fef2f4);
|
||||
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding: 20rpx 10rpx;
|
||||
|
||||
padding: 50rpx 20rpx 20rpx;
|
||||
margin: 25rpx 0 0 0;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.disableSelect {
|
||||
background: linear-gradient(to top right, #fafafa, #fafafa) !important;
|
||||
|
||||
color: #979797 !important;
|
||||
.couponPrice {
|
||||
color: #979797 !important;
|
||||
}
|
||||
.useLevel {
|
||||
color: #979797 !important;
|
||||
}
|
||||
.border_radius_10 {
|
||||
color: #98989a !important;
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
}
|
||||
.youhuiItem > view {
|
||||
float: left;
|
||||
}
|
||||
@@ -264,4 +370,19 @@
|
||||
border-color: #fd6004;
|
||||
}
|
||||
}
|
||||
::v-deep .u-cell__body {
|
||||
padding-top: 0 !important ;
|
||||
padding-bottom: 0 !important ;
|
||||
z-index: 10 !important ;
|
||||
.u-cell__title-text {
|
||||
color: #333 !important;
|
||||
font-size: 24rpx !important;
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .u-collapse-item__content__text {
|
||||
padding: 10rpx 20rpx !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
@@ -6,9 +6,9 @@ if (process.env.NODE_ENV === 'development') {
|
||||
// socketUrl = "ws://localhost:6001/";
|
||||
// baseUrl = "https://twin-ui.com/demo/";
|
||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
||||
baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
// baseUrl = "http://59.110.212.44:9200/pb/";
|
||||
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/";
|
||||
@@ -16,11 +16,12 @@ if (process.env.NODE_ENV === 'development') {
|
||||
// socketUrl = "ws://8.129.186.35:6001/";
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
// 生产环境11
|
||||
|
||||
// baseUrl = "http://59.110.212.44:9100/pb/";
|
||||
// baseUrl = "https://testapi.nuttyreading.com/";
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/";//磊哥
|
||||
baseUrl = "https://api.nuttyreading.com/"; //1
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
||||
// baseUrl = "https://api.nuttyreading.com/"; //1
|
||||
baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
// baseUrl = "ws://twin-ui.com:6001/";
|
||||
// socketUrl = "ws://twin-ui.com:6001/";
|
||||
}
|
||||
|
||||
2
main.js
2
main.js
@@ -88,6 +88,8 @@ import commonList from '@/pages/component/commonComponents/list.vue'
|
||||
Vue.component('common-list', commonList);
|
||||
import commonVideo from '@/pages/component/commonComponents/video/index.vue'
|
||||
Vue.component('common-video', commonVideo);
|
||||
import commonCoupon from '@/pages/component/commonComponents/coupon/index.vue'
|
||||
Vue.component('common-coupon', commonCoupon);
|
||||
import commonGoodsList from '@/pages/component/commonComponents/goodsList.vue'
|
||||
Vue.component('common-goods-list', commonGoodsList);
|
||||
import commonCurriculumList from '@/pages/component/commonComponents/curriculum.vue'
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
"src" : "图片路径"
|
||||
}
|
||||
],
|
||||
"versionName" : "1.0.28",
|
||||
"versionCode" : 1028,
|
||||
"versionName" : "1.0.31",
|
||||
"versionCode" : 1031,
|
||||
"app-plus" : {
|
||||
"nvueCompiler" : "weex",
|
||||
"compatible" : {
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
<template>
|
||||
<view
|
||||
class="container commonPageBox commonDetailPage"
|
||||
style="background-color: #f6f7fb"
|
||||
>
|
||||
<view class="container commonPageBox commonDetailPage" style="background-color: #f6f7fb">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar
|
||||
title="我的订单"
|
||||
bgColor="#258feb"
|
||||
fontColor="#fff"
|
||||
:backState="2000"
|
||||
>
|
||||
<z-nav-bar title="我的订单" bgColor="#258feb" fontColor="#fff" :backState="2000">
|
||||
<!-- <template slot="left">
|
||||
<u-icon
|
||||
@click="goHome"
|
||||
@@ -26,44 +18,24 @@
|
||||
<!-- <z-nav-bar backState="2000" title="我的订单"></z-nav-bar> -->
|
||||
|
||||
<view class="cateList flexbox">
|
||||
<common-sticky
|
||||
itemStyle="width:20%; height: 68rpx;font-size:24rpx;"
|
||||
:list="ordersTabs"
|
||||
label="name"
|
||||
:currentCateIndex="currentCateIndex"
|
||||
@handleselectCate="ordersTabCLi"
|
||||
></common-sticky>
|
||||
<common-sticky itemStyle="width:20%; height: 68rpx;font-size:24rpx;" :list="ordersTabs" label="name"
|
||||
:currentCateIndex="currentCateIndex" @handleselectCate="ordersTabCLi"></common-sticky>
|
||||
</view>
|
||||
|
||||
<!-- 站位 -->
|
||||
|
||||
<!-- <view v-if="ordersListTab == 1"> -->
|
||||
<view
|
||||
class="order_box"
|
||||
:style="`height: calc(100% - ${(80 + statusBarHeight) * 2}rpx);`"
|
||||
style="background-color: #f2f2f2"
|
||||
>
|
||||
<common-list
|
||||
imgUrl="url"
|
||||
indexKey="orderSn"
|
||||
noDataIcon="data"
|
||||
:isScroll="true"
|
||||
:isLoadingHide="isLoadingHide"
|
||||
:isNoIcon="true"
|
||||
:isCondition="true"
|
||||
:dataList="newList"
|
||||
@hancleClick="toDetail"
|
||||
@lower="onReachBottom1"
|
||||
:pagination="pagination"
|
||||
label="title"
|
||||
>
|
||||
<view class="order_box" :style="`height: calc(100% - ${(80 + statusBarHeight) * 2}rpx);`"
|
||||
style="background-color: #f2f2f2">
|
||||
<common-list imgUrl="url" indexKey="orderSn" noDataIcon="data" :isScroll="true"
|
||||
:isLoadingHide="isLoadingHide" :isNoIcon="true" :isCondition="true" :dataList="newList"
|
||||
@hancleClick="toDetail" @lower="onReachBottom1" :pagination="pagination" label="title">
|
||||
<view slot="labelSlot" slot-scope="slotProps">
|
||||
<view class="orderInfo color_shandow">
|
||||
<view class="mainContent">
|
||||
<view class="btns" style="margin-top: 0rpx">
|
||||
<view class="flexbox opbtns" style="letter-spacing: 1rpx">
|
||||
<view
|
||||
style="
|
||||
<view style="
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -72,71 +44,30 @@
|
||||
color: #9b9b9b;
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
"
|
||||
>{{ slotProps.row.orderSn }}
|
||||
">{{ slotProps.row.orderSn }}
|
||||
|
||||
<u-tag
|
||||
@click="handleCopy(slotProps.row.orderSn, '订单编号')"
|
||||
borderColor="#258feb"
|
||||
color="#258feb"
|
||||
text="复制"
|
||||
plain
|
||||
style="float: right"
|
||||
size="mini"
|
||||
type="success"
|
||||
></u-tag
|
||||
></view>
|
||||
<u-tag @click="handleCopy(slotProps.row.orderSn, '订单编号')" borderColor="#258feb"
|
||||
color="#258feb" text="复制" plain style="float: right" size="mini"
|
||||
type="success"></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item">
|
||||
<view
|
||||
class="item_top"
|
||||
style="margin-top: 10rpx; margin-bottom: 0"
|
||||
>
|
||||
<view class="item_top" style="margin-top: 10rpx; margin-bottom: 0">
|
||||
<view class="source_app"></view>
|
||||
<view style="text-align: left">
|
||||
<text
|
||||
class="orderstatus"
|
||||
v-show="slotProps.row.orderStatus == 0"
|
||||
>未付款</text
|
||||
>
|
||||
<text
|
||||
class="orderstatus"
|
||||
v-show="slotProps.row.orderStatus == 1"
|
||||
>待发货</text
|
||||
>
|
||||
<text
|
||||
class="orderstatus"
|
||||
v-show="slotProps.row.orderStatus == 2"
|
||||
>已发货</text
|
||||
>
|
||||
<text
|
||||
class="orderstatus"
|
||||
v-show="slotProps.row.orderStatus == 3"
|
||||
>交易成功</text
|
||||
>
|
||||
<text
|
||||
class="orderstatus"
|
||||
v-show="slotProps.row.orderStatus == 4"
|
||||
>交易失败</text
|
||||
>
|
||||
<text
|
||||
class="orderstatus"
|
||||
v-show="slotProps.row.orderStatus == 5"
|
||||
>已过期</text
|
||||
>
|
||||
<text class="orderstatus" v-show="slotProps.row.orderStatus == 0">未付款</text>
|
||||
<text class="orderstatus" v-show="slotProps.row.orderStatus == 1">待发货</text>
|
||||
<text class="orderstatus" v-show="slotProps.row.orderStatus == 2">已发货</text>
|
||||
<text class="orderstatus" v-show="slotProps.row.orderStatus == 3">交易成功</text>
|
||||
<text class="orderstatus" v-show="slotProps.row.orderStatus == 4">交易失败</text>
|
||||
<text class="orderstatus" v-show="slotProps.row.orderStatus == 5">已过期</text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="slotProps.row.orderType == 'relearn'"
|
||||
class="bookinfolist"
|
||||
>
|
||||
<image
|
||||
class="feng fengPoint"
|
||||
src="/static/icon/fugou.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view v-if="slotProps.row.orderType == 'relearn'" class="bookinfolist">
|
||||
<image class="feng fengPoint" src="/static/icon/fugou.png" mode="aspectFill">
|
||||
</image>
|
||||
<!-- <view class="description" >课程复读订单
|
||||
</view> -->
|
||||
<view class="btns flexbox">
|
||||
@@ -144,14 +75,12 @@
|
||||
{{ slotProps.row.remark }}
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="
|
||||
<view style="
|
||||
line-height: 58rpx;
|
||||
color: #333;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
"
|
||||
>
|
||||
">
|
||||
<text style="font-size: 20rpx"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -162,106 +91,70 @@
|
||||
下单时间:{{ slotProps.row.createTime }}
|
||||
</view> -->
|
||||
</view>
|
||||
<view
|
||||
v-if="slotProps.row.orderType == 'vip'"
|
||||
class="bookinfolist"
|
||||
>
|
||||
<image
|
||||
class="feng fengPoint"
|
||||
src="/static/icon/vip.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view v-if="slotProps.row.orderType == 'vip'" class="bookinfolist">
|
||||
<image class="feng fengPoint" src="/static/icon/vip.png" mode="aspectFill"></image>
|
||||
<!-- <view class="description" v-html="item.content">
|
||||
</view> -->
|
||||
<view class="btns flexbox">
|
||||
<view class="booknameleft">
|
||||
{{ slotProps.row.vipBuyConfigEntity.title }}
|
||||
{{ slotProps.row.vipBuyConfigEntity?slotProps.row.vipBuyConfigEntity.title:' ' }}
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="
|
||||
<view style="
|
||||
line-height: 58rpx;
|
||||
color: #333;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
"
|
||||
>
|
||||
">
|
||||
<text style="font-size: 20rpx"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="btns flexbox"
|
||||
style="color: #9f9f9f; margin-top: 10rpx; font-size: 24rpx"
|
||||
>
|
||||
<view class="btns flexbox"
|
||||
style="color: #9f9f9f; margin-top: 10rpx; font-size: 24rpx">
|
||||
下单时间:{{ slotProps.row.createTime }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
v-if="slotProps.row.orderType == 'point'"
|
||||
class="bookinfolist"
|
||||
>
|
||||
<image
|
||||
class="feng fengPoint"
|
||||
src="/static/icon/pay_3.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view v-if="slotProps.row.orderType == 'point'" class="bookinfolist">
|
||||
<image class="feng fengPoint" src="/static/icon/pay_3.png" mode="aspectFill">
|
||||
</image>
|
||||
<!-- <view class="description" v-html="item.content">
|
||||
</view> -->
|
||||
<view class="btns flexbox">
|
||||
<view class="booknameleft">
|
||||
充值
|
||||
{{ slotProps.row.bookBuyConfigEntity.money }}天医币</view
|
||||
>
|
||||
{{ slotProps.row.bookBuyConfigEntity.money }}天医币
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="
|
||||
<view style="
|
||||
line-height: 58rpx;
|
||||
color: #333;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
"
|
||||
>
|
||||
">
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="btns flexbox"
|
||||
style="color: #9f9f9f; margin-top: 10rpx; font-size: 24rpx"
|
||||
>
|
||||
<view class="btns flexbox"
|
||||
style="color: #9f9f9f; margin-top: 10rpx; font-size: 24rpx">
|
||||
下单时间:{{ slotProps.row.createTime }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="slotProps.row.orderType == 'order'">
|
||||
<view
|
||||
v-for="(item2, index2) in slotProps.row.productList"
|
||||
:key="slotProps.row.orderId"
|
||||
class="bookinfolist"
|
||||
>
|
||||
<view v-for="(item2, index2) in slotProps.row.productList"
|
||||
:key="slotProps.row.orderId" class="bookinfolist">
|
||||
<view v-if="item2.product">
|
||||
<view
|
||||
class="feng"
|
||||
v-if="item2.product && item2.product.productImages"
|
||||
>
|
||||
<image
|
||||
:key="Date.now()"
|
||||
style="width: 100%; height: 100%"
|
||||
mode="aspectFit"
|
||||
:src="item2.product.productImages"
|
||||
></image>
|
||||
<view class="feng" v-if="item2.product && item2.product.productImages">
|
||||
<image :key="Date.now()" style="width: 100%; height: 100%"
|
||||
mode="aspectFit" :src="item2.product.productImages"></image>
|
||||
</view>
|
||||
|
||||
<view
|
||||
v-else
|
||||
class="feng"
|
||||
style="
|
||||
<view v-else class="feng" style="
|
||||
color: #c0c4cc;
|
||||
font-size: 22rpx;
|
||||
line-height: 140rpx;
|
||||
text-align: center;
|
||||
"
|
||||
>暂无封面图</view
|
||||
>
|
||||
">暂无封面图</view>
|
||||
<!-- <view class="description" v-html="item.content">
|
||||
</view> -->
|
||||
<view class="btns flexbox">
|
||||
@@ -271,26 +164,21 @@
|
||||
: ""
|
||||
}}</view>
|
||||
|
||||
<view
|
||||
style="
|
||||
<view style="
|
||||
line-height: 58rpx;
|
||||
color: #333;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
"
|
||||
>
|
||||
">
|
||||
<text style="font-size: 20rpx">¥</text>
|
||||
{{
|
||||
item2.product.price ? item2.product.price : ""
|
||||
}}</view
|
||||
>
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns flexbox" style="margin-top: 10rpx">
|
||||
<view class="left" style="color: #c0c4cc"></view>
|
||||
<view
|
||||
class="right flexbox opbtns"
|
||||
style="color: #c0c4cc"
|
||||
>
|
||||
<view class="right flexbox opbtns" style="color: #c0c4cc">
|
||||
×{{ item2.quantity ? item2.quantity : "" }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -298,13 +186,8 @@
|
||||
<view v-else>
|
||||
<view class="feng"></view>
|
||||
<view class="btns flexbox">
|
||||
<view class="booknameleft" style="color: #181818"
|
||||
>未知商品</view
|
||||
>
|
||||
<view
|
||||
style=""
|
||||
class="right flexbox opbtns product_quantity"
|
||||
>
|
||||
<view class="booknameleft" style="color: #181818">未知商品</view>
|
||||
<view style="" class="right flexbox opbtns product_quantity">
|
||||
×{{ item2.quantity ? item2.quantity : "" }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -313,147 +196,94 @@
|
||||
</view>
|
||||
|
||||
<view style="margin-top: 10rpx; overflow: hidden">
|
||||
<view
|
||||
class="btns flexbox"
|
||||
style="float: right; width: auto !important"
|
||||
>
|
||||
<view
|
||||
class="right flexbox opbtns"
|
||||
style="
|
||||
<view class="btns flexbox" style="float: right; width: auto !important">
|
||||
<view class="right flexbox opbtns" style="
|
||||
width: auto;
|
||||
line-height: 44rpx;
|
||||
letter-spacing: 1rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<view
|
||||
style="
|
||||
">
|
||||
<view style="
|
||||
line-height: 46rpx;
|
||||
color: #000;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
margin-right: 10rpx;
|
||||
"
|
||||
>实付款</view
|
||||
>
|
||||
<view
|
||||
style="
|
||||
">实付款</view>
|
||||
<view style="
|
||||
/* margin-top: 8rpx; */
|
||||
line-height: 46rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
"
|
||||
>
|
||||
">
|
||||
<text style="font-size: 20rpx">¥</text>
|
||||
{{
|
||||
slotProps.row.realMoney ||
|
||||
slotProps.row.realMoney == 0
|
||||
? slotProps.row.realMoney
|
||||
: ""
|
||||
}}</view
|
||||
>
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="btns flexbox"
|
||||
style="
|
||||
</view>
|
||||
<view class="btns flexbox" style="
|
||||
margin-top: 0rpx;
|
||||
float: right;
|
||||
width: auto;
|
||||
margin-left: 20rpx;
|
||||
"
|
||||
v-if="
|
||||
" v-if="
|
||||
(slotProps.row.addressId == 0 ||
|
||||
slotProps.row.addressId == null) &&
|
||||
slotProps.row.orderType == 'order' &&
|
||||
slotProps.row.jfDeduction > 0
|
||||
"
|
||||
>
|
||||
<view
|
||||
class="right flexbox opbtns"
|
||||
style="
|
||||
">
|
||||
<view class="right flexbox opbtns" style="
|
||||
line-height: 44rpx;
|
||||
letter-spacing: 1rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
><text style="color: #9b9b9b">( </text>
|
||||
<view
|
||||
style="
|
||||
"><text style="color: #9b9b9b">( </text>
|
||||
<view style="
|
||||
line-height: 46rpx;
|
||||
color: #9b9b9b;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
margin-right: 10rpx;
|
||||
"
|
||||
>积分抵扣</view
|
||||
>
|
||||
<view
|
||||
style="
|
||||
">积分抵扣</view>
|
||||
<view style="
|
||||
/* margin-top: 8rpx; */
|
||||
line-height: 46rpx;
|
||||
color: #9b9b9b;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
"
|
||||
>
|
||||
">
|
||||
<text style="font-size: 20rpx">¥</text>
|
||||
{{ slotProps.row.jfDeduction }}
|
||||
</view> </view
|
||||
><text style="color: #9b9b9b">)</text>
|
||||
</view>
|
||||
</view><text style="color: #9b9b9b">)</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="operation_box boxShadow"
|
||||
v-if="slotProps.row.isShowMore == true"
|
||||
>
|
||||
<view
|
||||
v-if="slotProps.row.orderStatus == 0"
|
||||
@click.native.stop="canceOrder(slotProps.row)"
|
||||
>取消订单</view
|
||||
>
|
||||
<view class="operation_box boxShadow" v-if="slotProps.row.isShowMore == true">
|
||||
<view v-if="slotProps.row.orderStatus == 0"
|
||||
@click.native.stop="canceOrder(slotProps.row)">取消订单</view>
|
||||
</view>
|
||||
<view class="btns flexbox" style="margin-top: 10rpx">
|
||||
<view
|
||||
class="left"
|
||||
style="color: #c0c4cc"
|
||||
@click.native.stop="
|
||||
<view class="left" style="color: #c0c4cc" @click.native.stop="
|
||||
openMore(slotProps.row, slotProps.rowIndex)
|
||||
"
|
||||
>更多</view
|
||||
>
|
||||
">更多</view>
|
||||
<view class="right flexbox opbtns">
|
||||
<view
|
||||
class="orderstatusbtn orderstatusbtn_success"
|
||||
<view class="orderstatusbtn orderstatusbtn_success"
|
||||
v-if="slotProps.row.orderStatus == 0 && slotProps.row.paymentMethod != 3"
|
||||
@click.stop="goPay(slotProps.row)"
|
||||
>继续付款</view
|
||||
>
|
||||
<view
|
||||
class="orderstatusbtn"
|
||||
v-if="slotProps.row.orderStatus == 1"
|
||||
>催发货</view
|
||||
>
|
||||
<view
|
||||
class="orderstatusbtn"
|
||||
v-if="slotProps.row.orderStatus == 2"
|
||||
@click.native.stop="seeExpressDetail(slotProps.row)"
|
||||
>查看物流</view
|
||||
>
|
||||
<view
|
||||
class="orderstatusbtn"
|
||||
v-if="slotProps.row.orderStatus == 2"
|
||||
@click.native.stop="OverOrder(slotProps.row)"
|
||||
>确认收货</view
|
||||
>
|
||||
<view
|
||||
class="orderstatusbtn"
|
||||
v-if="slotProps.row.orderStatus == 3"
|
||||
>申请售后</view
|
||||
>
|
||||
@click.stop="goPay(slotProps.row)">继续付款</view>
|
||||
<view class="orderstatusbtn" v-if="slotProps.row.orderStatus == 1">催发货</view>
|
||||
<view class="orderstatusbtn" v-if="slotProps.row.orderStatus == 2"
|
||||
@click.native.stop="seeExpressDetail(slotProps.row)">查看物流</view>
|
||||
<view class="orderstatusbtn" v-if="slotProps.row.orderStatus == 2"
|
||||
@click.native.stop="OverOrder(slotProps.row)">确认收货</view>
|
||||
<view class="orderstatusbtn" v-if="slotProps.row.orderStatus == 3">申请售后</view>
|
||||
<!-- <view
|
||||
class="orderstatusbtn"
|
||||
v-if="item.orderStatus == 3 && userRecordid == null"
|
||||
@@ -464,10 +294,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="border-bottom: 2rpx solid #e9e9e9; height: 50rpx"
|
||||
v-if="slotProps.rowIndex < slotProps.row.length - 1"
|
||||
></view>
|
||||
<view style="border-bottom: 2rpx solid #e9e9e9; height: 50rpx"
|
||||
v-if="slotProps.rowIndex < slotProps.row.length - 1"></view>
|
||||
</view>
|
||||
<!-- <view class="btns" style="margin-top: 10rpx">
|
||||
<view class="flexbox opbtns" style="">
|
||||
@@ -532,94 +360,49 @@
|
||||
</uni-forms>
|
||||
<!-- <u-button type="success" @click="submitPJ">提交评价</u-button> -->
|
||||
<!-- 提交 -->
|
||||
<view
|
||||
class="padding-bottom-sm flex padding-lr-sm"
|
||||
style="border-bottom: 1px solid #eeeeee"
|
||||
>
|
||||
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #eeeeee">
|
||||
<view class="mb30" v-if="pjType != 'zhuiping'">
|
||||
<view
|
||||
:class="['star', Pform.star >= 1 ? 'starLight' : 'starGray']"
|
||||
@click="getStar(1)"
|
||||
></view>
|
||||
<view
|
||||
:class="['star', Pform.star >= 2 ? 'starLight' : 'starGray']"
|
||||
@click="getStar(2)"
|
||||
></view>
|
||||
<view
|
||||
:class="['star', Pform.star >= 3 ? 'starLight' : 'starGray']"
|
||||
@click="getStar(3)"
|
||||
></view>
|
||||
<view
|
||||
:class="['star', Pform.star >= 4 ? 'starLight' : 'starGray']"
|
||||
@click="getStar(4)"
|
||||
></view>
|
||||
<view
|
||||
:class="['star', Pform.star >= 5 ? 'starLight' : 'starGray']"
|
||||
@click="getStar(5)"
|
||||
></view>
|
||||
<view :class="['star', Pform.star >= 1 ? 'starLight' : 'starGray']" @click="getStar(1)">
|
||||
</view>
|
||||
<view :class="['star', Pform.star >= 2 ? 'starLight' : 'starGray']" @click="getStar(2)">
|
||||
</view>
|
||||
<view :class="['star', Pform.star >= 3 ? 'starLight' : 'starGray']" @click="getStar(3)">
|
||||
</view>
|
||||
<view :class="['star', Pform.star >= 4 ? 'starLight' : 'starGray']" @click="getStar(4)">
|
||||
</view>
|
||||
<view :class="['star', Pform.star >= 5 ? 'starLight' : 'starGray']" @click="getStar(5)">
|
||||
</view>
|
||||
</view>
|
||||
<view class="mb30" v-if="pjType != 'zhuiping'">
|
||||
<!-- <uni-file-picker :auto-upload="false" ref="files" @delete="deleteImg" limit="5" @success="upSuccess" @select="select" v-model="Pform.img" fileMediatype="image" :image-styles="imageStyles"/> -->
|
||||
<u-upload
|
||||
:fileList="Pform.img"
|
||||
@afterRead="afterRead"
|
||||
@delete="deletePic"
|
||||
multiple
|
||||
:maxCount="4"
|
||||
width="80"
|
||||
height="80"
|
||||
:previewFullImage="true"
|
||||
>
|
||||
<u-upload :fileList="Pform.img" @afterRead="afterRead" @delete="deletePic" multiple
|
||||
:maxCount="4" width="80" height="80" :previewFullImage="true">
|
||||
</u-upload>
|
||||
</view>
|
||||
<view class="flex-sub flexbox">
|
||||
<i @click="showEmj()" :class="emojiIcon"></i>
|
||||
<!-- <input type="text" @focus="InputFocus" @blur="InputBlur" v-model="message" @input="textareaBInput" placeholder-style="font-size:24rpx;color:#aaaaaa;" placeholder="请输入您要发送的内容"></input> -->
|
||||
<textarea
|
||||
class="textarea"
|
||||
v-model="Pform.comment"
|
||||
@focus="InputFocus"
|
||||
@blur="InputBlur"
|
||||
@input="textareaBInput"
|
||||
placeholder-style="font-size:24rpx;color:#aaaaaa;"
|
||||
placeholder="请输入您要发送的内容"
|
||||
></textarea>
|
||||
<textarea class="textarea" v-model="Pform.comment" @focus="InputFocus" @blur="InputBlur"
|
||||
@input="textareaBInput" placeholder-style="font-size:24rpx;color:#aaaaaa;"
|
||||
placeholder="请输入您要发送的内容"></textarea>
|
||||
</view>
|
||||
<view class="">
|
||||
<!-- <button class="cu-btn bg-gradual-blue shadow-blur">发送</button> -->
|
||||
<u-button
|
||||
type="success"
|
||||
@click="submitPJ"
|
||||
v-if="pjType != 'zhuiping'"
|
||||
>提交评价</u-button
|
||||
>
|
||||
<u-button type="success" @click="zhuiping" v-else
|
||||
>提交追评</u-button
|
||||
>
|
||||
<u-button type="success" @click="submitPJ" v-if="pjType != 'zhuiping'">提交评价</u-button>
|
||||
<u-button type="success" @click="zhuiping" v-else>提交追评</u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="position: relative">
|
||||
<emotion
|
||||
@emotion="handleEmj"
|
||||
:height="220"
|
||||
v-if="isShowEmj"
|
||||
:windowWidth="windowWidth"
|
||||
></emotion>
|
||||
<emotion @emotion="handleEmj" :height="220" v-if="isShowEmj" :windowWidth="windowWidth">
|
||||
</emotion>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<z-navigation></z-navigation>
|
||||
<u-action-sheet
|
||||
:closeOnClickAction="true"
|
||||
:closeOnClickOverlay="true"
|
||||
:actions="moreList"
|
||||
:show="isShowMore"
|
||||
cancelText="关闭"
|
||||
@close="isShowMore = false"
|
||||
@select="selectClick"
|
||||
></u-action-sheet>
|
||||
<u-action-sheet :closeOnClickAction="true" :closeOnClickOverlay="true" :actions="moreList" :show="isShowMore"
|
||||
cancelText="关闭" @close="isShowMore = false" @select="selectClick"></u-action-sheet>
|
||||
<!-- <music-play :playData="playData"></music-play> -->
|
||||
</view>
|
||||
</template>
|
||||
@@ -628,9 +411,16 @@
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import emotion from "@/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue";
|
||||
// import musicPlay from "@/components/music.vue";
|
||||
import { setPay, setPayAssign, setWXPay } from "@/config/utils";
|
||||
import {
|
||||
setPay,
|
||||
setPayAssign,
|
||||
setWXPay
|
||||
} from "@/config/utils";
|
||||
// import { data } from 'jquery';
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -638,12 +428,10 @@ export default {
|
||||
come: "2",
|
||||
isShowTab: false,
|
||||
isLoadingHide: false,
|
||||
moreList: [
|
||||
{
|
||||
moreList: [{
|
||||
name: "取消订单",
|
||||
key: "false",
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
currentCateIndex: 0,
|
||||
pagination: {
|
||||
// 请求参数
|
||||
@@ -668,8 +456,7 @@ export default {
|
||||
status: 3,
|
||||
shupingList: [],
|
||||
bfaid: null,
|
||||
ordersTabs: [
|
||||
{
|
||||
ordersTabs: [{
|
||||
name: "全部",
|
||||
value: -1,
|
||||
badge: {},
|
||||
@@ -848,8 +635,7 @@ export default {
|
||||
// url:'../bookShop/commentsDetail?bookid='+val.bookid+'&bfa_id='+val.id
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/bookShop/orderLCont?orderId=" +
|
||||
url: "/pages/bookShop/orderLCont?orderId=" +
|
||||
val.orderId +
|
||||
"&orderType=" +
|
||||
val.orderStatus +
|
||||
@@ -957,8 +743,7 @@ export default {
|
||||
console.log(payItem, "订单数据");
|
||||
if (payItem.paymentMethod == 2) {
|
||||
console.log("阿里支付");
|
||||
setPay(
|
||||
{
|
||||
setPay({
|
||||
typePay: "alipay",
|
||||
subject: "order",
|
||||
totalAmount: payItem.realMoney,
|
||||
@@ -1110,8 +895,7 @@ export default {
|
||||
// }else if(this.sheetList.length == 1){
|
||||
// 直接展示详情
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"./deliverDetail?orderSn=" +
|
||||
url: "./deliverDetail?orderSn=" +
|
||||
item.orderSn +
|
||||
"&expressOrderSn=" +
|
||||
item.expressList[0].expressOrderSn,
|
||||
@@ -1153,8 +937,7 @@ export default {
|
||||
this.getBookList(this.ordersListTab, false);
|
||||
}
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
}
|
||||
} else if (res.cancel) {}
|
||||
},
|
||||
});
|
||||
},
|
||||
@@ -1284,7 +1067,10 @@ export default {
|
||||
this.emoji = this.emoji.slice(0, -1);
|
||||
}
|
||||
} else {
|
||||
this.emoji.push({ tag: i.emotion, name: i.emotioni });
|
||||
this.emoji.push({
|
||||
tag: i.emotion,
|
||||
name: i.emotioni
|
||||
});
|
||||
// console.log(this.emoji,'this.emoji')
|
||||
this.Pform.comment += i.emotioni;
|
||||
/// this.Pform.html += i.emotion
|
||||
@@ -1300,6 +1086,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.ordersTabs {
|
||||
// margin: 70rpx 0 0 0;
|
||||
width: 730rpx;
|
||||
@@ -1317,6 +1104,7 @@ export default {
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
position: relative;
|
||||
|
||||
.ordersnum {
|
||||
position: absolute;
|
||||
top: 8rpx;
|
||||
@@ -1338,6 +1126,7 @@ export default {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.orderstatusbtn {
|
||||
width: 160rpx !important;
|
||||
height: 60rpx;
|
||||
@@ -1350,30 +1139,37 @@ export default {
|
||||
margin-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.orderstatusbtn_success {
|
||||
color: #f5342b;
|
||||
border-color: #f5342b;
|
||||
}
|
||||
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.star {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.starGray {
|
||||
background: url(../../static/icon/star_greey.png) no-repeat;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.starLight {
|
||||
background: url(../../static/icon/star_light.png) no-repeat;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.cuIcon-emoji {
|
||||
background: url(../../static/biaoqing.png) no-repeat;
|
||||
background-size: contain;
|
||||
@@ -1381,12 +1177,14 @@ export default {
|
||||
margin-right: 20rpx;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.cuIcon-keyboard {
|
||||
background: url(../../static/biaoqing.png) no-repeat;
|
||||
background-size: contain;
|
||||
display: block;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.tanchu {
|
||||
padding: 40rpx 30rpx 40rpx 30rpx;
|
||||
position: relative;
|
||||
@@ -1423,12 +1221,14 @@ export default {
|
||||
padding-bottom: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.gengduoshuping {
|
||||
text-align: right;
|
||||
color: #0044ff;
|
||||
padding-bottom: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.orderInfo {
|
||||
position: relative;
|
||||
justify-content: space-between;
|
||||
@@ -1440,23 +1240,28 @@ export default {
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.bookinfolist {
|
||||
width: 100%;
|
||||
margin-bottom: 20rpx;
|
||||
overflow: hidden;
|
||||
// height: 180rpx;
|
||||
}
|
||||
|
||||
.bookinfolist:nth-last-child(1) {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.operation_box {
|
||||
position: absolute;
|
||||
bottom: 20rpx;
|
||||
left: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.mainContent {
|
||||
background-color: #fff;
|
||||
|
||||
.item {
|
||||
// padding: 10px;
|
||||
// margin-bottom: 30rpx;
|
||||
@@ -1466,6 +1271,7 @@ export default {
|
||||
border-radius: 20rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.feng {
|
||||
background-color: #fafafa;
|
||||
margin: 0rpx 22rpx 0 0;
|
||||
@@ -1475,16 +1281,19 @@ export default {
|
||||
border-radius: 14rpx;
|
||||
// border: 1rpx solid #e9e9e9;
|
||||
}
|
||||
|
||||
.point_box {
|
||||
.booknameleft {
|
||||
line-height: 70rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.fengPoint {
|
||||
background-color: #fff;
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
}
|
||||
|
||||
.item_top {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@@ -1492,12 +1301,14 @@ export default {
|
||||
justify-content: space-between;
|
||||
|
||||
margin-bottom: 25rpx;
|
||||
|
||||
.source_app {
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
line-height: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.orderstatus {
|
||||
line-height: 24rpx;
|
||||
font-size: 24rpx;
|
||||
@@ -1505,6 +1316,7 @@ export default {
|
||||
text-align: right;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
|
||||
/deep/.description {
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
@@ -1519,14 +1331,17 @@ export default {
|
||||
margin-bottom: 20rpx;
|
||||
margin-top: 10rpx;
|
||||
height: 172rpx;
|
||||
|
||||
img {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
font-size: 28rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.booknameleft {
|
||||
font-size: 32rpx;
|
||||
width: calc(100% - 200rpx);
|
||||
@@ -1534,19 +1349,23 @@ export default {
|
||||
letter-spacing: 0.5rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.left {
|
||||
width: 300rpx;
|
||||
color: #a1a1a1;
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 350rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.price {
|
||||
width: 120rpx;
|
||||
}
|
||||
|
||||
.gzicon {
|
||||
margin: 0 0 0 20rpx;
|
||||
height: 40rpx;
|
||||
@@ -1555,6 +1374,7 @@ export default {
|
||||
// border-radius: 20rpx;
|
||||
// border:1rpx solid #e9e9e9;
|
||||
}
|
||||
|
||||
.opbtns {
|
||||
.pingjia {
|
||||
margin-left: 10px;
|
||||
@@ -1562,6 +1382,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mb30 {
|
||||
margin-bottom: 30rpx;
|
||||
overflow: hidden;
|
||||
@@ -1592,32 +1413,40 @@ export default {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/.u-tabs__wrapper__nav__item__text {
|
||||
// font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.cateList {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/.u-tabs__wrapper__nav__item {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.commonDetailPage {
|
||||
background-color: $themeBgColor;
|
||||
}
|
||||
|
||||
.order_box {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
/deep/.order_box .list_item {
|
||||
// border-bottom: none;
|
||||
padding: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.product_quantity {
|
||||
width: auto;
|
||||
color: #9b9b9b;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
/deep/.commonDetailPage {
|
||||
.uni-app--showtabbar uni-page-wrapper::after {
|
||||
height: 0 !important;
|
||||
|
||||
287
pages/component/commonComponents/coupon/index.vue
Normal file
287
pages/component/commonComponents/coupon/index.vue
Normal file
@@ -0,0 +1,287 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-for="(item, index) in List" :key="index">
|
||||
<view :class="`youhuiItem ${itemClass}`">
|
||||
<view class="centerbg">
|
||||
<view class="centerView" style="position: relative"
|
||||
><text
|
||||
v-if="source == 'mine'"
|
||||
class="border_radius_10"
|
||||
style="
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
top: 10rpx;
|
||||
font-size: 25rpx;
|
||||
/* background-color: #fad4bd; */
|
||||
color: #ed2a2e;
|
||||
"
|
||||
>{{ item.couponEntity.couponRange | couponType }}</text
|
||||
>
|
||||
<view style="color: #fd4347; width: 200rpx">
|
||||
<view
|
||||
style="position: relative; border-right: 1px dashed #fa8277"
|
||||
>
|
||||
<text
|
||||
style="
|
||||
font-weight: 700;
|
||||
font-size: 40rpx;
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
left: 0rpx;
|
||||
"
|
||||
>¥</text
|
||||
>
|
||||
<text
|
||||
style="
|
||||
font-size: 64rpx;
|
||||
letter-spacing: 0.1px;
|
||||
font-weight: 700;
|
||||
margin-left: 40rpx;
|
||||
"
|
||||
>{{ item.couponEntity.couponAmount }}</text
|
||||
>
|
||||
<text
|
||||
v-if="source == 'mine'"
|
||||
style="
|
||||
display: block;
|
||||
color: #333;
|
||||
font-size: 25rpx;
|
||||
margin-left: 0rpx;
|
||||
margin-top: 0rpx;
|
||||
"
|
||||
>满{{ item.couponEntity.useLevel }}元可用</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: calc(100% - 220rpx)">
|
||||
<view>
|
||||
<view
|
||||
style="color: #fd4347; font-size: 44rpx; font-weight: bold;"
|
||||
>{{
|
||||
item.couponEntity.couponType == 0 ? "现金" : "折扣"
|
||||
}}优惠券
|
||||
|
||||
|
||||
<!-- <text v-if="source == 'mine'" style="box-sizing: border-box;padding:4rpx 20rpx;margin-left: 10rpx;font-size: 24rpx;background-color: #fff;border-radius: 24rpx;float: right;">去使用</text> -->
|
||||
|
||||
|
||||
|
||||
|
||||
</view
|
||||
>
|
||||
|
||||
|
||||
<text
|
||||
v-if="source != 'goodsDetail'"
|
||||
style="
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
margin-top: 10rpx;
|
||||
"
|
||||
>有效期至:{{
|
||||
item.effectType == 0 ? "永久有效" : item.endTime
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottombg">
|
||||
<view
|
||||
style="
|
||||
width: 100%;
|
||||
padding: 16rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
margin-right: 6rpx;
|
||||
position: absolute;
|
||||
bottom: 0rpx;
|
||||
text-align: center;
|
||||
"
|
||||
>
|
||||
<view
|
||||
class="title"
|
||||
style="
|
||||
line-height: 34rpx;
|
||||
margin-bottom: 10rpx;
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
"
|
||||
>
|
||||
{{ item.couponEntity.couponName }}
|
||||
</view>
|
||||
<view
|
||||
v-if="item.couponEntity.remark"
|
||||
style="
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
bottom: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
font-size: 22rpx;
|
||||
color: #fafafa;
|
||||
"
|
||||
>
|
||||
<!-- 详细信息
|
||||
<u-icon
|
||||
size="20rpx"
|
||||
color="#fafafa"
|
||||
style="color: #fafafa; float: right;margin-left: 4rpx;"
|
||||
name="arrow-down-fill"
|
||||
></u-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-collapse
|
||||
v-if="source != 'goodsDetail'&&item.couponEntity.remark"
|
||||
style="
|
||||
margin-top: 0rpx;
|
||||
z-index: 10 !important;
|
||||
background-color: #fafafa;
|
||||
border-bottom-left-radius: 10rpx;
|
||||
border-bottom-right-radius: 10rpx;
|
||||
"
|
||||
:border="false"
|
||||
>
|
||||
<u-collapse-item title="详细信息" name="Docs guide">
|
||||
<view
|
||||
style="
|
||||
font-size: 22rpx;
|
||||
width: 100%;
|
||||
margin-right: 20rpx !important;
|
||||
"
|
||||
>使用说明:{{ item.couponEntity.remark }}</view
|
||||
>
|
||||
</u-collapse-item>
|
||||
</u-collapse>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
props: ["List", "source", "itemClass"],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
|
||||
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: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.youhuiItem {
|
||||
min-height: 320rpx;
|
||||
position: relative;
|
||||
background: linear-gradient(to top right, #fd4c50, #fe393d);
|
||||
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
|
||||
padding: 26rpx;
|
||||
margin: 25rpx 0 0 0;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.centerbg {
|
||||
width: 100%;
|
||||
background-image: linear-gradient(60deg, #ffefd3 0%, #f8be85 100%);
|
||||
|
||||
height: calc(100%);
|
||||
border-radius: 10rpx;
|
||||
padding-bottom: 86rpx;
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.centerView {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
padding: 30rpx 20rpx 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.bottombg {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
||||
background-image: url("@/static/icon/coupon/bottom.png") !important;
|
||||
}
|
||||
|
||||
.youhuiItem > view {
|
||||
}
|
||||
|
||||
.youhuiItem.youItem_style {
|
||||
border-color: #fd6004;
|
||||
}
|
||||
|
||||
::v-deep .u-cell__body {
|
||||
padding-top: 0 !important ;
|
||||
padding-bottom: 0 !important ;
|
||||
z-index: 10 !important ;
|
||||
.u-cell__title-text {
|
||||
color: #333 !important;
|
||||
font-size: 24rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .u-collapse-item__content__text {
|
||||
padding: 10rpx 20rpx !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
::v-deep.itemCouponClass {
|
||||
min-height: 180rpx !important;
|
||||
.bottombg {
|
||||
.title {
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
}
|
||||
.centerbg {
|
||||
padding-bottom: 60rpx !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -4,13 +4,29 @@
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="商品详情" bgColor="#258feb" fontColor="#fff"></z-nav-bar>
|
||||
|
||||
<view class="contentBox commonPageContentBox" v-if="!this.$store.state.loadingShow">
|
||||
<view
|
||||
class="contentBox commonPageContentBox"
|
||||
v-if="!this.$store.state.loadingShow"
|
||||
>
|
||||
<!-- :indicator-dots="true" -->
|
||||
<swiper :autoplay="true" :interval="3000" :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%">
|
||||
<swiper
|
||||
:autoplay="true"
|
||||
:interval="3000"
|
||||
: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="item" mode="aspectFit" style="width: 100%; height: 100%" @click="previewImage(item)">
|
||||
<image
|
||||
:src="item"
|
||||
mode="aspectFit"
|
||||
style="width: 100%; height: 100%"
|
||||
@click="previewImage(item)"
|
||||
>
|
||||
</image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@@ -20,14 +36,17 @@
|
||||
<view v-if="this.options.isMiaosha == 1" class="miaosha_box">
|
||||
<view class="price_box">
|
||||
<view class="price_left">
|
||||
<template v-if="
|
||||
<template
|
||||
v-if="
|
||||
curriculumData.activityPrice &&
|
||||
curriculumData.activityPrice > 0
|
||||
">
|
||||
"
|
||||
>
|
||||
<text class="aui-text-danger price">
|
||||
¥{{ curriculumData.activityPrice }}
|
||||
</text>
|
||||
<text class="price original_price">原价:¥{{ curriculumData.price }}
|
||||
<text class="price original_price"
|
||||
>原价:¥{{ curriculumData.price }}
|
||||
</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -36,7 +55,8 @@
|
||||
</text>
|
||||
</template>
|
||||
|
||||
<view class="price original_price sales_number">已售 {{ curriculumData.sumSales }}件
|
||||
<view class="price original_price sales_number"
|
||||
>已售 {{ curriculumData.sumSales }}件
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -52,19 +72,27 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="curriulum_title">{{ curriculumData.productName }}
|
||||
<view class="curriulum_title"
|
||||
>{{ curriculumData.productName }}
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="normal_box">
|
||||
<view
|
||||
v-else
|
||||
class="normal_box"
|
||||
style="padding-top: 10rpx; padding-bottom: 10rpx"
|
||||
>
|
||||
<view class="price_box">
|
||||
<template v-if="
|
||||
<template
|
||||
v-if="
|
||||
curriculumData.activityPrice &&
|
||||
curriculumData.activityPrice > 0
|
||||
">
|
||||
"
|
||||
>
|
||||
<text class="aui-text-danger price">
|
||||
¥{{ curriculumData.activityPrice }}
|
||||
</text>
|
||||
<text class="price original_price">原价:¥{{ curriculumData.price }}
|
||||
<text class="price original_price"
|
||||
>原价:¥{{ curriculumData.price }}
|
||||
</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -72,49 +100,135 @@
|
||||
¥{{ curriculumData.price }}
|
||||
</text>
|
||||
</template>
|
||||
<text class="price original_price sales_number" style="float: right">已售
|
||||
{{ curriculumData.sumSales }}件
|
||||
<text
|
||||
class="price original_price sales_number"
|
||||
style="float: right"
|
||||
>已售 {{ curriculumData.sumSales }}件
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="curriulum_title" style="margin-top: 40rpx;">{{ curriculumData.productName }}
|
||||
<view class="curriulum_title" style="margin-top: 20rpx"
|
||||
>{{ curriculumData.productName }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="price_box"> </view>
|
||||
</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">
|
||||
<common-coupon
|
||||
:List="canGetCouponList"
|
||||
:source="'goodsDetail'"
|
||||
itemClass="itemCouponClass"
|
||||
>
|
||||
</common-coupon>
|
||||
<!-- <view
|
||||
style="max-height: 40vh; overflow-y: scroll"
|
||||
:class="'youhuiItem'"
|
||||
v-for="(item, index) in canGetCouponList"
|
||||
:key="index"
|
||||
>
|
||||
<view style="width: 25%; color: #f31440; text-align: center">
|
||||
<text>¥</text>
|
||||
<b style="font-size: 60rpx">{{
|
||||
item.couponEntity.couponAmount
|
||||
}}</b>
|
||||
</view>
|
||||
<view style="width: calc(100% - 27%); padding-left: 2%">
|
||||
<view>
|
||||
<text
|
||||
style="
|
||||
display: inline-block;
|
||||
font-size: 30rpx;
|
||||
line-height: 34rpx;
|
||||
margin-right: 6rpx;
|
||||
margin-bottom: 10rpx;
|
||||
color: #f10833;
|
||||
"
|
||||
>{{ item.couponEntity.couponName }}</text
|
||||
>
|
||||
</view>
|
||||
<text
|
||||
style="
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 4rpx;
|
||||
"
|
||||
>说明:{{ item.couponEntity.remark }}</text
|
||||
>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template>
|
||||
<common-sticky label="title" :itemStyle="`width:${
|
||||
<common-sticky
|
||||
label="title"
|
||||
:itemStyle="`width:${
|
||||
cateList.length == 2 ? '50' : '33'
|
||||
}%;padding-left: 15px; padding-right: 15px; height: 68rpx;`" :list="cateList"
|
||||
:currentCateIndex="currentCateIndex" @handleselectCate="handleselectCate">
|
||||
}%;padding-left: 15px; padding-right: 15px; height: 68rpx;`"
|
||||
:list="cateList"
|
||||
:currentCateIndex="currentCateIndex"
|
||||
@handleselectCate="handleselectCate"
|
||||
>
|
||||
</common-sticky>
|
||||
</template>
|
||||
<view :class="`dataList `">
|
||||
<view class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font"
|
||||
style="background-color: #C7E9FB">
|
||||
<view class="left" style="color: #258feb;">
|
||||
<u-icon name="grid" color="#258feb" size="23"
|
||||
style="display: inline-block; margin-right: 10rpx"></u-icon>
|
||||
<view
|
||||
class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font"
|
||||
style="background-color: #c7e9fb"
|
||||
>
|
||||
<view class="left" style="color: #258feb">
|
||||
<u-icon
|
||||
name="grid"
|
||||
color="#258feb"
|
||||
size="23"
|
||||
style="display: inline-block; margin-right: 10rpx"
|
||||
></u-icon>
|
||||
商品规格
|
||||
</view>
|
||||
|
||||
<text class="right" @click="openPopup">共{{ goodsList.length }}种商品可选择</text>
|
||||
<text class="right" @click="openPopup"
|
||||
>共{{ goodsList.length }}种商品可选择</text
|
||||
>
|
||||
</view>
|
||||
<common-goods-list imgUrl="url" isNoIcon imgMode="aspectFit" class="color_shandow" defaultUrl=""
|
||||
:isCondition="true" :dataList="goodsList" @hancleClick="selectGoods" label="title">
|
||||
<common-goods-list
|
||||
imgUrl="url"
|
||||
isNoIcon
|
||||
imgMode="aspectFit"
|
||||
class="color_shandow"
|
||||
defaultUrl=""
|
||||
:isCondition="true"
|
||||
:dataList="goodsList"
|
||||
@hancleClick="selectGoods"
|
||||
label="title"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<!-- isSelectGoods -->
|
||||
<view class="related_courses_name goodsList" :class="`goods_item ${
|
||||
<view
|
||||
class="related_courses_name goodsList"
|
||||
:class="`goods_item ${
|
||||
selectGoodsData &&
|
||||
selectGoodsData.productId == slotProps.row.productId
|
||||
? ''
|
||||
: ''
|
||||
}`">
|
||||
}`"
|
||||
>
|
||||
<view class="image_box">
|
||||
<image :src="slotProps.row.productImages" mode="aspectFit" class="goods_image"></image>
|
||||
<image
|
||||
:src="slotProps.row.productImages"
|
||||
mode="aspectFit"
|
||||
class="goods_image"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -152,21 +266,39 @@
|
||||
</common-goods-list>
|
||||
</view>
|
||||
<view :class="`dataList parameterList`" v-if="booksList.length > 0">
|
||||
<view class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font">
|
||||
<view class="left" style="color:#3C77BE !important">
|
||||
<u-icon name="list" color="#3C77BE" size="23"
|
||||
style="display: inline-block; margin-right: 10rpx"></u-icon>
|
||||
<view
|
||||
class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font"
|
||||
>
|
||||
<view class="left" style="color: #3c77be !important">
|
||||
<u-icon
|
||||
name="list"
|
||||
color="#3C77BE"
|
||||
size="23"
|
||||
style="display: inline-block; margin-right: 10rpx"
|
||||
></u-icon>
|
||||
书籍信息
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<common-list imgUrl="url" isNoIcon imgMode="aspectFit" class="color_shandow parameter_box book_box"
|
||||
defaultUrl="" :isCondition="true" :dataList="booksList" label="title">
|
||||
<common-list
|
||||
imgUrl="url"
|
||||
isNoIcon
|
||||
imgMode="aspectFit"
|
||||
class="color_shandow parameter_box book_box"
|
||||
defaultUrl=""
|
||||
:isCondition="true"
|
||||
:dataList="booksList"
|
||||
label="title"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<!-- isSelectGoods -->
|
||||
<view class="related_courses_name" :class="`goods_item `">
|
||||
<view class="image_box" style="margin-right: 10rpx">
|
||||
<image :src="slotProps.row.images" mode="aspectFit" class="goods_image"></image>
|
||||
<image
|
||||
:src="slotProps.row.images"
|
||||
mode="aspectFit"
|
||||
class="goods_image"
|
||||
></image>
|
||||
</view>
|
||||
<view :class="`goods_info `">
|
||||
<view class="name">
|
||||
@@ -180,21 +312,39 @@
|
||||
</common-list>
|
||||
</view>
|
||||
<view :class="`dataList parameterList`" v-if="coursesList.length > 0">
|
||||
<view class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font">
|
||||
<view
|
||||
class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font"
|
||||
>
|
||||
<view class="left" style="color: #018f89 !important">
|
||||
<u-icon name="list" color="#018F89" size="23"
|
||||
style="display: inline-block; margin-right: 10rpx"></u-icon>
|
||||
<u-icon
|
||||
name="list"
|
||||
color="#018F89"
|
||||
size="23"
|
||||
style="display: inline-block; margin-right: 10rpx"
|
||||
></u-icon>
|
||||
课程信息
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<common-list imgUrl="url" isNoIcon imgMode="aspectFit" class="color_shandow parameter_box" defaultUrl=""
|
||||
:isCondition="true" :dataList="coursesList" label="title">
|
||||
<common-list
|
||||
imgUrl="url"
|
||||
isNoIcon
|
||||
imgMode="aspectFit"
|
||||
class="color_shandow parameter_box"
|
||||
defaultUrl=""
|
||||
:isCondition="true"
|
||||
:dataList="coursesList"
|
||||
label="title"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<!-- isSelectGoods -->
|
||||
<view class="related_courses_name" :class="`goods_item `">
|
||||
<view class="image_box" style="margin-right: 10rpx">
|
||||
<image :src="slotProps.row.images" mode="aspectFit" class="goods_image"></image>
|
||||
<image
|
||||
:src="slotProps.row.images"
|
||||
mode="aspectFit"
|
||||
class="goods_image"
|
||||
></image>
|
||||
</view>
|
||||
<view :class="`goods_info `">
|
||||
<view class="name">
|
||||
@@ -207,49 +357,42 @@
|
||||
</template>
|
||||
</common-list>
|
||||
</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>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="font-size: 20rpx;color: #aaa;margin-top: 30rpx;">* 每笔订单只能使用一张优惠价</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<u-divider text="商品参数" :hairline="true" textColor="#333" lineColor="#b0b0b0"></u-divider>
|
||||
<u-divider
|
||||
text="商品参数"
|
||||
:hairline="true"
|
||||
textColor="#333"
|
||||
lineColor="#b0b0b0"
|
||||
></u-divider>
|
||||
<view class="parameter_info_box">
|
||||
<common-list imgUrl="url" isNoIcon imgMode="aspectFit" class="parameter_box parameter_info"
|
||||
defaultUrl="" :isCondition="true" :dataList="parameterList" @hancleClick="selectGoods" label="name">
|
||||
<common-list
|
||||
imgUrl="url"
|
||||
isNoIcon
|
||||
imgMode="aspectFit"
|
||||
class="parameter_box parameter_info"
|
||||
defaultUrl=""
|
||||
:isCondition="true"
|
||||
:dataList="parameterList"
|
||||
@hancleClick="selectGoods"
|
||||
label="name"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<!-- isSelectGoods -->
|
||||
<view class="related_courses_name" :class="`goods_item ${
|
||||
<view
|
||||
class="related_courses_name"
|
||||
:class="`goods_item ${
|
||||
selectGoodsData &&
|
||||
selectGoodsData.productId == slotProps.row.productId
|
||||
? ''
|
||||
: ''
|
||||
}`">
|
||||
}`"
|
||||
>
|
||||
<view :class="`goods_info `">
|
||||
<view class="name">
|
||||
<text style="color: #333"> {{ slotProps.row.name }}:</text>
|
||||
<text v-if="slotProps.row.isTime">
|
||||
{{ slotProps.row.value | formatDate }}</text>
|
||||
{{ slotProps.row.value | formatDate }}</text
|
||||
>
|
||||
<text v-else> {{ slotProps.row.value }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -289,8 +432,13 @@
|
||||
</common-list>
|
||||
</view>
|
||||
|
||||
<u-divider text="商品详情" :hairline="true" textColor="#333" lineColor="#b0b0b0"></u-divider>
|
||||
<view class="small_class_teaching_box" style="background-color: #B7E0E2">
|
||||
<u-divider
|
||||
text="商品详情"
|
||||
:hairline="true"
|
||||
textColor="#333"
|
||||
lineColor="#b0b0b0"
|
||||
></u-divider>
|
||||
<view class="small_class_teaching_box" style="background-color: #b7e0e2">
|
||||
<view class="common_divider divider_box"> </view>
|
||||
|
||||
<common-rich-detail :detailInfo="detailInfo" style="padding: 10rpx">
|
||||
@@ -339,16 +487,28 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="small_class_teaching_box related_courses_box" v-if="relatedCoursesList.length > 0">
|
||||
<view
|
||||
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_left">
|
||||
<image src="@/static/icon/course_ic.png" mode="aspectFil" class="icon1"></image>
|
||||
<image
|
||||
src="@/static/icon/course_ic.png"
|
||||
mode="aspectFil"
|
||||
class="icon1"
|
||||
></image>
|
||||
<text>相关课程</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="small_class_teaching_content">
|
||||
<common-curriculum-list imgUrl="url" :isCondition="true" :dataList="relatedCoursesList"
|
||||
@hancleClick="goCourseDescription" label="title">
|
||||
<common-curriculum-list
|
||||
imgUrl="url"
|
||||
:isCondition="true"
|
||||
:dataList="relatedCoursesList"
|
||||
@hancleClick="goCourseDescription"
|
||||
label="title"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<view class="related_courses_name hidden1">{{
|
||||
slotProps.row.title
|
||||
@@ -361,7 +521,8 @@
|
||||
<!-- {{ slotProps.row.bxType }} -->
|
||||
|
||||
<text class="aui-text-danger">
|
||||
¥{{ slotProps.row.courseFee }}</text>
|
||||
¥{{ slotProps.row.courseFee }}</text
|
||||
>
|
||||
|
||||
<view> </view>
|
||||
</template>
|
||||
@@ -370,8 +531,13 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods_nav_box" v-if="!this.$store.state.loadingShow">
|
||||
<uni-goods-nav :fill="true" :options="buyOptions" :button-group="customButtonGroup1"
|
||||
@click="onHandleClickBuy" @buttonClick="onHandleClickBuy1" />
|
||||
<uni-goods-nav
|
||||
:fill="true"
|
||||
:options="buyOptions"
|
||||
:button-group="customButtonGroup1"
|
||||
@click="onHandleClickBuy"
|
||||
@buttonClick="onHandleClickBuy1"
|
||||
/>
|
||||
</view>
|
||||
<!--
|
||||
<u-modal
|
||||
@@ -382,35 +548,74 @@
|
||||
@confirm="hancleModalConfirm"
|
||||
@cancel="hancleModalCancel"
|
||||
></u-modal> -->
|
||||
<common-select-goods ref="commonSelectGoods" :selectGoodsData="selectGoodsData" :goodsList="goodsList"
|
||||
:buyOptions="buyOptions" :customButtonGroup1="customButtonGroup1" @selectGoods="selectGoods"
|
||||
@onHandleClickBuy="onHandleClickBuy"></common-select-goods>
|
||||
<u-popup :show="showInfo" mode="bottom" @close="closeShowInfo" class="popup_box">
|
||||
<common-select-goods
|
||||
ref="commonSelectGoods"
|
||||
:selectGoodsData="selectGoodsData"
|
||||
:goodsList="goodsList"
|
||||
: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="product_image">
|
||||
<image :src="selectGoodsData.productImages" mode="aspectFit" class="goods_image"></image>
|
||||
<image
|
||||
:src="selectGoodsData.productImages"
|
||||
mode="aspectFit"
|
||||
class="goods_image"
|
||||
></image>
|
||||
</view>
|
||||
<view class="title">已选:{{ selectGoodsData.productName }}</view>
|
||||
</view>
|
||||
|
||||
<view :class="`common_radius_box goods_box popup_content`">
|
||||
<view class="title title_box"><text class="title_price">¥{{ selectGoodsData.price }}</text><u-icon
|
||||
name="close" color="#333" size="18" @click="close" style="display: inline-block"></u-icon>
|
||||
<view class="title title_box"
|
||||
><text class="title_price">¥{{ selectGoodsData.price }}</text
|
||||
><u-icon
|
||||
name="close"
|
||||
color="#333"
|
||||
size="18"
|
||||
@click="close"
|
||||
style="display: inline-block"
|
||||
></u-icon>
|
||||
</view>
|
||||
<view class="title title_list"><text>商品列表({{ goodsList.length }})</text></view>
|
||||
<view class="title title_list"
|
||||
><text>商品列表({{ goodsList.length }})</text></view
|
||||
>
|
||||
|
||||
<common-list imgUrl="url" isNoIcon imgMode="aspectFit" defaultUrl="" :isCondition="true"
|
||||
:dataList="goodsList" @hancleClick="selectGoods" label="title">
|
||||
<common-list
|
||||
imgUrl="url"
|
||||
isNoIcon
|
||||
imgMode="aspectFit"
|
||||
defaultUrl=""
|
||||
:isCondition="true"
|
||||
:dataList="goodsList"
|
||||
@hancleClick="selectGoods"
|
||||
label="title"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<!-- isSelectGoods -->
|
||||
<view class="related_courses_name" :class="`goods_item ${
|
||||
<view
|
||||
class="related_courses_name"
|
||||
:class="`goods_item ${
|
||||
selectGoodsData &&
|
||||
selectGoodsData.productId == slotProps.row.productId
|
||||
? 'isSelectGoods color_shandow'
|
||||
: ''
|
||||
}`">
|
||||
}`"
|
||||
>
|
||||
<view class="image_box" style="margin-right: 10rpx">
|
||||
<image :src="slotProps.row.productImages" mode="aspectFit" class="goods_image"></image>
|
||||
<image
|
||||
:src="slotProps.row.productImages"
|
||||
mode="aspectFit"
|
||||
class="goods_image"
|
||||
></image>
|
||||
</view>
|
||||
|
||||
<view :class="`goods_info `">
|
||||
@@ -426,8 +631,13 @@
|
||||
</common-list>
|
||||
|
||||
<view class="goods_nav_box">
|
||||
<uni-goods-nav :fill="true" :options="buyOptions" :button-group="customButtonGroup1"
|
||||
@click="onHandleClickBuy" @buttonClick="onHandleClickBuy" />
|
||||
<uni-goods-nav
|
||||
:fill="true"
|
||||
:options="buyOptions"
|
||||
:button-group="customButtonGroup1"
|
||||
@click="onHandleClickBuy"
|
||||
@buttonClick="onHandleClickBuy"
|
||||
/>
|
||||
</view>
|
||||
<!-- <view>
|
||||
<text @click="handleClickClose">取消</text>
|
||||
@@ -435,7 +645,6 @@
|
||||
</view>-->
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -443,9 +652,7 @@
|
||||
import courseDescription from "@/pages/component/commonComponents/list";
|
||||
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
components: {
|
||||
courseDescription, //课程说明
|
||||
@@ -498,7 +705,8 @@
|
||||
playData: {},
|
||||
taiHuClassInfo: {},
|
||||
searchValue: "",
|
||||
teachingList: [{
|
||||
teachingList: [
|
||||
{
|
||||
title: "临床实践",
|
||||
|
||||
type: "02",
|
||||
@@ -544,13 +752,15 @@
|
||||
goodsList: "book/shopproduct/getGlProductList",
|
||||
visitorDetailInfo: "visitor/getProductDetail", // 游客状态下的商品详情
|
||||
},
|
||||
customButtonGroup1: [{
|
||||
customButtonGroup1: [
|
||||
{
|
||||
with: 200,
|
||||
text: "立即购买",
|
||||
backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)",
|
||||
color: "#fff",
|
||||
}, ],
|
||||
requestType: '', // 数据请求类型是否为游客登陆状态
|
||||
},
|
||||
],
|
||||
requestType: "", // 数据请求类型是否为游客登陆状态
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
@@ -605,7 +815,7 @@
|
||||
},
|
||||
onLoad(options) {
|
||||
this.options = options;
|
||||
console.log('options', options)
|
||||
console.log("options", options);
|
||||
// this.handleClickGetGoodsList();
|
||||
// this.getUserInfo()
|
||||
// this.getCateList()
|
||||
@@ -624,7 +834,7 @@
|
||||
// this.searchList = []
|
||||
},
|
||||
onShow() {
|
||||
this.requestType = this.options.type
|
||||
this.requestType = this.options.type;
|
||||
this.selectGoodsData = {};
|
||||
this.getCourseDescriptionData();
|
||||
this.show = false;
|
||||
@@ -640,9 +850,9 @@
|
||||
url: "common/coupon/couponToProductList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"page": 1,
|
||||
"limit": 100,
|
||||
"productId": this.curriculumData.productId
|
||||
page: 1,
|
||||
limit: 100,
|
||||
productId: this.curriculumData.productId,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
@@ -651,13 +861,13 @@
|
||||
})
|
||||
.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("res优惠券", res);
|
||||
this.canGetCouponList = res.couponToShopproductPage.records;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
this.$commonJS.showToast(e.errMsg);
|
||||
})
|
||||
});
|
||||
},
|
||||
closeShowInfo() {
|
||||
this.showInfo = false;
|
||||
@@ -667,7 +877,7 @@
|
||||
},
|
||||
openPopup() {
|
||||
// this.selectGoodsData = this.goodsList[0];
|
||||
this.$refs.commonSelectGoods.open()
|
||||
this.$refs.commonSelectGoods.open();
|
||||
// this.show = true;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
@@ -675,42 +885,42 @@
|
||||
this.show = false;
|
||||
},
|
||||
selectGoods(data) {
|
||||
if (this.requestType == 'visitor') {
|
||||
if (this.requestType == "visitor") {
|
||||
uni.showModal({
|
||||
content: "登陆后可购买本商品",
|
||||
confirmText: '去登录',
|
||||
cancelText: '再逛逛',
|
||||
confirmText: "去登录",
|
||||
cancelText: "再逛逛",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/login'
|
||||
})
|
||||
url: "/pages/user/login",
|
||||
});
|
||||
}
|
||||
},
|
||||
})
|
||||
return
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.selectGoodsData = data;
|
||||
this.$refs.commonSelectGoods.open()
|
||||
this.$refs.commonSelectGoods.open();
|
||||
// this.show = true;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
onHandleClickBuy1() {
|
||||
if (this.requestType == 'visitor') {
|
||||
if (this.requestType == "visitor") {
|
||||
uni.showModal({
|
||||
content: "登陆后可购买本商品",
|
||||
confirmText: '去登录',
|
||||
cancelText: '再逛逛',
|
||||
confirmText: "去登录",
|
||||
cancelText: "再逛逛",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/login'
|
||||
})
|
||||
url: "/pages/user/login",
|
||||
});
|
||||
}
|
||||
},
|
||||
})
|
||||
return
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$refs.commonSelectGoods.open();
|
||||
// this.show = true;
|
||||
@@ -721,14 +931,16 @@
|
||||
"this.selectGoodsDatathis.selectGoodsDatathis.selectGoodsData"
|
||||
);
|
||||
var mynavData = JSON.stringify({
|
||||
goods: [{
|
||||
goods: [
|
||||
{
|
||||
productImages: this.selectGoodsData.productImages,
|
||||
productId: this.selectGoodsData.productId,
|
||||
productName: this.selectGoodsData.productName,
|
||||
activityPrice: this.selectGoodsData.activityPrice,
|
||||
price: this.selectGoodsData.price,
|
||||
goodsType: this.selectGoodsData.goodsType,
|
||||
}, ],
|
||||
},
|
||||
],
|
||||
|
||||
navTitle: this.options.navTitle,
|
||||
title: this.options.title,
|
||||
@@ -785,7 +997,8 @@
|
||||
}
|
||||
this.modalInfo = {
|
||||
title: "提示信息",
|
||||
content: "用户您好,该课程已到期,通过支付" +
|
||||
content:
|
||||
"用户您好,该课程已到期,通过支付" +
|
||||
fee +
|
||||
"元,本门课程可获得" +
|
||||
days +
|
||||
@@ -837,8 +1050,10 @@
|
||||
async getCourseDescriptionData() {
|
||||
var data = {};
|
||||
var that = this;
|
||||
let url = ''
|
||||
this.requestType == 'visitor' ? url = this.urlList.visitorDetailInfo : url = this.urlList.detailInfo
|
||||
let url = "";
|
||||
this.requestType == "visitor"
|
||||
? (url = this.urlList.visitorDetailInfo)
|
||||
: (url = this.urlList.detailInfo);
|
||||
this.$http
|
||||
.request({
|
||||
url,
|
||||
@@ -855,7 +1070,7 @@
|
||||
.then(async (res) => {
|
||||
that.selectGoodsData = res.data.GLProducts[0];
|
||||
that.curriculumData = res.data.detail;
|
||||
await this.getCanGetCouponList()
|
||||
await this.getCanGetCouponList();
|
||||
that.booksList = res.data.books ? res.data.books : [];
|
||||
that.coursesList = res.data.courses ? res.data.courses : [];
|
||||
that.goodsList = res.data.GLProducts;
|
||||
@@ -1175,9 +1390,7 @@
|
||||
transformData(inputData) {
|
||||
const result = {};
|
||||
inputData.forEach((item) => {
|
||||
const {
|
||||
letter
|
||||
} = item;
|
||||
const { letter } = item;
|
||||
if (!result[letter]) {
|
||||
result[letter] = [];
|
||||
}
|
||||
@@ -1346,7 +1559,7 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.tanchu {
|
||||
padding: 0 30rpx 40rpx 30rpx;
|
||||
@@ -1418,7 +1631,6 @@
|
||||
margin: 0 0 0 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.chooseCheck {
|
||||
position: absolute;
|
||||
top: 3rpx;
|
||||
@@ -1432,20 +1644,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.addressItem.addItem_style {
|
||||
border-color: #fd6004;
|
||||
}
|
||||
|
||||
.youhuiItem {
|
||||
border: 1px solid #d9d9d9;
|
||||
border: 1px solid #ffddea;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding: 20rpx 10rpx;
|
||||
margin: 25rpx 0 0 0;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
background-color: #fef2f4;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
@@ -1742,7 +1953,7 @@
|
||||
background: #cef8ea;
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0px 0px 6rpx 0px #E9DCCC;
|
||||
box-shadow: 0px 0px 6rpx 0px #e9dccc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2063,7 +2274,6 @@
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
.parameterList {
|
||||
/deep/.list_item {
|
||||
// border-bottom: none;
|
||||
@@ -2143,4 +2353,6 @@
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,33 +4,40 @@
|
||||
<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>
|
||||
<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="tanchu" style="position: relative">
|
||||
|
||||
<view
|
||||
v-if="status!=0"
|
||||
style="
|
||||
min-height: 80vh;
|
||||
z-index: 100;
|
||||
background-color: #f0f0f0;
|
||||
opacity: 0.55;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
"
|
||||
></view>
|
||||
<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 style="min-height: 40vh; overflow-y: scroll">
|
||||
<common-coupon :List="list" :source="'mine'"> </common-coupon>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view style="font-size: 20rpx;color: #aaa;margin-top: 30rpx;">* 每笔订单只能使用一张优惠价</view> -->
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
@@ -45,107 +52,114 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [], // 优惠券列表
|
||||
listStatus: 88,
|
||||
curTagIndex: 0, // 当前索引
|
||||
tabList: [{
|
||||
name: '未使用',
|
||||
id: '0'
|
||||
tabList: [
|
||||
{
|
||||
name: "未使用",
|
||||
id: "0",
|
||||
},
|
||||
{
|
||||
name: '已使用',
|
||||
id: '1'
|
||||
name: "已使用",
|
||||
id: "1",
|
||||
},
|
||||
{
|
||||
name: '已过期',
|
||||
id: '2'
|
||||
}
|
||||
|
||||
name: "已过期",
|
||||
id: "2",
|
||||
},
|
||||
],
|
||||
activeStyle: {
|
||||
background:'#fff',
|
||||
color:'#666',
|
||||
background: "#fff",
|
||||
color: "#666",
|
||||
padding: "10rpx",
|
||||
borderRadius:"10rpx"
|
||||
borderRadius: "10rpx",
|
||||
},
|
||||
page: 0,
|
||||
limit: 15,
|
||||
status: 0,
|
||||
flag: false, // 请求标记
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.page = 1
|
||||
this.getUserCouponList()
|
||||
this.page = 1;
|
||||
this.getUserCouponList();
|
||||
},
|
||||
async onReachBottom() {
|
||||
console.log('触底',this.listStatus,this.flag);
|
||||
console.log("触底", this.listStatus, this.flag);
|
||||
|
||||
if (this.listStatus != 1 && this.listStatus != 2) {
|
||||
if (!this.flag) {
|
||||
this.page++
|
||||
await this.getUserCouponList()
|
||||
this.page++;
|
||||
await this.getUserCouponList();
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
filters: {
|
||||
couponType(type) {
|
||||
// 0无限制 1课程卷 2课程品类卷
|
||||
var str = ''
|
||||
var str = "";
|
||||
switch (type) {
|
||||
case 0:
|
||||
str = '全场通用'
|
||||
str = "全场通用";
|
||||
break;
|
||||
case 1:
|
||||
str = '指定课程可用'
|
||||
str = "指定课程可用";
|
||||
break;
|
||||
case 2:
|
||||
str = '指定课程品类可用'
|
||||
str = "指定课程品类可用";
|
||||
break;
|
||||
}
|
||||
return str
|
||||
}
|
||||
return str;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
async tabClick(e) {
|
||||
console.log('e', e);
|
||||
this.status = e.id
|
||||
console.log("e", e);
|
||||
this.status = e.id;
|
||||
// this.curTagIndex = e.index
|
||||
this.page = 0
|
||||
this.page += 1
|
||||
this.list = []
|
||||
await this.getUserCouponList()
|
||||
|
||||
this.page = 0;
|
||||
this.page += 1;
|
||||
this.list = [];
|
||||
await this.getUserCouponList();
|
||||
},
|
||||
async getUserCouponList() {
|
||||
console.log('进入函数了妈');
|
||||
this.listStatus = 1
|
||||
this.flag = true
|
||||
console.log("进入函数了妈");
|
||||
this.listStatus = 1;
|
||||
this.flag = true;
|
||||
uni.showLoading({
|
||||
title:'加载中'
|
||||
})
|
||||
title: "加载中",
|
||||
});
|
||||
console.log(
|
||||
{
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
getType: "", //获取类型 0 后台赠送 1 主动获取
|
||||
status: this.status, //使用状态 0 未使用 1 已使用 2 已过期
|
||||
userInfo: "", //用户信息
|
||||
userId: this.userInfo.id,
|
||||
},
|
||||
111111111111111111111111111
|
||||
);
|
||||
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
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
getType: "", //获取类型 0 后台赠送 1 主动获取
|
||||
status: this.status, //使用状态 0 未使用 1 已使用 2 已过期
|
||||
userInfo: "", //用户信息
|
||||
userId: this.userInfo.id,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
@@ -153,38 +167,39 @@
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
uni.hideLoading()
|
||||
console.log(res, "1111111111111");
|
||||
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)
|
||||
this.list = this.list.concat(res.couponList.records);
|
||||
if (res.couponList.pages > this.page) {
|
||||
this.listStatus = 0
|
||||
this.listStatus = 0;
|
||||
} else {
|
||||
this.listStatus = 2
|
||||
this.listStatus = 2;
|
||||
}
|
||||
} else {
|
||||
this.listStatus = 3 // 暂无数据
|
||||
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);
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btnBox {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.tanchu {
|
||||
padding: 0 30rpx 40rpx 30rpx;
|
||||
position: relative;
|
||||
@@ -255,7 +270,6 @@
|
||||
margin: 0 0 0 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.chooseCheck {
|
||||
position: absolute;
|
||||
top: 3rpx;
|
||||
@@ -269,29 +283,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.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>
|
||||
|
||||
BIN
static/icon/coupon/bottom.png
Normal file
BIN
static/icon/coupon/bottom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
BIN
unpackage/wumen20241101103101.wgt
Normal file
BIN
unpackage/wumen20241101103101.wgt
Normal file
Binary file not shown.
Reference in New Issue
Block a user