Commit 0ad7abf6 by 前端

合并冲突代码

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