|
@@ -113,7 +113,6 @@
|
|
|
</view>
|
|
|
<view class="bottom-box" v-if="delete_type == 1">
|
|
|
<p @click="upStore">批量上架</p>
|
|
|
- <p @click="deleteShop">批量删除</p>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -351,18 +350,25 @@
|
|
|
|
|
|
},
|
|
|
async upStore() {
|
|
|
- const ids = this.rightTabbar.filter(obj=>obj.checked).map(item=>item.id)
|
|
|
+ const ids = this.rightTabbar.filter(obj => obj.checked).map(item => item.id)
|
|
|
+ if (ids.length == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请选择需要上架的商品'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
const res = await upGoods(ids)
|
|
|
- if(res.code=='OK'){
|
|
|
+ if (res.code == 'OK') {
|
|
|
uni.showToast({
|
|
|
- icon:'none',
|
|
|
- title:'上架成功'
|
|
|
+ icon: 'none',
|
|
|
+ title: '上架成功'
|
|
|
})
|
|
|
this.getGoodsList()
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
- icon:'none',
|
|
|
- title:'上架失败'
|
|
|
+ icon: 'none',
|
|
|
+ title: '上架失败'
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -391,7 +397,7 @@
|
|
|
})
|
|
|
this.tabbar = res.data
|
|
|
|
|
|
- if(this.delete_type==1){
|
|
|
+ if (this.delete_type) {
|
|
|
this.rightTabbar = result.data.map(obj => {
|
|
|
return {
|
|
|
...obj,
|
|
@@ -403,7 +409,7 @@
|
|
|
|
|
|
} else {
|
|
|
this.tabbar = []
|
|
|
- this.rightTabbar = []
|
|
|
+ this.rightTabbar = []
|
|
|
}
|
|
|
|
|
|
|