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,16 +775,16 @@ Page({ | ||
| 775 | }, | 775 | }, |
| 776 | 776 | ||
| 777 | onUnload: function() { | 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 | onHide: function() { | 783 | onHide: function() { |
| 784 | this.data.is_timer = 0; | 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 | tabClick: function(t) { | 790 | tabClick: function(t) { |
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
| @@ -268,6 +268,15 @@ Page({ | @@ -268,6 +268,15 @@ Page({ | ||
| 268 | }, | 268 | }, |
| 269 | //计算商品预存款请求方法------------------------------------ | 269 | //计算商品预存款请求方法------------------------------------ |
| 270 | async getGoodsAdvancesum(storageid, listform, cartList) { | 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 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { | 280 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { |
| 272 | data: { | 281 | data: { |
| 273 | accdb: getApp().globalData.config.erpid, | 282 | accdb: getApp().globalData.config.erpid, |
packageC/pages/presell/cart/cart2_pre.js
| @@ -398,6 +398,15 @@ Page({ | @@ -398,6 +398,15 @@ Page({ | ||
| 398 | }, | 398 | }, |
| 399 | //计算商品预存款请求方法------------------------------------ | 399 | //计算商品预存款请求方法------------------------------------ |
| 400 | async getGoodsAdvancesum(storageid, listform, cartList) { | 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 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { | 410 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { |
| 402 | data: { | 411 | data: { |
| 403 | accdb: getApp().globalData.config.erpid, | 412 | accdb: getApp().globalData.config.erpid, |
packageE/pages/cart/cart2/cart2.js
| @@ -402,14 +402,21 @@ Page({ | @@ -402,14 +402,21 @@ Page({ | ||
| 402 | } | 402 | } |
| 403 | listform.push(obj) | 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 | wx.hideLoading() | 407 | wx.hideLoading() |
| 408 | return arr | 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 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { | 420 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { |
| 414 | data: { | 421 | data: { |
| 415 | accdb: getApp().globalData.config.erpid, | 422 | accdb: getApp().globalData.config.erpid, |
pages/cart/cart2_inte/cart2_inte.js
| @@ -269,6 +269,15 @@ Page({ | @@ -269,6 +269,15 @@ Page({ | ||
| 269 | }, | 269 | }, |
| 270 | //计算商品预存款请求方法------------------------------------ | 270 | //计算商品预存款请求方法------------------------------------ |
| 271 | async getGoodsAdvancesum(storageid, listform, cartList) { | 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 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { | 281 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { |
| 273 | data: { | 282 | data: { |
| 274 | accdb: getApp().globalData.config.erpid, | 283 | accdb: getApp().globalData.config.erpid, |
pages/cart/cart2_pt/cart2_pt.js
| @@ -225,6 +225,15 @@ Page({ | @@ -225,6 +225,15 @@ Page({ | ||
| 225 | }, | 225 | }, |
| 226 | //计算商品预存款请求方法------------------------------------ | 226 | //计算商品预存款请求方法------------------------------------ |
| 227 | async getGoodsAdvancesum(storageid, listform, cartList) { | 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 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { | 237 | let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { |
| 229 | data: { | 238 | data: { |
| 230 | accdb: getApp().globalData.config.erpid, | 239 | accdb: getApp().globalData.config.erpid, |