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: {
1: "观点包",
111: "自定义"
21: "自定义"
},
copyText: "",
cVideoDetail: {} //

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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