Commit 0ad7abf6 by 前端

合并冲突代码

2 parents 7e826a4e c2674838
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
this.dialogVisible = !this.dialogVisible this.dialogVisible = !this.dialogVisible
}, },
getVideoList(){ getVideoList(){
this.$apis.case.getVideoListApi({pageSize: 10000, currentPage: 1}).then(res => { this.$apis.case.getVideoListApi({pageSize: 10000, currentPage: 1, status: 1}).then(res => {
if(res?.list?.length) { if(res?.list?.length) {
const _target = this.formData.find(item => item.name == 'mediaId') const _target = this.formData.find(item => item.name == 'mediaId')
_target.optionList = res.list _target.optionList = res.list
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
</GLTable> </GLTable>
</template> </template>
</div> </div>
<div slot="productVideoSlot"> <div slot="productVideoSlot">
<el-form-item label=""> <el-form-item label="">
<template v-if="!formObj.goodsVideo"> <template v-if="!formObj.goodsVideo">
...@@ -70,6 +71,7 @@ ...@@ -70,6 +71,7 @@
<div class="text-tip2">作为商品详情页顶部展示和详情展示,格式建议mp4,大小不超过20M</div> <div class="text-tip2">作为商品详情页顶部展示和详情展示,格式建议mp4,大小不超过20M</div>
</el-form-item> </el-form-item>
</div> </div>
<div slot="expressFeeSlot"> <div slot="expressFeeSlot">
<format-input class="expressFee-class" :disabled="disabled" :intDigit="4" :precise="2" <format-input class="expressFee-class" :disabled="disabled" :intDigit="4" :precise="2"
v-model="formObj.expressFee"></format-input> v-model="formObj.expressFee"></format-input>
...@@ -85,8 +87,9 @@ ...@@ -85,8 +87,9 @@
<selectMerchantDialog @confirmDialog="confirmDialog" @closeDialog="closeDialog" <selectMerchantDialog @confirmDialog="confirmDialog" @closeDialog="closeDialog"
:goodsId="formObj.smartcarlifeInfoId" :selectedList="saleMerchantList" :goodsId="formObj.smartcarlifeInfoId" :selectedList="saleMerchantList"
v-if="merchantDialogVisible" :isVisible="merchantDialogVisible"></selectMerchantDialog> v-if="merchantDialogVisible" :isVisible="merchantDialogVisible"></selectMerchantDialog>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="50%"> <el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="50%">
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" /> <img :src="dialogSrc" width="100%" v-if="dialogType == 'img'"/>
<video width="100%" autoplay controls :src="dialogSrc" v-else></video> <video width="100%" autoplay controls :src="dialogSrc" v-else></video>
</el-dialog> </el-dialog>
</div> </div>
...@@ -168,12 +171,14 @@ export default { ...@@ -168,12 +171,14 @@ export default {
method: '2', method: '2',
goodsType: '2', goodsType: '2',
expressFee: '', expressFee: '',
goodsVideo: '',
tencentcloudMediaId: '',
commerceDescribe: '',
smartcarlifeInfoId: '', smartcarlifeInfoId: '',
goodsName: '', goodsName: '',
goodsImage: '', goodsImage: '',
minSellPrice: '', minSellPrice: '',
retailPrice: '', retailPrice: '',
goodsVideo: '',
coverList: [], coverList: [],
associationClassifyFirstId: '', associationClassifyFirstId: '',
introduction: '' introduction: ''
...@@ -272,6 +277,26 @@ export default { ...@@ -272,6 +277,26 @@ export default {
isDisabled: false isDisabled: false
}, },
{ {
label: '带货视频',
name: 'tencentcloudMediaId',
type: 'select',
optionList: [],
optionId: 'id',
optionLabel: 'fileName',
isDisabled: false,
isClear: true
},
{
label: '带货描述',
name: 'commerceDescribe',
type: 'input',
inputType: 'textarea',
isDisabled: false,
maxlength: 40,
isHide: false,
showLimit: true
},
{
label: '销售门店', label: '销售门店',
name: 'saleStoreSlot', name: 'saleStoreSlot',
addHtml: 'saleStoreSlot', addHtml: 'saleStoreSlot',
...@@ -306,6 +331,7 @@ export default { ...@@ -306,6 +331,7 @@ export default {
type: 'input', type: 'input',
inputType: 'textarea', inputType: 'textarea',
isDisabled: false, isDisabled: false,
showLimit: true,
maxlength: 200 maxlength: 200
}, },
], ],
...@@ -318,8 +344,18 @@ export default { ...@@ -318,8 +344,18 @@ export default {
} }
} }
}, },
watch: {
'formObj.tencentcloudMediaId': {
handler(nVal, oVal) {
const _target = this.formData.find(item => item.name == 'commerceDescribe')
_target.isHide = !nVal
},
deep: true
}
},
created() { created() {
this.getCategory() this.getCategory()
this.getVideoList()
const urlParam = this.$route.params const urlParam = this.$route.params
this.routeInfo = JSON.parse(decodeURIComponent(urlParam.id)) this.routeInfo = JSON.parse(decodeURIComponent(urlParam.id))
const {id, type} = this.routeInfo const {id, type} = this.routeInfo
...@@ -405,6 +441,14 @@ export default { ...@@ -405,6 +441,14 @@ export default {
} }
}) })
}, },
getVideoList() {
this.$apis.case.getVideoListApi({pageSize: 10000, currentPage: 1, status: 1}).then(res => {
if (res?.list?.length) {
const _target = this.formData.find(item => item.name == 'tencentcloudMediaId')
_target.optionList = res.list
}
})
},
validateField(field) { validateField(field) {
if (Array.isArray(field)) { if (Array.isArray(field)) {
field.forEach(item => { field.forEach(item => {
...@@ -423,9 +467,10 @@ export default { ...@@ -423,9 +467,10 @@ export default {
}, },
handleGoodsConfirm(e) { handleGoodsConfirm(e) {
if (this.formObj.smartcarlifeInfoId != e?.id) this.saleMerchantList = [] if (this.formObj.smartcarlifeInfoId != e?.id) this.saleMerchantList = []
let {id: smartcarlifeInfoId, goodsName, goodsImage, minSellPrice, retailPrice,goodsVideo} = e || {} let {id: smartcarlifeInfoId, goodsName, goodsImage, minSellPrice, retailPrice} = e || {}
minSellPrice = minSellPrice ? Number(Number(minSellPrice / 100).toFixed(2)) : 0 minSellPrice = minSellPrice ? Number(Number(minSellPrice / 100).toFixed(2)) : 0
retailPrice = retailPrice ? Number(Number(retailPrice / 100).toFixed(2)) : 0 retailPrice = retailPrice ? Number(Number(retailPrice / 100).toFixed(2)) : 0
// 若选择的商品素材包含了视频,则带入对应的视频文件 // 若选择的商品素材包含了视频,则带入对应的视频文件
if (goodsVideo) this.formObj.goodsVideo = goodsVideo if (goodsVideo) this.formObj.goodsVideo = goodsVideo
this.formObj = { this.formObj = {
...@@ -465,7 +510,6 @@ export default { ...@@ -465,7 +510,6 @@ export default {
delete obj.coverList delete obj.coverList
delete obj.source delete obj.source
delete obj.method delete obj.method
let saleMerchantList = this.saleMerchantList.map(item => { let saleMerchantList = this.saleMerchantList.map(item => {
let {merchantId, merchantName, activityPrice, giveIntegral, originalPrice} = item let {merchantId, merchantName, activityPrice, giveIntegral, originalPrice} = item
activityPrice = activityPrice ? Number(Number(activityPrice * 10 * 10).toFixed(0)) : 0 activityPrice = activityPrice ? Number(Number(activityPrice * 10 * 10).toFixed(0)) : 0
...@@ -510,6 +554,7 @@ export default { ...@@ -510,6 +554,7 @@ export default {
this.formObj[key] = res[key] this.formObj[key] = res[key]
} }
} }
this.formObj.tencentcloudMediaId = this.formObj.tencentcloudMediaId ? +this.formObj.tencentcloudMediaId : ''
this.curCategoryInfo = { this.curCategoryInfo = {
categoryName: res.associationClassifySecondName, categoryName: res.associationClassifySecondName,
id: res.associationClassifySecondId id: res.associationClassifySecondId
...@@ -580,9 +625,9 @@ export default { ...@@ -580,9 +625,9 @@ export default {
width: 432px; width: 432px;
} }
/deep/ #introduction { /deep/ #introduction, /deep/ #commerceDescribe {
.el-textarea__inner { .el-textarea__inner, .el-textarea {
width: 580px; width: 580px !important;
height: 80px; height: 80px;
} }
} }
...@@ -609,11 +654,13 @@ export default { ...@@ -609,11 +654,13 @@ export default {
} }
.avatar-uploader-desc-word { .avatar-uploader-desc-word {
font-weight: 400; font-weight: 400;
font-size: 28 rpx; font-size: 28 rpx;
color: #666666; color: #666666;
} }
.video-box { .video-box {
position: relative; position: relative;
width: 104px; width: 104px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!