Commit a223079631d6574381eb238f5179c12477838750
1 parent
f46752b4
预售服务卡的优化
Showing
2 changed files
with
11 additions
and
19 deletions
packageC/pages/presell/cardInfo/goodsInfo.js
@@ -730,6 +730,7 @@ Page({ | @@ -730,6 +730,7 @@ Page({ | ||
730 | 'service_sn':t.data.data.serviceSn, | 730 | 'service_sn':t.data.data.serviceSn, |
731 | 'goods_sn':t.data.data.serviceSn, | 731 | 'goods_sn':t.data.data.serviceSn, |
732 | 'listServiceVideos': t.data.data.listServiceVideos, | 732 | 'listServiceVideos': t.data.data.listServiceVideos, |
733 | + 'erpItemID': t.data.data.erpItemID, | ||
733 | } | 734 | } |
734 | 735 | ||
735 | that.setData({ | 736 | that.setData({ |
@@ -916,6 +917,8 @@ Page({ | @@ -916,6 +917,8 @@ Page({ | ||
916 | goods_name: o.goods_name, | 917 | goods_name: o.goods_name, |
917 | goods_sn: o.goods_sn, | 918 | goods_sn: o.goods_sn, |
918 | presell_list_id: th.data.presellList.id, | 919 | presell_list_id: th.data.presellList.id, |
920 | + erpItemID: o.erpItemID, | ||
921 | + keyid: th.data.sto_sele_keyid, | ||
919 | }; | 922 | }; |
920 | 923 | ||
921 | //---是不是从收藏夹出来的--- | 924 | //---是不是从收藏夹出来的--- |
packageC/pages/presell/cart/cart2_pre.js
@@ -823,14 +823,14 @@ Page({ | @@ -823,14 +823,14 @@ Page({ | ||
823 | var th = this,pdata = new Array(); | 823 | var th = this,pdata = new Array(); |
824 | 824 | ||
825 | var item = { | 825 | var item = { |
826 | - 'user_id': to.globalData.user_id, | 826 | + 'user_id': getApp().globalData.user_id, |
827 | 'account': th.data.formData.order_amount, //使用余额 | 827 | 'account': th.data.formData.order_amount, //使用余额 |
828 | - 'store_id': oo.stoid, //商家 | 828 | + 'store_id': os.stoid, //商家 |
829 | 'list': new Array(), | 829 | 'list': new Array(), |
830 | }; | 830 | }; |
831 | 831 | ||
832 | //判断是不是购物车购买还是立即购买 | 832 | //判断是不是购物车购买还是立即购买 |
833 | - var gg = getApp().globalData.service_now; | 833 | + var gg = app.get_b_now(); |
834 | if (!gg.pick_id) { | 834 | if (!gg.pick_id) { |
835 | getApp().showWarning("未找到门店"); | 835 | getApp().showWarning("未找到门店"); |
836 | return false; | 836 | return false; |
@@ -839,7 +839,7 @@ Page({ | @@ -839,7 +839,7 @@ Page({ | ||
839 | 'card_id': th.data.bn_goods.id, | 839 | 'card_id': th.data.bn_goods.id, |
840 | 'itemid': th.data.bn_goods.erpItemID, | 840 | 'itemid': th.data.bn_goods.erpItemID, |
841 | 'qty': gg.goods_num, | 841 | 'qty': gg.goods_num, |
842 | - 'price': th.data.bn_goods.money, | 842 | + 'price': th.data.bn_goods.shop_price, |
843 | // 'price': th.data.formData.order_amount, | 843 | // 'price': th.data.formData.order_amount, |
844 | 'pickup_id': gg.pick_id, | 844 | 'pickup_id': gg.pick_id, |
845 | 'pickup_keyid': gg.keyid, | 845 | 'pickup_keyid': gg.keyid, |
@@ -847,10 +847,6 @@ Page({ | @@ -847,10 +847,6 @@ Page({ | ||
847 | 'prom_id': this.data.postdata.prom_id, //促销活动id | 847 | 'prom_id': this.data.postdata.prom_id, //促销活动id |
848 | }; | 848 | }; |
849 | 849 | ||
850 | - if(this.data.postdata.prom_type == 1) { | ||
851 | - goods.price = this.data.postdata.prom_price; | ||
852 | - }; | ||
853 | - | ||
854 | if(getApp().globalData.skinface_id){ | 850 | if(getApp().globalData.skinface_id){ |
855 | goods.skinface_id=getApp().globalData.skinface_id; | 851 | goods.skinface_id=getApp().globalData.skinface_id; |
856 | } | 852 | } |
@@ -865,7 +861,7 @@ Page({ | @@ -865,7 +861,7 @@ Page({ | ||
865 | goods.guide_id = gg.guide_id; | 861 | goods.guide_id = gg.guide_id; |
866 | goods.guide_type = gg.guide_type; | 862 | goods.guide_type = gg.guide_type; |
867 | //调用接口判断是不是会员 | 863 | //调用接口判断是不是会员 |
868 | - await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/" + oo.stoid + "/" + gg.guide_id, {}).then( | 864 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/" + os.stoid + "/" + gg.guide_id, {}).then( |
869 | res => { | 865 | res => { |
870 | if (res.data.code == 0) { | 866 | if (res.data.code == 0) { |
871 | goods.guide_name = res.data.data.salesman; | 867 | goods.guide_name = res.data.data.salesman; |
@@ -888,7 +884,7 @@ Page({ | @@ -888,7 +884,7 @@ Page({ | ||
888 | title: "加载中" | 884 | title: "加载中" |
889 | }); | 885 | }); |
890 | wx.request({ | 886 | wx.request({ |
891 | - url: oo.url + '/api/weshop/recharge/saveRecharge', | 887 | + url: os.url + '/api/weshop/recharge/saveRecharge', |
892 | data: str, | 888 | data: str, |
893 | method: 'POST', | 889 | method: 'POST', |
894 | header: { | 890 | header: { |
@@ -901,14 +897,7 @@ Page({ | @@ -901,14 +897,7 @@ Page({ | ||
901 | var data = res.data; | 897 | var data = res.data; |
902 | if (data.code == 0) { | 898 | if (data.code == 0) { |
903 | th.data.order_id = data.data.order_id; | 899 | th.data.order_id = data.data.order_id; |
904 | - // console.log('myyyyyyyyyyyyyyyyyy', data.data); | ||
905 | - if (th.data.is_cart) { | ||
906 | - var list = th.data.cartlist_y; | ||
907 | - for (var i = 0; i < list.length; i++) { | ||
908 | - //删除购物车 | ||
909 | - a.delete("/api/weshop/cartService/del/" + oo.stoid + "/" + list[i].id, {}); | ||
910 | - } | ||
911 | - } | 900 | + |
912 | var order_amount = pdata.account; | 901 | var order_amount = pdata.account; |
913 | //要进行判断,如果是用微信支付,就要跳转到支付界面 | 902 | //要进行判断,如果是用微信支付,就要跳转到支付界面 |
914 | if (order_amount > 0) { | 903 | if (order_amount > 0) { |
@@ -920,7 +909,7 @@ Page({ | @@ -920,7 +909,7 @@ Page({ | ||
920 | t_pay.pay( | 909 | t_pay.pay( |
921 | { | 910 | { |
922 | parentSn: data.data.order_sn, | 911 | parentSn: data.data.order_sn, |
923 | - store_id: oo.stoid | 912 | + store_id: os.stoid |
924 | },function (){ | 913 | },function (){ |
925 | wx.showToast({ | 914 | wx.showToast({ |
926 | title: '购买成功', | 915 | title: '购买成功', |