|
|
@@ -17,9 +17,9 @@
|
|
|
|
|
|
<div class="tab-container">
|
|
|
<div class="tab-item" :class="tabIndex == 1 ? 'active' : ''"
|
|
|
- @click="tabIndex = 1; productName = ''; productStatus = 0; getProductList(); getStatus()">品牌标品</div>
|
|
|
+ @click="switchTab(1)">品牌标品</div>
|
|
|
<div class="tab-item" :class="tabIndex == 0 ? 'active' : ''"
|
|
|
- @click="tabIndex = 0; productName = ''; productStatus = 0; getProductList(); getStatus()">自有商品</div>
|
|
|
+ @click="switchTab(0)">自有商品</div>
|
|
|
</div>
|
|
|
|
|
|
<view class="search">
|
|
|
@@ -253,6 +253,19 @@ export default {
|
|
|
this.getProductList()
|
|
|
// 这里可以添加其他逻辑
|
|
|
},
|
|
|
+ // 切换品牌标品 / 自有商品
|
|
|
+ switchTab(index) {
|
|
|
+ if (this.tabIndex === index) return
|
|
|
+ this.tabIndex = index
|
|
|
+ this.productName = ''
|
|
|
+ this.currentIndex = 0
|
|
|
+ this.productStatus = 0
|
|
|
+ this.isManage = false
|
|
|
+ this.isAll = false
|
|
|
+ this.productList = []
|
|
|
+ this.getProductList()
|
|
|
+ this.getStatus()
|
|
|
+ },
|
|
|
//切换分类
|
|
|
selectType(item, index) {
|
|
|
if (!this.isManage) {
|