Authored by 李奇

部分多余商品展示删除

@@ -79,7 +79,6 @@ Page(Object.assign({ @@ -79,7 +79,6 @@ Page(Object.assign({
79 ] 79 ]
80 }, 80 },
81 81
82 - shopRecList: [],  
83 preferList: [], 82 preferList: [],
84 83
85 showMenu: false, 84 showMenu: false,
@@ -200,37 +199,6 @@ Page(Object.assign({ @@ -200,37 +199,6 @@ Page(Object.assign({
200 showSnapshootShare: false 199 showSnapshootShare: false
201 }); 200 });
202 }, 201 },
203 - shopRecList: function() {  
204 - detailModel.shopRecommend({  
205 - page: 1,  
206 - limit: 20,  
207 - shopId: app.getShopId(),  
208 - product_skn: this.data.productSkn  
209 - }).then(res => {  
210 - if (res.code === 200) {  
211 - const keyAdapter = {  
212 - skn: 'product_skn',  
213 - salesPrice: 'sales_price',  
214 - marketPrice: 'market_price',  
215 - productName: 'product_name',  
216 - defaultImages: 'default_images'  
217 - };  
218 - let list = [];  
219 -  
220 - (res.data.product_list || []).forEach(product => {  
221 - let item = {};  
222 -  
223 - Object.keys(keyAdapter).forEach(key => {  
224 - item[key] = product[keyAdapter[key]];  
225 - });  
226 - list.push(item);  
227 - });  
228 - this.setData({  
229 - shopRecList: list  
230 - });  
231 - }  
232 - });  
233 - },  
234 preferList: function() { 202 preferList: function() {
235 detailModel.preference({ 203 detailModel.preference({
236 page: 1, 204 page: 1,
@@ -357,8 +325,6 @@ Page(Object.assign({ @@ -357,8 +325,6 @@ Page(Object.assign({
357 productNotForSale: res.data.attribute === 2, 325 productNotForSale: res.data.attribute === 2,
358 showBottomTipView: true 326 showBottomTipView: true
359 }); 327 });
360 -  
361 - this.shopRecList(res.data.shop_id);  
362 } 328 }
363 }); 329 });
364 }, 330 },
@@ -94,16 +94,6 @@ @@ -94,16 +94,6 @@
94 <image class="intro-image" src="{{item}}" mode="widthFix"></image> 94 <image class="intro-image" src="{{item}}" mode="widthFix"></image>
95 </view> 95 </view>
96 </view> 96 </view>
97 - <block wx:if="{{shopRecList.length}}">  
98 - <view class="gap"></view>  
99 - <view class='title-container'>  
100 - <view class='title-line'></view>  
101 - <view class='title-desc'> 店铺推荐商品</view>  
102 - </view>  
103 - <view class="product-list shop-rec">  
104 - <product-list list="{{shopRecList}}"></product-list>  
105 - </view>  
106 - </block>  
107 <block wx:if="{{preferList.length}}"> 97 <block wx:if="{{preferList.length}}">
108 <view class="gap"></view> 98 <view class="gap"></view>
109 <view class='title-container'> 99 <view class='title-container'>
@@ -13,7 +13,6 @@ let yas; @@ -13,7 +13,6 @@ let yas;
13 13
14 Page({ 14 Page({
15 data: { 15 data: {
16 - productList: [],  
17 userInfo: {}, 16 userInfo: {},
18 isLogin: false, 17 isLogin: false,
19 hasUnionID: false, 18 hasUnionID: false,
@@ -52,7 +51,6 @@ Page({ @@ -52,7 +51,6 @@ Page({
52 loginSucess: function() { 51 loginSucess: function() {
53 this.showUserInfo(); 52 this.showUserInfo();
54 this.getInfoNum(); 53 this.getInfoNum();
55 - this.chooseForYouList();  
56 }, 54 },
57 getInfoNum: function() { 55 getInfoNum: function() {
58 if (app.getUid()) { 56 if (app.getUid()) {
@@ -67,37 +65,6 @@ Page({ @@ -67,37 +65,6 @@ Page({
67 }); 65 });
68 } 66 }
69 }, 67 },
70 - chooseForYouList: function() {  
71 - homeModel.productList({  
72 - page: 1,  
73 - limit: 20,  
74 - shop_id: app.getShopId()  
75 - }).then(res => {  
76 - if (res.code === 200) {  
77 - const keyAdapter = {  
78 - skn: 'product_skn',  
79 - salesPrice: 'sales_price',  
80 - marketPrice: 'market_price',  
81 - productName: 'product_name',  
82 - defaultImages: 'default_images'  
83 - };  
84 - let list = [];  
85 -  
86 - (res.data.product_list || []).forEach(product => {  
87 - let item = {};  
88 -  
89 - Object.keys(keyAdapter).forEach(key => {  
90 - item[key] = product[keyAdapter[key]];  
91 - });  
92 - list.push(item);  
93 - });  
94 -  
95 - this.setData({  
96 - productList: list  
97 - });  
98 - }  
99 - });  
100 - },  
101 toOrdersTap: function(e) { 68 toOrdersTap: function(e) {
102 if (!this.data.isLogin) { 69 if (!this.data.isLogin) {
103 return wx.showToast({ 70 return wx.showToast({
@@ -71,14 +71,6 @@ @@ -71,14 +71,6 @@
71 <view class="address-title">服务与反馈</view> 71 <view class="address-title">服务与反馈</view>
72 </view> 72 </view>
73 </view> 73 </view>
74 - <view class="view-splite clearfix"/>  
75 - <view class='title-container'>  
76 - <view class='title-line'></view>  
77 - <view class='title-desc'>为你优选</view>  
78 - </view>  
79 - <view class="product-list">  
80 - <product-list list="{{productList}}"></product-list>  
81 - </view>  
82 </view> 74 </view>
83 </view> 75 </view>
84 </scroll-view> 76 </scroll-view>