Commit 960b5ecabb7d16548098813bf7e59ce10150e581

Authored by 前端开发-罗建龙
1 parent 4b48eeaf

积分购同城配送费用优化

packageE/pages/cart/cart2_inte/cart2_inte.js
... ... @@ -972,35 +972,6 @@ Page({
972 972 }
973 973  
974 974  
975   -
976   - //预存金额使用参与计算
977   - if (th.data.udata && th.data.udata.Balance > 0 && order_m * 1 > 0) {
978   - if (!th.data.bn_goods.keyid) {
979   - //获取门店信息
980   - await getApp().request.promiseGet("/api/weshop/pickup/list", {
981   - data: {
982   - store_id: os.stoid,
983   - ids: th.data.bn_pick
984   - }
985   - }).then(res => {
986   - if (ut.ajax_ok(res)) {
987   - console.log(res);
988   - if (res.data.code == 0) {
989   - let resData = res.data.data.pageData
990   - if (resData && resData[0]) {
991   - let keyid = resData[0].keyid
992   - let txt = 'bn_goods.keyid'
993   - th.setData({
994   - [txt]: keyid
995   - })
996   - }
997   - }
998   - }
999   - })
1000   - }
1001   -
1002   -
1003   -
1004 975 //判断是否同城配送,而且没有调用过
1005 976 if(th.data.bn_exp_type==2 && th.data.user_addr) {
1006 977  
... ... @@ -1072,6 +1043,35 @@ Page({
1072 1043  
1073 1044 }
1074 1045  
  1046 + //预存金额使用参与计算
  1047 + if (th.data.udata && th.data.udata.Balance > 0 && order_m * 1 > 0) {
  1048 + if (!th.data.bn_goods.keyid) {
  1049 + //获取门店信息
  1050 + await getApp().request.promiseGet("/api/weshop/pickup/list", {
  1051 + data: {
  1052 + store_id: os.stoid,
  1053 + ids: th.data.bn_pick
  1054 + }
  1055 + }).then(res => {
  1056 + if (ut.ajax_ok(res)) {
  1057 + console.log(res);
  1058 + if (res.data.code == 0) {
  1059 + let resData = res.data.data.pageData
  1060 + if (resData && resData[0]) {
  1061 + let keyid = resData[0].keyid
  1062 + let txt = 'bn_goods.keyid'
  1063 + th.setData({
  1064 + [txt]: keyid
  1065 + })
  1066 + }
  1067 + }
  1068 + }
  1069 + })
  1070 + }
  1071 +
  1072 +
  1073 +
  1074 +
1075 1075  
1076 1076  
1077 1077 var yc_order_m=order_m;
... ...