Commit 7d4ffcc745f5f6abfe0f8811c61c6ccbacbd1bba
1 parent
56108b29
服务卡项的拼团优化
Showing
3 changed files
with
68 additions
and
35 deletions
packageA/pages/serviceCard_pd/team_success/team_success.wxml
| ... | ... | @@ -176,7 +176,7 @@ |
| 176 | 176 | |
| 177 | 177 | <!--会员团 商家团--> |
| 178 | 178 | <button class="bodybutton" style='background-color:#fab55a; color:#fff' bindtap='clickShare' |
| 179 | - wx:if="{{(teamlist.kttype==2||teamlist.kttype==1)&&p_status==1}}">邀请好友参团{{isLogin}}</button> | |
| 179 | + wx:if="{{(teamlist.kttype==2||teamlist.kttype==1)&&p_status==1}}">邀请好友参团</button> | |
| 180 | 180 | |
| 181 | 181 | <view class="xc-home-page-frame"> |
| 182 | 182 | <button class="xc-home-page" bindtap='gohome'> 返回首页</button> | ... | ... |
pages/index/index/index.js
| ... | ... | @@ -316,7 +316,7 @@ Page({ |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | //--正再拼团中的处理-- |
| 319 | - var url = "/api/weshop/order/pageTuan?pt_status=2&is_pt=1&store_id=" + os.stoid + "&pageSize=6&page=1" | |
| 319 | + var url = "/api/weshop/order/pageTuanNew?pt_status=2&is_pt=1&store_id=" + os.stoid + "&pageSize=6&page=1" | |
| 320 | 320 | await getApp().request.promiseGet(url, {}).then(res => { |
| 321 | 321 | if (res.data.code == 0 && res.data.data && res.data.data.pageData) { |
| 322 | 322 | th.data.pt_timer_arr = res.data.data.pageData; | ... | ... |
pages/team/team_ping/team_ping.js
| ... | ... | @@ -92,8 +92,7 @@ Page({ |
| 92 | 92 | |
| 93 | 93 | |
| 94 | 94 | //获取订单表的信息根据活动user_id,pt_prom_id>0 AND pay_time>0 |
| 95 | - | |
| 96 | - await getApp().request.promiseGet("/api/weshop/order/pageTuan?"+where, { | |
| 95 | + await getApp().request.promiseGet("/api/weshop/order/pageTuanNew?"+where, { | |
| 97 | 96 | data: { is_pt:1,store_id: os.stoid, user_id: user_id, pageSize: 6, page: this.data.currentPage,} |
| 98 | 97 | }).then(res => { |
| 99 | 98 | order = res.data.data.pageData; |
| ... | ... | @@ -103,44 +102,78 @@ Page({ |
| 103 | 102 | |
| 104 | 103 | wx.showLoading({ title: "加载中"}); |
| 105 | 104 | for (i = 0; i < order.length; i++) { |
| 106 | - //获取订单从表信息 | |
| 107 | - await getApp().request.promiseGet("/api/weshop/ordergoods/pageGoods", { | |
| 108 | - data: { store_id: os.stoid, order_id: order[i].order_id } | |
| 109 | - }).then(res => { | |
| 110 | - order_goods = res.data.data.pageData; | |
| 111 | - order[i].order_goods = order_goods; | |
| 112 | - order[i].gimage = ee.data.imageurl + order_goods[0]?.original_img; | |
| 113 | - }) | |
| 114 | - | |
| 115 | - | |
| 116 | - //获取订单表信息根据上面查询的订单号order[i].pt_listno | |
| 117 | - await getApp().request.promiseGet("/api/weshop/order/pagePtList", { | |
| 118 | - data: { store_id: os.stoid, pt_listno: order[i].pt_listno,pageSize:60,page:1} | |
| 119 | - }).then(res => { | |
| 120 | - //console.log("ordertx"); | |
| 121 | - ordertx = res.data.data.pageData; | |
| 122 | - //console.log(ordertx); | |
| 123 | - order[i].tx=ordertx; | |
| 124 | - }) | |
| 125 | 105 | |
| 126 | 106 | //获取teamgroup中的值 |
| 127 | 107 | await getApp().request.promiseGet("/api/weshop/teamgroup/page", { |
| 128 | 108 | data: { store_id: os.stoid, listno: order[i].pt_listno,pageSize:1,page:1} |
| 129 | 109 | }).then(res => { |
| 130 | - team_g = res.data.data.pageData[0] | |
| 131 | - | |
| 110 | + team_g = res.data.data.pageData[0] | |
| 132 | 111 | }) |
| 133 | 112 | |
| 134 | - //获取预存使用金额 | |
| 135 | - await getApp().request.promiseGet("/api/weshop/orderMore/get/" + os.stoid + "/" + order[i].order_sn, { | |
| 136 | - }).then(res => { | |
| 137 | - if (res.data.code == 0 && res.data.data) { | |
| 138 | - // data[ind].use_commission = res.data.data.use_commission; | |
| 139 | - order[i].pre_cut = res.data.data.pre_cut; //是否使用预存,如果是使用预存不能单品退,只能整单退 | |
| 140 | - order[i].pre_json = res.data.data.pre_json; //是否使用预存,如果是使用预存不能单品退,只能整单退 | |
| 141 | - } | |
| 142 | - }) | |
| 143 | - | |
| 113 | + | |
| 114 | + switch (team_g.goods_type){ | |
| 115 | + case 0: | |
| 116 | + //获取订单从表信息 | |
| 117 | + await getApp().request.promiseGet("/api/weshop/ordergoods/pageGoods", { | |
| 118 | + data: { store_id: os.stoid, order_id: order[i].order_id } | |
| 119 | + }).then(res => { | |
| 120 | + order_goods = res.data.data.pageData; | |
| 121 | + order[i].order_goods = order_goods; | |
| 122 | + order[i].gimage = ee.data.imageurl + order_goods[0]?.original_img; | |
| 123 | + }) | |
| 124 | + | |
| 125 | + //获取订单表信息根据上面查询的订单号order[i].pt_listno | |
| 126 | + await getApp().request.promiseGet("/api/weshop/order/pagePtList", { | |
| 127 | + data: { store_id: os.stoid, pt_listno: order[i].pt_listno,pageSize:60,page:1} | |
| 128 | + }).then(res => { | |
| 129 | + //console.log("ordertx"); | |
| 130 | + ordertx = res.data.data.pageData; | |
| 131 | + //console.log(ordertx); | |
| 132 | + order[i].tx=ordertx; | |
| 133 | + }) | |
| 134 | + //获取预存使用金额 | |
| 135 | + await getApp().request.promiseGet("/api/weshop/orderMore/get/" + os.stoid + "/" + order[i].order_sn, { | |
| 136 | + }).then(res => { | |
| 137 | + if (res.data.code == 0 && res.data.data) { | |
| 138 | + // data[ind].use_commission = res.data.data.use_commission; | |
| 139 | + order[i].pre_cut = res.data.data.pre_cut; //是否使用预存,如果是使用预存不能单品退,只能整单退 | |
| 140 | + order[i].pre_json = res.data.data.pre_json; //是否使用预存,如果是使用预存不能单品退,只能整单退 | |
| 141 | + } | |
| 142 | + }) | |
| 143 | + break; | |
| 144 | + | |
| 145 | + case 1: | |
| 146 | + | |
| 147 | + //获取order信息根据订单编号order_sn | |
| 148 | + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/page", { | |
| 149 | + data: { store_id: os.stoid, order_id: order.order_id,} | |
| 150 | + }).then(res => { | |
| 151 | + order_goods = res.data.data.pageData[0]; | |
| 152 | + order[i].order_goods = order_goods; | |
| 153 | + order[i].gimage = ee.data.imageurl + order_goods[0]?.original_img; | |
| 154 | + }) | |
| 155 | + | |
| 156 | + //-- 获取商品信息 -- | |
| 157 | + await getApp().request.promiseGet("/api/weshop/serviceCard/get/" + os.stoid + "/" + goods_id, { | |
| 158 | + }).then(res => { | |
| 159 | + //-- 商品地址 -- | |
| 160 | + order[i].gimage = ee.data.imageurl + res.data.data.original_img | |
| 161 | + }) | |
| 162 | + | |
| 163 | + //-- 多少人参团头像 -- | |
| 164 | + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/pagePtList", { | |
| 165 | + data: { | |
| 166 | + store_id: o.stoid, | |
| 167 | + pt_listno: teamgroup.listno, | |
| 168 | + } | |
| 169 | + }).then(res => { | |
| 170 | + ordertx = res.data.data.pageData; | |
| 171 | + order[i].tx=ordertx; | |
| 172 | + }) | |
| 173 | + | |
| 174 | + break; | |
| 175 | + } | |
| 176 | + | |
| 144 | 177 | |
| 145 | 178 | if (order[i].is_zsorder== 4) { |
| 146 | 179 | var num = 0; | ... | ... |