商品详情底部返回操作优化

master
gongfuxiang 2022-04-21 10:00:11 +08:00
parent af37e0f005
commit 3b2ea1c526
1 changed files with 30 additions and 12 deletions

View File

@ -338,11 +338,9 @@
<!-- 是否指定返回操作返回操作情况下仅展示返回和收藏操作 --> <!-- 是否指定返回操作返回操作情况下仅展示返回和收藏操作 -->
<block v-if="(params.is_opt_back || 0) != 0"> <block v-if="(params.is_opt_back || 0) != 0">
<!-- 返回操作 --> <!-- 返回操作 -->
<view class="item fl cp"> <view class="item fl cp" @tap="bottom_nav_back_event">
<navigator open-type="navigateBack" hover-class="none"> <image :src="common_static_url+'back-icon.png'" mode="scaleToFill"></image>
<image :src="common_static_url+'back-icon.png'" mode="scaleToFill"></image> <text class="dis-block text-size-xs cr-gray">返回</text>
<text class="dis-block text-size-xs cr-gray">返回</text>
</navigator>
</view> </view>
</block> </block>
<block v-else> <block v-else>
@ -1707,7 +1705,7 @@
} }
} }
}, },
// //
plugins_salerecords_tips_handle() { plugins_salerecords_tips_handle() {
// //
@ -1743,14 +1741,14 @@
}); });
} }
}, },
// //
popup_realstore_close_event(e) { popup_realstore_close_event(e) {
this.setData({ this.setData({
popup_realstore_status: false popup_realstore_status: false
}); });
}, },
// //
comment_images_show_event(e) { comment_images_show_event(e) {
var index = e.currentTarget.dataset.index; var index = e.currentTarget.dataset.index;
@ -1760,30 +1758,50 @@
urls: this.goods.comments_data[index]['images'] urls: this.goods.comments_data[index]['images']
}); });
}, },
// //
nav_more_event(e) { nav_more_event(e) {
app.globalData.operation_event(e); app.globalData.operation_event(e);
this.setData({nav_more_status: false}); this.setData({nav_more_status: false});
}, },
// //
popup_wholesale_event(e) { popup_wholesale_event(e) {
this.setData({ this.setData({
popup_wholesale_status: true popup_wholesale_status: true
}); });
}, },
// //
popup_wholesale_close_event(e) { popup_wholesale_close_event(e) {
this.setData({ this.setData({
popup_wholesale_status: false popup_wholesale_status: false
}); });
}, },
// url // url
url_event(e) { url_event(e) {
app.globalData.url_event(e); app.globalData.url_event(e);
},
//
bottom_nav_back_event(e) {
var pages = getCurrentPages();
if(pages.length > 1) {
uni.navigateBack();
} else {
//
var url = app.globalData.data.tabbar_pages[0];
//
if((this.params.is_opt_back || 0) == 1) {
//
if((this.params.realstore_id || null) != null) {
url = '/pages/plugins/realstore/detail/detail?id='+this.params.realstore_id;
}
}
app.globalData.url_open(url);
}
} }
} }
}; };