Bladeren bron

feat(场景列表): 添加带看

tangning 3 jaren geleden
bovenliggende
commit
1ea9a94e2c
3 gewijzigde bestanden met toevoegingen van 16 en 3 verwijderingen
  1. 1 0
      src/locales/lang/ja/routes/scenes.ts
  2. 1 0
      src/locales/lang/zh-CN/routes/scenes.ts
  3. 14 3
      src/views/scenes/list.vue

+ 1 - 0
src/locales/lang/ja/routes/scenes.ts

@@ -6,6 +6,7 @@ export default {
   createTime: '撮影時間',
   num: 'シーンコード',
   process: 'ダウンロードの進捗状況',
+  jointVisit: '持参する',
   sceneList: 'シーンリスト',
   bindAnchor: 'アンカーをバインドする',
   anchorRoom: 'ライブルーム名',

+ 1 - 0
src/locales/lang/zh-CN/routes/scenes.ts

@@ -6,6 +6,7 @@ export default {
   createTime: '拍摄时间',
   num: '场景码',
   process: '下载进度',
+  jointVisit: '带看',
   sceneList: '场景列表',
   bindAnchor: '绑定主播',
   anchorRoom: '直播间名称',

+ 14 - 3
src/views/scenes/list.vue

@@ -34,6 +34,10 @@
               label: t('routes.scenes.editor'),
               onClick: openSceneEditor.bind(null, record),
             },
+            {
+              label: t('routes.scenes.jointVisit'),
+              onClick: handleLivestream.bind(null, record),
+            },
             // {
             //   // icon: 'dashicons:editor-kitchensink',
             //   color: 'error',
@@ -137,12 +141,12 @@
         {
           title: t('routes.scenes.viewCount'),
           dataIndex: 'viewCount',
-          width: 180,
+          width: 100,
         },
         {
           title: t('routes.scenes.createTime'),
           dataIndex: 'createTime',
-          width: 180,
+          width: 140,
         },
 
         {
@@ -163,7 +167,7 @@
           title: t('common.operation'),
           dataIndex: '',
           slots: { customRender: 'action' },
-          width: isJA.value ? 300 : 180,
+          width: isJA.value ? 350 : 220,
           fixed: 'right',
         },
       ];
@@ -229,6 +233,12 @@
           totalField: 'total',
         },
       });
+      function handleLivestream(item) {
+        let url = item.webSite;
+        let page = url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.html'));
+        url = url.replace(page, 'rtc-live');
+        window.open(url.replace('http://', 'https://') + (isJA.value ? '&lang=ja' : ''), '_blank');
+      }
       async function openSceneEditor(record: Recordable) {
         try {
           const token = userStore.getToken;
@@ -278,6 +288,7 @@
         t,
         openSceneEditor,
         handleDownloadScene,
+        handleLivestream,
         registerDownloadModal,
       };
     },