Browse Source

Merge branch 'zhuf'

bzkf3 2 years ago
parent
commit
a013173bfa

+ 1 - 1
src/pages/courseResources.vue

@@ -229,7 +229,7 @@ import { user } from "@/store/user.js";
     //初始化数据
     initData() {
       let transObj = {
-        token: user.token,
+        token: user?.token,
         keyword:this.searchKey,
       }
       courseIndex(transObj)

+ 3 - 3
src/pages/courseResourcesAll.vue

@@ -137,7 +137,7 @@ import { user } from "@/store/user.js";
     /**初始化年级*/
     initGrade() {
       let transObj = {
-        token: user.token,
+        token: user?.token,
       };
       defaultGrade(transObj)
         .then(res => {
@@ -168,7 +168,7 @@ import { user } from "@/store/user.js";
     /**初始化学科*/
     initSubject() {
       let transObj = {
-        token: user.token,
+        token: user?.token,
       };
       defaultSubject(transObj)
         .then(res => {
@@ -204,7 +204,7 @@ import { user } from "@/store/user.js";
       this.kcID = this.$route.query.kcId;
       this.bigTitle=trans_kcName;
       let transObj = {
-        token: user.token,
+        token: user?.token,
         page: changePage,
         limit: 10,
         kc_cate_level_1:'',//一级目录的ID

+ 3 - 3
src/pages/courseResourcesChapter.vue

@@ -99,7 +99,7 @@ import { user } from "@/store/user.js";
     initDetail() {
       this.kkID = this.$route.query.id;
       let transObj = {
-        token:user.token,
+        token:user?.token,
         kk_id:this.kkID
       }
       courseDetail(transObj)
@@ -115,7 +115,7 @@ import { user } from "@/store/user.js";
     initSourceData() {
       this.kkID = this.$route.query.id;
       let transObj = {
-        token:user.token,
+        token:user?.token,
         kk_id: this.kkID,
         keyword:this.searchKey,
       }
@@ -312,7 +312,7 @@ import { user } from "@/store/user.js";
     }
     .sourceWidthCoverList::-webkit-scrollbar-track {
       border-radius: 10px; // 轨道圆角
-      background-color: #ffffff // 轨道颜色 
+      background-color: #ffffff // 轨道颜色
     }
     .chapterAllIn_right{
       width: 35%;

+ 1 - 1
src/pages/personal/components/MyCourse/components/MultiFileUpload.vue

@@ -3,7 +3,7 @@ import { ElMessage } from 'element-plus';
 import { ref, useAttrs, watch } from 'vue';
 // import { REQUEST } from '~/utils/request';
 import user from '~/store/user';
-const token = user.token
+const token = user?.token
 const action = window.GLOBAL_CONFIG.api + '/upload/main/file'
 
 const data = { token, client: 'web', api: 'json', issubmit: '1', site: 'tyyx' }

+ 1 - 1
src/pages/resourceFileReview.vue

@@ -59,7 +59,7 @@ import { user } from "@/store/user.js";
         this.transIconType = this.$route.query.icon;
         this.transKfId = this.$route.query.kfId;
         let transObj = {
-          token:user.token,
+          token:user?.token,
           kf_id:this.transKfId
         }
         courseSourceDetail(transObj)

+ 6 - 6
src/pages/resourceMovReview.vue

@@ -310,7 +310,7 @@ export default {
       this.transKfId = this.$route.query.kfId;
       this.transKkId = this.$route.query.kkID;
       let transObj = {
-        token: user.token,
+        token: user?.token,
         kf_id: this.transKfId,
       };
       courseSourceDetail(transObj)
@@ -334,7 +334,7 @@ export default {
     /**初始化评论*/
     initEvaluaList() {
       let transObj = {
-        token: user.token,
+        token: user?.token,
         kf_id: this.transKfId,
       };
       evaluaList(transObj)
@@ -350,7 +350,7 @@ export default {
     /**课程用户信息*/
     initUserInfoDetail() {
       let transObj = {
-        token: user.token,
+        token: user?.token,
         user_id: user.user_id,
       };
       userInfoDetail(transObj)
@@ -367,7 +367,7 @@ export default {
     initSourceList() {
       let transObj = {
         limit: 99,
-        token: user.token,
+        token: user?.token,
         kk_id: this.transKkId
       };
       sourceList(transObj)
@@ -401,7 +401,7 @@ export default {
     initDetail() {
       this.kkID = this.$route.query.kkID;
       let transObj = {
-        token: user.token,
+        token: user?.token,
         kk_id: this.kkID
       }
       courseDetail(transObj)
@@ -443,7 +443,7 @@ export default {
         kf_id: this.transKfId,
       };
       let transObj = {
-        token: user.token,
+        token: user?.token,
         kczy_evaluate: prefiexOBJ,
       };
       evaluaAdd(transObj)

+ 1 - 1
src/pages/zbkt/ssys/rtc.vue

@@ -61,7 +61,7 @@ request({
     });
 
     // rtc.client.setClientRole("host");
-    await rtc.client.join(options.appId, options.channel, options.token, options.uid);
+    await rtc.client.join(options.appId, options.channel, options?.token, options.uid);
     // Create an audio track from the audio sampled by a microphone.
     rtc.localAudioTrack = await AgoraRTC.createMicrophoneAudioTrack();
     // Create a video track from the video captured by a camera.

+ 2 - 2
src/pages/zhjy/tbjy/detail.vue

@@ -94,7 +94,7 @@ request({
       });
 
       // rtc.client.setClientRole("host");
-      await rtc.client.join(options.appId, options.channel, options.token, options.uid);
+      await rtc.client.join(options.appId, options.channel, options?.token, options.uid);
       // Create an audio track from the audio sampled by a microphone.
       rtc.localAudioTrack = await AgoraRTC.createMicrophoneAudioTrack();
       // Create a video track from the video captured by a camera.
@@ -240,7 +240,7 @@ async function handleShareScreen() {
           /** ... **/
           if (!screenClient) {
             screenClient = AgoraRTC.createClient({ mode: "rtc", codec: "vp8" });
-            await screenClient.join(_options.appId, _options.channel, _options.token, _options.uid);
+            await screenClient.join(_options.appId, _options.channel, _options?.token, _options.uid);
           }
           localScreenTrack.on("track-ended", async () => {
             console.log('track-ended :>> ');

+ 6 - 6
src/pages/zhjy/tbjy/drop.example.js

@@ -20,12 +20,12 @@ $(() => {
   var urlParams = new URL(location.href).searchParams;
   options.appid = urlParams.get("appid");
   options.channel = urlParams.get("channel");
-  options.token = urlParams.get("token");
+  options?.token = urlParams.get("token");
   options.uid = urlParams.get("uid");
   if (options.appid && options.channel) {
     $("#uid").val(options.uid);
     $("#appid").val(options.appid);
-    $("#token").val(options.token);
+    $("#token").val(options?.token);
     $("#channel").val(options.channel);
     $("#join-form").submit();
   }
@@ -36,14 +36,14 @@ $("#join-form").submit(async function (e) {
   $("#join").attr("disabled", true);
   try {
     options.appid = $("#appid").val();
-    options.token = $("#token").val();
+    options?.token = $("#token").val();
     options.channel = $("#channel").val();
     options.uid = Number($("#uid").val());
     await join();
-    if (options.token) {
+    if (options?.token) {
       $("#success-alert-with-token").css("display", "block");
     } else {
-      $("#success-alert a").attr("href", `index.html?appid=${options.appid}&channel=${options.channel}&token=${options.token}`);
+      $("#success-alert a").attr("href", `index.html?appid=${options.appid}&channel=${options.channel}&token=${options?.token}`);
       $("#success-alert").css("display", "block");
     }
   } catch (error) {
@@ -67,7 +67,7 @@ async function join() {
   // join a channel and create local tracks, we can use Promise.all to run them concurrently
   [options.uid, localTracks.audioTrack, screenTrack] = await Promise.all([
     // join the channel
-    client.join(options.appid, options.channel, options.token || null, options.uid || null),
+    client.join(options.appid, options.channel, options?.token || null, options.uid || null),
     // ** create local tracks, using microphone and screen
     AgoraRTC.createMicrophoneAudioTrack(),
     AgoraRTC.createScreenVideoTrack({

+ 1 - 1
src/pages/zhjy/zhjyxtbk/nrxq/index.vue

@@ -277,7 +277,7 @@ async function launchRtc() {
   });
 
   // rtc.client.setClientRole("host");
-  await rtc.client.join(options.appId, options.channel, options.token, options.uid);
+  await rtc.client.join(options.appId, options.channel, options?.token, options.uid);
   // Create an audio track from the audio sampled by a microphone.
   rtc.localAudioTrack = await AgoraRTC.createMicrophoneAudioTrack();
   // Create a video track from the video captured by a camera.

+ 1 - 1
src/pages/zhjy/zhjyzxxx/zxxxsp/index.vue

@@ -229,7 +229,7 @@ export default {
   methods: {
     initUserInfoDetail() {
       let transObj = {
-        token: user.token,
+        token: user?.token,
         user_id: user.user_id,
       };
       userInfoDetail(transObj)

+ 1 - 1
src/pages/zhjy/zhjyzxxx/zxxxxq/index.vue

@@ -141,7 +141,7 @@ export default {
   methods: {
     initUserInfoDetail() {
       let transObj = {
-        token: user.token,
+        token: user?.token,
         user_id: user.user_id,
       };
       userInfoDetail(transObj)