Commit 923ad572ab2cc868c36124cd71a5b8e7c1610a44
1 parent
3698e439
预存造成的bug优化
Showing
6 changed files
with
51 additions
and
8 deletions
packageA/pages/goodsInfo/goodsInfo.js
| ... | ... | @@ -775,16 +775,16 @@ Page({ |
| 775 | 775 | }, |
| 776 | 776 | |
| 777 | 777 | onUnload: function() { |
| 778 | - for(var i = 1; i < 100; i++) { | |
| 779 | - clearInterval(i); | |
| 780 | - } | |
| 778 | + // for(var i = 1; i < 100; i++) { | |
| 779 | + // clearInterval(i); | |
| 780 | + // } | |
| 781 | 781 | }, |
| 782 | 782 | |
| 783 | 783 | onHide: function() { |
| 784 | 784 | this.data.is_timer = 0; |
| 785 | - for(var i = 1; i < 100; i++) { | |
| 786 | - clearInterval(i); | |
| 787 | - } | |
| 785 | + // for(var i = 1; i < 100; i++) { | |
| 786 | + // clearInterval(i); | |
| 787 | + // } | |
| 788 | 788 | }, |
| 789 | 789 | //----------三个选项按钮----------- |
| 790 | 790 | tabClick: function(t) { | ... | ... |
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
| ... | ... | @@ -268,6 +268,15 @@ Page({ |
| 268 | 268 | }, |
| 269 | 269 | //计算商品预存款请求方法------------------------------------ |
| 270 | 270 | async getGoodsAdvancesum(storageid, listform, cartList) { |
| 271 | + | |
| 272 | + await getApp().request.promisePost("/api/weshop/store/get/" + storageid,{ | |
| 273 | + }).then(res=>{ | |
| 274 | + if(res.data.code==0){ | |
| 275 | + getApp().globalData.config = res.data.data | |
| 276 | + } | |
| 277 | + }) | |
| 278 | + if(!getApp().globalData.config) return false; | |
| 279 | + | |
| 271 | 280 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { |
| 272 | 281 | data: { |
| 273 | 282 | accdb: getApp().globalData.config.erpid, | ... | ... |
packageC/pages/presell/cart/cart2_pre.js
| ... | ... | @@ -398,6 +398,15 @@ Page({ |
| 398 | 398 | }, |
| 399 | 399 | //计算商品预存款请求方法------------------------------------ |
| 400 | 400 | async getGoodsAdvancesum(storageid, listform, cartList) { |
| 401 | + | |
| 402 | + await getApp().request.promisePost("/api/weshop/store/get/" + storageid,{ | |
| 403 | + }).then(res=>{ | |
| 404 | + if(res.data.code==0){ | |
| 405 | + getApp().globalData.config = res.data.data | |
| 406 | + } | |
| 407 | + }) | |
| 408 | + if(!getApp().globalData.config) return false; | |
| 409 | + | |
| 401 | 410 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { |
| 402 | 411 | data: { |
| 403 | 412 | accdb: getApp().globalData.config.erpid, | ... | ... |
packageE/pages/cart/cart2/cart2.js
| ... | ... | @@ -402,14 +402,21 @@ Page({ |
| 402 | 402 | } |
| 403 | 403 | listform.push(obj) |
| 404 | 404 | }) |
| 405 | - let arr = await this.getGoodsAdvancesum(keyid, listform, cartList) | |
| 405 | + let arr = await getApp().getGoodsAdvancesum(keyid, listform, cartList) | |
| 406 | 406 | // } |
| 407 | 407 | wx.hideLoading() |
| 408 | 408 | return arr |
| 409 | 409 | }, |
| 410 | 410 | |
| 411 | 411 | //计算商品预存款请求方法------------------------------------ |
| 412 | - async getGoodsAdvancesum(storageid, listform, cartList) { | |
| 412 | + async getGoodsAdvancesum(storageid, listform, cartList,th) { | |
| 413 | + await getApp().request.promisePost("/api/weshop/store/get/" + storageid,{ | |
| 414 | + }).then(res=>{ | |
| 415 | + if(res.data.code==0){ | |
| 416 | + getApp().globalData.config = res.data.data | |
| 417 | + } | |
| 418 | + }) | |
| 419 | + if(!getApp().globalData.config) return false; | |
| 413 | 420 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { |
| 414 | 421 | data: { |
| 415 | 422 | accdb: getApp().globalData.config.erpid, | ... | ... |
pages/cart/cart2_inte/cart2_inte.js
| ... | ... | @@ -269,6 +269,15 @@ Page({ |
| 269 | 269 | }, |
| 270 | 270 | //计算商品预存款请求方法------------------------------------ |
| 271 | 271 | async getGoodsAdvancesum(storageid, listform, cartList) { |
| 272 | + | |
| 273 | + await getApp().request.promisePost("/api/weshop/store/get/" + storageid,{ | |
| 274 | + }).then(res=>{ | |
| 275 | + if(res.data.code==0){ | |
| 276 | + getApp().globalData.config = res.data.data | |
| 277 | + } | |
| 278 | + }) | |
| 279 | + if(!getApp().globalData.config) return false; | |
| 280 | + | |
| 272 | 281 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { |
| 273 | 282 | data: { |
| 274 | 283 | accdb: getApp().globalData.config.erpid, | ... | ... |
pages/cart/cart2_pt/cart2_pt.js
| ... | ... | @@ -225,6 +225,15 @@ Page({ |
| 225 | 225 | }, |
| 226 | 226 | //计算商品预存款请求方法------------------------------------ |
| 227 | 227 | async getGoodsAdvancesum(storageid, listform, cartList) { |
| 228 | + | |
| 229 | + await getApp().request.promisePost("/api/weshop/store/get/" + storageid,{ | |
| 230 | + }).then(res=>{ | |
| 231 | + if(res.data.code==0){ | |
| 232 | + getApp().globalData.config = res.data.data | |
| 233 | + } | |
| 234 | + }) | |
| 235 | + if(!getApp().globalData.config) return false; | |
| 236 | + | |
| 228 | 237 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { |
| 229 | 238 | data: { |
| 230 | 239 | accdb: getApp().globalData.config.erpid, | ... | ... |