转让市场

This commit is contained in:
唐明明
2021-09-17 17:37:10 +08:00
parent db187bc774
commit cf873ca6f3
12 changed files with 3349 additions and 1527 deletions

View File

@@ -63,7 +63,7 @@
</template>
<script>
import { managesGoodsAuth } from '@/apis/interfaces/goods'
import { managesGoodsAuth, managesGoodsExtends } from '@/apis/interfaces/goods'
import { uploads } from '@/apis/interfaces/uploading'
export default {
data() {
@@ -77,7 +77,21 @@
};
},
created() {
if(this.$Route.query.edit == 'true'){
managesGoodsExtends(this.$Route.query.id).then(res => {
this.productedAt = res.producted_at
this.expiriedAt = res.expiried_at
this.lisence = res.lisence
this.productName = res.product_name
this.productAddress = res.product_address
this.extendCover = [{...res.cover}]
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
},
methods: {
// picker选择
@@ -134,7 +148,11 @@
showCancel : false,
success : res => {
if(res.confirm){
this.$Router.back(this.$Route.query.type == 'goodsAdd' ? 2 : 1)
if(this.$Route.query.type == 'goodsAdd'){
this.$Router.back(this.$Route.query.edit == 'true' ? 2 : 3)
}else{
this.$Router.back()
}
}
}
})