|
@@ -148,10 +148,12 @@
|
|
// | Author: CRMEB Team <admin@crmeb.com>
|
|
// | Author: CRMEB Team <admin@crmeb.com>
|
|
// +----------------------------------------------------------------------
|
|
// +----------------------------------------------------------------------
|
|
import {
|
|
import {
|
|
- productList
|
|
|
|
|
|
+ productList,productActivityList
|
|
} from '@/api/product.js';
|
|
} from '@/api/product.js';
|
|
import {
|
|
import {
|
|
getMerSearchApi,
|
|
getMerSearchApi,
|
|
|
|
+ getMerActivitySearchApi,
|
|
|
|
+ getMerActivityProListApi,
|
|
getMerProListApi,
|
|
getMerProListApi,
|
|
getSecondHandListApi
|
|
getSecondHandListApi
|
|
} from '@/api/merchant.js';
|
|
} from '@/api/merchant.js';
|
|
@@ -274,7 +276,8 @@
|
|
goodScroll: true,
|
|
goodScroll: true,
|
|
isShow: false,
|
|
isShow: false,
|
|
fairCateId: '',
|
|
fairCateId: '',
|
|
- showCateDrawer: false
|
|
|
|
|
|
+ showCateDrawer: false,
|
|
|
|
+ isActivity: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
// 滚动监听
|
|
// 滚动监听
|
|
@@ -287,8 +290,9 @@
|
|
this.upPng = `${this.urlDomain}crmebimage/presets/up_red.png`;
|
|
this.upPng = `${this.urlDomain}crmebimage/presets/up_red.png`;
|
|
this.merId = options.merId ? Number(options.merId) : 0;
|
|
this.merId = options.merId ? Number(options.merId) : 0;
|
|
this.cateId = options.cateId ? Number(options.cateId) : '';
|
|
this.cateId = options.cateId ? Number(options.cateId) : '';
|
|
- this.fairCateId = Number(options.fairCateId) || ''
|
|
|
|
- if (this.cateId) {
|
|
|
|
|
|
+ this.fairCateId = Number(options.fairCateId) || '';
|
|
|
|
+ this.isActivity=options.isActivity;
|
|
|
|
+ if (this.isActivity) {
|
|
uni.setNavigationBarTitle({
|
|
uni.setNavigationBarTitle({
|
|
title: '精选商品'
|
|
title: '精选商品'
|
|
});
|
|
});
|
|
@@ -407,7 +411,8 @@
|
|
that.loadTitle = '';
|
|
that.loadTitle = '';
|
|
that.whereMer.keywords = encodeURIComponent(that.keyword);
|
|
that.whereMer.keywords = encodeURIComponent(that.keyword);
|
|
that.cateId ? that.whereMer.productType = that.cateId : '';
|
|
that.cateId ? that.whereMer.productType = that.cateId : '';
|
|
- getMerSearchApi(that.whereMer).then(res => {
|
|
|
|
|
|
+ let merchantSearchApi=this.isActivity?getMerActivitySearchApi:getMerSearchApi;
|
|
|
|
+ merchantSearchApi(that.whereMer).then(res => {
|
|
let list = res.data.list;
|
|
let list = res.data.list;
|
|
let merchantList = that.$util.SplitArray(list, that.merchantList);
|
|
let merchantList = that.$util.SplitArray(list, that.merchantList);
|
|
let loadend = list.length < that.whereMer.limit;
|
|
let loadend = list.length < that.whereMer.limit;
|
|
@@ -534,7 +539,9 @@
|
|
that.loadTitle = '加载更多'
|
|
that.loadTitle = '加载更多'
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- this.merId === 0 ? productList(that.where).then(res => {
|
|
|
|
|
|
+ let productApi=this.isActivity?productActivityList:productList;
|
|
|
|
+ let merchantProductApi=this.isActivity?getMerActivityProListApi:getMerProListApi;
|
|
|
|
+ this.merId === 0 ?productApi(that.where).then(res => {
|
|
let list = res.data.list;
|
|
let list = res.data.list;
|
|
let productList = that.$util.SplitArray(list, that.productList);
|
|
let productList = that.$util.SplitArray(list, that.productList);
|
|
let loadend = list.length < that.where.limit;
|
|
let loadend = list.length < that.where.limit;
|
|
@@ -547,7 +554,7 @@
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
that.loading = false;
|
|
that.loading = false;
|
|
that.loadTitle = '加载更多'
|
|
that.loadTitle = '加载更多'
|
|
- }) : getMerProListApi(that.where).then(res => {
|
|
|
|
|
|
+ }) : merchantProductApi(that.where).then(res => {
|
|
let list = res.data.list;
|
|
let list = res.data.list;
|
|
let productList = that.$util.SplitArray(list, that.productList);
|
|
let productList = that.$util.SplitArray(list, that.productList);
|
|
let loadend = list.length < that.where.limit;
|
|
let loadend = list.length < that.where.limit;
|