Commit 4cce151c57d29da2c669e58125a4e4c4704100b5
合并冲突
Showing
18 changed files
with
297 additions
and
175 deletions
packageB/pages/luckactivity/luckinfo/luckinfo.js
... | ... | @@ -1356,6 +1356,12 @@ Page({ |
1356 | 1356 | url = `/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&orderSn=${ordersn}&lbId=${buyreceive_id}`; |
1357 | 1357 | break; |
1358 | 1358 | }; |
1359 | + //-- 每月礼包的优化,去列表领取 -- | |
1360 | + case 7: { | |
1361 | + url = `/packageE/pages/user/monthgiftbag/monthgiftbag`; | |
1362 | + break; | |
1363 | + }; | |
1364 | + | |
1359 | 1365 | }; |
1360 | 1366 | app.goto(url); |
1361 | 1367 | }, | ... | ... |
packageD/pages/user/deposit/prepaid/msg/msg.js
... | ... | @@ -9,6 +9,7 @@ Page({ |
9 | 9 | // timer: '',//定时器名字 |
10 | 10 | // countDownNum: '3'//倒计时初始值 |
11 | 11 | iurl: o.imghost, |
12 | + is_nd_pw:0 | |
12 | 13 | }, |
13 | 14 | |
14 | 15 | |
... | ... | @@ -16,7 +17,11 @@ Page({ |
16 | 17 | * 生命周期函数--监听页面加载 |
17 | 18 | */ |
18 | 19 | onLoad: function (options) { |
19 | - | |
20 | + | |
21 | + if(options.is_nd_pw){ | |
22 | + this.data.is_nd_pw=options.is_nd_pw; | |
23 | + } | |
24 | + | |
20 | 25 | }, |
21 | 26 | |
22 | 27 | /** |
... | ... | @@ -30,37 +35,43 @@ Page({ |
30 | 35 | * 生命周期函数--监听页面显示 |
31 | 36 | */ |
32 | 37 | onShow: function () { |
33 | - getApp().check_can_share(); | |
34 | - wx.setNavigationBarTitle({ | |
35 | - title: "支付成功", | |
36 | - }) | |
38 | + getApp().check_can_share(); | |
39 | + wx.setNavigationBarTitle({ | |
40 | + title: "支付成功", | |
41 | + }) | |
42 | + | |
43 | + let th=this; | |
44 | + //判断密码是不是有开始 | |
45 | + if(this.data.is_nd_pw){ | |
46 | + getApp().request.get("/api/weshop/users/getAndUpdateUser/" + os.stoid + "/" + getApp().globalData.user_id, { | |
47 | + success: function (src) { | |
48 | + var a = src.data.data; | |
49 | + if(!a.vipnopwd) { | |
50 | + | |
51 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
52 | + my_confirm.open( | |
53 | + "是否启用消费时密码验证?", | |
54 | + "否", | |
55 | + "是", | |
56 | + function () { | |
57 | + my_confirm.open_cancel(0); | |
58 | + }, | |
59 | + function () { | |
60 | + let url = '/pages/user/userinfo/userinfo?isstcsp=1'; | |
61 | + wx.redirectTo({url: url,}) //跳到非tabbar页 | |
62 | + } | |
63 | + ); | |
64 | + } | |
65 | + | |
66 | + } | |
67 | + }) | |
68 | + } | |
69 | + | |
70 | + | |
71 | + | |
37 | 72 | }, |
38 | - // countDown: function () { | |
39 | - // let that = this; | |
40 | - // let countDownNum = that.data.countDownNum;//获取倒计时初始值 | |
41 | - // //如果将定时器设置在外面,那么用户就看不到countDownNum的数值动态变化,所以要把定时器存进data里面 | |
42 | - // that.setData({ | |
43 | - // timer: setInterval(function () {//这里把setInterval赋值给变量名为timer的变量 | |
44 | - // //每隔一秒countDownNum就减一,实现同步 | |
45 | - // countDownNum--; | |
46 | - // //然后把countDownNum存进data,好让用户知道时间在倒计着 | |
47 | - // that.setData({ | |
48 | - // countDownNum: countDownNum | |
49 | - // }) | |
50 | - // //在倒计时还未到0时,这中间可以做其他的事情,按项目需求来 | |
51 | - // if (countDownNum == 0) { | |
52 | - // //这里特别要注意,计时器是始终一直在走的,如果你的时间为0,那么就要关掉定时器!不然相当耗性能 | |
53 | - // //因为timer是存在data里面的,所以在关掉时,也要在data里取出后再关闭 | |
54 | - // clearInterval(that.data.timer); | |
55 | - // //关闭定时器之后,可作其他处理codes go here | |
56 | - // //--跳到绑定页面-- | |
57 | - // wx.navigateTo({ | |
58 | - // url: '../../../integral/jf', | |
59 | - // }) | |
60 | - // } | |
61 | - // }, 500) | |
62 | - // }) | |
63 | - | |
73 | + | |
74 | + | |
64 | 75 | click:function(){ |
65 | 76 | wx.redirectTo({ |
66 | 77 | //url: '../../../integral/jf', | ... | ... |
packageD/pages/user/deposit/prepaid/msg/msg.json
packageD/pages/user/deposit/prepaid/msg/msg.wxml
packageD/pages/user/deposit/prepaid/prepaid.js
... | ... | @@ -183,8 +183,8 @@ Page({ |
183 | 183 | |
184 | 184 | var buynum = 1; |
185 | 185 | console.log(money, "有进来吗预存劵", advancek, user_id, store_id ); |
186 | - var e = this, | |
187 | - perpaid = ""; | |
186 | + var e = this, perpaid = ""; | |
187 | + let th=this; | |
188 | 188 | await getApp().request.promiseGet("/api/weshop/users/getPay", { |
189 | 189 | data: { |
190 | 190 | account: money, |
... | ... | @@ -220,7 +220,7 @@ Page({ |
220 | 220 | e.jumpPaymentPage(); |
221 | 221 | }, function (e) { |
222 | 222 | |
223 | - this.data.paying=0; | |
223 | + th.data.paying=0; | |
224 | 224 | wx.showToast({ |
225 | 225 | title: e, |
226 | 226 | icon: 'none', |
... | ... | @@ -248,10 +248,11 @@ Page({ |
248 | 248 | // }) |
249 | 249 | }) |
250 | 250 | }, |
251 | + | |
251 | 252 | //------支付成功页面-------- |
252 | 253 | jumpPaymentPage: function () { |
253 | 254 | wx.redirectTo({ |
254 | - url:"msg/msg", | |
255 | + url:"msg/msg?is_nd_pw=1", | |
255 | 256 | }); |
256 | 257 | }, |
257 | 258 | ... | ... |
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml
... | ... | @@ -34,18 +34,25 @@ |
34 | 34 | <text>{{items.giftTitle}}</text> |
35 | 35 | </view> |
36 | 36 | <view class="content_ware_type flex"> |
37 | - <block wx:if="{{items.payMoney>0}}"> | |
38 | - <text>{{"¥"+items.payMoney}}</text> | |
37 | + <block wx:if="{{items.money_type>0}}"> | |
38 | + {{"¥"+items.payMoney}}+{{items.payIntegral}}积分 | |
39 | 39 | </block> |
40 | - <block wx:if="{{items.payMoney>0&&items.payIntegral>0}}"> | |
41 | - <text>/</text> | |
42 | - </block> | |
43 | - <block wx:if="{{items.payIntegral>0}}"> | |
44 | - <view class="flex"> | |
45 | - <text class="ellipsis-1">{{items.payIntegral}}</text> | |
46 | - <view>积分</view> | |
47 | - </view> | |
40 | + <block wx:else> | |
41 | + <block wx:if="{{items.payMoney>0}}"> | |
42 | + <text>{{"¥"+items.payMoney}}</text> | |
43 | + </block> | |
44 | + <block wx:if="{{items.payMoney>0&&items.payIntegral>0}}"> | |
45 | + <text>/</text> | |
46 | + </block> | |
47 | + <block wx:if="{{items.payIntegral>0}}"> | |
48 | + <view class="flex"> | |
49 | + <text class="ellipsis-1">{{items.payIntegral}}</text> | |
50 | + <view>积分</view> | |
51 | + </view> | |
52 | + </block> | |
48 | 53 | </block> |
54 | + | |
55 | + | |
49 | 56 | </view> |
50 | 57 | <view class="content_ware_price no_line_c"> |
51 | 58 | <text class="ellipsis-1">{{"零售价:¥"+items.giftPosPrice}}</text> |
... | ... | @@ -69,17 +76,10 @@ |
69 | 76 | </view> |
70 | 77 | <block wx:if="{{now > items.starTime1}}"> |
71 | 78 | <view class="flex-vertical"> |
72 | - <block wx:if="{{items.payMoney>0 && items.payIntegral>0}}"> | |
73 | - <block wx:if="{{items.payMoney>0}}"> | |
74 | - <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}"> | |
79 | + <block wx:if="{{items.money_type>0}}"> | |
80 | + <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}"> | |
75 | 81 | <button class="box_button_dui">立即购买</button> |
76 | 82 | </view> |
77 | - </block> | |
78 | - <block wx:if="{{items.payIntegral>0}}"> | |
79 | - <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}"> | |
80 | - <button class="box_button_dui box_button_buy">立即兑换</button> | |
81 | - </view> | |
82 | - </block> | |
83 | 83 | </block> |
84 | 84 | <block wx:else> |
85 | 85 | <block wx:if="{{items.payMoney>0}}"> | ... | ... |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
... | ... | @@ -99,11 +99,56 @@ Page({ |
99 | 99 | } |
100 | 100 | |
101 | 101 | |
102 | + var th = this; | |
103 | + this.setData({ | |
104 | + getUserID: d.user_id, | |
105 | + getStorageID: a.stoid, | |
106 | + }) | |
107 | + | |
108 | + if(!options.lbId && options.scene){ | |
109 | + var gid_str = decodeURIComponent(options.scene); | |
110 | + gid_str = gid_str.split("_"); | |
111 | + options.lbId=gid_str[0]; | |
112 | + options.id=gid_str[0]; | |
113 | + options.first_leader=gid_str[1]; | |
114 | + options.isBuy=1; | |
115 | + } | |
116 | + | |
102 | 117 | this.setData({ |
103 | 118 | params: options, |
104 | 119 | getGiftID:options.id |
105 | 120 | }) |
106 | 121 | |
122 | + | |
123 | + this.setData({ | |
124 | + isBuy: options.isBuy, | |
125 | + getGiftID: options.lbId, | |
126 | + orderSn: options.orderSn, | |
127 | + flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1 | |
128 | + record_list_id:options.record_list_id, | |
129 | + is_receive:options.is_receive | |
130 | + }) | |
131 | + if (options.lbId) th.data.lbId = options.lbId; | |
132 | + //-- 获取分享人的ID -- | |
133 | + var first_leader = options.first_leader || getApp().globalData.first_leader; | |
134 | + if (first_leader) { | |
135 | + this.setData({ | |
136 | + first_leader, | |
137 | + }) | |
138 | + //-- user_id代过来免登录 -- | |
139 | + getApp().globalData.first_leader = first_leader; | |
140 | + //调用接口判断是不是会员 | |
141 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
142 | + if (res.data.code == 0) { | |
143 | + getApp().globalData.guide_id = res.data.data.id; | |
144 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id | |
145 | + } | |
146 | + }) | |
147 | + } | |
148 | + th.close(); | |
149 | + | |
150 | + | |
151 | + | |
107 | 152 | getApp().getConfig(function (e) { |
108 | 153 | th.setData({sto_sele_name_1: e.store_name}) |
109 | 154 | }) |
... | ... | @@ -148,7 +193,7 @@ Page({ |
148 | 193 | // sele_g:monthgiftbag, |
149 | 194 | // def_pick_store:monthgiftba_defpick |
150 | 195 | // }) |
151 | - let scene = wx.getLaunchOptionsSync().scene; | |
196 | + let scene=wx.getLaunchOptionsSync().scene; | |
152 | 197 | if (scene==1154) { |
153 | 198 | this.setData({ |
154 | 199 | scene |
... | ... | @@ -157,50 +202,8 @@ Page({ |
157 | 202 | } |
158 | 203 | }, |
159 | 204 | init() { |
160 | - let options = this.data?.params; // this.data == null ? undefined:this.data.params | |
161 | - var th = this; | |
162 | - this.setData({ | |
163 | - getUserID: d.user_id, | |
164 | - getStorageID: a.stoid, | |
165 | - }) | |
166 | - | |
167 | - if(!options.lbId && options.scene){ | |
168 | - var gid_str = decodeURIComponent(options.scene); | |
169 | - gid_str = gid_str.split("_"); | |
170 | - | |
171 | - options.lbId=gid_str[0]; | |
172 | - options.first_leader=gid_str[1]; | |
173 | - options.isBuy=1; | |
174 | - } | |
175 | - | |
176 | 205 | |
177 | - this.setData({ | |
178 | - isBuy: options.isBuy, | |
179 | - getGiftID: options.lbId, | |
180 | - orderSn: options.orderSn, | |
181 | - flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1 | |
182 | - record_list_id:options.record_list_id, | |
183 | - is_receive:options.is_receive | |
184 | - }) | |
185 | - if (options.lbId) th.data.lbId = options.lbId; | |
186 | - //-- 获取分享人的ID -- | |
187 | - var first_leader = options.first_leader || getApp().globalData.first_leader; | |
188 | - if (first_leader) { | |
189 | - this.setData({ | |
190 | - first_leader, | |
191 | - }) | |
192 | - //-- user_id代过来免登录 -- | |
193 | - getApp().globalData.first_leader = first_leader; | |
194 | - //调用接口判断是不是会员 | |
195 | - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
196 | - if (res.data.code == 0) { | |
197 | - getApp().globalData.guide_id = res.data.data.id; | |
198 | - getApp().globalData.guide_pick_id= res.data.data.pickup_id | |
199 | - } | |
200 | - }) | |
201 | - } | |
202 | - th.close(); | |
203 | - | |
206 | + var th=this; | |
204 | 207 | //-- 检测一下有没有门店 -- |
205 | 208 | th.check_guide(function (){ |
206 | 209 | com.wait_for_store_config(th); |
... | ... | @@ -944,12 +947,16 @@ Page({ |
944 | 947 | //--- 分享设置 -- |
945 | 948 | onShareAppMessage: function (e) { |
946 | 949 | getApp().globalData.no_clear = 1; |
950 | + | |
951 | + var ee=this; | |
947 | 952 | var curPage = this; |
948 | 953 | var pagePath = curPage.route; //当前页面url |
949 | 954 | if (pagePath.indexOf('/') != 0) { |
950 | 955 | pagePath = '/' + pagePath; |
951 | 956 | } |
952 | - pagePath += "?isBuy=1" + "&id=" + this.data.options.id + "&first_leader=" + this.data.getUserID; | |
957 | + | |
958 | + | |
959 | + pagePath += "?isBuy=1" + "&id=" + this.data.sele_g.id + "&first_leader=" + this.data.getUserID; | |
953 | 960 | console.log('分享路径'); |
954 | 961 | console.log(pagePath); |
955 | 962 | // if (this.data.isBuy == 0) { |
... | ... | @@ -958,9 +965,14 @@ Page({ |
958 | 965 | // pagePath += "&lbId=" + this.data.getGiftID; |
959 | 966 | // } |
960 | 967 | // console.log('pagePath', pagePath); |
968 | + | |
969 | + var img =ee.data.iurl+(ee.data.sele_g.cover_img ? ee.data.sele_g.cover_img : ee.data.giftImage); | |
970 | + | |
971 | + | |
961 | 972 | return { |
962 | 973 | title: "礼包详情", |
963 | 974 | path: pagePath, |
975 | + imageUrl: img, | |
964 | 976 | } |
965 | 977 | }, |
966 | 978 | |
... | ... | @@ -970,13 +982,17 @@ Page({ |
970 | 982 | onShareTimeline() { |
971 | 983 | getApp().globalData.no_clear = 1; |
972 | 984 | |
973 | - var pagePath = "&isBuy=1" + "&id=" + this.data.options.id + "&first_leader=" + this.data.getUserID; | |
985 | + var ee=this; | |
986 | + var pagePath = "&isBuy=1" + "&id=" + this.data.sele_g.id + "&first_leader=" + this.data.getUserID; | |
974 | 987 | var user_id = getApp().globalData.user_id; |
975 | 988 | if (!user_id) user_id = 0; |
976 | 989 | |
990 | + var img =ee.data.iurl+(ee.data.sele_g.cover_img ? ee.data.sele_g.cover_img : ee.data.giftImage); | |
991 | + | |
977 | 992 | return { |
978 | 993 | title: "礼包详情", |
979 | - query: 'first_leader=' + user_id + pagePath | |
994 | + query: 'first_leader=' + user_id + pagePath, | |
995 | + imageUrl: img, | |
980 | 996 | } |
981 | 997 | }, |
982 | 998 | |
... | ... | @@ -1489,7 +1505,7 @@ Page({ |
1489 | 1505 | |
1490 | 1506 | var app = getApp(); |
1491 | 1507 | var unit = that.data.screenWidth / 750 * 1.35; //基础单位, |
1492 | - var scene = th.data.lbId + ""; | |
1508 | + var scene = th.data.sele_g.id + ""; | |
1493 | 1509 | |
1494 | 1510 | var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; |
1495 | 1511 | if (user_id > 0) { |
... | ... | @@ -1497,7 +1513,7 @@ Page({ |
1497 | 1513 | } |
1498 | 1514 | ///二微码 |
1499 | 1515 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
1500 | - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist"; | |
1516 | + os.stoid + "?sceneValue=" + scene + "&pageValue=packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo"; | |
1501 | 1517 | |
1502 | 1518 | // 读取文件成功则OK-- |
1503 | 1519 | wx.getImageInfo({ |
... | ... | @@ -1606,7 +1622,7 @@ Page({ |
1606 | 1622 | let src = ''; |
1607 | 1623 | context.beginPath(); |
1608 | 1624 | if (type == 0) { // 普通 |
1609 | - src = '../../../images/share/q_tj.png'; | |
1625 | + src = '/images/share/q_tj.png'; | |
1610 | 1626 | context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit); |
1611 | 1627 | context.setFontSize(16 * unit) |
1612 | 1628 | context.setFillStyle("white") |
... | ... | @@ -1615,8 +1631,8 @@ Page({ |
1615 | 1631 | } |
1616 | 1632 | |
1617 | 1633 | |
1618 | - let price = this.data.giftPrice; | |
1619 | - let giftIntegral = this.data.giftIntegral; | |
1634 | + let price = this.data.sele_g.payMoney; | |
1635 | + let giftIntegral = this.data.sele_g.payIntegral; | |
1620 | 1636 | context.setFontSize(32 * unit); |
1621 | 1637 | context.setFillStyle('#DE1117'); |
1622 | 1638 | |
... | ... | @@ -1683,7 +1699,8 @@ Page({ |
1683 | 1699 | tt(); |
1684 | 1700 | return false; |
1685 | 1701 | } |
1686 | - var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage; | |
1702 | + var img_url =ee.data.iurl+(ee.data.sele_g.cover_img ? ee.data.sele_g.cover_img : ee.data.giftImage); | |
1703 | + | |
1687 | 1704 | //获取商品是分享图信息 |
1688 | 1705 | wx.getImageInfo({ |
1689 | 1706 | src: img_url, | ... | ... |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml
... | ... | @@ -10,13 +10,12 @@ |
10 | 10 | </view> |
11 | 11 | |
12 | 12 | <view class="top_title data-v-3a5b7e36"> |
13 | - <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{monthgiftbag.giftTitle}}</text> | |
14 | - | |
13 | + <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{monthgiftbag.giftTitle}}</text> | |
15 | 14 | <!-- 这个是分享按钮 --> |
16 | - <!-- <view wx:if="{{c_state<2}}" class="xc-share-frame t-c" bindtap="clickShare"> | |
15 | + <view wx:if="{{c_state<2}}" class="xc-share-frame t-c" bindtap="clickShare"> | |
17 | 16 | <view class="iconfont icon-share fs40" ></view> |
18 | 17 | <view class="fs22 c-7b">分享</view> |
19 | - </view> --> | |
18 | + </view> | |
20 | 19 | |
21 | 20 | |
22 | 21 | </view> |
... | ... | @@ -45,16 +44,21 @@ |
45 | 44 | |
46 | 45 | <view class="top_price data-v-3a5b7e36"> |
47 | 46 | |
47 | + <block wx:if="{{monthgiftbag.money_type>0}}"> | |
48 | + {{"¥"+monthgiftbag.lbPrice}}+{{monthgiftbag.payIntegral+"积分"}} | |
49 | + </block> | |
50 | + <block wx:else> | |
51 | + <block wx:if="{{monthgiftbag.lbPrice>0}}"> | |
52 | + <text class="data-v-3a5b7e36">{{"¥"+monthgiftbag.lbPrice}}</text> | |
53 | + </block> | |
54 | + <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}"> | |
55 | + <text class="data-v-3a5b7e36">/</text> | |
56 | + </block> | |
57 | + <block wx:if="{{monthgiftbag.payIntegral>0}}"> | |
58 | + <text class="data-v-3a5b7e36">{{monthgiftbag.payIntegral+"积分"}}</text> | |
59 | + </block> | |
60 | + </block> | |
48 | 61 | |
49 | - <block wx:if="{{monthgiftbag.lbPrice>0}}"> | |
50 | - <text class="data-v-3a5b7e36">{{"¥"+monthgiftbag.lbPrice}}</text> | |
51 | - </block> | |
52 | - <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}"> | |
53 | - <text class="data-v-3a5b7e36">/</text> | |
54 | - </block> | |
55 | - <block wx:if="{{monthgiftbag.payIntegral>0}}"> | |
56 | - <text class="data-v-3a5b7e36">{{monthgiftbag.payIntegral+"积分"}}</text> | |
57 | - </block> | |
58 | 62 | <!-- <block wx:if="{{giftType>0}}"> |
59 | 63 | <text class="data-v-3a5b7e36">{{actTitle}}</text> |
60 | 64 | </block> --> |
... | ... | @@ -154,37 +158,33 @@ |
154 | 158 | <block wx:if="{{getUserID && monthgiftbag.giftTitle}}"> |
155 | 159 | <block wx:if="{{isStart==1}}"> |
156 | 160 | <view class="foot_button data-v-3a5b7e36"> |
157 | - <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}"> | |
158 | - <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_left data-v-3a5b7e36 " data-money="{{monthgiftbag.lbPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice"> | |
159 | - <text class="data-v-3a5b7e36 ">立即购买</text> | |
160 | - </view> | |
161 | - <view class="foot_button_right data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
162 | - <text class="data-v-3a5b7e36">立即兑换</text> | |
163 | - </view> | |
164 | - </block> | |
165 | - <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral<=0}}"> | |
166 | - <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_buy data-v-3a5b7e36 " data-money="{{monthgiftbag.lbPrice}}" bindtap="GetBuyPrice" data-id="{{lbId}}"> | |
167 | - <text class="data-v-3a5b7e36">立即购买</text> | |
168 | - </view> | |
169 | - </block> | |
170 | - <block wx:if="{{monthgiftbag.lbPrice<=0 && monthgiftbag.payIntegral>0}}"> | |
171 | - <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_intalge data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
172 | - <text class="data-v-3a5b7e36">立即兑换</text> | |
173 | - </view> | |
174 | - </block> | |
175 | - <block wx:if="{{monthgiftbag.lbPrice<=0 && monthgiftbag.payIntegral<=0}}"> | |
176 | - <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_buy data-v-3a5b7e36 " bindtap="GetFree" data-id="{{lbId}}"> | |
177 | - <text class="data-v-3a5b7e36">免费领取</text> | |
178 | - </view> | |
179 | - </block> | |
180 | - <!-- <block > | |
181 | - <view class="foot_button_intalge data-v-3a5b7e36 " wx:if="{{!is_receive}}" bindtap="getGift" data-id="{{lbId}}"> | |
182 | - <text class="data-v-3a5b7e36">领取</text> | |
183 | - </view> | |
184 | - <view class="foot_button_intalge data-v-3a5b7e36 " wx:if="{{is_receive}}" data-id="{{lbId}}"> | |
185 | - <text class="data-v-3a5b7e36">已领取</text> | |
186 | - </view> | |
187 | - </block> --> | |
161 | + | |
162 | + <block wx:if="{{monthgiftbag.money_type>0}}"> | |
163 | + <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_left data-v-3a5b7e36" data-money="{{monthgiftbag.lbPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice"> | |
164 | + <text class="data-v-3a5b7e36 ">立即购买</text> | |
165 | + </view> | |
166 | + </block> | |
167 | + <block wx:else> | |
168 | + <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}"> | |
169 | + <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_left data-v-3a5b7e36 " data-money="{{monthgiftbag.lbPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice"> | |
170 | + <text class="data-v-3a5b7e36 ">立即购买</text> | |
171 | + </view> | |
172 | + <view class="foot_button_right data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
173 | + <text class="data-v-3a5b7e36">立即兑换</text> | |
174 | + </view> | |
175 | + </block> | |
176 | + <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral<=0}}"> | |
177 | + <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_buy data-v-3a5b7e36 " data-money="{{monthgiftbag.lbPrice}}" bindtap="GetBuyPrice" data-id="{{lbId}}"> | |
178 | + <text class="data-v-3a5b7e36">立即购买</text> | |
179 | + </view> | |
180 | + </block> | |
181 | + <block wx:if="{{monthgiftbag.lbPrice<=0 && monthgiftbag.payIntegral>0}}"> | |
182 | + <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_intalge data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
183 | + <text class="data-v-3a5b7e36">立即兑换</text> | |
184 | + </view> | |
185 | + </block> | |
186 | + </block> | |
187 | + | |
188 | 188 | </view> |
189 | 189 | </block> |
190 | 190 | <block wx:else> | ... | ... |
packageE/pages/user/monthgiftbag/public/buy_com.js
... | ... | @@ -244,7 +244,11 @@ module.exports = { |
244 | 244 | //-- 分享导购要记录 -- |
245 | 245 | if (getApp().globalData.guide_id) { |
246 | 246 | json.guide_id = getApp().globalData.guide_id; |
247 | - } | |
247 | + } | |
248 | + //-- 如果是且的购买每月礼包的话 -- | |
249 | + if(th.data.sele_g.money_type>0){ | |
250 | + json.exchangeintegral=th.data.sele_g.payIntegral | |
251 | + } | |
248 | 252 | |
249 | 253 | // var url ="/api/weshop/marketing/buy/receive/gift/record/insert"; |
250 | 254 | var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/createOrder"; | ... | ... |
packageE/pages/user/monthgiftbag/public/buy_com.wxml
... | ... | @@ -157,19 +157,26 @@ |
157 | 157 | <view class="spec-goods-name ellipsis-2">{{sele_g.giftTitle}}</view> |
158 | 158 | <view class="flex ai_end xc-val-money"> |
159 | 159 | <view class="spec-goods-price"> |
160 | - <block wx:if="{{sele_g.payMoney>0}}"> | |
161 | - <text>{{"¥"+sele_g.payMoney}}</text> | |
162 | - </block> | |
163 | - <block wx:if="{{sele_g.payMoney>0&&sele_g.payIntegral>0}}"> | |
164 | - <text>/</text> | |
160 | + | |
161 | + <block wx:if="{{sele_g.money_type>0}}"> | |
162 | + {{"¥"+sele_g.payMoney}}+{{sele_g.payIntegral}}积分 | |
165 | 163 | </block> |
166 | - <block wx:if="{{sele_g.payIntegral>0}}"> | |
167 | - <view class="flex"> | |
168 | - <text class="ellipsis-1">{{sele_g.payIntegral}}</text> | |
169 | - <view>积分</view> | |
170 | - </view> | |
164 | + <block wx:else> | |
165 | + <block wx:if="{{sele_g.payMoney>0}}"> | |
166 | + <text>{{"¥"+sele_g.payMoney}}</text> | |
167 | + </block> | |
168 | + <block wx:if="{{sele_g.payMoney>0&&sele_g.payIntegral>0}}"> | |
169 | + <text>/</text> | |
170 | + </block> | |
171 | + <block wx:if="{{sele_g.payIntegral>0}}"> | |
172 | + <view class="flex"> | |
173 | + <text class="ellipsis-1">{{sele_g.payIntegral}}</text> | |
174 | + <view>积分</view> | |
175 | + </view> | |
176 | + </block> | |
171 | 177 | </block> |
172 | 178 | |
179 | + | |
173 | 180 | </view> |
174 | 181 | </view> |
175 | 182 | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.js
... | ... | @@ -144,7 +144,16 @@ Page({ |
144 | 144 | navigateTo: function (e) { |
145 | 145 | var th = this; |
146 | 146 | var url = e.currentTarget.dataset.url; |
147 | - getApp().goto(url); | |
147 | + let is_back = e.currentTarget.dataset.is_back | |
148 | + if (is_back==1) { | |
149 | + wx.showToast({ | |
150 | + title: '该礼包已退款', | |
151 | + icon: 'none', | |
152 | + duration: 2000 | |
153 | + }) | |
154 | + }else { | |
155 | + getApp().goto(url); | |
156 | + } | |
148 | 157 | }, |
149 | 158 | //下拉事件 |
150 | 159 | onReachBottom: function () { | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.wxml
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | </view> |
24 | 24 | <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
25 | 25 | <view class="content_box"> |
26 | - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> | |
26 | + <view class="content_box_ware" bindtap="navigateTo" data-is_back="{{item.is_back}}" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> | |
27 | 27 | <view class="content_box_img"> |
28 | 28 | <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> --> |
29 | 29 | <image wx:if="{{item.cover_img}}" src="{{iurl+item.cover_img}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].cover_img"></image> |
... | ... | @@ -93,9 +93,10 @@ |
93 | 93 | |
94 | 94 | </view> |
95 | 95 | </view> |
96 | - <view class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> | |
96 | + <view wx:if="{{item.is_back !=1}}" class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> | |
97 | 97 | <button>立即使用</button> |
98 | 98 | </view> |
99 | + <view class="content_box_button" style="color:#b9b5b5;" wx:else>已退款</view> | |
99 | 100 | </view> |
100 | 101 | </block> |
101 | 102 | <block wx:if="{{is_read && wareCard.length<1 && is_get}}"> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -5318,6 +5318,21 @@ Page({ |
5318 | 5318 | }, |
5319 | 5319 | |
5320 | 5320 | //-----------------拼单生成方法--------------------- |
5321 | + // addCart_pt: function () { | |
5322 | + // var th = this; | |
5323 | + // if (this.data.is_normal == 0) { | |
5324 | + // //看一下有没有起购数,如果有起购数,要计算起购数 | |
5325 | + // var qnum = parseFloat(th.data.prom_act.minbuynum); | |
5326 | + // if (qnum > 0 && th.data.goodsInputNum < qnum) { | |
5327 | + // getApp().confirmBox("拼团商品至少要买" + qnum + "件!"); | |
5328 | + // return false; | |
5329 | + // } | |
5330 | + // } | |
5331 | + // th.addcart_pt_func(); | |
5332 | + // | |
5333 | + // }, | |
5334 | + | |
5335 | + //-----------------拼单生成方法--------------------- | |
5321 | 5336 | addCart_pt: function () { |
5322 | 5337 | var th = this; |
5323 | 5338 | if (this.data.is_normal == 0) { |
... | ... | @@ -5327,12 +5342,45 @@ Page({ |
5327 | 5342 | getApp().confirmBox("拼团商品至少要买" + qnum + "件!"); |
5328 | 5343 | return false; |
5329 | 5344 | } |
5330 | - } | |
5331 | 5345 | |
5332 | - th.addcart_pt_func(); | |
5346 | + th.addcart_pt_func(); | |
5347 | + | |
5348 | + } else { | |
5349 | + | |
5350 | + //如果是线下库存的时候 | |
5351 | + if (th.data.sales_rules >= 2 && !th.data.sele_g.whsle_id) { | |
5352 | + var pick = th.get_pick_from_list(th.data.sto_sele_id) | |
5353 | + //---通过接口获取门店的线下库存信息-- | |
5354 | + th.check_CanOutQty(th.data.sele_g, pick, function (CanOutQty) { | |
5355 | + if (CanOutQty) { | |
5356 | + if (CanOutQty < e.data.goodsInputNum) { | |
5357 | + wx.hideLoading(); | |
5358 | + th.data.adding = 0; | |
5359 | + wx.showToast({ | |
5360 | + title: '库存不足!', | |
5361 | + icon: 'none', | |
5362 | + }); | |
5363 | + return false; | |
5364 | + } | |
5333 | 5365 | |
5366 | + //-- 成功才来下一步 -- | |
5367 | + th.addcart_pt_func(); | |
5368 | + } else { | |
5369 | + wx.hideLoading(); | |
5370 | + wx.showToast({ | |
5371 | + title: '库存不足!', | |
5372 | + icon: 'none', | |
5373 | + }); | |
5374 | + return false; | |
5375 | + } | |
5376 | + }) | |
5377 | + }else{ | |
5378 | + th.addcart_pt_func(); | |
5379 | + } | |
5380 | + } | |
5334 | 5381 | }, |
5335 | 5382 | |
5383 | + | |
5336 | 5384 | addcart_pt_func: function () { |
5337 | 5385 | if (oo.user_id == null) { |
5338 | 5386 | s.my_warnning("还未登录!", 0, this); | ... | ... |
pages/goods/goodsList/goodsList.js
... | ... | @@ -509,12 +509,20 @@ Page({ |
509 | 509 | } |
510 | 510 | } |
511 | 511 | console.log("11-11"+pagePath); |
512 | - let share_imgurl=this.data.iurl + this.data.share_imgurl | |
513 | - return { | |
512 | + | |
513 | + | |
514 | + //分享的数组 | |
515 | + let share_dd={ | |
514 | 516 | title: "商品列表", |
515 | 517 | path:pagePath, |
516 | - imageUrl:share_imgurl | |
517 | 518 | } |
519 | + //有图片才分享图片 | |
520 | + if(this.data.share_imgurl){ | |
521 | + let share_imgurl=this.data.iurl + this.data.share_imgurl; | |
522 | + share_dd.imageUrl=share_imgurl; | |
523 | + } | |
524 | + | |
525 | + return share_dd; | |
518 | 526 | }, |
519 | 527 | //---图片失败,默认图片--- |
520 | 528 | bind_bnerr2: function (e) { | ... | ... |
pages/user/order_detail/order_detail.js
pages/user/order_list/order_list.js
... | ... | @@ -1130,7 +1130,6 @@ Page({ |
1130 | 1130 | if(good.prom_type != gg.prom_type && good.prom_id != gg.prom_id){ |
1131 | 1131 | //如果商品有单独的活动的是偶 |
1132 | 1132 | switch (gg.prom_type){ |
1133 | - case 5: | |
1134 | 1133 | case 10: |
1135 | 1134 | var content = gg.goods_name + '商品的活动发生了变化,请取消订单重新购买'; |
1136 | 1135 | th.toast(content); | ... | ... |
pages/user/userinfo/userinfo.js
... | ... | @@ -75,7 +75,8 @@ Page({ |
75 | 75 | canIUseGetUserProfile: false, |
76 | 76 | getusercode_vailtime:10,//会员二维码时效 |
77 | 77 | |
78 | - sele_ing:0 | |
78 | + sele_ing:0, | |
79 | + set_isstcsp:0 | |
79 | 80 | |
80 | 81 | }, |
81 | 82 | //通过路径跳转到其他页面 |
... | ... | @@ -654,6 +655,10 @@ Page({ |
654 | 655 | canIUseGetUserProfile: true |
655 | 656 | }) |
656 | 657 | } |
658 | + //如果有指定要启用密码的时候 | |
659 | + if(t.isstcsp){ | |
660 | + this.setData({set_isstcsp:1,ispwhid:0}); | |
661 | + } | |
657 | 662 | |
658 | 663 | }, |
659 | 664 | |
... | ... | @@ -797,6 +802,9 @@ Page({ |
797 | 802 | a.staffTel=choice_guide.Tel; |
798 | 803 | } |
799 | 804 | |
805 | + if(e.data.set_isstcsp){ | |
806 | + a.vipnopwd=1; | |
807 | + } | |
800 | 808 | |
801 | 809 | e.setData({ |
802 | 810 | phone: a.mobile, | ... | ... |
pages/user/userinfo/userinfo.wxml
... | ... | @@ -78,7 +78,7 @@ |
78 | 78 | <input bindblur="lose_focus" class="fs28 hion user-txt-right" value="{{consumption}}" password="true" type="number"/> |
79 | 79 | </block> |
80 | 80 | <block wx:else> |
81 | - <input bindblur="lose_focus" class="fs28 hion user-txt-right" value="{{consumption}}" type="number"/> | |
81 | + <input bindblur="lose_focus" focus="{{set_isstcsp?true:false}}" class="fs28 hion user-txt-right" value="{{consumption}}" type="number"/> | |
82 | 82 | </block> |
83 | 83 | |
84 | 84 | <block wx:if="{{ispwhid}}"> | ... | ... |