Commit d982f16924438e6b254460fe07304053479739e0
1 parent
d0b39a9a
点击跳转的优化
Showing
6 changed files
with
31 additions
and
5 deletions
packageA/pages/cardDetails/cardDetails.js
packageA/pages/cardList/cardList.js
| 1 | // pages/i_service/cardList/cardList.js | 1 | // pages/i_service/cardList/cardList.js |
| 2 | const app = getApp(); | 2 | const app = getApp(); |
| 3 | -let self = null; | 3 | +let self = null,ut = require("../../../utils/util.js"); |
| 4 | + | ||
| 4 | 5 | ||
| 5 | Page({ | 6 | Page({ |
| 6 | 7 | ||
| @@ -220,7 +221,7 @@ Page({ | @@ -220,7 +221,7 @@ Page({ | ||
| 220 | var gid = e.currentTarget.dataset.gid; | 221 | var gid = e.currentTarget.dataset.gid; |
| 221 | var rurl = '/api/weshop/activitylist/listGoodActInfo2New'; | 222 | var rurl = '/api/weshop/activitylist/listGoodActInfo2New'; |
| 222 | var req_d = { | 223 | var req_d = { |
| 223 | - "store_id": os.stoid, | 224 | + "store_id": app.globalData.setting.stoid, |
| 224 | "goods_id": gid, | 225 | "goods_id": gid, |
| 225 | "user_id": getApp().globalData.user_id, | 226 | "user_id": getApp().globalData.user_id, |
| 226 | "goods_type":1 | 227 | "goods_type":1 |
packageC/pages/presell/cart/cart2.js
| @@ -3166,6 +3166,18 @@ Page({ | @@ -3166,6 +3166,18 @@ Page({ | ||
| 3166 | var index = e.currentTarget.dataset.index; | 3166 | var index = e.currentTarget.dataset.index; |
| 3167 | var txt = "cartlist[" + index + "].focus"; | 3167 | var txt = "cartlist[" + index + "].focus"; |
| 3168 | this.setData({ [txt]: 0 }) | 3168 | this.setData({ [txt]: 0 }) |
| 3169 | + }, | ||
| 3170 | + | ||
| 3171 | + go_detail:function(e){ | ||
| 3172 | + var gid=e.currentTarget.dataset.gid; | ||
| 3173 | + var act=this.data.act; | ||
| 3174 | + var url=''; | ||
| 3175 | + if(this.data.is_fwk){ | ||
| 3176 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${act.id}`; | ||
| 3177 | + }else{ | ||
| 3178 | + url= "/pages/goods/goodsInfo/goodsInfo?goods_id="+gid; | ||
| 3179 | + } | ||
| 3180 | + getApp().goto(url); | ||
| 3169 | } | 3181 | } |
| 3170 | 3182 | ||
| 3171 | 3183 |
packageC/pages/presell/cart/cart2.wxml
| @@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
| 62 | <view class="goods-img"> | 62 | <view class="goods-img"> |
| 63 | <image class="wh100 bdr14" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image> | 63 | <image class="wh100 bdr14" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image> |
| 64 | </view> | 64 | </view> |
| 65 | - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> | 65 | + <navigator catchtap="go_detail" class="order-cont" data-gid="{{bn_goods.goods_id}}"> |
| 66 | <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> | 66 | <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> |
| 67 | <!-- 商品属性 --> | 67 | <!-- 商品属性 --> |
| 68 | <view class="flex-vertical fs28 xc-ash color-gray n_guige"> | 68 | <view class="flex-vertical fs28 xc-ash color-gray n_guige"> |
packageC/pages/presell/cart/cart2_pre.js
| @@ -1504,6 +1504,18 @@ Page({ | @@ -1504,6 +1504,18 @@ Page({ | ||
| 1504 | switchChange: function (e) { | 1504 | switchChange: function (e) { |
| 1505 | console.log(e, 111); | 1505 | console.log(e, 111); |
| 1506 | this.setData({ agree_no_ref: e.detail.value }); | 1506 | this.setData({ agree_no_ref: e.detail.value }); |
| 1507 | + }, | ||
| 1508 | + | ||
| 1509 | + go_detail:function(e){ | ||
| 1510 | + var gid=e.currentTarget.dataset.gid; | ||
| 1511 | + var act=this.data.act; | ||
| 1512 | + var url=''; | ||
| 1513 | + if(this.data.is_fwk){ | ||
| 1514 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${act.id}`; | ||
| 1515 | + }else{ | ||
| 1516 | + url= "/pages/goods/goodsInfo/goodsInfo?goods_id="+gid; | ||
| 1517 | + } | ||
| 1518 | + getApp().goto(url); | ||
| 1507 | } | 1519 | } |
| 1508 | 1520 | ||
| 1509 | }); | 1521 | }); |
packageC/pages/presell/cart/cart2_pre.wxml
| @@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
| 48 | <image class="wh100 bdr14" src="{{bn_goods.original_img}}" | 48 | <image class="wh100 bdr14" src="{{bn_goods.original_img}}" |
| 49 | binderror='cart_set_err' data-err="bn_goods.original_img"></image> | 49 | binderror='cart_set_err' data-err="bn_goods.original_img"></image> |
| 50 | </view> | 50 | </view> |
| 51 | - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> | 51 | + <navigator catchtap="go_detail" class="order-cont" data-gid="{{bn_goods.goods_id}}"> |
| 52 | <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> | 52 | <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> |
| 53 | <!-- 商品属性 --> | 53 | <!-- 商品属性 --> |
| 54 | <view class="flex-vertical fs28 color-gray n_guige"> | 54 | <view class="flex-vertical fs28 color-gray n_guige"> |