Browse Source

优化详情

devlop
杨阁辉 4 years ago
parent
commit
e98b082344
3 changed files with 23 additions and 11 deletions
  1. 9
      pages/add-paper/index.vue
  2. 20
      pages/mall/index.vue
  3. 5
      pages/paper-detail/index.vue

9
pages/add-paper/index.vue

@ -346,13 +346,16 @@ export default {
this.title = option.title
}
this.option = option
this.getCategoryListQuery()
this.eidtFor = 0
if (this.title === '编辑纸品') {
this.getDteailList()
setTimeout(()=>{
this.getDteailList()
},200)
this.eidtFor = 1
}
console.log('this.$store.state.supplierInfo.id', this.$store.state.supplierInfo.id)
this.getCategoryListQuery()
},
watch: {
['form.name'](val) {

20
pages/mall/index.vue

@ -24,15 +24,18 @@
<view v-for="(item, index) in listData" :key="index" >
<view class="content" @click="detailInfo(item)">
<image class="image" :src="item.litPicUrl" mode=""></image>
<view class="">
<view class="" style="width: 100%;">
<view class="title">
<view class="">{{ item.brandName }}</view>
<view class="">
<image class="icon" :src="item.status === 1 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'" mode=""></image>
<image class="icon" :src="item.status === 30111 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'" mode=""></image>
</view>
</view>
<view class="sub-title">{{ item.categoryName }}/{{ item.name }}/{{ item.manufacturerName }}</view>
<view class="desc">克重(价格)200(3900) 235(3900) 255(390 0)255(390</view>
<view class="desc">
克重(价格)
<text v-for="(sku,index) in item.skuList">{{sku.weight}}({{sku.listPrice}})</text>
</view>
</view>
</view>
<view class="other">
@ -40,7 +43,7 @@
<view class="btn">
<view class="" @click="editPaper(item)">编辑</view>
<view class="divide"></view>
<view class="" @click="productStatusChange(item)">{{ item.status === '30111' ? '下架' : '上架' }}</view>
<view class="" @click="productStatusChange(item)">{{ item.status === 30111 ? '下架' : '上架' }}</view>
</view>
</view>
<uGap></uGap>
@ -169,7 +172,7 @@ export default {
productStatusChange(item) {
var params = {
id: item.id,
status: item.status === '30111' ? '30112' : '30111'
status: item.status === 30111 ? 30112 : 30111
}
productStatus(params).then(res => {
if (res) {
@ -177,8 +180,11 @@ export default {
title: '状态修改成功',
icon: 'success'
})
this.orderPagination.pageNum = 1
this.quertData()
setTimeout(()=>{
this.orderPagination.pageNum = 1
this.quertData()
},500)
}
})

5
pages/paper-detail/index.vue

@ -88,11 +88,13 @@ export default {
return {
form:{},
skuList:[],
imgList:[]
imgList:[],
option:''
}
},
onLoad(option) {
this.getDteailList(option)
this.option = option
},
methods: {
back,
@ -107,6 +109,7 @@ export default {
this.form = res
this.skuList = res.skuList
this.imgList = res.imgList
this.$set(this.form,'categoryName',this.option.categoryName)
}
})
},

Loading…
Cancel
Save