|
@@ -15,7 +15,7 @@
|
|
|
|
|
|
<view style="padding: 30upx 18upx;">
|
|
|
<view style="width: 95%;margin: 0 auto;">
|
|
|
- <view @click="choseType(1)" :class="tabIndex==1 ? 'active' : ''" class="typeItem">
|
|
|
+ <!-- <view @click="choseType(1)" :class="tabIndex==1 ? 'active' : ''" class="typeItem">
|
|
|
综合
|
|
|
</view>
|
|
|
<view @click="choseType(2)" class="typeItem">
|
|
@@ -43,8 +43,41 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- </view>
|
|
|
-
|
|
|
+ </view> -->
|
|
|
+ <view @click="choseType(1)" :class="tabIndex==1 ? 'active' : ''" class="typeItem">
|
|
|
+ 综合
|
|
|
+ </view>
|
|
|
+ <view @click="choseType(2)" class="typeItem">
|
|
|
+ <view class="iconClass">
|
|
|
+ <view :class="tabIndex==2 ? 'active' : ''">上新</view>
|
|
|
+ <view v-if="istopclick==0">
|
|
|
+ <img style="width: 36upx;height: 36upx;vertical-align: middle;" src='../../static/sort.png' />
|
|
|
+ </view>
|
|
|
+ <view v-if="istopclick==1">
|
|
|
+ <img style="width: 36upx;height: 36upx;vertical-align: middle;" src='../../static/sort_down.png' />
|
|
|
+ </view>
|
|
|
+ <view v-if="istopclick==2">
|
|
|
+ <img style="width: 36upx;height: 36upx;vertical-align: middle;" src='../../static/sort_up.png' />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view @click="choseType(3)" class="typeItem">
|
|
|
+ <view class="iconClass">
|
|
|
+ <view :class="tabIndex==3 ? 'active' : ''">价格</view>
|
|
|
+ <view style="display: flex;flex-direction: column;margin-left: 10rpx;">
|
|
|
+ <view v-if="isprice==0">
|
|
|
+ <img style="width: 36upx;height: 36upx;vertical-align: middle;" src='../../static/sort.png' />
|
|
|
+ </view>
|
|
|
+ <view v-if="isprice==3">
|
|
|
+ <img style="width: 36upx;height: 36upx;vertical-align: middle;" src='../../static/sort_down.png' />
|
|
|
+ </view>
|
|
|
+ <view v-if="isprice==4">
|
|
|
+ <img style="width: 36upx;height: 36upx;vertical-align: middle;" src='../../static/sort_up.png' />
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -67,6 +100,9 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+
|
|
|
+
|
|
|
+ isprice: 0,
|
|
|
page: 1,
|
|
|
goodId:0,
|
|
|
tabIndex: 1,
|
|
@@ -89,7 +125,7 @@
|
|
|
// /this.getshopdetail();
|
|
|
},
|
|
|
// 获取商品详情
|
|
|
- getshopdetail() {
|
|
|
+ getshopdetail(e) {
|
|
|
if(this.searchvalue == '') {
|
|
|
this.$msg("关键字不能为空")
|
|
|
return;
|
|
@@ -105,6 +141,9 @@
|
|
|
keyword: this.searchvalue
|
|
|
},
|
|
|
success: (res) => {
|
|
|
+ if(e == 2) {
|
|
|
+ this.goods_list = [];
|
|
|
+ }
|
|
|
this.goods_list = this.goods_list.concat(res.data.data.goods_list);
|
|
|
if(res.data.data.goods_list.length < 10) {
|
|
|
this.isDetail = 2;
|
|
@@ -113,38 +152,74 @@
|
|
|
})
|
|
|
},
|
|
|
choseType(e) {
|
|
|
- this.tabIndex = e;
|
|
|
if(this.searchvalue == '') {
|
|
|
- return;
|
|
|
+ this.$msg("关键字不能为空")
|
|
|
+ return;
|
|
|
}
|
|
|
- this.goods_list = [];
|
|
|
+ this.page = 1;
|
|
|
+ this.tabIndex = e;
|
|
|
+ //this.goods_list = [];
|
|
|
if(this.tabIndex == 1) { // 服务
|
|
|
this.istopclick = 0;
|
|
|
- this.gc_id_1 = '';
|
|
|
+ this.isprice = 0;
|
|
|
+ this.gc_id_2 = '';
|
|
|
this.goods_price = '';
|
|
|
this.goods_commonid = '';
|
|
|
+ this.getshopdetail(2);
|
|
|
}else if(this.tabIndex == 2){ //伤
|
|
|
this.chosegoods_price = true;
|
|
|
this.istopclick = this.chosegoods_commonid?1:2;
|
|
|
+ this.isprice = 0;
|
|
|
this.goods_price = '';
|
|
|
this.goods_commonid = this.chosegoods_commonid?'asc':'desc';
|
|
|
- this.gc_id_1 = '';
|
|
|
+ //this.gc_id_1 = '';
|
|
|
this.chosegoods_commonid = !this.chosegoods_commonid;
|
|
|
+ this.getshopdetail(2);
|
|
|
}else if(this.tabIndex == 3){ // 价格
|
|
|
this.chosegoods_commonid = true;
|
|
|
- this.istopclick = this.chosegoods_price?3:4;
|
|
|
+ this.isprice = this.chosegoods_price?3:4;
|
|
|
this.goods_price = this.chosegoods_price?'desc':'asc';
|
|
|
this.goods_commonid = '';
|
|
|
- this.gc_id_1 = '';
|
|
|
- this.chosegoods_price = !this.chosegoods_price;
|
|
|
- }else if(this.tabIndex ==4) { // 分类
|
|
|
this.istopclick = 0;
|
|
|
- this.goods_price = '';
|
|
|
- this.goods_commonid = '';
|
|
|
- this.chosegoods_price = true;
|
|
|
- this.chosegoods_commonid = true;
|
|
|
+ //this.gc_id_1 = '';
|
|
|
+ this.chosegoods_price = !this.chosegoods_price;
|
|
|
+ this.getshopdetail(2);
|
|
|
}
|
|
|
- this.getshopdetail();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // this.tabIndex = e;
|
|
|
+ // if(this.searchvalue == '') {
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // this.goods_list = [];
|
|
|
+ // if(this.tabIndex == 1) { // 服务
|
|
|
+ // this.istopclick = 0;
|
|
|
+ // this.gc_id_1 = '';
|
|
|
+ // this.goods_price = '';
|
|
|
+ // this.goods_commonid = '';
|
|
|
+ // }else if(this.tabIndex == 2){ //伤
|
|
|
+ // this.chosegoods_price = true;
|
|
|
+ // this.istopclick = this.chosegoods_commonid?1:2;
|
|
|
+ // this.goods_price = '';
|
|
|
+ // this.goods_commonid = this.chosegoods_commonid?'asc':'desc';
|
|
|
+ // this.gc_id_1 = '';
|
|
|
+ // this.chosegoods_commonid = !this.chosegoods_commonid;
|
|
|
+ // }else if(this.tabIndex == 3){ // 价格
|
|
|
+ // this.chosegoods_commonid = true;
|
|
|
+ // this.istopclick = this.chosegoods_price?3:4;
|
|
|
+ // this.goods_price = this.chosegoods_price?'desc':'asc';
|
|
|
+ // this.goods_commonid = '';
|
|
|
+ // this.gc_id_1 = '';
|
|
|
+ // this.chosegoods_price = !this.chosegoods_price;
|
|
|
+ // }else if(this.tabIndex ==4) { // 分类
|
|
|
+ // this.istopclick = 0;
|
|
|
+ // this.goods_price = '';
|
|
|
+ // this.goods_commonid = '';
|
|
|
+ // this.chosegoods_price = true;
|
|
|
+ // this.chosegoods_commonid = true;
|
|
|
+ // }
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
}
|