Merged
Merge Request #590 · created by 后端研发-苏明海


Test


From test into qa

Merged by 后端研发-苏明海

1 participants






app.js
@@ -178,7 +178,7 @@ App({ @@ -178,7 +178,7 @@ App({
178 success: function (o) { 178 success: function (o) {
179 console.log('getwuliu'); 179 console.log('getwuliu');
180 console.log(o); 180 console.log(o);
181 - if (o.data.code == 0) { 181 + if (o.data.code == 0 && o.data.data && o.data.data.pageData && o.data.data.pageData.length>0) {
182 var arr = o.data.data.pageData; 182 var arr = o.data.data.pageData;
183 console.log(arr); 183 console.log(arr);
184 arr.forEach(function(item,index){ 184 arr.forEach(function(item,index){
app.json
1 { 1 {
2 "pages": [ 2 "pages": [
3 "pages/index/index/index", 3 "pages/index/index/index",
4 - "pages/justTest/justTest",  
5 "pages/goods/categoryList/categoryList", 4 "pages/goods/categoryList/categoryList",
6 "pages/cart/cart/cart", 5 "pages/cart/cart/cart",
7 "pages/cart/cart2/cart2", 6 "pages/cart/cart2/cart2",
@@ -86,11 +85,18 @@ @@ -86,11 +85,18 @@
86 "pages/video/index", 85 "pages/video/index",
87 "pages/template/index", 86 "pages/template/index",
88 "pages/store/index", 87 "pages/store/index",
89 - "pages/user/choice_guide/choice_guide" 88 + "pages/user/choice_guide/choice_guide",
  89 + "pages/cart/cart2_inte/cart2_inte",
  90 + "pages/giftpack/festival/festival",
  91 + "pages/team/team_more/team_more",
  92 + "pages/user/collect_list/collect_list",
  93 + "pages/user/deposit/deposit",
  94 + "pages/user/deposit/prepaid/msg/msg",
  95 + "pages/user/deposit/prepaid/prepaid"
90 ], 96 ],
91 "plugins": { 97 "plugins": {
92 "live-player-plugin": { 98 "live-player-plugin": {
93 - "version": "1.1.1", 99 + "version": "1.2.1",
94 "provider": "wx2b03c6e691cd7370" 100 "provider": "wx2b03c6e691cd7370"
95 } 101 }
96 }, 102 },
components/diy_goodsGroup/diy_goodsGroup.js
@@ -112,7 +112,7 @@ Component({ @@ -112,7 +112,7 @@ Component({
112 }, 112 },
113 113
114 pageLifetimes: { 114 pageLifetimes: {
115 - //游客登后,只要更新卡的情况 115 + //游客登后,只要更新卡的情况
116 show: function () { 116 show: function () {
117 //--初始化卡类-- 117 //--初始化卡类--
118 this.card_init(); 118 this.card_init();
components/diy_pingd_buy/diy_pingd_buy.js
@@ -69,7 +69,7 @@ Component({ @@ -69,7 +69,7 @@ Component({
69 69
70 //如果拼单的数组为空的时候 70 //如果拼单的数组为空的时候
71 var goodslist=res.data.data; 71 var goodslist=res.data.data;
72 - if(goodslist.length==0) return false; 72 + if(!goodslist || goodslist.length==0) return false;
73 73
74 /*--商品队列按照添加的顺序排列--*/ 74 /*--商品队列按照添加的顺序排列--*/
75 g_id.forEach(function(val, ind) { 75 g_id.forEach(function(val, ind) {
components/diy_seckill/diy_seckill.js
@@ -65,7 +65,7 @@ Component({ @@ -65,7 +65,7 @@ Component({
65 //如果秒杀的数组为空的时候 65 //如果秒杀的数组为空的时候
66 66
67 var goodslist=res.data.data; 67 var goodslist=res.data.data;
68 - if(goodslist.length==0) return false; 68 + if(!goodslist || goodslist.length==0) return false;
69 69
70 // 判断火热,预热 70 // 判断火热,预热
71 var newTime = ut.gettimestamp(); 71 var newTime = ut.gettimestamp();
components/diy_service/diy_service.wxml
1 <!--有在线客户 和 打电话--> 1 <!--有在线客户 和 打电话-->
2 <block wx:if="{{sys_switch.weapp_customertype}}"> 2 <block wx:if="{{sys_switch.weapp_customertype}}">
3 - <!-- 判断是不是有登 --> 3 + <!-- 判断是不是有登 -->
4 <view wx:if="{{userInfo}}" class="custom-service" bindtap="go_user" > 4 <view wx:if="{{userInfo}}" class="custom-service" bindtap="go_user" >
5 <view style="text-align: center;"> 5 <view style="text-align: center;">
6 <image class="cs-img" src="{{object.img}}"></image> 6 <image class="cs-img" src="{{object.img}}"></image>
components/diy_shopname/diy_shopname.js
@@ -27,15 +27,21 @@ Component({ @@ -27,15 +27,21 @@ Component({
27 //--所有商品-- 27 //--所有商品--
28 getApp().request.promiseGet("/api/weshop/goods/page/", 28 getApp().request.promiseGet("/api/weshop/goods/page/",
29 {data:{ isonsale: 1, store_id: o.stoid,page:1,pageSize:1}}).then(res => { 29 {data:{ isonsale: 1, store_id: o.stoid,page:1,pageSize:1}}).then(res => {
30 - var total=res.data.data.total;  
31 - th.setData({total:total}) 30 +
  31 + if(res.data.code==0 && res.data.data){
  32 + var total=res.data.data.total;
  33 + th.setData({total:total})
  34 + }
32 }) 35 })
33 36
34 //--所有新品-- 37 //--所有新品--
35 getApp().request.promiseGet("/api/weshop/goods/page/", 38 getApp().request.promiseGet("/api/weshop/goods/page/",
36 {data:{is_new:1,isonsale: 1, store_id: o.stoid,page:1,pageSize:1}}).then(res => { 39 {data:{is_new:1,isonsale: 1, store_id: o.stoid,page:1,pageSize:1}}).then(res => {
37 - var total=res.data.data.total;  
38 - th.setData({new_total:total}) 40 + if(res.data.code==0 && res.data.data)
  41 + {
  42 + var total = res.data.data.total;
  43 + th.setData({new_total: total})
  44 + }
39 }) 45 })
40 46
41 }, 47 },
components/diy_shopname/diy_shopname.wxml
@@ -3,18 +3,20 @@ @@ -3,18 +3,20 @@
3 <view class="big"> 3 <view class="big">
4 4
5 <view class="big_picture_border"> 5 <view class="big_picture_border">
6 - <image class="big_picture" src='{{object.srcimg}}' binderror="berror" data-err="object.srcimg"></image> 6 + <image mode="widthFix" style="display: block;" class="big_picture" src='{{object.srcimg}}' binderror="berror" data-err="object.srcimg"></image>
7 </view> 7 </view>
8 <block wx:if="{{object.style==1}}"> 8 <block wx:if="{{object.style==1}}">
9 9
10 - <view class="big_border"> 10 + <view style="position: relative; height: 150rpx;">
  11 + <view class="big_border" >
11 <view class="circle"> 12 <view class="circle">
12 <view class="border"> 13 <view class="border">
13 - <image class="wxd_ww" src='{{sto}}' bindtap="go_user"></image> 14 + <image class="wxd_ww" src='{{sto}}' bindtap="go_user"></image>
14 </view> 15 </view>
15 </view> 16 </view>
16 <view class="font">{{store_name}}</view> 17 <view class="font">{{store_name}}</view>
17 </view> 18 </view>
  19 + </view>
18 20
19 <view class="all_view"> 21 <view class="all_view">
20 <view class="v_item" bindtap="go_all_wares"> 22 <view class="v_item" bindtap="go_all_wares">
@@ -36,8 +38,7 @@ @@ -36,8 +38,7 @@
36 </view> 38 </view>
37 </block> 39 </block>
38 40
39 -  
40 - <block wx:else="{{object.style==2}}"> 41 + <block wx:if="{{object.style==2}}">
41 <view class="big_border_two"> 42 <view class="big_border_two">
42 <view class="circle_tow"> 43 <view class="circle_tow">
43 <view class="border"> 44 <view class="border">
@@ -48,35 +49,38 @@ @@ -48,35 +49,38 @@
48 <view class="fonts">{{store_name}}</view> 49 <view class="fonts">{{store_name}}</view>
49 </view> 50 </view>
50 </view> 51 </view>
51 - <view class="base_font">  
52 - <view class="arrange">  
53 - <view class="base_font_one">  
54 - <navigator url="/pages/goods/goodsList/goodsList" class="navi">  
55 - <view>{{total}}</view>  
56 - <view>全部商品</view>  
57 - </navigator>  
58 - </view>  
59 -  
60 - <view class="base_font_one">  
61 - <view class="shuxian">|</view>  
62 - <navigator url="/pages/goods/goodsList/goodsList?is_new=1" class="navi">  
63 - <view>{{new_total}}</view>  
64 - <view>上新商品</view>  
65 - </navigator>  
66 - </view>  
67 -  
68 - <view class="base_font_one" bindtap="go_user">  
69 - <view class="shuxian">|</view>  
70 - <view class="navi">  
71 - <view >  
72 - <image class="user_pictrue_two" src='{{imghost}}/miniapp/images/numb.png'></image>  
73 - </view>  
74 - <view>个人中心</view>  
75 - </view>  
76 - </view>  
77 - </view>  
78 - </view>  
79 </block> 52 </block>
80 </view> 53 </view>
  54 +
  55 + <block wx:if="{{object.style==2}}">
  56 + <view class="base_font">
  57 + <view class="arrange">
  58 + <view class="base_font_one">
  59 + <navigator url="/pages/goods/goodsList/goodsList" class="navi">
  60 + <view>{{total}}</view>
  61 + <view>全部商品</view>
  62 + </navigator>
  63 + </view>
  64 +
  65 + <view class="base_font_one">
  66 + <view class="shuxian">|</view>
  67 + <navigator url="/pages/goods/goodsList/goodsList?is_new=1" class="navi">
  68 + <view>{{new_total}}</view>
  69 + <view>上新商品</view>
  70 + </navigator>
  71 + </view>
  72 +
  73 + <view class="base_font_one" bindtap="go_user">
  74 + <view class="shuxian">|</view>
  75 + <view class="navi">
  76 + <view >
  77 + <image class="user_pictrue_two" src='{{imghost}}/miniapp/images/numb.png'></image>
  78 + </view>
  79 + <view>个人中心</view>
  80 + </view>
  81 + </view>
  82 + </view>
  83 + </view>
  84 + </block>
81 </view> 85 </view>
82 86
components/diy_shopname/diy_shopname.wxss
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 text-align:center; 4 text-align:center;
5 margin:0 auto; 5 margin:0 auto;
6 position: relative; 6 position: relative;
7 - height: 500rpx; 7 + /* height: 500rpx; */
8 } 8 }
9 9
10 .s1_gk_a1{ 10 .s1_gk_a1{
@@ -15,11 +15,9 @@ @@ -15,11 +15,9 @@
15 15
16 /* 圆形小图片 */ 16 /* 圆形小图片 */
17 .wxd_ww { 17 .wxd_ww {
18 - width: 126rpx;  
19 - height: 126rpx; 18 + width: 100%;
  19 + height: 100%;
20 /* justify-content: center; */ 20 /* justify-content: center; */
21 - margin-top: 20rpx;  
22 - margin-left: 6rpx;  
23 } 21 }
24 22
25 /* 小图片圆边框 */ 23 /* 小图片圆边框 */
@@ -43,8 +41,8 @@ @@ -43,8 +41,8 @@
43 /* 设置小图片外面的view的宽高 */ 41 /* 设置小图片外面的view的宽高 */
44 42
45 .circle_tow .border { 43 .circle_tow .border {
46 - width: 140rpx;  
47 - height: 140rpx; 44 + width: 100%;
  45 + height: 100%;
48 } 46 }
49 47
50 /* 小图片最大外边框 */ 48 /* 小图片最大外边框 */
@@ -52,7 +50,7 @@ @@ -52,7 +50,7 @@
52 .big_border { 50 .big_border {
53 width: 192rpx; 51 width: 192rpx;
54 height: 214rpx; 52 height: 214rpx;
55 - position: relative; 53 + position: absolute;
56 top: -82rpx; 54 top: -82rpx;
57 left: 10px; 55 left: 10px;
58 } 56 }
@@ -69,7 +67,7 @@ @@ -69,7 +67,7 @@
69 67
70 .big_picture_border { 68 .big_picture_border {
71 width: 100%; 69 width: 100%;
72 - height: 320rpx; 70 + /* height: 320rpx; */
73 } 71 }
74 72
75 73
@@ -140,9 +138,10 @@ left:-116rpx; @@ -140,9 +138,10 @@ left:-116rpx;
140 .big_border_two { 138 .big_border_two {
141 width: 100%; 139 width: 100%;
142 height: 260rpx; 140 height: 260rpx;
143 - position: relative;  
144 - top: -274rpx; 141 + position: absolute;
  142 + top: -130rpx;
145 text-align: center; 143 text-align: center;
  144 + margin-top: 50%;
146 } 145 }
147 146
148 /* 小图片2圆边框 */ 147 /* 小图片2圆边框 */
@@ -189,7 +188,6 @@ left:-116rpx; @@ -189,7 +188,6 @@ left:-116rpx;
189 width: 100%; 188 width: 100%;
190 height: 120rpx; 189 height: 120rpx;
191 position: relative; 190 position: relative;
192 - top: -250rpx;  
193 } 191 }
194 /* 使里面的view纵向排列 */ 192 /* 使里面的view纵向排列 */
195 .arrange{ 193 .arrange{
@@ -223,11 +221,11 @@ left:-116rpx; @@ -223,11 +221,11 @@ left:-116rpx;
223 } 221 }
224 .wai_zwp{ 222 .wai_zwp{
225 background-color: white; 223 background-color: white;
226 - height: 500rpx; 224 + /* height: 500rpx; */
227 } 225 }
228 226
229 .shopname_title_size{ font-size: 34rpx} 227 .shopname_title_size{ font-size: 34rpx}
230 -.big .all_view{display: flex; width: 500rpx; position:absolute; bottom:90rpx;right: 0 } 228 +.big .all_view{display: flex; width: 500rpx; position:absolute; bottom:rpx;right: 0 }
231 .big .all_view .v_item{width:33%; } 229 .big .all_view .v_item{width:33%; }
232 230
233 .big_border_two .title_center{ display: flex; justify-content: center;} 231 .big_border_two .title_center{ display: flex; justify-content: center;}
components/goods_list/goods_list.js
@@ -24,7 +24,7 @@ Component({ @@ -24,7 +24,7 @@ Component({
24 ready: function () { 24 ready: function () {
25 }, 25 },
26 pageLifetimes:{ 26 pageLifetimes:{
27 - //要处理一下,游客登后的界面的变化,主要还该是改变会员 27 + //要处理一下,游客登后的界面的变化,主要还该是改变会员
28 show: function () { 28 show: function () {
29 this.init(); 29 this.init();
30 } 30 }
@@ -151,6 +151,16 @@ Component({ @@ -151,6 +151,16 @@ Component({
151 var th = this; 151 var th = this;
152 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, 152 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid,
153 {}).then(res => { 153 {}).then(res => {
  154 +
  155 + if(res.data.code!=0 || !res.data.data){
  156 + var ob = {
  157 + "card_list": [],
  158 + "name_map": ""
  159 + };
  160 + func(ob);
  161 + return false;
  162 + }
  163 +
154 var plusCard = res.data.data; 164 var plusCard = res.data.data;
155 var arr = [1219, 2089, 3031]; 165 var arr = [1219, 2089, 3031];
156 var new_arr = new Array(); 166 var new_arr = new Array();
images/share/miao_share.png

14 KB | W: | H:

6.07 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
packageA/pages/activity_share/activity_share.js
@@ -59,7 +59,7 @@ Page({ @@ -59,7 +59,7 @@ Page({
59 var StaffId=options.StaffId; 59 var StaffId=options.StaffId;
60 var StorageId=options.StorageId; 60 var StorageId=options.StorageId;
61 if(first_leader){ 61 if(first_leader){
62 - //-- user_id代过来免登 -- 62 + //-- user_id代过来免登 --
63 getApp().globalData.user_id=first_leader; 63 getApp().globalData.user_id=first_leader;
64 getApp().getUserFir(); 64 getApp().getUserFir();
65 65
@@ -466,6 +466,13 @@ Page({ @@ -466,6 +466,13 @@ Page({
466 var storid = oo.stoid; 466 var storid = oo.stoid;
467 var th = this; 467 var th = this;
468 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { 468 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
  469 +
  470 + if(res.data.code!=0 || !res.data.data){
  471 + var ob={"card_list":[],"name_map":''};
  472 + func(ob);
  473 + return false;
  474 + }
  475 +
469 var plusCard = res.data.data; 476 var plusCard = res.data.data;
470 var arr = [1219, 2089, 3031]; 477 var arr = [1219, 2089, 3031];
471 var new_arr = new Array(); 478 var new_arr = new Array();
packageA/pages/goods_share/goods_share.js
@@ -36,7 +36,7 @@ Page({ @@ -36,7 +36,7 @@ Page({
36 var StaffId=options.StaffId; 36 var StaffId=options.StaffId;
37 var StorageId=options.StorageId; 37 var StorageId=options.StorageId;
38 if(first_leader){ 38 if(first_leader){
39 - //-- user_id代过来免登 -- 39 + //-- user_id代过来免登 --
40 getApp().globalData.user_id=first_leader; 40 getApp().globalData.user_id=first_leader;
41 getApp().getUserFir(); 41 getApp().getUserFir();
42 42
@@ -281,6 +281,13 @@ Page({ @@ -281,6 +281,13 @@ Page({
281 var storid = oo.stoid; 281 var storid = oo.stoid;
282 var th = this; 282 var th = this;
283 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { 283 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
  284 +
  285 + if(res.data.code!=0 || !res.data.data){
  286 + var ob={"card_list":[],"name_map":''};
  287 + func(ob);
  288 + return false;
  289 + }
  290 +
284 var plusCard = res.data.data; 291 var plusCard = res.data.data;
285 var arr = [1219, 2089, 3031]; 292 var arr = [1219, 2089, 3031];
286 var new_arr = new Array(); 293 var new_arr = new Array();
packageA/pages/jfbuy/jfbuy.js
@@ -80,7 +80,7 @@ Page({ @@ -80,7 +80,7 @@ Page({
80 // //接受有没有导购的参数 80 // //接受有没有导购的参数
81 // var first_leader=options.first_leader; 81 // var first_leader=options.first_leader;
82 // if(first_leader){ 82 // if(first_leader){
83 - // //-- user_id代过来免登 -- 83 + // //-- user_id代过来免登 --
84 // getApp().globalData.user_id=first_leader; 84 // getApp().globalData.user_id=first_leader;
85 // getApp().getUserFir(); 85 // getApp().getUserFir();
86 // } 86 // }
@@ -297,7 +297,7 @@ Page({ @@ -297,7 +297,7 @@ Page({
297 // 关闭加载状态 297 // 关闭加载状态
298 th.data.is_load2=0; 298 th.data.is_load2=0;
299 // 请求成功 299 // 请求成功
300 - if(res.data.code==0) { 300 + if(res.data.code==0 && res.data.data && res.data.data.pageData) {
301 if(res.data.data.pageData.length>0) { 301 if(res.data.data.pageData.length>0) {
302 th.data.currentPage2++; 302 th.data.currentPage2++;
303 var data = res.data.data.pageData; 303 var data = res.data.data.pageData;
packageA/pages/liveStreamDetails/liveStreamDetails.js
@@ -403,7 +403,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un @@ -403,7 +403,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un
403 var storageId=options.storageId; 403 var storageId=options.storageId;
404 404
405 if(first_leader){ 405 if(first_leader){
406 - //-- user_id代过来免登 -- 406 + //-- user_id代过来免登 --
407 getApp().globalData.first_leader=first_leader; 407 getApp().globalData.first_leader=first_leader;
408 //调用接口判断是不是会员 408 //调用接口判断是不是会员
409 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+o.stoid+"/"+first_leader,{}).then(res=>{ 409 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+o.stoid+"/"+first_leader,{}).then(res=>{
packageA/pages/live_share/live_share.js
@@ -31,7 +31,7 @@ Page({ @@ -31,7 +31,7 @@ Page({
31 var StaffId=options.StaffId; 31 var StaffId=options.StaffId;
32 var StorageId=options.StorageId; 32 var StorageId=options.StorageId;
33 if(first_leader){ 33 if(first_leader){
34 - //-- user_id代过来免登 -- 34 + //-- user_id代过来免登 --
35 getApp().globalData.user_id=first_leader; 35 getApp().globalData.user_id=first_leader;
36 getApp().getUserFir(); 36 getApp().getUserFir();
37 //设置分享会员和导购id和归属门店ID 37 //设置分享会员和导购id和归属门店ID
packageA/pages/prom_list/prom_list.js
@@ -39,6 +39,7 @@ Page({ @@ -39,6 +39,7 @@ Page({
39 goodsInputNum:1, 39 goodsInputNum:1,
40 g_buy_num: null, 40 g_buy_num: null,
41 sele_collocation:null, 41 sele_collocation:null,
  42 +
42 }, 43 },
43 44
44 //------初始化加载---------- 45 //------初始化加载----------
@@ -108,7 +109,7 @@ Page({ @@ -108,7 +109,7 @@ Page({
108 getApp().request.promiseGet("/api/weshop/pickup/list",{ 109 getApp().request.promiseGet("/api/weshop/pickup/list",{
109 data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon}, 110 data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon},
110 }).then(res=>{ 111 }).then(res=>{
111 - if(res.data.code==0){ 112 + if(res.data.code==0 && res.data.data && res.data.data.pageData){
112 e=res.data.data.pageData[0]; 113 e=res.data.data.pageData[0];
113 if (e){ 114 if (e){
114 appd.pk_store=e; 115 appd.pk_store=e;
@@ -240,20 +241,22 @@ Page({ @@ -240,20 +241,22 @@ Page({
240 }else{ 241 }else{
241 ee.setData({ data: t.data.data, }); 242 ee.setData({ data: t.data.data, });
242 } 243 }
243 -  
244 - /*---获取活动的重表---*/  
245 - //调用接口判断订单优惠,  
246 - getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+ee.data.gid+"/2", {}).then(res => {  
247 - if(res.data.code==0){  
248 - var r_data=res.data.data;  
249 - th.loop_promise(0,r_data.collocationList,function(){  
250 - ee.setData({  
251 - collocationGoods:r_data.collocationPromList,  
252 - collocationList:r_data.collocationList,  
253 - })  
254 - })  
255 - }  
256 - }) 244 +
  245 + if(!ee.data.collocationList){
  246 + /*---获取活动的重表---*/
  247 + //调用接口判断订单优惠,
  248 + getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+ee.data.gid+"/2", {}).then(res => {
  249 + if(res.data.code==0){
  250 + var r_data=res.data.data;
  251 + th.loop_promise(0,r_data.collocationList,function(){
  252 + ee.setData({
  253 + collocationGoods:r_data.collocationPromList,
  254 + collocationList:r_data.collocationList,
  255 + })
  256 + })
  257 + }
  258 + })
  259 + }
257 260
258 //获取统一条形码,普通商品和优惠促销的商品 261 //获取统一条形码,普通商品和优惠促销的商品
259 if ( t.data.data.prom_type == 5){ 262 if ( t.data.data.prom_type == 5){
@@ -273,7 +276,7 @@ Page({ @@ -273,7 +276,7 @@ Page({
273 } 276 }
274 //---通过接口获取门店的线下库存信息-- 277 //---通过接口获取门店的线下库存信息--
275 return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ 278 return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
276 - data:{storageNos:that.data.fir_def_store.pickup_no,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid} 279 + data:{storageNos:that.data.fir_def_store.pickup_no,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid,pageSize:2000}
277 }) 280 })
278 }).then(res=>{ 281 }).then(res=>{
279 if(res.data.code==0 && res.data.data.total>0){ 282 if(res.data.code==0 && res.data.data.total>0){
@@ -413,7 +416,7 @@ Page({ @@ -413,7 +416,7 @@ Page({
413 var pick=th.get_pick_from_list(th.data.sto_sele_id) 416 var pick=th.get_pick_from_list(th.data.sto_sele_id)
414 //---通过接口获取门店的线下库存信息-- 417 //---通过接口获取门店的线下库存信息--
415 getApp().request.get("/api/weshop/goods/getWareStorages",{ 418 getApp().request.get("/api/weshop/goods/getWareStorages",{
416 - data:{storageNos:pick.pickup_no,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid}, 419 + data:{storageNos:pick.pickup_no,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid,pageSize:2000},
417 success:function(res){ 420 success:function(res){
418 if(res.data.code==0){ 421 if(res.data.code==0){
419 if(res.data.data.pageData.length>0){ 422 if(res.data.data.pageData.length>0){
@@ -722,7 +725,7 @@ Page({ @@ -722,7 +725,7 @@ Page({
722 if (e.data.code == 0) { 725 if (e.data.code == 0) {
723 726
724 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 727 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
725 - if(dd.lat && !th.data.def_pick_store && th.data.bconfig.is_sort_storage){ 728 + if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){
726 th.setData({ 729 th.setData({
727 def_pick_store:e.data.data.pageData[0], 730 def_pick_store:e.data.data.pageData[0],
728 sto_sele_name: e.data.data.pageData[0].pickup_name, 731 sto_sele_name: e.data.data.pageData[0].pickup_name,
@@ -905,7 +908,7 @@ Page({ @@ -905,7 +908,7 @@ Page({
905 only_pk: e.data.data.pageData 908 only_pk: e.data.data.pageData
906 }); 909 });
907 //-----如果没有默认门店,要取第一个门店作为默认店------ 910 //-----如果没有默认门店,要取第一个门店作为默认店------
908 - if (!th.data.def_pick_store && th.data.bconfig.is_sort_storage) { 911 + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
909 th.setData({ 912 th.setData({
910 def_pick_store:e.data.data.pageData[0], 913 def_pick_store:e.data.data.pageData[0],
911 sto_sele_name: e.data.data.pageData[0].pickup_name, 914 sto_sele_name: e.data.data.pageData[0].pickup_name,
@@ -942,7 +945,7 @@ Page({ @@ -942,7 +945,7 @@ Page({
942 } 945 }
943 //---通过接口获取门店的线下库存信息-- 946 //---通过接口获取门店的线下库存信息--
944 return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ 947 return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
945 - data:{storageNos:pkno_str,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid} 948 + data:{storageNos:pkno_str,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid,pageSize:2000}
946 }) 949 })
947 }).then(res=>{ 950 }).then(res=>{
948 if(res.data.code==0){ 951 if(res.data.code==0){
@@ -1149,7 +1152,7 @@ Page({ @@ -1149,7 +1152,7 @@ Page({
1149 } 1152 }
1150 1153
1151 1154
1152 - if (bconfig.is_sort_storage) { 1155 + if (bconfig && bconfig.is_sort_storage) {
1153 wx.getLocation({ 1156 wx.getLocation({
1154 type: 'gcj02', 1157 type: 'gcj02',
1155 success: function(res) { 1158 success: function(res) {
@@ -1300,7 +1303,7 @@ Page({ @@ -1300,7 +1303,7 @@ Page({
1300 }) 1303 })
1301 //读取线下的门店库存 1304 //读取线下的门店库存
1302 await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ 1305 await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
1303 - data:{storageNos:item.pickup_no,wareIds:encodeURIComponent(erpwareid),storeId:os.stoid} 1306 + data:{storageNos:item.pickup_no,wareIds:encodeURIComponent(erpwareid),storeId:os.stoid,pageSize:2000}
1304 }).then(res=>{ 1307 }).then(res=>{
1305 if(res.data.code==0 && res.data.data.total>0){ 1308 if(res.data.code==0 && res.data.data.total>0){
1306 plist=res.data.data.pageData[0]; 1309 plist=res.data.data.pageData[0];
@@ -1478,7 +1481,7 @@ Page({ @@ -1478,7 +1481,7 @@ Page({
1478 th.data.t_time = setInterval(function() { 1481 th.data.t_time = setInterval(function() {
1479 if (th.data.bconfig == null) false; 1482 if (th.data.bconfig == null) false;
1480 var e = th.data.bconfig; 1483 var e = th.data.bconfig;
1481 - if (e.is_sort_storage) { 1484 + if (e && e.is_sort_storage) {
1482 wx.getLocation({ 1485 wx.getLocation({
1483 type: 'gcj02', 1486 type: 'gcj02',
1484 success: function(res) { 1487 success: function(res) {
@@ -1526,6 +1529,13 @@ Page({ @@ -1526,6 +1529,13 @@ Page({
1526 var storid = os.stoid; 1529 var storid = os.stoid;
1527 var th = this; 1530 var th = this;
1528 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { 1531 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
  1532 +
  1533 + if(res.data.code!=0 || !res.data.data){
  1534 + var ob={"card_list":[],"name_map":''};
  1535 + func(ob);
  1536 + return false;
  1537 + }
  1538 +
1529 var plusCard = res.data.data; 1539 var plusCard = res.data.data;
1530 var arr = [1219, 2089, 3031]; 1540 var arr = [1219, 2089, 3031];
1531 var new_arr = new Array(); 1541 var new_arr = new Array();
packageA/pages/quan/quan.js
@@ -29,7 +29,7 @@ Page({ @@ -29,7 +29,7 @@ Page({
29 var StaffId=options.StaffId; 29 var StaffId=options.StaffId;
30 var StorageId=options.StorageId; 30 var StorageId=options.StorageId;
31 if(first_leader){ 31 if(first_leader){
32 - //-- user_id代过来免登 -- 32 + //-- user_id代过来免登 --
33 getApp().globalData.user_id=first_leader; 33 getApp().globalData.user_id=first_leader;
34 getApp().getUserFir(); 34 getApp().getUserFir();
35 //设置分享会员和导购id和归属门店ID 35 //设置分享会员和导购id和归属门店ID
packageA/pages/quan_pro/quan_pro.js
@@ -23,7 +23,7 @@ Page({ @@ -23,7 +23,7 @@ Page({
23 var th = this; 23 var th = this;
24 var first_leader=t.first_leader; 24 var first_leader=t.first_leader;
25 if(first_leader){ 25 if(first_leader){
26 - //-- user_id代过来免登 -- 26 + //-- user_id代过来免登 --
27 getApp().globalData.first_leader=first_leader; 27 getApp().globalData.first_leader=first_leader;
28 //调用接口判断是不是会员 28 //调用接口判断是不是会员
29 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ 29 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
pages/cart/cart/cart.js
@@ -44,7 +44,7 @@ Page({ @@ -44,7 +44,7 @@ Page({
44 title: "购物车", 44 title: "购物车",
45 }) 45 })
46 46
47 - //判断是否有登 47 + //判断是否有登
48 t.auth.hadAuth() && t.getUserInfo(function() { 48 t.auth.hadAuth() && t.getUserInfo(function() {
49 a.getCardList(); 49 a.getCardList();
50 }); 50 });
pages/cart/cart2/cart2.js
@@ -668,7 +668,10 @@ Page({ @@ -668,7 +668,10 @@ Page({
668 th.setData({collocation_goods:gg.collocation_goods}); 668 th.setData({collocation_goods:gg.collocation_goods});
669 669
670 var cart_arr=new Array(); 670 var cart_arr=new Array();
671 - var narr=gg.collocation_goods; 671 + //var narr=gg.collocation_goods;
  672 + //修改成深拷贝,确保返回是数据正确
  673 + var narr=JSON.parse(JSON.stringify(gg.collocation_goods));
  674 +
672 narr.push(t.data.data); 675 narr.push(t.data.data);
673 var ie = { 676 var ie = {
674 pickup_id: gg.pick_id, pname: gg.pick_name, goods: narr, exp_type: et, wind: m_wind, distr_t: distr_t, 677 pickup_id: gg.pick_id, pname: gg.pick_name, goods: narr, exp_type: et, wind: m_wind, distr_t: distr_t,
@@ -1007,7 +1010,7 @@ Page({ @@ -1007,7 +1010,7 @@ Page({
1007 WareIds: cart_item.check_quan_ware_list 1010 WareIds: cart_item.check_quan_ware_list
1008 } 1011 }
1009 }).then(res => { 1012 }).then(res => {
1010 - if (res.data.code == 0 && res.data.data.length > 0) { 1013 + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
1011 var q_data = res.data.data; 1014 var q_data = res.data.data;
1012 //--存储商品优惠的内容-- 1015 //--存储商品优惠的内容--
1013 cart_item.quan_youhui_list = q_data; 1016 cart_item.quan_youhui_list = q_data;
@@ -1337,6 +1340,9 @@ Page({ @@ -1337,6 +1340,9 @@ Page({
1337 //---------计算立即购买---------- 1340 //---------计算立即购买----------
1338 calculatePrice2: function () { 1341 calculatePrice2: function () {
1339 var th = this, good = this.data.bn_goods; 1342 var th = this, good = this.data.bn_goods;
  1343 +
  1344 + if(!good) return false;
  1345 +
1340 //搭配的计算要用购物的车计算方法 1346 //搭配的计算要用购物的车计算方法
1341 if(good.prom_type==5){ 1347 if(good.prom_type==5){
1342 th.calculatePrice(); 1348 th.calculatePrice();
@@ -1378,7 +1384,7 @@ Page({ @@ -1378,7 +1384,7 @@ Page({
1378 await getApp().request.promiseGet("/api/weshop/couponList/getUseCouponPrice",{ 1384 await getApp().request.promiseGet("/api/weshop/couponList/getUseCouponPrice",{
1379 data:{storeId:oo.stoid,CashRepNo:quan_no, WaresSum:th.data.ckeck_quan_price, WareIds:th.data.check_quan_ware_list} 1385 data:{storeId:oo.stoid,CashRepNo:quan_no, WaresSum:th.data.ckeck_quan_price, WareIds:th.data.check_quan_ware_list}
1380 }).then(res=>{ 1386 }).then(res=>{
1381 - if(res.data.code==0){ 1387 + if(res.data.code==0 && res.data.data && res.data.data.length>0 ){
1382 quan_price=res.data.data[0].WareCashSum; 1388 quan_price=res.data.data[0].WareCashSum;
1383 } 1389 }
1384 }) 1390 })
@@ -2027,7 +2033,7 @@ Page({ @@ -2027,7 +2033,7 @@ Page({
2027 },// 设置请求的 header 2033 },// 设置请求的 header
2028 success: function (res) { 2034 success: function (res) {
2029 2035
2030 - th.data.is_summit_ing=0; //是否提交中 2036 +
2031 wx.hideLoading(); 2037 wx.hideLoading();
2032 if (res.statusCode == 200) { 2038 if (res.statusCode == 200) {
2033 var data=res.data; 2039 var data=res.data;
@@ -2110,6 +2116,7 @@ Page({ @@ -2110,6 +2116,7 @@ Page({
2110 return; 2116 return;
2111 }else if(res.confirm){ 2117 }else if(res.confirm){
2112 th.data.is_continue=1; 2118 th.data.is_continue=1;
  2119 + th.data.is_summit_ing=0; //是否提交中
2113 th.submitForm(sub_value); 2120 th.submitForm(sub_value);
2114 } 2121 }
2115 } 2122 }
@@ -2120,8 +2127,10 @@ Page({ @@ -2120,8 +2127,10 @@ Page({
2120 msg=msg.slice(0, 13) + "\r\n"+ msg.slice(13); 2127 msg=msg.slice(0, 13) + "\r\n"+ msg.slice(13);
2121 } 2128 }
2122 getApp().confirmBox(msg); 2129 getApp().confirmBox(msg);
  2130 + th.data.is_summit_ing=0; //是否提交中
2123 } 2131 }
2124 }else{ 2132 }else{
  2133 + th.data.is_summit_ing=0; //是否提交中
2125 console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode); 2134 console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode);
2126 } 2135 }
2127 }, 2136 },
@@ -2164,7 +2173,7 @@ Page({ @@ -2164,7 +2173,7 @@ Page({
2164 }) 2173 })
2165 //读取线下的门店库存 2174 //读取线下的门店库存
2166 await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ 2175 await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
2167 - data:{storageNos:pick_no,wareIds:encodeURIComponent(erpwareid),storeId:os.stoid} 2176 + data:{storageNos:pick_no,wareIds:encodeURIComponent(erpwareid),storeId:os.stoid,pageSize:2000}
2168 }).then(res=>{ 2177 }).then(res=>{
2169 if(res.data.code==0){ 2178 if(res.data.code==0){
2170 plist=res.data.data.pageData[0]; 2179 plist=res.data.data.pageData[0];
@@ -2839,8 +2848,10 @@ Page({ @@ -2839,8 +2848,10 @@ Page({
2839 //getApp().waitfor2(this,"g_cart_q_time","order_prom_list_cart",async function () { 2848 //getApp().waitfor2(this,"g_cart_q_time","order_prom_list_cart",async function () {
2840 //var arr=th.data.order_prom_list_cart; 2849 //var arr=th.data.order_prom_list_cart;
2841 var arr=order_prom_list_cart; 2850 var arr=order_prom_list_cart;
  2851 + if(!arr) arr=[];
2842 //如果系统有限制使用优惠券 2852 //如果系统有限制使用优惠券
2843 if(th.data.is_close_quan) return false; 2853 if(th.data.is_close_quan) return false;
  2854 +
2844 //------------开始计算使用优惠券相关------------ 2855 //------------开始计算使用优惠券相关------------
2845 for(var ind in arr){ 2856 for(var ind in arr){
2846 var ep=arr[ind]; 2857 var ep=arr[ind];
pages/cart/cart2_pt/cart2_pt.js
@@ -585,7 +585,7 @@ Page({ @@ -585,7 +585,7 @@ Page({
585 'content-type': 'application/json' 585 'content-type': 'application/json'
586 },// 设置请求的 header 586 },// 设置请求的 header
587 success: function (res) { 587 success: function (res) {
588 - th.data.is_summit_ing=0; //是否提交中 588 +
589 wx.hideLoading(); 589 wx.hideLoading();
590 if (res.statusCode == 200) { 590 if (res.statusCode == 200) {
591 var data=res.data; 591 var data=res.data;
@@ -613,15 +613,18 @@ Page({ @@ -613,15 +613,18 @@ Page({
613 // }, 1); 613 // }, 1);
614 util_pay.pay(data.data, function() { 614 util_pay.pay(data.data, function() {
615 setTimeout(function () { 615 setTimeout(function () {
616 - wx.navigateTo({ 616 + wx.reLaunch({
617 //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data, 617 //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
618 - url: "/pages/team/team_success/team_success?ordersn=" + data.data, 618 + url: "/pages/team/team_success/team_success?ordersn=" + data.data,
619 }) 619 })
620 },1000) 620 },1000)
621 }, function () { 621 }, function () {
622 //支付失败 622 //支付失败
623 setTimeout(function () { 623 setTimeout(function () {
624 - wx.navigateBack({ delta: 1 }) 624 + //wx.navigateBack({ delta: 1 })
  625 + wx.reLaunch({
  626 + url: "/pages/user/order_list/order_list",
  627 + })
625 },1000) 628 },1000)
626 629
627 },oo.stoid,1); 630 },oo.stoid,1);
@@ -647,9 +650,12 @@ Page({ @@ -647,9 +650,12 @@ Page({
647 url: "/pages/user/order_list/order_list", 650 url: "/pages/user/order_list/order_list",
648 })--*/ 651 })--*/
649 var url="/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data; 652 var url="/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data;
650 - getApp().goto(url); 653 + wx.reLaunch({
  654 + url: url
  655 + })
  656 +
651 }else{ 657 }else{
652 - wx.navigateTo({ 658 + wx.reLaunch({
653 url: "/pages/team/team_success/team_success?ordersn=" + data.data, 659 url: "/pages/team/team_success/team_success?ordersn=" + data.data,
654 }) 660 })
655 } 661 }
@@ -661,13 +667,16 @@ Page({ @@ -661,13 +667,16 @@ Page({
661 } 667 }
662 } 668 }
663 else{ 669 else{
  670 + th.data.is_summit_ing=0; //是否提交中
664 getApp().confirmBox(data.msg); 671 getApp().confirmBox(data.msg);
665 } 672 }
666 } else { 673 } else {
  674 + th.data.is_summit_ing=0; //是否提交中
667 console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode); 675 console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode);
668 } 676 }
669 }, 677 },
670 fail: function () { 678 fail: function () {
  679 + th.data.is_summit_ing=0; //是否提交中
671 wx.hideLoading(); 680 wx.hideLoading();
672 console.log("index.js wx.request CheckCallUser fail"); 681 console.log("index.js wx.request CheckCallUser fail");
673 }, 682 },
pages/cart/cart4/cart4.js
@@ -27,7 +27,7 @@ Page({ @@ -27,7 +27,7 @@ Page({
27 data:data, 27 data:data,
28 success:function(rs){ 28 success:function(rs){
29 29
30 - if(rs.data.code==0){ 30 + if(rs.data.code==0 && rs.data.data && rs.data.data.pageData && rs.data.data.pageData.length>0){
31 //支付的金额 31 //支付的金额
32 rs.data.data.pageData.forEach(function(ie,ind){ 32 rs.data.data.pageData.forEach(function(ie,ind){
33 order_m+=ie.order_amount; 33 order_m+=ie.order_amount;
pages/giftpack/giftpacklist/giftpacklist.js
@@ -41,7 +41,7 @@ Page({ @@ -41,7 +41,7 @@ Page({
41 //-- 获取分享人的ID -- 41 //-- 获取分享人的ID --
42 var first_leader=options.first_leader; 42 var first_leader=options.first_leader;
43 if(first_leader){ 43 if(first_leader){
44 - //-- user_id代过来免登 -- 44 + //-- user_id代过来免登 --
45 getApp().globalData.first_leader=first_leader; 45 getApp().globalData.first_leader=first_leader;
46 //调用接口判断是不是会员 46 //调用接口判断是不是会员
47 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ 47 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
pages/goods/goodsInfo/goodsInfo.js
@@ -860,7 +860,11 @@ Page({ @@ -860,7 +860,11 @@ Page({
860 url: "/pages/user/address_list/address_list?operate=selectAddress" 860 url: "/pages/user/address_list/address_list?operate=selectAddress"
861 }); 861 });
862 }, 862 },
863 - onUnload: function() {}, 863 + onUnload: function() {
  864 + for(var i = 1; i < 100; i++) {
  865 + clearInterval(i);
  866 + }
  867 + },
864 onHide: function() { 868 onHide: function() {
865 this.data.is_timer = 0; 869 this.data.is_timer = 0;
866 for(var i = 1; i < 100; i++) { 870 for(var i = 1; i < 100; i++) {
@@ -2111,7 +2115,7 @@ Page({ @@ -2111,7 +2115,7 @@ Page({
2111 if (e.data.code == 0) { 2115 if (e.data.code == 0) {
2112 2116
2113 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 2117 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
2114 - if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig.is_sort_storage){ 2118 + if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig && th.data.bconfig.is_sort_storage){
2115 th.setData({ 2119 th.setData({
2116 def_pick_store:e.data.data.pageData[0], 2120 def_pick_store:e.data.data.pageData[0],
2117 sto_sele_name: e.data.data.pageData[0].pickup_name, 2121 sto_sele_name: e.data.data.pageData[0].pickup_name,
@@ -2300,7 +2304,7 @@ Page({ @@ -2300,7 +2304,7 @@ Page({
2300 only_pk: e.data.data.pageData 2304 only_pk: e.data.data.pageData
2301 }); 2305 });
2302 //-----如果没有默认门店,要取第一个门店作为默认店------ 2306 //-----如果没有默认门店,要取第一个门店作为默认店------
2303 - if (!th.data.def_pick_store && th.data.bconfig.is_sort_storage) { 2307 + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
2304 th.setData({ 2308 th.setData({
2305 def_pick_store:e.data.data.pageData[0], 2309 def_pick_store:e.data.data.pageData[0],
2306 sto_sele_name: e.data.data.pageData[0].pickup_name, 2310 sto_sele_name: e.data.data.pageData[0].pickup_name,
@@ -2782,15 +2786,17 @@ Page({ @@ -2782,15 +2786,17 @@ Page({
2782 } 2786 }
2783 }).then(res => { 2787 }).then(res => {
2784 var now = ut.gettimestamp(); 2788 var now = ut.gettimestamp();
2785 - var tgr = res.data.data.pageData[0];  
2786 - //如果团的时间已经到了  
2787 - if (now >= tgr.kt_end_time) {  
2788 - th.update_jiti(tgr.id);  
2789 - } else {  
2790 - th.setData({  
2791 - user_order_pt_state: 2  
2792 - });  
2793 - } 2789 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  2790 + var tgr = res.data.data.pageData[0];
  2791 + //如果团的时间已经到了
  2792 + if (now >= tgr.kt_end_time) {
  2793 + th.update_jiti(tgr.id);
  2794 + } else {
  2795 + th.setData({
  2796 + user_order_pt_state: 2
  2797 + });
  2798 + }
  2799 + }
2794 }) 2800 })
2795 2801
2796 } else { 2802 } else {
@@ -3127,7 +3133,12 @@ Page({ @@ -3127,7 +3133,12 @@ Page({
3127 } 3133 }
3128 }); 3134 });
3129 } else if (odr.pt_status == 1 && odr.order_status == 1) { 3135 } else if (odr.pt_status == 1 && odr.order_status == 1) {
3130 - wx.navigateTo({ 3136 +
  3137 + if(this.data.is_go_to_team_show) return false;
  3138 + this.data.is_go_to_team_show=1;
  3139 + wx.showLoading();
  3140 +
  3141 + wx.redirectTo({
3131 url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn, 3142 url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn,
3132 }); 3143 });
3133 } else { 3144 } else {
@@ -3335,17 +3346,24 @@ Page({ @@ -3335,17 +3346,24 @@ Page({
3335 3346
3336 //-------跳转pt商品------- 3347 //-------跳转pt商品-------
3337 go_to_nopay: function() { 3348 go_to_nopay: function() {
3338 - var th = this;  
3339 - wx.navigateTo({  
3340 - url: "/pages/user/order_detail/order_detail?order_id=" + th.data.buy_order.order_id,  
3341 - }); 3349 + var th = this;
  3350 + url="/pages/user/order_detail/order_detail?order_id=" + th.data.buy_order.order_id;
  3351 + getApp().goto(url);
  3352 +
3342 }, 3353 },
3343 //-------跳转pt teamshow------- 3354 //-------跳转pt teamshow-------
3344 go_to_team_show: function() { 3355 go_to_team_show: function() {
3345 - var th = this;  
3346 - wx.navigateTo({  
3347 - url: "/pages/team/team_success/team_success?ordersn=" + th.data.buy_order.order_sn,  
3348 - }); 3356 +
  3357 + if(this.data.is_go_to_team_show) return false;
  3358 + this.data.is_go_to_team_show=1;
  3359 + wx.showLoading();
  3360 +
  3361 + var th = this;
  3362 + var url="/pages/team/team_success/team_success?ordersn=" + th.data.buy_order.order_sn;
  3363 + wx.redirectTo({
  3364 + url:url,
  3365 + })
  3366 +
3349 }, 3367 },
3350 3368
3351 //---拼团倒计时--- 3369 //---拼团倒计时---
@@ -3425,9 +3443,14 @@ Page({ @@ -3425,9 +3443,14 @@ Page({
3425 } 3443 }
3426 }); 3444 });
3427 } else if (odr.pt_status == 1 && odr.order_status == 1) { 3445 } else if (odr.pt_status == 1 && odr.order_status == 1) {
3428 - wx.navigateTo({  
3429 - url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn,  
3430 - }); 3446 +
  3447 + if(this.data.is_go_to_team_show) return false;
  3448 + this.data.is_go_to_team_show=1;
  3449 + wx.showLoading();
  3450 +
  3451 + wx.redirectTo({
  3452 + url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn,
  3453 + });
3431 } else { 3454 } else {
3432 wx.navigateTo({ 3455 wx.navigateTo({
3433 url: "/pages/team/team_show/team_show?tg_id=" + id, 3456 url: "/pages/team/team_show/team_show?tg_id=" + id,
@@ -4295,7 +4318,7 @@ Page({ @@ -4295,7 +4318,7 @@ Page({
4295 } 4318 }
4296 4319
4297 4320
4298 - if (bconfig.is_sort_storage) { 4321 + if (bconfig && bconfig.is_sort_storage) {
4299 wx.getLocation({ 4322 wx.getLocation({
4300 type: 'gcj02', 4323 type: 'gcj02',
4301 success: function(res) { 4324 success: function(res) {
@@ -4636,7 +4659,7 @@ Page({ @@ -4636,7 +4659,7 @@ Page({
4636 var t_time = setInterval(function() { 4659 var t_time = setInterval(function() {
4637 if (th.data.bconfig == null) false; 4660 if (th.data.bconfig == null) false;
4638 var e = th.data.bconfig; 4661 var e = th.data.bconfig;
4639 - if (e.is_sort_storage) { 4662 + if (e && e.is_sort_storage) {
4640 wx.getLocation({ 4663 wx.getLocation({
4641 type: 'gcj02', 4664 type: 'gcj02',
4642 success: function(res) { 4665 success: function(res) {
pages/goods/goodsList/goodsList.js
@@ -128,7 +128,7 @@ Page({ @@ -128,7 +128,7 @@ Page({
128 //-- 获取 -- 128 //-- 获取 --
129 await getApp().request.promiseGet("/api/weshop/libao/libaoForm/page?id="+content.libao+"&store_id="+oo.stoid, { 129 await getApp().request.promiseGet("/api/weshop/libao/libaoForm/page?id="+content.libao+"&store_id="+oo.stoid, {
130 }).then(res => { 130 }).then(res => {
131 - if(res.data.code==0) 131 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0)
132 arr[i].content.lb_name=res.data.data.pageData[0].lbtitle; 132 arr[i].content.lb_name=res.data.data.pageData[0].lbtitle;
133 }) 133 })
134 } 134 }
pages/index/index/index.js
@@ -85,7 +85,7 @@ Page({ @@ -85,7 +85,7 @@ Page({
85 } 85 }
86 86
87 if(first_leader){ 87 if(first_leader){
88 - //-- user_id代过来免登 -- 88 + //-- user_id代过来免登 --
89 getApp().globalData.first_leader=first_leader; 89 getApp().globalData.first_leader=first_leader;
90 //调用接口判断是不是会员 90 //调用接口判断是不是会员
91 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ 91 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
@@ -478,6 +478,9 @@ Page({ @@ -478,6 +478,9 @@ Page({
478 this.data.recommend = null, this.data.currentPage = 1, n.resetConfig(), this.requestHomePage(), 478 this.data.recommend = null, this.data.currentPage = 1, n.resetConfig(), this.requestHomePage(),
479 this.requestRecommend(); 479 this.requestRecommend();
480 }, 480 },
  481 + requestRecommend(){},
  482 + requestHomePage(){},
  483 +
481 onUnload: function() { 484 onUnload: function() {
482 this.destroyActivityTimer(); 485 this.destroyActivityTimer();
483 }, 486 },
pages/justTest/justTest.js deleted
1 -// pages/justTest/justTest.js  
2 -// let livePlayer = requirePlugin('live-player-plugin');  
3 -  
4 -  
5 -var t = require("../../utils/util.js"),  
6 - ut = t,  
7 - e = require("../../utils/common.js"),  
8 - a = require("../../utils/wxParse/wxParse.js"),  
9 - s = getApp(),  
10 - i = s.request,  
11 - rq = i,  
12 - oo = s.globalData,  
13 - o = s.globalData.setting,  
14 - os = o;  
15 -var utils = require('../../utils/util.js'),ut=utils;  
16 -var regeneratorRuntime = require('../../utils/runtime.js');  
17 -  
18 -Page({  
19 -  
20 - /**  
21 - * 页面的初始数据  
22 - */  
23 - data: {  
24 - gid: "",  
25 - stoid: o.stoid,  
26 - url: o.url,  
27 - resourceUrl: o.resourceUrl,  
28 - iurl: o.imghost,  
29 - defaultAvatar: o.resourceUrl + "/static/images/user68.jpg",  
30 - data: null,  
31 - openSpecModal: !1,  
32 - openPromModal: !1,  
33 - supportPageScroll: !1,  
34 -  
35 - //联系电话  
36 - mobile: '',  
37 - bconfig:null,  
38 - sales_rules:1,  
39 -  
40 - t_time:null,  
41 - card_field:"",  
42 - dp_price:0,  
43 - cut_price:0,  
44 - open_ind_store:1,  
45 - goodsInputNum:1,  
46 - g_buy_num: null,  
47 - sele_collocation:null,  
48 -  
49 -  
50 -  
51 - photoUrl: "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1003256280,1176261798&fm=26&gp=0.jpg",  
52 - //(用来控制显示哪个按钮) false表示还没首次进行弹框授权,或者已经授权了;true表示在首次授权弹框时拒绝授权,或者在设置页面还是拒绝了授权  
53 - isAuthSavePhoto: false  
54 - },  
55 -  
56 -  
57 -  
58 -  
59 -  
60 - sendRequest: function () {  
61 -  
62 -  
63 -  
64 - //调用接口判断是不是会员  
65 - getApp().request.promiseGet("/api/weshop/wx/livelist/page",{  
66 - data:{store_id: 1}  
67 - }).then(res=>{  
68 - console.log(res);  
69 - // if(res.data.code==0){  
70 - // getApp().globalData.guide_id=res.data.data.id;  
71 - // }  
72 - })  
73 -  
74 - },  
75 - // nav: function () {  
76 - // wx.redirectTo({  
77 - // url: '/packageA/pages/liveStream/liveStream'  
78 - // })  
79 - // },  
80 - /**  
81 - * 生命周期函数--监听页面加载  
82 - */  
83 - onLoad: function (options) {  
84 -  
85 - },  
86 -  
87 - /**  
88 - * 生命周期函数--监听页面初次渲染完成  
89 - */  
90 - onReady: function () {  
91 -  
92 - },  
93 -  
94 - /**  
95 - * 生命周期函数--监听页面显示  
96 - */  
97 - onShow: function () {  
98 -  
99 - },  
100 -  
101 - /**  
102 - * 生命周期函数--监听页面隐藏  
103 - */  
104 - onHide: function () {  
105 -  
106 - },  
107 -  
108 - /**  
109 - * 生命周期函数--监听页面卸载  
110 - */  
111 - onUnload: function () {  
112 -  
113 - },  
114 -  
115 - /**  
116 - * 页面相关事件处理函数--监听用户下拉动作  
117 - */  
118 - onPullDownRefresh: function () {  
119 -  
120 - },  
121 -  
122 - /**  
123 - * 页面上拉触底事件的处理函数  
124 - */  
125 - onReachBottom: function () {  
126 -  
127 - },  
128 -  
129 - /**  
130 - * 用户点击右上角分享  
131 - */  
132 - onShareAppMessage: function () {  
133 -  
134 - },  
135 -  
136 -  
137 -  
138 -  
139 - saveImage() {  
140 - wx.showLoading({  
141 - title: '保存中...',  
142 - mask: true,  
143 - });  
144 - wx.downloadFile({  
145 - url:  
146 - 'http://upload.jianshu.io/admin_banners/web_images/4435/c1d3ca63353c8bd527f0d781605516cb5b266d02.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/1250/h/540',  
147 - success: function(res) {  
148 - if (res.statusCode === 200) {  
149 - let img = res.tempFilePath;  
150 - wx.saveImageToPhotosAlbum({  
151 - filePath: img,  
152 - success(res) {  
153 - wx.showToast({  
154 - title: '保存成功',  
155 - icon: 'success',  
156 - duration: 2000  
157 - });  
158 - },  
159 - fail(res) {  
160 - wx.showToast({  
161 - title: '保存失败',  
162 - icon: 'success',  
163 - duration: 2000  
164 - });  
165 - }  
166 - });  
167 - }  
168 - }  
169 - });  
170 - },  
171 -  
172 -  
173 -  
174 - live() {}  
175 -  
176 -  
177 -})  
178 \ No newline at end of file 0 \ No newline at end of file
pages/justTest/justTest.json deleted
1 -{  
2 - "usingComponents": {}  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/justTest/justTest.wxml deleted
1 -<!--pages/justTest/justTest.wxml-->  
2 -<text>pages/justTest/justTest.wxml</text>  
3 -<navigator url="/packageA/pages/liveStream/liveStream">进入直播</navigator>  
4 -<navigator url="/packageA/pages/liveStreamDetails/liveStreamDetails">进入直播详情页</navigator>  
5 -<button bindtap="sendRequest">发送请求</button>  
6 -  
7 -  
8 -  
9 -  
10 -<button open-type="share" class='iconfont icon-weixin'>分享</button>  
11 -<button bindopensetting="onOpenSetting" open-type="openSetting" >  
12 - 保存图片到手机  
13 -</button>  
14 -  
15 -  
16 -  
17 -  
18 -<button bindtap="showac"></button>  
19 -  
pages/justTest/justTest.wxss deleted
1 -/* pages/justTest/justTest.wxss */  
2 -page {  
3 - background: #fff;  
4 - text-align: center;  
5 -}  
6 -  
7 -.box {  
8 - padding: 30rpx 80rpx;  
9 -}  
10 -  
11 -.img {  
12 - width: 430rpx;  
13 - height: 430rpx;  
14 - margin: 20rpx 0;  
15 -}  
16 -button {  
17 - width: 100%;  
18 - background: #ffffff;  
19 - border: none;  
20 - border-radius: 0rpx;  
21 - padding: 0;  
22 - margin: 0;  
23 -}  
24 -  
25 -.btn {  
26 - background: green;  
27 - color: #ffffff;  
28 - border-radius: 0;  
29 -}  
30 \ No newline at end of file 0 \ No newline at end of file
pages/team/team_more/team_more.js
@@ -112,6 +112,8 @@ Page({ @@ -112,6 +112,8 @@ Page({
112 // 获取当前时间,同时得到活动结束时间数组 112 // 获取当前时间,同时得到活动结束时间数组
113 var newTime = ut.gettimestamp(); 113 var newTime = ut.gettimestamp();
114 var List = this.data.teamgroup; 114 var List = this.data.teamgroup;
  115 + if(!List || List.length<=0) return false;
  116 +
115 for (var j = 0; j < List.length; j++) { 117 for (var j = 0; j < List.length; j++) {
116 // 对结束时间进行处理渲染到页面 118 // 对结束时间进行处理渲染到页面
117 var endTime = List[j].kt_end_time; 119 var endTime = List[j].kt_end_time;
pages/team/team_show/team_show.js
@@ -363,24 +363,31 @@ Page({ @@ -363,24 +363,31 @@ Page({
363 //获取活动从表信息team_id,listno团编号(券号) 363 //获取活动从表信息team_id,listno团编号(券号)
364 await getApp().request.promiseGet("/api/weshop/teamgroup/get/"+os.stoid+"/"+tg_id, { 364 await getApp().request.promiseGet("/api/weshop/teamgroup/get/"+os.stoid+"/"+tg_id, {
365 }).then(res => { 365 }).then(res => {
366 - teamgroup = res.data.data;  
367 - //获取当前时间,并且判断剩余时间  
368 - var nt = ut.gettimestamp();  
369 - var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss");  
370 - ee.setData({  
371 - pindGoods: teamgroup,  
372 - buy_start_date: buy_start_date  
373 - });  
374 -  
375 - if(nt>teamgroup.kt_end_time) {  
376 - th.setData({is_group_end:1,end_text:"团期已经结束"})  
377 - }  
378 - if(teamgroup.state==1) {  
379 - th.setData({is_group_end:1,end_text:"团期已经结束"})  
380 - }  
381 - if(teamgroup.state==3 || teamgroup.state==4 || teamgroup.state==5 ) {  
382 - th.setData({is_group_end:2,end_text:"团期已满"})  
383 - } 366 +
  367 +
  368 + if(res.data.code==0 && res.data && res.data.data ) {
  369 +
  370 + teamgroup = res.data.data;
  371 +
  372 + //获取当前时间,并且判断剩余时间
  373 + var nt = ut.gettimestamp();
  374 + var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss");
  375 + ee.setData({
  376 + pindGoods: teamgroup,
  377 + buy_start_date: buy_start_date
  378 + });
  379 +
  380 + if(nt>teamgroup.kt_end_time) {
  381 + th.setData({is_group_end:1,end_text:"团期已经结束"})
  382 + }
  383 + if(teamgroup.state==1) {
  384 + th.setData({is_group_end:1,end_text:"团期已经结束"})
  385 + }
  386 + if(teamgroup.state==3 || teamgroup.state==4 || teamgroup.state==5 ) {
  387 + th.setData({is_group_end:2,end_text:"团期已满"})
  388 + }
  389 +
  390 + }
384 391
385 }) 392 })
386 393
@@ -969,7 +976,7 @@ Page({ @@ -969,7 +976,7 @@ Page({
969 return false; 976 return false;
970 } 977 }
971 978
972 - if (bconfig.is_sort_storage) { 979 + if ( bconfig && bconfig.is_sort_storage) {
973 wx.getLocation({ 980 wx.getLocation({
974 type: 'gcj02', 981 type: 'gcj02',
975 success: function(res) { 982 success: function(res) {
@@ -1034,7 +1041,7 @@ Page({ @@ -1034,7 +1041,7 @@ Page({
1034 var t_time = setInterval(function() { 1041 var t_time = setInterval(function() {
1035 if (th.data.bconfig == null) false; 1042 if (th.data.bconfig == null) false;
1036 var e = th.data.bconfig; 1043 var e = th.data.bconfig;
1037 - if (e.is_sort_storage) { 1044 + if (e && e.is_sort_storage) {
1038 wx.getLocation({ 1045 wx.getLocation({
1039 type: 'gcj02', 1046 type: 'gcj02',
1040 success: function(res) { 1047 success: function(res) {
@@ -1109,7 +1116,7 @@ Page({ @@ -1109,7 +1116,7 @@ Page({
1109 if (e.data.code == 0) { 1116 if (e.data.code == 0) {
1110 1117
1111 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 1118 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
1112 - if(dd.lat && !th.data.def_pick_store && th.data.bconfig.is_sort_storage){ 1119 + if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){
1113 th.setData({ 1120 th.setData({
1114 def_pick_store:e.data.data.pageData[0], 1121 def_pick_store:e.data.data.pageData[0],
1115 sto_sele_name: e.data.data.pageData[0].pickup_name, 1122 sto_sele_name: e.data.data.pageData[0].pickup_name,
@@ -1289,7 +1296,7 @@ Page({ @@ -1289,7 +1296,7 @@ Page({
1289 only_pk: e.data.data.pageData 1296 only_pk: e.data.data.pageData
1290 }); 1297 });
1291 //-----如果没有默认门店,要取第一个门店作为默认店------ 1298 //-----如果没有默认门店,要取第一个门店作为默认店------
1292 - if (!th.data.def_pick_store && th.data.bconfig.is_sort_storage) { 1299 + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
1293 th.setData({ 1300 th.setData({
1294 def_pick_store:e.data.data.pageData[0], 1301 def_pick_store:e.data.data.pageData[0],
1295 sto_sele_name: e.data.data.pageData[0].pickup_name, 1302 sto_sele_name: e.data.data.pageData[0].pickup_name,
pages/team/team_success/team_success.js
@@ -47,6 +47,7 @@ Page({ @@ -47,6 +47,7 @@ Page({
47 }, 47 },
48 onLoad: function (t) { 48 onLoad: function (t) {
49 wx.setNavigationBarTitle({ title: "拼团订单",}) 49 wx.setNavigationBarTitle({ title: "拼团订单",})
  50 +
50 var that=this; 51 var that=this;
51 var th=this; 52 var th=this;
52 //获取用户设备信息,屏幕宽度 53 //获取用户设备信息,屏幕宽度
@@ -56,7 +57,7 @@ Page({ @@ -56,7 +57,7 @@ Page({
56 } 57 }
57 }) 58 })
58 var pay_f = t.payf, order_sn = t.ordersn; 59 var pay_f = t.payf, order_sn = t.ordersn;
59 - this.setData({ pay_f: pay_f, order_sn: order_sn}), 60 + this.setData({ pay_f: pay_f, order_sn: order_sn});
60 this.init(order_sn); 61 this.init(order_sn);
61 62
62 //-- 自定义海报 -- 63 //-- 自定义海报 --
@@ -209,6 +210,19 @@ Page({ @@ -209,6 +210,19 @@ Page({
209 min_price=pri; 210 min_price=pri;
210 211
211 } 212 }
  213 +
  214 +
  215 + //获取商品信息
  216 + getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, {
  217 + }).then(res => {
  218 + //商品地址
  219 + original_img = ee.data.imageurl+ res.data.data.original_img,
  220 + goods = res.data.data
  221 +
  222 + ee.setData({goods: goods,image: original_img,})
  223 +
  224 + })
  225 +
212 } 226 }
213 }) 227 })
214 228
@@ -233,13 +247,7 @@ Page({ @@ -233,13 +247,7 @@ Page({
233 } 247 }
234 248
235 249
236 - //获取商品信息  
237 - await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, {  
238 - }).then(res => {  
239 - //商品地址  
240 - original_img = ee.data.imageurl+ res.data.data.original_img,  
241 - goods = res.data.data  
242 - }) 250 +
243 251
244 //获取活动从表信息team_id:305暂时 252 //获取活动从表信息team_id:305暂时
245 await getApp().request.promiseGet("/api/weshop/teamgroup/page" , { 253 await getApp().request.promiseGet("/api/weshop/teamgroup/page" , {
@@ -266,10 +274,14 @@ Page({ @@ -266,10 +274,14 @@ Page({
266 } 274 }
267 275
268 //获取大家都在团信息 276 //获取大家都在团信息
269 - await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , { 277 + getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , {
270 data:{page:1,pageSize:2} 278 data:{page:1,pageSize:2}
271 }).then(res => { 279 }).then(res => {
272 - pageteam = res.data.data.pageData; 280 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  281 + pageteam = res.data.data.pageData;
  282 + ee.setData({pageteam: pageteam,})
  283 + }
  284 +
273 }) 285 })
274 286
275 //--当是成团的时候的操作-- 287 //--当是成团的时候的操作--
@@ -277,8 +289,8 @@ Page({ @@ -277,8 +289,8 @@ Page({
277 //设置值 289 //设置值
278 290
279 ee.setData({ 291 ee.setData({
280 - ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, goods: goods, pageteam: pageteam, min_price: min_price,  
281 - order: order, image: original_img, share_img: share_img,max_num:max_num, 292 + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, min_price: min_price,
  293 + order: order, share_img: share_img,max_num:max_num,
282 pindGoods: teamlist,is_show:1, zk:false, 294 pindGoods: teamlist,is_show:1, zk:false,
283 hiddenName: false, ct_price:ct_price,p_status:p_status,sf_arr:sf_arr}); 295 hiddenName: false, ct_price:ct_price,p_status:p_status,sf_arr:sf_arr});
284 296
@@ -290,8 +302,8 @@ Page({ @@ -290,8 +302,8 @@ Page({
290 console.log("239什么鬼", teamlist); 302 console.log("239什么鬼", teamlist);
291 //设置值 303 //设置值
292 ee.setData({ 304 ee.setData({
293 - ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, goods: goods, pageteam: pageteam,  
294 - order: order, image: original_img, p_status: p_status, min_price:min_price, 305 + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup,
  306 + order: order, p_status: p_status, min_price:min_price,
295 share_img: share_img, max_num: max_num, pindGoods: teamlist, is_show: 1, 307 share_img: share_img, max_num: max_num, pindGoods: teamlist, is_show: 1,
296 ct_price: ct_price, p_status: p_status,sf_arr:sf_arr}); 308 ct_price: ct_price, p_status: p_status,sf_arr:sf_arr});
297 } 309 }
@@ -328,6 +340,8 @@ Page({ @@ -328,6 +340,8 @@ Page({
328 // 获取当前时间,同时得到活动结束时间数组 340 // 获取当前时间,同时得到活动结束时间数组
329 var newTime = ut.gettimestamp(); 341 var newTime = ut.gettimestamp();
330 var o = this.data.teamgroup; 342 var o = this.data.teamgroup;
  343 + if(!o) return false;
  344 +
331 var endTime = o.kt_end_time; 345 var endTime = o.kt_end_time;
332 if (o.status == 0) endTime = o.start_time; 346 if (o.status == 0) endTime = o.start_time;
333 347
pages/togoin/togoin.js
@@ -67,7 +67,7 @@ Page({ @@ -67,7 +67,7 @@ Page({
67 that.setData({user:user}) 67 that.setData({user:user})
68 //如果有会员的话,没有sessionKey 68 //如果有会员的话,没有sessionKey
69 if(!e.data.data.sessionKey){ 69 if(!e.data.data.sessionKey){
70 - getApp().showWarning("登成功"); 70 + getApp().showWarning("登成功");
71 getApp().globalData.userInfo=e.data.data; 71 getApp().globalData.userInfo=e.data.data;
72 getApp().globalData.user_id=e.data.data.user_id; 72 getApp().globalData.user_id=e.data.data.user_id;
73 getApp().globalData.openid = e.data.data.weapp_openid; 73 getApp().globalData.openid = e.data.data.weapp_openid;
@@ -89,7 +89,7 @@ Page({ @@ -89,7 +89,7 @@ Page({
89 }) 89 })
90 }, 90 },
91 91
92 - //暂不登,返回上一页 92 + //暂不登,返回上一页
93 cancle_bind:function () { 93 cancle_bind:function () {
94 wx.navigateBack({ delta: 1}) 94 wx.navigateBack({ delta: 1})
95 }, 95 },
pages/togoin/togoin.wxml
@@ -16,20 +16,20 @@ @@ -16,20 +16,20 @@
16 <button hidden="{{user}}" class="getPhoneNumber" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo"> 16 <button hidden="{{user}}" class="getPhoneNumber" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
17 <view class="flex flex-center2 ali-c"> 17 <view class="flex flex-center2 ali-c">
18 <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image> 18 <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image>
19 - <view>微信账号快捷登</view> 19 + <view>微信账号快捷登</view>
20 </view> 20 </view>
21 </button> 21 </button>
22 <!-- 点击显示绑定手机的对话框 --> 22 <!-- 点击显示绑定手机的对话框 -->
23 <button hidden="{{!user}}" class="getPhoneNumber" bindtap="show_bind_mobile"> 23 <button hidden="{{!user}}" class="getPhoneNumber" bindtap="show_bind_mobile">
24 <view class="flex flex-center2 ali-c" > 24 <view class="flex flex-center2 ali-c" >
25 <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image> 25 <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image>
26 - <view>微信账号快捷登</view> 26 + <view>微信账号快捷登</view>
27 </view> 27 </view>
28 </button> 28 </button>
29 </view> 29 </view>
30 30
31 <view class="userlongin flex-center2 flex fs30 jc_sb" style="margin: 0 130rpx"> 31 <view class="userlongin flex-center2 flex fs30 jc_sb" style="margin: 0 130rpx">
32 - <view bindtap="cancle_bind">暂不登</view> 32 + <view bindtap="cancle_bind">暂不登</view>
33 </view> 33 </view>
34 34
35 </view> 35 </view>
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 <view class="cover-layer" bindtap="close_pop"></view> 41 <view class="cover-layer" bindtap="close_pop"></view>
42 <view class="p_content"> 42 <view class="p_content">
43 <view class="p_title flex ali-c fs34"> 43 <view class="p_title flex ali-c fs34">
44 - 请授权绑定手机号完成注册,拒绝将登失败 44 + 请授权绑定手机号完成注册,拒绝将登失败
45 </view> 45 </view>
46 <view class="flex btn_view"> 46 <view class="flex btn_view">
47 <view bindtap="close_pop" style="height: 100%; line-height:normal;" class="txt-center f2 flex ali-c flex-center2 fs36 b_right">拒绝</view> 47 <view bindtap="close_pop" style="height: 100%; line-height:normal;" class="txt-center f2 flex ali-c flex-center2 fs36 b_right">拒绝</view>
pages/user/assistance/task_assistance.js
@@ -203,7 +203,7 @@ Page({ @@ -203,7 +203,7 @@ Page({
203 getApp().my_warnning(data.msg, 0, th); 203 getApp().my_warnning(data.msg, 0, th);
204 return false; 204 return false;
205 } 205 }
206 - if (data.code == 0) { 206 + if (data.code == 0 && data.data && data.data.pageData && data.data.pageData.length>0) {
207 //轮播图的数据 207 //轮播图的数据
208 var data_aissa = data.data.pageData; 208 var data_aissa = data.data.pageData;
209 //当前时间戳 209 //当前时间戳
pages/user/coupons/coupons.js
@@ -229,16 +229,20 @@ Page({ @@ -229,16 +229,20 @@ Page({
229 getApp().request.promiseGet("/api/weshop/users/listQuan", { 229 getApp().request.promiseGet("/api/weshop/users/listQuan", {
230 data:get_data 230 data:get_data
231 }).then(res=>{ 231 }).then(res=>{
232 - var a = res.data,val = a.data.total;  
233 - var details = a.data.pageData;  
234 - if (details.length == 0){  
235 - if(th.data.b_out_arr) th.setData({ number: th.data.b_out_arr.length});  
236 - return false;  
237 - }  
238 -  
239 - var all_length=val+th.data.b_out_arr.length;  
240 - th.setData({ number: all_length});  
241 - 232 +
  233 + if(res.data.code==0 && res.data){
  234 + var a = res.data,val = a.data.total;
  235 + var details = a.data.pageData;
  236 + if (details.length == 0){
  237 + if(th.data.b_out_arr) th.setData({ number: th.data.b_out_arr.length});
  238 + return false;
  239 + }
  240 + var all_length=val;
  241 + if(th.data.b_out_arr) all_length+=th.data.b_out_arr.length;
  242 + th.setData({ number: all_length});
  243 + }
  244 +
  245 +
242 }) 246 })
243 }, 247 },
244 248
pages/user/coupons/coupons.wxml
@@ -63,7 +63,8 @@ @@ -63,7 +63,8 @@
63 <view wx:else> 63 <view wx:else>
64 <view class="text">有效期:不限</view> 64 <view class="text">有效期:不限</view>
65 </view> 65 </view>
66 - <view class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}} 66 + <view wx:if="{{detail.Remark}}" class="textss">{{detail.Remark}}</view>
  67 + <view wx:else class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}
67 </view> 68 </view>
68 69
69 </view> 70 </view>
pages/user/index/index.js
@@ -143,12 +143,15 @@ Page({ @@ -143,12 +143,15 @@ Page({
143 /*-----获取线下会员的预存款和优惠券的数量-----*/ 143 /*-----获取线下会员的预存款和优惠券的数量-----*/
144 rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + e.user_id, { 144 rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + e.user_id, {
145 success: function(su) { 145 success: function(su) {
146 - var data = su.data.data;  
147 - if(!data) data={};  
148 - data.cashcount = parseInt(data.cashcount);  
149 - s.setData({  
150 - udata: data,  
151 - }); 146 + if(su.data.code==0 && su.data.data ) {
  147 + var data = su.data.data;
  148 + if(!data) data={};
  149 + data.cashcount = parseInt(data.cashcount);
  150 + s.setData({
  151 + udata: data,
  152 + });
  153 + }
  154 +
152 } 155 }
153 }) 156 })
154 /*-----获取会员提现金额-----*/ 157 /*-----获取会员提现金额-----*/
pages/user/integral/filter.wxs
@@ -2,8 +2,14 @@ var numFr = { @@ -2,8 +2,14 @@ var numFr = {
2 getNum: function(x) { 2 getNum: function(x) {
3 var f = parseInt(x); 3 var f = parseInt(x);
4 return f; 4 return f;
  5 + },
  6 + getval: function(x,n) {
  7 + var f = parseFloat(x);
  8 + f=f.toFixed(n);
  9 + return f;
5 } 10 }
6 } 11 }
7 module.exports = { 12 module.exports = {
8 - getNum: numFr.getNum 13 + getNum: numFr.getNum,
  14 + getval: numFr.getval,
9 } 15 }
10 \ No newline at end of file 16 \ No newline at end of file
pages/user/integral/integral.js
@@ -73,13 +73,15 @@ Page({ @@ -73,13 +73,15 @@ Page({
73 await getApp().request.promiseGet("/api/weshop/users/listPoints", { 73 await getApp().request.promiseGet("/api/weshop/users/listPoints", {
74 data: get_data 74 data: get_data
75 }).then(res => { 75 }).then(res => {
  76 +
76 var msg = res.data; 77 var msg = res.data;
77 - details = msg.data.pageData;  
78 - if (details.length == 0) { 78 + if(!msg || !msg.data.pageData || msg.data.pageData.length == 0){
79 this.data.is_no_more = 1; 79 this.data.is_no_more = 1;
80 getApp().showWarning("未找更多数据"); 80 getApp().showWarning("未找更多数据");
81 return false; 81 return false;
82 } 82 }
  83 +
  84 + details = msg.data.pageData;
83 details.forEach(function (val, ind) { 85 details.forEach(function (val, ind) {
84 big_arr.push(val); 86 big_arr.push(val);
85 }) 87 })
pages/user/integral/integral.wxml
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 <view class="money-rim"> 55 <view class="money-rim">
56 <view class="tosum"> 56 <view class="tosum">
57 <view class="rbm">¥</view> 57 <view class="rbm">¥</view>
58 - <text class='f_big'>{{filter.getNum(result.ToSum)}}</text> 58 + <text class='f_big'>{{filter.getval(result.ToSum,2)}}</text>
59 </view> 59 </view>
60 </view> 60 </view>
61 <view class='mb20'>充值{{result.Integral}}积分</view> 61 <view class='mb20'>充值{{result.Integral}}积分</view>
@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 <view class="text">充值{{integral}}积分</view> 74 <view class="text">充值{{integral}}积分</view>
75 <view class="min-rim"> 75 <view class="min-rim">
76 <view class="fh">¥</view> 76 <view class="fh">¥</view>
77 - <view class="value">{{filter.getNum(money)}}</view> 77 + <view class="value">{{filter.getval(money,2)}}</view>
78 </view> 78 </view>
79 </view> 79 </view>
80 <view class="bk"> 80 <view class="bk">
pages/user/integral/query/index.js
@@ -168,19 +168,19 @@ Page({ @@ -168,19 +168,19 @@ Page({
168 }).then(res => { 168 }).then(res => {
169 169
170 var details = res.data; 170 var details = res.data;
171 - console.log(details, "iiii");  
172 - var details = details.data.pageData;  
173 - console.log(details, "aaa");  
174 171
175 - if (details.length == 0) { 172 +
  173 +
  174 +
  175 + if (!details.data || details.data.pageData.length == 0) {
176 // this.data.is_no_more = 1; 176 // this.data.is_no_more = 1;
177 - console.log("无极剑圣", details);  
178 -  
179 getApp().showWarning("未找更多数据"); 177 getApp().showWarning("未找更多数据");
180 return false; 178 return false;
181 } 179 }
182 - console.log("不空", details);  
183 - console.log("长度", details.length); 180 +
  181 + var details = details.data.pageData;
  182 +
  183 +
184 details.forEach(function (val, ind) { 184 details.forEach(function (val, ind) {
185 big_arr.push(val); 185 big_arr.push(val);
186 }) 186 })
pages/user/member/account/account.js
@@ -100,16 +100,15 @@ Page({ @@ -100,16 +100,15 @@ Page({
100 data: get_data, isShowLoading:1 100 data: get_data, isShowLoading:1
101 }).then(res => { 101 }).then(res => {
102 var details = res.data; 102 var details = res.data;
103 - // console.log(details, "iiii");  
104 - var details=details.data.pageData;  
105 - //console.log(details,"aaa");  
106 103
107 - if (details.length== 0){ 104 + if (!details || !details.data || !details.data.pageData || details.data.pageData.length== 0){
108 this.data.is_no_more=1; 105 this.data.is_no_more=1;
109 getApp().showWarning("未找更多数据"); 106 getApp().showWarning("未找更多数据");
110 107
111 return false; 108 return false;
112 } 109 }
  110 +
  111 + var details=details.data.pageData;
113 // console.log("不空", details); 112 // console.log("不空", details);
114 // console.log("长度", details.length); 113 // console.log("长度", details.length);
115 details.forEach(function(val,ind){ 114 details.forEach(function(val,ind){
pages/user/member/account_unable/account_unable.js
@@ -99,17 +99,16 @@ Page({ @@ -99,17 +99,16 @@ Page({
99 await getApp().request.promiseGet("/api/weshop/users/pageUnablereCord", { 99 await getApp().request.promiseGet("/api/weshop/users/pageUnablereCord", {
100 data: get_data, isShowLoading: 1 100 data: get_data, isShowLoading: 1
101 }).then(res => { 101 }).then(res => {
  102 +
102 var details = res.data; 103 var details = res.data;
103 - // console.log(details, "iiii");  
104 - var details = details.data.pageData;  
105 - //console.log(details,"aaa");  
106 104
107 - if (details.length == 0) { 105 + if ( !details || !details.data || !details.data.pageData || details.data.pageData.length == 0) {
108 this.data.is_no_more = 1; 106 this.data.is_no_more = 1;
109 getApp().showWarning("未找更多数据"); 107 getApp().showWarning("未找更多数据");
110 -  
111 return false; 108 return false;
112 } 109 }
  110 +
  111 + var details = details.data.pageData;
113 // console.log("不空", details); 112 // console.log("不空", details);
114 // console.log("长度", details.length); 113 // console.log("长度", details.length);
115 details.forEach(function (val, ind) { 114 details.forEach(function (val, ind) {
pages/user/member/cash_record/cash_record.js
@@ -110,17 +110,14 @@ Page({ @@ -110,17 +110,14 @@ Page({
110 data: get_data, isShowLoading: 1 110 data: get_data, isShowLoading: 1
111 }).then(res => { 111 }).then(res => {
112 var details = res.data; 112 var details = res.data;
113 - console.log(details, "iiii");  
114 - var details = details.data.pageData;  
115 - console.log(details, "aaa");  
116 113
117 - if (details.length == 0) { 114 + if (!details || !details.data || !details.data.pageData || details.data.pageData.length == 0) {
118 this.data.is_no_more = 1; 115 this.data.is_no_more = 1;
119 getApp().showWarning("未找更多数据"); 116 getApp().showWarning("未找更多数据");
120 return false; 117 return false;
121 } 118 }
122 - console.log("不空", details);  
123 - console.log("长度", details.length); 119 + var details = details.data.pageData;
  120 +
124 details.forEach(function (val, ind) { 121 details.forEach(function (val, ind) {
125 big_arr.push(val); 122 big_arr.push(val);
126 }) 123 })
pages/user/return_goods_list/return_goods_list.js
@@ -15,7 +15,7 @@ Page({ @@ -15,7 +15,7 @@ Page({
15 }, 15 },
16 onLoad: function() { 16 onLoad: function() {
17 var th=this,ts=s; 17 var th=this,ts=s;
18 - //确保有登 18 + //确保有登
19 e.getUserInfo(function(){ 19 e.getUserInfo(function(){
20 ts.init(th, "", "list"), th.requestReturnGoods(); 20 ts.init(th, "", "list"), th.requestReturnGoods();
21 }) 21 })