Commit d3e96f6d4da5b5e7eb145a16cc763889a4210968

Authored by yvan.ni
1 parent 9d88aaff

~~ 专享礼包 ~~

pages/giftpack/buygiftpack/giftpackbuy.js
... ... @@ -164,10 +164,13 @@ Page({
164 164 ut.is_pay_ok(back_url,'none',function (){
165 165 if(!th.data.ok_order_sn) return false;
166 166 getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get",
167   - {data:{storeId:os.stoid,parent_sn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{
168   - if(ut.ajax_ok(res)){
169   - var item=res.data.data.pageData[0];
170   - if(item.pay_status==1){
  167 + {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{
  168 +
  169 + th.data.ok_order_sn=null;
  170 +
  171 + if(res.data.code==0 && res.data.data){
  172 + var item=res.data.data;
  173 + if(item.payState==1){
171 174 //支付支付,返回首页
172 175 ut.m_toast('支付成功');
173 176 setTimeout(()=>{
... ... @@ -180,7 +183,7 @@ Page({
180 183 }
181 184 }
182 185 })
183   - });
  186 + },null,null,1);
184 187  
185 188  
186 189 }
... ...
pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -190,10 +190,12 @@ Page({
190 190 ut.is_pay_ok(back_url,'none',function (){
191 191 if(!th.data.ok_order_sn) return false;
192 192 getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get",
193   - {data:{storeId:os.stoid,parent_sn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{
194   - if(ut.ajax_ok(res)){
195   - var item=res.data.data.pageData[0];
196   - if(item.pay_status==1){
  193 + {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{
  194 +
  195 + th.data.ok_order_sn=null;
  196 + if(res.data.code==0 && res.data.data){
  197 + var item=res.data.data;
  198 + if(item.payState==1){
197 199 //支付支付,返回首页
198 200 ut.m_toast('支付成功');
199 201 setTimeout(()=>{
... ... @@ -204,9 +206,9 @@ Page({
204 206 //支付支付,返回首页
205 207 ut.m_toast('支付失败');
206 208 }
207   - }
  209 + }
208 210 })
209   - });
  211 + },null,null,1);
210 212 }
211 213  
212 214  
... ...