Commit f5648acb9dd95aa1c2bd40678bf4d75b4e93cc5c

Authored by abson
1 parent 43f223b4

阶梯购再来一单

pages/user/order_detail/order_detail.js
... ... @@ -1110,28 +1110,38 @@ Page({
1110 1110 b_item.price = prom.price;
1111 1111 }
1112 1112 break;
1113   - case 6:
1114   - b_item.is_pd_normal = 1;
1115   - break;
1116   - case 7:
1117   - //如果有组合购
1118   - var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" + good.prom_id + "/" + getApp().globalData.userInfo.user_id;
1119   - await getApp().request.promiseGet(url, {}).then(res => {
1120   - if (res.data.code == 0 && res.data.data) {
1121   - if (res.data.data.is_show == 1 && res.data.data.is_end == 0
1122   - && ut.gettimestamp() < res.data.data.end_time
1123   - && ut.gettimestamp() > res.data.data.start_time
1124   - ) {
1125   - b_item.prom_type = 7;
1126   - b_item.prom_id = res.data.data.id;
1127   - good.prom_type = 7;
1128   - good.prom_id = res.data.data.id;
1129   - }
1130   - }
1131   - })
1132   - break;
1133   - }
1134   - }
  1113 + case 6:
  1114 + b_item.is_pd_normal = 1;
  1115 + break;
  1116 + case 7:
  1117 + //如果有组合购
  1118 + var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" + good.prom_id + "/" + getApp().globalData.userInfo.user_id;
  1119 + await getApp().request.promiseGet(url, {}).then(res => {
  1120 + if (res.data.code == 0 && res.data.data) {
  1121 + if (res.data.data.is_show == 1 && res.data.data.is_end == 0
  1122 + && ut.gettimestamp() < res.data.data.end_time
  1123 + && ut.gettimestamp() > res.data.data.start_time
  1124 + ) {
  1125 + b_item.prom_type = 7;
  1126 + b_item.prom_id = res.data.data.id;
  1127 + good.prom_type = 7;
  1128 + good.prom_id = res.data.data.id;
  1129 + }
  1130 + }
  1131 + })
  1132 + break;
  1133 + case 10:
  1134 + let user_id = getApp().globalData.userInfo.user_id;
  1135 + var url = `/api/weshop/prom/ladderForm/getNew/${os.stoid}/${user_id}/${good.prom_id}`;
  1136 + await getApp().request.promiseGet(url, {}).then(res => {
  1137 + if (res.data.code == 0 && res.data.data && res.data.data.isuse && res.data.data.is_end == 0) {
  1138 + b_item.prom_type = 10;
  1139 + b_item.prom_id = res.data.data.id;
  1140 + }
  1141 + })
  1142 + break;
  1143 + }
  1144 + }
1135 1145  
1136 1146 //如果有优惠促销的时候,要看下商品的优惠活动有没有过期
1137 1147 if(g_item.prom_type==3 || good.prom_type==3){
... ...
pages/user/order_list/order_list.js
... ... @@ -1342,6 +1342,16 @@ Page({
1342 1342 }
1343 1343 })
1344 1344 break;
  1345 + case 10:
  1346 + let user_id = getApp().globalData.userInfo.user_id;
  1347 + var url = `/api/weshop/prom/ladderForm/getNew/${os.stoid}/${user_id}/${good.prom_id}`;
  1348 + await getApp().request.promiseGet(url, {}).then(res => {
  1349 + if (res.data.code == 0 && res.data.data && res.data.data.isuse && res.data.data.is_end == 0) {
  1350 + b_item.prom_type = 10;
  1351 + b_item.prom_id = res.data.data.id;
  1352 + }
  1353 + })
  1354 + break;
1345 1355 }
1346 1356 }
1347 1357  
... ...