|
@@ -41,7 +41,8 @@
|
|
|
</view>
|
|
|
<view class='noCommodity' v-if="productList.length == 0 && where.current > 1">
|
|
|
<view class='emptyBox'>
|
|
|
- <image :src="imgHost + '/statics/images/no-thing.png'"></image>
|
|
|
+ <!-- <image :src="imgHost + '/statics/images/no-thing.png'"></image> -->
|
|
|
+ <u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"/>
|
|
|
</view>
|
|
|
<recommend :hostProduct="hostProduct"></recommend>
|
|
|
</view>
|
|
@@ -79,7 +80,6 @@ export default {
|
|
|
is_switch: true,
|
|
|
where: {
|
|
|
zoneType: 3,
|
|
|
- goodsCategoryId: 0,
|
|
|
current: 1,
|
|
|
size: 20,
|
|
|
},
|
|
@@ -98,7 +98,12 @@ export default {
|
|
|
},
|
|
|
onLoad: function (options) {
|
|
|
// this.where.goodsCategoryId = options.cid || 0;
|
|
|
- this.$set(this.where, 'goodsCategoryId', options.sid || 0);
|
|
|
+ if (options.sid) {
|
|
|
+ this.$set(this.where, 'goodsCategoryId', options.sid);
|
|
|
+ }
|
|
|
+ if (options.zoneType) {
|
|
|
+ this.$set(this.where, 'zoneType', options.zoneType);
|
|
|
+ }
|
|
|
this.title = options.title || '';
|
|
|
this.get_product_list();
|
|
|
uni.setNavigationBarTitle({
|
|
@@ -177,13 +182,13 @@ export default {
|
|
|
},
|
|
|
//设置where条件
|
|
|
setWhere: function () {
|
|
|
- if (this.price == 0) this.where.priceOrder = '';
|
|
|
- else if (this.price == 1) this.where.priceOrder = 'asc';
|
|
|
- else if (this.price == 2) this.where.priceOrder = 'desc';
|
|
|
- if (this.stock == 0) this.where.salesOrder = '';
|
|
|
- else if (this.stock == 1) this.where.salesOrder = 'asc';
|
|
|
- else if (this.stock == 2) this.where.salesOrder = 'desc';
|
|
|
- this.where.news = this.nows ? 1 : 0;
|
|
|
+ // if (this.price == 0) this.where.priceOrder = '';
|
|
|
+ // else if (this.price == 1) this.where.priceOrder = 'asc';
|
|
|
+ // else if (this.price == 2) this.where.priceOrder = 'desc';
|
|
|
+ // if (this.stock == 0) this.where.salesOrder = '';
|
|
|
+ // else if (this.stock == 1) this.where.salesOrder = 'asc';
|
|
|
+ // else if (this.stock == 2) this.where.salesOrder = 'desc';
|
|
|
+ // this.where.news = this.nows ? 1 : 0;
|
|
|
},
|
|
|
//查找产品
|
|
|
get_product_list: function (isPage) {
|