fix: 购物车productTyp 11替换为21

This commit is contained in:
kaizheng(郑凯) 2025-02-22 23:12:12 +08:00
parent 06e4cd516e
commit 21b0f99b8c
8 changed files with 143 additions and 117 deletions

View File

@ -317,7 +317,7 @@ export default {
}, },
productTypeList: { productTypeList: {
1: "观点包", 1: "观点包",
111: "自定义" 21: "自定义"
}, },
copyText: "", copyText: "",
cVideoDetail: {} // cVideoDetail: {} //

View File

@ -1186,7 +1186,7 @@ export default {
this.dialogForm = { this.dialogForm = {
productName: "", productName: "",
productDesc: "", productDesc: "",
productType: 111, productType: 21,
url: "", url: "",
coverImgUrl: "" coverImgUrl: ""
}; };

View File

@ -451,7 +451,7 @@ export default {
}, },
productTypeList: { productTypeList: {
1: "观点包", 1: "观点包",
111: "自定义" 21: "自定义"
}, },
copyText: "", copyText: "",
cVideoDetail: {} // cVideoDetail: {} //

View File

@ -460,7 +460,7 @@ export default {
}, },
productTypeList: { productTypeList: {
1: "观点包", 1: "观点包",
111: "自定义" 21: "自定义"
}, },
copyText: "", copyText: "",
cVideoDetail: {} // cVideoDetail: {} //

View File

@ -25,12 +25,14 @@
v-if="detail.liveStatus === 3" v-if="detail.liveStatus === 3"
type="primary" type="primary"
@click="controlLive(3)" @click="controlLive(3)"
>开始直播</el-button> >开始直播</el-button
>
<el-button <el-button
v-if="detail.liveStatus === 1 || detail.liveStatus === 3" v-if="detail.liveStatus === 1 || detail.liveStatus === 3"
type="danger" type="danger"
@click="controlLive(2)" @click="controlLive(2)"
>结束并生成回放</el-button> >结束并生成回放</el-button
>
</div> </div>
<overUniteLive <overUniteLive
v-if="[5].includes(type) && detail.liveStatus === 1" v-if="[5].includes(type) && detail.liveStatus === 1"
@ -67,7 +69,8 @@
size="small" size="small"
plain plain
@click="selected(index)" @click="selected(index)"
>{{ item }}</el-button> >{{ item }}</el-button
>
</div> </div>
<div <div
@ -121,7 +124,8 @@
:true-label="1" :true-label="1"
:false-label="2" :false-label="2"
style="padding-bottom: 20px;" style="padding-bottom: 20px;"
>在聊天框中发送禁言/开启发言通知</el-checkbox> >在聊天框中发送禁言/开启发言通知</el-checkbox
>
</div> </div>
<div class="audience-chat-box"> <div class="audience-chat-box">
<!-- 聊天 --> <!-- 聊天 -->
@ -160,7 +164,7 @@
" "
alt="" alt=""
@click="openUserPhoto(item)" @click="openUserPhoto(item)"
> />
<span <span
style="margin-right: 5px;" style="margin-right: 5px;"
:class="!item.userId ? 'anchor' : ''" :class="!item.userId ? 'anchor' : ''"
@ -170,7 +174,8 @@
? "助教" ? "助教"
: "主播" : "主播"
: "" : ""
}}</span> }}</span
>
<span class="name-time"> <span class="name-time">
<span> <span>
{{ {{
@ -181,13 +186,14 @@
? item.createUserVO.name ? item.createUserVO.name
: "" : ""
: item.userName : item.userName
}}</span> }}</span
<span >
class="time" <span class="time"
>{{ >{{
dayjs(item.createTime).format("YYYY-MM-DD HH:mm:ss") dayjs(item.createTime).format("YYYY-MM-DD HH:mm:ss")
}} }}
</span></span> </span></span
>
<i <i
v-if=" v-if="
item.status === 1 && item.status === 1 &&
@ -214,7 +220,8 @@
v-if="item.status !== 1 && item.type === 1" v-if="item.status !== 1 && item.type === 1"
type="text" type="text"
style="color:#F56C6C ;" style="color:#F56C6C ;"
>已删除</el-button> >已删除</el-button
>
<el-button <el-button
v-if=" v-if="
item.isForbid === 2 && item.isForbid === 2 &&
@ -226,7 +233,8 @@
type="text" type="text"
style="color:#F56C6C ;" style="color:#F56C6C ;"
@click="prohibition(item)" @click="prohibition(item)"
>禁言</el-button> >禁言</el-button
>
<el-button <el-button
v-if=" v-if="
item.isOpen === 2 && item.isOpen === 2 &&
@ -237,7 +245,8 @@
" "
type="text" type="text"
@click="open(item)" @click="open(item)"
>公开</el-button> >公开</el-button
>
<el-button <el-button
v-if=" v-if="
item.isOpen === 1 && item.isOpen === 1 &&
@ -248,7 +257,8 @@
" "
type="text" type="text"
@click="open(item)" @click="open(item)"
>取消公开</el-button> >取消公开</el-button
>
<el-button <el-button
v-if=" v-if="
item.isForbid === 1 && item.isForbid === 1 &&
@ -259,7 +269,8 @@
" "
type="text" type="text"
@click="prohibition(item)" @click="prohibition(item)"
>解除禁言</el-button> >解除禁言</el-button
>
</div> </div>
<div <div
v-if=" v-if="
@ -286,7 +297,7 @@
" "
:src="item.content.replace('upImg-', '')" :src="item.content.replace('upImg-', '')"
class="content-img" class="content-img"
> />
<div <div
v-if="item.productBasic" v-if="item.productBasic"
class="content-box_item--product" class="content-box_item--product"
@ -318,9 +329,9 @@
class="reply-delete" class="reply-delete"
style="margin-top: 10px" style="margin-top: 10px"
> >
<span <span style="margin-right: 10px"
style="margin-right: 10px" >操作人:{{ item.userAdminVO.name }}</span
>操作人:{{ item.userAdminVO.name }}</span>时间:{{ item.deleteTime }} >时间:{{ item.deleteTime }}
</div> </div>
</div> </div>
</div> </div>
@ -400,7 +411,7 @@
:placeholder="placeholderList[detail.liveStatus]" :placeholder="placeholderList[detail.liveStatus]"
/> />
<div class="send-box_btn"> <div class="send-box_btn">
<img v-if="imageUrl" :src="imageUrl" class="avatar"> <img v-if="imageUrl" :src="imageUrl" class="avatar" />
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
:show-file-list="false" :show-file-list="false"
@ -411,28 +422,30 @@
action="/admin/common/file/upload" action="/admin/common/file/upload"
:before-upload="beforeUploadSend" :before-upload="beforeUploadSend"
> >
<el-button <el-button type="primary" icon="el-icon-picture-outline"
type="primary" >上传图片</el-button
icon="el-icon-picture-outline" >
>上传图片</el-button>
<el-button <el-button
v-if="imageUrl" v-if="imageUrl"
type="text" type="text"
@click.stop="deleteImage" @click.stop="deleteImage"
>删除图片</el-button> >删除图片</el-button
>
</el-upload> </el-upload>
<el-button <el-button
v-if="!imageUrl" v-if="!imageUrl"
type="success" type="success"
style="width: 80px;height: 38px;" style="width: 80px;height: 38px;"
@click="send()" @click="send()"
> </el-button> > </el-button
>
<el-button <el-button
v-if="imageUrl" v-if="imageUrl"
type="success" type="success"
style="width: 120px;height: 38px;" style="width: 120px;height: 38px;"
@click="sendPhono()" @click="sendPhono()"
> </el-button> > </el-button
>
</div> </div>
</div> </div>
<!-- 已删除列表 --> <!-- 已删除列表 -->
@ -484,7 +497,7 @@
:src="item.img ? item.img : defaultImg" :src="item.img ? item.img : defaultImg"
alt="" alt=""
:class="{ 'audience-title_user_active': item.isOnline !== 1 }" :class="{ 'audience-title_user_active': item.isOnline !== 1 }"
> />
{{ item.userName }} {{ item.userName }}
</div> </div>
</div> </div>
@ -502,13 +515,13 @@
class="w-full h-full" class="w-full h-full"
/> />
<div v-else-if="renderStatus == 'before-img' || pullBuffer"> <div v-else-if="renderStatus == 'before-img' || pullBuffer">
<img style="height:600px;width:100%;" :src="beforeImgUrl"> <img style="height:600px;width:100%;" :src="beforeImgUrl" />
</div> </div>
<div <div
v-else-if="renderStatus == 'suspend-player' || !renderStatus" v-else-if="renderStatus == 'suspend-player' || !renderStatus"
class="suspend" class="suspend"
> >
<img src="@/assets/logo/wait.png" class="user-avatar"> <img src="@/assets/logo/wait.png" class="user-avatar" />
<p>主播离开一会儿请耐心等待~</p> <p>主播离开一会儿请耐心等待~</p>
</div> </div>
<div v-if="![5].includes(type)" class="video-box-bottom"> <div v-if="![5].includes(type)" class="video-box-bottom">
@ -561,7 +574,8 @@
v-model="isSendMessage" v-model="isSendMessage"
:true-label="1" :true-label="1"
:false-label="2" :false-label="2"
>在聊天框中发送禁言/开启发言通知</el-checkbox> >在聊天框中发送禁言/开启发言通知</el-checkbox
>
</div> </div>
<div class="interaction-box_switch"> <div class="interaction-box_switch">
开启审核 开启审核
@ -587,7 +601,8 @@
type="success" type="success"
size="mini" size="mini"
@click="cancelPushProduct" @click="cancelPushProduct"
>取消推送产品</el-button> >取消推送产品</el-button
>
</div> </div>
</div> </div>
<el-table <el-table
@ -639,32 +654,38 @@
v-if="scope.row.status === 1" v-if="scope.row.status === 1"
type="text" type="text"
@click="updateStatus(scope.row, 4)" @click="updateStatus(scope.row, 4)"
>下架产品</el-button> >下架产品</el-button
>
<el-button <el-button
v-if="scope.row.status === 1 && !settingToC" v-if="scope.row.status === 1 && !settingToC"
type="text" type="text"
@click="updateStatus(scope.row, 9)" @click="updateStatus(scope.row, 9)"
>修改可销售数量</el-button> >修改可销售数量</el-button
>
<el-button <el-button
v-if="scope.row.status === 1 && !scope.row.weight" v-if="scope.row.status === 1 && !scope.row.weight"
type="text" type="text"
@click="updateStatus(scope.row, 10)" @click="updateStatus(scope.row, 10)"
>推荐</el-button> >推荐</el-button
>
<el-button <el-button
v-if="scope.row.status === 1 && scope.row.weight" v-if="scope.row.status === 1 && scope.row.weight"
type="text" type="text"
@click="updateStatus(scope.row, 11)" @click="updateStatus(scope.row, 11)"
>取消推荐</el-button> >取消推荐</el-button
>
<el-button <el-button
v-if="scope.row.status === 2" v-if="scope.row.status === 2"
type="text" type="text"
@click="updateStatus(scope.row, 3)" @click="updateStatus(scope.row, 3)"
>上架产品</el-button> >上架产品</el-button
>
<el-button <el-button
v-if="scope.row.coverImgUrl" v-if="scope.row.coverImgUrl"
type="text" type="text"
@click="setCartPush(scope.row)" @click="setCartPush(scope.row)"
>推送产品</el-button> >推送产品</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -682,7 +703,8 @@
" "
type="primary" type="primary"
@click="toOpenCoupon()" @click="toOpenCoupon()"
>添加优惠券</el-button> >添加优惠券</el-button
>
<createCoupon ref="coupon" @child-event="queryListPreferential" /> <createCoupon ref="coupon" @child-event="queryListPreferential" />
<!-- <el-form v-if="detail.liveStatus !== 4" ref="form" :model="formPreferential"> <!-- <el-form v-if="detail.liveStatus !== 4" ref="form" :model="formPreferential">
<el-form-item label="选择优惠券"> <el-form-item label="选择优惠券">
@ -719,7 +741,11 @@
style="width: 100%" style="width: 100%"
> >
<el-table-column type="index" label="序号" width="100" /> <el-table-column type="index" label="序号" width="100" />
<el-table-column prop="couponId" label="优惠券ID" width="180" /> <el-table-column
prop="couponId"
label="优惠券ID"
width="180"
/>
<el-table-column prop="name" label="优惠券名称" /> <el-table-column prop="name" label="优惠券名称" />
<el-table-column prop="couponType" label="优惠券类型"> <el-table-column prop="couponType" label="优惠券类型">
<template slot-scope="scope"> <template slot-scope="scope">
@ -753,12 +779,14 @@
v-if="[1].includes(scope.row.state)" v-if="[1].includes(scope.row.state)"
type="text" type="text"
@click="sendcoupon(scope.row, 1)" @click="sendcoupon(scope.row, 1)"
>发放</el-button> >发放</el-button
>
<el-button <el-button
v-if="[1].includes(scope.row.state)" v-if="[1].includes(scope.row.state)"
type="text" type="text"
@click="sendcoupon(scope.row, 2)" @click="sendcoupon(scope.row, 2)"
>删除</el-button> >删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -780,7 +808,8 @@
type="primary" type="primary"
style="margin-bottom:50px;" style="margin-bottom:50px;"
@click="createQuestionnaire" @click="createQuestionnaire"
>创建问卷</el-button> >创建问卷</el-button
>
<el-table <el-table
key="questionnaireList" key="questionnaireList"
:data="questionnaireList" :data="questionnaireList"
@ -791,18 +820,15 @@
:header-cell-style="{ 'text-align': 'center' }" :header-cell-style="{ 'text-align': 'center' }"
:cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }"
> >
<el-table-column <el-table-column type="index" label="序号" width="100" />
type="index"
label="序号"
width="100"
/>
<el-table-column prop="title" label="问卷名称" width="200"> <el-table-column prop="title" label="问卷名称" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
class="button-text" class="button-text"
type="text" type="text"
@click="openView(scope.row)" @click="openView(scope.row)"
>{{ scope.row.title }}</span> >{{ scope.row.title }}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" width="200"> <el-table-column prop="createTime" label="创建时间" width="200">
@ -815,11 +841,7 @@
label="发起时间" label="发起时间"
width="200" width="200"
/> />
<el-table-column <el-table-column prop="writeNum" label="填写人数" width="100" />
prop="writeNum"
label="填写人数"
width="100"
/>
<el-table-column prop="status" label="状态" width="100"> <el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ questionnaireStatusList[scope.row.status] }} {{ questionnaireStatusList[scope.row.status] }}
@ -831,34 +853,40 @@
v-if="[1].includes(scope.row.status) && operate !== 1" v-if="[1].includes(scope.row.status) && operate !== 1"
type="text" type="text"
@click="question(scope.row, -1)" @click="question(scope.row, -1)"
>发起问卷</el-button> >发起问卷</el-button
>
<el-button <el-button
v-if="[1].includes(scope.row.status)" v-if="[1].includes(scope.row.status)"
type="text" type="text"
@click="updateQuestion(scope.row, 1)" @click="updateQuestion(scope.row, 1)"
>编辑</el-button> >编辑</el-button
>
<el-button <el-button
v-if="[1, 2].includes(scope.row.status)" v-if="[1, 2].includes(scope.row.status)"
type="text" type="text"
@click="updateQuestion(scope.row, 2)" @click="updateQuestion(scope.row, 2)"
>复制</el-button> >复制</el-button
>
<el-button <el-button
v-if="[1, 2, 3].includes(scope.row.status)" v-if="[1, 2, 3].includes(scope.row.status)"
type="text" type="text"
@click="question(scope.row, -2)" @click="question(scope.row, -2)"
>删除</el-button> >删除</el-button
>
<el-button <el-button
v-if="[2].includes(scope.row.status) && operate !== 1" v-if="[2].includes(scope.row.status) && operate !== 1"
type="text" type="text"
@click="question(scope.row, -3)" @click="question(scope.row, -3)"
>重发至互动区</el-button> >重发至互动区</el-button
>
<el-button <el-button
v-if=" v-if="
[2, 3].includes(scope.row.status) && scope.row.writeNum [2, 3].includes(scope.row.status) && scope.row.writeNum
" "
type="text" type="text"
@click="toExport(scope.row)" @click="toExport(scope.row)"
>导出数据</el-button> >导出数据</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -959,10 +987,7 @@
v-if="updateStatusType === 3 && !settingToC" v-if="updateStatusType === 3 && !settingToC"
label="设置销售数量上限" label="设置销售数量上限"
> >
<el-switch <el-switch v-model="formProduct.switch" @change="changeSwitch()" />
v-model="formProduct.switch"
@change="changeSwitch()"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-if="updateStatusType === 3 && !settingToC" v-if="updateStatusType === 3 && !settingToC"
@ -994,11 +1019,11 @@
/> />
<el-form-item v-if="[3, 4].includes(updateStatusType)"> <el-form-item v-if="[3, 4].includes(updateStatusType)">
<el-checkbox <el-checkbox v-model="formProduct.isSendMessage"
v-model="formProduct.isSendMessage"
>在聊天框中发送{{ >在聊天框中发送{{
updateStatusType === 4 ? "下架" : "上架" updateStatusType === 4 ? "下架" : "上架"
}}产品通知</el-checkbox> }}产品通知</el-checkbox
>
</el-form-item> </el-form-item>
<el-form-item v-if="updateStatusType === 10" label="推荐权重"> <el-form-item v-if="updateStatusType === 10" label="推荐权重">
<el-input-number <el-input-number
@ -1015,7 +1040,8 @@
type="primary" type="primary"
:disabled="loading" :disabled="loading"
@click="submitProduct()" @click="submitProduct()"
>{{ submitProductText[updateStatusType] }}</el-button> >{{ submitProductText[updateStatusType] }}</el-button
>
<el-button @click="cancelProduct()"> </el-button> <el-button @click="cancelProduct()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -1038,9 +1064,11 @@
/> />
</div> </div>
<div class="questionnaire-explain"> <div class="questionnaire-explain">
<span><el-button type="text" @click="isTip = !isTip">{{ <span
><el-button type="text" @click="isTip = !isTip">{{
!isTip ? "添加问卷说明" : "取消问卷说明" !isTip ? "添加问卷说明" : "取消问卷说明"
}}</el-button></span> }}</el-button></span
>
<el-input <el-input
v-if="isTip" v-if="isTip"
v-model="explain" v-model="explain"
@ -1086,7 +1114,7 @@
:key="k" :key="k"
class="answer-container" class="answer-container"
> >
<input type="radio" disabled> <input type="radio" disabled />
<el-input <el-input
v-model="item.optionQueryList[k].optionDesc" v-model="item.optionQueryList[k].optionDesc"
class="optionQueryList" class="optionQueryList"
@ -1162,7 +1190,7 @@
</div> </div>
</el-upload> </el-upload>
<div class="picture-opts"> <div class="picture-opts">
<input type="radio" disabled> <input type="radio" disabled />
<el-input <el-input
v-model=" v-model="
titleQueryList[index].optionQueryList[k].optionDesc titleQueryList[index].optionQueryList[k].optionDesc
@ -1238,17 +1266,13 @@
trigger="click" trigger="click"
> >
<QrCode ref="QrCode" :is-show="0" @closePopover="closePopover" /> <QrCode ref="QrCode" :is-show="0" @closePopover="closePopover" />
<el-button <el-button slot="reference" type="text" @click="confirm(1)"
slot="reference" >预览</el-button
type="text" >
@click="confirm(1)"
>预览</el-button>
</el-popover> </el-popover>
<el-button <el-button type="primary" :loading="loadingButton" @click="confirm(2)"
type="primary" > </el-button
:loading="loadingButton" >
@click="confirm(2)"
> </el-button>
<el-button @click="cancel()"> </el-button> <el-button @click="cancel()"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -1417,7 +1441,7 @@ export default {
7: "组合", 7: "组合",
8: "股票池", 8: "股票池",
9: "交易圈", 9: "交易圈",
111: "自定义" 21: "自定义"
}, },
productListType: [], productListType: [],
formProduct: { formProduct: {
@ -1788,7 +1812,7 @@ export default {
}); });
}, },
handleScroll(event) { handleScroll(event) {
requestAnimationFrame(async() => { requestAnimationFrame(async () => {
const { scrollTop, clientHeight, scrollHeight } = event.target; const { scrollTop, clientHeight, scrollHeight } = event.target;
if (scrollTop + clientHeight + 10 >= scrollHeight) { if (scrollTop + clientHeight + 10 >= scrollHeight) {
console.log( console.log(
@ -1917,7 +1941,7 @@ export default {
return false; return false;
} }
if (this.settingToC && !this.productListType.length) { if (this.settingToC && !this.productListType.length) {
this.productListType.push({ id: 111, name: "自定义" }); this.productListType.push({ id: 21, name: "自定义" });
this.productList = JSON.parse(JSON.stringify(this.detail.cartVOList)); this.productList = JSON.parse(JSON.stringify(this.detail.cartVOList));
} else if (!this.settingToC && !this.productListType.length) { } else if (!this.settingToC && !this.productListType.length) {
this.productListType.push({ id: 1, name: "观点包" }); this.productListType.push({ id: 1, name: "观点包" });
@ -2192,7 +2216,7 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(async() => { }).then(async () => {
const res = await uVideoControl({ id: this.detail.id, option }); const res = await uVideoControl({ id: this.detail.id, option });
if (!res.code) { if (!res.code) {
this.$message({ this.$message({
@ -2396,7 +2420,9 @@ export default {
}, },
send() { send() {
if (this.sendForm.productType) { if (this.sendForm.productType) {
if (!this.sendForm.productListId) { return this.$message({ type: "error", message: "请选择发送产品" }); } if (!this.sendForm.productListId) {
return this.$message({ type: "error", message: "请选择发送产品" });
}
const data = { const data = {
id: this.sendForm.productListId, id: this.sendForm.productListId,
type: this.sendForm.productType, type: this.sendForm.productType,
@ -2603,7 +2629,7 @@ export default {
confirmButtonText: "确认", confirmButtonText: "确认",
cancelButtonText: "取消" cancelButtonText: "取消"
}) })
.then(async() => { .then(async () => {
const ret = await cartPush({ const ret = await cartPush({
id: this.id, id: this.id,
productId: item.productId, productId: item.productId,
@ -3268,7 +3294,7 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}) })
.then(async() => { .then(async () => {
const ret = await cancelPush({ id: this.id }); const ret = await cancelPush({ id: this.id });
if (ret && ret.code === 0) { if (ret && ret.code === 0) {
this.$message({ this.$message({

View File

@ -701,7 +701,7 @@ export default {
funnelDataObj: {}, funnelDataObj: {},
productTypeList: { productTypeList: {
1: '观点包', 1: '观点包',
111:'自定义' 21:'自定义'
}, },
riskLevelList: { riskLevelList: {
1: '低风险', 1: '低风险',

View File

@ -528,7 +528,7 @@ export default {
productTypeList: { productTypeList: {
1: "观点包", 1: "观点包",
3: "视频", 3: "视频",
111: "自定义" 21: "自定义"
}, },
copyText: "", copyText: "",
rules: { rules: {

View File

@ -463,7 +463,7 @@ export default {
productTypeList: { productTypeList: {
1: "观点包", 1: "观点包",
3: "视频", 3: "视频",
111: "自定义" 21: "自定义"
}, },
copyText: "", copyText: "",
rules: { rules: {