Commit a15f9c469207d3649a4a37265e1a5a0179f6c807

Authored by 后端研发-苏泰源
2 parents 826ea456 397e0899

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

components/diy_goodsGroup/g_filter.wxs
... ... @@ -93,7 +93,11 @@ var g_filters = {
93 93 var url = '';
94 94 if(item.prom_type == 9) {
95 95 url = '/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id;
96   - } else {
  96 + }
  97 + else if(item.prom_type==8){
  98 + url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id
  99 + }
  100 + else {
97 101 url = '/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_id=' + item.prom_id + '&prom_type=' + item.prom_type;
98 102 };
99 103 return url;
... ... @@ -107,5 +111,5 @@ module.exports = {
107 111 is_has_rank:g_filters.is_has_rank,
108 112 get_card_price:g_filters.get_card_price,
109 113 get_border_type:g_filters.get_border_type,
110   - get_url_by_type: g_filters.get_url_by_type,
  114 + get_url_by_type: g_filters.get_url_by_type,
111 115 }
... ...
components/goods_list/g_filter.wxs
... ... @@ -62,8 +62,24 @@ var g_filters = {
62 62 if(min_name.length>4 ) min_name=min_name.substring(0, 8);
63 63 return min_name;
64 64 },
  65 +
  66 + get_url_by_type: function(item) {
  67 + var url = '';
  68 + if(item.prom_type == 9) {
  69 + url = '/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id;
  70 + }
  71 + else if(item.prom_type==8){
  72 + url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id
  73 + }
  74 + else {
  75 + url = '/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_id=' + item.prom_id + '&prom_type=' + item.prom_type;
  76 + };
  77 + return url;
  78 + },
  79 +
65 80 }
66 81 module.exports = {
67 82 is_has_rank:g_filters.is_has_rank,
68 83 get_card_price:g_filters.get_card_price,
  84 + get_url_by_type:g_filters.get_url_by_type,
69 85 }
70 86 \ No newline at end of file
... ...
components/goods_list/goods_list.wxml
... ... @@ -4,7 +4,9 @@
4 4 <view class="collects">
5 5 <view class="hang ">
6 6 <!-- 商品详情 -->
7   - <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="{{item.prom_type == 9 ? ('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id):('/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id+'&title='+item.goods_name+'&prom_type='+item.prom_type+'&prom_id='+item.prom_id)}}">
  7 +
  8 + <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="{{get_url_by_type(item)}}">
  9 + <!--<view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="{{item.prom_type == 9 ? ('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id):('/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id+'&title='+item.goods_name+'&prom_type='+item.prom_type+'&prom_id='+item.prom_id)}}">-->
8 10 <!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}" hover-class="none"> -->
9 11 <navigator url="{{item.prom_type == 9 ? ('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id):('/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id+'&title='+item.goods_name+'&prom_type='+item.prom_type+'&prom_id='+item.prom_id)}}" hover-class="none">
10 12 <!-- 商品图⽚ -->
... ...
packageA/pages/distribution/goods/g_filter.wxs
... ... @@ -62,8 +62,21 @@ var g_filters = {
62 62 if(min_name.length>4 ) min_name=min_name.substring(0, 8);
63 63 return min_name;
64 64 },
  65 +
  66 + //跳转的接口
  67 + get_goods_url:function(item){
  68 + var url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id
  69 + if(item.prom_type==8){
  70 + url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id
  71 + }
  72 + if(item.prom_type==1 && item.prom_id>0 ){
  73 + url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id+"&prom_type=1";
  74 + }
  75 + return url1;
  76 + }
65 77 }
66 78 module.exports = {
67 79 is_has_rank:g_filters.is_has_rank,
68   - get_card_price:g_filters.get_card_price,
  80 + get_card_price:g_filters.get_card_price,
  81 + get_goods_url:g_filters.get_goods_url
69 82 }
70 83 \ No newline at end of file
... ...
packageA/pages/distribution/goods/goods.js
... ... @@ -510,6 +510,11 @@ Page({
510 510 * promiseGet请求数据
511 511 */
512 512 getData: function(isInit, url, data, isShowLoading) {
  513 +
  514 + var user_id=getApp().globalData.user_id;
  515 + if(!user_id) user_id=0;
  516 + data.user_id=user_id;
  517 +
513 518 return new Promise(function(resolve, reject) {
514 519  
515 520 app.request.promiseGet(url, {
... ...
packageA/pages/distribution/goods/goods.wxml
... ... @@ -75,7 +75,7 @@
75 75  
76 76 </label> -->
77 77 <checkbox value="{{item.goods_id}}" checked="{{item.checked}}" wx:if="{{!(options.index == 1 && currentTabIndex ==1)}}"/>
78   - <view class="flex pdl10" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}">
  78 + <view class="flex pdl10" bindtap="goto" data-url="{{g_filter.get_goods_url(item)}}">
79 79 <view class="pdr20"><image class="img" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load/></view>
80 80 <view class="flex fdc jc_sb">
81 81 <view class="ellipsis-2">{{item.goods_name}}</view>
... ... @@ -214,7 +214,7 @@
214 214 </checkbox-group>
215 215  
216 216 <checkbox-group class="fs26 flex pd16 wrap" catchchange="checkboxChange" wx:else>
217   - <view class="item2 bg-white" wx:for="{{list.pageData}}" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}">
  217 + <view class="item2 bg-white" wx:for="{{list.pageData}}" bindtap="goto" data-url="{{g_filter.get_goods_url(item)}}">
218 218 <image class="img2" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" mode="aspectFit" lazy-load/>
219 219 <view class="pd20 fs26 flex jc_sb fdc f1">
220 220 <view class="ellipsis-2">{{item.goods_name}}</view>
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -805,8 +805,9 @@ Page({
805 805 ee.data.prom_id=t.data.data.prom_id;
806 806 }
807 807  
808   - if(ee.data.prom_type!=1 && ee.data.prom_type!=4 && ee.data.prom_type!=6 && ee.data.prom_type!=2)
809   - ee.check_is_youhui(ee.data.gid);
  808 + if(ee.data.prom_type!=1 && ee.data.prom_type!=4 && ee.data.prom_type!=6 && ee.data.prom_type!=2){
  809 + ee.check_is_youhui(ee.data.gid);
  810 + }
810 811  
811 812 t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss');
812 813  
... ... @@ -2368,6 +2369,8 @@ Page({
2368 2369 });
2369 2370  
2370 2371  
  2372 +
  2373 +
2371 2374 that.check_is_youhui(gid, that.data.is_normal);
2372 2375  
2373 2376 this.get_sto(that.data.is_normal);
... ... @@ -3124,6 +3127,8 @@ Page({
3124 3127 this.get_sto();
3125 3128 this.get_sku(o.stoid, this.data.data, gid);
3126 3129 this.check_has_flash();
  3130 + this.data.is_normal=1;
  3131 + this.check_is_youhui(gid,1);
3127 3132 return false;
3128 3133 }
3129 3134  
... ...
pages/goods/goodsList/g_filter.wxs
... ... @@ -79,9 +79,14 @@ var g_filters = {
79 79 if(min_name.length>4) min_name=min_name.substring(0, 8);
80 80 return min_name;
81 81 },
  82 +
82 83 //跳转的接口
83 84 get_goods_url:function(item){
84 85 var url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id
  86 +
  87 + if(item.prom_type == 9) {
  88 + url1 = '/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id;
  89 + }
85 90 if(item.prom_type==8){
86 91 url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id
87 92 }
... ...