Commit 2ac40436d9402c77cb2a7e25bb4fecf2097d89ef
Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp
Showing
45 changed files
with
2967 additions
and
332 deletions
app.js
@@ -517,6 +517,9 @@ App({ | @@ -517,6 +517,9 @@ App({ | ||
517 | } | 517 | } |
518 | 518 | ||
519 | }, | 519 | }, |
520 | + re_to(url){ | ||
521 | + wx.redirectTo({ url: url, }) //跳到非tabbar页 | ||
522 | + }, | ||
520 | 523 | ||
521 | //显示提示,word提示内容,type 0失败,提示 1成功 | 524 | //显示提示,word提示内容,type 0失败,提示 1成功 |
522 | my_warnning(word, type, that, width) { | 525 | my_warnning(word, type, that, width) { |
app.json
@@ -26,8 +26,7 @@ | @@ -26,8 +26,7 @@ | ||
26 | "pages/activity/pind_list/pind_list", | 26 | "pages/activity/pind_list/pind_list", |
27 | "pages/team/team_success/team_success", | 27 | "pages/team/team_success/team_success", |
28 | "pages/team/team_show/team_show", | 28 | "pages/team/team_show/team_show", |
29 | - "pages/team/team_ping/team_ping", | ||
30 | - "pages/cart/cart2_pt/cart2_pt", | 29 | + "pages/team/team_ping/team_ping", |
31 | "pages/cart/cart_wk/cart_wk", | 30 | "pages/cart/cart_wk/cart_wk", |
32 | 31 | ||
33 | 32 | ||
@@ -227,7 +226,8 @@ | @@ -227,7 +226,8 @@ | ||
227 | "pages/user/monthgiftbag/giftpacklist/giftpacklist", | 226 | "pages/user/monthgiftbag/giftpacklist/giftpacklist", |
228 | "pages/user/monthgiftbag/giftpackinfo/giftpackinfo", | 227 | "pages/user/monthgiftbag/giftpackinfo/giftpackinfo", |
229 | "pages/user/monthgiftbag/giftpackbuy/giftpackbuy", | 228 | "pages/user/monthgiftbag/giftpackbuy/giftpackbuy", |
230 | - "pages/cart/cart2_inte/cart2_inte" | 229 | + "pages/cart/cart2_inte/cart2_inte", |
230 | + "pages/cart/cart2_pt/cart2_pt" | ||
231 | 231 | ||
232 | ] | 232 | ] |
233 | }, | 233 | }, |
components/diy_public/diy_public.js
0 → 100644
1 | +// var e = function(e) { | ||
2 | +// return e && e.__esModule ? e : { | ||
3 | +// default: e | ||
4 | +// }; | ||
5 | +// }(require("../../utils/LoadMore3.js")), | ||
6 | +// n = new e.default(), | ||
7 | +var t = getApp(), | ||
8 | + a = t.request, | ||
9 | + o = t.globalData.setting, | ||
10 | + os = o, | ||
11 | + i = require("../../utils/util.js"), | ||
12 | + ut = i, | ||
13 | + s = require("../../utils/common.js"); | ||
14 | +var regeneratorRuntime = require('../../utils/runtime.js'); | ||
15 | +Component({ | ||
16 | + properties: { | ||
17 | + // 这里定义了innerText属性,属性值可以在组件使用时指定 | ||
18 | + object: { | ||
19 | + type: Object, | ||
20 | + value: null, | ||
21 | + }, | ||
22 | + goods_array: { | ||
23 | + type: Array, | ||
24 | + value: [] | ||
25 | + }, | ||
26 | + newTime: { | ||
27 | + type: Number, | ||
28 | + value: 0 | ||
29 | + }, | ||
30 | + prom_type:{ | ||
31 | + type:Number, | ||
32 | + value:0 | ||
33 | + } | ||
34 | + }, | ||
35 | + data: { | ||
36 | + // 这里是一些组件内部数据 | ||
37 | + yc: false, | ||
38 | + someData: null, | ||
39 | + ylp_img: "https://mshopimg.yolipai.net/", | ||
40 | + imghost: os.imghost, | ||
41 | + timer: null, | ||
42 | + user_id:0, | ||
43 | + img_width:100, | ||
44 | + img_height:100, | ||
45 | + swiperHeight:0, | ||
46 | + prom_text:"已秒", | ||
47 | + kttypeArr:['','商家','会员','阶梯'], | ||
48 | + imgobj:{ | ||
49 | + '1':"/miniapp/images/component/seckill.png", | ||
50 | + '6':"/miniapp/images/component/pingd/pingd.png" | ||
51 | + }, | ||
52 | + nav1:'/packageA/pages/goodsInfo/goodsInfo?', | ||
53 | + nav2:'/pages/goods/goodsInfo/goodsInfo?', | ||
54 | + }, | ||
55 | + | ||
56 | + pageLifetimes: { | ||
57 | + //要处理一下,游客登录后的界面的变化,主要还该是改变会员 | ||
58 | + show: function () { | ||
59 | + | ||
60 | + | ||
61 | + //会员身份变化 | ||
62 | + var th = this; | ||
63 | + var g_id = this.data.object; | ||
64 | + | ||
65 | + //只有再会员登陆之后,才重新调用接口 | ||
66 | + // console.log('秒杀组件------------'); | ||
67 | + // if(this.data.user_id!=getApp().globalData.user_id){ | ||
68 | + // this.data.user_id=getApp().globalData.user_id | ||
69 | + // this.init(g_id); | ||
70 | + // } | ||
71 | + setTimeout(function () { | ||
72 | + if (th.data.goods_array && th.data.goods_array.length > 0) { | ||
73 | + th.data.timer = setInterval(function () { | ||
74 | + th.countDown2(th); | ||
75 | + }, 1000); | ||
76 | + } | ||
77 | + },600) | ||
78 | + }, | ||
79 | + | ||
80 | + hide:function () { | ||
81 | + // 页面被被销毁的时候,清除定时器 | ||
82 | + clearInterval(this.data.timer); | ||
83 | + } | ||
84 | + }, | ||
85 | + | ||
86 | + ready: function () { | ||
87 | + if (this.data.prom_type==6) { | ||
88 | + this.setData({ | ||
89 | + prom_text:'已团', | ||
90 | + nav1:'/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?', | ||
91 | + nav2:'/pages/goods/goodsInfo/goodsInfo?' | ||
92 | + }) | ||
93 | + } | ||
94 | + var g_id = this.data.object; | ||
95 | + | ||
96 | + this.init(g_id); | ||
97 | + this.data.user_id=getApp().globalData.user_id; | ||
98 | + }, | ||
99 | + detached() { | ||
100 | + // 页面被被销毁的时候,清除定时器 | ||
101 | + clearInterval(this.data.timer); | ||
102 | + }, | ||
103 | + methods: { | ||
104 | + // 这里是一个自定义方法 | ||
105 | + customMethod: function () { }, | ||
106 | + init: function (g_id) { | ||
107 | + var th = this; | ||
108 | + this.loadImg(g_id) | ||
109 | + getApp().getConfig2(function (e) { | ||
110 | + var swithc_list = e.switch_list; | ||
111 | + var sw_arr = JSON.parse(swithc_list); | ||
112 | + | ||
113 | + if(sw_arr.is_retail_price){ | ||
114 | + th.setData({is_retail_price:1}); | ||
115 | + } | ||
116 | + }) | ||
117 | + | ||
118 | + | ||
119 | + var app = getApp(), goodsidlist = "", idlist = ""; | ||
120 | + if (g_id.data_type == 2) { | ||
121 | + if (g_id.data && g_id.data.length > 0) { | ||
122 | + //--先把商品ID串起来-- | ||
123 | + g_id.data.forEach(function (val, ind) { | ||
124 | + var item = {}; | ||
125 | + goodsidlist += val.goodsid + ","; | ||
126 | + idlist += val.flashid + ","; | ||
127 | + }) | ||
128 | + goodsidlist = ut.sub_last(goodsidlist); | ||
129 | + idlist = ut.sub_last(idlist); | ||
130 | + | ||
131 | + var user_id=getApp().globalData.user_id; | ||
132 | + if(!user_id){ user_id=0;} | ||
133 | + | ||
134 | + //--调用接口,读取秒杀-- | ||
135 | + // var gUrl = "/api/ms/flash_sale/getGoodsList?store_id=" + os.stoid + "&goodsidlist=" + goodsidlist+"&user_id="+user_id+"&type=1"; | ||
136 | + let gUrl = "/api/ms/flash_sale/getGoodsList?store_id=" + os.stoid + "&idlist=" + idlist + "&user_id="+user_id+"&type=1"; | ||
137 | + | ||
138 | + if (th.data.prom_type==6) { //天天拼单 | ||
139 | + gUrl="/api/weshop/teamlist/getGoodsList?store_id=" | ||
140 | + +os.stoid+"&goodsidlist="+goodsidlist; | ||
141 | + } | ||
142 | + | ||
143 | + | ||
144 | + app.request.promiseGet(gUrl, {}).then(res => { | ||
145 | + | ||
146 | + //如果秒杀的数组为空的时候 | ||
147 | + var goodslist = res.data.data; | ||
148 | + //就算是添加的活动已经过期,就要用最新的进行中活动 | ||
149 | + if (goodslist && goodslist.length > 0) { | ||
150 | + th.set_goods_list(g_id.data, goodslist); | ||
151 | + } | ||
152 | + }); | ||
153 | + } | ||
154 | + } else { | ||
155 | + th.no_gid_set(); | ||
156 | + } | ||
157 | + }, | ||
158 | + | ||
159 | + //当是默认的情况 | ||
160 | + no_gid_set() { | ||
161 | + var user_id=getApp().globalData.user_id; | ||
162 | + if(!user_id){ user_id=0;} | ||
163 | + | ||
164 | + let req={ store_id: os.stoid, is_end: 0, is_show: 1, timetype: 2,user_id:user_id}; | ||
165 | + let gUrl="/api/ms/flash_sale/spikepage?page=1&pageSize=9" | ||
166 | + | ||
167 | + if (this.data.prom_type==6) { //天天拼单 | ||
168 | + gUrl="/api/weshop/teamlist/pageteam/2?page=1&pageSize=9" | ||
169 | + req={ | ||
170 | + store_id:os.stoid, | ||
171 | + is_end: 0, | ||
172 | + is_show: 1, | ||
173 | + user_id:user_id, | ||
174 | + } | ||
175 | + } | ||
176 | + | ||
177 | + getApp().request.promiseGet(gUrl, | ||
178 | + { isShowLoading: 1, data:req } | ||
179 | + ).then(res => { | ||
180 | + | ||
181 | + if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) { | ||
182 | + var goodsidlist = res.data.data.pageData; | ||
183 | + this.set_goods_list(null, goodsidlist); | ||
184 | + } | ||
185 | + }); | ||
186 | + }, | ||
187 | + | ||
188 | + //就算是添加的活动已经过期,就要用最新的活动 | ||
189 | + set_goods_list(g_id, goodslist) { | ||
190 | + let prom_type=this.data.prom_type | ||
191 | + goodslist.forEach(function (vy, indy) { | ||
192 | + if(!vy.id) vy.id=vy.prom_id; | ||
193 | + }) | ||
194 | + | ||
195 | + // 判断火热,预热 | ||
196 | + var newTime = ut.gettimestamp(), all_array = [], th = this; | ||
197 | + th.setData({ newTime: newTime }); | ||
198 | + if (g_id) { | ||
199 | + /*--商品队列按照添加的顺序排列--*/ | ||
200 | + g_id.forEach(function (val, ind) { | ||
201 | + goodslist.forEach(function (vy, indy) { | ||
202 | + if (val.goodsid == vy.goods_id) { | ||
203 | + all_array.push(vy); | ||
204 | + } | ||
205 | + }) | ||
206 | + }) | ||
207 | + } else { | ||
208 | + all_array = goodslist; | ||
209 | + } | ||
210 | + | ||
211 | + if (all_array.length == 0) { | ||
212 | + all_array = goodslist; | ||
213 | + } | ||
214 | + | ||
215 | + for(let i in all_array){ | ||
216 | + let item=all_array[i]; | ||
217 | + if(item.user_price) item.price=item.user_price; | ||
218 | + if(item.start_time > newTime) { | ||
219 | + item.status = 0; | ||
220 | + } else if(item.end_time > newTime) { | ||
221 | + item.status = 1; | ||
222 | + }; | ||
223 | + | ||
224 | + } | ||
225 | + | ||
226 | + | ||
227 | + var promisies = []; | ||
228 | + for (const key in all_array) { | ||
229 | + if (Object.hasOwnProperty.call(all_array, key)) { | ||
230 | + const val = all_array[key]; | ||
231 | + | ||
232 | + promisies[key] = getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | ||
233 | + os.stoid + "/"+prom_type+"/" + val.id, | ||
234 | + {} | ||
235 | + ).then(res => { | ||
236 | + if (res.data.code == 0) { | ||
237 | + if (res.data.data <= 0) all_array[key].status = 2; | ||
238 | + }; | ||
239 | + }); | ||
240 | + } | ||
241 | + } | ||
242 | + | ||
243 | + | ||
244 | + Promise.all(promisies).then(() => { | ||
245 | + // 判断活动是否结束 | ||
246 | + let empty=[] | ||
247 | + for(let i in all_array){ | ||
248 | + let item=all_array[i]; | ||
249 | + if(newTime > item.end_time) { | ||
250 | + all_array[i].status = 3; | ||
251 | + }; | ||
252 | + // let price=all_array[i].price.toFixed(2) | ||
253 | + let price=all_array[i].price + '' | ||
254 | + if (price && price.indexOf('.') > -1) { | ||
255 | + let priceArr = price.split(".") | ||
256 | + all_array[i].price_n = priceArr[0] | ||
257 | + all_array[i].price_xs = priceArr[1] | ||
258 | + }else{ | ||
259 | + all_array[i].price_n = price | ||
260 | + } | ||
261 | + | ||
262 | + all_array[i].residue=all_array[i].goods_num*1 - all_array[i].buy_num*1 | ||
263 | + if (all_array[i].residue && all_array[i].residue > 0 && all_array[i].status !=2) { | ||
264 | + empty.push(all_array[i]) | ||
265 | + } | ||
266 | + } | ||
267 | + | ||
268 | + //控制已售罄是否显示 | ||
269 | + if (!th.data.object.hide_sold_out_items) { | ||
270 | + all_array=empty | ||
271 | + } | ||
272 | + | ||
273 | + | ||
274 | + var arr = new Array(); | ||
275 | + if (th.data.object.style==7) { | ||
276 | + //--三个三个一组--- | ||
277 | + for (var i = 0; i < all_array.length; i += 2) { | ||
278 | + arr.push(all_array.slice(i, i + 2)); | ||
279 | + } | ||
280 | + }else{ | ||
281 | + //--三个三个一组--- | ||
282 | + for (var i = 0; i < all_array.length; i += 3) { | ||
283 | + arr.push(all_array.slice(i, i + 3)); | ||
284 | + } | ||
285 | + } | ||
286 | + | ||
287 | + | ||
288 | + /*--熏染到前台--*/ | ||
289 | + th.setData({ goods_array: arr }); | ||
290 | + if (th.data.object.style==6) { | ||
291 | + th.setSwiper_h() | ||
292 | + } | ||
293 | + | ||
294 | + }); | ||
295 | + | ||
296 | + | ||
297 | + th.data.timer = setInterval(function () { | ||
298 | + th.countDown2(th); | ||
299 | + }, 1000); | ||
300 | + }, | ||
301 | + setSwiper_h(){ | ||
302 | + var th=this | ||
303 | + wx.createSelectorQuery().in(this).select('.swiper_h').boundingClientRect(rect => { | ||
304 | + if (rect && rect.height) { | ||
305 | + var sumHeigth=(rect.height+13)+'px' | ||
306 | + th.setData({ | ||
307 | + swiperHeight: sumHeigth | ||
308 | + }) | ||
309 | + } | ||
310 | + }).exec(); | ||
311 | + // const query = this.createSelectorQuery() | ||
312 | + // query.select('.swiper_h').boundingClientRect() | ||
313 | + // query.exec( (res)=> { | ||
314 | + // console.log(res) | ||
315 | + // console.log(res[0].height) | ||
316 | + // console.log(res[0].height * data.t.length) | ||
317 | + // let sumHeigth = res[0].height * data.t.length; | ||
318 | + // console.error('组件高度'); | ||
319 | + // console.log(sumHeigth); | ||
320 | + // th.setData({ | ||
321 | + // swiperHeight: sumHeigth | ||
322 | + // }) | ||
323 | + // }) | ||
324 | + }, | ||
325 | + | ||
326 | + | ||
327 | + //---小于10的格式化函数---- | ||
328 | + timeFormat: function (param) { | ||
329 | + return param < 10 ? '0' + param : param; | ||
330 | + }, | ||
331 | + //----秒杀倒计时函数----- | ||
332 | + countDown2: function (ob) { | ||
333 | + if (ob == undefined) return false; | ||
334 | + var ee = ob; | ||
335 | + // 获取当前时间,同时得到活动结束时间数组 | ||
336 | + var newTime = ut.gettimestamp(); | ||
337 | + this.setData({ newTime: newTime }); | ||
338 | + | ||
339 | + var List = ee.data.goods_array; | ||
340 | + if (List.length == 0) return false; | ||
341 | + for (var j = 0; j < List.length; j++) { | ||
342 | + // 对结束时间进行处理渲染到页面 | ||
343 | + var endTimeList = List[j]; | ||
344 | + for (var i = 0; i < endTimeList.length; i++) { | ||
345 | + var o = endTimeList[i]; | ||
346 | + var endTime = o.end_time; | ||
347 | + if (newTime < o.start_time) endTime = o.start_time; | ||
348 | + let obj = null; | ||
349 | + // 如果活动未结束,对时间进行处理 | ||
350 | + if (endTime - newTime > 0) { | ||
351 | + let time = (endTime - newTime); | ||
352 | + // 获取天、时、分、秒 | ||
353 | + let day = parseInt(time / (60 * 60 * 24)); | ||
354 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | ||
355 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | ||
356 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | ||
357 | + obj = { | ||
358 | + day: this.timeFormat(day), | ||
359 | + hou: this.timeFormat(hou), | ||
360 | + min: this.timeFormat(min), | ||
361 | + sec: this.timeFormat(sec) | ||
362 | + } | ||
363 | + } else { | ||
364 | + //活动已结束,全部设置为'00' | ||
365 | + obj = { | ||
366 | + day: '00', | ||
367 | + hou: '00', | ||
368 | + min: '00', | ||
369 | + sec: '00' | ||
370 | + } | ||
371 | + } | ||
372 | + var txt = "goods_array[" + j + "][" + i + "].djs"; | ||
373 | + ee.setData({ | ||
374 | + [txt]: obj | ||
375 | + }); | ||
376 | + } | ||
377 | + } | ||
378 | + }, | ||
379 | + //图片失败,默认图片 | ||
380 | + bind_bnerr3: function (e) { | ||
381 | + var _errImg = e.target.dataset.errorimg; | ||
382 | + var _errObj = {}; | ||
383 | + _errObj[_errImg] = "/public/images/default_goods_image_240.gif"; | ||
384 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
385 | + }, | ||
386 | + | ||
387 | + go_to: function () { | ||
388 | + let url= "/pages/activity/seckill_list/seckill_list" | ||
389 | + if (this.data.prom_type==6) { //天天拼单 | ||
390 | + url="/pages/activity/pind_list/pind_list" | ||
391 | + } | ||
392 | + wx.navigateTo({ | ||
393 | + url | ||
394 | + }); | ||
395 | + }, | ||
396 | + //加入购物车 | ||
397 | + shoppingCart(){ | ||
398 | + console.log('加入购物车'); | ||
399 | + }, | ||
400 | + loadImg(g_id){ | ||
401 | + if (g_id.style==1) { | ||
402 | + let w='' | ||
403 | + switch (g_id.picture_scale) { | ||
404 | + case 1: | ||
405 | + w=`width:calc(100%-${g_id.page_margins*2}px);height:calc(100%-${g_id.page_margins*2}px)` | ||
406 | + break; | ||
407 | + | ||
408 | + default: | ||
409 | + break; | ||
410 | + } | ||
411 | + | ||
412 | + | ||
413 | + | ||
414 | + } | ||
415 | + } | ||
416 | + | ||
417 | + }, | ||
418 | + | ||
419 | + | ||
420 | +}) | ||
0 | \ No newline at end of file | 421 | \ No newline at end of file |
components/diy_public/diy_public.json
0 → 100644
components/diy_public/diy_public.wxml
0 → 100644
1 | +<!--components/diy_public/diy_public.wxml--> | ||
2 | +<block wx:if="{{goods_array.length>0}}"> | ||
3 | + <!--新版组件--> | ||
4 | + <block wx:if="{{object.column_action_name}}"> | ||
5 | + <view class='top' bindtap="go_to" wx:if="{{object.column_title}}" style="{{'background-image:url('+object.column_diy_title+')'+';background-size:100% 70rpx;padding:0rpx;border-bottom:0rpx;' + 'margin-bottom:'+object.product_spacing+'px;'}}"> | ||
6 | + <view class="flex" wx:if="{{!object.column_diy_title}}"> | ||
7 | + <view class='t_left'></view> | ||
8 | + <view class='t_ms n_t_ms' style="font-size: 30rpx;">{{object.column_name}}</view> | ||
9 | + </view> | ||
10 | + <view class='right_k' wx:if="{{!object.column_diy_title}}"> | ||
11 | + 更多<image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> | ||
12 | + </view> | ||
13 | + </view> | ||
14 | + <!-- 大图模式 --> | ||
15 | + <block wx:if="{{object.style==1}}"> | ||
16 | + <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> | ||
17 | + <block wx:for="{{goods_array}}"> | ||
18 | + <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> | ||
19 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | ||
20 | + <view class="topBox"> | ||
21 | + <view class="imgBox"> | ||
22 | + <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | ||
23 | + <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | ||
24 | + <!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | ||
25 | + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
26 | + </view> | ||
27 | + | ||
28 | + <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | ||
29 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | ||
30 | + </view> | ||
31 | + <block wx:if="{{object.count_down}}"> | ||
32 | + <view wx:if="{{aitem.residue==0 || aitem.status==2}}" class="{{object.count_down_float ? 'item_float' : ''}}" style="height: 70rpx;line-height: 70rpx;color: #fff;background-color:rgb(166,166,166);text-align: center;"> | ||
33 | + 已售罄 | ||
34 | + </view> | ||
35 | + <view wx:else style="{{'height: 70rpx;padding: 10rpx 30rpx;box-sizing:border-box;background:'+ (aitem.status ==0 ? object.scountdown_background_color : (aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color))}}" class="{{'new_item1_time '+ (object.count_down_float ? 'item_float' : '')}}"> | ||
36 | + <image src="{{imghost+imgobj[prom_type]}}"></image> | ||
37 | + <view style="text-align: center;line-height: 30rpx;"> | ||
38 | + <view wx:if="{{aitem.status == 1}}">距结束时间</view> | ||
39 | + <view wx:if="{{aitem.status == 0}}">距开始时间</view> | ||
40 | + <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | ||
41 | + <!-- <view>30天21:59:40</view> --> | ||
42 | + </view> | ||
43 | + </view> | ||
44 | + </block> | ||
45 | + </view> | ||
46 | + <view class="ellipsis-2n new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | ||
47 | + <view class="buy_box pricefs28" style="{{(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> | ||
48 | + <view class="mgr10" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> | ||
49 | + <view wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> | ||
50 | + </view> | ||
51 | + <view class="new_item1_price" style="{{'padding:10rpx 10rpx;'+(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> | ||
52 | + <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
53 | + <view class="clor7b"> | ||
54 | + <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> | ||
55 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.status==2 ? '0' : aitem.residue}}</text>件</text> | ||
56 | + </view> | ||
57 | + <view class="flex" style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> | ||
58 | + <view class="clor" wx:if="{{object.commodity_price}}"> | ||
59 | + ¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text> | ||
60 | + <text style="margin-left: 5rpx;" wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price || aitem.market_price}}</text> | ||
61 | + </view> | ||
62 | + </view> | ||
63 | + </view> | ||
64 | + <view> | ||
65 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image> | ||
66 | + <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> | ||
67 | + </view> | ||
68 | + </view> | ||
69 | + </navigator> | ||
70 | + </view> | ||
71 | + </block> | ||
72 | + </view> | ||
73 | + </block> | ||
74 | + <!-- 一行两个 --> | ||
75 | + <block wx:if="{{object.style==2}}"> | ||
76 | + <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') }}"> | ||
77 | + <block wx:for="{{goods_array}}"> | ||
78 | + <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')+ (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> | ||
79 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | ||
80 | + <view class="topBox"> | ||
81 | + <view class="imgBox"> | ||
82 | + <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | ||
83 | + <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | ||
84 | + <!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | ||
85 | + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 '}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
86 | + </view> | ||
87 | + | ||
88 | + <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | ||
89 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | ||
90 | + </view> | ||
91 | + <block wx:if="{{object.count_down}}"> | ||
92 | + <view wx:if="{{aitem.residue==0}}" class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | ||
93 | + <view>已售罄</view> | ||
94 | + </view> | ||
95 | + <view wx:else class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | ||
96 | + <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | ||
97 | + </view> | ||
98 | + </block> | ||
99 | + </view> | ||
100 | + <view class="ellipsis-2 new_item1_goods_name" style="{{'height:88rpx;font-size:24rpx; ' + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | ||
101 | + <view class="buy_box fs24" style="{{'margin-bottom:10rpx;' +(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> | ||
102 | + <view class="mgr10 lineh24" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> | ||
103 | + <view class="lineh24" wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> | ||
104 | + </view> | ||
105 | + <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price pdlf10 clor7b" style="{{'font-size:20rpx;' + 'display:block;'+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
106 | + <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> | ||
107 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text> | ||
108 | + </view> | ||
109 | + <view class="new_item1_price pdlf10" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> | ||
110 | + <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
111 | + <view style="{{(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> | ||
112 | + <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> | ||
113 | + <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price || aitem.market_price}}</view> | ||
114 | + </view> | ||
115 | + </view> | ||
116 | + <view> | ||
117 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> | ||
118 | + <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> | ||
119 | + </view> | ||
120 | + </view> | ||
121 | + </navigator> | ||
122 | + </view> | ||
123 | + </block> | ||
124 | + </view> | ||
125 | + </block> | ||
126 | + <!-- 一行三个 --> | ||
127 | + <block wx:if="{{object.style==3}}"> | ||
128 | + <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> | ||
129 | + <block wx:for="{{goods_array}}"> | ||
130 | + <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/3 - ' + (object.product_spacing*2)/3+'px)')}}"> | ||
131 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | ||
132 | + <view class="topBox"> | ||
133 | + <view class="imgBox"> | ||
134 | + <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | ||
135 | + <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | ||
136 | + <!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | ||
137 | + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 '}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
138 | + </view> | ||
139 | + | ||
140 | + <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | ||
141 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | ||
142 | + </view> | ||
143 | + <block wx:if="{{object.count_down}}"> | ||
144 | + <view wx:if="{{aitem.residue==0}}" class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | ||
145 | + <view>已售罄</view> | ||
146 | + </view> | ||
147 | + <view wx:else class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | ||
148 | + <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | ||
149 | + </view> | ||
150 | + </block> | ||
151 | + </view> | ||
152 | + <view class="ellipsis-2 new_item1_goods_name " style="{{'height:88rpx;font-size:24rpx;' + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | ||
153 | + <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price clor7b" style="{{'display:block;font-size:20rpx; '+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
154 | + <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> | ||
155 | + <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">{{aitem.residue}}</text>件</text> | ||
156 | + </view> | ||
157 | + <view class="new_item1_price clor7b" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> | ||
158 | + <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
159 | + <view style="{{'font-size: 20rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> | ||
160 | + <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs38">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> | ||
161 | + <view wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price || aitem.market_price}}</view> | ||
162 | + </view> | ||
163 | + </view> | ||
164 | + <view> | ||
165 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> | ||
166 | + <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> | ||
167 | + </view> | ||
168 | + </view> | ||
169 | + </navigator> | ||
170 | + </view> | ||
171 | + </block> | ||
172 | + </view> | ||
173 | + </block> | ||
174 | + <!-- 详细列表 --> | ||
175 | + <block wx:if="{{object.style==4}}"> | ||
176 | + <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') }}"> | ||
177 | + <block wx:for="{{goods_array}}"> | ||
178 | + <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> | ||
179 | + <navigator style="display: flex;" url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | ||
180 | + <view style="width: 33%;" class="topBox"> | ||
181 | + <view class="imgBox"> | ||
182 | + <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | ||
183 | + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
184 | + </view> | ||
185 | + | ||
186 | + <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | ||
187 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | ||
188 | + </view> | ||
189 | + <block wx:if="{{object.count_down}}"> | ||
190 | + <view wx:if="{{aitem.residue==0}}" class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | ||
191 | + <view>已售罄</view> | ||
192 | + </view> | ||
193 | + <view wx:else class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | ||
194 | + <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | ||
195 | + </view> | ||
196 | + </block> | ||
197 | + </view> | ||
198 | + <view style="{{'width: 67%;display: flex;flex-wrap: wrap;padding-left: 10rpx;' + (object.text_align==2 ? 'justify-content:center;' :'' )}}"> | ||
199 | + <view class="ellipsis-2 new_item1_goods_name" style="{{'font-size:28rpx;height:100rpx;'+(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | ||
200 | + <!-- <view class="buy_box fs24" style="{{'margin-bottom:10rpx;' +(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> | ||
201 | + <view class="mgr10" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> | ||
202 | + <view wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> | ||
203 | + </view> --> | ||
204 | + <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price clor7b" style="{{'font-size:24rpx;'+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
205 | + <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> | ||
206 | + <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">{{aitem.residue}}</text>件</text> | ||
207 | + </view> | ||
208 | + <view class="new_item1_price clor7b" style="{{'width:100%;' + (object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> | ||
209 | + <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
210 | + <view style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> | ||
211 | + <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text><text style="color: #7b7b7b;margin-left: 5rpx;" wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price || aitem.market_price}}</text></view> | ||
212 | + | ||
213 | + </view> | ||
214 | + </view> | ||
215 | + <view> | ||
216 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width:60rpx;height: 60rpx;"></image> | ||
217 | + <view style="width: 130rpx;height: 60rpx;line-height: 60rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> | ||
218 | + </view> | ||
219 | + </view> | ||
220 | + </view> | ||
221 | + </navigator> | ||
222 | + </view> | ||
223 | + </block> | ||
224 | + </view> | ||
225 | + </block> | ||
226 | + <!-- 一大一小 --> | ||
227 | + <block wx:if="{{object.style==5}}"> | ||
228 | + <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> | ||
229 | + <block wx:for="{{goods_array}}"> | ||
230 | + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | ||
231 | + <view wx:if="{{aind==0}}" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> | ||
232 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | ||
233 | + <view class="topBox"> | ||
234 | + <view class="imgBox"> | ||
235 | + <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | ||
236 | + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
237 | + </view> | ||
238 | + <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | ||
239 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | ||
240 | + </view> | ||
241 | + <block wx:if="{{object.count_down}}"> | ||
242 | + <view wx:if="{{aitem.residue==0 || aitem.status==2}}" class="{{(object.count_down_float ? 'item_float' : '')}}" style="height: 70rpx;line-height: 70rpx;color: #fff;background-color:rgb(166,166,166);text-align: center;"> | ||
243 | + 已售罄 | ||
244 | + </view> | ||
245 | + <view wx:else class="{{'new_item1_time ' + (object.count_down_float ? 'item_float' : '')}}" style="{{'box-sizing: border-box;height: 70rpx;padding: 10rpx 30rpx;background:'+ (aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | ||
246 | + <image src="{{imghost+imgobj[prom_type]}}"></image> | ||
247 | + <view style="text-align: center;line-height: 30rpx;"> | ||
248 | + <view wx:if="{{aitem.status == 1}}">距结束时间</view> | ||
249 | + <view wx:if="{{aitem.status == 0}}">距开始时间</view> | ||
250 | + <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | ||
251 | + <!-- <view>30天21:59:40</view> --> | ||
252 | + </view> | ||
253 | + </view> | ||
254 | + </block> | ||
255 | + </view> | ||
256 | + <view class="ellipsis-2n new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | ||
257 | + <view class="buy_box pricefs28" style="{{(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> | ||
258 | + <view class="mgr10" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> | ||
259 | + <view wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> | ||
260 | + </view> | ||
261 | + <view class="new_item1_price" style="{{'padding:10rpx 10rpx;'+(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> | ||
262 | + <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
263 | + <view class="clor7b"> | ||
264 | + <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> | ||
265 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.status==2 ? '0' : aitem.residue}}</text>件</text> | ||
266 | + </view> | ||
267 | + <view class="flex" style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> | ||
268 | + <view class="clor" wx:if="{{object.commodity_price}}"> | ||
269 | + ¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text> | ||
270 | + <text style="margin-left: 5rpx;" wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price || aitem.market_price}}</text> | ||
271 | + </view> | ||
272 | + </view> | ||
273 | + </view> | ||
274 | + <view> | ||
275 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image> | ||
276 | + <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> | ||
277 | + </view> | ||
278 | + </view> | ||
279 | + </navigator> | ||
280 | + </view> | ||
281 | + <view wx:if="{{aind==1}}" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> | ||
282 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | ||
283 | + <view class="topBox"> | ||
284 | + <view class="imgBox"> | ||
285 | + <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | ||
286 | + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 '}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
287 | + </view> | ||
288 | + <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | ||
289 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | ||
290 | + </view> | ||
291 | + <block wx:if="{{object.count_down}}"> | ||
292 | + <view wx:if="{{aitem.residue==0}}" class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | ||
293 | + <view>已售罄</view> | ||
294 | + </view> | ||
295 | + <view wx:else class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | ||
296 | + <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | ||
297 | + </view> | ||
298 | + </block> | ||
299 | + </view> | ||
300 | + <view class="ellipsis-2 new_item1_goods_name" style="{{'height:88rpx;font-size:24rpx; ' + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | ||
301 | + <view class="buy_box fs24" style="{{'margin-bottom:10rpx;' +(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> | ||
302 | + <view class="mgr10 lineh24" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> | ||
303 | + <view class="lineh24" wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> | ||
304 | + </view> | ||
305 | + <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price pdlf10 clor7b" style="{{'font-size:20rpx;' + 'display:block;'+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
306 | + <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> | ||
307 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text> | ||
308 | + </view> | ||
309 | + <view class="new_item1_price pdlf10" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> | ||
310 | + <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
311 | + <view style="{{(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> | ||
312 | + <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> | ||
313 | + <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price || aitem.market_price}}</view> | ||
314 | + </view> | ||
315 | + </view> | ||
316 | + <view> | ||
317 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> | ||
318 | + <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> | ||
319 | + </view> | ||
320 | + </view> | ||
321 | + </navigator> | ||
322 | + </view> | ||
323 | + <view wx:if="{{aind==2}}" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> | ||
324 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | ||
325 | + <view class="topBox"> | ||
326 | + <view class="imgBox"> | ||
327 | + <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | ||
328 | + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 '}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
329 | + </view> | ||
330 | + <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | ||
331 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | ||
332 | + </view> | ||
333 | + <block wx:if="{{object.count_down}}"> | ||
334 | + <view wx:if="{{aitem.residue==0}}" class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | ||
335 | + <view>已售罄</view> | ||
336 | + </view> | ||
337 | + <view wx:else class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | ||
338 | + <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | ||
339 | + </view> | ||
340 | + </block> | ||
341 | + </view> | ||
342 | + <view class="ellipsis-2 new_item1_goods_name" style="{{'height:88rpx;font-size:24rpx; ' + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | ||
343 | + <view class="buy_box fs24" style="{{'margin-bottom:10rpx;' +(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> | ||
344 | + <view class="mgr10 lineh24" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> | ||
345 | + <view class="lineh24" wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> | ||
346 | + </view> | ||
347 | + <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price pdlf10 clor7b" style="{{'font-size:20rpx;' + 'display:block;'+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
348 | + <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> | ||
349 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text> | ||
350 | + </view> | ||
351 | + <view class="new_item1_price pdlf10" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> | ||
352 | + <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
353 | + <view style="{{(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> | ||
354 | + <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> | ||
355 | + <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price || aitem.market_price}}</view> | ||
356 | + </view> | ||
357 | + </view> | ||
358 | + <view> | ||
359 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> | ||
360 | + <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> | ||
361 | + </view> | ||
362 | + </view> | ||
363 | + </navigator> | ||
364 | + </view> | ||
365 | + </block> | ||
366 | + </block> | ||
367 | + </view> | ||
368 | + </block> | ||
369 | + <!-- 横向滑动 2个--> | ||
370 | + <block wx:if="{{object.style==7}}"> | ||
371 | + <!-- <swiper indicator-dots circular> --> | ||
372 | + <swiper indicator-dots style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'+(swiperHeight ? ('height:'+swiperHeight+';'):'' )}}" class="{{' new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> | ||
373 | + <swiper-item wx:for="{{goods_array}}" class="flex2" style="padding: 5rpx;"> | ||
374 | + <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad swiper_h new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> | ||
375 | + <navigator url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | ||
376 | + <view class="imgBox"> | ||
377 | + <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | ||
378 | + <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | ||
379 | + <!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | ||
380 | + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 ' }}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
381 | + </view> | ||
382 | + | ||
383 | + <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | ||
384 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> | ||
385 | + </view> | ||
386 | + <view class="new_item1_time" wx:if="{{object.count_down}}" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | ||
387 | + <!-- <image src="{{imghost+imgobj[prom_type]}}"></image> --> | ||
388 | + <!-- <view style="text-align: center;"> | ||
389 | + <view>距结束时间</view> --> | ||
390 | + <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | ||
391 | + <!-- </view> --> | ||
392 | + </view> | ||
393 | + <view class="ellipsis-2 new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | ||
394 | + <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price" style="{{'display:block;color: rgb(56, 56, 56); '+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
395 | + <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> | ||
396 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text> | ||
397 | + </view> | ||
398 | + <view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> | ||
399 | + <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
400 | + <view style="{{'font-size: 28rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> | ||
401 | + <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text style="font-size:42rpx;">{{aitem.price}}</text></view> | ||
402 | + <view wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price || aitem.market_price}}</view> | ||
403 | + </view> | ||
404 | + </view> | ||
405 | + <view> | ||
406 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 100rpx;height: 100rpx;"></image> | ||
407 | + <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> | ||
408 | + </view> | ||
409 | + </view> | ||
410 | + </navigator> | ||
411 | + </view> | ||
412 | + </swiper-item> | ||
413 | + </swiper> | ||
414 | + <!-- </swiper> --> | ||
415 | + | ||
416 | + </block> | ||
417 | + <!-- 横向滑动 3个--> | ||
418 | + <block wx:if="{{object.style==6}}"> | ||
419 | + <!-- <swiper indicator-dots circular> --> | ||
420 | + <swiper indicator-dots style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'+(swiperHeight ? ('height:'+swiperHeight+';'):'' )}}" class="{{' new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> | ||
421 | + <swiper-item wx:for="{{goods_array}}" class="flex2" style="padding: 5rpx;"> | ||
422 | + <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad swiper_h new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/3 - ' + (object.product_spacing*2)/3+'px)')}}"> | ||
423 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | ||
424 | + <view class="topBox"> | ||
425 | + <view class="imgBox"> | ||
426 | + <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | ||
427 | + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 '}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
428 | + </view> | ||
429 | + <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | ||
430 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | ||
431 | + </view> | ||
432 | + <block wx:if="{{object.count_down}}"> | ||
433 | + <view wx:if="{{aitem.residue==0}}" class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | ||
434 | + <view>已售罄</view> | ||
435 | + </view> | ||
436 | + <view wx:else class="{{'new_item1_time '+(object.count_down_float ? 'item_float' : '')}}" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | ||
437 | + <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | ||
438 | + </view> | ||
439 | + </block> | ||
440 | + </view> | ||
441 | + <view class="ellipsis-2 new_item1_goods_name " style="{{'height:88rpx;font-size:24rpx;' + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | ||
442 | + <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price clor7b" style="{{'display:block;font-size:20rpx; '+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
443 | + <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> | ||
444 | + <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">{{aitem.residue}}</text>件</text> | ||
445 | + </view> | ||
446 | + <view class="new_item1_price clor7b" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> | ||
447 | + <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> | ||
448 | + <view style="{{'font-size: 20rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> | ||
449 | + <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs38">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> | ||
450 | + <view wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price || aitem.market_price}}</view> | ||
451 | + </view> | ||
452 | + </view> | ||
453 | + <view> | ||
454 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> | ||
455 | + <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> | ||
456 | + </view> | ||
457 | + </view> | ||
458 | + </navigator> | ||
459 | + </view> | ||
460 | + </swiper-item> | ||
461 | + </swiper> | ||
462 | + <!-- </swiper> --> | ||
463 | + </block> | ||
464 | + </block> | ||
465 | +</block> | ||
0 | \ No newline at end of file | 466 | \ No newline at end of file |
components/diy_public/diy_public.wxss
0 → 100644
1 | +.flex{ | ||
2 | + display: flex; | ||
3 | + align-items: center; | ||
4 | +} | ||
5 | +.top { | ||
6 | + background-color: white; | ||
7 | + height: 70rpx; | ||
8 | + line-height: 70rpx; | ||
9 | + color: #000; | ||
10 | + border-bottom: 2rpx solid #eee; | ||
11 | + padding:0rpx 20rpx; | ||
12 | + display: flex; | ||
13 | + justify-content: space-between; | ||
14 | + /* font-size: 32rpx; */ | ||
15 | + font-size: 24rpx; | ||
16 | +} | ||
17 | + | ||
18 | +.s_it { | ||
19 | + width: 100%; | ||
20 | + display: flex; | ||
21 | + background-color: white; | ||
22 | +} | ||
23 | + | ||
24 | +.s_prom { | ||
25 | + width: 100%; | ||
26 | + background-color: white; | ||
27 | + min-height: 200rpx; | ||
28 | +} | ||
29 | + | ||
30 | +swiper { | ||
31 | + display: block; | ||
32 | + height: 400rpx; | ||
33 | +} | ||
34 | + | ||
35 | +.right_k { | ||
36 | + width: 93rpx; | ||
37 | + color: #7b7b7b; | ||
38 | +} | ||
39 | +.right_k image{ | ||
40 | + width: 20rpx; | ||
41 | + height: 20rpx; | ||
42 | +} | ||
43 | + .t_left { | ||
44 | + width: 10rpx; | ||
45 | + height: 38rpx; | ||
46 | + background: #f23030; | ||
47 | + margin-right: 10rpx; | ||
48 | +} | ||
49 | +.n_t_ms{ | ||
50 | + color:#f23030; | ||
51 | +} | ||
52 | + | ||
53 | +.sp { | ||
54 | + min-height: 300rpx; | ||
55 | + width: 100%; | ||
56 | + background-color: white; | ||
57 | + padding: 18rpx; | ||
58 | + display: flex; | ||
59 | +} | ||
60 | + | ||
61 | +.sp .sp_top { | ||
62 | + height: 220rpx; | ||
63 | + min-width: 30%; | ||
64 | +} | ||
65 | + | ||
66 | +.sp .sp_top .s_img { | ||
67 | + width: 210rpx; | ||
68 | + height: 100%; | ||
69 | +} | ||
70 | + | ||
71 | +.sp .sp_top .s_img image { | ||
72 | + width: 210rpx; | ||
73 | + height: 100%; | ||
74 | + position: relative; | ||
75 | + top: -74rpx; | ||
76 | + left: 0rpx; | ||
77 | +} | ||
78 | + | ||
79 | +.sp .sp_top .s_top_kill { | ||
80 | + background-color: #c4182e; | ||
81 | + font-size: 24rpx; | ||
82 | + height: 38rpx; | ||
83 | + line-height: 38rpx; | ||
84 | + padding: 4rpx 10rpx; | ||
85 | + border-radius: 10rpx; | ||
86 | + z-index: 999; | ||
87 | + position: relative; | ||
88 | + top: 1rpx; | ||
89 | + width: 110rpx; | ||
90 | + color: #fff; | ||
91 | + text-align: center; | ||
92 | +} | ||
93 | + | ||
94 | +.po { | ||
95 | + position: absolute; | ||
96 | +} | ||
97 | + | ||
98 | +.sp .sp_top .s_foot_kill { | ||
99 | + font-size: 20rpx; | ||
100 | + position: relative; | ||
101 | + top: -90rpx; | ||
102 | + width: 210rpx; | ||
103 | + height: 38rpx; | ||
104 | + line-height: 38rpx; | ||
105 | + color: #fff; | ||
106 | + text-align: center; | ||
107 | + background-color: rgba(0, 0, 0, 0.5); | ||
108 | +} | ||
109 | + | ||
110 | +.sp_wz { | ||
111 | + width: 210rpx; | ||
112 | + min-height: 100rpx; | ||
113 | +} | ||
114 | + | ||
115 | +.sp_wz .sp_wzi { | ||
116 | + font-size: 30rpx; | ||
117 | + border-bottom: 2rpx solid #dcdcdc; | ||
118 | + width: 100%; | ||
119 | + /* text-align: left; */ | ||
120 | + padding: 4rpx 0; | ||
121 | + /* overflow: hidden; */ | ||
122 | + height: 90rpx; | ||
123 | + word-break: break-all; | ||
124 | + /* text-overflow: ellipsis; | ||
125 | + white-space: nowrap; | ||
126 | + line-height: 48rpx; */ | ||
127 | +} | ||
128 | + | ||
129 | +.sp_wz .sp_jg { | ||
130 | + color: #c4182e; | ||
131 | + font-size: 30rpx; | ||
132 | + overflow: hidden; | ||
133 | + display: inline-block; | ||
134 | + text-overflow: ellipsis; | ||
135 | + white-space: nowrap; | ||
136 | + margin-right: 10rpx; | ||
137 | +} | ||
138 | + | ||
139 | +.sp_wz .sp_jgx { | ||
140 | + color: #adadad; | ||
141 | + text-decoration: line-through; | ||
142 | + font-size: 24rpx; | ||
143 | + overflow: hidden; | ||
144 | + display: inline-block; | ||
145 | + text-overflow: ellipsis; | ||
146 | + white-space: nowrap; | ||
147 | +} | ||
148 | + | ||
149 | +.one { | ||
150 | + margin-left: 14rpx; | ||
151 | +} | ||
152 | + | ||
153 | +.sp .sp_top .s_top1_kill { | ||
154 | + position: absolute; | ||
155 | + background-color: #c4182e; | ||
156 | + font-size: 24rpx; | ||
157 | + height: 38rpx; | ||
158 | + line-height: 38rpx; | ||
159 | + left: 265rpx; | ||
160 | + top: 100rpx; | ||
161 | + padding: 0 10rpx; | ||
162 | + color: white; | ||
163 | + border-radius: 10rpx; | ||
164 | +} | ||
165 | + | ||
166 | +.sp .sp_top .s_top2_kill { | ||
167 | + position: absolute; | ||
168 | + background-color: #c4182e; | ||
169 | + font-size: 24rpx; | ||
170 | + height: 38rpx; | ||
171 | + line-height: 38rpx; | ||
172 | + right: 146rpx; | ||
173 | + top: 100rpx; | ||
174 | + padding: 0 10rpx; | ||
175 | + color: white; | ||
176 | + border-radius: 10rpx; | ||
177 | +} | ||
178 | + | ||
179 | +.sp .sp_top .s_foot1_kill { | ||
180 | + font-size: 20rpx; | ||
181 | + position: absolute; | ||
182 | + top: 270rpx; | ||
183 | + width: 210rpx; | ||
184 | + height: 38rpx; | ||
185 | + line-height: 38rpx; | ||
186 | + color: #fff; | ||
187 | + text-align: center; | ||
188 | + background-color: rgba(0, 0, 0, 0.5); | ||
189 | +} | ||
190 | + | ||
191 | +.po1 { | ||
192 | + position: absolute; | ||
193 | +} | ||
194 | + | ||
195 | +.sp .sp_top .s_foot2_kill { | ||
196 | + font-size: 20rpx; | ||
197 | + position: absolute; | ||
198 | + top: 270rpx; | ||
199 | + width: 210rpx; | ||
200 | + height: 38rpx; | ||
201 | + line-height: 38rpx; | ||
202 | + color: #fff; | ||
203 | + text-align: center; | ||
204 | + background-color: rgba(0, 0, 0, 0.5); | ||
205 | +} | ||
206 | + | ||
207 | +.sp2 { | ||
208 | + width: 100%; | ||
209 | + min-height: 240rpx; | ||
210 | +} | ||
211 | + | ||
212 | +.sp2 .one1 { | ||
213 | + background-color: white; | ||
214 | + height: 285rpx; | ||
215 | + display: flex; | ||
216 | + padding:0rpx 20rpx; | ||
217 | + border-bottom: 6rpx#eee solid; | ||
218 | + align-items: center; | ||
219 | +} | ||
220 | + | ||
221 | +.sp2 .one1 .o1_img { | ||
222 | + width: 220rpx; | ||
223 | + height: 220rpx; | ||
224 | + margin-right: 25rpx; | ||
225 | +} | ||
226 | + | ||
227 | +.o1_right .sp_wzi { | ||
228 | + font-size: 30rpx; | ||
229 | + margin-bottom: 6rpx; | ||
230 | + /* text-align: left; */ | ||
231 | + padding: 4rpx 0; | ||
232 | + height: 90rpx; | ||
233 | + /* overflow: hidden; | ||
234 | + white-space: nowrap; | ||
235 | + text-overflow: ellipsis; */ | ||
236 | +} | ||
237 | + | ||
238 | +.o1_right .o1_sj_kill { | ||
239 | + height: 60rpx; | ||
240 | + margin-bottom: 10rpx; | ||
241 | + font-size: 28rpx; | ||
242 | +} | ||
243 | + | ||
244 | +.o1_right .o1_sj_kill text { | ||
245 | + background-color: #fdcb08; | ||
246 | + text-align: center; | ||
247 | + border-radius: 10rpx; | ||
248 | + padding: 4rpx; | ||
249 | + margin-left: 6rpx; | ||
250 | +} | ||
251 | + | ||
252 | +.o1_right .sp_jg { | ||
253 | + color: #c4182e; | ||
254 | + font-size: 30rpx; | ||
255 | + overflow: hidden; | ||
256 | + display: inline-block; | ||
257 | + margin-right: 10rpx; | ||
258 | +} | ||
259 | + | ||
260 | +.o1_right .sp_jgx { | ||
261 | + color: #dcdcdc; | ||
262 | + text-decoration: line-through; | ||
263 | + font-size: 26rpx; | ||
264 | + overflow: hidden; | ||
265 | + display: inline-block; | ||
266 | +} | ||
267 | + | ||
268 | +.o1_img image { | ||
269 | + width: 220rpx; | ||
270 | + height: 220rpx; | ||
271 | +} | ||
272 | +.o1_right{ | ||
273 | + width: 465rpx; | ||
274 | +} | ||
275 | +.o1_right .wo { | ||
276 | + background-color: #c4182e; | ||
277 | + width: 150rpx; | ||
278 | + height: 50rpx; | ||
279 | + line-height: 50rpx; | ||
280 | + color: white; | ||
281 | + text-align: center; | ||
282 | + font-size: 30rpx; | ||
283 | + border-radius: 14rpx; | ||
284 | +} | ||
285 | +.rob{ | ||
286 | + display: flex; | ||
287 | + justify-content: flex-end; | ||
288 | + font-size: 30rpx; | ||
289 | +} | ||
290 | +.money{ | ||
291 | + display: flex; | ||
292 | + align-items: center; | ||
293 | +} | ||
294 | + | ||
295 | +.sp .sp_top .s_top_kill.gray{background-color:#bdbdc1;color: #fff;font-weight: normal} | ||
296 | + | ||
297 | + | ||
298 | +.ellipsis-2 { | ||
299 | + | ||
300 | + height: 110rpx; | ||
301 | + overflow: hidden; | ||
302 | + text-overflow: ellipsis; | ||
303 | + display: -webkit-box; | ||
304 | + -webkit-box-orient: vertical; | ||
305 | + -webkit-line-clamp: 2; | ||
306 | +} | ||
307 | +.ellipsis-2n { | ||
308 | + | ||
309 | + /* height: 97rpx; */ | ||
310 | + overflow: hidden; | ||
311 | + text-overflow: ellipsis; | ||
312 | + display: -webkit-box; | ||
313 | + -webkit-box-orient: vertical; | ||
314 | + -webkit-line-clamp: 2; | ||
315 | +} | ||
316 | +.pdlf10{ | ||
317 | + padding: 0 10rpx; | ||
318 | +} | ||
319 | +.new_item1{ | ||
320 | + width: 100%; | ||
321 | + overflow: hidden; | ||
322 | +} | ||
323 | + | ||
324 | +.new_item1_image{ | ||
325 | + width: 100%; | ||
326 | + /* max-width: 100%; | ||
327 | + max-height: 100%; */ | ||
328 | +} | ||
329 | +.new_item1_time{ | ||
330 | + height: 50rpx; | ||
331 | + background: #f23030; | ||
332 | + color: #fff; | ||
333 | + /* font-size: 25rpx; */ | ||
334 | + font-size: 24rpx; | ||
335 | + display: flex; | ||
336 | + justify-content: space-between; | ||
337 | + align-items: center; | ||
338 | + opacity:.8; | ||
339 | + /* padding: 0rpx 30rpx; */ | ||
340 | + | ||
341 | +} | ||
342 | +.new_item1_time image{ | ||
343 | + width: 188rpx; | ||
344 | + height: 52rpx; | ||
345 | +} | ||
346 | +.new_item1_goods_name{ | ||
347 | + padding: 10rpx 10rpx 0rpx; | ||
348 | + /* font-size: 26rpx; */ | ||
349 | + font-size: 28rpx; | ||
350 | + width: 100%; | ||
351 | + box-sizing: border-box; | ||
352 | + color: #333333; | ||
353 | +} | ||
354 | +.new_item1_price{ | ||
355 | + display: flex; | ||
356 | + /* padding: 0 10rpx; */ | ||
357 | + align-items: center; | ||
358 | + justify-content: space-between; | ||
359 | + /* font-size: 26rpx; */ | ||
360 | + font-size: 24rpx; | ||
361 | + padding: 0 10rpx 10rpx; | ||
362 | +} | ||
363 | +.clor{ | ||
364 | + /* color: rgba(196, 24, 45, 1); */ | ||
365 | + color: #ec0022; | ||
366 | +} | ||
367 | +.clor7b{ | ||
368 | + color: #7b7b7b; | ||
369 | +} | ||
370 | +.new_item1_but{ | ||
371 | + width: 130rpx; | ||
372 | + height: 60rpx; | ||
373 | + color: #fff; | ||
374 | + background-color: #f23030; | ||
375 | + line-height: 60rpx; | ||
376 | + text-align: center; | ||
377 | + border-radius: 15rpx; | ||
378 | +} | ||
379 | +.new_item1_but1{ | ||
380 | + border-radius: 50rpx !important; | ||
381 | +} | ||
382 | +.new_item1_but2{ | ||
383 | + border-radius: 50rpx !important; | ||
384 | + background-color: rgba(0, 0, 0, 0) !important; | ||
385 | + color: #f23030 !important; | ||
386 | + border: 1rpx solid #f23030 !important; | ||
387 | +} | ||
388 | +.new_item1_but3{ | ||
389 | + background-color: rgba(0, 0, 0, 0) !important; | ||
390 | + color: #f23030 !important; | ||
391 | + border: 1rpx solid #f23030 !important; | ||
392 | +} | ||
393 | + | ||
394 | + | ||
395 | + | ||
396 | + | ||
397 | +.new_item1_box{ | ||
398 | + /* padding-top: 17rpx; */ | ||
399 | + width: 100%; | ||
400 | + box-sizing: border-box; | ||
401 | + overflow: hidden; | ||
402 | +} | ||
403 | + | ||
404 | +.aborder{ | ||
405 | + border: 1px solid #e8e8e8; | ||
406 | +} | ||
407 | +.bgf{ | ||
408 | + background-color: #fff; | ||
409 | +} | ||
410 | +.boxsha{ | ||
411 | + /* box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25); */ | ||
412 | + /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */ | ||
413 | + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 3px 10px 0 rgba(0, 0, 0, 0.19); | ||
414 | +} | ||
415 | +.but_radius85{ | ||
416 | + border-radius:289rpx; | ||
417 | +} | ||
418 | +.but_radius5{ | ||
419 | + border-radius:8px; | ||
420 | +} | ||
421 | +.imgBox{ | ||
422 | + position: relative; | ||
423 | +} | ||
424 | +.imgBox_img{ | ||
425 | + position: absolute; | ||
426 | + left: 0; | ||
427 | + top: 0; | ||
428 | + width: 74rpx; | ||
429 | + height: 70rpx; | ||
430 | + | ||
431 | +} | ||
432 | + | ||
433 | +.aspect_ratio1{ | ||
434 | + aspect-ratio:1/1; | ||
435 | +} | ||
436 | +.aspect_ratio2{ | ||
437 | + aspect-ratio:16/9; | ||
438 | +} | ||
439 | +.aspect_ratio3{ | ||
440 | + aspect-ratio:3/2; | ||
441 | +} | ||
442 | +.aspect_ratio4{ | ||
443 | + aspect-ratio:3/4; | ||
444 | +} | ||
445 | +.container1 { | ||
446 | + position: relative; | ||
447 | + width:100%; | ||
448 | + padding-top: 100%; | ||
449 | + overflow: hidden; | ||
450 | +} | ||
451 | +.container2 { | ||
452 | + position: relative; | ||
453 | + width:100%; | ||
454 | + padding-top: 56.25%; | ||
455 | + overflow: hidden; | ||
456 | +} | ||
457 | +.container3 { | ||
458 | + position: relative; | ||
459 | + width:100%; | ||
460 | + padding-top: 66.67%; | ||
461 | + overflow: hidden; | ||
462 | +} | ||
463 | +.container4 { | ||
464 | + position: relative; | ||
465 | + width:100%; | ||
466 | + padding-top: 133.33%; | ||
467 | + overflow: hidden; | ||
468 | + | ||
469 | +} | ||
470 | + | ||
471 | +.images1 { | ||
472 | + display: block; | ||
473 | + position: absolute; | ||
474 | + width: 100%; | ||
475 | + height: 100%; | ||
476 | + top: 0; | ||
477 | + bottom: 0; | ||
478 | + left: 0; | ||
479 | + right: 0; | ||
480 | + object-fit: cover; | ||
481 | + | ||
482 | +} | ||
483 | + | ||
484 | +.flex2{ | ||
485 | + display: flex; | ||
486 | + /* align-items: center; */ | ||
487 | + justify-content: space-between; | ||
488 | + flex-wrap: wrap; | ||
489 | + box-sizing: border-box; | ||
490 | +} | ||
491 | +.flex2:after { | ||
492 | + content: ""; | ||
493 | + width: 30%; | ||
494 | + height: 0px; | ||
495 | + visibility: hidden; | ||
496 | + } | ||
497 | + | ||
498 | + .boxpad{ | ||
499 | + /* padding:11rpx 9rpx; */ | ||
500 | + box-sizing: border-box; | ||
501 | + } | ||
502 | + .pricefs28{ | ||
503 | + font-size: 28rpx !important; | ||
504 | + } | ||
505 | + .pricefs42{ | ||
506 | + font-size: 42rpx !important; | ||
507 | + } | ||
508 | + .pricefs38{ | ||
509 | + font-size: 38rpx !important; | ||
510 | + } | ||
511 | + .imgbox1{ | ||
512 | + width: 60rpx; | ||
513 | + height: 60rpx; | ||
514 | + } | ||
515 | + .topBox{ | ||
516 | + position: relative; | ||
517 | + } | ||
518 | + | ||
519 | + .item_float{ | ||
520 | + position: absolute; | ||
521 | + bottom: 0; | ||
522 | + left: 0; | ||
523 | + width: 100%; | ||
524 | + box-sizing: border-box; | ||
525 | + } | ||
526 | + .buy_box{ | ||
527 | + display: flex; | ||
528 | + margin: 10rpx 0 0 10rpx; | ||
529 | + width: 100%; | ||
530 | + opacity:.8; | ||
531 | + } | ||
532 | + .buy_box view{ | ||
533 | + padding: 10rpx; | ||
534 | + background-color:#f23030; | ||
535 | + color: #fff; | ||
536 | + /* margin-top: 10rpx; */ | ||
537 | + line-height: 28rpx; | ||
538 | + border-radius: 10rpx; | ||
539 | + } | ||
540 | + .mgr10{ | ||
541 | + margin-right: 10rpx; | ||
542 | + } | ||
543 | + .fs24{ | ||
544 | + font-size: 24rpx; | ||
545 | + } | ||
546 | + .lineh24{ | ||
547 | + line-height: 24rpx !important; | ||
548 | + } | ||
0 | \ No newline at end of file | 549 | \ No newline at end of file |
packageA/pages/cart2_ser/cart2_ser.js
@@ -3,7 +3,7 @@ var t = getApp(), | @@ -3,7 +3,7 @@ var t = getApp(), | ||
3 | a = t.request, | 3 | a = t.request, |
4 | e = require("../../../utils/common.js"), | 4 | e = require("../../../utils/common.js"), |
5 | s = require("../../../utils/util.js"), | 5 | s = require("../../../utils/util.js"), |
6 | - o = require("../../../utils/md5.js"), | 6 | + ut=s, o = require("../../../utils/md5.js"), |
7 | to = getApp(); | 7 | to = getApp(); |
8 | var oo = t.globalData.setting, | 8 | var oo = t.globalData.setting, |
9 | os = oo; | 9 | os = oo; |
@@ -49,6 +49,10 @@ Page({ | @@ -49,6 +49,10 @@ Page({ | ||
49 | is_cart: 0, //是不是购物车进来的购买 | 49 | is_cart: 0, //是不是购物车进来的购买 |
50 | }, | 50 | }, |
51 | onLoad: function(t) { | 51 | onLoad: function(t) { |
52 | + | ||
53 | + //定义第一次进入 | ||
54 | + this.data.fir_in=1; | ||
55 | + | ||
52 | wx.setNavigationBarTitle({ | 56 | wx.setNavigationBarTitle({ |
53 | title: "填写订单", | 57 | title: "填写订单", |
54 | }); | 58 | }); |
@@ -274,11 +278,47 @@ Page({ | @@ -274,11 +278,47 @@ Page({ | ||
274 | 278 | ||
275 | //----------子页返回父页触发---------- | 279 | //----------子页返回父页触发---------- |
276 | onShow: function() { | 280 | onShow: function() { |
277 | - var fy=s.fy_back("/pages/user/order_list/order_list?index=2&tabindex=1",1); | ||
278 | - if(fy) return false; | ||
279 | 281 | ||
280 | - t_pay.set_fir(); | ||
281 | var th = this; | 282 | var th = this; |
283 | + | ||
284 | + //判断是不是第一次进入 | ||
285 | + if(this.data.fir_in){ | ||
286 | + this.data.fir_in=0; | ||
287 | + }else{ | ||
288 | + var fy=s.fy_back("/pages/user/order_list/order_list?index=2&tabindex=1",1); | ||
289 | + if(fy) return false; | ||
290 | + t_pay.set_fir(); | ||
291 | + | ||
292 | + var back_url="/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id; | ||
293 | + //-- 通联的第三方支付的返回优化 -- | ||
294 | + ut.is_pay_ok(th.data.order_id,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){ | ||
295 | + | ||
296 | + if(!th.data.order_id) return false; | ||
297 | + getApp().request.promiseGet("/api/weshop/recharge/user/page", | ||
298 | + {data:{store_id:os.stoid,order_id:th.data.order_id,user_id:getApp().globalData.user_id }}).then(res=>{ | ||
299 | + if(ut.ajax_ok(res)){ | ||
300 | + var item=res.data.data.pageData[0]; | ||
301 | + if(item.pay_status==1){ | ||
302 | + //支付支付,返回首页 | ||
303 | + ut.m_toast('支付成功'); | ||
304 | + setTimeout(()=>{ | ||
305 | + getApp().re_to(back_url); | ||
306 | + },1000) | ||
307 | + | ||
308 | + }else{ | ||
309 | + //支付支付,返回首页 | ||
310 | + ut.m_toast('支付失败'); | ||
311 | + setTimeout(()=>{ | ||
312 | + getApp().re_to("/pages/user/order_list/order_list?index=2&tabindex=1"); | ||
313 | + },1000) | ||
314 | + } | ||
315 | + } | ||
316 | + }) | ||
317 | + }); | ||
318 | + | ||
319 | + } | ||
320 | + | ||
321 | + | ||
282 | if (th.data.isclose == 0) { | 322 | if (th.data.isclose == 0) { |
283 | wx.navigateTo({ | 323 | wx.navigateTo({ |
284 | url: "/pages/index/index/index" | 324 | url: "/pages/index/index/index" |
@@ -647,6 +687,9 @@ Page({ | @@ -647,6 +687,9 @@ Page({ | ||
647 | }, 1000) | 687 | }, 1000) |
648 | 688 | ||
649 | },function (e){ | 689 | },function (e){ |
690 | + | ||
691 | + console.log('kkkkkkk'); | ||
692 | + | ||
650 | wx.showToast({ | 693 | wx.showToast({ |
651 | title: e, | 694 | title: e, |
652 | icon: 'none', | 695 | icon: 'none', |
packageA/pages/details_serviceCard/details_serviceCard.js
@@ -20,6 +20,9 @@ Page({ | @@ -20,6 +20,9 @@ Page({ | ||
20 | */ | 20 | */ |
21 | onLoad: function(options) { | 21 | onLoad: function(options) { |
22 | 22 | ||
23 | + //定义第一次进入 | ||
24 | + this.data.fir_in=1; | ||
25 | + | ||
23 | self = this; | 26 | self = this; |
24 | this.data.options = options; | 27 | this.data.options = options; |
25 | 28 | ||
@@ -47,8 +50,87 @@ Page({ | @@ -47,8 +50,87 @@ Page({ | ||
47 | */ | 50 | */ |
48 | onShow: function() { | 51 | onShow: function() { |
49 | this.data.is_summit_ing=0; | 52 | this.data.is_summit_ing=0; |
50 | - util.fy_back('',0) | ||
51 | - t_pay.set_fir(); | 53 | + |
54 | + var th=this; | ||
55 | + //判断是不是第一次进入 | ||
56 | + if(this.data.fir_in){ | ||
57 | + this.data.fir_in=0; | ||
58 | + }else{ | ||
59 | + util.fy_back('',0) | ||
60 | + t_pay.set_fir(); | ||
61 | + | ||
62 | + var back_url='/pages/user/order_list/order_list?index=2&tabindex=1'; | ||
63 | + var err_url='/pages/user/order_list/order_list?index=2&tabindex=1'; | ||
64 | + | ||
65 | + //判断是不是有调用支付过 | ||
66 | + if(th.data.payed) { | ||
67 | + th.data.payed=0; | ||
68 | + //-- 判断一下活动的类型 -- | ||
69 | + var prom_type = th.data.details.list[0].prom_type > 0 ? th.data.details.list[0].prom_type : 0; | ||
70 | + var order_id = th.data.details.order_id; | ||
71 | + var order_sn = th.data.details.order_sn; | ||
72 | + | ||
73 | + var ck_url = ''; //请求地址 | ||
74 | + var req_data = {}; //请求参数 | ||
75 | + if (parseInt(prom_type) == 6) { | ||
76 | + //跳转到组图的页面 | ||
77 | + back_url= "/packageA/pages/serviceCard_pd/team_success/team_success?ordersn=" + order_sn | ||
78 | + ck_url = "/api/weshop/rechargeServicelist/page"; | ||
79 | + req_data = {store_id: os.stoid, order_id: order_id}; | ||
80 | + } else { | ||
81 | + ck_url = "/api/weshop/recharge/user/page"; | ||
82 | + req_data = {store_id: os.stoid, order_id: order_id, user_id: getApp().globalData.user_id}; | ||
83 | + } | ||
84 | + | ||
85 | + //-- 通联的第三方支付的返回优化 -- | ||
86 | + ut.is_pay_ok(th.data.details,back_url, err_url, function () { | ||
87 | + if (!th.data.details) return false; | ||
88 | + getApp().request.promiseGet(ck_url, | ||
89 | + {data: req_data}).then(res => { | ||
90 | + if (ut.ajax_ok(res)) { | ||
91 | + var item = res.data.data.pageData[0]; | ||
92 | + if (parseInt(prom_type) == 6) { | ||
93 | + if (item.pt_status == 1 || item.pt_status == 2) { | ||
94 | + //支付支付,返回首页 | ||
95 | + ut.m_toast('支付成功'); | ||
96 | + setTimeout(() => { | ||
97 | + getApp().re_to(back_url); | ||
98 | + }, 1000) | ||
99 | + | ||
100 | + } else { | ||
101 | + //支付支付,返回首页 | ||
102 | + ut.m_toast('支付失败'); | ||
103 | + setTimeout(() => { | ||
104 | + getApp().re_to(err_url); | ||
105 | + }, 1000) | ||
106 | + } | ||
107 | + | ||
108 | + } else { | ||
109 | + if (item.pay_status == 1) { | ||
110 | + //支付支付,返回首页 | ||
111 | + ut.m_toast('支付成功'); | ||
112 | + setTimeout(() => { | ||
113 | + getApp().re_to(back_url); | ||
114 | + }, 1000) | ||
115 | + | ||
116 | + } else { | ||
117 | + //支付支付,返回首页 | ||
118 | + ut.m_toast('支付失败'); | ||
119 | + setTimeout(() => { | ||
120 | + getApp().re_to(err_url); | ||
121 | + }, 1000) | ||
122 | + } | ||
123 | + } | ||
124 | + | ||
125 | + | ||
126 | + } | ||
127 | + }) | ||
128 | + }); | ||
129 | + } | ||
130 | + | ||
131 | + } | ||
132 | + | ||
133 | + | ||
52 | getApp().check_can_share(); | 134 | getApp().check_can_share(); |
53 | if (app.globalData.userInfo) { | 135 | if (app.globalData.userInfo) { |
54 | if (!this.data.isLogin) { | 136 | if (!this.data.isLogin) { |
@@ -688,6 +770,8 @@ Page({ | @@ -688,6 +770,8 @@ Page({ | ||
688 | } | 770 | } |
689 | 771 | ||
690 | if (flag) { | 772 | if (flag) { |
773 | + | ||
774 | + th.data.payed=1; | ||
691 | t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder"); | 775 | t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder"); |
692 | t_pay.pay({ | 776 | t_pay.pay({ |
693 | parentSn: order_sn, | 777 | parentSn: order_sn, |
packageA/pages/myGift/myGift.js
@@ -4,6 +4,7 @@ let self = null; | @@ -4,6 +4,7 @@ let self = null; | ||
4 | var os = app.globalData.setting; | 4 | var os = app.globalData.setting; |
5 | var t_pay = require("../../../utils/pay2.js"); | 5 | var t_pay = require("../../../utils/pay2.js"); |
6 | var util = require('../../../utils/util.js'); | 6 | var util = require('../../../utils/util.js'); |
7 | +var ut=util; | ||
7 | 8 | ||
8 | Page({ | 9 | Page({ |
9 | 10 | ||
@@ -53,6 +54,9 @@ Page({ | @@ -53,6 +54,9 @@ Page({ | ||
53 | */ | 54 | */ |
54 | onLoad: function (options) { | 55 | onLoad: function (options) { |
55 | 56 | ||
57 | + //定义第一次进入 | ||
58 | + this.data.fir_in=1; | ||
59 | + | ||
56 | self = this; | 60 | self = this; |
57 | if(options.index){ | 61 | if(options.index){ |
58 | this.setData({currentIndex:1}); //查看我的礼包 | 62 | this.setData({currentIndex:1}); //查看我的礼包 |
@@ -92,9 +96,47 @@ Page({ | @@ -92,9 +96,47 @@ Page({ | ||
92 | */ | 96 | */ |
93 | onShow: function () { | 97 | onShow: function () { |
94 | 98 | ||
95 | - util.fy_back('',0) | ||
96 | this.data.is_summit_ing=0; | 99 | this.data.is_summit_ing=0; |
97 | - t_pay.set_fir(); | 100 | + |
101 | + | ||
102 | + var th=this; | ||
103 | + //判断是不是第一次进入 | ||
104 | + if(this.data.fir_in){ | ||
105 | + this.data.fir_in=0; | ||
106 | + }else{ | ||
107 | + //富友插件支付 | ||
108 | + util.fy_back('',0) | ||
109 | + t_pay.set_fir(); | ||
110 | + | ||
111 | + //-- 通联的第三方支付的返回优化 -- | ||
112 | + util.is_pay_ok(th.data.ok_order_sn,"none","none",function (){ | ||
113 | + if(!th.data.ok_order_sn) return false; | ||
114 | + | ||
115 | + var b_url="/api/weshop/libao/libaoFormvip/page"; | ||
116 | + var rq_data={ | ||
117 | + store_id: app.globalData.setting.stoid, | ||
118 | + user_id: app.globalData.user_id, | ||
119 | + number: th.data.ok_order_sn | ||
120 | + }; | ||
121 | + | ||
122 | + getApp().request.promiseGet(b_url, | ||
123 | + {data:rq_data}).then(res=>{ | ||
124 | + if(ut.ajax_ok(res)){ | ||
125 | + var item=res.data.data.pageData[0]; | ||
126 | + if(item.fbillstate==1){ | ||
127 | + //支付支付,返回首页 | ||
128 | + util.m_toast('支付成功'); | ||
129 | + }else{ | ||
130 | + //支付支付,返回首页 | ||
131 | + util.m_toast('支付失败'); | ||
132 | + } | ||
133 | + } | ||
134 | + }) | ||
135 | + }); | ||
136 | + | ||
137 | + } | ||
138 | + | ||
139 | + | ||
98 | getApp().check_can_share(); | 140 | getApp().check_can_share(); |
99 | if(app.globalData.userInfo) { | 141 | if(app.globalData.userInfo) { |
100 | if(!this.data.isLogin) { | 142 | if(!this.data.isLogin) { |
@@ -306,7 +348,7 @@ Page({ | @@ -306,7 +348,7 @@ Page({ | ||
306 | },function (e){ | 348 | },function (e){ |
307 | th.data.is_summit_ing=0; | 349 | th.data.is_summit_ing=0; |
308 | getApp().my_warnning(e, 0, th); | 350 | getApp().my_warnning(e, 0, th); |
309 | - }) | 351 | + },th) |
310 | // var url = "/api/weshop/libao/libaoFormvip/libaoOrder"; | 352 | // var url = "/api/weshop/libao/libaoFormvip/libaoOrder"; |
311 | // getApp().request.post(url, | 353 | // getApp().request.post(url, |
312 | // { | 354 | // { |
packageA/pages/myGiftDetails/myGiftDetails.js
@@ -24,8 +24,10 @@ Page({ | @@ -24,8 +24,10 @@ Page({ | ||
24 | * 生命周期函数--监听页面加载 | 24 | * 生命周期函数--监听页面加载 |
25 | */ | 25 | */ |
26 | onLoad: function (options) { | 26 | onLoad: function (options) { |
27 | + //定义第一次进入 | ||
28 | + this.data.fir_in=1; | ||
27 | 29 | ||
28 | - self = this; | 30 | + self = this; |
29 | 31 | ||
30 | // 如果从商品详情页点击促销栏里的礼包跳转过来的话,不显示底部按钮 | 32 | // 如果从商品详情页点击促销栏里的礼包跳转过来的话,不显示底部按钮 |
31 | // showBtn 控制按钮是否显示 | 33 | // showBtn 控制按钮是否显示 |
@@ -68,9 +70,58 @@ Page({ | @@ -68,9 +70,58 @@ Page({ | ||
68 | * 生命周期函数--监听页面显示 | 70 | * 生命周期函数--监听页面显示 |
69 | */ | 71 | */ |
70 | onShow: function () { | 72 | onShow: function () { |
71 | - this.data.is_summit_ing=0; | ||
72 | - ut.fy_back('',0) | ||
73 | - t_pay.set_fir(); | 73 | + |
74 | + this.data.is_summit_ing=0; | ||
75 | + var th=this; | ||
76 | + //判断是不是第一次进入 | ||
77 | + if(this.data.fir_in){ | ||
78 | + this.data.fir_in=0; | ||
79 | + }else{ | ||
80 | + ut.fy_back('',0) | ||
81 | + t_pay.set_fir(); | ||
82 | + | ||
83 | + //-- 通联的第三方支付的返回优化 -- | ||
84 | + ut.is_pay_ok(th.data.ok_order_sn,"/packageA/pages/libao_payment/payment?type=2","none",function (){ | ||
85 | + console.log('is_pay_ok'); | ||
86 | + console.log(th.data.ok_order_sn); | ||
87 | + if(!th.data.ok_order_sn) return false; | ||
88 | + | ||
89 | + var b_url="/api/weshop/libao/libaoFormvip/page"; | ||
90 | + var rq_data={ | ||
91 | + store_id: app.globalData.setting.stoid, | ||
92 | + user_id: app.globalData.user_id, | ||
93 | + number: th.data.ok_order_sn | ||
94 | + }; | ||
95 | + | ||
96 | + getApp().request.promiseGet(b_url, | ||
97 | + {data:rq_data}).then(res=>{ | ||
98 | + | ||
99 | + console.log('is_pay_ok2'); | ||
100 | + console.log('1111111'); | ||
101 | + | ||
102 | + if(ut.ajax_ok(res)){ | ||
103 | + | ||
104 | + var item=res.data.data.pageData[0]; | ||
105 | + if(item.fbillstate==1){ | ||
106 | + //支付支付,返回首页 | ||
107 | + ut.m_toast('支付成功'); | ||
108 | + setTimeout(()=>{ | ||
109 | + getApp().goto("/packageA/pages/libao_payment/payment?type=2"); | ||
110 | + },1000) | ||
111 | + | ||
112 | + }else{ | ||
113 | + //支付支付,返回首页 | ||
114 | + ut.m_toast('支付失败'); | ||
115 | + setTimeout(()=>{ | ||
116 | + getApp().goto("/pages/index/index/index"); | ||
117 | + },1000) | ||
118 | + } | ||
119 | + } | ||
120 | + }) | ||
121 | + }); | ||
122 | + | ||
123 | + } | ||
124 | + | ||
74 | getApp().check_can_share(); | 125 | getApp().check_can_share(); |
75 | if(app.globalData.userInfo) { | 126 | if(app.globalData.userInfo) { |
76 | if(!this.data.isLogin) { | 127 | if(!this.data.isLogin) { |
@@ -248,7 +299,7 @@ Page({ | @@ -248,7 +299,7 @@ Page({ | ||
248 | },function (msg){ | 299 | },function (msg){ |
249 | th.data.is_summit_ing=0; | 300 | th.data.is_summit_ing=0; |
250 | getApp().my_warnning(msg, 0, th); | 301 | getApp().my_warnning(msg, 0, th); |
251 | - }) | 302 | + },th) |
252 | 303 | ||
253 | // var url = "/api/weshop/libao/libaoFormvip/libaoOrder"; | 304 | // var url = "/api/weshop/libao/libaoFormvip/libaoOrder"; |
254 | // getApp().request.post(url, | 305 | // getApp().request.post(url, |
packageA/pages/serviceCard_pd/cart/cart.js
1 | var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common.js"), | 1 | var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common.js"), |
2 | - s = require("../../../../utils/util.js"), o = require("../../../../utils/md5.js"), to = getApp(); | 2 | + s = require("../../../../utils/util.js"),ut=s, o = require("../../../../utils/md5.js"), to = getApp(); |
3 | var oo = t.globalData.setting, os = oo; | 3 | var oo = t.globalData.setting, os = oo; |
4 | var regeneratorRuntime = require('../../../../utils/runtime.js'); | 4 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
5 | var util_pay = require("../../../../utils/pay.js"); | 5 | var util_pay = require("../../../../utils/pay.js"); |
@@ -71,7 +71,8 @@ Page({ | @@ -71,7 +71,8 @@ Page({ | ||
71 | }, | 71 | }, |
72 | onLoad: function (t) { | 72 | onLoad: function (t) { |
73 | console.log("onLoad_pt_cart"); | 73 | console.log("onLoad_pt_cart"); |
74 | - | 74 | + //定义第一次进入 |
75 | + this.data.fir_in=1; | ||
75 | 76 | ||
76 | var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, }); | 77 | var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, }); |
77 | var appD = getApp().get_b_now(); | 78 | var appD = getApp().get_b_now(); |
@@ -245,12 +246,45 @@ Page({ | @@ -245,12 +246,45 @@ Page({ | ||
245 | //----------子页返回父页触发---------- | 246 | //----------子页返回父页触发---------- |
246 | onShow: function () { | 247 | onShow: function () { |
247 | 248 | ||
248 | - s.fy_back('',0); | 249 | + var th = this; |
250 | + //判断是不是第一次进入 | ||
251 | + if(this.data.fir_in){ | ||
252 | + this.data.fir_in=0; | ||
253 | + }else{ | ||
254 | + s.fy_back('',0); | ||
255 | + t_pay.set_fir(); | ||
256 | + util_pay.set_fir(); | ||
257 | + | ||
258 | + var back_url="/packageA/pages/serviceCard_pd/team_success/team_success?ordersn=" + th.data.order_sn; | ||
259 | + | ||
260 | + //-- 通联的第三方支付的返回优化 -- | ||
261 | + ut.is_pay_ok(th.data.order_id,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){ | ||
262 | + if(!th.data.order_id) return false; | ||
263 | + getApp().request.promiseGet("/api/weshop/rechargeServicelist/page",{ | ||
264 | + data: { store_id: os.stoid, order_id: th.data.order_id} | ||
265 | + }).then(res=>{ | ||
266 | + if(ut.ajax_ok(res)){ | ||
267 | + var item=res.data.data.pageData[0]; | ||
268 | + if(item.pt_status==1 || item.pt_status==2){ | ||
269 | + //支付支付,返回首页 | ||
270 | + ut.m_toast('支付成功'); | ||
271 | + setTimeout(()=>{ | ||
272 | + getApp().re_to(back_url); | ||
273 | + },1000) | ||
274 | + | ||
275 | + }else{ | ||
276 | + //支付支付,返回首页 | ||
277 | + ut.m_toast('支付失败'); | ||
278 | + setTimeout(()=>{ | ||
279 | + getApp().re_to("/pages/user/order_list/order_list?index=2&tabindex=1"); | ||
280 | + },1000) | ||
281 | + } | ||
282 | + } | ||
283 | + }) | ||
284 | + }); | ||
285 | + } | ||
249 | 286 | ||
250 | - t_pay.set_fir(); | ||
251 | - util_pay.set_fir(); | ||
252 | 287 | ||
253 | - var th = this; | ||
254 | if (th.data.isclose == 0) { | 288 | if (th.data.isclose == 0) { |
255 | wx.navigateTo({ | 289 | wx.navigateTo({ |
256 | url: "/pages/index/index/index" | 290 | url: "/pages/index/index/index" |
@@ -438,12 +472,7 @@ Page({ | @@ -438,12 +472,7 @@ Page({ | ||
438 | 472 | ||
439 | //-- 支付失败,要返回 -- | 473 | //-- 支付失败,要返回 -- |
440 | setTimeout(function () { | 474 | setTimeout(function () { |
441 | - var cps = getCurrentPages(); | ||
442 | - if (cps.length > 1) { | ||
443 | - wx.navigateBack({ delta: 1 }) | ||
444 | - } else { | ||
445 | - getApp().goto("/pages/index/index/index"); | ||
446 | - } | 475 | + getApp().re_to("/pages/user/order_list/order_list?index=2&tabindex=1"); |
447 | }, 1000) | 476 | }, 1000) |
448 | 477 | ||
449 | }) | 478 | }) |
packageA/pages/serviceCard_pd/cart_wk/cart_wk.js
@@ -59,6 +59,8 @@ Page({ | @@ -59,6 +59,8 @@ Page({ | ||
59 | * 生命周期函数--监听页面加载 | 59 | * 生命周期函数--监听页面加载 |
60 | */ | 60 | */ |
61 | onLoad: function (options) { | 61 | onLoad: function (options) { |
62 | + //定义第一次进入 | ||
63 | + this.data.fir_in=1; | ||
62 | 64 | ||
63 | //清空is_pick_up | 65 | //清空is_pick_up |
64 | getApp().request.put("/api/weshop/useraddress/updatePickUp", { | 66 | getApp().request.put("/api/weshop/useraddress/updatePickUp", { |
@@ -94,11 +96,50 @@ Page({ | @@ -94,11 +96,50 @@ Page({ | ||
94 | */ | 96 | */ |
95 | onShow: function () { | 97 | onShow: function () { |
96 | 98 | ||
97 | - ut.fy_back('',0); | ||
98 | this.data.paying=0; | 99 | this.data.paying=0; |
99 | - util_pay.set_fir(); | ||
100 | - getApp().check_can_share(); | 100 | + |
101 | var th = this; | 101 | var th = this; |
102 | + //判断是不是第一次进入 | ||
103 | + if(this.data.fir_in){ | ||
104 | + this.data.fir_in=0; | ||
105 | + }else{ | ||
106 | + ut.fy_back('',0); | ||
107 | + util_pay.set_fir(); | ||
108 | + | ||
109 | + | ||
110 | + var back_url="/pages/payment/pay_success/pay_success?order_id=" + th.data.order.order_id + "&type=1&card=1"; | ||
111 | + //-- 通联的第三方支付的返回优化 -- | ||
112 | + ut.is_pay_ok(th.data.wk_pyed,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){ | ||
113 | + if(!th.data.wk_pyed) return false; | ||
114 | + | ||
115 | + getApp().request.promiseGet("/api/weshop/rechargeServicelist/page",{ | ||
116 | + data: { store_id: os.stoid, order_id: th.data.order.order_id} | ||
117 | + }).then(res=>{ | ||
118 | + if(ut.ajax_ok(res)){ | ||
119 | + var item=res.data.data.pageData[0]; | ||
120 | + if(item.pt_status==4 || item.pt_status==5){ | ||
121 | + //支付支付,返回首页 | ||
122 | + ut.m_toast('支付成功'); | ||
123 | + setTimeout(()=>{ | ||
124 | + getApp().re_to(back_url); | ||
125 | + },1000) | ||
126 | + | ||
127 | + }else{ | ||
128 | + //支付支付,返回首页 | ||
129 | + ut.m_toast('支付失败'); | ||
130 | + setTimeout(()=>{ | ||
131 | + getApp().re_to("/pages/user/order_list/order_list?index=2&tabindex=1"); | ||
132 | + },1000) | ||
133 | + } | ||
134 | + } | ||
135 | + }) | ||
136 | + }); | ||
137 | + | ||
138 | + } | ||
139 | + | ||
140 | + | ||
141 | + | ||
142 | + getApp().check_can_share(); | ||
102 | if (th.data.isclose == 0) { | 143 | if (th.data.isclose == 0) { |
103 | wx.navigateTo({ | 144 | wx.navigateTo({ |
104 | url: "/pages/index/index/index" | 145 | url: "/pages/index/index/index" |
@@ -606,6 +647,7 @@ Page({ | @@ -606,6 +647,7 @@ Page({ | ||
606 | return false; | 647 | return false; |
607 | } | 648 | } |
608 | 649 | ||
650 | + th.data.wk_pyed=1; | ||
609 | util_pay.pay_data(t,function (){ | 651 | util_pay.pay_data(t,function (){ |
610 | var allmoney = th.data.allpice; | 652 | var allmoney = th.data.allpice; |
611 | th.jumpPaymentPage(th.data.order.order_id, allmoney); | 653 | th.jumpPaymentPage(th.data.order.order_id, allmoney); |
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -128,6 +128,9 @@ Page({ | @@ -128,6 +128,9 @@ Page({ | ||
128 | }, | 128 | }, |
129 | onLoad: function (t) { | 129 | onLoad: function (t) { |
130 | 130 | ||
131 | + //定义第一次进入 | ||
132 | + this.data.fir_in=1; | ||
133 | + | ||
131 | // console.log('收到的传参', t); | 134 | // console.log('收到的传参', t); |
132 | wx.setNavigationBarTitle({ | 135 | wx.setNavigationBarTitle({ |
133 | title: '填写订单', | 136 | title: '填写订单', |
@@ -654,11 +657,48 @@ Page({ | @@ -654,11 +657,48 @@ Page({ | ||
654 | //----------子页返回父页触发---------- | 657 | //----------子页返回父页触发---------- |
655 | onShow: function () { | 658 | onShow: function () { |
656 | 659 | ||
657 | - var fy=ut.fy_back('/pages/user/order_list/order_list',1); | ||
658 | - if(fy) return false; | ||
659 | - | ||
660 | var th = this; | 660 | var th = this; |
661 | - util_pay.set_fir(); | 661 | + |
662 | + //判断是不是第一次进入 | ||
663 | + if(this.data.fir_in){ | ||
664 | + this.data.fir_in=0; | ||
665 | + }else{ | ||
666 | + var fy=ut.fy_back('/pages/user/order_list/order_list',1); | ||
667 | + if(fy) return false; | ||
668 | + util_pay.set_fir(); | ||
669 | + | ||
670 | + var back="/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?type=1&ordersn=" + this.data.ok_order_sn + | ||
671 | + "&group_id=" + th.data.param.group_id + "&goods_id=" + th.data.param.goods_id + | ||
672 | + "&goods_name=" + th.data.bn_goods.goods_name; | ||
673 | + | ||
674 | + //-- 通联的第三方支付的返回优化 -- | ||
675 | + ut.is_pay_ok(th.data.ok_order_sn,back,'/pages/user/order_list/order_list',function (){ | ||
676 | + if(!th.data.ok_order_sn) return false; | ||
677 | + getApp().request.promiseGet("/api/weshop/order/page", | ||
678 | + {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | ||
679 | + if(ut.ajax_ok(res)){ | ||
680 | + var item=res.data.data.pageData[0]; | ||
681 | + if(item.pay_status==1){ | ||
682 | + //支付支付,返回首页 | ||
683 | + ut.m_toast('支付成功'); | ||
684 | + setTimeout(()=>{ | ||
685 | + getApp().re_to(back); | ||
686 | + },1000) | ||
687 | + | ||
688 | + }else{ | ||
689 | + //支付支付,返回首页 | ||
690 | + ut.m_toast('支付失败'); | ||
691 | + setTimeout(()=>{ | ||
692 | + getApp().re_to("/pages/user/order_list/order_list"); | ||
693 | + },1000) | ||
694 | + } | ||
695 | + } | ||
696 | + }) | ||
697 | + }); | ||
698 | + | ||
699 | + } | ||
700 | + | ||
701 | + | ||
662 | 702 | ||
663 | if (th.data.isclose == 0) { | 703 | if (th.data.isclose == 0) { |
664 | wx.navigateTo({ | 704 | wx.navigateTo({ |
@@ -1477,6 +1517,8 @@ Page({ | @@ -1477,6 +1517,8 @@ Page({ | ||
1477 | // order_sn: data.data, | 1517 | // order_sn: data.data, |
1478 | // type:1, | 1518 | // type:1, |
1479 | // }, 1); | 1519 | // }, 1); |
1520 | + | ||
1521 | + th.data.ok_order_sn=data.data; | ||
1480 | util_pay.pay(data.data, function () { | 1522 | util_pay.pay(data.data, function () { |
1481 | setTimeout(function () { | 1523 | setTimeout(function () { |
1482 | // wx.reLaunch({ | 1524 | // wx.reLaunch({ |
packageC/pages/presell/cart/cart.js
@@ -147,6 +147,9 @@ Page({ | @@ -147,6 +147,9 @@ Page({ | ||
147 | }, | 147 | }, |
148 | onLoad: function (t) { | 148 | onLoad: function (t) { |
149 | 149 | ||
150 | + //定义第一次进入 | ||
151 | + this.data.fir_in=1; | ||
152 | + | ||
150 | if (t.order_id) this.data.order_id = t.order_id; | 153 | if (t.order_id) this.data.order_id = t.order_id; |
151 | if (t.order_sn) this.data.order_sn = t.order_sn; | 154 | if (t.order_sn) this.data.order_sn = t.order_sn; |
152 | 155 | ||
@@ -190,17 +193,65 @@ Page({ | @@ -190,17 +193,65 @@ Page({ | ||
190 | is_no_by: {}, | 193 | is_no_by: {}, |
191 | is_by: {} | 194 | is_by: {} |
192 | }) | 195 | }) |
196 | + this.data.fir_in=0; | ||
193 | }, | 197 | }, |
194 | 198 | ||
195 | //----------子页返回父页触发---------- | 199 | //----------子页返回父页触发---------- |
196 | onShow: function () { | 200 | onShow: function () { |
201 | + | ||
197 | this.data.paying=0; | 202 | this.data.paying=0; |
198 | 203 | ||
199 | - var fy= ut.fy_back("/pages/user/order_list/order_list",1); | ||
200 | - if(fy) return false; | 204 | + console.log('onshow-2222'); |
201 | 205 | ||
202 | - util_pay.set_fir(); | ||
203 | var th = this; | 206 | var th = this; |
207 | + //判断是不是第一次进入 | ||
208 | + if(this.data.fir_in){ | ||
209 | + this.data.fir_in=0; | ||
210 | + }else{ | ||
211 | + | ||
212 | + console.log('onshow-3333'); | ||
213 | + //-- 富友支付的 -- | ||
214 | + var fy= ut.fy_back("/pages/user/order_list/order_list",1); | ||
215 | + if(fy) return false; | ||
216 | + util_pay.set_fir(); | ||
217 | + | ||
218 | + //-- 通联的第三方支付的返回优化 -- | ||
219 | + ut.is_pay_ok(th.data.ok_order_sn,"back","back",function (){ | ||
220 | + | ||
221 | + console.log('onshow-444'); | ||
222 | + console.log(th.data.ok_order_sn); | ||
223 | + | ||
224 | + if(!th.data.ok_order_sn) return false; | ||
225 | + getApp().request.promiseGet("/api/weshop/order/page", | ||
226 | + {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | ||
227 | + if(ut.ajax_ok(res)){ | ||
228 | + | ||
229 | + console.log('onshow-444'); | ||
230 | + console.log(res); | ||
231 | + | ||
232 | + var item=res.data.data.pageData[0]; | ||
233 | + if(item.pay_status==1){ | ||
234 | + //支付支付,返回首页 | ||
235 | + ut.m_toast('支付成功'); | ||
236 | + setTimeout(()=>{ | ||
237 | + wx.navigateBack(); | ||
238 | + },1000) | ||
239 | + | ||
240 | + }else{ | ||
241 | + //支付支付,返回首页 | ||
242 | + ut.m_toast('支付失败'); | ||
243 | + setTimeout(()=>{ | ||
244 | + wx.navigateBack(); | ||
245 | + },1000) | ||
246 | + } | ||
247 | + } | ||
248 | + }) | ||
249 | + }); | ||
250 | + | ||
251 | + } | ||
252 | + | ||
253 | + | ||
254 | + | ||
204 | th.setData({ show_submit: 0 }); //让提交先掩藏 | 255 | th.setData({ show_submit: 0 }); //让提交先掩藏 |
205 | th.data.g_cart_q_time = null; | 256 | th.data.g_cart_q_time = null; |
206 | if (th.data.isclose == 0) { | 257 | if (th.data.isclose == 0) { |
@@ -2519,6 +2570,9 @@ Page({ | @@ -2519,6 +2570,9 @@ Page({ | ||
2519 | return false; | 2570 | return false; |
2520 | } | 2571 | } |
2521 | 2572 | ||
2573 | + //-- 订单OK -- | ||
2574 | + th.data.ok_order_sn=th.data.order.order_sn; | ||
2575 | + | ||
2522 | util_pay.pay_data(t,function (){ | 2576 | util_pay.pay_data(t,function (){ |
2523 | //---用余额支付--- | 2577 | //---用余额支付--- |
2524 | getApp().my_warnning("支付成功", 1, th); | 2578 | getApp().my_warnning("支付成功", 1, th); |
@@ -2981,6 +3035,8 @@ Page({ | @@ -2981,6 +3035,8 @@ Page({ | ||
2981 | type: 1 //正常单 | 3035 | type: 1 //正常单 |
2982 | }, 1);--*/ | 3036 | }, 1);--*/ |
2983 | 3037 | ||
3038 | + | ||
3039 | + th.data.ok_order_sn=this.data.order.order_sn; | ||
2984 | util_pay.pay(this.data.order.order_sn, function () { | 3040 | util_pay.pay(this.data.order.order_sn, function () { |
2985 | wx.showToast({ title: '支付成功' }) | 3041 | wx.showToast({ title: '支付成功' }) |
2986 | wx.navigateBack(); | 3042 | wx.navigateBack(); |
packageC/pages/presell/cart/cart2.js
@@ -157,6 +157,10 @@ Page({ | @@ -157,6 +157,10 @@ Page({ | ||
157 | }) | 157 | }) |
158 | }, | 158 | }, |
159 | onLoad: function (t) { | 159 | onLoad: function (t) { |
160 | + | ||
161 | + //定义第一次进入 | ||
162 | + this.data.fir_in=1; | ||
163 | + | ||
160 | wx.setNavigationBarTitle({ title: "填写订单", }) | 164 | wx.setNavigationBarTitle({ title: "填写订单", }) |
161 | var th = this; | 165 | var th = this; |
162 | 166 | ||
@@ -191,19 +195,51 @@ Page({ | @@ -191,19 +195,51 @@ Page({ | ||
191 | //----------子页返回父页触发---------- | 195 | //----------子页返回父页触发---------- |
192 | onShow: function () { | 196 | onShow: function () { |
193 | var th = this; | 197 | var th = this; |
194 | - var fy= ut.fy_back('',0,function (){ | ||
195 | - var cps = getCurrentPages(); | ||
196 | - if (cps.length > 1) { | ||
197 | - wx.navigateBack({ delta: 1 }) | ||
198 | - } else { | ||
199 | - getApp().goto("/pages/index/index/index"); | ||
200 | - } | 198 | + //判断是不是第一次进入 |
199 | + if(this.data.fir_in){ | ||
200 | + this.data.fir_in=0; | ||
201 | + }else{ | ||
202 | + //富友支付插件 | ||
203 | + var fy= ut.fy_back('',0,function (){ | ||
204 | + var cps = getCurrentPages(); | ||
205 | + if (cps.length > 1) { | ||
206 | + wx.navigateBack({ delta: 1 }) | ||
207 | + } else { | ||
208 | + getApp().goto("/pages/index/index/index"); | ||
209 | + } | ||
201 | 210 | ||
202 | - }) | ||
203 | - if(fy) return false; | 211 | + }) |
212 | + if(fy) return false; | ||
213 | + util_pay.set_fir(); | ||
214 | + | ||
215 | + //-- 通联的第三方支付的返回优化 -- | ||
216 | + ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn, | ||
217 | + "/pages/user/order_list/order_list",function (){ | ||
218 | + if(!th.data.ok_order_sn) return false; | ||
219 | + getApp().request.promiseGet("/api/weshop/order/page", | ||
220 | + {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | ||
221 | + if(ut.ajax_ok(res)){ | ||
222 | + var item=res.data.data.pageData[0]; | ||
223 | + if(item.pay_status==1){ | ||
224 | + //支付支付,返回首页 | ||
225 | + ut.m_toast('支付成功'); | ||
226 | + setTimeout(()=>{ | ||
227 | + getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn); | ||
228 | + },1000) | ||
229 | + | ||
230 | + }else{ | ||
231 | + //支付支付,返回首页 | ||
232 | + ut.m_toast('支付失败'); | ||
233 | + setTimeout(()=>{ | ||
234 | + getApp().goto("/pages/index/index/index"); | ||
235 | + },1000) | ||
236 | + } | ||
237 | + } | ||
238 | + }) | ||
239 | + }); | ||
240 | + } | ||
204 | 241 | ||
205 | 242 | ||
206 | - util_pay.set_fir(); | ||
207 | th.data.g_cart_q_time = null; | 243 | th.data.g_cart_q_time = null; |
208 | if (th.data.isclose == 0) { | 244 | if (th.data.isclose == 0) { |
209 | wx.navigateTo({ | 245 | wx.navigateTo({ |
@@ -1667,6 +1703,8 @@ Page({ | @@ -1667,6 +1703,8 @@ Page({ | ||
1667 | //void e.jumpToCart4({ | 1703 | //void e.jumpToCart4({ |
1668 | // order_sn: data.data, | 1704 | // order_sn: data.data, |
1669 | //}, 1); | 1705 | //}, 1); |
1706 | + th.data.ok_order_sn=data.data; | ||
1707 | + | ||
1670 | util_pay.pay(data.data, function () { | 1708 | util_pay.pay(data.data, function () { |
1671 | //app.my_warnning("支付成功",1,th); | 1709 | //app.my_warnning("支付成功",1,th); |
1672 | //setTimeout(function () { | 1710 | //setTimeout(function () { |
packageC/pages/presell/cart/cart2_pre.js
@@ -78,6 +78,9 @@ Page({ | @@ -78,6 +78,9 @@ Page({ | ||
78 | }) | 78 | }) |
79 | }, | 79 | }, |
80 | onLoad: function (t) { | 80 | onLoad: function (t) { |
81 | + //定义第一次进入 | ||
82 | + this.data.fir_in=1; | ||
83 | + | ||
81 | wx.setNavigationBarTitle({ | 84 | wx.setNavigationBarTitle({ |
82 | title: "填写订单", | 85 | title: "填写订单", |
83 | }); | 86 | }); |
@@ -280,9 +283,42 @@ Page({ | @@ -280,9 +283,42 @@ Page({ | ||
280 | 283 | ||
281 | var fy=ut.fy_back("/pages/user/order_list/order_list",1); | 284 | var fy=ut.fy_back("/pages/user/order_list/order_list",1); |
282 | if(fy) return false; | 285 | if(fy) return false; |
283 | - | ||
284 | util_pay.set_fir(); | 286 | util_pay.set_fir(); |
285 | var th = this; | 287 | var th = this; |
288 | + //判断是不是第一次进入 | ||
289 | + if(this.data.fir_in){ | ||
290 | + this.data.fir_in=0; | ||
291 | + }else{ | ||
292 | + | ||
293 | + //-- 支付完成后的跳转的时间 -- | ||
294 | + var ok_url = "/packageC/pages/presell/cart/cart?order_sn=" +this.data.ok_order_sn; | ||
295 | + var err_url="/pages/user/order_list/order_list"; | ||
296 | + //-- 通联的第三方支付的返回优化 -- | ||
297 | + ut.is_pay_ok(th.data.ok_order_sn,ok_url,err_url,function (){ | ||
298 | + if(!th.data.ok_order_sn) return false; | ||
299 | + getApp().request.promiseGet("/api/weshop/order/page", | ||
300 | + {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | ||
301 | + if(ut.ajax_ok(res)){ | ||
302 | + var item=res.data.data.pageData[0]; | ||
303 | + if(item.pay_time){ | ||
304 | + //支付支付,返回首页 | ||
305 | + ut.m_toast('支付成功'); | ||
306 | + setTimeout(()=>{ | ||
307 | + getApp().re_to(ok_url); | ||
308 | + },1000) | ||
309 | + | ||
310 | + }else{ | ||
311 | + //支付支付,返回首页 | ||
312 | + ut.m_toast('支付失败'); | ||
313 | + setTimeout(()=>{ | ||
314 | + getApp().re_to(err_url); | ||
315 | + },1000) | ||
316 | + } | ||
317 | + } | ||
318 | + }) | ||
319 | + }); | ||
320 | + } | ||
321 | + | ||
286 | if (th.data.isclose == 0) { | 322 | if (th.data.isclose == 0) { |
287 | wx.navigateTo({ | 323 | wx.navigateTo({ |
288 | url: "/pages/index/index/index" | 324 | url: "/pages/index/index/index" |
@@ -918,6 +954,8 @@ Page({ | @@ -918,6 +954,8 @@ Page({ | ||
918 | //要进行判断,如果是用微信支付,就要跳转到支付界面 | 954 | //要进行判断,如果是用微信支付,就要跳转到支付界面 |
919 | if (order_amount && parseFloat(order_amount) > 0) { | 955 | if (order_amount && parseFloat(order_amount) > 0) { |
920 | th.setData({ isclose: 0 }); | 956 | th.setData({ isclose: 0 }); |
957 | + | ||
958 | + th.data.ok_order_sn=data.data; | ||
921 | util_pay.pay(data.data, function () { | 959 | util_pay.pay(data.data, function () { |
922 | var url = "/packageC/pages/presell/cart/cart?order_sn=" + data.data; | 960 | var url = "/packageC/pages/presell/cart/cart?order_sn=" + data.data; |
923 | setTimeout(function () { | 961 | setTimeout(function () { |
packageD/pages/user/deposit/prepaid/msg/msg.js
packageD/pages/user/deposit/prepaid/prepaid.js
@@ -15,6 +15,10 @@ Page({ | @@ -15,6 +15,10 @@ Page({ | ||
15 | perpaid: [], //数据, | 15 | perpaid: [], //数据, |
16 | paying:0 | 16 | paying:0 |
17 | }, | 17 | }, |
18 | + onLoad:function (){ | ||
19 | + //定义第一次进入 | ||
20 | + this.data.fir_in=1; | ||
21 | + }, | ||
18 | /* 生命周期函数--监听页面初次渲染完成*/ | 22 | /* 生命周期函数--监听页面初次渲染完成*/ |
19 | onReady: function() { | 23 | onReady: function() { |
20 | var th=this; | 24 | var th=this; |
@@ -96,19 +100,49 @@ Page({ | @@ -96,19 +100,49 @@ Page({ | ||
96 | */ | 100 | */ |
97 | onShow: function () { | 101 | onShow: function () { |
98 | 102 | ||
103 | + var th=this; | ||
104 | + //判断是不是第一次进入 | ||
105 | + if(this.data.fir_in){ | ||
106 | + this.data.fir_in=0; | ||
107 | + }else{ | ||
108 | + //-- 富友插件 -- | ||
109 | + ut.fy_back('',0) | ||
110 | + t_pay.set_fir(); | ||
111 | + | ||
112 | + //-- 通联的第三方支付的返回优化 -- | ||
113 | + ut.is_pay_ok(th.data.ok_order_sn,"/packageD/pages/user/deposit/prepaid/msg/msg","none",function (){ | ||
114 | + if(!th.data.ok_order_sn) return false; | ||
115 | + var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn; | ||
116 | + getApp().request.promiseGet(ck_url,{}).then(res=>{ | ||
117 | + if(res.data.code==0 && res.data.data){ | ||
118 | + var item=res.data.data; | ||
119 | + if(item.pay_status==1){ | ||
120 | + //支付支付,返回首页 | ||
121 | + ut.m_toast('支付成功'); | ||
122 | + setTimeout(()=>{ | ||
123 | + getApp().re_to("/packageD/pages/user/deposit/prepaid/msg/msg"); | ||
124 | + },1000) | ||
99 | 125 | ||
126 | + }else{ | ||
127 | + //支付支付,返回首页 | ||
128 | + ut.m_toast('支付失败'); | ||
129 | + | ||
130 | + } | ||
131 | + } | ||
132 | + }) | ||
133 | + }); | ||
134 | + } | ||
100 | 135 | ||
101 | wx.setNavigationBarTitle({ | 136 | wx.setNavigationBarTitle({ |
102 | title: "流动资金转预存", | 137 | title: "流动资金转预存", |
103 | }) | 138 | }) |
104 | 139 | ||
105 | this.data.paying=0; | 140 | this.data.paying=0; |
106 | - ut.fy_back('',0) | ||
107 | - t_pay.set_fir(); | ||
108 | 141 | ||
109 | - if(getApp().globalData.user_id && !this.data.is_get){ | ||
110 | - this.yuck(); | ||
111 | - } | 142 | + |
143 | + if(getApp().globalData.user_id && !this.data.is_get){ | ||
144 | + this.yuck(); | ||
145 | + } | ||
112 | 146 | ||
113 | }, | 147 | }, |
114 | //确定充值 | 148 | //确定充值 |
@@ -170,6 +204,8 @@ Page({ | @@ -170,6 +204,8 @@ Page({ | ||
170 | var parentSn = msg.order_sn; | 204 | var parentSn = msg.order_sn; |
171 | var store_id = os.stoid; | 205 | var store_id = os.stoid; |
172 | t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder"); | 206 | t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder"); |
207 | + | ||
208 | + e.data.ok_order_sn=parentSn; | ||
173 | t_pay.pay({ | 209 | t_pay.pay({ |
174 | parentSn: parentSn, | 210 | parentSn: parentSn, |
175 | store_id: store_id | 211 | store_id: store_id |
packageD/pages/user/integral/integral.js
@@ -208,6 +208,9 @@ Page({ | @@ -208,6 +208,9 @@ Page({ | ||
208 | */ | 208 | */ |
209 | onLoad: function (options) { | 209 | onLoad: function (options) { |
210 | 210 | ||
211 | + //定义第一次进入 | ||
212 | + this.data.fir_in=1; | ||
213 | + | ||
211 | var th=this; | 214 | var th=this; |
212 | getApp().request.get("/api/wx/weappSendlist/page", { | 215 | getApp().request.get("/api/wx/weappSendlist/page", { |
213 | data: { | 216 | data: { |
@@ -258,6 +261,8 @@ Page({ | @@ -258,6 +261,8 @@ Page({ | ||
258 | var store_id = os.stoid; | 261 | var store_id = os.stoid; |
259 | 262 | ||
260 | t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder"); | 263 | t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder"); |
264 | + | ||
265 | + th.data.ok_order_sn=parentSn; | ||
261 | t_pay.pay({ | 266 | t_pay.pay({ |
262 | parentSn: parentSn, | 267 | parentSn: parentSn, |
263 | store_id: store_id | 268 | store_id: store_id |
@@ -290,10 +295,8 @@ Page({ | @@ -290,10 +295,8 @@ Page({ | ||
290 | // }) | 295 | // }) |
291 | }) | 296 | }) |
292 | }) | 297 | }) |
293 | - | ||
294 | - | ||
295 | - | ||
296 | - }, | 298 | + |
299 | + }, | ||
297 | //------支付成功页面-------- | 300 | //------支付成功页面-------- |
298 | jumpPaymentPage: function () { | 301 | jumpPaymentPage: function () { |
299 | console.log("支付成功页面2333"); | 302 | console.log("支付成功页面2333"); |
@@ -331,9 +334,44 @@ Page({ | @@ -331,9 +334,44 @@ Page({ | ||
331 | */ | 334 | */ |
332 | onShow: function () { | 335 | onShow: function () { |
333 | 336 | ||
334 | - ut.fy_back('',0); | 337 | + |
338 | + var th=this; | ||
339 | + //判断是不是第一次进入 | ||
340 | + if(this.data.fir_in){ | ||
341 | + this.data.fir_in=0; | ||
342 | + }else{ | ||
343 | + //-- 富友的插件 -- | ||
344 | + ut.fy_back('',0); | ||
345 | + t_pay.set_fir(); | ||
346 | + | ||
347 | + //-- 通联的第三方支付的返回优化 -- | ||
348 | + ut.is_pay_ok(th.data.ok_order_sn,"/packageD/pages/user/integral/msg/msg",'none',function (){ | ||
349 | + | ||
350 | + console.log('show--11') | ||
351 | + console.log(th.data.ok_order_sn); | ||
352 | + | ||
353 | + if(!th.data.ok_order_sn) return false; | ||
354 | + var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn; | ||
355 | + getApp().request.promiseGet(ck_url,{}).then(res=>{ | ||
356 | + if(res.data.code==0 && res.data.data){ | ||
357 | + var item=res.data.data; | ||
358 | + if(item.pay_status==1){ | ||
359 | + //支付支付,返回首页 | ||
360 | + ut.m_toast('支付成功'); | ||
361 | + setTimeout(()=>{ | ||
362 | + getApp().re_to("/packageD/pages/user/integral/msg/msg"); | ||
363 | + },1000) | ||
364 | + | ||
365 | + }else{ | ||
366 | + //支付支付,返回首页 | ||
367 | + ut.m_toast('支付失败'); | ||
368 | + } | ||
369 | + } | ||
370 | + }) | ||
371 | + }); | ||
372 | + } | ||
373 | + | ||
335 | this.data.paying=0; | 374 | this.data.paying=0; |
336 | - t_pay.set_fir(); | ||
337 | getApp().check_can_share(); | 375 | getApp().check_can_share(); |
338 | //--先判断会员状态-- | 376 | //--先判断会员状态-- |
339 | var user_info = getApp().globalData.userInfo; | 377 | var user_info = getApp().globalData.userInfo; |
packageD/pages/user/integral/msg/msg.js
packageE/pages/cart/cart2/cart2.js
@@ -196,6 +196,8 @@ Page({ | @@ -196,6 +196,8 @@ Page({ | ||
196 | 196 | ||
197 | onLoad: function (t) { | 197 | onLoad: function (t) { |
198 | 198 | ||
199 | + this.data.fir_in=1; | ||
200 | + | ||
199 | wx.setNavigationBarTitle({ title: "填写订单", }) | 201 | wx.setNavigationBarTitle({ title: "填写订单", }) |
200 | var th = this; | 202 | var th = this; |
201 | this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, }); | 203 | this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, }); |
@@ -271,15 +273,47 @@ Page({ | @@ -271,15 +273,47 @@ Page({ | ||
271 | //----------子页返回父页触发---------- | 273 | //----------子页返回父页触发---------- |
272 | onShow: function () { | 274 | onShow: function () { |
273 | 275 | ||
274 | - //富友支付取消支付强行回去 | ||
275 | - var fy=ut.fy_back("/pages/user/order_list/order_list",1); | ||
276 | - if(fy) return false; | ||
277 | - | ||
278 | - util_pay.set_fir(); | ||
279 | 276 | ||
280 | var th = this; | 277 | var th = this; |
281 | - th.data.g_cart_q_time = null; | 278 | + //判断是不是第一次进入 |
279 | + if(this.data.fir_in){ | ||
280 | + this.data.fir_in=0; | ||
281 | + }else{ | ||
282 | + //富友支付取消支付强行回去 | ||
283 | + var fy=ut.fy_back("/pages/user/order_list/order_list",1); | ||
284 | + if(fy) return false; | ||
285 | + util_pay.set_fir(); | ||
286 | + | ||
287 | + //-- 通联的第三方支付的返回优化 -- | ||
288 | + ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn, | ||
289 | + "/pages/user/order_list/order_list",function (){ | ||
290 | + //支付信息会先记录着 | ||
291 | + if(!th.data.ok_order_sn) return false; | ||
292 | + getApp().request.promiseGet("/api/weshop/order/page", | ||
293 | + {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | ||
294 | + if(ut.ajax_ok(res)){ | ||
295 | + var item=res.data.data.pageData[0]; | ||
296 | + if(item.pay_status==1){ | ||
297 | + //支付支付,返回首页 | ||
298 | + ut.m_toast('支付成功'); | ||
299 | + setTimeout(()=>{ | ||
300 | + getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn); | ||
301 | + },1000) | ||
282 | 302 | ||
303 | + }else{ | ||
304 | + //支付支付,返回首页 | ||
305 | + ut.m_toast('支付失败'); | ||
306 | + setTimeout(()=>{ | ||
307 | + getApp().goto("/pages/index/index/index"); | ||
308 | + },1000) | ||
309 | + } | ||
310 | + } | ||
311 | + }) | ||
312 | + }); | ||
313 | + } | ||
314 | + | ||
315 | + | ||
316 | + th.data.g_cart_q_time = null; | ||
283 | if (th.data.isclose == 0) { | 317 | if (th.data.isclose == 0) { |
284 | wx.navigateTo({ | 318 | wx.navigateTo({ |
285 | url: "/pages/index/index/index" | 319 | url: "/pages/index/index/index" |
@@ -5183,8 +5217,7 @@ Page({ | @@ -5183,8 +5217,7 @@ Page({ | ||
5183 | // order_sn: data.data, | 5217 | // order_sn: data.data, |
5184 | //}, 1); | 5218 | //}, 1); |
5185 | 5219 | ||
5186 | - | ||
5187 | - | 5220 | + th.data.ok_order_sn=data.data; |
5188 | util_pay.pay(data.data, async function () { | 5221 | util_pay.pay(data.data, async function () { |
5189 | //app.my_warnning("支付成功",1,th); | 5222 | //app.my_warnning("支付成功",1,th); |
5190 | //setTimeout(function () { | 5223 | //setTimeout(function () { |
@@ -5210,17 +5243,10 @@ Page({ | @@ -5210,17 +5243,10 @@ Page({ | ||
5210 | 5243 | ||
5211 | }, function () { | 5244 | }, function () { |
5212 | 5245 | ||
5213 | - | ||
5214 | // return false; | 5246 | // return false; |
5215 | //支付失败 | 5247 | //支付失败 |
5216 | setTimeout(function () { | 5248 | setTimeout(function () { |
5217 | - var cps = getCurrentPages(); | ||
5218 | - if (cps.length > 1) { | ||
5219 | - wx.navigateBack({ delta: 1 }) | ||
5220 | - } else { | ||
5221 | - getApp().goto("/pages/index/index/index"); | ||
5222 | - } | ||
5223 | - | 5249 | + getApp().re_to("/pages/user/order_list/order_list"); |
5224 | }, 1000) | 5250 | }, 1000) |
5225 | }, oo.stoid); | 5251 | }, oo.stoid); |
5226 | 5252 |
packageE/pages/cart/cart2_inte/cart2_inte.js
@@ -110,6 +110,8 @@ Page({ | @@ -110,6 +110,8 @@ Page({ | ||
110 | }) | 110 | }) |
111 | }, | 111 | }, |
112 | onLoad: function (t) { | 112 | onLoad: function (t) { |
113 | + | ||
114 | + this.data.fir_in=1; | ||
113 | wx.setNavigationBarTitle({ title: "填写订单", }) | 115 | wx.setNavigationBarTitle({ title: "填写订单", }) |
114 | var th = this; | 116 | var th = this; |
115 | th.data.param = t; | 117 | th.data.param = t; |
@@ -204,20 +206,52 @@ Page({ | @@ -204,20 +206,52 @@ Page({ | ||
204 | //----------子页返回父页触发---------- | 206 | //----------子页返回父页触发---------- |
205 | onShow: function () { | 207 | onShow: function () { |
206 | 208 | ||
207 | - var fy=ut.fy_back('',1,function (){ | ||
208 | - var cps = getCurrentPages(); | ||
209 | - if (cps.length > 1) { | ||
210 | - wx.navigateBack({ delta: 1 }) | ||
211 | - } else { | ||
212 | - getApp().goto("/pages/index/index/index"); | ||
213 | - } | ||
214 | - }); | ||
215 | 209 | ||
216 | - if(fy) return false; | 210 | + var th = this; |
211 | + //判断是不是第一次进入 | ||
212 | + if(this.data.fir_in){ | ||
213 | + this.data.fir_in=0; | ||
214 | + }else{ | ||
215 | + //-- 富有的支付插件 -- | ||
216 | + var fy=ut.fy_back('',1,function (){ | ||
217 | + var cps = getCurrentPages(); | ||
218 | + if (cps.length > 1) { | ||
219 | + wx.navigateBack({ delta: 1 }) | ||
220 | + } else { | ||
221 | + getApp().goto("/pages/index/index/index"); | ||
222 | + } | ||
223 | + }); | ||
224 | + if(fy) return false; | ||
225 | + util_pay.set_fir(); | ||
226 | + | ||
227 | + //-- 通联的第三方支付的返回优化 -- | ||
228 | + ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn, | ||
229 | + "/pages/user/order_list/order_list",function (){ | ||
230 | + if(!th.data.ok_order_sn) return false; | ||
231 | + getApp().request.promiseGet("/api/weshop/order/page", | ||
232 | + {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | ||
233 | + if(ut.ajax_ok(res)){ | ||
234 | + var item=res.data.data.pageData[0]; | ||
235 | + if(item.pay_status==1){ | ||
236 | + //支付支付,返回首页 | ||
237 | + ut.m_toast('支付成功'); | ||
238 | + setTimeout(()=>{ | ||
239 | + getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn); | ||
240 | + },1000) | ||
241 | + | ||
242 | + }else{ | ||
243 | + //支付支付,返回首页 | ||
244 | + ut.m_toast('支付失败'); | ||
245 | + setTimeout(()=>{ | ||
246 | + getApp().goto("/pages/index/index/index"); | ||
247 | + },1000) | ||
248 | + } | ||
249 | + } | ||
250 | + }) | ||
251 | + }); | ||
252 | + } | ||
217 | 253 | ||
218 | - util_pay.set_fir(); | ||
219 | 254 | ||
220 | - var th = this; | ||
221 | th.data.g_cart_q_time = null; | 255 | th.data.g_cart_q_time = null; |
222 | 256 | ||
223 | if (th.data.isclose == 0) { | 257 | if (th.data.isclose == 0) { |
@@ -1330,6 +1364,8 @@ Page({ | @@ -1330,6 +1364,8 @@ Page({ | ||
1330 | //void e.jumpToCart4({ | 1364 | //void e.jumpToCart4({ |
1331 | // order_sn: data.data, | 1365 | // order_sn: data.data, |
1332 | //}, 1); | 1366 | //}, 1); |
1367 | + | ||
1368 | + th.data.ok_order_sn=data.data; | ||
1333 | util_pay.pay(data.data, function () { | 1369 | util_pay.pay(data.data, function () { |
1334 | //app.my_warnning("支付成功",1,th); | 1370 | //app.my_warnning("支付成功",1,th); |
1335 | //setTimeout(function () { | 1371 | //setTimeout(function () { |
@@ -1341,7 +1377,7 @@ Page({ | @@ -1341,7 +1377,7 @@ Page({ | ||
1341 | }, function () { | 1377 | }, function () { |
1342 | //支付失败 | 1378 | //支付失败 |
1343 | setTimeout(function () { | 1379 | setTimeout(function () { |
1344 | - wx.navigateBack({ delta: 1 }) | 1380 | + getApp().re_to("/pages/user/order_list/order_list"); |
1345 | }, 1000) | 1381 | }, 1000) |
1346 | }, oo.stoid); | 1382 | }, oo.stoid); |
1347 | 1383 |
pages/cart/cart2_pt/cart2_pt.js renamed to packageE/pages/cart/cart2_pt/cart2_pt.js
1 | -var t = getApp(), app = t, a = t.request, e = require("../../../utils/common.js"), | ||
2 | - s = require("../../../utils/util.js"), ut = s, o = require("../../../utils/md5.js"), to = getApp(); | 1 | +var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common.js"), |
2 | + s = require("../../../../utils/util.js"), ut = s, o = require("../../../../utils/md5.js"), to = getApp(); | ||
3 | var oo = t.globalData.setting, os = oo; | 3 | var oo = t.globalData.setting, os = oo; |
4 | -var regeneratorRuntime = require('../../../utils/runtime.js'); | ||
5 | -var util_pay = require("../../../utils/pay.js"); | 4 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); |
5 | +var util_pay = require("../../../../utils/pay.js"); | ||
6 | 6 | ||
7 | Page({ | 7 | Page({ |
8 | 8 | ||
@@ -101,7 +101,7 @@ Page({ | @@ -101,7 +101,7 @@ Page({ | ||
101 | }) | 101 | }) |
102 | }, | 102 | }, |
103 | onLoad: function (t) { | 103 | onLoad: function (t) { |
104 | - console.log("onLoad_pt_cart"); | 104 | + this.data.fir_in=1; |
105 | var th = this; | 105 | var th = this; |
106 | getApp().getConfig2(function (e) { | 106 | getApp().getConfig2(function (e) { |
107 | th.setData({ | 107 | th.setData({ |
@@ -575,12 +575,45 @@ Page({ | @@ -575,12 +575,45 @@ Page({ | ||
575 | //----------子页返回父页触发---------- | 575 | //----------子页返回父页触发---------- |
576 | onShow: function () { | 576 | onShow: function () { |
577 | 577 | ||
578 | - var fy=ut.fy_back("/pages/user/order_list/order_list",1); | ||
579 | - if(fy) return false; | 578 | + var th = this; |
579 | + //判断是不是第一次进入 | ||
580 | + if(this.data.fir_in){ | ||
581 | + this.data.fir_in=0; | ||
582 | + }else{ | ||
583 | + //-- 富有的支付 -- | ||
584 | + var fy=ut.fy_back("/pages/user/order_list/order_list",1); | ||
585 | + if(fy) return false; | ||
586 | + util_pay.set_fir(); | ||
587 | + //-- 通联的第三方支付的返回优化 -- | ||
588 | + ut.is_pay_ok(th.data.ok_order_sn,"/pages/team/team_success/team_success?ordersn=" + th.data.ok_order_sn, | ||
589 | + "/pages/user/order_list/order_list",function (){ | ||
590 | + if(!th.data.ok_order_sn) return false; | ||
591 | + getApp().request.promiseGet("/api/weshop/order/page", | ||
592 | + {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | ||
593 | + if(ut.ajax_ok(res)){ | ||
594 | + var item=res.data.data.pageData[0]; | ||
595 | + //拼团成功的判断 | ||
596 | + if(item.pt_status==1 || item.pt_status==2){ | ||
597 | + //支付支付,返回首页 | ||
598 | + ut.m_toast('支付成功'); | ||
599 | + setTimeout(()=>{ | ||
600 | + getApp().re_to("/pages/team/team_success/team_success?ordersn=" + th.data.ok_order_sn); | ||
601 | + },1000) | ||
602 | + | ||
603 | + }else{ | ||
604 | + //支付支付,返回首页 | ||
605 | + ut.m_toast('支付失败'); | ||
606 | + setTimeout(()=>{ | ||
607 | + getApp().goto("/pages/index/index/index"); | ||
608 | + },1000) | ||
609 | + } | ||
610 | + } | ||
611 | + }) | ||
612 | + }); | ||
613 | + | ||
614 | + } | ||
580 | 615 | ||
581 | - util_pay.set_fir(); | ||
582 | 616 | ||
583 | - var th = this; | ||
584 | if (th.data.isclose == 0) { | 617 | if (th.data.isclose == 0) { |
585 | wx.navigateTo({ | 618 | wx.navigateTo({ |
586 | url: "/pages/index/index/index" | 619 | url: "/pages/index/index/index" |
@@ -1339,6 +1372,7 @@ Page({ | @@ -1339,6 +1372,7 @@ Page({ | ||
1339 | // order_sn: data.data, | 1372 | // order_sn: data.data, |
1340 | // type:1, | 1373 | // type:1, |
1341 | // }, 1); | 1374 | // }, 1); |
1375 | + th.data.ok_order_sn=data.data; | ||
1342 | util_pay.pay(data.data, function () { | 1376 | util_pay.pay(data.data, function () { |
1343 | setTimeout(function () { | 1377 | setTimeout(function () { |
1344 | wx.reLaunch({ | 1378 | wx.reLaunch({ |
pages/cart/cart2_pt/cart2_pt.json renamed to packageE/pages/cart/cart2_pt/cart2_pt.json
pages/cart/cart2_pt/cart2_pt.wxml renamed to packageE/pages/cart/cart2_pt/cart2_pt.wxml
pages/cart/cart2_pt/cart2_pt.wxss renamed to packageE/pages/cart/cart2_pt/cart2_pt.wxss
packageE/pages/user/cardinfo/cardinfo.js
@@ -50,6 +50,9 @@ Page({ | @@ -50,6 +50,9 @@ Page({ | ||
50 | */ | 50 | */ |
51 | onLoad: function (options) { | 51 | onLoad: function (options) { |
52 | 52 | ||
53 | + //定义第一次进入 | ||
54 | + this.data.fir_in=1; | ||
55 | + | ||
53 | //--先判断会员状态-- | 56 | //--先判断会员状态-- |
54 | var user_info = getApp().globalData.userInfo; | 57 | var user_info = getApp().globalData.userInfo; |
55 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | 58 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
@@ -683,8 +686,50 @@ Page({ | @@ -683,8 +686,50 @@ Page({ | ||
683 | */ | 686 | */ |
684 | onShow: function () { | 687 | onShow: function () { |
685 | this.data.paying=0; | 688 | this.data.paying=0; |
686 | - ut.fy_back('',0); | ||
687 | - t_pay.set_fir(); | 689 | + var th=this; |
690 | + //判断是不是第一次进入 | ||
691 | + if(this.data.fir_in){ | ||
692 | + this.data.fir_in=0; | ||
693 | + }else{ | ||
694 | + //-- 富友支付插件的优化 -- | ||
695 | + ut.fy_back('',0); | ||
696 | + t_pay.set_fir(); | ||
697 | + | ||
698 | + //-- 通联的第三方支付的返回优化 -- | ||
699 | + ut.is_pay_ok(th.data.ok_order_sn,"func",'none',function (){ | ||
700 | + | ||
701 | + console.log('1111'); | ||
702 | + console.log(th.data.ok_order_sn); | ||
703 | + | ||
704 | + if(!th.data.ok_order_sn) return false; | ||
705 | + | ||
706 | + var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn; | ||
707 | + getApp().request.promiseGet(ck_url,{}).then(res=>{ | ||
708 | + if(res.data.code==0 && res.data.data){ | ||
709 | + | ||
710 | + var item=res.data.data; | ||
711 | + | ||
712 | + console.log('222'); | ||
713 | + console.log(item); | ||
714 | + | ||
715 | + if(item.pay_status==1){ | ||
716 | + //支付支付,返回首页 | ||
717 | + th.success(); //支付成功提示 | ||
718 | + }else{ | ||
719 | + //支付支付,返回首页 | ||
720 | + ut.m_toast('支付失败'); | ||
721 | + } | ||
722 | + } | ||
723 | + }) | ||
724 | + }, | ||
725 | + //支付成功后的提示 | ||
726 | + function (){ | ||
727 | + //-- 2就不提示俩遍 -- | ||
728 | + th.success(2); //支付成功提示 | ||
729 | + }); | ||
730 | + } | ||
731 | + | ||
732 | + | ||
688 | //同步初始化 | 733 | //同步初始化 |
689 | this.init(); | 734 | this.init(); |
690 | 735 | ||
@@ -748,10 +793,7 @@ Page({ | @@ -748,10 +793,7 @@ Page({ | ||
748 | 793 | ||
749 | //-----立即续费的功能------ | 794 | //-----立即续费的功能------ |
750 | xufei:async function(){ | 795 | xufei:async function(){ |
751 | - | ||
752 | - | ||
753 | - | ||
754 | - var th = this,is_card = 0,end_time=0; | 796 | + var th = this,is_card = 0,end_time=0; |
755 | await getApp().request.promiseGet("/store/storemoduleendtime/page?store_id="+os.stoid+"&type=3", | 797 | await getApp().request.promiseGet("/store/storemoduleendtime/page?store_id="+os.stoid+"&type=3", |
756 | {1:1}).then(res => { | 798 | {1:1}).then(res => { |
757 | if (ut.ajax_ok(res)) { | 799 | if (ut.ajax_ok(res)) { |
@@ -789,7 +831,6 @@ Page({ | @@ -789,7 +831,6 @@ Page({ | ||
789 | if(this.data.paying) return false; | 831 | if(this.data.paying) return false; |
790 | this.data.paying=1; | 832 | this.data.paying=1; |
791 | 833 | ||
792 | - | ||
793 | var item = th.data.user_card; | 834 | var item = th.data.user_card; |
794 | var req = {}; | 835 | var req = {}; |
795 | req.cardId = item.CardId; | 836 | req.cardId = item.CardId; |
@@ -801,7 +842,7 @@ Page({ | @@ -801,7 +842,7 @@ Page({ | ||
801 | t_pay.pay(req, th.success, function (e) { | 842 | t_pay.pay(req, th.success, function (e) { |
802 | th.data.paying=0; | 843 | th.data.paying=0; |
803 | getApp().my_warnning("支付失败", 0, th); | 844 | getApp().my_warnning("支付失败", 0, th); |
804 | - }); | 845 | + },th); |
805 | 846 | ||
806 | }, | 847 | }, |
807 | 848 | ||
@@ -810,7 +851,7 @@ Page({ | @@ -810,7 +851,7 @@ Page({ | ||
810 | this.data.paying=0; | 851 | this.data.paying=0; |
811 | if(ind==1){ | 852 | if(ind==1){ |
812 | getApp().my_warnning("升级成功",0,this); | 853 | getApp().my_warnning("升级成功",0,this); |
813 | - }else{ | 854 | + }else if(ind!=2){ |
814 | getApp().my_warnning("支付成功",0,this); | 855 | getApp().my_warnning("支付成功",0,this); |
815 | } | 856 | } |
816 | this.init(); | 857 | this.init(); |
@@ -872,7 +913,7 @@ Page({ | @@ -872,7 +913,7 @@ Page({ | ||
872 | t_pay.pay(req, th.success, function () { | 913 | t_pay.pay(req, th.success, function () { |
873 | th.data.paying=0; | 914 | th.data.paying=0; |
874 | getApp().my_warnning("支付失败", 0, th); | 915 | getApp().my_warnning("支付失败", 0, th); |
875 | - }); | 916 | + },th); |
876 | }, | 917 | }, |
877 | //显示弹出框 | 918 | //显示弹出框 |
878 | show_change:function () { this.setData({is_show_change_pop:1}); }, | 919 | show_change:function () { this.setData({is_show_change_pop:1}); }, |
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js
1 | var i = require("../../../../../utils/util.js"); | 1 | var i = require("../../../../../utils/util.js"); |
2 | +var ut=i; | ||
2 | var com = require("../public/buy_com.js"); | 3 | var com = require("../public/buy_com.js"); |
3 | var e = getApp(), | 4 | var e = getApp(), |
4 | a = e.globalData.setting, | 5 | a = e.globalData.setting, |
@@ -74,6 +75,9 @@ Page({ | @@ -74,6 +75,9 @@ Page({ | ||
74 | onLoad: function (options) { | 75 | onLoad: function (options) { |
75 | var th=this; | 76 | var th=this; |
76 | 77 | ||
78 | + //定义第一次进入 | ||
79 | + this.data.fir_in=1; | ||
80 | + | ||
77 | this.setData({ | 81 | this.setData({ |
78 | params: options, | 82 | params: options, |
79 | now:Date.parse(new Date()) / 1000, | 83 | now:Date.parse(new Date()) / 1000, |
@@ -143,10 +147,9 @@ Page({ | @@ -143,10 +147,9 @@ Page({ | ||
143 | onShow: function () { | 147 | onShow: function () { |
144 | var th=this; | 148 | var th=this; |
145 | this.setData({submit:0}) | 149 | this.setData({submit:0}) |
146 | - | ||
147 | - com.set_py_fir(); | 150 | + |
148 | getApp().check_can_share(); | 151 | getApp().check_can_share(); |
149 | - var th=this; | 152 | + |
150 | //--先判断会员状态-- | 153 | //--先判断会员状态-- |
151 | getApp().is_Single_page(this, function () { | 154 | getApp().is_Single_page(this, function () { |
152 | var user_info = getApp().globalData.userInfo; | 155 | var user_info = getApp().globalData.userInfo; |
@@ -164,23 +167,71 @@ Page({ | @@ -164,23 +167,71 @@ Page({ | ||
164 | }) | 167 | }) |
165 | this.init(); | 168 | this.init(); |
166 | 169 | ||
167 | - setTimeout(()=> { | ||
168 | - i.fy_back('', 0, function () { | 170 | + //判断是不是第一次进入 |
171 | + if(this.data.fir_in){ | ||
172 | + this.data.fir_in=0; | ||
173 | + }else{ | ||
174 | + //富友支付插件 | ||
175 | + com.set_py_fir(); | ||
176 | + | ||
177 | + setTimeout(() => { | ||
178 | + i.fy_back('', 0, function () { | ||
169 | 179 | ||
170 | - console.log(getApp().globalData.py_month_bg, '111111'); | ||
171 | - console.log(th.data.back_ord, '22222'); | 180 | + console.log(getApp().globalData.py_month_bg, '111111'); |
181 | + console.log(th.data.back_ord, '22222'); | ||
172 | 182 | ||
173 | - if (getApp().globalData.py_month_bg && th.data.back_ord) { | ||
174 | - getApp().globalData.fuyou_clear = 1; | ||
175 | - var b_ord = th.data.back_ord; | ||
176 | - com.reduce(b_ord, os.stoid); | ||
177 | - //要进行清空粗粒 | ||
178 | - getApp().globalData.py_month_bg = 0; | ||
179 | - th.data.back_ord = null; | 183 | + if (getApp().globalData.py_month_bg && th.data.back_ord) { |
184 | + getApp().globalData.fuyou_clear = 1; | ||
185 | + var b_ord = th.data.back_ord; | ||
186 | + com.reduce(b_ord, os.stoid); | ||
187 | + //要进行清空粗粒 | ||
188 | + getApp().globalData.py_month_bg = 0; | ||
189 | + th.data.back_ord = null; | ||
180 | 190 | ||
191 | + } | ||
192 | + }) | ||
193 | + | ||
194 | + | ||
195 | + if(th.data.back_ord){ | ||
196 | + var money = th.data.payMoney; | ||
197 | + var bk_url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + th.data.back_ord; | ||
198 | + //-- 通联的第三方支付的返回优化 -- | ||
199 | + ut.is_pay_ok(th.data.back_ord,bk_url, "none", function () { | ||
200 | + if (!th.data.back_ord) return false; | ||
201 | + //订单查询的接口 | ||
202 | + getApp().request.promiseGet("/api/weshop/marketing/marketingMonthgiftbagRecord/page", | ||
203 | + { | ||
204 | + data: { | ||
205 | + store_id: os.stoid, | ||
206 | + order_sn: th.data.back_ord, | ||
207 | + user_id: getApp().globalData.user_id | ||
208 | + } | ||
209 | + }).then(res => { | ||
210 | + if (ut.ajax_ok(res)) { | ||
211 | + | ||
212 | + var item = res.data.data.pageData[0]; | ||
213 | + if (item.pay_state == 1) { | ||
214 | + //支付支付,返回首页 | ||
215 | + ut.m_toast('支付成功'); | ||
216 | + th.data.back_ord=null; | ||
217 | + setTimeout(()=>{ | ||
218 | + getApp().goto(bk_url); | ||
219 | + },1500) | ||
220 | + | ||
221 | + } else { | ||
222 | + //支付支付,返回首页 | ||
223 | + ut.m_toast('支付失败'); | ||
224 | + } | ||
225 | + } | ||
226 | + }) | ||
227 | + }, null, null, 1); | ||
228 | + | ||
229 | + th.data.back_ord=null; | ||
181 | } | 230 | } |
182 | - }) | ||
183 | - },1000) | 231 | + |
232 | + | ||
233 | + }, 1000) | ||
234 | + } | ||
184 | }, | 235 | }, |
185 | //获取搜索门店输入的值 | 236 | //获取搜索门店输入的值 |
186 | input_store: function(e) { | 237 | input_store: function(e) { |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
@@ -83,6 +83,8 @@ Page({ | @@ -83,6 +83,8 @@ Page({ | ||
83 | sec_i:-1,//选中分类门店 下标 | 83 | sec_i:-1,//选中分类门店 下标 |
84 | }, | 84 | }, |
85 | onLoad: function (options) { | 85 | onLoad: function (options) { |
86 | + //定义第一次进入 | ||
87 | + this.data.fir_in=1; | ||
86 | 88 | ||
87 | var th = this; | 89 | var th = this; |
88 | console.log('分享参数---'); | 90 | console.log('分享参数---'); |
@@ -412,7 +414,10 @@ Page({ | @@ -412,7 +414,10 @@ Page({ | ||
412 | onShow: function () { | 414 | onShow: function () { |
413 | var th=this; | 415 | var th=this; |
414 | this.setData({submit:0}) | 416 | this.setData({submit:0}) |
415 | - com.set_py_fir(); | 417 | + |
418 | + //res = res.data.data.result; | ||
419 | + //if (!res) return false; | ||
420 | + | ||
416 | getApp().check_can_share(this); | 421 | getApp().check_can_share(this); |
417 | getApp().is_Single_page(this, function () { | 422 | getApp().is_Single_page(this, function () { |
418 | //--先判断会员状态-- | 423 | //--先判断会员状态-- |
@@ -429,25 +434,70 @@ Page({ | @@ -429,25 +434,70 @@ Page({ | ||
429 | } | 434 | } |
430 | }) | 435 | }) |
431 | 436 | ||
432 | - setTimeout(()=>{ | ||
433 | - ut.fy_back('',0,function (){ | ||
434 | - if(getApp().globalData.py_month_bg && th.data.back_ord){ | ||
435 | - getApp().globalData.fuyou_clear=1; | ||
436 | - var b_ord=th.data.back_ord; | ||
437 | - com.reduce(b_ord,os.stoid); | ||
438 | - //要进行清空粗粒 | ||
439 | - getApp().globalData.py_month_bg=0; | ||
440 | - th.data.back_ord=null; | ||
441 | 437 | ||
438 | + //判断是不是第一次进入 | ||
439 | + if(this.data.fir_in){ | ||
440 | + this.data.fir_in=0; | ||
441 | + }else { | ||
442 | + com.set_py_fir(); | ||
443 | + | ||
444 | + setTimeout(() => { | ||
445 | + ut.fy_back('', 0, function () { | ||
446 | + if (getApp().globalData.py_month_bg && th.data.back_ord) { | ||
447 | + getApp().globalData.fuyou_clear = 1; | ||
448 | + var b_ord = th.data.back_ord; | ||
449 | + com.reduce(b_ord, os.stoid); | ||
450 | + //要进行清空粗粒 | ||
451 | + getApp().globalData.py_month_bg = 0; | ||
452 | + th.data.back_ord = null; | ||
453 | + | ||
454 | + } | ||
455 | + }) | ||
456 | + | ||
457 | + | ||
458 | + if(th.data.back_ord){ | ||
459 | + | ||
460 | + var money=th.data.payMoney; | ||
461 | + var bk_url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + th.data.back_ord; | ||
462 | + //-- 通联的第三方支付的返回优化 -- | ||
463 | + ut.is_pay_ok(th.data.back_ord,bk_url,"none",function (){ | ||
464 | + if(!th.data.back_ord) return false; | ||
465 | + getApp().request.promiseGet("/api/weshop/marketing/marketingMonthgiftbagRecord/page", | ||
466 | + {data:{store_id:os.stoid,order_sn:th.data.back_ord,user_id:getApp().globalData.user_id}}).then(res=>{ | ||
467 | + | ||
468 | + if(ut.ajax_ok(res)){ | ||
469 | + var item=res.data.data.pageData[0]; | ||
470 | + if(item.pay_state==1){ | ||
471 | + //支付支付,返回首页 | ||
472 | + ut.m_toast('支付成功'); | ||
473 | + th.data.back_ord=null; | ||
474 | + setTimeout(()=>{ | ||
475 | + getApp().goto(bk_url); | ||
476 | + },1000) | ||
477 | + | ||
478 | + }else{ | ||
479 | + //支付支付,返回首页 | ||
480 | + ut.m_toast('支付失败'); | ||
481 | + setTimeout(()=>{ | ||
482 | + getApp().goto("/pages/index/index/index"); | ||
483 | + },1000) | ||
484 | + } | ||
485 | + } | ||
486 | + }) | ||
487 | + },null,null,1); | ||
488 | + | ||
489 | + th.data.back_ord=null; | ||
442 | } | 490 | } |
443 | - }) | ||
444 | - },1000) | 491 | + |
492 | + | ||
493 | + }, 1000) | ||
494 | + } | ||
445 | 495 | ||
446 | }, | 496 | }, |
447 | GetBuyPrice: function (e) { | 497 | GetBuyPrice: function (e) { |
448 | var that = this.data; | 498 | var that = this.data; |
449 | var th = this; | 499 | var th = this; |
450 | - let scene =this.data.scene; | 500 | + let scene=this.data.scene; |
451 | if (scene==1154) { | 501 | if (scene==1154) { |
452 | wx.navigateTo({ | 502 | wx.navigateTo({ |
453 | url: '/packageE/pages/togoin/togoin', | 503 | url: '/packageE/pages/togoin/togoin', |
pages/cart/cart_wk/cart_wk.js
@@ -60,6 +60,9 @@ Page({ | @@ -60,6 +60,9 @@ Page({ | ||
60 | */ | 60 | */ |
61 | onLoad: function (options) { | 61 | onLoad: function (options) { |
62 | 62 | ||
63 | + //定义第一次进入 | ||
64 | + this.data.fir_in=1; | ||
65 | + | ||
63 | //清空is_pick_up | 66 | //清空is_pick_up |
64 | getApp().request.put("/api/weshop/useraddress/updatePickUp", { | 67 | getApp().request.put("/api/weshop/useraddress/updatePickUp", { |
65 | data: { user_id: getApp().globalData.user_id, is_pickup: 0 }, | 68 | data: { user_id: getApp().globalData.user_id, is_pickup: 0 }, |
@@ -94,11 +97,47 @@ Page({ | @@ -94,11 +97,47 @@ Page({ | ||
94 | */ | 97 | */ |
95 | onShow: function () { | 98 | onShow: function () { |
96 | 99 | ||
97 | - ut.fy_back('',0); | ||
98 | - this.data.paying=0; | ||
99 | - util_pay.set_fir(); | ||
100 | - getApp().check_can_share(); | ||
101 | var th = this; | 100 | var th = this; |
101 | + //判断是不是第一次进入 | ||
102 | + if(this.data.fir_in){ | ||
103 | + this.data.fir_in=0; | ||
104 | + }else{ | ||
105 | + //-- 富友插件的优化 -- | ||
106 | + ut.fy_back('',0); | ||
107 | + this.data.paying=0; | ||
108 | + util_pay.set_fir(); | ||
109 | + | ||
110 | + //-- 通联的第三方支付的返回优化 -- | ||
111 | + ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=1&order_sn=" + this.data.ok_order_sn,'back',function (){ | ||
112 | + if(!th.data.ok_order_sn) return false; | ||
113 | + getApp().request.promiseGet("/api/weshop/order/page", | ||
114 | + {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | ||
115 | + | ||
116 | + if(ut.ajax_ok(res)){ | ||
117 | + var item=res.data.data.pageData[0]; | ||
118 | + //已经支付尾款,或者所有的会员都已经支付尾款 | ||
119 | + if(item.pt_status==4 || item.pt_status==5){ | ||
120 | + //支付支付,返回首页 | ||
121 | + ut.m_toast('支付成功'); | ||
122 | + setTimeout(()=>{ | ||
123 | + getApp().re_to("/pages/payment/pay_success/pay_success?type=1&order_sn=" + th.data.ok_order_sn); | ||
124 | + },1000) | ||
125 | + | ||
126 | + }else{ | ||
127 | + //支付支付,返回首页 | ||
128 | + ut.m_toast('支付失败'); | ||
129 | + setTimeout(()=>{ | ||
130 | + getApp().goto("/pages/index/index/index"); | ||
131 | + },1000) | ||
132 | + } | ||
133 | + } | ||
134 | + }) | ||
135 | + }); | ||
136 | + | ||
137 | + } | ||
138 | + | ||
139 | + getApp().check_can_share(); | ||
140 | + | ||
102 | if (th.data.isclose == 0) { | 141 | if (th.data.isclose == 0) { |
103 | wx.navigateTo({ | 142 | wx.navigateTo({ |
104 | url: "/pages/index/index/index" | 143 | url: "/pages/index/index/index" |
@@ -652,6 +691,8 @@ Page({ | @@ -652,6 +691,8 @@ Page({ | ||
652 | return false; | 691 | return false; |
653 | } | 692 | } |
654 | 693 | ||
694 | + //-- 把订单号记录起来 -- | ||
695 | + th.data.ok_order_sn=th.data.order.order_sn; | ||
655 | util_pay.pay_data(t,function (){ | 696 | util_pay.pay_data(t,function (){ |
656 | var allmoney = th.data.allpice; | 697 | var allmoney = th.data.allpice; |
657 | th.jumpPaymentPage(th.data.order.order_sn, allmoney); | 698 | th.jumpPaymentPage(th.data.order.order_sn, allmoney); |
pages/giftpack/buygiftpack/giftpackbuy.js
1 | var i = require("../../../utils/util.js"); | 1 | var i = require("../../../utils/util.js"); |
2 | +var ut=i; | ||
2 | var com = require("../public/buy_com.js"); | 3 | var com = require("../public/buy_com.js"); |
3 | var e = getApp(), | 4 | var e = getApp(), |
4 | a = e.globalData.setting, | 5 | a = e.globalData.setting, |
@@ -74,6 +75,9 @@ Page({ | @@ -74,6 +75,9 @@ Page({ | ||
74 | onLoad: function (options) { | 75 | onLoad: function (options) { |
75 | var th=this; | 76 | var th=this; |
76 | 77 | ||
78 | + //定义第一次进入 | ||
79 | + this.data.fir_in=1; | ||
80 | + | ||
77 | this.setData({ | 81 | this.setData({ |
78 | params: options, | 82 | params: options, |
79 | now:Date.parse(new Date()) / 1000, | 83 | now:Date.parse(new Date()) / 1000, |
@@ -143,10 +147,58 @@ Page({ | @@ -143,10 +147,58 @@ Page({ | ||
143 | onShow: function () { | 147 | onShow: function () { |
144 | 148 | ||
145 | this.setData({submit:0}) | 149 | this.setData({submit:0}) |
146 | - i.fy_back('',0); | ||
147 | - com.set_py_fir(); | ||
148 | - getApp().check_can_share(); | ||
149 | var th=this; | 150 | var th=this; |
151 | + | ||
152 | + //判断是不是第一次进入 | ||
153 | + if(this.data.fir_in){ | ||
154 | + this.data.fir_in=0; | ||
155 | + }else{ | ||
156 | + //富友支付插件 | ||
157 | + i.fy_back('',0); | ||
158 | + com.set_py_fir(); | ||
159 | + | ||
160 | + | ||
161 | + if(th.data.ok_order_sn){ | ||
162 | + //-- 通联的第三方支付的返回优化 -- | ||
163 | + var money=th.data.payMoney; | ||
164 | + var back_url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn; | ||
165 | + | ||
166 | + ut.is_pay_ok(th.data.ok_order_sn,back_url,'none',function (){ | ||
167 | + if(!th.data.ok_order_sn) return false; | ||
168 | + getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get", | ||
169 | + {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{ | ||
170 | + | ||
171 | + th.data.ok_order_sn=null; | ||
172 | + | ||
173 | + if(res.data.code==0 && res.data.data){ | ||
174 | + var item=res.data.data; | ||
175 | + if(item.payState==1){ | ||
176 | + //支付支付,返回首页 | ||
177 | + ut.m_toast('支付成功'); | ||
178 | + setTimeout(()=>{ | ||
179 | + getApp().goto(back_url); | ||
180 | + },1000) | ||
181 | + | ||
182 | + }else{ | ||
183 | + //支付支付,返回首页 | ||
184 | + ut.m_toast('支付失败'); | ||
185 | + } | ||
186 | + } | ||
187 | + }) | ||
188 | + },null,null,1); | ||
189 | + | ||
190 | + th.data.ok_order_sn=null; | ||
191 | + } | ||
192 | + | ||
193 | + | ||
194 | + | ||
195 | + | ||
196 | + } | ||
197 | + | ||
198 | + | ||
199 | + | ||
200 | + getApp().check_can_share(); | ||
201 | + | ||
150 | //--先判断会员状态-- | 202 | //--先判断会员状态-- |
151 | getApp().is_Single_page(this, function () { | 203 | getApp().is_Single_page(this, function () { |
152 | var user_info = getApp().globalData.userInfo; | 204 | var user_info = getApp().globalData.userInfo; |
pages/giftpack/giftpacklist/giftpacklist.js
@@ -82,6 +82,9 @@ Page({ | @@ -82,6 +82,9 @@ Page({ | ||
82 | }, | 82 | }, |
83 | onLoad: function (options) { | 83 | onLoad: function (options) { |
84 | 84 | ||
85 | + //定义第一次进入 | ||
86 | + this.data.fir_in=1; | ||
87 | + | ||
85 | var th = this; | 88 | var th = this; |
86 | 89 | ||
87 | this.setData({ | 90 | this.setData({ |
@@ -170,8 +173,48 @@ Page({ | @@ -170,8 +173,48 @@ Page({ | ||
170 | 173 | ||
171 | onShow: function () { | 174 | onShow: function () { |
172 | this.setData({submit:0}) | 175 | this.setData({submit:0}) |
173 | - ut.fy_back('',0); | ||
174 | - com.set_py_fir(); | 176 | + |
177 | + var th=this; | ||
178 | + //判断是不是第一次进入 | ||
179 | + if(this.data.fir_in){ | ||
180 | + this.data.fir_in=0; | ||
181 | + }else{ | ||
182 | + //富友支付插件的判断 | ||
183 | + ut.fy_back('',0); | ||
184 | + com.set_py_fir(); | ||
185 | + | ||
186 | + if(th.data.ok_order_sn){ | ||
187 | + //-- 通联的第三方支付的返回优化 -- | ||
188 | + var money=th.data.payMoney; | ||
189 | + var back_url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn; | ||
190 | + ut.is_pay_ok(th.data.ok_order_sn,back_url,'none',function (){ | ||
191 | + if(!th.data.ok_order_sn) return false; | ||
192 | + getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get", | ||
193 | + {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{ | ||
194 | + | ||
195 | + th.data.ok_order_sn=null; | ||
196 | + if(res.data.code==0 && res.data.data){ | ||
197 | + var item=res.data.data; | ||
198 | + if(item.payState==1){ | ||
199 | + //支付支付,返回首页 | ||
200 | + ut.m_toast('支付成功'); | ||
201 | + setTimeout(()=>{ | ||
202 | + getApp().goto(back_url); | ||
203 | + },1000) | ||
204 | + | ||
205 | + }else{ | ||
206 | + //支付支付,返回首页 | ||
207 | + ut.m_toast('支付失败'); | ||
208 | + } | ||
209 | + } | ||
210 | + }) | ||
211 | + },null,null,1); | ||
212 | + th.data.ok_order_sn=null; | ||
213 | + } | ||
214 | + | ||
215 | + } | ||
216 | + | ||
217 | + | ||
175 | getApp().check_can_share(this); | 218 | getApp().check_can_share(this); |
176 | getApp().is_Single_page(this, function () { | 219 | getApp().is_Single_page(this, function () { |
177 | //--先判断会员状态-- | 220 | //--先判断会员状态-- |
pages/giftpack/public/buy_com.js
@@ -251,9 +251,6 @@ module.exports = { | @@ -251,9 +251,6 @@ module.exports = { | ||
251 | function (res) { | 251 | function (res) { |
252 | if (res.data.code == 0 && res.data.data) { | 252 | if (res.data.code == 0 && res.data.data) { |
253 | 253 | ||
254 | - | ||
255 | - | ||
256 | - | ||
257 | switch(that.data.buyType){ | 254 | switch(that.data.buyType){ |
258 | case 1://立即兑换 | 255 | case 1://立即兑换 |
259 | var order_sn = res.data.data; | 256 | var order_sn = res.data.data; |
@@ -266,6 +263,7 @@ module.exports = { | @@ -266,6 +263,7 @@ module.exports = { | ||
266 | case 2://立即购买 | 263 | case 2://立即购买 |
267 | 264 | ||
268 | var order_sn = res.data.data.orderSn; | 265 | var order_sn = res.data.data.orderSn; |
266 | + that.data.ok_order_sn=order_sn; | ||
269 | 267 | ||
270 | var money=that.data.payMoney; | 268 | var money=that.data.payMoney; |
271 | var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; | 269 | var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; |
pages/goods/goodsInfo/goodsInfo.js
@@ -911,7 +911,7 @@ Page({ | @@ -911,7 +911,7 @@ Page({ | ||
911 | 911 | ||
912 | //-- 要清空,因为有回退。优惠促的数组,购买数量要清理成1 -- | 912 | //-- 要清空,因为有回退。优惠促的数组,购买数量要清理成1 -- |
913 | this.data.cx_prom_group=[]; | 913 | this.data.cx_prom_group=[]; |
914 | - this.data.goodsInputNum=1; | 914 | + this.setData({goodsInputNum:1}); |
915 | 915 | ||
916 | var goods_list = null, | 916 | var goods_list = null, |
917 | th = this, | 917 | th = this, |
@@ -3986,6 +3986,7 @@ Page({ | @@ -3986,6 +3986,7 @@ Page({ | ||
3986 | em.data.data = {}; | 3986 | em.data.data = {}; |
3987 | em.data.data.total = new_list.length; | 3987 | em.data.data.total = new_list.length; |
3988 | em.data.data.pageData = new_list; | 3988 | em.data.data.pageData = new_list; |
3989 | + em.his_cate_num=e.his_cate_num; | ||
3989 | 3990 | ||
3990 | 3991 | ||
3991 | //--如果找到默认门店,同时也应该判断配送方式对不对-- | 3992 | //--如果找到默认门店,同时也应该判断配送方式对不对-- |
@@ -5307,7 +5308,7 @@ Page({ | @@ -5307,7 +5308,7 @@ Page({ | ||
5307 | buyNow_pt: function (e) { | 5308 | buyNow_pt: function (e) { |
5308 | s.set_b_now(e); | 5309 | s.set_b_now(e); |
5309 | wx.navigateTo({ | 5310 | wx.navigateTo({ |
5310 | - url: "/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + e.goods_id, | 5311 | + url: "/packageE/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + e.goods_id, |
5311 | }); | 5312 | }); |
5312 | }, | 5313 | }, |
5313 | 5314 |
pages/index/index/index.json
@@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
9 | "searchbox":"/components/diy_searchbox/diy_searchbox", | 9 | "searchbox":"/components/diy_searchbox/diy_searchbox", |
10 | "shopname": "/components/diy_shopname/diy_shopname", | 10 | "shopname": "/components/diy_shopname/diy_shopname", |
11 | "pingd_buy": "/components/diy_pingd_buy/diy_pingd_buy", | 11 | "pingd_buy": "/components/diy_pingd_buy/diy_pingd_buy", |
12 | + "div_public": "/components/diy_public/diy_public", | ||
12 | "title": "/components/diy_title/diy_title", | 13 | "title": "/components/diy_title/diy_title", |
13 | "notice": "/components/diy_notice/diy_notice", | 14 | "notice": "/components/diy_notice/diy_notice", |
14 | "voice": "/components/diy_voice/diy_voice", | 15 | "voice": "/components/diy_voice/diy_voice", |
pages/index/index/index.wxml
@@ -480,6 +480,9 @@ | @@ -480,6 +480,9 @@ | ||
480 | <block wx:if="{{item.ename=='pingd_buy'}}"> | 480 | <block wx:if="{{item.ename=='pingd_buy'}}"> |
481 | <pingd_buy object="{{item.content}}"></pingd_buy> | 481 | <pingd_buy object="{{item.content}}"></pingd_buy> |
482 | </block> | 482 | </block> |
483 | + <block wx:if="{{item.ename=='pingd_buyNew'}}"> | ||
484 | + <div_public object="{{item.content}}" prom_type="6"></div_public> | ||
485 | + </block> | ||
483 | <!--秒杀--> | 486 | <!--秒杀--> |
484 | <block wx:if="{{item.ename=='seckill' || item.ename=='seckillNew'}}"> | 487 | <block wx:if="{{item.ename=='seckill' || item.ename=='seckillNew'}}"> |
485 | <seckill object="{{item.content}}"></seckill> | 488 | <seckill object="{{item.content}}"></seckill> |
pages/team/team_show/team_show.js
@@ -850,7 +850,7 @@ Page({ | @@ -850,7 +850,7 @@ Page({ | ||
850 | 850 | ||
851 | s.set_b_now(newd); | 851 | s.set_b_now(newd); |
852 | wx.navigateTo({ | 852 | wx.navigateTo({ |
853 | - url: "/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + th.data.goods.goods_id, | 853 | + url: "/packageE/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + th.data.goods.goods_id, |
854 | }); | 854 | }); |
855 | }); | 855 | }); |
856 | }, | 856 | }, |
pages/template/index.json
@@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
11 | "searchbox":"/components/diy_searchbox/diy_searchbox", | 11 | "searchbox":"/components/diy_searchbox/diy_searchbox", |
12 | "shopname": "/components/diy_shopname/diy_shopname", | 12 | "shopname": "/components/diy_shopname/diy_shopname", |
13 | "pingd_buy": "/components/diy_pingd_buy/diy_pingd_buy", | 13 | "pingd_buy": "/components/diy_pingd_buy/diy_pingd_buy", |
14 | + "diy_public": "/components/diy_public/diy_public", | ||
14 | "title": "/components/diy_title/diy_title", | 15 | "title": "/components/diy_title/diy_title", |
15 | "notice": "/components/diy_notice/diy_notice", | 16 | "notice": "/components/diy_notice/diy_notice", |
16 | "voice": "/components/diy_voice/diy_voice", | 17 | "voice": "/components/diy_voice/diy_voice", |
pages/template/index.wxml
@@ -37,6 +37,9 @@ | @@ -37,6 +37,9 @@ | ||
37 | <block wx:if="{{item.ename=='pingd_buy'}}"> | 37 | <block wx:if="{{item.ename=='pingd_buy'}}"> |
38 | <pingd_buy object="{{item.content}}"></pingd_buy> | 38 | <pingd_buy object="{{item.content}}"></pingd_buy> |
39 | </block> | 39 | </block> |
40 | + <block wx:if="{{item.ename=='pingd_buyNew'}}"> | ||
41 | + <diy_public object="{{item.content}}" prom_type="6"></diy_public> | ||
42 | + </block> | ||
40 | <!--秒杀--> | 43 | <!--秒杀--> |
41 | <block wx:if="{{item.ename=='seckill' || item.ename=='seckillNew'}}"> | 44 | <block wx:if="{{item.ename=='seckill' || item.ename=='seckillNew'}}"> |
42 | <seckill object="{{item.content}}"></seckill> | 45 | <seckill object="{{item.content}}"></seckill> |
pages/user/order_detail/order_detail.js
@@ -16,6 +16,9 @@ Page({ | @@ -16,6 +16,9 @@ Page({ | ||
16 | }, | 16 | }, |
17 | onLoad: function(e) { | 17 | onLoad: function(e) { |
18 | 18 | ||
19 | + //定义第一次进入 | ||
20 | + this.data.fir_in=1; | ||
21 | + | ||
19 | var th=this; | 22 | var th=this; |
20 | var r = void 0 !== e.isGoup && e.isGoup; | 23 | var r = void 0 !== e.isGoup && e.isGoup; |
21 | 24 | ||
@@ -64,9 +67,44 @@ Page({ | @@ -64,9 +67,44 @@ Page({ | ||
64 | }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update"); | 67 | }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update"); |
65 | }, | 68 | }, |
66 | onShow: function() { | 69 | onShow: function() { |
67 | - ut.fy_back('',0) | 70 | + |
71 | + var th=this; | ||
68 | this.setData({paying:0}); | 72 | this.setData({paying:0}); |
69 | - py.set_fir(); | 73 | + |
74 | + //判断是不是第一次进入 | ||
75 | + if(this.data.fir_in){ | ||
76 | + this.data.fir_in=0; | ||
77 | + }else{ | ||
78 | + //富友支付 | ||
79 | + ut.fy_back('',0) | ||
80 | + py.set_fir(); | ||
81 | + | ||
82 | + //通联第三方 | ||
83 | + //-- 通联的第三方支付的返回优化 -- | ||
84 | + ut.is_pay_ok(th.data.ok_order_sn,"back","none",function (){ | ||
85 | + getApp().request.promiseGet("/api/weshop/order/page", | ||
86 | + {data:{store_id:os.stoid,order_sn:th.data.ok_order_sn}}).then(res=>{ | ||
87 | + if(ut.ajax_ok(res)){ | ||
88 | + var item=res.data.data.pageData[0]; | ||
89 | + if(item.pay_status==1){ | ||
90 | + //支付支付,返回首页 | ||
91 | + ut.m_toast('支付成功'); | ||
92 | + setTimeout(()=>{ | ||
93 | + wx.navigateBack(); | ||
94 | + },1000) | ||
95 | + | ||
96 | + }else{ | ||
97 | + //支付支付,返回首页 | ||
98 | + ut.m_toast('支付失败'); | ||
99 | + setTimeout(()=>{ | ||
100 | + wx.navigateBack(); | ||
101 | + },1000) | ||
102 | + } | ||
103 | + } | ||
104 | + }) | ||
105 | + }); | ||
106 | + } | ||
107 | + | ||
70 | wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"), | 108 | wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"), |
71 | this.requestOrderDetail(this.data.order.order_id)); | 109 | this.requestOrderDetail(this.data.order.order_id)); |
72 | }, | 110 | }, |
@@ -544,7 +582,6 @@ Page({ | @@ -544,7 +582,6 @@ Page({ | ||
544 | }) | 582 | }) |
545 | 583 | ||
546 | if (presellList) { | 584 | if (presellList) { |
547 | - | ||
548 | if (good.goods_num > presellList.presell_sumqty - presellList.buy_goodnum) { | 585 | if (good.goods_num > presellList.presell_sumqty - presellList.buy_goodnum) { |
549 | var content = good.goods_name + '购买数量超出商品库存,请取消订单'; | 586 | var content = good.goods_name + '购买数量超出商品库存,请取消订单'; |
550 | th.toast(content); | 587 | th.toast(content); |
@@ -1132,6 +1169,7 @@ Page({ | @@ -1132,6 +1169,7 @@ Page({ | ||
1132 | } | 1169 | } |
1133 | 1170 | ||
1134 | 1171 | ||
1172 | + th.data.ok_order_sn=this.data.order.order_sn; | ||
1135 | py.pay(this.data.order.order_sn, function() { | 1173 | py.pay(this.data.order.order_sn, function() { |
1136 | th.setData({paying:0}); | 1174 | th.setData({paying:0}); |
1137 | wx.showToast({title: '支付成功'}) | 1175 | wx.showToast({title: '支付成功'}) |
pages/user/order_list/order_list.js
@@ -244,182 +244,191 @@ Page({ | @@ -244,182 +244,191 @@ Page({ | ||
244 | 244 | ||
245 | th.setData({ is_get: 1 }); | 245 | th.setData({ is_get: 1 }); |
246 | var data = e.data.orderList; | 246 | var data = e.data.orderList; |
247 | - data.forEach(async function (item, ind) { | ||
248 | - var tt = null; | ||
249 | - await getApp().request.promiseGet('/api/weshop/ordergoods/list', { | ||
250 | - data: { order_id: item.order_id, store_id: os.stoid, pageSize: 600 }, | ||
251 | - }).then(res => { | ||
252 | - tt = res; | ||
253 | - }) | ||
254 | - var glist = tt.data.data.pageData; | ||
255 | - for (var i in glist) { | ||
256 | - if (glist[i].is_gift) { | ||
257 | - data[ind].is_prom = 1; | ||
258 | - } | ||
259 | - } | ||
260 | 247 | ||
261 | - data[ind]['ord_url'] = '/pages/user/order_detail/order_detail'; | ||
262 | - //-- 如果是优惠活动 -- | ||
263 | - if (glist[0].prom_type == 8) { | ||
264 | - await getApp().request.promiseGet('/api/weshop/order/orderPresell/get/' + os.stoid + '/' + item.order_id, { | 248 | + //-- 如果有值的时候 -- |
249 | + if(data && data.length){ | ||
250 | + data.forEach(async function (item, ind) { | ||
251 | + var tt = null; | ||
252 | + await getApp().request.promiseGet('/api/weshop/ordergoods/list', { | ||
253 | + data: { order_id: item.order_id, store_id: os.stoid, pageSize: 600 }, | ||
265 | }).then(res => { | 254 | }).then(res => { |
266 | - if (res.data.code == 0) { | ||
267 | - data[ind]['presell'] = res.data.data; | ||
268 | - data[ind]['ord_url'] = '/packageC/pages/presell/cart/cart'; | ||
269 | - } | 255 | + tt = res; |
270 | }) | 256 | }) |
271 | - } | ||
272 | - // 如果是幸运购活动 | ||
273 | - if (glist[0].prom_type == 9) { | ||
274 | - await getApp().request.promiseGet('/api/weshop/prom/luckyOrder/list', { | ||
275 | - data: { | ||
276 | - store_id: os.stoid, | ||
277 | - user_id: oo.user_id, | ||
278 | - order_id: item.order_id, | 257 | + var glist = tt.data.data.pageData; |
258 | + for (var i in glist) { | ||
259 | + if (glist[i].is_gift) { | ||
260 | + data[ind].is_prom = 1; | ||
279 | } | 261 | } |
280 | - }).then(res => { | ||
281 | - if (res.data.code == 0) { | ||
282 | - // console.log('luckyGo+++++++++>>>', res.data.data); | ||
283 | - // data[ind]['team_status'] = res.data.data[0]['team_status']; | ||
284 | - if (res.data.data[0] && res.data.data[0]['team_status']) { | ||
285 | - data[ind]['team_status'] = res.data.data[0]['team_status']; | ||
286 | - } else { | ||
287 | - data[ind]['team_status'] = 0; | ||
288 | - }; | 262 | + } |
289 | 263 | ||
290 | - // data[ind]['ord_url']='/packageC/pages/presell/cart/cart'; | 264 | + data[ind]['ord_url'] = '/pages/user/order_detail/order_detail'; |
265 | + //-- 如果是优惠活动 -- | ||
266 | + if (glist[0].prom_type == 8) { | ||
267 | + await getApp().request.promiseGet('/api/weshop/order/orderPresell/get/' + os.stoid + '/' + item.order_id, { | ||
268 | + }).then(res => { | ||
269 | + if (res.data.code == 0) { | ||
270 | + data[ind]['presell'] = res.data.data; | ||
271 | + data[ind]['ord_url'] = '/packageC/pages/presell/cart/cart'; | ||
272 | + } | ||
273 | + }) | ||
274 | + } | ||
275 | + // 如果是幸运购活动 | ||
276 | + if (glist[0].prom_type == 9) { | ||
277 | + await getApp().request.promiseGet('/api/weshop/prom/luckyOrder/list', { | ||
278 | + data: { | ||
279 | + store_id: os.stoid, | ||
280 | + user_id: oo.user_id, | ||
281 | + order_id: item.order_id, | ||
282 | + } | ||
283 | + }).then(res => { | ||
284 | + if (res.data.code == 0) { | ||
285 | + // console.log('luckyGo+++++++++>>>', res.data.data); | ||
286 | + // data[ind]['team_status'] = res.data.data[0]['team_status']; | ||
287 | + if (res.data.data[0] && res.data.data[0]['team_status']) { | ||
288 | + data[ind]['team_status'] = res.data.data[0]['team_status']; | ||
289 | + } else { | ||
290 | + data[ind]['team_status'] = 0; | ||
291 | + }; | ||
292 | + | ||
293 | + // data[ind]['ord_url']='/packageC/pages/presell/cart/cart'; | ||
294 | + } | ||
295 | + }) | ||
296 | + } | ||
297 | + //------------对比一下有没有退款记录------------ | ||
298 | + await getApp().request.promiseGet("/api/weshop/order/returngoods/page", { | ||
299 | + data: { | ||
300 | + order_id: item.order_id, store_id: os.stoid, | ||
301 | + user_id: oo.user_id, pageSize: 20 | ||
291 | } | 302 | } |
292 | - }) | ||
293 | - } | ||
294 | - //------------对比一下有没有退款记录------------ | ||
295 | - await getApp().request.promiseGet("/api/weshop/order/returngoods/page", { | ||
296 | - data: { | ||
297 | - order_id: item.order_id, store_id: os.stoid, | ||
298 | - user_id: oo.user_id, pageSize: 20 | ||
299 | - } | ||
300 | - }).then(rs => { | ||
301 | - var ttd = rs; | ||
302 | - //--看一下订单的总数量-- | ||
303 | - var gtype_num = tt.data.data.total; | ||
304 | - if (ttd.data.data.pageData == undefined) return false; | ||
305 | - var goodslist = tt.data.data.pageData; | ||
306 | - | ||
307 | - //----没有相关的退款记录---- | ||
308 | - if (ttd.data.data.total == 0) { | ||
309 | - data[ind]['is_all_return'] = 0; | ||
310 | - goodslist.forEach(function (ee, ii) { | ||
311 | - if (data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1 && gtype_num > 1) { | ||
312 | - item.goodslist = goodslist; | ||
313 | - if (th.check_for_return_btn(item)) { | ||
314 | - goodslist[ii]['return_btn'] = 1; | 303 | + }).then(rs => { |
304 | + var ttd = rs; | ||
305 | + //--看一下订单的总数量-- | ||
306 | + var gtype_num = tt.data.data.total; | ||
307 | + if (ttd.data.data.pageData == undefined) return false; | ||
308 | + var goodslist = tt.data.data.pageData; | ||
309 | + | ||
310 | + //----没有相关的退款记录---- | ||
311 | + if (ttd.data.data.total == 0) { | ||
312 | + data[ind]['is_all_return'] = 0; | ||
313 | + goodslist.forEach(function (ee, ii) { | ||
314 | + if (data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1 && gtype_num > 1) { | ||
315 | + item.goodslist = goodslist; | ||
316 | + if (th.check_for_return_btn(item)) { | ||
317 | + goodslist[ii]['return_btn'] = 1; | ||
318 | + } | ||
315 | } | 319 | } |
316 | - } | ||
317 | 320 | ||
318 | - }); | ||
319 | - } else { | ||
320 | - //--------整单退-------- | ||
321 | - if (ttd.data.data.pageData[0]['goods_id_list'] != null | ||
322 | - && ttd.data.data.pageData[0]['goods_id_list'] != '') { | ||
323 | - var eea = ttd.data.data.pageData[0]; | ||
324 | - //1.退款正在进行中, | ||
325 | - //2.退款被拒绝就要显示可以退款 | ||
326 | - //3.退款已经完成 | ||
327 | - data[ind]['is_all_return'] = 1; | ||
328 | - data[ind]['is_all_return_status'] = ttd.data.data.pageData[0].status; | ||
329 | - | ||
330 | - if (data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) { | ||
331 | - switch (eea.status) { | ||
332 | - case 0: | ||
333 | - case 1: | ||
334 | - data[ind]['return_btn'] = 2; | ||
335 | - break; | ||
336 | - case 2: | ||
337 | - data[ind]['return_btn'] = 4; | ||
338 | - break; | ||
339 | - case 3: | ||
340 | - data[ind]['return_btn'] = 3; | ||
341 | - break; | ||
342 | - default: | ||
343 | - data[ind]['return_btn'] = 0; | ||
344 | - } | ||
345 | - } | 321 | + }); |
346 | } else { | 322 | } else { |
347 | - //1.退款正在进行中, | ||
348 | - //2.退款被拒绝就要显示可以退款 | ||
349 | - //3.退款已经完成 | ||
350 | - data[ind]['is_all_return'] = 0; | ||
351 | - var rt_ok_num = 0; | ||
352 | - //if(data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) { | ||
353 | - goodslist.forEach(function (eeb, iii) { | ||
354 | - if (data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) | ||
355 | - goodslist[iii]['return_btn'] = 1; //申请退款 | ||
356 | - ttd.data.data.pageData.forEach(function (eea, ii) { | ||
357 | - var st = eea.status; | ||
358 | - if (eea.goods_id == eeb.goods_id) { | ||
359 | - switch (eea.status) { | ||
360 | - case 0: | ||
361 | - case 1://退款处理中 | ||
362 | - data[ind]['has_rt'] = 1; //有部分退 | ||
363 | - goodslist[iii]['return_btn'] = 2; | ||
364 | - break; | ||
365 | - case 2://退款完成 | ||
366 | - data[ind]['has_rt'] = 1; //有部分退 | ||
367 | - goodslist[iii]['return_btn'] = 4; | ||
368 | - rt_ok_num++; | ||
369 | - break; | ||
370 | - case 3://已拒绝,重新退款 | ||
371 | - goodslist[iii]['return_btn'] = 3; | ||
372 | - break; | ||
373 | - default: | ||
374 | - if (data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) | ||
375 | - goodslist[iii]['return_btn'] = 1; //申请退款 | ||
376 | - } | ||
377 | - return; | 323 | + //--------整单退-------- |
324 | + if (ttd.data.data.pageData[0]['goods_id_list'] != null | ||
325 | + && ttd.data.data.pageData[0]['goods_id_list'] != '') { | ||
326 | + var eea = ttd.data.data.pageData[0]; | ||
327 | + //1.退款正在进行中, | ||
328 | + //2.退款被拒绝就要显示可以退款 | ||
329 | + //3.退款已经完成 | ||
330 | + data[ind]['is_all_return'] = 1; | ||
331 | + data[ind]['is_all_return_status'] = ttd.data.data.pageData[0].status; | ||
332 | + | ||
333 | + if (data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) { | ||
334 | + switch (eea.status) { | ||
335 | + case 0: | ||
336 | + case 1: | ||
337 | + data[ind]['return_btn'] = 2; | ||
338 | + break; | ||
339 | + case 2: | ||
340 | + data[ind]['return_btn'] = 4; | ||
341 | + break; | ||
342 | + case 3: | ||
343 | + data[ind]['return_btn'] = 3; | ||
344 | + break; | ||
345 | + default: | ||
346 | + data[ind]['return_btn'] = 0; | ||
378 | } | 347 | } |
348 | + } | ||
349 | + } else { | ||
350 | + //1.退款正在进行中, | ||
351 | + //2.退款被拒绝就要显示可以退款 | ||
352 | + //3.退款已经完成 | ||
353 | + data[ind]['is_all_return'] = 0; | ||
354 | + var rt_ok_num = 0; | ||
355 | + //if(data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) { | ||
356 | + goodslist.forEach(function (eeb, iii) { | ||
357 | + if (data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) | ||
358 | + goodslist[iii]['return_btn'] = 1; //申请退款 | ||
359 | + ttd.data.data.pageData.forEach(function (eea, ii) { | ||
360 | + var st = eea.status; | ||
361 | + if (eea.goods_id == eeb.goods_id) { | ||
362 | + switch (eea.status) { | ||
363 | + case 0: | ||
364 | + case 1://退款处理中 | ||
365 | + data[ind]['has_rt'] = 1; //有部分退 | ||
366 | + goodslist[iii]['return_btn'] = 2; | ||
367 | + break; | ||
368 | + case 2://退款完成 | ||
369 | + data[ind]['has_rt'] = 1; //有部分退 | ||
370 | + goodslist[iii]['return_btn'] = 4; | ||
371 | + rt_ok_num++; | ||
372 | + break; | ||
373 | + case 3://已拒绝,重新退款 | ||
374 | + goodslist[iii]['return_btn'] = 3; | ||
375 | + break; | ||
376 | + default: | ||
377 | + if (data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) | ||
378 | + goodslist[iii]['return_btn'] = 1; //申请退款 | ||
379 | + } | ||
380 | + return; | ||
381 | + } | ||
382 | + }); | ||
379 | }); | 383 | }); |
380 | - }); | ||
381 | - //} | 384 | + //} |
385 | + } | ||
382 | } | 386 | } |
383 | - } | ||
384 | 387 | ||
385 | - //--如果是全部退款,也就可以删除-- | ||
386 | - if (rt_ok_num == goodslist.length) { | ||
387 | - data[ind]['is_all_return_status'] = 2; | ||
388 | - } | 388 | + //--如果是全部退款,也就可以删除-- |
389 | + if (rt_ok_num == goodslist.length) { | ||
390 | + data[ind]['is_all_return_status'] = 2; | ||
391 | + } | ||
389 | 392 | ||
390 | 393 | ||
391 | - data[ind]['order_goods'] = goodslist; | ||
392 | - var g_num = 0; | ||
393 | - goodslist.forEach(function (ee, ii) { | ||
394 | - if (ee.return_btn != 4) | ||
395 | - g_num += ee.goods_num; | ||
396 | - }); | ||
397 | - data[ind]['g_num'] = g_num; | ||
398 | - }) | 394 | + data[ind]['order_goods'] = goodslist; |
395 | + var g_num = 0; | ||
396 | + goodslist.forEach(function (ee, ii) { | ||
397 | + if (ee.return_btn != 4) | ||
398 | + g_num += ee.goods_num; | ||
399 | + }); | ||
400 | + data[ind]['g_num'] = g_num; | ||
401 | + }) | ||
399 | 402 | ||
400 | 403 | ||
401 | - data[ind].use_commission = 0; | ||
402 | - //-- 如果有数据的话 -- | ||
403 | - await getApp().request.promiseGet("/api/weshop/orderMore/get/" + os.stoid + "/" + item.order_sn, { | 404 | + data[ind].use_commission = 0; |
405 | + //-- 如果有数据的话 -- | ||
406 | + await getApp().request.promiseGet("/api/weshop/orderMore/get/" + os.stoid + "/" + item.order_sn, { | ||
407 | + | ||
408 | + }).then(res => { | ||
409 | + if (res.data.code == 0 && res.data.data) { | ||
410 | + data[ind].use_commission = res.data.data.use_commission; | ||
411 | + data[ind].pre_cut = res.data.data.pre_cut; //是否使用预存,如果是使用预存不能单品退,只能整单退 | ||
412 | + data[ind].pre_json = res.data.data.pre_json; //是否使用预存,如果是使用预存不能单品退,只能整单退 | ||
413 | + } | ||
414 | + }) | ||
404 | 415 | ||
405 | - }).then(res => { | ||
406 | - if (res.data.code == 0 && res.data.data) { | ||
407 | - data[ind].use_commission = res.data.data.use_commission; | ||
408 | - data[ind].pre_cut = res.data.data.pre_cut; //是否使用预存,如果是使用预存不能单品退,只能整单退 | ||
409 | - data[ind].pre_json = res.data.data.pre_json; //是否使用预存,如果是使用预存不能单品退,只能整单退 | ||
410 | - } | ||
411 | - }) | ||
412 | 416 | ||
417 | + th.setData({ orderList: data, }); | ||
413 | 418 | ||
414 | - th.setData({ orderList: data, }); | 419 | + wx.hideLoading(); |
415 | 420 | ||
421 | + }); | ||
422 | + e.data.currentPage++, wx.stopPullDownRefresh(); | ||
423 | + } | ||
424 | + else { | ||
425 | + //直接关闭加载中的动画 | ||
416 | wx.hideLoading(); | 426 | wx.hideLoading(); |
427 | + } | ||
428 | + | ||
417 | 429 | ||
418 | - }); | ||
419 | 430 | ||
420 | 431 | ||
421 | - e.data.currentPage++, | ||
422 | - wx.stopPullDownRefresh(); | ||
423 | }, null, { store_id: os.stoid, user_id: oo.user_id }); | 432 | }, null, { store_id: os.stoid, user_id: oo.user_id }); |
424 | }, | 433 | }, |
425 | 434 |
pages/user/plus/plus.js
@@ -56,8 +56,11 @@ Page({ | @@ -56,8 +56,11 @@ Page({ | ||
56 | * 生命周期函数--监听页面加载 | 56 | * 生命周期函数--监听页面加载 |
57 | */ | 57 | */ |
58 | onLoad: function (options) { | 58 | onLoad: function (options) { |
59 | - var that = this, | ||
60 | - th = that; | 59 | + |
60 | + //定义第一次进入 | ||
61 | + this.data.fir_in=1; | ||
62 | + | ||
63 | + var that = this,th = that; | ||
61 | var store_id = getApp().globalData.setting.stoid; | 64 | var store_id = getApp().globalData.setting.stoid; |
62 | //获取用户设备信息,屏幕宽度 | 65 | //获取用户设备信息,屏幕宽度 |
63 | wx.getSystemInfo({ | 66 | wx.getSystemInfo({ |
@@ -130,17 +133,58 @@ Page({ | @@ -130,17 +133,58 @@ Page({ | ||
130 | onShow: function () { | 133 | onShow: function () { |
131 | var user_info = getApp().globalData.userInfo; | 134 | var user_info = getApp().globalData.userInfo; |
132 | if (!user_info) return false; | 135 | if (!user_info) return false; |
133 | - ut.fy_back('',0); | 136 | + |
137 | + var th = this,that = th; | ||
138 | + | ||
139 | + //判断是不是第一次进入 | ||
140 | + if(this.data.fir_in){ | ||
141 | + this.data.fir_in=0; | ||
142 | + }else{ | ||
143 | + //富友插件支付 | ||
144 | + ut.fy_back('',0); | ||
145 | + t_pay.set_fir(); | ||
146 | + //-- 通联的第三方支付的返回优化 -- | ||
147 | + ut.is_pay_ok(th.data.ok_order_sn,"func","func",function (){ | ||
148 | + | ||
149 | + if(!th.data.ok_order_sn) return false; | ||
150 | + var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn; | ||
151 | + getApp().request.promiseGet(ck_url,{}).then(res=>{ | ||
152 | + | ||
153 | + if(res.data.code==0 && res.data.data){ | ||
154 | + var item=res.data.data; | ||
155 | + if(item.pay_status==1){ | ||
156 | + //支付支付,返回首页 | ||
157 | + th.success() | ||
158 | + | ||
159 | + }else{ | ||
160 | + //支付支付,返回首页 | ||
161 | + getApp().my_warnning('支付失败', 0, th); | ||
162 | + th.setData({ | ||
163 | + is_select:0, | ||
164 | + focus:true, | ||
165 | + }) | ||
166 | + } | ||
167 | + } | ||
168 | + }) | ||
169 | + }, //成功的回调 | ||
170 | + function (){ | ||
171 | + th.success(); | ||
172 | + },//失败的回调 | ||
173 | + function (){ | ||
174 | + th.setData({ | ||
175 | + is_select:0, | ||
176 | + focus:true, | ||
177 | + }) | ||
178 | + | ||
179 | + }); | ||
180 | + } | ||
134 | 181 | ||
135 | this.setData({ | 182 | this.setData({ |
136 | is_select:0, | 183 | is_select:0, |
137 | focus:true, | 184 | focus:true, |
138 | }) | 185 | }) |
139 | - t_pay.set_fir(); | ||
140 | 186 | ||
141 | - var th = this, | ||
142 | - that = th, | ||
143 | - app_d = getApp().globalData; | 187 | + var app_d = getApp().globalData; |
144 | var store_id = os.stoid; | 188 | var store_id = os.stoid; |
145 | var fir_leader = this.data.fir_leader; | 189 | var fir_leader = this.data.fir_leader; |
146 | 190 | ||
@@ -196,9 +240,9 @@ Page({ | @@ -196,9 +240,9 @@ Page({ | ||
196 | var userInfo = e.data.data; | 240 | var userInfo = e.data.data; |
197 | if (userInfo['card_field'] && !getApp().globalData.is_card_back) { | 241 | if (userInfo['card_field'] && !getApp().globalData.is_card_back) { |
198 | var u_url = "/packageE/pages/user/cardinfo/cardinfo"; | 242 | var u_url = "/packageE/pages/user/cardinfo/cardinfo"; |
199 | - wx.reLaunch({ | ||
200 | - url: u_url | ||
201 | - }) | 243 | + // wx.reLaunch({ |
244 | + // url: u_url | ||
245 | + // }) | ||
202 | } | 246 | } |
203 | }, | 247 | }, |
204 | }); | 248 | }); |
@@ -476,7 +520,7 @@ Page({ | @@ -476,7 +520,7 @@ Page({ | ||
476 | is_select:0, | 520 | is_select:0, |
477 | focus:true, | 521 | focus:true, |
478 | }) | 522 | }) |
479 | - }); | 523 | + },th); |
480 | } | 524 | } |
481 | }, | 525 | }, |
482 | //返回会员页面 | 526 | //返回会员页面 |
@@ -506,13 +550,12 @@ Page({ | @@ -506,13 +550,12 @@ Page({ | ||
506 | t_pay.set_pay_url('/api/weshop/plus/create/plus/order'); | 550 | t_pay.set_pay_url('/api/weshop/plus/create/plus/order'); |
507 | t_pay.pay(req, th.success, function (msg) { | 551 | t_pay.pay(req, th.success, function (msg) { |
508 | if(!msg) msg="支付失败"; | 552 | if(!msg) msg="支付失败"; |
509 | - | ||
510 | getApp().my_warnning(msg, 0, th); | 553 | getApp().my_warnning(msg, 0, th); |
511 | th.setData({ | 554 | th.setData({ |
512 | is_select:0, | 555 | is_select:0, |
513 | focus:true, | 556 | focus:true, |
514 | }) | 557 | }) |
515 | - }); | 558 | + },th); |
516 | } | 559 | } |
517 | } else { | 560 | } else { |
518 | getApp().my_warnning(res.data.msg, 0, th); | 561 | getApp().my_warnning(res.data.msg, 0, th); |
utils/pay.js
@@ -49,6 +49,9 @@ module.exports = { | @@ -49,6 +49,9 @@ module.exports = { | ||
49 | wx.hideLoading(); | 49 | wx.hideLoading(); |
50 | if(t.data.code==0){ | 50 | if(t.data.code==0){ |
51 | 51 | ||
52 | + | ||
53 | + var is_pos_pay=t.data.data.is_pos_pay; | ||
54 | + //-- 富有的插件支付 -- | ||
52 | if(t.data.data.is_fuioupay){ | 55 | if(t.data.data.is_fuioupay){ |
53 | const plugin = requirePlugin('fuiou-pay') | 56 | const plugin = requirePlugin('fuiou-pay') |
54 | getApp().globalData.no_clear=1; | 57 | getApp().globalData.no_clear=1; |
@@ -84,12 +87,26 @@ module.exports = { | @@ -84,12 +87,26 @@ module.exports = { | ||
84 | },1000) | 87 | },1000) |
85 | 88 | ||
86 | }) | 89 | }) |
90 | + } | ||
91 | + //-- 通联的支付插件 -- | ||
92 | + else if(is_pos_pay){ | ||
93 | + | ||
94 | + var p_data=t.data.data; | ||
95 | + delete p_data.is_pos_pay; //清理掉,不然签名不通过 | ||
96 | + wx.openEmbeddedMiniProgram({ | ||
97 | + appId: 'wxef277996acc166c3', | ||
98 | + extraData: p_data, | ||
99 | + fail(){ | ||
100 | + //-- 取消不支付 -- | ||
101 | + i.wx_paying=0; | ||
102 | + "function" == typeof a && a(); | ||
103 | + } | ||
104 | + }) | ||
105 | + | ||
87 | }else{ | 106 | }else{ |
88 | i.weixinPay(t.data.data, e, a); | 107 | i.weixinPay(t.data.data, e, a); |
89 | } | 108 | } |
90 | 109 | ||
91 | - | ||
92 | - | ||
93 | }else{ | 110 | }else{ |
94 | i.wx_paying=0; | 111 | i.wx_paying=0; |
95 | getApp().confirmBox(t.data.msg); | 112 | getApp().confirmBox(t.data.msg); |
@@ -125,6 +142,7 @@ module.exports = { | @@ -125,6 +142,7 @@ module.exports = { | ||
125 | fail('支付参数错误'); | 142 | fail('支付参数错误'); |
126 | return false; | 143 | return false; |
127 | } | 144 | } |
145 | + //富友插件的优化 | ||
128 | if(ob.is_fuioupay){ | 146 | if(ob.is_fuioupay){ |
129 | const plugin = requirePlugin('fuiou-pay') | 147 | const plugin = requirePlugin('fuiou-pay') |
130 | 148 | ||
@@ -150,7 +168,24 @@ module.exports = { | @@ -150,7 +168,24 @@ module.exports = { | ||
150 | fail(msg) | 168 | fail(msg) |
151 | 169 | ||
152 | }) | 170 | }) |
153 | - }else { | 171 | + } |
172 | + //-- 通联的支付插件 -- | ||
173 | + else if(ob.is_pos_pay){ | ||
174 | + | ||
175 | + var p_data=t.data.data; | ||
176 | + delete p_data.is_pos_pay; //清理掉,不然签名不通过 | ||
177 | + wx.openEmbeddedMiniProgram({ | ||
178 | + appId: 'wxef277996acc166c3', | ||
179 | + extraData: p_data, | ||
180 | + fail(){ | ||
181 | + //-- 取消不支付 -- | ||
182 | + i.wx_paying=0; | ||
183 | + "function" == typeof a && a(); | ||
184 | + } | ||
185 | + }) | ||
186 | + | ||
187 | + } | ||
188 | + else { | ||
154 | this.weixinPay(ob, succ, fail); | 189 | this.weixinPay(ob, succ, fail); |
155 | } | 190 | } |
156 | }, | 191 | }, |
utils/pay2.js
@@ -10,7 +10,8 @@ module.exports = { | @@ -10,7 +10,8 @@ module.exports = { | ||
10 | this.wx_paying=0; | 10 | this.wx_paying=0; |
11 | }, | 11 | }, |
12 | //-- createRechargeOrder create/plus/order -- | 12 | //-- createRechargeOrder create/plus/order -- |
13 | - pay: function(dd, succ,fail) { | 13 | + // get_order是通联专用,获取订单号 |
14 | + pay: function(dd, succ,fail,th) { | ||
14 | if(this.wx_paying) return false; | 15 | if(this.wx_paying) return false; |
15 | this.wx_paying=1; | 16 | this.wx_paying=1; |
16 | wx.showLoading(); | 17 | wx.showLoading(); |
@@ -24,6 +25,7 @@ module.exports = { | @@ -24,6 +25,7 @@ module.exports = { | ||
24 | "function" == typeof succ && succ(1); | 25 | "function" == typeof succ && succ(1); |
25 | }else{ | 26 | }else{ |
26 | 27 | ||
28 | + var is_pos_pay=t.data.data.is_pos_pay; | ||
27 | if(t.data.data.is_fuioupay){ | 29 | if(t.data.data.is_fuioupay){ |
28 | const plugin = requirePlugin('fuiou-pay') | 30 | const plugin = requirePlugin('fuiou-pay') |
29 | getApp().globalData.no_clear=1; | 31 | getApp().globalData.no_clear=1; |
@@ -51,6 +53,32 @@ module.exports = { | @@ -51,6 +53,32 @@ module.exports = { | ||
51 | fail(msg) | 53 | fail(msg) |
52 | i.wx_paying=0; | 54 | i.wx_paying=0; |
53 | }) | 55 | }) |
56 | + } | ||
57 | + //-- 通联的支付插件 -- | ||
58 | + else if(is_pos_pay){ | ||
59 | + var p_data=t.data.data; | ||
60 | + delete p_data.is_pos_pay; //清理掉,不然签名不通过 | ||
61 | + | ||
62 | + if(th){ | ||
63 | + | ||
64 | + var ordno=p_data.reqsn; | ||
65 | + if(ordno.indexOf('_')){ | ||
66 | + var str_arr=ordno.split('_'); | ||
67 | + ordno=str_arr[0]; | ||
68 | + } | ||
69 | + th.data.ok_order_sn=ordno; | ||
70 | + } | ||
71 | + | ||
72 | + wx.openEmbeddedMiniProgram({ | ||
73 | + appId: 'wxef277996acc166c3', | ||
74 | + extraData: p_data, | ||
75 | + fail(){ | ||
76 | + | ||
77 | + //-- 取消不支付 -- | ||
78 | + i.wx_paying=0; | ||
79 | + "function" == typeof fail && fail('取消支付'); | ||
80 | + } | ||
81 | + }) | ||
54 | }else { | 82 | }else { |
55 | i.weixinPay(t.data.data, succ, fail); | 83 | i.weixinPay(t.data.data, succ, fail); |
56 | } | 84 | } |
@@ -75,9 +103,11 @@ module.exports = { | @@ -75,9 +103,11 @@ module.exports = { | ||
75 | }, | 103 | }, |
76 | 104 | ||
77 | //-- 这里是专享礼包的调用 -- | 105 | //-- 这里是专享礼包的调用 -- |
78 | - pay_data:function (t,succ,fail){ | 106 | + pay_data:function (t,succ,fail,get_order){ |
79 | var th=this; | 107 | var th=this; |
80 | var ob=t.data.data.result; | 108 | var ob=t.data.data.result; |
109 | + this.wx_paying=1; | ||
110 | + | ||
81 | if(!ob){ | 111 | if(!ob){ |
82 | this.set_fir(); | 112 | this.set_fir(); |
83 | fail('支付参数错误'); | 113 | fail('支付参数错误'); |
@@ -113,7 +143,28 @@ module.exports = { | @@ -113,7 +143,28 @@ module.exports = { | ||
113 | fail(msg) | 143 | fail(msg) |
114 | 144 | ||
115 | }) | 145 | }) |
116 | - }else { | 146 | + } |
147 | + | ||
148 | + //-- 通联的支付插件 -- | ||
149 | + else if(ob.is_pos_pay){ | ||
150 | + var p_data=ob; | ||
151 | + delete p_data.is_pos_pay; //清理掉,不然签名不通过 | ||
152 | + if(get_order){ | ||
153 | + get_order(p_data.reqsn); //把单号返回 | ||
154 | + } | ||
155 | + | ||
156 | + wx.openEmbeddedMiniProgram({ | ||
157 | + appId: 'wxef277996acc166c3', | ||
158 | + extraData: p_data, | ||
159 | + fail(){ | ||
160 | + //-- 取消不支付 -- | ||
161 | + th.wx_paying=0; | ||
162 | + "function" == typeof a && a(); | ||
163 | + } | ||
164 | + }) | ||
165 | + } | ||
166 | + | ||
167 | + else { | ||
117 | this.weixinPay(ob, succ, fail); | 168 | this.weixinPay(ob, succ, fail); |
118 | } | 169 | } |
119 | }, | 170 | }, |
utils/util.js
@@ -799,7 +799,7 @@ module.exports = { | @@ -799,7 +799,7 @@ module.exports = { | ||
799 | return false | 799 | return false |
800 | }, | 800 | }, |
801 | 801 | ||
802 | - //优惠促销的数据的格式话 | 802 | + //-- 优惠促销的数据的格式话 -- |
803 | format_yh_act(fir_act){ | 803 | format_yh_act(fir_act){ |
804 | var more_arr = []; | 804 | var more_arr = []; |
805 | if(fir_act){ | 805 | if(fir_act){ |
@@ -874,6 +874,109 @@ module.exports = { | @@ -874,6 +874,109 @@ module.exports = { | ||
874 | } | 874 | } |
875 | return more_arr | 875 | return more_arr |
876 | }, | 876 | }, |
877 | + | ||
878 | + //-- 长的提示框 -- | ||
879 | + m_toast(txt){ | ||
880 | + wx.showToast({ | ||
881 | + title: txt, | ||
882 | + icon: 'none', | ||
883 | + duration: 2500 | ||
884 | + }) | ||
885 | + }, | ||
886 | + //-- 支付的结果判断是不是完成了,通联支付pos收银的返回 -- | ||
887 | + /** | ||
888 | + * @param ok_order_sn 判断是不是有支付过 | ||
889 | + * @param back_url 如果是地址,就跳转,如果是back,就返回。如果是func,就是要回调 | ||
890 | + * @param err_url 如果是地址,就跳转,如果是back,就返回。如果是func,就是要回调,如果是none,就没有反应,提示而已 | ||
891 | + * @param func 因为是物理键的返回,所以要调用结果,查询结果 | ||
892 | + * @param success //成功的回调函数, 当back_url是func | ||
893 | + * @param fail //失败的回调函数, 当err_url是func | ||
894 | + * @param is_navigateTo //跳转的页面是不是要is_re_to | ||
895 | + */ | ||
896 | + is_pay_ok(ok_order_sn,back_url,err_url,func,success,fail,is_navigateTo){ | ||
897 | + | ||
898 | + if(!ok_order_sn) { | ||
899 | + return false; | ||
900 | + } | ||
901 | + if(!err_url){ | ||
902 | + err_url="/pages/index/index/index"; | ||
903 | + } | ||
904 | + //-- getEnterOptionsSync的信息会一直存在,很恶心 -- | ||
905 | + let options = wx.getEnterOptionsSync(); | ||
906 | + | ||
907 | + console.log("is_pay_ok"); | ||
908 | + console.log(options); | ||
909 | + | ||
910 | + if (options.scene == '1038' && options.referrerInfo.appId=='wxef277996acc166c3') { | ||
911 | + let extraData = options.referrerInfo.extraData; | ||
912 | + if (!extraData) { | ||
913 | + if(func) func(); | ||
914 | + } else { | ||
915 | + // "支付成功"; | ||
916 | + if (extraData.code == 'success') { | ||
917 | + this.m_toast("支付成功") | ||
918 | + //支付失败 | ||
919 | + setTimeout(function () { | ||
920 | + if(back_url=='back') { | ||
921 | + wx.navigateBack(); | ||
922 | + } | ||
923 | + else if(back_url=='func'){ | ||
924 | + success(); | ||
925 | + } | ||
926 | + else if(back_url!='none'){ | ||
927 | + | ||
928 | + if(is_navigateTo){ | ||
929 | + getApp().goto(back_url) //跳到tabbar页 | ||
930 | + }else{ | ||
931 | + wx.redirectTo({ url: back_url}); | ||
932 | + } | ||
933 | + | ||
934 | + | ||
935 | + } | ||
936 | + },2000) | ||
937 | + } | ||
938 | + // "支付已取消"; | ||
939 | + else if (extraData.code == 'cancel') { | ||
940 | + this.m_toast("取消支付") | ||
941 | + | ||
942 | + console.log('err_url-11'); | ||
943 | + console.log(err_url); | ||
944 | + | ||
945 | + //支付失败 | ||
946 | + setTimeout(function () { | ||
947 | + if(err_url=='back'){ | ||
948 | + wx.navigateBack(); | ||
949 | + } | ||
950 | + else if(err_url=='func'){ | ||
951 | + fail(); | ||
952 | + } | ||
953 | + else if(err_url!='none'){ | ||
954 | + if(is_navigateTo){ | ||
955 | + getApp.goto({ url: err_url, }) //跳到tabbar页 | ||
956 | + }else { | ||
957 | + wx.redirectTo({ url: err_url}); | ||
958 | + } | ||
959 | + } | ||
960 | + | ||
961 | + },2000) | ||
962 | + } | ||
963 | + // "支付失败:" + extraData.errmsg; | ||
964 | + else { | ||
965 | + this.m_toast("支付失败:" + extraData.errmsg) | ||
966 | + //支付失败 | ||
967 | + setTimeout(function () { | ||
968 | + if(err_url=='back'){ | ||
969 | + wx.navigateBack(); | ||
970 | + }else{ | ||
971 | + getApp().goto(err_url); | ||
972 | + } | ||
973 | + },2000) | ||
974 | + } | ||
975 | + | ||
976 | + } | ||
977 | + | ||
978 | + } | ||
979 | + }, | ||
877 | 980 | ||
878 | unserialize: unserialize, | 981 | unserialize: unserialize, |
879 | _throttle:_throttle, | 982 | _throttle:_throttle, |