diff --git a/config/config.js b/config/config.js
index e18d385..2bb59ce 100755
--- a/config/config.js
+++ b/config/config.js
@@ -58,6 +58,10 @@ var config = {
* 优惠券详情
*/
couponDetail: "/wxCoupon/detail",
+ /**
+ * 购物车订单详情
+ */
+ goodsDetail:"/order/goodsDetail",
/**
* 优惠券图文混排详情
*/
@@ -86,6 +90,10 @@ var config = {
* 下订单
*/
orderSave: "/order/save",
+ /**
+ * 多少量下单
+ */
+ goodsShopCartSave:"/order/goodsShopCartSave",
/**
* 支付订单
*/
@@ -95,14 +103,17 @@ var config = {
*/
payOrderUpdate: "/pay/updatePayOrder",
/**
- * 订单列表
+ * 订单列表 /order/list
*/
- orderList: "/order/list",
+ orderList: "/order/listGoods",
+
getWeRunData: '/user/getWeRunData',
/**
* 订单详情
*/
- orderDetail: "/order/detail",
+ orderDetail: "/order/detail_v1",
+ // 券包详情
+ // orderDetailAll: "/order/detail_v1",
/**
* 券包
*/
@@ -367,6 +378,10 @@ var config = {
siteCheck: "/userBasicInfoAddress/findById",
//删除收获地址
siteDel: "/userBasicInfoAddress/del",
+ //确认收货
+ verify:"/couponOrder/verify",
+ //全包下订单
+ couponPackageSave :"/order/couponPackageSave",
},
weapp: {
AppId: weappId
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index 3705577..78fe302 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -203,11 +203,16 @@ Page({
gohome(e){
console.log(e.currentTarget.dataset.id,"123")
wx.navigateTo({
- url: `/pages/fillIndent/fillIndent?id=${e.currentTarget.dataset.id}`,
+ url: `/pages/fillIndent/fillIndent?couponChannelId=${e.currentTarget.dataset.couponchannelid}&couponId=${e.currentTarget.dataset.couponid}&shippingtype=${e.currentTarget.dataset.shippingtype}`,
})
},
-
+ gochild(e){
+ let id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: `/pages/coupon/detail/index?couponIds=${id}`,
+ })
+ },
//获取当前登录用户信息
getUserInfo: function() {
let that = this;
@@ -508,8 +513,16 @@ Page({
that.setData({
onshow: false
})
- if (options && options.couponChannelId) {
- that.getDetail(options.couponChannelId, 'notendclock');
+ if (options && (options.couponChannelId || options.couponIds)) {
+ if (options.couponIds){
+ this.setData({
+ couponIds: options.couponIds
+ })
+ that.getDetail(options.couponIds, 'notendclock');
+ }else{
+ that.getDetail(options.couponChannelId, 'notendclock');
+ }
+
}
/**
@@ -551,11 +564,15 @@ Page({
},
getDetail: function(couponChannelId, flag) {
let that = this;
+ let data={};
+ if (that.data.couponIds){
+ data.couponId = couponChannelId
+ }else{
+ data.couponChannelId = couponChannelId
+ }
var parmer = {
url: config.api.couponDetail,
- data: {
- couponChannelId: couponChannelId
- }
+ data:data
};
Http.get(parmer)
.then(res => {
@@ -719,7 +736,6 @@ Page({
* 支付订单更新
*/
payOrderUpdate: (orderId, payOrderId, status, reason, type, _this, composeOrderType) => {
- console.log("*-----------------")
let that = this;
// 支付成功
Http.post({
@@ -791,6 +807,8 @@ Page({
}
})
},
+ // 券包支付
+
/**
* 发起支付
*/
@@ -832,14 +850,32 @@ Page({
couponChannelId: "" + that.data.couponChannelId,
couponId: "" + that.data.couponId,
formId: "" + that.data.formId,
+ }
+ }
+ console.log(data,"data")
+ let url = ""
+ let tempObj;
+ let tempArr = []
+ if(that.data.data.type==12){
+ url = config.api.couponPackageSave
+ tempObj={
+ signleOrder:{
+ couponChannelId: "" + that.data.couponChannelId,
+ couponId: "" + that.data.couponId,
+ formId: "" + that.data.formId,
+ },
+ count:"1"
}
+ tempArr.push(tempObj)
+ }else{
+ url = config.api.orderSave
}
/**
* orderSave 下单
*/
return Http.post({
- url: config.api.orderSave,
- data: data
+ url: url,
+ data: that.data.data.type == 12 ? JSON.stringify(tempArr):data
});
})
.catch(err => {
@@ -1056,6 +1092,7 @@ Page({
}).then(res => {
that.setData({
disOrderNumber: res.data.orderNumber,
+ composeOrderType: res.data.composeOrderType
})
if (res.data && res.data.pressEndDate) {
that.setData({
@@ -1074,7 +1111,7 @@ Page({
success: function(res) {
if (res.confirm) {
wx.navigateTo({
- url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.disOrderNumber}`,
+ url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.disOrderNumber}&composeOrderType=${that.data.composeOrderType}`,
})
}
}
diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml
index 3432f22..d58d3e4 100644
--- a/pages/coupon/detail/index.wxml
+++ b/pages/coupon/detail/index.wxml
@@ -105,7 +105,7 @@
使用条件:
满{{data.usePriceStr}}元可用
-
+
限购{{data.useLimitQuantity}}张
@@ -117,7 +117,17 @@
-
+
+
+ 购买须知
+
+
+
+ {{item.title}}
+ ¥{{item.priceStr}}
+
+
+
购买须知
@@ -146,13 +156,15 @@
-