|
@@ -25,7 +25,7 @@
|
|
|
<view class="flex-between-center" style="padding-right: 53rpx;">
|
|
|
<text class="mer-tj">今日推荐</text>
|
|
|
<text class="goods-score">{{recommendObj.score}}</text>
|
|
|
- <text class="goods-info">销量{{recommendObj.salesVolume}}</text>
|
|
|
+ <text class="goods-info">月销量{{recommendObj.salesVolume}}</text>
|
|
|
<text v-if="!recommendObj.isfreeDeliverfee" class="goods-info" style="color: #E5AD21;margin-left: 18rpx;">免配送费</text>
|
|
|
<view v-if="!recommendObj.isfreeDeliverfee && recommendObj.freeDeliverFee > 0" style="color: #999999;font-size: 21rpx;margin-left: 10rpx;text-decoration: line-through;">¥
|
|
|
{{recommendObj.freeDeliverFee}}</view>
|
|
@@ -184,13 +184,25 @@
|
|
|
that.winHeight = res.windowHeight
|
|
|
},
|
|
|
});
|
|
|
+ const allData = {
|
|
|
+ name : '全部',
|
|
|
+ id : 0,
|
|
|
+ icon : '/static/img/quanbu.png',
|
|
|
+ };
|
|
|
getProduct(that.takeoutId).then(res => {
|
|
|
const data = res.data;
|
|
|
// data[0].id = 0;
|
|
|
- data[0].name = '全部';
|
|
|
- data[0].icon = '/static/img/quanbu.png';
|
|
|
- that.optionIndex = data[0].id;
|
|
|
- that.optionData = data || []
|
|
|
+ // data[0].name = '全部';
|
|
|
+ // data[0].icon = '/static/img/quanbu.png';
|
|
|
+ // that.optionIndex = data[0].id;
|
|
|
+ // that.optionData = data || []
|
|
|
+ if (data.length !== 0) {
|
|
|
+ that.optionIndex =0;
|
|
|
+ that.optionData.push(allData)
|
|
|
+ data.forEach(function(item) {
|
|
|
+ that.optionData.push(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
that.page = 1;
|
|
|
that.getMatchedData()
|
|
|
console.log(that.optionData, '12312321321312321321312312')
|
|
@@ -218,7 +230,7 @@
|
|
|
latitude: uni.getStorageSync('user_latitude'),
|
|
|
longitude: uni.getStorageSync('user_longitude'),
|
|
|
productType: this.takeoutId,
|
|
|
- // typeIds: this.optionIndex==0?"":this.optionIndex,
|
|
|
+ typeIds: this.optionIndex==0?"":this.optionIndex,
|
|
|
page: this.page,
|
|
|
limit: 10
|
|
|
}).then(res => {
|
|
@@ -263,7 +275,10 @@
|
|
|
// },
|
|
|
onOptionClick(item) {
|
|
|
if (this.optionIndex === item.id) return
|
|
|
+ this.page = 1;
|
|
|
+ this.merchantList = [];
|
|
|
this.optionIndex = item.id;
|
|
|
+ //this.optionIndex = item.id;
|
|
|
this.getMatchedData()
|
|
|
},
|
|
|
merchantTab(item) {
|