Explorar el Código

调整国际配置信息

yfh hace 17 horas
padre
commit
76ee54782b

+ 25 - 0
.env.prod-rtgj

@@ -0,0 +1,25 @@
+# 页面标题
+VUE_APP_TITLE = 润天海外版管理系统
+# 公司名称
+VUE_APP_COMPANY_NAME =润天海外版科技有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/rtgj.png
+
+# 生产环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+# 直播webSocket地址
+VUE_APP_LIVE_WS_URL = wss://liveapp.yytcdta.com/ws

+ 2 - 2
Dockerfile

@@ -1,7 +1,7 @@
 
 
 #基于官方 NGINX 镜像部署(精简镜像)
-FROM nginx:alpine
+FROM swr.cn-east-2.myhuaweicloud.com/library/nginx:alpine
 
 # 复制本地打包好的 dist 目录到 NGINX 静态资源目录
 COPY ./dist /usr/share/nginx/html
@@ -13,4 +13,4 @@ COPY ./nginx.conf /etc/nginx/nginx.conf
 #EXPOSE 80
 
 # 启动 NGINX(前台运行,避免容器启动后退出)
-CMD ["nginx", "-g", "daemon off;"]
+CMD ["nginx", "-g", "daemon off;"]

+ 0 - 35
build/index.js

@@ -1,35 +0,0 @@
-const { run } = require('runjs')
-const chalk = require('chalk')
-const config = require('../vue.config.js')
-const rawArgv = process.argv.slice(2)
-const args = rawArgv.join(' ')
-
-if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
-  const report = rawArgv.includes('--report')
-
-  run(`vue-cli-service build ${args}`)
-
-  const port = 9526
-  const publicPath = config.publicPath
-
-  var connect = require('connect')
-  var serveStatic = require('serve-static')
-  const app = connect()
-
-  app.use(
-    publicPath,
-    serveStatic('./dist', {
-      index: ['index.html', '/']
-    })
-  )
-
-  app.listen(port, function () {
-    console.log(chalk.green(`> Preview at  http://localhost:${port}${publicPath}`))
-    if (report) {
-      console.log(chalk.green(`> Report at  http://localhost:${port}${publicPath}report.html`))
-    }
-
-  })
-} else {
-  run(`vue-cli-service build ${args}`)
-}

+ 1 - 0
package.json

@@ -9,6 +9,7 @@
     "build:prod": "vue-cli-service build",
     "build:prod-ylrz": "vue-cli-service build --mode prod-ylrz",
     "build:prod-cfryt": "vue-cli-service build --mode prod-cfryt",
+    "build:prod-rtgj": "vue-cli-service build --mode prod-rtgj",
     "build:prod-hsyy": "vue-cli-service build --mode prod-hsyy",
     "build:stage": "vue-cli-service build --mode staging",
     "build:prod-jz": "vue-cli-service build --mode prod-jz",

+ 7 - 0
src/api/course/userCoursePeriod.js

@@ -237,3 +237,10 @@ export function getPeriodListLikeName(query) {
     params: query
   })
 }
+export function courseSortLink(data) {
+  return request({
+    url: '/course/period/courseSortLink',
+    method: 'post',
+    data: data
+  })
+}

BIN
src/assets/logo/rtgj.png


+ 89 - 1
src/views/course/userCoursePeriod/index.vue

@@ -293,6 +293,12 @@
                   <el-tag type="danger">{{ parseTime(scope.row.lastJoinTime, '{h}:{i}:{s}') }}</el-tag>
                 </template>
               </el-table-column>
+              <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                  <el-button size="mini" type="text" @click="copyCourseSortLink(scope.row)"
+                  >复制短链</el-button>
+                </template>
+              </el-table-column>
             </el-table>
           </el-tab-pane>
           <el-tab-pane label="课程统计" name="statistics">
@@ -330,7 +336,7 @@ import {
   updateCourseDate,
   updateListCourseData,
   periodCourseMove,
-  closePeriod
+  closePeriod,courseSortLink
 } from "@/api/course/userCoursePeriod";
 import {getCompanyList} from "@/api/company/company";
 import {courseList, videoList} from '@/api/course/courseRedPacketLog'
@@ -339,6 +345,16 @@ import BatchRedPacket from './batchRedPacket.vue'
 import CourseStatistics from './statistics.vue'
 
 export default {
+  props: {
+    companyId: {
+      type: Number,
+      default: 0
+    },
+    companyUserId: {
+      type: Number,
+      default: 0
+    }
+  },
   name: "Period",
   components: {
     RedPacket,
@@ -470,6 +486,76 @@ export default {
     this.getList();
   },
   methods: {
+
+    copyCourseSortLink(row) {
+      this.imSendForm = {
+        userIds: this.userIds,
+        companyUserId: this.companyUserId,
+        companyId: this.companyId,
+        id: row.id,
+        periodId: row.periodId,
+        courseId: row.courseId,
+        videoId: row.videoId,
+        projectId: row.projectId,
+      }
+      courseSortLink(this.imSendForm).then(res => {
+        // 假设返回的URL在res.data或res.url中,根据你的API调整
+        const url = res.data || res.url;
+
+        if (url) {
+          // 方法1: 使用现代Clipboard API(推荐)
+          if (navigator.clipboard && window.isSecureContext) {
+            navigator.clipboard.writeText(url)
+              .then(() => {
+                this.$message.success('链接已复制到剪贴板');
+              })
+              .catch(err => {
+                console.error('复制失败:', err);
+                this.fallbackCopyText(url); // 降级方案
+              });
+          } else {
+            // 方法2: 降级方案 - 使用document.execCommand
+            this.fallbackCopyText(url);
+          }
+        } else {
+          this.$message.error('未获取到链接');
+        }
+      }).catch(error => {
+        console.error('获取链接失败:', error);
+        this.$message.error('获取链接失败');
+      });
+    },
+
+// 降级复制方法
+    fallbackCopyText(text) {
+      const textArea = document.createElement('textarea');
+      textArea.value = text;
+
+      // 避免屏幕滚动
+      textArea.style.position = 'fixed';
+      textArea.style.left = '-999999px';
+      textArea.style.top = '-999999px';
+      document.body.appendChild(textArea);
+      textArea.focus();
+      textArea.select();
+
+      try {
+        const successful = document.execCommand('copy');
+        if (successful) {
+          this.$message.success('链接已复制到剪贴板');
+        } else {
+          this.$message.error('复制失败,请手动复制');
+        }
+      } catch (err) {
+        console.error('复制失败:', err);
+        this.$message.error('复制失败,请手动复制');
+      }
+
+      document.body.removeChild(textArea);
+    },
+
+
+
     /** 查询会员营期列表 */
     getList() {
       this.loading = true;
@@ -1144,6 +1230,8 @@ export default {
     },
     handlePeriodSettings(row) {
       this.periodSettingsData = row;
+      this.companyId = row.companyId;
+      this.companyUserId = row.companyUserId;
       this.periodSettingsVisible = true;
       // 初始化课程列表
       this.course.queryParams.periodId = row.periodId;