Authored by 肖亚东

首页、地址管理等问题修改 — review by 黄义

@@ -376,6 +376,9 @@ Page({ @@ -376,6 +376,9 @@ Page({
376 376
377 }, 377 },
378 378
  379 + handlerMove: function () {
  380 +
  381 + }
379 }) 382 })
380 383
381 384
@@ -212,10 +212,6 @@ Page({ @@ -212,10 +212,6 @@ Page({
212 homelist: currentData.data, 212 homelist: currentData.data,
213 }) 213 })
214 } 214 }
215 - console.log('==============楼层数据===============');  
216 - console.log(this.data.homelist);  
217 - console.log('====================================');  
218 -  
219 this.fetchRecommend(force); 215 this.fetchRecommend(force);
220 }, 216 },
221 217
@@ -250,9 +246,6 @@ Page({ @@ -250,9 +246,6 @@ Page({
250 246
251 homeService.getProductlist(param) 247 homeService.getProductlist(param)
252 .then(json => { 248 .then(json => {
253 - console.log('==============商品数据===============');  
254 - console.log(json);  
255 - console.log('====================================');  
256 if (!json || !json.code || json.code != 200) { 249 if (!json || !json.code || json.code != 200) {
257 let currentChannel = this.data.selectedChannel; 250 let currentChannel = this.data.selectedChannel;
258 let currentChannelData = this.data.newChannels[currentChannel]; 251 let currentChannelData = this.data.newChannels[currentChannel];
@@ -449,12 +442,11 @@ Page({ @@ -449,12 +442,11 @@ Page({
449 }, 442 },
450 443
451 jumpByRuleEvent(event) { 444 jumpByRuleEvent(event) {
452 - let url = event.detail.currentTarget.dataset.jump_rule;  
453 - console.log('==========jumpByRuleEvent===========');  
454 - console.log(event.detail);  
455 - console.log(url);  
456 - console.log('====================================');  
457 - 445 + let dataset = event.currentTarget.dataset;
  446 + if (Object.keys(dataset).length === 0) {
  447 + dataset = event.detail.currentTarget.dataset;
  448 + }
  449 + let url = dataset.jump_rule;
458 router.goUrl(url); 450 router.goUrl(url);
459 }, 451 },
460 452
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 style="border-bottom:{{no_line?'0.5rpx solid #ffffff':'0.5rpx solid #e0e0e0'}}"> 3 style="border-bottom:{{no_line?'0.5rpx solid #ffffff':'0.5rpx solid #e0e0e0'}}">
4 <view class='titleLine'></view> 4 <view class='titleLine'></view>
5 <view class='titleDesc'>{{desc}}</view> 5 <view class='titleDesc'>{{desc}}</view>
6 - <view class='titleMore' tt:if='{{more_url?true:false}}' data-jump_rule="{{more_url}}" bindtap="jumpByRule"> 6 + <view class='titleMore' tt:if='{{more_url?true:false}}' data-jump_rule="{{more_url}}" bindtap="jumpByRuleEvent">
7 <image class="titleMoreIm" src="../../images/more_ic@2x.png" ></image> 7 <image class="titleMoreIm" src="../../images/more_ic@2x.png" ></image>
8 </view> 8 </view>
9 </view> 9 </view>
@@ -629,7 +629,7 @@ Page({ @@ -629,7 +629,7 @@ Page({
629 629
630 copy: function (e) { 630 copy: function (e) {
631 var that = this; 631 var that = this;
632 - var content = e.detail.currentTarget.dataset.copy_content; 632 + var content = e.detail.currentTarget.dataset.copy_content || '';
633 var type = e.detail.currentTarget.dataset.copy_type; 633 var type = e.detail.currentTarget.dataset.copy_type;
634 tt.setClipboardData({ 634 tt.setClipboardData({
635 data: '' + content, 635 data: '' + content,
@@ -649,7 +649,7 @@ Page({ @@ -649,7 +649,7 @@ Page({
649 649
650 lookup: function (e) { 650 lookup: function (e) {
651 var that = this; 651 var that = this;
652 - var copy_url = e.detail.currentTarget.dataset.copy_url; 652 + var copy_url = e.detail.currentTarget.dataset.copy_url || '';
653 var copy_content = e.detail.currentTarget.dataset.copy_content; 653 var copy_content = e.detail.currentTarget.dataset.copy_content;
654 var copy_type = e.detail.currentTarget.dataset.copy_type; 654 var copy_type = e.detail.currentTarget.dataset.copy_type;
655 tt.setClipboardData({ 655 tt.setClipboardData({
@@ -42,7 +42,6 @@ Page({ @@ -42,7 +42,6 @@ Page({
42 addType: 'none' // normal or wechat 42 addType: 'none' // normal or wechat
43 }, 43 },
44 onLoad:function(options){ 44 onLoad:function(options){
45 - console.log(options)  
46 // 生命周期函数--监听页面加载 45 // 生命周期函数--监听页面加载
47 // new app.WeToast; 46 // new app.WeToast;
48 47
@@ -49,9 +49,9 @@ @@ -49,9 +49,9 @@
49 <view class="add-address" > 49 <view class="add-address" >
50 <view class='separator'></view> 50 <view class='separator'></view>
51 <view catchtap="addButtonTapped" class='add-addressButton'><image src="../../../images/add-normal@3x.png" ></image></view> 51 <view catchtap="addButtonTapped" class='add-addressButton'><image src="../../../images/add-normal@3x.png" ></image></view>
52 - <view class='separator'></view>  
53 - <view catchtap="addFromWechatButtonTapped" class='add-addressButton right'><image src="../../../images/add-wechat@3x.png" ></image></view>  
54 - <view class='separator'></view> 52 + <!-- <view class='separator'></view> -->
  53 + <!-- <view catchtap="addFromWechatButtonTapped" class='add-addressButton right'><image src="../../../images/add-wechat@3x.png" ></image></view>
  54 + <view class='separator'></view> -->
55 </view> 55 </view>
56 </view> 56 </view>
57 </view> 57 </view>