Commit 725c8f7165687f280791cc9cbf6c3d5e36b4668f
1 parent
63044f80
系统开关控制
Showing
13 changed files
with
200 additions
and
107 deletions
pages/cart/cart2/cart2.js
| ... | ... | @@ -72,18 +72,64 @@ Page({ |
| 72 | 72 | selected_quan_list:null, |
| 73 | 73 | //选择的券的门店 |
| 74 | 74 | selected_quan_pick:null, |
| 75 | + is_close_quan:0, | |
| 75 | 76 | |
| 76 | 77 | }, |
| 77 | 78 | onLoad: function(t) { |
| 78 | - | |
| 79 | 79 | wx.setNavigationBarTitle({ title: "填写订单",}) |
| 80 | 80 | var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow,}); |
| 81 | 81 | th.data.param=t; |
| 82 | - //-----先获取物流,再获取用户信息,再展示页面----- | |
| 83 | - th.get_wuliu(th.get_info(th.show_page)); | |
| 84 | - | |
| 82 | + //先获取是否有关闭使用优惠券 | |
| 83 | + getApp().getConfig2(function (ee) { | |
| 84 | + var json_d = JSON.parse(ee.switch_list); | |
| 85 | + th.setData({ is_close_quan: json_d.is_close_quan }); | |
| 86 | + //-----先获取物流,再获取用户信息,再展示页面----- | |
| 87 | + th.get_wuliu(th.get_info(th.show_page)); | |
| 88 | + }) | |
| 85 | 89 | }, |
| 86 | 90 | onUnload: function () { this.setData({ isclose: 1 })}, |
| 91 | + | |
| 92 | + //----------子页返回父页触发---------- | |
| 93 | + onShow: function() { | |
| 94 | + console.log('onshow'); | |
| 95 | + var th=this; | |
| 96 | + console.log(th.data.isclose); | |
| 97 | + if (th.data.isclose==0){ | |
| 98 | + /*--- | |
| 99 | + wx.navigateTo({ | |
| 100 | + url: "/pages/user/index/index" | |
| 101 | + //url: "/pages/index/index/index" | |
| 102 | + })---*/ | |
| 103 | + wx.switchTab({ | |
| 104 | + url: "/pages/index/index/index" | |
| 105 | + }) | |
| 106 | + | |
| 107 | + }else{ | |
| 108 | + this.getuser_addr(function(ie){ | |
| 109 | + | |
| 110 | + console.log("getuser_addr") | |
| 111 | + console.log(ie) | |
| 112 | + | |
| 113 | + th.setData({user_addr: ie }); | |
| 114 | + var going=0; | |
| 115 | + | |
| 116 | + //使用计算器,避免空现象 | |
| 117 | + var jishi= setInterval(function () { | |
| 118 | + if (th.data.is_b_now == 1 && going==0) { | |
| 119 | + if(th.data.bn_goods) { | |
| 120 | + th.calculatePrice2();going=1;clearInterval(jishi); | |
| 121 | + } | |
| 122 | + }else if(going==0) { | |
| 123 | + if (th.data.cartlist){ | |
| 124 | + th.calculatePrice();going = 1; clearInterval(jishi); | |
| 125 | + } | |
| 126 | + } | |
| 127 | + },500) | |
| 128 | + | |
| 129 | + }); | |
| 130 | + } | |
| 131 | + }, | |
| 132 | + | |
| 87 | 133 | //-------------------获取物流--------------- |
| 88 | 134 | get_wuliu(func) { |
| 89 | 135 | var th = this; |
| ... | ... | @@ -112,10 +158,15 @@ Page({ |
| 112 | 158 | ];---*/ |
| 113 | 159 | var user_addr = su.data.data.pageData; |
| 114 | 160 | var item = null; |
| 161 | + var def_item=null; | |
| 115 | 162 | for (var i = 0; i < user_addr.length; i++) { |
| 116 | - if (user_addr[i]['is_default'] == 1) { item = user_addr[i]; break; } | |
| 163 | + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i];} | |
| 164 | + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; } | |
| 117 | 165 | } |
| 166 | + | |
| 167 | + if (item == null) item = def_item; | |
| 118 | 168 | if (item == null) item = user_addr[0]; |
| 169 | + | |
| 119 | 170 | if(item==undefined) item=null; |
| 120 | 171 | func(item); |
| 121 | 172 | } |
| ... | ... | @@ -260,14 +311,17 @@ Page({ |
| 260 | 311 | arr[ind].check_quan_ware_list=check_quan_ware_list; |
| 261 | 312 | arr[ind].check_quan_price_list=check_quan_price_list; |
| 262 | 313 | |
| 263 | - //调用接口,获取优惠券的列表 | |
| 264 | - var url="/api/weshop/couponList/getUseCouponList"; | |
| 265 | - await app.request.promiseGet(url,{ | |
| 266 | - data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:ckeck_quan_price,WareIds:check_quan_ware_list,pageSize:100} | |
| 267 | - }).then(res=>{ | |
| 268 | - if(res.data.code==0) | |
| 269 | - arr[ind].quan_list=res.data.data.pageData; | |
| 270 | - }) | |
| 314 | + //是否关闭使用优惠券 | |
| 315 | + if (th.data.is_close_quan != 1) { | |
| 316 | + //调用接口,获取优惠券的列表 | |
| 317 | + var url="/api/weshop/couponList/getUseCouponList"; | |
| 318 | + await app.request.promiseGet(url,{ | |
| 319 | + data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:ckeck_quan_price,WareIds:check_quan_ware_list,pageSize:100} | |
| 320 | + }).then(res=>{ | |
| 321 | + if(res.data.code==0) | |
| 322 | + arr[ind].quan_list=res.data.data.pageData; | |
| 323 | + }) | |
| 324 | + } | |
| 271 | 325 | } |
| 272 | 326 | |
| 273 | 327 | th.setData({ |
| ... | ... | @@ -314,13 +368,16 @@ Page({ |
| 314 | 368 | th.data.check_quan_ware_list=t.data.data.erpwareid+""; |
| 315 | 369 | |
| 316 | 370 | var quanlist=null; |
| 317 | - var url="/api/weshop/couponList/getUseCouponList"; | |
| 318 | - await app.request.promiseGet(url,{ | |
| 319 | - data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:th.data.ckeck_quan_price,WareIds:th.data.check_quan_ware_list,pageSize:100} | |
| 320 | - }).then(res=>{ | |
| 321 | - if(res.data.code==0) | |
| 322 | - quanlist=res.data.data.pageData; | |
| 323 | - }) | |
| 371 | + | |
| 372 | + if (th.data.is_close_quan != 1) { | |
| 373 | + var url="/api/weshop/couponList/getUseCouponList"; | |
| 374 | + await app.request.promiseGet(url,{ | |
| 375 | + data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:th.data.ckeck_quan_price,WareIds:th.data.check_quan_ware_list,pageSize:100} | |
| 376 | + }).then(res=>{ | |
| 377 | + if(res.data.code==0) | |
| 378 | + quanlist=res.data.data.pageData; | |
| 379 | + }) | |
| 380 | + } | |
| 324 | 381 | |
| 325 | 382 | t.data.data.prom_id = 0; |
| 326 | 383 | t.data.data.prom_type = 0; |
| ... | ... | @@ -371,36 +428,6 @@ Page({ |
| 371 | 428 | } |
| 372 | 429 | }, |
| 373 | 430 | |
| 374 | - //----------子页返回父页触发---------- | |
| 375 | - onShow: function() { | |
| 376 | - console.log('onshow'); | |
| 377 | - var th=this; | |
| 378 | - console.log(th.data.isclose); | |
| 379 | - if (th.data.isclose==0){ | |
| 380 | - /*--- | |
| 381 | - wx.navigateTo({ | |
| 382 | - url: "/pages/user/index/index" | |
| 383 | - //url: "/pages/index/index/index" | |
| 384 | - })---*/ | |
| 385 | - wx.switchTab({ | |
| 386 | - url: "/pages/index/index/index" | |
| 387 | - }) | |
| 388 | - | |
| 389 | - }else{ | |
| 390 | - this.getuser_addr(function(ie){ | |
| 391 | - | |
| 392 | - console.log("getuser_addr") | |
| 393 | - console.log(ie) | |
| 394 | - | |
| 395 | - th.setData({user_addr: ie }); | |
| 396 | - if (th.data.is_b_now == 1) { | |
| 397 | - th.calculatePrice2(); | |
| 398 | - } else { | |
| 399 | - th.calculatePrice(); | |
| 400 | - } | |
| 401 | - }); | |
| 402 | - } | |
| 403 | - }, | |
| 404 | 431 | //---------------检查是否有收货地址------------------- |
| 405 | 432 | checkAddressList: function() { |
| 406 | 433 | var t = this; | ... | ... |
pages/cart/cart2_pt/cart2_pt.js
| ... | ... | @@ -107,9 +107,12 @@ Page({ |
| 107 | 107 | |
| 108 | 108 | var user_addr = su.data.data.pageData; |
| 109 | 109 | var item = null; |
| 110 | + var def_item=null; | |
| 110 | 111 | for (var i = 0; i < user_addr.length; i++) { |
| 111 | - if (user_addr[i]['is_default'] == 1) { item = user_addr[i]; break; } | |
| 112 | + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i]; } | |
| 113 | + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; } | |
| 112 | 114 | } |
| 115 | + if (item == null) item = def_item; | |
| 113 | 116 | if (item == null) item = user_addr[0]; |
| 114 | 117 | if (item == undefined) item = null; |
| 115 | 118 | func(item); | ... | ... |
pages/cart/cart_wk/cart_wk.js
| ... | ... | @@ -110,12 +110,13 @@ Page({ |
| 110 | 110 | success: function(su) { |
| 111 | 111 | var user_addr = su.data.data.pageData; |
| 112 | 112 | var item = null; |
| 113 | + var def_item = null; | |
| 113 | 114 | for (var i = 0; i < user_addr.length; i++) { |
| 114 | - if (user_addr[i]['is_default'] == 1) { | |
| 115 | - item = user_addr[i]; | |
| 116 | - break; | |
| 117 | - } | |
| 115 | + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i]; } | |
| 116 | + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; } | |
| 118 | 117 | } |
| 118 | + | |
| 119 | + if (item == null) item = def_item; | |
| 119 | 120 | if (item == null) item = user_addr[0]; |
| 120 | 121 | if (item == undefined) item = null; |
| 121 | 122 | func(item); |
| ... | ... | @@ -218,7 +219,9 @@ Page({ |
| 218 | 219 | jsarr.forEach(function(value,index){ |
| 219 | 220 | if(count>=value['rynum']) price=value['price']; |
| 220 | 221 | }) |
| 221 | - var tail_money=price*order_goods.goods_num-order['order_amount']-order['user_money']; | |
| 222 | + var tail_money =(price*order_goods.goods_num-order['order_amount']-order['user_money']).toFixed(2); | |
| 223 | + | |
| 224 | + tail_money = parseFloat(tail_money); | |
| 222 | 225 | order.tail_money=tail_money; |
| 223 | 226 | |
| 224 | 227 | //--判断物流-- | ... | ... |
pages/cart/cart_wk/cart_wk.wxml
| ... | ... | @@ -78,7 +78,7 @@ |
| 78 | 78 | <view class='ct_one_right'><text class='redwz'>{{teamgroup.jt_ct_num}}</text>人</view> |
| 79 | 79 | </view> |
| 80 | 80 | <view class='ct_one jc_sb'> |
| 81 | - <view class='ct_one_left'>成团单价</view> | |
| 81 | + <view class='ct_one_left'>成团金额</view> | |
| 82 | 82 | <view class='ct_one_right'>¥<text class='redwz'>{{filters.toFix(order.order_amount+order.user_money+order.tail_money,2)}}</text></view> |
| 83 | 83 | </view> |
| 84 | 84 | <view class='ct_one jc_sb'> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -50,8 +50,7 @@ Page({ |
| 50 | 50 | activeCategoryId: 0, |
| 51 | 51 | supportPageScroll: !1, |
| 52 | 52 | address: { |
| 53 | - address: "", | |
| 54 | - district: 0 | |
| 53 | + address: "", district: 0 | |
| 55 | 54 | }, |
| 56 | 55 | shipping: "", |
| 57 | 56 | shippingCost: 0, |
| ... | ... | @@ -145,7 +144,7 @@ Page({ |
| 145 | 144 | pd_xx: 0, |
| 146 | 145 | is_normal: 0, //是否普通购买 |
| 147 | 146 | teamgroup:null, //有多少人开团 |
| 148 | - grounp_tatal:0, //有几个人开团 | |
| 147 | + grounp_tatal:0, //有几个人开团 | |
| 149 | 148 | timer:[], |
| 150 | 149 | |
| 151 | 150 | //商品的购买次数 |
| ... | ... | @@ -201,12 +200,13 @@ Page({ |
| 201 | 200 | is_show_pl:0, //是否品类 |
| 202 | 201 | is_show_pp:0, //是否品牌 |
| 203 | 202 | is_show_gb:0, //是否国别 |
| 203 | + is_closecoupon:0, | |
| 204 | 204 | }, |
| 205 | 205 | |
| 206 | 206 | //------初始化加载---------- |
| 207 | 207 | onLoad: function(t) { |
| 208 | 208 | wx.setNavigationBarTitle({ title: "商品详情",}) |
| 209 | - var ee = this, that=ee, | |
| 209 | + var ee = this, that=ee,th=ee, | |
| 210 | 210 | gid = t.goods_id; |
| 211 | 211 | |
| 212 | 212 | //如果tg_id是空的话,分享回来 |
| ... | ... | @@ -218,33 +218,35 @@ Page({ |
| 218 | 218 | gid: gid |
| 219 | 219 | }); |
| 220 | 220 | |
| 221 | + | |
| 222 | + getApp().getConfig2(function (e) { | |
| 223 | + if (e.categoryset.indexOf("," + 1 + ",") != -1) { ee.setData({ is_show_pl: 1 }); } | |
| 224 | + if (e.categoryset.indexOf("," + 3 + ",") != -1) { ee.setData({ is_show_pp: 1 }); } | |
| 225 | + if (e.categoryset.indexOf("," + 2 + ",") != -1) { ee.setData({ is_show_gb: 1 }); } | |
| 226 | + | |
| 227 | + var json_d = JSON.parse(e.switch_list); | |
| 228 | + ee.setData({ store_config: e, is_closecoupon: json_d.is_closecoupon }); | |
| 229 | + ee.init(gid); | |
| 230 | + //------几人评价------- | |
| 231 | + n.init(th, "", "comments"); | |
| 232 | + th.requestCardNum(), wx.pageScrollTo && th.setData({ | |
| 233 | + supportPageScroll: !0 | |
| 234 | + }); | |
| 235 | + | |
| 236 | + }) | |
| 237 | + | |
| 238 | + | |
| 221 | 239 | //获取用户设备信息,屏幕宽度 |
| 222 | 240 | wx.getSystemInfo({ |
| 223 | 241 | success: res => { |
| 224 | 242 | that.setData({ screenWidth: res.screenWidth }) |
| 225 | 243 | } |
| 226 | 244 | }) |
| 227 | - | |
| 228 | - ee.init(gid); | |
| 229 | - //------几人评价------- | |
| 230 | - n.init(this, "", "comments"); | |
| 231 | - this.requestCardNum(), wx.pageScrollTo && this.setData({ | |
| 232 | - supportPageScroll: !0 | |
| 233 | - }); | |
| 234 | - | |
| 235 | - getApp().getConfig2(function (e) { | |
| 236 | - | |
| 237 | - if(e.categoryset.indexOf(","+1+",")!=-1){ ee.setData({is_show_pl:1}); } | |
| 238 | - if(e.categoryset.indexOf(","+3+",")!=-1){ ee.setData({is_show_pp:1}); } | |
| 239 | - if(e.categoryset.indexOf(","+2+",")!=-1){ ee.setData({is_show_gb:1}); } | |
| 240 | - ee.setData({store_config:e}); | |
| 241 | - }) | |
| 242 | - | |
| 243 | 245 | }, |
| 244 | 246 | |
| 245 | 247 | //------------程序初始化入口------------- |
| 246 | 248 | async init(gid) { |
| 247 | - var ee = this, | |
| 249 | + var ee = this,th=ee, | |
| 248 | 250 | gallery = null, |
| 249 | 251 | is_collect = 0, |
| 250 | 252 | collect_id = 0, |
| ... | ... | @@ -344,17 +346,19 @@ Page({ |
| 344 | 346 | } |
| 345 | 347 | } |
| 346 | 348 | |
| 347 | - //----获取详情页的券的数量---- | |
| 348 | - await getApp().request.promiseGet("/api/weshop/prom/coupon/page", { | |
| 349 | - data: { | |
| 350 | - store_id: os.stoid, | |
| 351 | - type:1, | |
| 352 | - pageSize: 3, | |
| 353 | - page:1, | |
| 354 | - }, | |
| 355 | - }).then(res1 => { | |
| 356 | - fir_quan=res1.data.data.pageData; | |
| 357 | - }) | |
| 349 | + if (th.data.is_closecoupon!=1){ | |
| 350 | + //----获取详情页的券的数量---- | |
| 351 | + await getApp().request.promiseGet("/api/weshop/prom/coupon/page", { | |
| 352 | + data: { | |
| 353 | + store_id: os.stoid, | |
| 354 | + type:1, | |
| 355 | + pageSize: 3, | |
| 356 | + page:1, | |
| 357 | + }, | |
| 358 | + }).then(res1 => { | |
| 359 | + fir_quan=res1.data.data.pageData; | |
| 360 | + }) | |
| 361 | + } | |
| 358 | 362 | |
| 359 | 363 | |
| 360 | 364 | //--------获取视频图片--------- |
| ... | ... | @@ -1426,7 +1430,7 @@ Page({ |
| 1426 | 1430 | //----已经结束----- |
| 1427 | 1431 | if (t.data.data.is_end == 1) { |
| 1428 | 1432 | ee.setData({ |
| 1429 | - prom_type: 0,isshow:1, | |
| 1433 | + prom_type: 0,isshow:1, | |
| 1430 | 1434 | }); |
| 1431 | 1435 | ee.get_sku(os.stoid, ee.data.data.sku, gid); |
| 1432 | 1436 | return false; |
| ... | ... | @@ -1465,13 +1469,32 @@ Page({ |
| 1465 | 1469 | th.data.buy_order = odr; |
| 1466 | 1470 | if (odr.pt_status == 0 && odr.order_status == 1) { |
| 1467 | 1471 | th.setData({ |
| 1468 | - user_order_pt_state: 1 | |
| 1472 | + user_order_pt_state: 1 | |
| 1469 | 1473 | }); |
| 1470 | 1474 | } |
| 1471 | 1475 | if (odr.pt_status == 1 && odr.order_status == 1) { |
| 1472 | - th.setData({ | |
| 1473 | - user_order_pt_state: 2 | |
| 1474 | - }); | |
| 1476 | + if (odr.is_zsorder == 4){ | |
| 1477 | + getApp().request.promiseGet("/api/weshop/teamgroup/page/", { | |
| 1478 | + data: { store_id: oo.stoid, team_id: odr.pt_prom_id, listno: odr.pt_listno } | |
| 1479 | + }).then(res => { | |
| 1480 | + var now=ut.gettimestamp(); | |
| 1481 | + var tgr = res.data.data.pageData[0]; | |
| 1482 | + //如果团的时间已经到了 | |
| 1483 | + if (now >= tgr.kt_end_time){ | |
| 1484 | + th.update_jiti(tgr.id); | |
| 1485 | + }else{ | |
| 1486 | + th.setData({ | |
| 1487 | + user_order_pt_state: 2 | |
| 1488 | + }); | |
| 1489 | + } | |
| 1490 | + | |
| 1491 | + }) | |
| 1492 | + | |
| 1493 | + }else{ | |
| 1494 | + th.setData({ | |
| 1495 | + user_order_pt_state: 2 | |
| 1496 | + }); | |
| 1497 | + } | |
| 1475 | 1498 | } |
| 1476 | 1499 | |
| 1477 | 1500 | if (odr.pt_status == 2 && odr.is_zsorder == 4) { |
| ... | ... | @@ -1895,7 +1918,7 @@ Page({ |
| 1895 | 1918 | if (newd.kt_type > 1) { |
| 1896 | 1919 | newd.is_pt_tz = 1; //开团类型 |
| 1897 | 1920 | } |
| 1898 | - if (newd.kt_type == 3){ | |
| 1921 | + if (newd.kt_type == 3 && th.data.is_normal!=1){ | |
| 1899 | 1922 | th.data.sto_sele_distr=1; |
| 1900 | 1923 | } |
| 1901 | 1924 | |
| ... | ... | @@ -2569,6 +2592,26 @@ Page({ |
| 2569 | 2592 | var ob={}; |
| 2570 | 2593 | ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif"; |
| 2571 | 2594 | this.setData(ob); |
| 2595 | + }, | |
| 2596 | + | |
| 2597 | + //--调用更新阶梯团的接口-- | |
| 2598 | + update_jiti:function(id){ | |
| 2599 | + var th=this; | |
| 2600 | + //--更新阶梯团-- | |
| 2601 | + getApp().request.put("/api/weshop/teamgroup/updateTeamOrder/"+os.stoid+"/"+id, { | |
| 2602 | + success: function (ee) { | |
| 2603 | + //--等于0是要去支付尾款,接口调用失败,就要去查看参团详情-- | |
| 2604 | + if (ee.code==0) { | |
| 2605 | + th.setData({ | |
| 2606 | + user_order_pt_state: 3, | |
| 2607 | + }); | |
| 2608 | + }else if(ee.code==-1){ | |
| 2609 | + th.setData({ | |
| 2610 | + user_order_pt_state: 2, | |
| 2611 | + }); | |
| 2612 | + } | |
| 2613 | + } | |
| 2614 | + }) | |
| 2572 | 2615 | } |
| 2573 | 2616 | |
| 2574 | 2617 | }); |
| 2575 | 2618 | \ No newline at end of file | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -300,7 +300,7 @@ |
| 300 | 300 | </view> |
| 301 | 301 | </block> |
| 302 | 302 | <!--许程 7.24暂时注释 --> |
| 303 | - <view wx:if="{{prom_type!=1&&prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1}}"> | |
| 303 | + <view wx:if="{{prom_type!=1&&prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1}}"> | |
| 304 | 304 | <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> |
| 305 | 305 | <view class="cx-sizs wsize">领券</view> |
| 306 | 306 | <view class="xc-coupon-fram" wx:for="{{fir_quan}}" wx:key="{{index}}"> | ... | ... |
pages/user/coupons/coupons.js
| ... | ... | @@ -48,6 +48,7 @@ Page({ |
| 48 | 48 | show: true, |
| 49 | 49 | udata: null, |
| 50 | 50 | iurl:os.imghost, |
| 51 | + is_show_dhwz:0, | |
| 51 | 52 | }, |
| 52 | 53 | // 点击选中二维码 |
| 53 | 54 | click: function(e) { |
| ... | ... | @@ -130,7 +131,11 @@ Page({ |
| 130 | 131 | * 生命周期函数--监听页面加载 |
| 131 | 132 | */ |
| 132 | 133 | onLoad: function(options) { |
| 133 | - | |
| 134 | + var th = this; | |
| 135 | + getApp().getConfig2(function (ee) { | |
| 136 | + var json_d = JSON.parse(ee.switch_list); | |
| 137 | + th.setData({ is_show_dhwz: json_d.dhwz_switch }); | |
| 138 | + }) | |
| 134 | 139 | }, |
| 135 | 140 | |
| 136 | 141 | ... | ... |
pages/user/coupons/coupons.wxml
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | </view> |
| 10 | 10 | <view class='center'> |
| 11 | 11 | <view class='cen-left' bindtap='query'>微券查询</view> |
| 12 | - <view class='cen-right' bindtap='exchange'>微券兑换</view> | |
| 12 | + <view wx:if="{{is_show_dhwz}}" class='cen-right' bindtap='exchange'>微券兑换</view> | |
| 13 | 13 | </view> |
| 14 | 14 | <!--选择款--> |
| 15 | 15 | <view class='top'> | ... | ... |
pages/user/deposit/deposit.js
| ... | ... | @@ -11,6 +11,7 @@ Page({ |
| 11 | 11 | yucun_money:0, |
| 12 | 12 | parameter:true, |
| 13 | 13 | iurl: o.imghost, |
| 14 | + is_show_yckcz:0, | |
| 14 | 15 | }, |
| 15 | 16 | /** |
| 16 | 17 | * 生命周期函数--监听页面显示 |
| ... | ... | @@ -25,6 +26,12 @@ Page({ |
| 25 | 26 | wx.setNavigationBarTitle({ |
| 26 | 27 | title: "预存款", |
| 27 | 28 | }) |
| 29 | + | |
| 30 | + var th = this; | |
| 31 | + getApp().getConfig2(function (ee) { | |
| 32 | + var json_d = JSON.parse(ee.switch_list); | |
| 33 | + th.setData({ is_show_yckcz: json_d.yckcz_switch }); | |
| 34 | + }) | |
| 28 | 35 | }, |
| 29 | 36 | |
| 30 | 37 | /** | ... | ... |
pages/user/deposit/deposit.wxml
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | </view> |
| 8 | 8 | </image> |
| 9 | 9 | <view class="big-rim"> |
| 10 | - <view class="min-rim-one" type='primary' bindtap='jumPage'> | |
| 10 | + <view wx:if="{{is_show_yckcz}}" class="min-rim-one" type='primary' bindtap='jumPage'> | |
| 11 | 11 | <image class="picture-two" src="{{iurl}}/miniapp/images/usermoney/recharge.png"></image> |
| 12 | 12 | <view class="ldzj-font">预存款充值</view> |
| 13 | 13 | <image class="picture-five" src="{{iurl}}/miniapp/images/usermoney/left.png"></image> | ... | ... |
pages/user/integral/integral.js
| ... | ... | @@ -30,6 +30,8 @@ Page({ |
| 30 | 30 | money:1.00, |
| 31 | 31 | integral:50, |
| 32 | 32 | iurl: o.imghost, |
| 33 | + | |
| 34 | + is_show_jfcz:0, | |
| 33 | 35 | }, |
| 34 | 36 | /** |
| 35 | 37 | * 刷出积分劵 |
| ... | ... | @@ -47,9 +49,7 @@ Page({ |
| 47 | 49 | data:get_data |
| 48 | 50 | }).then(res => { |
| 49 | 51 | var msg = res.data; |
| 50 | - console.log("是什么",msg); | |
| 51 | - result = msg.data.pageData; | |
| 52 | - console.log("是什sssssss么", result); | |
| 52 | + result = msg.data.pageData; | |
| 53 | 53 | }) |
| 54 | 54 | e.setData({ |
| 55 | 55 | result: result |
| ... | ... | @@ -192,7 +192,11 @@ Page({ |
| 192 | 192 | * 生命周期函数--监听页面加载 |
| 193 | 193 | */ |
| 194 | 194 | onLoad: function (options) { |
| 195 | - | |
| 195 | + var th=this; | |
| 196 | + getApp().getConfig2(function(ee){ | |
| 197 | + var json_d = JSON.parse(ee.switch_list); | |
| 198 | + th.setData({ is_show_jfcz: json_d.jfcz_switch }); | |
| 199 | + }) | |
| 196 | 200 | }, |
| 197 | 201 | |
| 198 | 202 | /** | ... | ... |
pages/user/integral/integral.wxml
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" >积分明细</view></view> |
| 17 | 17 | <view class="jfmx-rim"bindtap="swichNav"> |
| 18 | 18 | <!-- class='ter' --> |
| 19 | - <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" >积分充值</view></view> | |
| 19 | + <view wx:if="{{is_show_jfcz}}" class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" >积分充值</view></view> | |
| 20 | 20 | </view> |
| 21 | 21 | <view wx:if="{{jfmx}}"> |
| 22 | 22 | <view class='body' bindtap="detailed"> |
| ... | ... | @@ -41,7 +41,8 @@ |
| 41 | 41 | </view> |
| 42 | 42 | <view class="val" style='color:{{(details.InIntegral!="0")?"green":""}}'> |
| 43 | 43 | {{(details.OutIntegral==0)?"+":""}}{{(details.InIntegral==0)?filter.getNum(details.OutIntegral):filter.getNum(details.InIntegral)}}积分 </view> |
| 44 | - </view> | |
| 44 | + </view> | |
| 45 | + <view style="clear:both"></view> | |
| 45 | 46 | </block> |
| 46 | 47 | |
| 47 | 48 | </view> | ... | ... |
pages/user/integral/integral.wxss
| ... | ... | @@ -431,7 +431,7 @@ line-height:85rpx; |
| 431 | 431 | } |
| 432 | 432 | /*左边的数据 */ |
| 433 | 433 | .left{ |
| 434 | - width:80%; | |
| 434 | + width:70%; | |
| 435 | 435 | height: 120rpx; |
| 436 | 436 | |
| 437 | 437 | } |
| ... | ... | @@ -459,7 +459,7 @@ line-height:85rpx; |
| 459 | 459 | font-size: 27rpx; |
| 460 | 460 | font-family: 'SimHei',Arial; |
| 461 | 461 | text-align:right; |
| 462 | - | |
| 462 | + float: right | |
| 463 | 463 | |
| 464 | 464 | } |
| 465 | 465 | /* .更多 */ | ... | ... |