Explorar o código

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

XW hai 1 ano
pai
achega
6265cf6b6a

+ 2 - 1
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -1073,7 +1073,8 @@ const LANG_EN_US = {
         schoolType: 'In-school Account',
         tmIDType: 'ID',
         qrCodeText: 'Invitation Code:',
-        inviteUrl: 'Copy Invitation Link',
+        inviteUrl: 'Copy description with URL',
+        inviteShortUrl: 'Copy URL only',
         copyUrl: 'Copy Link',
         joinMessage1: "Allowed to join the course",
         joinMessage2: "Prohibited to join the course",

+ 2 - 1
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -1073,7 +1073,8 @@ const LANG_ZH_CN = {
         schoolType: '校内账号',
         tmIDType: '醍摩豆ID',
         qrCodeText: '邀请码:',
-        inviteUrl: '复制邀请链接',
+        inviteUrl: '复制邀请说明及网址',
+        inviteShortUrl: '复制短网址',
         copyUrl: '复制链接',
         joinMessage1: "允许加入课程",
         joinMessage2: "禁止加入课程",

+ 2 - 1
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -1073,7 +1073,8 @@ const LANG_ZH_TW = {
         schoolType: '校內帳號',
         tmIDType: '用戶編號',
         qrCodeText: '邀請碼:',
-        inviteUrl: '複製邀請網址',
+        inviteUrl: '複製邀請說明與網址',
+        inviteShortUrl: '複製短網址',
         copyUrl: '複製網址',
         joinMessage1: "允許加入課程",
         joinMessage2: "禁止加入課程",

+ 19 - 3
TEAMModelOS/ClientApp/src/common/QrcodeModal.vue

@@ -15,6 +15,10 @@
                 <Icon type="md-copy" class="copy-link-icon" :title="$t('cusMgt.copyUrl')" />
                 <span style="font-size:14px">{{$t('cusMgt.inviteUrl')}}</span>
             </p>
+            <p class="invite-url-text" @click="copyShortUrl" style="margin-top: 10px;">
+                <Icon type="md-copy" class="copy-link-icon" :title="$t('cusMgt.inviteShortUrl')" />
+                <span style="font-size:14px">{{$t('cusMgt.inviteShortUrl')}}</span>
+            </p>
         </div>
     </div>
 </template>
@@ -43,12 +47,14 @@ export default {
     },
     data() {
         return {
+            shortUrl:'',
             showQrStatus: false,
             joinQRcode: undefined
         }
     },
     methods: {
         async copyUrl() {
+            console.error(this.config)
             this.$copyText(this.config.shareContent).then(
                 ok => {
                     this.$Message.success(this.$t("settings.copyModal1"))
@@ -58,17 +64,27 @@ export default {
                 }
             )
         },
+        copyShortUrl(){
+            this.$copyText(this.shortUrl.result).then(
+                ok => {
+                    this.$Message.success(this.$t("settings.copyModal1"))
+                },
+                fail => {
+                    this.$Message.error(this.$t("settings.copyModal2"))
+                }
+            )
+        },
         createQRCode() {
             this.$nextTick(async () => {
                 // 此时已经渲染完成
                 try {
-                    let shortUrl = await this.$api.getShortUrl(encodeURI(this.config.url))
+                    this.shortUrl = await this.$api.getShortUrl(encodeURI(this.config.url))
                     if (this.joinQRcode == undefined) {
                         let qrcode = new QRCode('qrcode', {
                             width: 280, // 设置宽度,单位像素
                             height: 280, // 设置高度,单位像素
                             // text: encodeURI(url), // 编码处理
-                            text: encodeURI(this.config.url), // 编码处理
+                            text: encodeURI(this.config.simpleUrl), // 编码处理
                             // text: shortUrl.result || encodeURI(this.config.url), // 编码处理
                             correctLevel: QRCode.CorrectLevel.Q //解决编码后网址太长的问题
                         })
@@ -76,7 +92,7 @@ export default {
                     } else {
                         this.joinQRcode.clear()
                         // this.joinQRcode.makeCode(shortUrl.result || encodeURI(this.config.url))
-                        this.joinQRcode.makeCode(encodeURI(this.config.url))
+                        this.joinQRcode.makeCode(encodeURI(this.config.simpleUrl))
                     }
                     let dom = document.getElementById('qrcode')
                     if (dom) dom.title = ''

+ 3 - 0
TEAMModelOS/ClientApp/src/view/mycourse/MyCourse.vue

@@ -414,6 +414,7 @@
 				qrConfig: {
 					title: this.$t("cusMgt.qrCodeLabel"),
 					url: "", //二维码内容 不用转短网址,组件内部处理
+					simpleUrl:"",
 					shareContent: "" //复制链接内容,支持字符串模板,如果包含网址需要处理好短网址
 				},
 				showQrStatus: false,
@@ -823,8 +824,10 @@
 					this.stuListNo = stulistInfo.no;
 					let host = window.location.origin;
 					let callbackUrl = `${host}/joinclass?listName=${listName}&cusDesc=${cusDesc}&cusId=${cusId}&tName=${tName}&listNo=${this.stuListNo}&cusName=${cusName}&m=${this.$t("qrCode.tip3")}:${cusName}${listName}&o=1`;
+					let simpleUrl = `${host}/joinclass?listName=${listName}&cusId=${cusId}&tName=${tName}&listNo=${this.stuListNo}&cusName=${cusName}&m=${this.$t("qrCode.tip3")}:${cusName}${listName}&o=1`;
 					this.inviteUrl = callbackUrl;
 					this.qrConfig.url = callbackUrl;
+					this.qrConfig.simpleUrl = simpleUrl;
 
 					// 处理分享内容
 					try {

+ 2 - 0
TEAMModelOS/Controllers/Both/CourseBaseController.cs

@@ -1127,6 +1127,7 @@ namespace TEAMModelOS.Controllers.Both
                                                         startTime = courseTaskInsert.startTime,
                                                         times= new List<ScheduleTime>(),
                                                         school=courseTaskInsert.school,
+                                                        
                                                     } }
                                                 };
                                             }
@@ -1157,6 +1158,7 @@ namespace TEAMModelOS.Controllers.Both
                                                 teacherId = courseTaskInsert.teacherId,
                                                 times = new List<ScheduleTime>(),
                                                 school = school,
+                                                notice = courseTaskInsert.notice,
                                             };
                                             courseTask.schedules.Add(scheduleTask);
                                         }