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,7 +93,11 @@ var g_filters = {
93 var url = ''; 93 var url = '';
94 if(item.prom_type == 9) { 94 if(item.prom_type == 9) {
95 url = '/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id; 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 url = '/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_id=' + item.prom_id + '&prom_type=' + item.prom_type; 101 url = '/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_id=' + item.prom_id + '&prom_type=' + item.prom_type;
98 }; 102 };
99 return url; 103 return url;
@@ -107,5 +111,5 @@ module.exports = { @@ -107,5 +111,5 @@ module.exports = {
107 is_has_rank:g_filters.is_has_rank, 111 is_has_rank:g_filters.is_has_rank,
108 get_card_price:g_filters.get_card_price, 112 get_card_price:g_filters.get_card_price,
109 get_border_type:g_filters.get_border_type, 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,8 +62,24 @@ var g_filters = {
62 if(min_name.length>4 ) min_name=min_name.substring(0, 8); 62 if(min_name.length>4 ) min_name=min_name.substring(0, 8);
63 return min_name; 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 module.exports = { 81 module.exports = {
67 is_has_rank:g_filters.is_has_rank, 82 is_has_rank:g_filters.is_has_rank,
68 get_card_price:g_filters.get_card_price, 83 get_card_price:g_filters.get_card_price,
  84 + get_url_by_type:g_filters.get_url_by_type,
69 } 85 }
70 \ No newline at end of file 86 \ No newline at end of file
components/goods_list/goods_list.wxml
@@ -4,7 +4,9 @@ @@ -4,7 +4,9 @@
4 <view class="collects"> 4 <view class="collects">
5 <view class="hang "> 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 <!-- <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"> --> 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 <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"> 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,8 +62,21 @@ var g_filters = {
62 if(min_name.length>4 ) min_name=min_name.substring(0, 8); 62 if(min_name.length>4 ) min_name=min_name.substring(0, 8);
63 return min_name; 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 module.exports = { 78 module.exports = {
67 is_has_rank:g_filters.is_has_rank, 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 \ No newline at end of file 83 \ No newline at end of file
packageA/pages/distribution/goods/goods.js
@@ -510,6 +510,11 @@ Page({ @@ -510,6 +510,11 @@ Page({
510 * promiseGet请求数据 510 * promiseGet请求数据
511 */ 511 */
512 getData: function(isInit, url, data, isShowLoading) { 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 return new Promise(function(resolve, reject) { 518 return new Promise(function(resolve, reject) {
514 519
515 app.request.promiseGet(url, { 520 app.request.promiseGet(url, {
packageA/pages/distribution/goods/goods.wxml
@@ -75,7 +75,7 @@ @@ -75,7 +75,7 @@
75 75
76 </label> --> 76 </label> -->
77 <checkbox value="{{item.goods_id}}" checked="{{item.checked}}" wx:if="{{!(options.index == 1 && currentTabIndex ==1)}}"/> 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 <view class="pdr20"><image class="img" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load/></view> 79 <view class="pdr20"><image class="img" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load/></view>
80 <view class="flex fdc jc_sb"> 80 <view class="flex fdc jc_sb">
81 <view class="ellipsis-2">{{item.goods_name}}</view> 81 <view class="ellipsis-2">{{item.goods_name}}</view>
@@ -214,7 +214,7 @@ @@ -214,7 +214,7 @@
214 </checkbox-group> 214 </checkbox-group>
215 215
216 <checkbox-group class="fs26 flex pd16 wrap" catchchange="checkboxChange" wx:else> 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 <image class="img2" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" mode="aspectFit" lazy-load/> 218 <image class="img2" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" mode="aspectFit" lazy-load/>
219 <view class="pd20 fs26 flex jc_sb fdc f1"> 219 <view class="pd20 fs26 flex jc_sb fdc f1">
220 <view class="ellipsis-2">{{item.goods_name}}</view> 220 <view class="ellipsis-2">{{item.goods_name}}</view>
pages/goods/goodsInfo/goodsInfo.js
@@ -805,8 +805,9 @@ Page({ @@ -805,8 +805,9 @@ Page({
805 ee.data.prom_id=t.data.data.prom_id; 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 t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss'); 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,6 +2369,8 @@ Page({
2368 }); 2369 });
2369 2370
2370 2371
  2372 +
  2373 +
2371 that.check_is_youhui(gid, that.data.is_normal); 2374 that.check_is_youhui(gid, that.data.is_normal);
2372 2375
2373 this.get_sto(that.data.is_normal); 2376 this.get_sto(that.data.is_normal);
@@ -3124,6 +3127,8 @@ Page({ @@ -3124,6 +3127,8 @@ Page({
3124 this.get_sto(); 3127 this.get_sto();
3125 this.get_sku(o.stoid, this.data.data, gid); 3128 this.get_sku(o.stoid, this.data.data, gid);
3126 this.check_has_flash(); 3129 this.check_has_flash();
  3130 + this.data.is_normal=1;
  3131 + this.check_is_youhui(gid,1);
3127 return false; 3132 return false;
3128 } 3133 }
3129 3134
pages/goods/goodsList/g_filter.wxs
@@ -79,9 +79,14 @@ var g_filters = { @@ -79,9 +79,14 @@ var g_filters = {
79 if(min_name.length>4) min_name=min_name.substring(0, 8); 79 if(min_name.length>4) min_name=min_name.substring(0, 8);
80 return min_name; 80 return min_name;
81 }, 81 },
  82 +
82 //跳转的接口 83 //跳转的接口
83 get_goods_url:function(item){ 84 get_goods_url:function(item){
84 var url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id 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 if(item.prom_type==8){ 90 if(item.prom_type==8){
86 url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id 91 url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id
87 } 92 }