Przeglądaj źródła

Merge branch 'develop6.0-tmd' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop6.0-tmd

liqk 3 lat temu
rodzic
commit
140d4e28c3

+ 2 - 2
TEAMModelOS/ClientApp/src/common/QrcodeModal.vue

@@ -65,13 +65,13 @@ export default {
                             width: 280, // 设置宽度,单位像素
                             height: 280, // 设置高度,单位像素
                             // text: encodeURI(url), // 编码处理
-                            text: shortUrl.result, // 编码处理
+                            text: shortUrl.result || encodeURI(this.config.url), // 编码处理
                             correctLevel: QRCode.CorrectLevel.Q //解决编码后网址太长的问题
                         })
                         this.joinQRcode = qrcode
                     } else {
                         this.joinQRcode.clear()
-                        this.joinQRcode.makeCode(shortUrl.result)
+                        this.joinQRcode.makeCode(shortUrl.result || encodeURI(this.config.url))
                     }
                     let dom = document.getElementById('qrcode')
                     if (dom) dom.title = ''

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/en-US/cusMgt.js

@@ -117,6 +117,7 @@ export default {
     inviteInfo5:'快速加入教師個人課程鏈接:',
     inviteInfo6:'或登入醍摩豆雲平臺IES學習主頁,輸入課程碼加入課程:',
     inviteInfo7:'輸入課程邀請碼,加入課程 :',
+    inviteInfo8:'教師:',
     createTips1: 'Note: You (have joined a school) can select students from your school to join the course, or allow students to join the course by entering the course invitation code, scanning the course QR code, or using the invitation link.',
     createTips2: 'Note: You (not yet a member of a school) can allow students to join the course by entering the course invitation code, scanning the course QR code, or using the invitation link.',
     renameListTitle: 'Edit List Name',

+ 1 - 1
TEAMModelOS/ClientApp/src/locale/lang/en-US/learnActivity.js

@@ -69,7 +69,7 @@ export default {
         shareText2:'活動名稱:',
         shareText3:'活動類型:',
         shareText4:'學科:',
-        shareText5:'課程:',
+        shareText5:'課程名稱:',
         shareText6:'快速登入醍摩豆雲平臺IES學習主頁,進行線上活動',
         shareText7:'或登入醍摩豆雲平臺IES學習主頁,進行線上活動:',
         shareText8:'掃碼進行線上活動',

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/cusMgt.js

@@ -117,6 +117,7 @@ export default {
     inviteInfo5:'快速加入教师个人课程链接:',
     inviteInfo6:'或登入醍摩豆云平台IES学习主页,输入课程码加入课程:',
     inviteInfo7:'输入课程邀请码,加入课程 :',
+    inviteInfo8:'教师 :',
     createTips1:'温馨提示:您(已加入学校)可以挑选学校学生加入课程或让学生通过输入课程邀请码、扫描课程二维码、课程链接方式主动加入课程。',
     createTips2:'温馨提示:您(暂未加入学校)可让学生通过输入课程邀请码、扫描课程二维码、课程链接方式主动加入课程。',
     renameListTitle:'修改名称',

+ 1 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/learnActivity.js

@@ -70,7 +70,7 @@ export default {
         shareText2:'活动名称:',
         shareText3:'活动类型:',
         shareText4:'学科:',
-        shareText5:'课程:',
+        shareText5:'课程名称:',
         shareText6:'快速登入醍摩豆云平台IES学习主页,进行线上活动',
         shareText7:'或登入醍摩豆云平台IES学习主页,进行线上活动:',
         shareText8:'扫码进行线上活动',

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/cusMgt.js

@@ -117,6 +117,7 @@ export default {
     inviteInfo5:'快速加入教師個人課程鏈接:',
     inviteInfo6:'或登入醍摩豆雲平臺IES學習主頁,輸入課程碼加入課程:',
     inviteInfo7:'輸入課程邀請碼,加入課程 :',
+    inviteInfo8:'教師:',
     createTips1: '溫馨提示:您(已加入學校)可以挑選學校學生加入課程或讓學生通過輸入課程邀請碼、掃描課程二維碼、課程鏈接方式主動加入課程。 ',
     createTips2: '溫馨提示:您(暫未加入學校)可讓學生通過輸入課程邀請碼、掃描課程二維碼、課程鏈接方式主動加入課程。 ',
     renameListTitle: '修改名稱',

+ 1 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/learnActivity.js

@@ -70,7 +70,7 @@ export default {
         shareText2:'活動名稱:',
         shareText3:'活動類型:',
         shareText4:'學科:',
-        shareText5:'課程:',
+        shareText5:'課程名稱:',
         shareText6:'快速登入醍摩豆雲平臺IES學習主頁,進行線上活動',
         shareText7:'或登入醍摩豆雲平臺IES學習主頁,進行線上活動:',
         shareText8:'掃碼進行線上活動',

+ 4 - 4
TEAMModelOS/ClientApp/src/view/areatrain/TrainDetail.vue

@@ -892,12 +892,12 @@ export default {
                     let qrcode = new QRCode('fullqrcode', {
                         width: 320, // 设置宽度,单位像素
                         height: 320, // 设置高度,单位像素
-                        text: shortUrl.result // 设置二维码内容或跳转地址
+                        text: shortUrl.result || encodeURI(url) // 设置二维码内容或跳转地址
                     })
                     this.fullQR = qrcode
                 } else {
                     this.fullQR.clear()
-                    this.fullQR.makeCode(shortUrl.result)
+                    this.fullQR.makeCode(shortUrl.result || encodeURI(url))
                 }
                 let dom = document.getElementById('fullqrcode')
                 if (dom) dom.title = ''
@@ -914,12 +914,12 @@ export default {
                     let qrcode = new QRCode('sign-qr-code', {
                         width: 150, // 设置宽度,单位像素
                         height: 150, // 设置高度,单位像素
-                        text: shortUrl.result // 设置二维码内容或跳转地址
+                        text: shortUrl.result || encodeURI(url)// 设置二维码内容或跳转地址
                     })
                     this.signQRcode = qrcode
                 } else {
                     this.signQRcode.clear()
-                    this.signQRcode.makeCode(shortUrl.result)
+                    this.signQRcode.makeCode(shortUrl.result || encodeURI(url))
                 }
                 let dom = document.getElementById('qrcode')
                 if (dom) dom.title = ''

+ 4 - 4
TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.vue

@@ -277,8 +277,8 @@ export default {
             let evType = this.getModeLabel(this.evaListShow[this.curEvaIndex].source)
             let soc = this.evaListShow[this.curEvaIndex].owner === 'school' ? this.$t('learnActivity.mgtScEv.shareText4') : this.$t('learnActivity.mgtScEv.shareText5')
             let socName = this.evaListShow[this.curEvaIndex].subjects.map(item => item.name).join('、')
-            let shortUrl = await this.$api.getShortUrl(encodeURI(this.shareUrl)) //暂不替换,等路由处理好了再替换
-            let shareText = `${this.$t('learnActivity.mgtScEv.shareText1')}\n\n${this.$t('learnActivity.mgtScEv.shareText2')}${evName}\n${this.$t('learnActivity.mgtScEv.shareText3')}${evType}\n${soc}${socName}\n\n${this.$t('learnActivity.mgtScEv.shareText6')}\n${shortUrl.result}\n\n${this.$t('learnActivity.mgtScEv.shareText7')}\nURL:https://${window.location.host}/login/student`
+            let shortUrl = await this.$api.getShortUrl(encodeURI(this.shareUrl)) //暂不替换,等路由处理好了再替换 
+            let shareText = `${this.$t('learnActivity.mgtScEv.shareText1')}\n\n${soc}${socName}\n${this.$t('learnActivity.mgtScEv.shareText3')}${evType}\n${this.$t('cusMgt.inviteInfo8')}${this.$store.state.userInfo.name}\n${this.$t('learnActivity.mgtScEv.shareText2')}${evName}\n\n${this.$t('learnActivity.mgtScEv.shareText6')}\n${shortUrl.result || encodeURI(this.shareUrl)}\n\n${this.$t('learnActivity.mgtScEv.shareText7')}\nURL:https://${window.location.host}/login/student`
             this.$copyText(shareText).then(
                 ok => {
                     this.$Message.success(this.$t("settings.copyModal1"))
@@ -297,13 +297,13 @@ export default {
                     let qrcode = new QRCode('qrcode', {
                         width: 280, // 设置宽度,单位像素
                         height: 280, // 设置高度,单位像素
-                        text: shortUrl.result, // 编码处理
+                        text: shortUrl.result || encodeURI(this.shareUrl), // 编码处理
                         correctLevel: QRCode.CorrectLevel.Q //解决编码后网址太长的问题
                     })
                     this.shareQRcode = qrcode
                 } else {
                     this.shareQRcode.clear()
-                    this.shareQRcode.makeCode(shortUrl.result)
+                    this.shareQRcode.makeCode(shortUrl.result || encodeURI(this.shareUrl))
                 }
                 let dom = document.getElementById('qrcode')
                 if (dom) dom.title = ''

+ 3 - 3
TEAMModelOS/ClientApp/src/view/learnactivity/MgtSchoolEva.vue

@@ -273,7 +273,7 @@ export default {
             let soc = this.evaListShow[this.curEvaIndex].owner === 'school' ? this.$t('learnActivity.mgtScEv.shareText4') : this.$t('learnActivity.mgtScEv.shareText5')
             let socName = this.evaListShow[this.curEvaIndex].subjects.map(item => item.name).join('、')
             let shortUrl = await this.$api.getShortUrl(encodeURI(this.shareUrl))
-            let shareText = `${this.$t('learnActivity.mgtScEv.shareText1')}\n\n${this.$t('learnActivity.mgtScEv.shareText2')}${evName}\n${this.$t('learnActivity.mgtScEv.shareText3')}${evType}\n${soc}${socName}\n\n${this.$t('learnActivity.mgtScEv.shareText6')}\n${shortUrl.result}\n\n${this.$t('learnActivity.mgtScEv.shareText7')}\nURL:https://${window.location.host}/login/student`
+            let shareText = `${this.$t('learnActivity.mgtScEv.shareText1')}\n\n${soc}${socName}\n${this.$t('learnActivity.mgtScEv.shareText3')}${evType}\n${this.$t('cusMgt.inviteInfo8')}${this.$store.state.userInfo.name}\n${this.$t('learnActivity.mgtScEv.shareText2')}${evName}\n\n${this.$t('learnActivity.mgtScEv.shareText6')}\n${shortUrl.result || encodeURI(this.shareUrl)}\n\n${this.$t('learnActivity.mgtScEv.shareText7')}\nURL:https://${window.location.host}/login/student`
             this.$copyText(shareText).then(
                 ok => {
                     this.$Message.success(this.$t("settings.copyModal1"))
@@ -292,13 +292,13 @@ export default {
                     let qrcode = new QRCode('qrcode', {
                         width: 280, // 设置宽度,单位像素
                         height: 280, // 设置高度,单位像素
-                        text: shortUrl.result, // 编码处理
+                        text: shortUrl.result || encodeURI(this.shareUrl), // 编码处理
                         correctLevel: QRCode.CorrectLevel.Q //解决编码后网址太长的问题
                     })
                     this.shareQRcode = qrcode
                 } else {
                     this.shareQRcode.clear()
-                    this.shareQRcode.makeCode(shortUrl.result)
+                    this.shareQRcode.makeCode(shortUrl.result || encodeURI(this.shareUrl))
                 }
                 let dom = document.getElementById('qrcode')
                 if (dom) dom.title = ''

+ 2 - 1
TEAMModelOS/ClientApp/src/view/login/Index.vue

@@ -499,7 +499,8 @@ export default {
             let identity = sessionStorage.getItem('identity')
             // 登录学生端
             if (identity === 'student') {
-                this.$loginTools.stuLoginById(item)
+                localStorage.setItem("access_token", item.access_token)
+                this.$loginTools.stuLoginById(item.id_token)
                 // await this.$api.login.studLoginbyID(item).then(res => {
                 //     result = res
                 // })

+ 3 - 3
TEAMModelOS/ClientApp/src/view/login/page/Student.vue

@@ -473,8 +473,8 @@
 				let redirect_uri = window.location.origin + '/login';
 				this.$api.BuildOauthUrl(provider, redirect_uri).then(res => {
 					window.location.href = res
-				})
-			},
+                })
+            },
 			SSOLogin: function(code) { // 快速登入
 				this.$Spin.show(); //開啟加載畫面
 				this.$api.SSOLogin(code).then(async res => {
@@ -482,7 +482,7 @@
 					if (!res.error) {
 						// 登入大雲開始
 						localStorage.setItem("access_token", res.access_token)
-						this.$loginTools.stuLoginById(result.id_token)
+                        this.$loginTools.stuLoginById(res.id_token)
 					} else {
 						this.$Message.warning(this.$t('login.sse.error.text1'));
 					}

+ 1 - 1
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -1507,7 +1507,7 @@ export default {
                 // 处理分享内容
                 try {
                     let shortUrl = await this.$api.getShortUrl(encodeURI(this.inviteUrl))
-                    let shareText = `${this.$t('cusMgt.inviteInfo1')}\n\n${this.$t('cusMgt.inviteInfo2')}${cusName}\n${this.$t('cusMgt.inviteInfo3')}${listName}\n${this.$t('cusMgt.inviteInfo4')}${tName}\n\n${this.$t('cusMgt.inviteInfo5')}\n${shortUrl.result}\n\n${this.$t('cusMgt.inviteInfo6')}\nURL:https://${loginUrl}/login/student\n${this.$t('cusMgt.inviteInfo7')}${this.stuListNo}`
+                    let shareText = `${this.$t('cusMgt.inviteInfo1')}\n\n${this.$t('cusMgt.inviteInfo2')}${cusName}\n${this.$t('cusMgt.inviteInfo3')}${listName}\n${this.$t('cusMgt.inviteInfo4')}${tName}\n\n${this.$t('cusMgt.inviteInfo5')}\n${shortUrl.result || encodeURI(this.inviteUrl)}\n\n${this.$t('cusMgt.inviteInfo6')}\nURL:https://${loginUrl}/login/student\n${this.$t('cusMgt.inviteInfo7')}${this.stuListNo}`
                     this.qrConfig.shareContent = shareText
                 } catch (e) {
                     this.qrConfig.shareContent = ''

+ 4 - 4
TEAMModelOS/ClientApp/src/view/train/TrainDetail.vue

@@ -1421,13 +1421,13 @@ export default {
                     let qrcode = new QRCode('fullqrcode', {
                         width: 320, // 设置宽度,单位像素
                         height: 320, // 设置高度,单位像素
-                        text: shortUrl.result, // 设置二维码内容或跳转地址
+                        text: shortUrl.result || encodeURI(url), // 设置二维码内容或跳转地址
                         correctLevel: QRCode.CorrectLevel.L //解决编码后网址太长的问题
                     })
                     this.fullQR = qrcode
                 } else {
                     this.fullQR.clear()
-                    this.fullQR.makeCode(shortUrl.result)
+                    this.fullQR.makeCode(shortUrl.result || encodeURI(url))
                 }
                 let dom = document.getElementById('fullqrcode')
                 if (dom) dom.title = ''
@@ -1444,13 +1444,13 @@ export default {
                     let qrcode = new QRCode('sign-qr-code', {
                         width: 150, // 设置宽度,单位像素
                         height: 150, // 设置高度,单位像素
-                        text: shortUrl.result, // 设置二维码内容或跳转地址
+                        text: shortUrl.result || encodeURI(url), // 设置二维码内容或跳转地址
                         correctLevel: QRCode.CorrectLevel.L //解决编码后网址太长的问题
                     })
                     this.signQRcode = qrcode
                 } else {
                     this.signQRcode.clear()
-                    this.signQRcode.makeCode(shortUrl.result)
+                    this.signQRcode.makeCode(shortUrl.result || encodeURI(url))
                 }
                 let dom = document.getElementById('qrcode')
                 if (dom) dom.title = ''