diff --git a/pages/order/components/coupon/index.js b/pages/order/components/coupon/index.js
index 51c09e6..07c12e9 100644
--- a/pages/order/components/coupon/index.js
+++ b/pages/order/components/coupon/index.js
@@ -73,14 +73,6 @@ Component({
let listData = []
if (this.properties.sourceFrom == 'cart') {
- postList.forEach(v=>{
- listData.push({
- sku_id: v.sku.id,
- price: v.sku.price,
- sell_price: v.sku.price,
- num: v.productNum,
- })
- })
ticketList.forEach(v=>{
listData.push({
sku_id: v.sku.id,
@@ -101,6 +93,14 @@ Component({
})
}
}
+ postList.forEach(v=>{
+ listData.push({
+ sku_id: v.sku.id,
+ price: v.sku.price,
+ sell_price: v.sku.price,
+ num: v.productNum,
+ })
+ })
commonApi.user_post('coupon/use_max_coupon_listv2',{
money:this.data.money,
diff --git a/pages/order/coupon/index.js b/pages/order/coupon/index.js
index 964bf84..d52d3f4 100644
--- a/pages/order/coupon/index.js
+++ b/pages/order/coupon/index.js
@@ -8,6 +8,7 @@ Page({
* 页面的初始数据
*/
data: {
+ noUseList: [],
list:[],
moreFlag:true,
@@ -26,15 +27,8 @@ Page({
let signleProduct = app.globalData.product || null
let listData = []
+ // 门票类
if (sourceFrom == 'cart') {
- postList.forEach(v=>{
- listData.push({
- sku_id: v.sku.id,
- price: v.sku.price,
- sell_price: v.sku.price,
- num: v.productNum,
- })
- })
ticketList.forEach(v=>{
listData.push({
sku_id: v.sku.id,
@@ -55,6 +49,16 @@ Page({
})
}
}
+ // 特产类
+ postList.forEach(v=>{
+ listData.push({
+ sku_id: v.sku.id,
+ price: v.sku.price,
+ sell_price: v.sku.price,
+ num: v.productNum,
+ })
+ })
+
this.setData({
productList: listData
})
@@ -70,8 +74,11 @@ Page({
res.data.map(item=>{
item.selected = false;
})
+
+
this.setData({
- list:res.data
+ list:res.data.filter(x=>x.can_use),
+ noUseList: res.data.filter(x=>!x.can_use),
})
this.getMaxC(options)
})
diff --git a/pages/order/coupon/index.wxml b/pages/order/coupon/index.wxml
index 3aa31a5..d164d7a 100644
--- a/pages/order/coupon/index.wxml
+++ b/pages/order/coupon/index.wxml
@@ -1,6 +1,7 @@
-
+
+可使用红包 {{list.length}}张
{{item.activity.money/100}}
@@ -13,6 +14,29 @@
不可用
+
+
+
+ 不可用原因
+ {{item.reason}}
+
+
+
+不可使用红包 {{noUseList.length}}张
+
+
+ {{item.activity.money/100}}
+
+ {{item.activity.fold}}
+
+
+ {{item.activity.name}}
+ {{item.end_time}}到期
+
+
+ 不可用
+
+
不可用原因
@@ -25,7 +49,7 @@
确定
-
+
暂无优惠券
\ No newline at end of file
diff --git a/pages/order/coupon/index.wxss b/pages/order/coupon/index.wxss
index 8c2c2e9..e76b95a 100644
--- a/pages/order/coupon/index.wxss
+++ b/pages/order/coupon/index.wxss
@@ -16,7 +16,7 @@ page {
display: flex;
align-items: center;
justify-content: space-between;
-
+ position: relative;
height: 136rpx;
}
.coupon-item .money {
@@ -84,4 +84,21 @@ page {
color: #666;
font-size: 24rpx;
box-sizing: border-box;
+}
+
+.cover-no-use{
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ width: 100%;
+ height: 100;
+ opacity: 0.5;
+ background: white;
+}
+.coupon-title{
+ padding: 26rpx 26rpx 0;
+ width: 100%;
+ box-sizing: border-box;
}
\ No newline at end of file
diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js
index 8638f01..9d4f7ff 100644
--- a/pages/order/scene/index.js
+++ b/pages/order/scene/index.js
@@ -379,7 +379,7 @@ changeDate: function (e) {
this.totalPrice(e.detail.price)
if (this.data.coupon) {
wx.showToast({
- title: '订单价格发生变化,请重新选择优惠券',
+ title: '订单时间发生变化,请重新选择优惠券',
icon: 'none'
})
this.setData({
diff --git a/utils/https.js b/utils/https.js
index b0f9a8b..d55ab84 100644
--- a/utils/https.js
+++ b/utils/https.js
@@ -1,8 +1,8 @@
var app = getApp();
import util from "../utils/util"
// import userApi from "../utils/https/user.js";
-const baseUrl = "https://test.api.cloud.sz-trip.com/api/";
-// let baseUrl = "https://api.cloud.sz-trip.com/api/";
+// const baseUrl = "https://test.api.cloud.sz-trip.com/api/";
+let baseUrl = "https://api.cloud.sz-trip.com/api/";
const env = wx.getAccountInfoSync().miniProgram.envVersion
if (env == 'develop1') {
baseUrl = "https://test.api.cloud.sz-trip.com/api/"