lsc 1 day ago
parent
commit
0cf78c953d

+ 3 - 0
src/assets/icon/newIcon/afterClass.svg

@@ -0,0 +1,3 @@
+<svg width="15" height="16" viewBox="0 0 15 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M10.3486 2.62793C10.5543 2.26864 11.0127 2.14333 11.3721 2.34863C11.6236 2.49258 11.8664 2.65139 12.0977 2.82324C12.4933 3.11727 12.8575 3.45079 13.1846 3.81738C14.3131 5.08227 15 6.74747 15 8.57031C14.9998 12.5432 11.7462 15.75 7.75 15.75C3.75375 15.75 0.500233 12.5432 0.5 8.57031C0.500015 6.74747 1.18688 5.08227 2.31543 3.81738C2.64253 3.45081 3.00667 3.11726 3.40234 2.82324C3.63359 2.65141 3.87641 2.49257 4.12793 2.34863C4.48735 2.14337 4.94574 2.26863 5.15137 2.62793C5.35668 2.98734 5.23136 3.44571 4.87207 3.65137C4.67266 3.76551 4.4802 3.89112 4.29688 4.02734C3.98291 4.26065 3.69396 4.52572 3.43457 4.81641C2.54061 5.81849 2.00001 7.1318 2 8.57031C2.00023 11.6995 4.56685 14.25 7.75 14.25C10.9331 14.25 13.4998 11.6995 13.5 8.57031C13.5 7.13181 12.9594 5.8185 12.0654 4.81641C11.806 4.52569 11.5171 4.26067 11.2031 4.02734C11.0198 3.8911 10.8274 3.76552 10.6279 3.65137C10.2686 3.44573 10.1433 2.98736 10.3486 2.62793ZM7.80371 0.232422C8.21785 0.232505 8.55371 0.568259 8.55371 0.982422V8.16211C8.55358 8.57616 8.21777 8.91203 7.80371 8.91211C7.38958 8.91211 7.05384 8.57621 7.05371 8.16211V0.982422C7.05371 0.568208 7.3895 0.232422 7.80371 0.232422Z" fill="#F53F3F"/>
+</svg>

+ 3 - 0
src/assets/icon/newIcon/return.svg

@@ -0,0 +1,3 @@
+<svg width="9" height="14" viewBox="0 0 9 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M7.5 13L1.5 7L7.5 1" stroke="black" stroke-opacity="0.9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>

+ 107 - 34
src/components/pptEasyClass/index.vue

@@ -3,30 +3,38 @@
     <div class="pec_main" v-loading="pageLoading">
     <div class="pec_main" v-loading="pageLoading">
       <div class="pec_header">
       <div class="pec_header">
         <div class="pec_h_left">
         <div class="pec_h_left">
+          <div
+            @click.stop="back"
+            class="backBtn"
+            v-if="screenType!=2"
+          >
+            <img src="../../assets/icon/newIcon/return.svg" alt="" />
+          </div>
+          <div v-if="tcid" class="class-info-group">
+            <span class="class-label">班级</span>
+            <span class="class-value">{{ className }}</span>
+          </div>
+          <div v-if="tcid" class="class-info-group">
+            <span class="class-label" v-if="inviteCode">识别码</span>
+            <span class="class-value" v-if="inviteCode">{{ inviteCode }}</span>
+          </div>
+        </div>
+        <div class="pec_h_center">
           <div class="pec_h_l_title">
           <div class="pec_h_l_title">
             <span>{{ courseDetail.title }}</span>
             <span>{{ courseDetail.title }}</span>
           </div>
           </div>
-
-          <div v-if="tcid && inviteCode" class="inviteBox" style="margin-left: 20px;">
-              <span>随机码:{{ inviteCode }}</span>
-            </div>
         </div>
         </div>
-
         <div class="pec_h_right">
         <div class="pec_h_right">
           <div class="pec_h_r_btnArea">
           <div class="pec_h_r_btnArea">
-            <el-tooltip effect="light" content="刷新" placement="top">
+            <!-- <el-tooltip effect="light" content="刷新" placement="top">
               <div class="pec_h_r_btn_refresh" @click="refreshCourse">
               <div class="pec_h_r_btn_refresh" @click="refreshCourse">
                 <img src="../../assets/icon/newIcons/refresh.png" alt="" />
                 <img src="../../assets/icon/newIcons/refresh.png" alt="" />
                 <span>刷新</span>
                 <span>刷新</span>
               </div>
               </div>
-            </el-tooltip>
-
-            <div
-              @click.stop="back"
-              v-if="screenType!=2"
-            >
-              <img src="../../assets/icon/newIcon/return.png" alt="" />
-              <span style="color: #000">返回</span>
+            </el-tooltip> -->
+            <div class="pec_h_r_btn_afterClass" @click="afterClass">
+              <img src="../../assets/icon/newIcon/afterClass.svg" alt="" />
+              <span>下课</span>
             </div>
             </div>
           </div>
           </div>
         </div>
         </div>
@@ -57,6 +65,7 @@ export default {
       screenType: this.$route.query.screenType,
       screenType: this.$route.query.screenType,
       tcid2: this.$route.query.tcid,
       tcid2: this.$route.query.tcid,
       tcid:"",
       tcid:"",
+      className:"",
       showIframe: false,
       showIframe: false,
       iframeSrc: "",
       iframeSrc: "",
       courseDetail: {},
       courseDetail: {},
@@ -121,7 +130,13 @@ export default {
       this.showIframe = false;
       this.showIframe = false;
 
 
       this.$nextTick(() => {
       this.$nextTick(() => {
-        let _url = `https://ppt.cocorobo.cn/?mode=student&courseid=${this.id}&userid=${this.userid}&oid=${this.oid}&org=${this.org}&cid=${this.tcid}&type=${this.tType}`;
+        let api = ''
+        if(this.$region == 'beta'){
+          api = 'https://beta.ppt.cocorobo.cn'
+        }else {
+          api = 'https://ppt.cocorobo.cn'
+        }
+        let _url = api + `/?mode=student&courseid=${this.id}&userid=${this.userid}&oid=${this.oid}&org=${this.org}&cid=${this.tcid}&type=${this.tType}`;
 
 
         this.iframeSrc = _url;
         this.iframeSrc = _url;
 
 
@@ -143,6 +158,10 @@ export default {
       }
       }
       return commonElements;
       return commonElements;
     },
     },
+    async getClassName(){
+      let courseGrade = await this.ajax.get(this.$store.state.api + "getClassById", { id: this.tcid2 });
+      this.className = courseGrade.data[0][0].grade;
+    },
     back(){
     back(){
       if(this.tType!=2){
       if(this.tType!=2){
         this.goTo(
         this.goTo(
@@ -177,7 +196,10 @@ export default {
             this.screenType
             this.screenType
         )
         )
       }
       }
-    }
+    },
+    afterClass(){
+      this.$message.warning('下课功能暂未开放')
+    },
   },
   },
   destroyed(){
   destroyed(){
     if(this.courseDetail.userid == this.userid && this.tcid2 && this.org == '16ace517-b5c7-4168-a9bb-a9e0035df840'){
     if(this.courseDetail.userid == this.userid && this.tcid2 && this.org == '16ace517-b5c7-4168-a9bb-a9e0035df840'){
@@ -202,6 +224,7 @@ export default {
       hour12: false, 
       hour12: false, 
       timeZone: "Asia/Shanghai" 
       timeZone: "Asia/Shanghai" 
     }).replace(/\//g, "-")
     }).replace(/\//g, "-")
+    this.getClassName()
     this.getCourseDetail();
     this.getCourseDetail();
   }
   }
 };
 };
@@ -215,7 +238,6 @@ export default {
   flex-direction: column;
   flex-direction: column;
   overflow: hidden;
   overflow: hidden;
   box-sizing: border-box;
   box-sizing: border-box;
-  padding: 20px;
   background-color: #f2f2f2;
   background-color: #f2f2f2;
 }
 }
 
 
@@ -223,18 +245,20 @@ export default {
   width: 100%;
   width: 100%;
   height: 100%;
   height: 100%;
   background-color: #fff;
   background-color: #fff;
-  border-radius: 12px;
 }
 }
 
 
 .pec_header {
 .pec_header {
   width: 100%;
   width: 100%;
-  height: 80px;
-  border-radius: 12px 12px 0 0;
+  height: 50px;
+  background: #FCCF00;
   box-sizing: border-box;
   box-sizing: border-box;
-  border-bottom: solid 1px #cad1dc;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   justify-content: space-between;
   justify-content: space-between;
+  position: relative;
+  box-shadow: 0px 4px 12px 0px #3648601F;
+  padding: 0 10px;
+  box-sizing: border-box;
 }
 }
 
 
 .pec_h_left {
 .pec_h_left {
@@ -242,8 +266,22 @@ export default {
   height: 100%;
   height: 100%;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
-  justify-content: center;
-  margin-left: 20px;
+  gap: 25px;
+  /* 保持左侧靠左 */
+}
+
+.pec_h_center {
+  position: absolute;
+  left: 50%;
+  top: 0;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  transform: translateX(-50%);
+  z-index: 1;
+}
+
+.pec_h_l_title {
   font-weight: bold;
   font-weight: bold;
   font-size: 20px;
   font-size: 20px;
   color: #0e1e33;
   color: #0e1e33;
@@ -254,8 +292,6 @@ export default {
   height: 100%;
   height: 100%;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
-  justify-content: center;
-  margin-right: 20px;
 }
 }
 
 
 .pec_h_r_btnArea {
 .pec_h_r_btnArea {
@@ -274,7 +310,6 @@ export default {
   background-color: #f0f4fa;
   background-color: #f0f4fa;
   border-radius: 4px;
   border-radius: 4px;
   cursor: pointer;
   cursor: pointer;
-  margin-right: 10px;
   font-size: 14px;
   font-size: 14px;
   font-weight: 400;
   font-weight: 400;
   color: #000;
   color: #000;
@@ -293,18 +328,56 @@ export default {
   border-color: #0061ff;
   border-color: #0061ff;
 }
 }
 
 
-.pec_content {
+.pec_h_r_btnArea > .pec_h_r_btn_afterClass{
+  border-color:#F0E1DD;
+  background-color: #FFF7F5;
+  color: #F53F3F;
+}
+
+.backBtn {
+  width: 15px;
+  height: 15px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  cursor: pointer;
+}
+
+.backBtn img {
   width: 100%;
   width: 100%;
-  height: calc(100% - 80px);
-  border-radius: 0 0 12px 12px;
-  background-color: #fff;
+  height: 100%;
 }
 }
 
 
+.class-info-group {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+}
 
 
-.inviteBox {
-  font-size: 14px;
-  /* margin-top: 5px; */
-  color: #00000099;
+.class-label {
+  font-size: 18px;
+  font-weight: bold;
+  color: #222;
+  margin-right: 5px;
+}
+
+.class-value {
+  font-size: 16px;
+  color: #222;
+  background: #FFFFFF3D;
+  border: 1px solid #00000080;
+  border-radius: 5px;
+  padding: 5px 18px;
+  min-width: 60px;
   text-align: center;
   text-align: center;
+  display: inline-block;
+  box-sizing: border-box;
+}
+
+.pec_content {
+  width: 100%;
+  height: calc(100% - 80px);
+  border-radius: 0 0 12px 12px;
+  background-color: #fff;
 }
 }
 </style>
 </style>

+ 12 - 0
src/main.js

@@ -45,6 +45,18 @@ Vue.prototype.openLoading = function(target) {
 }
 }
 Vue.prototype.$qs = qs
 Vue.prototype.$qs = qs
 
 
+let region = 'cn'
+if (window.location.href.includes('beta') || window.location.href.includes('localhost')) {
+  region = 'beta'
+} else if (window.location.href.includes('cn')) {
+  region = 'cn'
+} else if (window.location.href.includes('hk')) {
+  region = 'hk'
+} else if (window.location.href.includes('com')) {
+  region = 'com'
+} 
+Vue.prototype.$region = region
+
 /* eslint-disable no-new */
 /* eslint-disable no-new */
 new Vue({
 new Vue({
     el: '#app',
     el: '#app',