组合搭配支持多商户

master
gongfuxiang 2022-12-16 14:12:01 +08:00
parent c15d035b20
commit b7ab3ba6c1
2 changed files with 31 additions and 8 deletions

View File

@ -28,7 +28,17 @@
</view>
<!-- 结尾 -->
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
<!-- 回到店铺 -->
<view v-if="(shop || null) != null" class="bottom-fixed padding-main">
<button class="bg-main br-main cr-white round dis-block" type="default" hover-class="none" size="mini" @tap="shop_event" :data-value="shop.url">
<view class="dis-inline-block va-m">
<uni-icons type="shop" size="16" color="#fff"></uni-icons>
</view>
<text class="va-m margin-left-sm">回到店铺</text>
</button>
</view>
</scroll-view>
</view>
</view>
@ -50,7 +60,8 @@
data_page_total: 0,
data_page: 1,
params: null,
data_base: null,
data_base: null,
shop: null,
//
share_info: {}
};
@ -98,14 +109,15 @@
uni.request({
url: app.globalData.get_request_url("index", "index", "binding"),
method: 'POST',
data: {},
data: this.params,
dataType: 'json',
success: res => {
uni.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
this.setData({
data_base: data.base || null
data_base: data.base || null,
shop: data.shop || null
});
if ((this.data_base || null) != null) {
@ -125,7 +137,7 @@
});
}
}
//
this.get_data_list(1);
} else {
@ -169,7 +181,8 @@
url: app.globalData.get_request_url("datalist", "index", "binding"),
method: 'POST',
data: {
page: this.data_page
page: this.data_page,
shop_id: this.params.spid || 0
},
dataType: 'json',
success: res => {
@ -231,7 +244,17 @@
//
scroll_lower(e) {
this.get_data_list(1);
this.get_data_list();
},
//
shop_event(e) {
var prev_url = app.globalData.prev_page();
if(prev_url != null && prev_url.indexOf('pages/plugins/shop/detail/detail') != -1) {
uni.navigateBack();
} else {
app.globalData.url_event(e);
}
}
}
};

View File

@ -251,7 +251,7 @@
//
scroll_lower(e) {
this.get_data_list(1);
this.get_data_list();
},
//