Pārlūkot izejas kodu

1.增加济世百康浏览器直播功能

jzp 1 dienu atpakaļ
vecāks
revīzija
2aa9fcc091

+ 25 - 0
.env.prod-jsbk

@@ -0,0 +1,25 @@
+# 页面标题
+VUE_APP_TITLE =济世百康客服系统
+# 公司名称
+VUE_APP_COMPANY_NAME =辽宁济世百康大药房有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =辽ICP备2025055445号-16
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/jsbk.jpg
+
+# 生产环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+#项目所属
+VUE_APP_PROJECT_FROM=jsbk
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 1 - 0
package.json

@@ -59,6 +59,7 @@
     "build:prod-xcsw": "vue-cli-service build --mode prod-xcsw",
     "build:prod-zlwh": "vue-cli-service build --mode prod-zlwh",
     "build:prod-mengniu": "vue-cli-service build --mode prod-mengniu",
+    "build:prod-jsbk": "vue-cli-service build --mode prod-jsbk",
     "preview": "node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src",
     "test:unit": "jest --clearCache && vue-cli-service test:unit",

+ 9 - 0
src/api/qw/sopLogs.js

@@ -77,3 +77,12 @@ export function generateShortLink(data) {
     data: data
   })
 }
+
+//生成直播短链
+export function generateLiveShortLink(data) {
+  return request({
+    url: '/qw/sopLogs/generateLiveShortLink',
+    method: 'post',
+    data: data
+  })
+}

BIN
src/assets/logo/jsbk.jpg


+ 18 - 4
src/views/qw/sopLogs/sopLogsList.vue

@@ -187,7 +187,11 @@
                 <span v-if="item.contentType == 15">APP文本</span>
                 <span v-if="item.contentType == 16">APP语音</span>
                 <span v-if="item.contentType == 11">群公告</span>
-                <span v-if="item.contentType == 4"><el-button size="mini" type="primary" @click="generateShortLink(item)" style="margin-left: 330px;">生成短链</el-button></span>
+                <span v-if="item.contentType == 16">H5看课卡片</span>
+                <span v-if="item.contentType == 18">直播卡片</span>
+                <span v-if="item.contentType == 19">直播短链</span>
+                <span v-if="item.contentType == 4 || item.contentType == 17"><el-button size="mini" type="primary" @click="generateShortLink(item)" style="margin-left: 330px;">生成短链</el-button></span>
+                <span v-if="item.contentType == 18 || item.contentType == 19"><el-button size="mini" type="primary" @click="generateLiveShortLink(item)" style="margin-left: 330px;">复制短链</el-button></span>
               </div>
               <div v-if="item.sendStatus">
                 <span>发送状态:</span>
@@ -196,7 +200,7 @@
               </div>
             </div>
             <div v-if="item.sendStatus && item.sendStatus == 2">发送失败原因:<span style="color: #ff4949">{{item.sendRemarks}}</span></div>
-            <div v-if="item.contentType == 1 || item.contentType == 15" v-html="item.value"></div>
+            <div v-if="item.contentType == 1 || item.contentType == 15 || item.contentType == 19" v-html="item.value"></div>
             <div v-if="item.contentType == 2">
               <el-image
                 style="width: 100px; height: 100px"
@@ -220,7 +224,7 @@
                 </div>
               </div>
             </div>
-            <div v-if="item.contentType == 4 || item.contentType == 10" class="message-style">
+            <div v-if="item.contentType == 4 || item.contentType == 10 || item.contentType == 18 || item.contentType == 17" class="message-style">
                 <div style="display: flex; justify-content: space-between; width: 100%">
                   <span style="font-size: 13px; flex: 1">{{ item.miniprogramTitle }}</span>
                   <el-image
@@ -339,7 +343,7 @@ import {
   listQwSopLogsList,
   delQwSopLogs,
   editCourseQwSopLogs,
-  generateShortLink
+  generateShortLink,generateLiveShortLink
 } from '../../../api/qw/sopLogs'
 import {delSopUserLogsInfo} from "@/api/qw/sopUserLogsInfo";
 import userVideo from "@/views/qw/userVideo/userVideo";
@@ -653,6 +657,16 @@ export default {
       });
       this.shortLinkDialogVisible = true;
     },
+    generateLiveShortLink(val){
+      const param = {
+        linkStr:val.miniprogramPage,
+        appId:val.miniprogramAppid
+      };
+      generateLiveShortLink(param).then(res=>{
+        this.copyText = res.urlLink;
+      });
+      this.shortLinkDialogVisible = true;
+    },
     onCopy(){
       navigator.clipboard.writeText(this.copyText).then(() => {
         this.$message.success('复制成功')

+ 2 - 2
src/views/qw/sopTemp/updateSopTemp.vue

@@ -514,7 +514,7 @@
                                               </el-form-item>
                                             </el-card>
                                           </div>
-                                          <div v-if="setList.contentType == 12">
+                                          <div v-if="setList.contentType == 12 || setList.contentType == 18 || setList.contentType == 19">
                                             <el-card class="box-card miniprogram-card">
                                               <div slot="header" class="card-header-mini">
                                                 <i class="el-icon-video-camera"></i>
@@ -1817,7 +1817,7 @@ export default {
       ruleList: [],
       ids: [],
       // startTimeRange: [],
-      courseTypeList: ['1','2', '4','5','6', '7','8','9','10','14','15','11'],
+      courseTypeList: ['1','2', '4','5','6', '7','8','9','10','14','15','16','11'],
       sysFsSopWatchStatus: [],
       //消息内容类型 企微版
       sysQwSopContentType: [],

+ 9 - 9
src/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue

@@ -101,7 +101,7 @@
                     </el-card>
                   </div> -->
                   <el-form-item label="内容" style="margin-bottom: 2%" >
-                    <div v-if="item.contentType == 12">
+                    <div v-if="item.contentType == 12 || item.contentType == 18 || item.contentType == 19">
                       <el-card class="box-card">
                         <el-form-item label="直播间" >
                           <el-select  v-model="item.liveId"
@@ -179,7 +179,7 @@
                         </el-form-item>
                       </el-card>
                     </div>
-                    <div v-if="item.contentType == 4 || item.contentType == 10 ">
+                    <div v-if="item.contentType == 4 || item.contentType == 10  || item.contentType == 17 ">
                       <el-card class="box-card">
                         <el-form-item label="标题" prop="miniprogramTitle">
                           <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字"  />
@@ -596,7 +596,7 @@ export default {
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
 
-            if ( this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ){
+            if ( this.setting[i].contentType == 4 || this.setting[i].contentType == 10  || this.setting[i].contentType == 17 ){
               this.$set(this.setting[i], 'miniprogramPicUrl', selectedCourse.dictImgUrl);
             }
           }
@@ -627,7 +627,7 @@ export default {
 
             }
 
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ){
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10  || this.setting[i].contentType == 17 ){
               this.$set(this.setting[i], 'miniprogramTitle', selectedVideo.dictLabel);
 
               if (this.projectFrom == 'sxjz' && selectedVideo.dictImgUrl) {
@@ -853,7 +853,7 @@ export default {
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ){
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17 ){
               this.$set(this.setting[i], 'miniprogramPicUrl', selectedCourse.dictImgUrl);
             }
 
@@ -878,7 +878,7 @@ export default {
                 this.$set(this.setting[i], 'linkImageUrl', selectedVideo.dictImgUrl);
               }
             }
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10){
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17){
               this.$set(this.setting[i], 'miniprogramTitle', selectedVideo.dictLabel);
 
               if (this.projectFrom == 'sxjz' && selectedVideo.dictImgUrl) {
@@ -935,7 +935,7 @@ export default {
           let hasLiveSetting = false;
           console.log(jsonSetting)
           for(let index=0;index < jsonSetting.length;index++){
-           if(!!jsonSetting[index] && jsonSetting[index].contentType == "12") {
+           if(!!jsonSetting[index] && (jsonSetting[index].contentType == "12" || jsonSetting[index].contentType == "18" || jsonSetting[index].contentType == "19") ) {
             if(!!hasLiveSetting){
                return this.$message.error("发送直播间只能一次只能发送一条");
             }
@@ -977,10 +977,10 @@ export default {
                 return this.$message.error("链接地址不能为空")
               }
 
-              if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ) && (this.setting[i].miniprogramTitle == null || this.setting[i].miniprogramTitle == "")) {
+              if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17) && (this.setting[i].miniprogramTitle == null || this.setting[i].miniprogramTitle == "")) {
                 return this.$message.error("小程序消息标题不能为空")
               }
-              if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ) && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
+              if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17) && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
                 return this.$message.error("小程序封面地址不能为空")
               }
 

+ 27 - 8
src/views/qw/sopUserLogsInfo/sendMsgSopOpenTool.vue

@@ -104,7 +104,7 @@
                         </el-form-item>
                       </el-card>
                     </div>
-                    <div v-if="item.contentType == 4 || item.contentType == 10 ">
+                    <div v-if="item.contentType == 4 || item.contentType == 10 || item.contentType == 17">
                       <el-card class="box-card">
                         <el-form-item label="标题" prop="miniprogramTitle">
                           <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字"  />
@@ -204,7 +204,7 @@
                       </el-card>
                     </div>
 
-                    <div v-if="item.contentType == 12">
+                    <div v-if="item.contentType == 12 || item.contentType == 18 || item.contentType == 19">
                       <el-card class="box-card">
                         <el-form-item label="直播间" >
                           <el-select  v-model="item.liveId"
@@ -329,6 +329,7 @@ import ImageUpload from "@/views/qw/sop/ImageUpload.vue";
 import {courseList, videoList} from "@/api/qw/sop";
 import userVideo from "@/views/qw/userVideo/userVideo";
 import {listReward} from "@/api/qw/luckyBag";
+import {listToLiveNoEnd} from "@/api/live/live";
 
 
 export default {
@@ -405,6 +406,7 @@ export default {
       //插件版
       sysQwSopAiContentType:[],
 
+      liveList: [],
       sendMsgOpen:{
         title:'一键批量群发',
         open:false,
@@ -446,6 +448,9 @@ export default {
     this.getDicts("sys_fs_sop_watch_status").then(response => {
       this.sysFsSopWatchStatus = response.data;
     });
+    listToLiveNoEnd().then(response => {
+      this.liveList = response.rows;
+    });
 
     courseList().then(response => {
       this.courseList = response.list;
@@ -464,6 +469,20 @@ export default {
         content.luckyBagDataStatus = null;
       }
     },
+    liveChange(content) {
+      // content.liveId 是选中的直播间 ID(liveId)
+      const selectedLive = this.liveList.find(live => live.liveId === content.liveId);
+      if (selectedLive) {
+        // 从选中的直播间对象中提取标题和封面,赋值给当前内容的对应字段
+        // 假设直播间对象中标题字段为 liveTitle,封面字段为 coverImg(根据实际接口字段调整)
+        content.miniprogramTitle = selectedLive.liveName || ''; // 自动填充标题
+        content.miniprogramPicUrl = selectedLive.liveImgUrl || ''; // 自动填充封面
+      } else {
+        // 若未找到对应直播间,清空标题和封面(可选)
+        content.miniprogramTitle = '';
+        content.miniprogramPicUrl = '';
+      }
+    },
 
     qwUserVideoResult(val) {
 
@@ -502,7 +521,7 @@ export default {
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
 
-            if ( this.setting[i].contentType == 4 || this.setting[i].contentType == 10  ){
+            if ( this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17){
               this.$set(this.setting[i], 'miniprogramPicUrl', selectedCourse.dictImgUrl);
             }
           }
@@ -532,7 +551,7 @@ export default {
               }
             }
 
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ){
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17){
               this.$set(this.setting[i], 'miniprogramTitle', selectedVideo.dictLabel);
 
               if (this.projectFrom == 'sxjz' && selectedVideo.dictImgUrl) {
@@ -760,7 +779,7 @@ export default {
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
 
             }
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10){
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17){
               this.$set(this.setting[i], 'miniprogramPicUrl', selectedCourse.dictImgUrl);
 
             }
@@ -787,7 +806,7 @@ export default {
               }
 
             }
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10){
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17){
               this.$set(this.setting[i], 'miniprogramTitle', selectedVideo.dictLabel);
 
               if (this.projectFrom == 'sxjz' && selectedVideo.dictImgUrl) {
@@ -865,10 +884,10 @@ export default {
                 return this.$message.error("链接地址不能为空")
               }
 
-              if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10) && (this.setting[i].miniprogramTitle == null || this.setting[i].miniprogramTitle == "")) {
+              if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10  || this.setting[i].contentType == 17) && (this.setting[i].miniprogramTitle == null || this.setting[i].miniprogramTitle == "")) {
                 return this.$message.error("小程序消息标题不能为空")
               }
-              if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10) && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
+              if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17) && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
                 return this.$message.error("小程序封面地址不能为空")
               }
 

+ 2 - 2
src/views/qw/sopUserLogsInfo/sopUserLogsInfoDetails.vue

@@ -407,7 +407,7 @@
                         placeholder="输入要转为语音的内容" style="width: 90%;margin-top: 10px;"
                         @input="handleInputVideoText(item.value,item)"/>
                     </div>
-                    <div v-if="item.contentType == 12">
+                    <div v-if="item.contentType == 12 || item.contentType == 18 || item.contentType == 19">
                       <!--                                           <div >-->
                       <el-card class="box-card">
                         <el-form-item label="直播间" >
@@ -1405,7 +1405,7 @@ export default {
           let hasLiveSetting = false;
           let jsonSetting = JSON.parse(this.msgForm.setting);
           for(let index=0;index < jsonSetting.length;index++){
-           if(!!jsonSetting[index] && jsonSetting[index].contentType == "12") {
+           if(!!jsonSetting[index] && (jsonSetting[index].contentType == "12" || jsonSetting[index].contentType == "18" || jsonSetting[index].contentType == "19") ) {
             if(!!hasLiveSetting){
                return this.$message.error("发送直播间只能一次只能发送一条");
             }