Commit fc213fc2e58cdc7600d3b63ca0cd7e1e4d1c7ebd
Merge branch 'qa' into 'master'
Qa See merge request !87
Showing
5 changed files
with
22 additions
and
16 deletions
app.js
@@ -278,9 +278,13 @@ App({ | @@ -278,9 +278,13 @@ App({ | ||
278 | //----智能跳转,判断 非tabBar,tabBar页面的跳转---- | 278 | //----智能跳转,判断 非tabBar,tabBar页面的跳转---- |
279 | goto:function (url) { | 279 | goto:function (url) { |
280 | var arr_tabbar=["/pages/index/index/index","/pages/goods/categoryList/categoryList", | 280 | var arr_tabbar=["/pages/index/index/index","/pages/goods/categoryList/categoryList", |
281 | + "/pages/goods/categoryList/categoryList?type=2", | ||
282 | + "/pages/goods/categoryList/categoryList?type=1", | ||
281 | "/pages/cart/cart/cart","/pages/user/index/index"]; | 283 | "/pages/cart/cart/cart","/pages/user/index/index"]; |
282 | if(arr_tabbar.indexOf(url)!=-1){ | 284 | if(arr_tabbar.indexOf(url)!=-1){ |
283 | - wx.switchTab({ url: url, }) //跳到tabbar页 | 285 | + if(url.indexOf("categoryList?type=1")!=-1) this.globalData.cat_type=1; |
286 | + if(url.indexOf("categoryList?type=2")!=-1) this.globalData.cat_type=2; | ||
287 | + wx.switchTab({ url: url, }) //跳到tabbar页 | ||
284 | }else{ | 288 | }else{ |
285 | wx.navigateTo({ url: url, }) //跳到非tabbar页 | 289 | wx.navigateTo({ url: url, }) //跳到非tabbar页 |
286 | } | 290 | } |
components/diy_assist/diy_assist.wxss
components/diy_nav/diy_nav.js
@@ -31,13 +31,13 @@ Component({ | @@ -31,13 +31,13 @@ Component({ | ||
31 | // 这里是一个自定义方法,判断图片路径,并加载 | 31 | // 这里是一个自定义方法,判断图片路径,并加载 |
32 | pd_navicon:function(g_id){ | 32 | pd_navicon:function(g_id){ |
33 | 33 | ||
34 | - var item={}; | ||
35 | - var nav_strs=g_id; | 34 | + var item={},nav_strs=g_id,th=this; |
36 | for (var i=0;i<nav_strs.length;i++){ | 35 | for (var i=0;i<nav_strs.length;i++){ |
37 | if (!(nav_strs[i].navicon.indexOf("/public/static/images/model/tag-icon.png"))){ | 36 | if (!(nav_strs[i].navicon.indexOf("/public/static/images/model/tag-icon.png"))){ |
38 | - nav_strs[i].navicon ="../../../../../images/nav-icon.png"; | 37 | + nav_strs[i].navicon = th.data.imghost+"/miniapp/images/nav-icon.png"; |
39 | } | 38 | } |
40 | } | 39 | } |
40 | + | ||
41 | this.setData({ | 41 | this.setData({ |
42 | nav_list:nav_strs, | 42 | nav_list:nav_strs, |
43 | }); | 43 | }); |
components/diy_picMax/diy_picMax.wxss
1 | -.picMax{width: 100%; padding: 0 10rpx;position: relative;} | 1 | +.picMax{width: 100%;position: relative;} |
2 | .pic_item{position: absolute; top:0;left:0;} | 2 | .pic_item{position: absolute; top:0;left:0;} |
3 | .pic_item image{width: 100%; height: 100%} | 3 | .pic_item image{width: 100%; height: 100%} |
4 | -.width_1{width: 187rpx}.width_2{width: 374rpx;}.width_3{width: 561rpx}.width_4{width:748rpx;} | ||
5 | -.height_1{height: 187rpx;}.height_2{height: 374rpx;}.height_3{height: 561rpx}.height_4{height: 748rpx;} | ||
6 | -.mar_x1{margin-left:187rpx;}.mar_x2{margin-left:374rpx;}.mar_x3{margin-left:561rpx}.mar_x4{margin-left: 748rpx;} | ||
7 | -.mar_y1{margin-top: 187rpx;}.mar_y2{margin-top: 374rpx;}.mar_y3{margin-top: 561rpx}.mar_y4{margin-top: 748rpx;} | 4 | +.width_1{width: 187.5rpx}.width_2{width: 375rpx;}.width_3{width: 562.5rpx}.width_4{width:748rpx;} |
5 | +.height_1{height: 187.5rpx;}.height_2{height: 375rpx;}.height_3{height: 562.5rpx}.height_4{height: 748rpx;} | ||
6 | +.mar_x1{margin-left:187.5rpx;}.mar_x2{margin-left:375rpx;}.mar_x3{margin-left:562.5rpx}.mar_x4{margin-left: 748rpx;} | ||
7 | +.mar_y1{margin-top: 187.5rpx;}.mar_y2{margin-top: 375rpx;}.mar_y3{margin-top: 562.5rpx}.mar_y4{margin-top: 748rpx;} | ||
8 | .picMax-clear{clear: both;} | 8 | .picMax-clear{clear: both;} |
9 | \ No newline at end of file | 9 | \ No newline at end of file |
pages/cart/cart2/cart2.js
@@ -625,6 +625,8 @@ Page({ | @@ -625,6 +625,8 @@ Page({ | ||
625 | th.data.cartlist[i].user_money = umoney; | 625 | th.data.cartlist[i].user_money = umoney; |
626 | umoney=0; | 626 | umoney=0; |
627 | } | 627 | } |
628 | + }else{ | ||
629 | + th.data.cartlist[i].user_money=0; | ||
628 | } | 630 | } |
629 | 631 | ||
630 | th.data.cartlist[i].user_money = parseFloat(th.data.cartlist[i].user_money).toFixed(2); | 632 | th.data.cartlist[i].user_money = parseFloat(th.data.cartlist[i].user_money).toFixed(2); |
@@ -635,12 +637,12 @@ Page({ | @@ -635,12 +637,12 @@ Page({ | ||
635 | th.data.cartlist[i].goods_price = o_price.toFixed(2); | 637 | th.data.cartlist[i].goods_price = o_price.toFixed(2); |
636 | th.data.cartlist[i].order_amount= th.data.cartlist[i].order_amount- th.data.cartlist[i].user_money; //会员使用余额 | 638 | th.data.cartlist[i].order_amount= th.data.cartlist[i].order_amount- th.data.cartlist[i].user_money; //会员使用余额 |
637 | 639 | ||
638 | - all_price += o_price; | ||
639 | - all_total_m += th.data.cartlist[i].total_amount; | ||
640 | - all_shipping_m += th.data.cartlist[i].shipping_price; | ||
641 | - all_order_m += th.data.cartlist[i].order_amount; | ||
642 | - all_user_m += th.data.cartlist[i].user_money; | ||
643 | - all_coupon_price_m+=th.data.cartlist[i].coupon_price; | 640 | + all_price += parseFloat(o_price); |
641 | + all_total_m += parseFloat(th.data.cartlist[i].total_amount); | ||
642 | + all_shipping_m += parseFloat(th.data.cartlist[i].shipping_price); | ||
643 | + all_order_m += parseFloat(th.data.cartlist[i].order_amount); | ||
644 | + all_user_m += parseFloat(th.data.cartlist[i].user_money); | ||
645 | + all_coupon_price_m+= parseFloat(th.data.cartlist[i].coupon_price); | ||
644 | 646 | ||
645 | 647 | ||
646 | } | 648 | } |