选择商品时自动设置url

This commit is contained in:
朱耘稷
2020-12-25 22:04:38 +08:00
committed by xuwenbo
parent 0594e0a3da
commit 43b21cabc6

View File

@ -36,7 +36,7 @@
</el-form-item> </el-form-item>
<el-form-item label="商品小程序路径" prop="url" > <el-form-item label="商品小程序路径" prop="url" >
<el-input v-model="form.url" style="width: 370px;" :disabled="isdisabled"/> <el-input v-model="form.url" style="width: 370px;" :disabled="true"/>
</el-form-item> </el-form-item>
<!-- 1一口价只需要传入priceprice2不传--> <!-- 1一口价只需要传入priceprice2不传-->
<!-- 2价格区间price字段为左边界price2字段为右边界price和price2必传--> <!-- 2价格区间price字段为左边界price2字段为右边界price和price2必传-->
@ -104,10 +104,10 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column v-if="columns.visible('price')" prop="price" label="price" />--> <!-- <el-table-column v-if="columns.visible('price')" prop="price" label="price" />-->
<!-- <el-table-column v-if="columns.visible('price2')" prop="price2" label="price2" />--> <!-- <el-table-column v-if="columns.visible('price2')" prop="price2" label="price2" />-->
<el-table-column v-if="columns.visible('auditStatus')" prop="auditStatus" label="审核状态" > <el-table-column v-if="columns.visible('auditStatus')" prop="auditStatus" label="审核状态" >
<!-- //0未审核1审核中2:审核通过3审核失败--> <!-- //0未审核1审核中2:审核通过3审核失败-->
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<el-tag v-if="scope.row.auditStatus === 0" :type="''">未审核</el-tag> <el-tag v-if="scope.row.auditStatus === 0" :type="''">未审核</el-tag>
@ -117,7 +117,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<!-- 1, 2表示是为api添加商品否则是直播控制台添加的商品--> <!-- 1, 2表示是为api添加商品否则是直播控制台添加的商品-->
<el-table-column v-if="columns.visible('thirdPartyTag')" prop="thirdPartyTag" label="添加途径" > <el-table-column v-if="columns.visible('thirdPartyTag')" prop="thirdPartyTag" label="添加途径" >
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
@ -179,9 +179,6 @@ export default {
coverImgUrl: [ coverImgUrl: [
{ required: true, message: '商品图片不能为空', trigger: 'blur' } { required: true, message: '商品图片不能为空', trigger: 'blur' }
], ],
url: [
{ required: true, message: '商品小程序路径不能为空', trigger: 'blur' }
],
priceType: [ priceType: [
{ required: true, message: '价格类型不能为空', trigger: 'blur' } { required: true, message: '价格类型不能为空', trigger: 'blur' }
], ],
@ -205,6 +202,9 @@ export default {
this.form.price = val.price this.form.price = val.price
this.form.price2 = val.otPrice this.form.price2 = val.otPrice
this.form.priceType = '3' this.form.priceType = '3'
if(val.productId){
this.form.url="/pages/shop/GoodsCon/index?id="+val.productId
}
this.isdisabled=false; this.isdisabled=false;
}, },
deep:true//对象内部的属性监听,也叫深度监听 deep:true//对象内部的属性监听,也叫深度监听
@ -301,7 +301,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
.table-img { .table-img {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
background: #ccc; background: #ccc;
@ -313,5 +313,5 @@ export default {
width: 32px; width: 32px;
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
} }
</style> </style>