Commit 4ab8b280fb514d17cd8539fc0309af108afa5344
Merge branch 'test' into 'qa'
Test See merge request !590
Showing
48 changed files
with
350 additions
and
450 deletions
app.js
| ... | ... | @@ -178,7 +178,7 @@ App({ |
| 178 | 178 | success: function (o) { |
| 179 | 179 | console.log('getwuliu'); |
| 180 | 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 | 182 | var arr = o.data.data.pageData; |
| 183 | 183 | console.log(arr); |
| 184 | 184 | arr.forEach(function(item,index){ | ... | ... |
app.json
| 1 | 1 | { |
| 2 | 2 | "pages": [ |
| 3 | 3 | "pages/index/index/index", |
| 4 | - "pages/justTest/justTest", | |
| 5 | 4 | "pages/goods/categoryList/categoryList", |
| 6 | 5 | "pages/cart/cart/cart", |
| 7 | 6 | "pages/cart/cart2/cart2", |
| ... | ... | @@ -86,11 +85,18 @@ |
| 86 | 85 | "pages/video/index", |
| 87 | 86 | "pages/template/index", |
| 88 | 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 | 97 | "plugins": { |
| 92 | 98 | "live-player-plugin": { |
| 93 | - "version": "1.1.1", | |
| 99 | + "version": "1.2.1", | |
| 94 | 100 | "provider": "wx2b03c6e691cd7370" |
| 95 | 101 | } |
| 96 | 102 | }, | ... | ... |
components/diy_goodsGroup/diy_goodsGroup.js
components/diy_pingd_buy/diy_pingd_buy.js
components/diy_seckill/diy_seckill.js
components/diy_service/diy_service.wxml
components/diy_shopname/diy_shopname.js
| ... | ... | @@ -27,15 +27,21 @@ Component({ |
| 27 | 27 | //--所有商品-- |
| 28 | 28 | getApp().request.promiseGet("/api/weshop/goods/page/", |
| 29 | 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 | 38 | getApp().request.promiseGet("/api/weshop/goods/page/", |
| 36 | 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 | 3 | <view class="big"> |
| 4 | 4 | |
| 5 | 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 | 7 | </view> |
| 8 | 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 | 12 | <view class="circle"> |
| 12 | 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 | 15 | </view> |
| 15 | 16 | </view> |
| 16 | 17 | <view class="font">{{store_name}}</view> |
| 17 | 18 | </view> |
| 19 | + </view> | |
| 18 | 20 | |
| 19 | 21 | <view class="all_view"> |
| 20 | 22 | <view class="v_item" bindtap="go_all_wares"> |
| ... | ... | @@ -36,8 +38,7 @@ |
| 36 | 38 | </view> |
| 37 | 39 | </block> |
| 38 | 40 | |
| 39 | - | |
| 40 | - <block wx:else="{{object.style==2}}"> | |
| 41 | + <block wx:if="{{object.style==2}}"> | |
| 41 | 42 | <view class="big_border_two"> |
| 42 | 43 | <view class="circle_tow"> |
| 43 | 44 | <view class="border"> |
| ... | ... | @@ -48,35 +49,38 @@ |
| 48 | 49 | <view class="fonts">{{store_name}}</view> |
| 49 | 50 | </view> |
| 50 | 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 | 52 | </block> |
| 80 | 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 | 85 | </view> |
| 82 | 86 | ... | ... |
components/diy_shopname/diy_shopname.wxss
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | text-align:center; |
| 5 | 5 | margin:0 auto; |
| 6 | 6 | position: relative; |
| 7 | - height: 500rpx; | |
| 7 | + /* height: 500rpx; */ | |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | .s1_gk_a1{ |
| ... | ... | @@ -15,11 +15,9 @@ |
| 15 | 15 | |
| 16 | 16 | /* 圆形小图片 */ |
| 17 | 17 | .wxd_ww { |
| 18 | - width: 126rpx; | |
| 19 | - height: 126rpx; | |
| 18 | + width: 100%; | |
| 19 | + height: 100%; | |
| 20 | 20 | /* justify-content: center; */ |
| 21 | - margin-top: 20rpx; | |
| 22 | - margin-left: 6rpx; | |
| 23 | 21 | } |
| 24 | 22 | |
| 25 | 23 | /* 小图片圆边框 */ |
| ... | ... | @@ -43,8 +41,8 @@ |
| 43 | 41 | /* 设置小图片外面的view的宽高 */ |
| 44 | 42 | |
| 45 | 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 | 50 | .big_border { |
| 53 | 51 | width: 192rpx; |
| 54 | 52 | height: 214rpx; |
| 55 | - position: relative; | |
| 53 | + position: absolute; | |
| 56 | 54 | top: -82rpx; |
| 57 | 55 | left: 10px; |
| 58 | 56 | } |
| ... | ... | @@ -69,7 +67,7 @@ |
| 69 | 67 | |
| 70 | 68 | .big_picture_border { |
| 71 | 69 | width: 100%; |
| 72 | - height: 320rpx; | |
| 70 | + /* height: 320rpx; */ | |
| 73 | 71 | } |
| 74 | 72 | |
| 75 | 73 | |
| ... | ... | @@ -140,9 +138,10 @@ left:-116rpx; |
| 140 | 138 | .big_border_two { |
| 141 | 139 | width: 100%; |
| 142 | 140 | height: 260rpx; |
| 143 | - position: relative; | |
| 144 | - top: -274rpx; | |
| 141 | + position: absolute; | |
| 142 | + top: -130rpx; | |
| 145 | 143 | text-align: center; |
| 144 | + margin-top: 50%; | |
| 146 | 145 | } |
| 147 | 146 | |
| 148 | 147 | /* 小图片2圆边框 */ |
| ... | ... | @@ -189,7 +188,6 @@ left:-116rpx; |
| 189 | 188 | width: 100%; |
| 190 | 189 | height: 120rpx; |
| 191 | 190 | position: relative; |
| 192 | - top: -250rpx; | |
| 193 | 191 | } |
| 194 | 192 | /* 使里面的view纵向排列 */ |
| 195 | 193 | .arrange{ |
| ... | ... | @@ -223,11 +221,11 @@ left:-116rpx; |
| 223 | 221 | } |
| 224 | 222 | .wai_zwp{ |
| 225 | 223 | background-color: white; |
| 226 | - height: 500rpx; | |
| 224 | + /* height: 500rpx; */ | |
| 227 | 225 | } |
| 228 | 226 | |
| 229 | 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 | 229 | .big .all_view .v_item{width:33%; } |
| 232 | 230 | |
| 233 | 231 | .big_border_two .title_center{ display: flex; justify-content: center;} | ... | ... |
components/goods_list/goods_list.js
| ... | ... | @@ -24,7 +24,7 @@ Component({ |
| 24 | 24 | ready: function () { |
| 25 | 25 | }, |
| 26 | 26 | pageLifetimes:{ |
| 27 | - //要处理一下,游客登陆后的界面的变化,主要还该是改变会员 | |
| 27 | + //要处理一下,游客登录后的界面的变化,主要还该是改变会员 | |
| 28 | 28 | show: function () { |
| 29 | 29 | this.init(); |
| 30 | 30 | } |
| ... | ... | @@ -151,6 +151,16 @@ Component({ |
| 151 | 151 | var th = this; |
| 152 | 152 | getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, |
| 153 | 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 | 164 | var plusCard = res.data.data; |
| 155 | 165 | var arr = [1219, 2089, 3031]; |
| 156 | 166 | var new_arr = new Array(); | ... | ... |
images/share/miao_share.png
packageA/pages/activity_share/activity_share.js
| ... | ... | @@ -59,7 +59,7 @@ Page({ |
| 59 | 59 | var StaffId=options.StaffId; |
| 60 | 60 | var StorageId=options.StorageId; |
| 61 | 61 | if(first_leader){ |
| 62 | - //-- user_id代过来免登陆 -- | |
| 62 | + //-- user_id代过来免登录 -- | |
| 63 | 63 | getApp().globalData.user_id=first_leader; |
| 64 | 64 | getApp().getUserFir(); |
| 65 | 65 | |
| ... | ... | @@ -466,6 +466,13 @@ Page({ |
| 466 | 466 | var storid = oo.stoid; |
| 467 | 467 | var th = this; |
| 468 | 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 | 476 | var plusCard = res.data.data; |
| 470 | 477 | var arr = [1219, 2089, 3031]; |
| 471 | 478 | var new_arr = new Array(); | ... | ... |
packageA/pages/goods_share/goods_share.js
| ... | ... | @@ -36,7 +36,7 @@ Page({ |
| 36 | 36 | var StaffId=options.StaffId; |
| 37 | 37 | var StorageId=options.StorageId; |
| 38 | 38 | if(first_leader){ |
| 39 | - //-- user_id代过来免登陆 -- | |
| 39 | + //-- user_id代过来免登录 -- | |
| 40 | 40 | getApp().globalData.user_id=first_leader; |
| 41 | 41 | getApp().getUserFir(); |
| 42 | 42 | |
| ... | ... | @@ -281,6 +281,13 @@ Page({ |
| 281 | 281 | var storid = oo.stoid; |
| 282 | 282 | var th = this; |
| 283 | 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 | 291 | var plusCard = res.data.data; |
| 285 | 292 | var arr = [1219, 2089, 3031]; |
| 286 | 293 | var new_arr = new Array(); | ... | ... |
packageA/pages/jfbuy/jfbuy.js
| ... | ... | @@ -80,7 +80,7 @@ Page({ |
| 80 | 80 | // //接受有没有导购的参数 |
| 81 | 81 | // var first_leader=options.first_leader; |
| 82 | 82 | // if(first_leader){ |
| 83 | - // //-- user_id代过来免登陆 -- | |
| 83 | + // //-- user_id代过来免登录 -- | |
| 84 | 84 | // getApp().globalData.user_id=first_leader; |
| 85 | 85 | // getApp().getUserFir(); |
| 86 | 86 | // } |
| ... | ... | @@ -297,7 +297,7 @@ Page({ |
| 297 | 297 | // 关闭加载状态 |
| 298 | 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 | 301 | if(res.data.data.pageData.length>0) { |
| 302 | 302 | th.data.currentPage2++; |
| 303 | 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 | 403 | var storageId=options.storageId; |
| 404 | 404 | |
| 405 | 405 | if(first_leader){ |
| 406 | - //-- user_id代过来免登陆 -- | |
| 406 | + //-- user_id代过来免登录 -- | |
| 407 | 407 | getApp().globalData.first_leader=first_leader; |
| 408 | 408 | //调用接口判断是不是会员 |
| 409 | 409 | getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+o.stoid+"/"+first_leader,{}).then(res=>{ | ... | ... |
packageA/pages/live_share/live_share.js
packageA/pages/prom_list/prom_list.js
| ... | ... | @@ -39,6 +39,7 @@ Page({ |
| 39 | 39 | goodsInputNum:1, |
| 40 | 40 | g_buy_num: null, |
| 41 | 41 | sele_collocation:null, |
| 42 | + | |
| 42 | 43 | }, |
| 43 | 44 | |
| 44 | 45 | //------初始化加载---------- |
| ... | ... | @@ -108,7 +109,7 @@ Page({ |
| 108 | 109 | getApp().request.promiseGet("/api/weshop/pickup/list",{ |
| 109 | 110 | data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon}, |
| 110 | 111 | }).then(res=>{ |
| 111 | - if(res.data.code==0){ | |
| 112 | + if(res.data.code==0 && res.data.data && res.data.data.pageData){ | |
| 112 | 113 | e=res.data.data.pageData[0]; |
| 113 | 114 | if (e){ |
| 114 | 115 | appd.pk_store=e; |
| ... | ... | @@ -240,20 +241,22 @@ Page({ |
| 240 | 241 | }else{ |
| 241 | 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 | 262 | if ( t.data.data.prom_type == 5){ |
| ... | ... | @@ -273,7 +276,7 @@ Page({ |
| 273 | 276 | } |
| 274 | 277 | //---通过接口获取门店的线下库存信息-- |
| 275 | 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 | 281 | }).then(res=>{ |
| 279 | 282 | if(res.data.code==0 && res.data.data.total>0){ |
| ... | ... | @@ -413,7 +416,7 @@ Page({ |
| 413 | 416 | var pick=th.get_pick_from_list(th.data.sto_sele_id) |
| 414 | 417 | //---通过接口获取门店的线下库存信息-- |
| 415 | 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 | 420 | success:function(res){ |
| 418 | 421 | if(res.data.code==0){ |
| 419 | 422 | if(res.data.data.pageData.length>0){ |
| ... | ... | @@ -722,7 +725,7 @@ Page({ |
| 722 | 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 | 729 | th.setData({ |
| 727 | 730 | def_pick_store:e.data.data.pageData[0], |
| 728 | 731 | sto_sele_name: e.data.data.pageData[0].pickup_name, |
| ... | ... | @@ -905,7 +908,7 @@ Page({ |
| 905 | 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 | 912 | th.setData({ |
| 910 | 913 | def_pick_store:e.data.data.pageData[0], |
| 911 | 914 | sto_sele_name: e.data.data.pageData[0].pickup_name, |
| ... | ... | @@ -942,7 +945,7 @@ Page({ |
| 942 | 945 | } |
| 943 | 946 | //---通过接口获取门店的线下库存信息-- |
| 944 | 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 | 950 | }).then(res=>{ |
| 948 | 951 | if(res.data.code==0){ |
| ... | ... | @@ -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 | 1156 | wx.getLocation({ |
| 1154 | 1157 | type: 'gcj02', |
| 1155 | 1158 | success: function(res) { |
| ... | ... | @@ -1300,7 +1303,7 @@ Page({ |
| 1300 | 1303 | }) |
| 1301 | 1304 | //读取线下的门店库存 |
| 1302 | 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 | 1307 | }).then(res=>{ |
| 1305 | 1308 | if(res.data.code==0 && res.data.data.total>0){ |
| 1306 | 1309 | plist=res.data.data.pageData[0]; |
| ... | ... | @@ -1478,7 +1481,7 @@ Page({ |
| 1478 | 1481 | th.data.t_time = setInterval(function() { |
| 1479 | 1482 | if (th.data.bconfig == null) false; |
| 1480 | 1483 | var e = th.data.bconfig; |
| 1481 | - if (e.is_sort_storage) { | |
| 1484 | + if (e && e.is_sort_storage) { | |
| 1482 | 1485 | wx.getLocation({ |
| 1483 | 1486 | type: 'gcj02', |
| 1484 | 1487 | success: function(res) { |
| ... | ... | @@ -1526,6 +1529,13 @@ Page({ |
| 1526 | 1529 | var storid = os.stoid; |
| 1527 | 1530 | var th = this; |
| 1528 | 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 | 1539 | var plusCard = res.data.data; |
| 1530 | 1540 | var arr = [1219, 2089, 3031]; |
| 1531 | 1541 | var new_arr = new Array(); | ... | ... |
packageA/pages/quan/quan.js
packageA/pages/quan_pro/quan_pro.js
| ... | ... | @@ -23,7 +23,7 @@ Page({ |
| 23 | 23 | var th = this; |
| 24 | 24 | var first_leader=t.first_leader; |
| 25 | 25 | if(first_leader){ |
| 26 | - //-- user_id代过来免登陆 -- | |
| 26 | + //-- user_id代过来免登录 -- | |
| 27 | 27 | getApp().globalData.first_leader=first_leader; |
| 28 | 28 | //调用接口判断是不是会员 |
| 29 | 29 | getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ | ... | ... |
pages/cart/cart/cart.js
pages/cart/cart2/cart2.js
| ... | ... | @@ -668,7 +668,10 @@ Page({ |
| 668 | 668 | th.setData({collocation_goods:gg.collocation_goods}); |
| 669 | 669 | |
| 670 | 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 | 675 | narr.push(t.data.data); |
| 673 | 676 | var ie = { |
| 674 | 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 | 1010 | WareIds: cart_item.check_quan_ware_list |
| 1008 | 1011 | } |
| 1009 | 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 | 1014 | var q_data = res.data.data; |
| 1012 | 1015 | //--存储商品优惠的内容-- |
| 1013 | 1016 | cart_item.quan_youhui_list = q_data; |
| ... | ... | @@ -1337,6 +1340,9 @@ Page({ |
| 1337 | 1340 | //---------计算立即购买---------- |
| 1338 | 1341 | calculatePrice2: function () { |
| 1339 | 1342 | var th = this, good = this.data.bn_goods; |
| 1343 | + | |
| 1344 | + if(!good) return false; | |
| 1345 | + | |
| 1340 | 1346 | //搭配的计算要用购物的车计算方法 |
| 1341 | 1347 | if(good.prom_type==5){ |
| 1342 | 1348 | th.calculatePrice(); |
| ... | ... | @@ -1378,7 +1384,7 @@ Page({ |
| 1378 | 1384 | await getApp().request.promiseGet("/api/weshop/couponList/getUseCouponPrice",{ |
| 1379 | 1385 | data:{storeId:oo.stoid,CashRepNo:quan_no, WaresSum:th.data.ckeck_quan_price, WareIds:th.data.check_quan_ware_list} |
| 1380 | 1386 | }).then(res=>{ |
| 1381 | - if(res.data.code==0){ | |
| 1387 | + if(res.data.code==0 && res.data.data && res.data.data.length>0 ){ | |
| 1382 | 1388 | quan_price=res.data.data[0].WareCashSum; |
| 1383 | 1389 | } |
| 1384 | 1390 | }) |
| ... | ... | @@ -2027,7 +2033,7 @@ Page({ |
| 2027 | 2033 | },// 设置请求的 header |
| 2028 | 2034 | success: function (res) { |
| 2029 | 2035 | |
| 2030 | - th.data.is_summit_ing=0; //是否提交中 | |
| 2036 | + | |
| 2031 | 2037 | wx.hideLoading(); |
| 2032 | 2038 | if (res.statusCode == 200) { |
| 2033 | 2039 | var data=res.data; |
| ... | ... | @@ -2110,6 +2116,7 @@ Page({ |
| 2110 | 2116 | return; |
| 2111 | 2117 | }else if(res.confirm){ |
| 2112 | 2118 | th.data.is_continue=1; |
| 2119 | + th.data.is_summit_ing=0; //是否提交中 | |
| 2113 | 2120 | th.submitForm(sub_value); |
| 2114 | 2121 | } |
| 2115 | 2122 | } |
| ... | ... | @@ -2120,8 +2127,10 @@ Page({ |
| 2120 | 2127 | msg=msg.slice(0, 13) + "\r\n"+ msg.slice(13); |
| 2121 | 2128 | } |
| 2122 | 2129 | getApp().confirmBox(msg); |
| 2130 | + th.data.is_summit_ing=0; //是否提交中 | |
| 2123 | 2131 | } |
| 2124 | 2132 | }else{ |
| 2133 | + th.data.is_summit_ing=0; //是否提交中 | |
| 2125 | 2134 | console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode); |
| 2126 | 2135 | } |
| 2127 | 2136 | }, |
| ... | ... | @@ -2164,7 +2173,7 @@ Page({ |
| 2164 | 2173 | }) |
| 2165 | 2174 | //读取线下的门店库存 |
| 2166 | 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 | 2177 | }).then(res=>{ |
| 2169 | 2178 | if(res.data.code==0){ |
| 2170 | 2179 | plist=res.data.data.pageData[0]; |
| ... | ... | @@ -2839,8 +2848,10 @@ Page({ |
| 2839 | 2848 | //getApp().waitfor2(this,"g_cart_q_time","order_prom_list_cart",async function () { |
| 2840 | 2849 | //var arr=th.data.order_prom_list_cart; |
| 2841 | 2850 | var arr=order_prom_list_cart; |
| 2851 | + if(!arr) arr=[]; | |
| 2842 | 2852 | //如果系统有限制使用优惠券 |
| 2843 | 2853 | if(th.data.is_close_quan) return false; |
| 2854 | + | |
| 2844 | 2855 | //------------开始计算使用优惠券相关------------ |
| 2845 | 2856 | for(var ind in arr){ |
| 2846 | 2857 | var ep=arr[ind]; | ... | ... |
pages/cart/cart2_pt/cart2_pt.js
| ... | ... | @@ -585,7 +585,7 @@ Page({ |
| 585 | 585 | 'content-type': 'application/json' |
| 586 | 586 | },// 设置请求的 header |
| 587 | 587 | success: function (res) { |
| 588 | - th.data.is_summit_ing=0; //是否提交中 | |
| 588 | + | |
| 589 | 589 | wx.hideLoading(); |
| 590 | 590 | if (res.statusCode == 200) { |
| 591 | 591 | var data=res.data; |
| ... | ... | @@ -613,15 +613,18 @@ Page({ |
| 613 | 613 | // }, 1); |
| 614 | 614 | util_pay.pay(data.data, function() { |
| 615 | 615 | setTimeout(function () { |
| 616 | - wx.navigateTo({ | |
| 616 | + wx.reLaunch({ | |
| 617 | 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 | 620 | },1000) |
| 621 | 621 | }, function () { |
| 622 | 622 | //支付失败 |
| 623 | 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 | 628 | },1000) |
| 626 | 629 | |
| 627 | 630 | },oo.stoid,1); |
| ... | ... | @@ -647,9 +650,12 @@ Page({ |
| 647 | 650 | url: "/pages/user/order_list/order_list", |
| 648 | 651 | })--*/ |
| 649 | 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 | 657 | }else{ |
| 652 | - wx.navigateTo({ | |
| 658 | + wx.reLaunch({ | |
| 653 | 659 | url: "/pages/team/team_success/team_success?ordersn=" + data.data, |
| 654 | 660 | }) |
| 655 | 661 | } |
| ... | ... | @@ -661,13 +667,16 @@ Page({ |
| 661 | 667 | } |
| 662 | 668 | } |
| 663 | 669 | else{ |
| 670 | + th.data.is_summit_ing=0; //是否提交中 | |
| 664 | 671 | getApp().confirmBox(data.msg); |
| 665 | 672 | } |
| 666 | 673 | } else { |
| 674 | + th.data.is_summit_ing=0; //是否提交中 | |
| 667 | 675 | console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode); |
| 668 | 676 | } |
| 669 | 677 | }, |
| 670 | 678 | fail: function () { |
| 679 | + th.data.is_summit_ing=0; //是否提交中 | |
| 671 | 680 | wx.hideLoading(); |
| 672 | 681 | console.log("index.js wx.request CheckCallUser fail"); |
| 673 | 682 | }, | ... | ... |
pages/cart/cart4/cart4.js
| ... | ... | @@ -27,7 +27,7 @@ Page({ |
| 27 | 27 | data:data, |
| 28 | 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 | 32 | rs.data.data.pageData.forEach(function(ie,ind){ |
| 33 | 33 | order_m+=ie.order_amount; | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.js
| ... | ... | @@ -41,7 +41,7 @@ Page({ |
| 41 | 41 | //-- 获取分享人的ID -- |
| 42 | 42 | var first_leader=options.first_leader; |
| 43 | 43 | if(first_leader){ |
| 44 | - //-- user_id代过来免登陆 -- | |
| 44 | + //-- user_id代过来免登录 -- | |
| 45 | 45 | getApp().globalData.first_leader=first_leader; |
| 46 | 46 | //调用接口判断是不是会员 |
| 47 | 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 | 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 | 868 | onHide: function() { |
| 865 | 869 | this.data.is_timer = 0; |
| 866 | 870 | for(var i = 1; i < 100; i++) { |
| ... | ... | @@ -2111,7 +2115,7 @@ Page({ |
| 2111 | 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 | 2119 | th.setData({ |
| 2116 | 2120 | def_pick_store:e.data.data.pageData[0], |
| 2117 | 2121 | sto_sele_name: e.data.data.pageData[0].pickup_name, |
| ... | ... | @@ -2300,7 +2304,7 @@ Page({ |
| 2300 | 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 | 2308 | th.setData({ |
| 2305 | 2309 | def_pick_store:e.data.data.pageData[0], |
| 2306 | 2310 | sto_sele_name: e.data.data.pageData[0].pickup_name, |
| ... | ... | @@ -2782,15 +2786,17 @@ Page({ |
| 2782 | 2786 | } |
| 2783 | 2787 | }).then(res => { |
| 2784 | 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 | 2802 | } else { |
| ... | ... | @@ -3127,7 +3133,12 @@ Page({ |
| 3127 | 3133 | } |
| 3128 | 3134 | }); |
| 3129 | 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 | 3142 | url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn, |
| 3132 | 3143 | }); |
| 3133 | 3144 | } else { |
| ... | ... | @@ -3335,17 +3346,24 @@ Page({ |
| 3335 | 3346 | |
| 3336 | 3347 | //-------跳转pt商品------- |
| 3337 | 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 | 3354 | //-------跳转pt teamshow------- |
| 3344 | 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 | 3443 | } |
| 3426 | 3444 | }); |
| 3427 | 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 | 3454 | } else { |
| 3432 | 3455 | wx.navigateTo({ |
| 3433 | 3456 | url: "/pages/team/team_show/team_show?tg_id=" + id, |
| ... | ... | @@ -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 | 4322 | wx.getLocation({ |
| 4300 | 4323 | type: 'gcj02', |
| 4301 | 4324 | success: function(res) { |
| ... | ... | @@ -4636,7 +4659,7 @@ Page({ |
| 4636 | 4659 | var t_time = setInterval(function() { |
| 4637 | 4660 | if (th.data.bconfig == null) false; |
| 4638 | 4661 | var e = th.data.bconfig; |
| 4639 | - if (e.is_sort_storage) { | |
| 4662 | + if (e && e.is_sort_storage) { | |
| 4640 | 4663 | wx.getLocation({ |
| 4641 | 4664 | type: 'gcj02', |
| 4642 | 4665 | success: function(res) { | ... | ... |
pages/goods/goodsList/goodsList.js
| ... | ... | @@ -128,7 +128,7 @@ Page({ |
| 128 | 128 | //-- 获取 -- |
| 129 | 129 | await getApp().request.promiseGet("/api/weshop/libao/libaoForm/page?id="+content.libao+"&store_id="+oo.stoid, { |
| 130 | 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 | 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 | 85 | } |
| 86 | 86 | |
| 87 | 87 | if(first_leader){ |
| 88 | - //-- user_id代过来免登陆 -- | |
| 88 | + //-- user_id代过来免登录 -- | |
| 89 | 89 | getApp().globalData.first_leader=first_leader; |
| 90 | 90 | //调用接口判断是不是会员 |
| 91 | 91 | getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ |
| ... | ... | @@ -478,6 +478,9 @@ Page({ |
| 478 | 478 | this.data.recommend = null, this.data.currentPage = 1, n.resetConfig(), this.requestHomePage(), |
| 479 | 479 | this.requestRecommend(); |
| 480 | 480 | }, |
| 481 | + requestRecommend(){}, | |
| 482 | + requestHomePage(){}, | |
| 483 | + | |
| 481 | 484 | onUnload: function() { |
| 482 | 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 | 0 | \ No newline at end of file |
pages/justTest/justTest.json deleted
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 | 0 | \ No newline at end of file |
pages/team/team_more/team_more.js
| ... | ... | @@ -112,6 +112,8 @@ Page({ |
| 112 | 112 | // 获取当前时间,同时得到活动结束时间数组 |
| 113 | 113 | var newTime = ut.gettimestamp(); |
| 114 | 114 | var List = this.data.teamgroup; |
| 115 | + if(!List || List.length<=0) return false; | |
| 116 | + | |
| 115 | 117 | for (var j = 0; j < List.length; j++) { |
| 116 | 118 | // 对结束时间进行处理渲染到页面 |
| 117 | 119 | var endTime = List[j].kt_end_time; | ... | ... |
pages/team/team_show/team_show.js
| ... | ... | @@ -363,24 +363,31 @@ Page({ |
| 363 | 363 | //获取活动从表信息team_id,listno团编号(券号) |
| 364 | 364 | await getApp().request.promiseGet("/api/weshop/teamgroup/get/"+os.stoid+"/"+tg_id, { |
| 365 | 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 | 976 | return false; |
| 970 | 977 | } |
| 971 | 978 | |
| 972 | - if (bconfig.is_sort_storage) { | |
| 979 | + if ( bconfig && bconfig.is_sort_storage) { | |
| 973 | 980 | wx.getLocation({ |
| 974 | 981 | type: 'gcj02', |
| 975 | 982 | success: function(res) { |
| ... | ... | @@ -1034,7 +1041,7 @@ Page({ |
| 1034 | 1041 | var t_time = setInterval(function() { |
| 1035 | 1042 | if (th.data.bconfig == null) false; |
| 1036 | 1043 | var e = th.data.bconfig; |
| 1037 | - if (e.is_sort_storage) { | |
| 1044 | + if (e && e.is_sort_storage) { | |
| 1038 | 1045 | wx.getLocation({ |
| 1039 | 1046 | type: 'gcj02', |
| 1040 | 1047 | success: function(res) { |
| ... | ... | @@ -1109,7 +1116,7 @@ Page({ |
| 1109 | 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 | 1120 | th.setData({ |
| 1114 | 1121 | def_pick_store:e.data.data.pageData[0], |
| 1115 | 1122 | sto_sele_name: e.data.data.pageData[0].pickup_name, |
| ... | ... | @@ -1289,7 +1296,7 @@ Page({ |
| 1289 | 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 | 1300 | th.setData({ |
| 1294 | 1301 | def_pick_store:e.data.data.pageData[0], |
| 1295 | 1302 | sto_sele_name: e.data.data.pageData[0].pickup_name, | ... | ... |
pages/team/team_success/team_success.js
| ... | ... | @@ -47,6 +47,7 @@ Page({ |
| 47 | 47 | }, |
| 48 | 48 | onLoad: function (t) { |
| 49 | 49 | wx.setNavigationBarTitle({ title: "拼团订单",}) |
| 50 | + | |
| 50 | 51 | var that=this; |
| 51 | 52 | var th=this; |
| 52 | 53 | //获取用户设备信息,屏幕宽度 |
| ... | ... | @@ -56,7 +57,7 @@ Page({ |
| 56 | 57 | } |
| 57 | 58 | }) |
| 58 | 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 | 61 | this.init(order_sn); |
| 61 | 62 | |
| 62 | 63 | //-- 自定义海报 -- |
| ... | ... | @@ -209,6 +210,19 @@ Page({ |
| 209 | 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 | 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 | 252 | //获取活动从表信息team_id:305暂时 |
| 245 | 253 | await getApp().request.promiseGet("/api/weshop/teamgroup/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 | 278 | data:{page:1,pageSize:2} |
| 271 | 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 | 289 | //设置值 |
| 278 | 290 | |
| 279 | 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 | 294 | pindGoods: teamlist,is_show:1, zk:false, |
| 283 | 295 | hiddenName: false, ct_price:ct_price,p_status:p_status,sf_arr:sf_arr}); |
| 284 | 296 | |
| ... | ... | @@ -290,8 +302,8 @@ Page({ |
| 290 | 302 | console.log("239什么鬼", teamlist); |
| 291 | 303 | //设置值 |
| 292 | 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 | 307 | share_img: share_img, max_num: max_num, pindGoods: teamlist, is_show: 1, |
| 296 | 308 | ct_price: ct_price, p_status: p_status,sf_arr:sf_arr}); |
| 297 | 309 | } |
| ... | ... | @@ -328,6 +340,8 @@ Page({ |
| 328 | 340 | // 获取当前时间,同时得到活动结束时间数组 |
| 329 | 341 | var newTime = ut.gettimestamp(); |
| 330 | 342 | var o = this.data.teamgroup; |
| 343 | + if(!o) return false; | |
| 344 | + | |
| 331 | 345 | var endTime = o.kt_end_time; |
| 332 | 346 | if (o.status == 0) endTime = o.start_time; |
| 333 | 347 | ... | ... |
pages/togoin/togoin.js
| ... | ... | @@ -67,7 +67,7 @@ Page({ |
| 67 | 67 | that.setData({user:user}) |
| 68 | 68 | //如果有会员的话,没有sessionKey |
| 69 | 69 | if(!e.data.data.sessionKey){ |
| 70 | - getApp().showWarning("登陆成功"); | |
| 70 | + getApp().showWarning("登录成功"); | |
| 71 | 71 | getApp().globalData.userInfo=e.data.data; |
| 72 | 72 | getApp().globalData.user_id=e.data.data.user_id; |
| 73 | 73 | getApp().globalData.openid = e.data.data.weapp_openid; |
| ... | ... | @@ -89,7 +89,7 @@ Page({ |
| 89 | 89 | }) |
| 90 | 90 | }, |
| 91 | 91 | |
| 92 | - //暂不登陆,返回上一页 | |
| 92 | + //暂不登录,返回上一页 | |
| 93 | 93 | cancle_bind:function () { |
| 94 | 94 | wx.navigateBack({ delta: 1}) |
| 95 | 95 | }, | ... | ... |
pages/togoin/togoin.wxml
| ... | ... | @@ -16,20 +16,20 @@ |
| 16 | 16 | <button hidden="{{user}}" class="getPhoneNumber" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo"> |
| 17 | 17 | <view class="flex flex-center2 ali-c"> |
| 18 | 18 | <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image> |
| 19 | - <view>微信账号快捷登陆</view> | |
| 19 | + <view>微信账号快捷登录</view> | |
| 20 | 20 | </view> |
| 21 | 21 | </button> |
| 22 | 22 | <!-- 点击显示绑定手机的对话框 --> |
| 23 | 23 | <button hidden="{{!user}}" class="getPhoneNumber" bindtap="show_bind_mobile"> |
| 24 | 24 | <view class="flex flex-center2 ali-c" > |
| 25 | 25 | <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image> |
| 26 | - <view>微信账号快捷登陆</view> | |
| 26 | + <view>微信账号快捷登录</view> | |
| 27 | 27 | </view> |
| 28 | 28 | </button> |
| 29 | 29 | </view> |
| 30 | 30 | |
| 31 | 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 | 33 | </view> |
| 34 | 34 | |
| 35 | 35 | </view> |
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | <view class="cover-layer" bindtap="close_pop"></view> |
| 42 | 42 | <view class="p_content"> |
| 43 | 43 | <view class="p_title flex ali-c fs34"> |
| 44 | - 请授权绑定手机号完成注册,拒绝将登陆失败 | |
| 44 | + 请授权绑定手机号完成注册,拒绝将登录失败 | |
| 45 | 45 | </view> |
| 46 | 46 | <view class="flex btn_view"> |
| 47 | 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 | 203 | getApp().my_warnning(data.msg, 0, th); |
| 204 | 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 | 208 | var data_aissa = data.data.pageData; |
| 209 | 209 | //当前时间戳 | ... | ... |
pages/user/coupons/coupons.js
| ... | ... | @@ -229,16 +229,20 @@ Page({ |
| 229 | 229 | getApp().request.promiseGet("/api/weshop/users/listQuan", { |
| 230 | 230 | data:get_data |
| 231 | 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 | 63 | <view wx:else> |
| 64 | 64 | <view class="text">有效期:不限</view> |
| 65 | 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 | 68 | </view> |
| 68 | 69 | |
| 69 | 70 | </view> | ... | ... |
pages/user/index/index.js
| ... | ... | @@ -143,12 +143,15 @@ Page({ |
| 143 | 143 | /*-----获取线下会员的预存款和优惠券的数量-----*/ |
| 144 | 144 | rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + e.user_id, { |
| 145 | 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 | 2 | getNum: function(x) { |
| 3 | 3 | var f = parseInt(x); |
| 4 | 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 | 12 | module.exports = { |
| 8 | - getNum: numFr.getNum | |
| 13 | + getNum: numFr.getNum, | |
| 14 | + getval: numFr.getval, | |
| 9 | 15 | } |
| 10 | 16 | \ No newline at end of file | ... | ... |
pages/user/integral/integral.js
| ... | ... | @@ -73,13 +73,15 @@ Page({ |
| 73 | 73 | await getApp().request.promiseGet("/api/weshop/users/listPoints", { |
| 74 | 74 | data: get_data |
| 75 | 75 | }).then(res => { |
| 76 | + | |
| 76 | 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 | 79 | this.data.is_no_more = 1; |
| 80 | 80 | getApp().showWarning("未找更多数据"); |
| 81 | 81 | return false; |
| 82 | 82 | } |
| 83 | + | |
| 84 | + details = msg.data.pageData; | |
| 83 | 85 | details.forEach(function (val, ind) { |
| 84 | 86 | big_arr.push(val); |
| 85 | 87 | }) | ... | ... |
pages/user/integral/integral.wxml
| ... | ... | @@ -55,7 +55,7 @@ |
| 55 | 55 | <view class="money-rim"> |
| 56 | 56 | <view class="tosum"> |
| 57 | 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 | 59 | </view> |
| 60 | 60 | </view> |
| 61 | 61 | <view class='mb20'>充值{{result.Integral}}积分</view> |
| ... | ... | @@ -74,7 +74,7 @@ |
| 74 | 74 | <view class="text">充值{{integral}}积分</view> |
| 75 | 75 | <view class="min-rim"> |
| 76 | 76 | <view class="fh">¥</view> |
| 77 | - <view class="value">{{filter.getNum(money)}}</view> | |
| 77 | + <view class="value">{{filter.getval(money,2)}}</view> | |
| 78 | 78 | </view> |
| 79 | 79 | </view> |
| 80 | 80 | <view class="bk"> | ... | ... |
pages/user/integral/query/index.js
| ... | ... | @@ -168,19 +168,19 @@ Page({ |
| 168 | 168 | }).then(res => { |
| 169 | 169 | |
| 170 | 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 | 176 | // this.data.is_no_more = 1; |
| 177 | - console.log("无极剑圣", details); | |
| 178 | - | |
| 179 | 177 | getApp().showWarning("未找更多数据"); |
| 180 | 178 | return false; |
| 181 | 179 | } |
| 182 | - console.log("不空", details); | |
| 183 | - console.log("长度", details.length); | |
| 180 | + | |
| 181 | + var details = details.data.pageData; | |
| 182 | + | |
| 183 | + | |
| 184 | 184 | details.forEach(function (val, ind) { |
| 185 | 185 | big_arr.push(val); |
| 186 | 186 | }) | ... | ... |
pages/user/member/account/account.js
| ... | ... | @@ -100,16 +100,15 @@ Page({ |
| 100 | 100 | data: get_data, isShowLoading:1 |
| 101 | 101 | }).then(res => { |
| 102 | 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 | 105 | this.data.is_no_more=1; |
| 109 | 106 | getApp().showWarning("未找更多数据"); |
| 110 | 107 | |
| 111 | 108 | return false; |
| 112 | 109 | } |
| 110 | + | |
| 111 | + var details=details.data.pageData; | |
| 113 | 112 | // console.log("不空", details); |
| 114 | 113 | // console.log("长度", details.length); |
| 115 | 114 | details.forEach(function(val,ind){ | ... | ... |
pages/user/member/account_unable/account_unable.js
| ... | ... | @@ -99,17 +99,16 @@ Page({ |
| 99 | 99 | await getApp().request.promiseGet("/api/weshop/users/pageUnablereCord", { |
| 100 | 100 | data: get_data, isShowLoading: 1 |
| 101 | 101 | }).then(res => { |
| 102 | + | |
| 102 | 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 | 106 | this.data.is_no_more = 1; |
| 109 | 107 | getApp().showWarning("未找更多数据"); |
| 110 | - | |
| 111 | 108 | return false; |
| 112 | 109 | } |
| 110 | + | |
| 111 | + var details = details.data.pageData; | |
| 113 | 112 | // console.log("不空", details); |
| 114 | 113 | // console.log("长度", details.length); |
| 115 | 114 | details.forEach(function (val, ind) { | ... | ... |
pages/user/member/cash_record/cash_record.js
| ... | ... | @@ -110,17 +110,14 @@ Page({ |
| 110 | 110 | data: get_data, isShowLoading: 1 |
| 111 | 111 | }).then(res => { |
| 112 | 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 | 115 | this.data.is_no_more = 1; |
| 119 | 116 | getApp().showWarning("未找更多数据"); |
| 120 | 117 | return false; |
| 121 | 118 | } |
| 122 | - console.log("不空", details); | |
| 123 | - console.log("长度", details.length); | |
| 119 | + var details = details.data.pageData; | |
| 120 | + | |
| 124 | 121 | details.forEach(function (val, ind) { |
| 125 | 122 | big_arr.push(val); |
| 126 | 123 | }) | ... | ... |