lex 11 ماه پیش
والد
کامیت
ec2a0cf062
6فایلهای تغییر یافته به همراه596 افزوده شده و 629 حذف شده
  1. 10 35
      src/common/common.js
  2. 12 26
      src/common/util.js
  3. 249 241
      src/views/app/ClassDetail.vue
  4. 127 126
      src/views/teacher/CallNames.vue
  5. 194 198
      src/views/teacher/StartedDetail.vue
  6. 4 3
      vue.config.js

+ 10 - 35
src/common/common.js

@@ -15,15 +15,9 @@ export function getNowDateAndMonday(time) {
   //年
   let mondayY = mondayData.getFullYear();
   //月
-  let mondayM =
-    mondayData.getMonth() + 1 < 10
-      ? "0" + (mondayData.getMonth() + 1)
-      : mondayData.getMonth() + 1;
+  let mondayM = mondayData.getMonth() + 1 < 10 ? "0" + (mondayData.getMonth() + 1) : mondayData.getMonth() + 1;
   //日
-  let mondayD =
-    mondayData.getDate() < 10
-      ? "0" + mondayData.getDate()
-      : mondayData.getDate();
+  let mondayD = mondayData.getDate() < 10 ? "0" + mondayData.getDate() : mondayData.getDate();
 
   let str = mondayY + "-" + mondayM + "-" + mondayD;
   return str;
@@ -40,15 +34,9 @@ export function getNowDateAndSunday(time) {
   let SundayData = new Date(sundayTiem);
   //年
   let tomorrowY = SundayData.getFullYear(); //月
-  let tomorrowM =
-    SundayData.getMonth() + 1 < 10
-      ? "0" + (SundayData.getMonth() + 1)
-      : SundayData.getMonth() + 1;
+  let tomorrowM = SundayData.getMonth() + 1 < 10 ? "0" + (SundayData.getMonth() + 1) : SundayData.getMonth() + 1;
   //日
-  let tomorrowD =
-    SundayData.getDate() < 10
-      ? "0" + SundayData.getDate()
-      : SundayData.getDate();
+  let tomorrowD = SundayData.getDate() < 10 ? "0" + SundayData.getDate() : SundayData.getDate();
   let str = tomorrowY + "-" + tomorrowM + "-" + tomorrowD;
   return str;
 }
@@ -66,10 +54,7 @@ const browser = () => {
     // ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
     android: u.indexOf("DAYAAPPA") > -1 || u.indexOf("Adr") > -1, //android终端
     iPhone: u.indexOf("DAYAAPPI") > -1, //是否为iPhone或者QQHD浏览器
-    isApp:
-      u.indexOf("DAYAAPPI") > -1 ||
-      u.indexOf("DAYAAPPA") > -1 ||
-      u.indexOf("Adr") > -1,
+    isApp: u.indexOf("DAYAAPPI") > -1 || u.indexOf("DAYAAPPA") > -1 || u.indexOf("Adr") > -1,
     iPad: u.indexOf("iPad") > -1, //是否iPad
     webApp: u.indexOf("Safari") == -1, //是否web应该程序,没有头部与底部
     weixin: u.indexOf("MicroMessenger") > -1, //是否微信 (2015-01-22新增)
@@ -187,16 +172,16 @@ const validStudentUrl = () => {
   let returnUrl = "";
   if (/test/.test(url)) {
     // test环境
-    returnUrl = "http://mstutest.dayaedu.com";
+    returnUrl = "https://test.gym.lexiaoya.cn/mdaya";
   } else if (/dev/.test(url)) {
     // dev 环境
-    returnUrl = "http://mstudev.dayaedu.com";
+    returnUrl = "https://dev.gym.lexiaoya.cn/mdaya";
   } else if (/online/.test(url)) {
     //线上
-    returnUrl = "https://mstuonline.dayaedu.com";
+    returnUrl = "https://gym.lexiaoya.cn/mdaya";
   } else {
     // 默认test环境
-    returnUrl = "http://mstutest.dayaedu.com";
+    returnUrl = "https://test.gym.lexiaoya.cn/mdaya";
   }
   return returnUrl;
 };
@@ -224,14 +209,4 @@ const changeTwoDecimal = (amt) => {
   return s_x;
 };
 
-export {
-  browser,
-  calcMinute,
-  getSTD,
-  getYMD,
-  getDateList,
-  _debounce,
-  _throttle,
-  validStudentUrl,
-  changeTwoDecimal,
-};
+export { browser, calcMinute, getSTD, getYMD, getDateList, _debounce, _throttle, validStudentUrl, changeTwoDecimal };

+ 12 - 26
src/common/util.js

@@ -75,10 +75,7 @@ export function browser() {
     // ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
     android: u.indexOf("DAYAAPPA") > -1 || u.indexOf("Adr") > -1, //android终端
     iPhone: u.indexOf("DAYAAPPI") > -1, //是否为iPhone或者QQHD浏览器
-    isApp:
-      u.indexOf("DAYAAPPI") > -1 ||
-      u.indexOf("DAYAAPPA") > -1 ||
-      u.indexOf("Adr") > -1,
+    isApp: u.indexOf("DAYAAPPI") > -1 || u.indexOf("DAYAAPPA") > -1 || u.indexOf("Adr") > -1,
     iPad: u.indexOf("iPad") > -1, //是否iPad
     webApp: u.indexOf("Safari") == -1, //是否web应该程序,没有头部与底部
     weixin: u.indexOf("MicroMessenger") > -1, //是否微信 (2015-01-22新增)
@@ -105,8 +102,7 @@ export function utilDate(date, type) {
   }
   let d = new Date(date);
   let year = d.getFullYear() >= 10 ? d.getFullYear() : "0" + d.getFullYear();
-  let month =
-    d.getMonth() + 1 >= 10 ? d.getMonth() + 1 : "0" + (d.getMonth() + 1);
+  let month = d.getMonth() + 1 >= 10 ? d.getMonth() + 1 : "0" + (d.getMonth() + 1);
   let day = d.getDate() >= 10 ? d.getDate() : "0" + d.getDate();
 
   if (type == "ios") {
@@ -144,15 +140,7 @@ export function getYMD(time, noIos) {
  * @param {周几的索引值} index
  */
 export function getWeekString(index) {
-  let weekText = [
-    "星期日",
-    "星期一",
-    "星期二",
-    "星期三",
-    "星期四",
-    "星期五",
-    "星期六",
-  ];
+  let weekText = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
   return weekText[index];
 }
 
@@ -174,16 +162,16 @@ export function validStudentUrl() {
   let returnUrl = "";
   if (/test/.test(url)) {
     // test环境
-    returnUrl = "http://mstutest.dayaedu.com";
+    returnUrl = "https://test.gym.lexiaoya.cn/mdaya";
   } else if (/dev/.test(url)) {
     // dev 环境
-    returnUrl = "http://mstudev.dayaedu.com";
+    returnUrl = "https://dev.gym.lexiaoya.cn/mdaya";
   } else if (/online/.test(url)) {
     //线上
-    returnUrl = "https://mstuonline.dayaedu.com";
+    returnUrl = "https://gym.lexiaoya.cn/mdaya";
   } else {
     // 默认test环境
-    returnUrl = "http://mstutest.dayaedu.com";
+    returnUrl = "https://test.gym.lexiaoya.cn/mdaya";
   }
   return returnUrl;
 }
@@ -194,16 +182,16 @@ export function validTeacherUrl() {
   let returnUrl = "";
   if (/test/.test(url)) {
     // test环境
-    returnUrl = "http://mteatest.dayaedu.com";
+    returnUrl = "https://test.gym.lexiaoya.cn/mteacher";
   } else if (/dev/.test(url)) {
     // dev 环境
-    returnUrl = "http://mteadev.dayaedu.com";
+    returnUrl = "https://dev.gym.lexiaoya.cn/mteacher";
   } else if (/online/.test(url)) {
     //线上
-    returnUrl = "https://mteaonline.dayaedu.com";
+    returnUrl = "https://gym.lexiaoya.cn/mteacher";
   } else {
     // 默认test环境
-    returnUrl = "http://mteatest.dayaedu.com";
+    returnUrl = "https://test.gym.lexiaoya.cn/mteacher";
   }
   return returnUrl;
 }
@@ -277,9 +265,7 @@ export function addTimerFormMinute(classDate, startTime, time) {
 }
 
 export function diffTimerFormMinute(classDate, startTime, endTime) {
-  return Math.abs(
-    dayjs(classDate + " " + startTime).diff(classDate + " " + endTime, "Minute")
-  );
+  return Math.abs(dayjs(classDate + " " + startTime).diff(classDate + " " + endTime, "Minute"));
 }
 
 export function timerFormMinute(classDate, startTime, time) {

+ 249 - 241
src/views/app/ClassDetail.vue

@@ -1,280 +1,288 @@
 <template>
-    <div class="classdetail">
-        <MHeader :isBack="false" />
-        
-        <div class="header van-hairline--bottom">
-            <h3>{{ dataInfo.groupName }}</h3>
-            <p>{{ dataInfo.courseStartDate | getMonthDay }}—{{ dataInfo.courseEndDate | getMonthDay }}</p>
-        </div>
+  <div class="classdetail">
+    <MHeader :isBack="false" />
 
-        <div class="teahcerInfo van-hairline--bottom">
-            <div class="logo">
-                <img v-if="dataInfo.avatar" :src="dataInfo.avatar" alt="">
-                <img v-else src="../../assets/images/app/icon_teacher.png" alt="">
-            </div>
-            <div class="info">
-                <!-- -{{ dataInfo.subjectNames }} -->
-                <p class="name van-ellipsis">{{ dataInfo.teacherName }}</p>
-                <p class="memo van-multi-ellipsis--l2">简介:{{ dataInfo.introduction }}</p>
-                <p class="times">授课次数:{{ dataInfo.lectureNum ? dataInfo.lectureNum : 0 }}次</p>
-            </div>
-        </div>
+    <div class="header van-hairline--bottom">
+      <h3>{{ dataInfo.groupName }}</h3>
+      <p>{{ dataInfo.courseStartDate | getMonthDay }}—{{ dataInfo.courseEndDate | getMonthDay }}</p>
+    </div>
 
-        <div class="classdetails">
-            <h3>课时安排</h3>
-            <!-- 线下课{{ dataInfo.offlineClassesTimes }}次+线上课{{ dataInfo.onlineClassesTimes }}次 -->
-            <p class="detail"><i class="books"></i><span>总计:{{ dataInfo.totalClassesTimes }}节</span></p>
+    <div class="teahcerInfo van-hairline--bottom">
+      <div class="logo">
+        <img v-if="dataInfo.avatar" :src="dataInfo.avatar" alt="" />
+        <img v-else src="../../assets/images/app/icon_teacher.png" alt="" />
+      </div>
+      <div class="info">
+        <!-- -{{ dataInfo.subjectNames }} -->
+        <p class="name van-ellipsis">{{ dataInfo.teacherName }}</p>
+        <p class="memo van-multi-ellipsis--l2">简介:{{ dataInfo.introduction }}</p>
+        <p class="times">授课次数:{{ dataInfo.lectureNum ? dataInfo.lectureNum : 0 }}次</p>
+      </div>
+    </div>
 
-            <div class="detaillist">
-                <div class="detailitem" v-for="(item, index) in courseList" :key="index">
-                    <span class="time">第{{ ++index }}节</span>
-                    <i class="icon_prossess"></i>
-                    <span class="content">{{ item.classDate | getMonthDay}} {{ item.startClassTime | getHourMinute }}-{{ item.endClassTime | getHourMinute }} {{ item.status == 'FINISH' ? '(已结束)' : '' }}</span>
-                </div>
-            </div>
-        </div>
+    <div class="classdetails">
+      <h3>课时安排</h3>
+      <!-- 线下课{{ dataInfo.offlineClassesTimes }}次+线上课{{ dataInfo.onlineClassesTimes }}次 -->
+      <p class="detail">
+        <i class="books"></i><span>总计:{{ dataInfo.totalClassesTimes }}节</span>
+      </p>
 
-        <div class="pay_btn" @click="onJoin">确认加入</div>
+      <div class="detaillist">
+        <div class="detailitem" v-for="(item, index) in courseList" :key="index">
+          <span class="time">第{{ ++index }}节</span>
+          <i class="icon_prossess"></i>
+          <span class="content">{{ item.classDate | getMonthDay }} {{ item.startClassTime | getHourMinute }}-{{ item.endClassTime | getHourMinute }} {{ item.status == "FINISH" ? "(已结束)" : "" }}</span>
+        </div>
+      </div>
     </div>
+
+    <div class="pay_btn" @click="onJoin">确认加入</div>
+  </div>
 </template>
 <script>
-import MHeader from '@/components/MHeader'
-import { browser, getSTD } from '@/common/common'
-import { getGroupDetail, buyCourseGroup } from '@/api/app'
+import MHeader from "@/components/MHeader";
+import { browser, getSTD } from "@/common/common";
+import { getGroupDetail, buyCourseGroup } from "@/api/app";
 export default {
-    name: 'classdetail',
-    components: { MHeader },
-    data () {
-        return {
-            dataInfo: {},
-            courseList: []
-        }
-    },
-    mounted() {
-        let params = this.$route.query
-        if(params.Authorization) {
-            localStorage.setItem('Authorization', decodeURI(params.Authorization))
-            localStorage.setItem('userInfo', decodeURI(params.Authorization))
-        }
-        // 判断是否在app里面
-        if(!browser().android && !browser().iPhone) {
-            this.headerStatus = true
+  name: "classdetail",
+  components: { MHeader },
+  data() {
+    return {
+      dataInfo: {},
+      courseList: [],
+    };
+  },
+  mounted() {
+    let params = this.$route.query;
+    if (params.Authorization) {
+      localStorage.setItem("Authorization", decodeURI(params.Authorization));
+      localStorage.setItem("userInfo", decodeURI(params.Authorization));
+    }
+    // 判断是否在app里面
+    if (!browser().android && !browser().iPhone) {
+      this.headerStatus = true;
+    } else {
+      document.title = "课堂详情";
+    }
+
+    this.__init();
+  },
+  methods: {
+    __init() {
+      let params = this.$route.query;
+      this.$toast.loading({
+        duration: 0,
+        message: "加载中...",
+        forbidClick: true,
+        loadingType: "spinner",
+      });
+      getGroupDetail({ groupId: params.groupId }).then((res) => {
+        let result = res.data;
+        this.$toast.clear();
+        if (result.code == 200) {
+          if (result.data) {
+            this.dataInfo = result.data;
+            this.courseList = result.data.courseSchedules;
+          }
+        } else if (result.code == 403) {
+          this.$router.push({
+            path: "/appLogin",
+            query: {
+              groupId: params.groupId,
+            },
+          });
         } else {
-            document.title = '课堂详情'
+          this.$toast(result.msg);
         }
-
-        this.__init()
+      });
     },
-    methods: {
-        __init() {
-            let params = this.$route.query
-            this.$toast.loading({
-                duration: 0,
-                message: '加载中...',
-                forbidClick: true,
-                loadingType: 'spinner'
-            })
-            getGroupDetail({ groupId: params.groupId }).then(res => {
-                let result = res.data
-                this.$toast.clear()
-                if(result.code == 200) {
-                    if(result.data) {
-                        this.dataInfo = result.data
-                        this.courseList = result.data.courseSchedules
-                    }
-                } else if(result.code == 403) {
-                    this.$router.push({
-                        path: '/appLogin',
-                        query: {
-                            groupId: params.groupId
-                        }
-                    })
-                } else {
-                    this.$toast(result.msg)
-                }
-            })
-        },
-        onJoin() {
-            let params = this.$route.query
-            this.$dialog.confirm({
-                message: '确定加入课程?'
-            }).then(() => {
-                this.$toast.loading({
-                    duration: 0,
-                    message: '加载中...',
-                    forbidClick: true,
-                    loadingType: 'spinner'
+    onJoin() {
+      let params = this.$route.query;
+      this.$dialog
+        .confirm({
+          message: "确定加入课程?",
+        })
+        .then(() => {
+          this.$toast.loading({
+            duration: 0,
+            message: "加载中...",
+            forbidClick: true,
+            loadingType: "spinner",
+          });
+          buyCourseGroup({ courseGroupId: params.groupId }).then((res) => {
+            let result = res.data;
+            this.$toast.clear();
+            if (result.code == 200) {
+              this.$dialog
+                .alert({
+                  message: "恭喜您已完成课程报名,<br />请关注课程时间,准时上课。",
                 })
-                buyCourseGroup({ courseGroupId: params.groupId }).then(res => {
-                    let result = res.data
-                    this.$toast.clear()
-                    if(result.code == 200) {
-                        this.$dialog.alert({
-                            message: '恭喜您已完成课程报名,<br />请关注课程时间,准时上课。'
-                        }).then(() => {
-                            // this.$router.push('/studentDownLoad')
-                            // window.location.href = 'https://mstuonline.dayaedu.com/#/studentDownload'
-                            if(this.checkUrl()) {
-                                window.location.href = 'https://mstuonline.dayaedu.com/#/transfer'
-                            } else {
-                                window.location.href = 'http://mstudev.dayaedu.com/#/transfer'
-                            }
-                        });
-                    } else if(result.code == 302) {
-                        this.onSubmitStatus = true
-                        this.$dialog.alert({
-                            title: '课程冲突',
-                            message: result.msg,
-                            messageAlign: 'left'
-                        }).then(() => {
-                        // on close
-                        });
-                    } else {
-                        this.$toast(result.msg)
-                    }
+                .then(() => {
+                  // this.$router.push('/studentDownLoad')
+                  if (this.checkUrl()) {
+                    window.location.href = "https://gym.lexiaoya.cn/mdaya/#/transfer";
+                  } else {
+                    window.location.href = "https://test.gym.lexiaoya.cn/mdaya/#/transfer";
+                  }
+                });
+            } else if (result.code == 302) {
+              this.onSubmitStatus = true;
+              this.$dialog
+                .alert({
+                  title: "课程冲突",
+                  message: result.msg,
+                  messageAlign: "left",
                 })
-            }).catch(() => {
-            // on cancel
-            });
-        },
-        checkUrl() {
-            let url = window.location.href
-            if(/mteaonline/ig.test(url)) {
-                return true
+                .then(() => {
+                  // on close
+                });
             } else {
-                return false
+              this.$toast(result.msg);
             }
-        }
+          });
+        })
+        .catch(() => {
+          // on cancel
+        });
     },
-    filters: {
-        getMonthDay(time) {
-            let tempDate = time || new Date()
-            if(typeof(tempDate) == 'string') {
-                tempDate = new Date(time.replace(/-/ig, '/'))
-            }
-            let month = getSTD(tempDate.getMonth() + 1)
-            let day = getSTD(tempDate.getDate())
-            return month + '月' + day + '日'
-        },
-        getHourMinute(time) {
-            let tempDate = time || new Date()
-            if(typeof(tempDate) == 'string') {
-                tempDate = new Date(time.replace(/-/ig, '/'))
-            }
-            let hour = getSTD(tempDate.getHours())
-            let minute = getSTD(tempDate.getMinutes())
-            return hour + ':' + minute
-        }
-    }
-}
+    checkUrl() {
+      let url = window.location.href;
+      if (/mteaonline/gi.test(url)) {
+        return true;
+      } else {
+        return false;
+      }
+    },
+  },
+  filters: {
+    getMonthDay(time) {
+      let tempDate = time || new Date();
+      if (typeof tempDate == "string") {
+        tempDate = new Date(time.replace(/-/gi, "/"));
+      }
+      let month = getSTD(tempDate.getMonth() + 1);
+      let day = getSTD(tempDate.getDate());
+      return month + "月" + day + "日";
+    },
+    getHourMinute(time) {
+      let tempDate = time || new Date();
+      if (typeof tempDate == "string") {
+        tempDate = new Date(time.replace(/-/gi, "/"));
+      }
+      let hour = getSTD(tempDate.getHours());
+      let minute = getSTD(tempDate.getMinutes());
+      return hour + ":" + minute;
+    },
+  },
+};
 </script>
 <style lang="less" scoped>
 @import url("../../assets/commonLess/variable.less");
 .classdetail {
-    position: relative;
-    background-color: #fff;
-    min-height: 100vh;
+  position: relative;
+  background-color: #fff;
+  min-height: 100vh;
 }
 
 .header {
-    padding: .2rem .16rem .15rem;
-    font-size: .14rem;
+  padding: 0.2rem 0.16rem 0.15rem;
+  font-size: 0.14rem;
+  color: #444444;
+  h3 {
+    font-size: 0.18rem;
     color: #444444;
-    h3 {
-        font-size: .18rem;
-        color: #444444;
-        padding-bottom: .05rem;
-    }
+    padding-bottom: 0.05rem;
+  }
 }
 .teahcerInfo {
-    padding: .16rem;
-    display: flex;
-    align-items: center;
-    p {
-        line-height: 1.2;
-    }
-    .logo {
-        width: .72rem;
-        height: .72rem;
-        margin-right: .16rem;
-        img {
-            border-radius: .04rem;
-            width: .72rem;
-            height: .72rem;
-        }
-    }
-    .info {
-        font-size: .12rem;
-        color: #777777;
-    }
-    .name {
-        display: flex;
-        justify-content: space-between;
-        font-size: .14rem;
-        color: #444444;
-    }
-    .memo {
-        padding: .05rem 0;
-    }
-    .times {
-        // color: #F97215;
+  padding: 0.16rem;
+  display: flex;
+  align-items: center;
+  p {
+    line-height: 1.2;
+  }
+  .logo {
+    width: 0.72rem;
+    height: 0.72rem;
+    margin-right: 0.16rem;
+    img {
+      border-radius: 0.04rem;
+      width: 0.72rem;
+      height: 0.72rem;
     }
+  }
+  .info {
+    font-size: 0.12rem;
+    color: #777777;
+  }
+  .name {
+    display: flex;
+    justify-content: space-between;
+    font-size: 0.14rem;
+    color: #444444;
+  }
+  .memo {
+    padding: 0.05rem 0;
+  }
+  .times {
+    // color: #F97215;
+  }
 }
 .classdetails {
-    padding: .13rem .16rem;
-    font-size: .14rem;
+  padding: 0.13rem 0.16rem;
+  font-size: 0.14rem;
+  color: #444444;
+  h3 {
+    font-size: 0.18rem;
     color: #444444;
-    h3 {
-        font-size: .18rem;
-        color: #444444;
-        padding-bottom: .05rem;
-    }
-    .books {
-        display: inline-block;
-        margin-right: .05rem;
-        width: .11rem;
-        height: .11rem;
-        background: url('../../assets/images/app/icon_b.png') no-repeat center center;
-        background-size: contain;
-    }
+    padding-bottom: 0.05rem;
+  }
+  .books {
+    display: inline-block;
+    margin-right: 0.05rem;
+    width: 0.11rem;
+    height: 0.11rem;
+    background: url("../../assets/images/app/icon_b.png") no-repeat center center;
+    background-size: contain;
+  }
 
-    .detaillist {
-        margin-top: .12rem;
-        margin-left: .75rem;
-        border-left: 1px solid #B6D3BD;
-    }
-    .detailitem {
-        line-height: 1;
-        padding-bottom: 0.1rem;
-        display: flex;
-        align-items: center;
-        margin-left: -.61rem;
-        .time {
-            width: .45rem;
-        }
-        &:last-child {
-            padding-bottom: 0;
-        }
+  .detaillist {
+    margin-top: 0.12rem;
+    margin-left: 0.75rem;
+    border-left: 1px solid #b6d3bd;
+  }
+  .detailitem {
+    line-height: 1;
+    padding-bottom: 0.1rem;
+    display: flex;
+    align-items: center;
+    margin-left: -0.61rem;
+    .time {
+      width: 0.45rem;
     }
-    .icon_prossess {
-        display: inline-block;
-        width: .16rem;
-        height: .16rem;
-        background: url('../../assets/images/app/icon_step.png') no-repeat center center;
-        background-size: contain;
-        margin: 0 .15rem 0 .08rem;
+    &:last-child {
+      padding-bottom: 0;
     }
+  }
+  .icon_prossess {
+    display: inline-block;
+    width: 0.16rem;
+    height: 0.16rem;
+    background: url("../../assets/images/app/icon_step.png") no-repeat center center;
+    background-size: contain;
+    margin: 0 0.15rem 0 0.08rem;
+  }
 }
 .pay_btn {
-    margin: .25rem .3rem .2rem;
-    background: @mColor;
-    line-height: .45rem;
-    color: #fff;
-    font-size: .18rem;
-    border-radius:.5rem;
-    text-align: center;
+  margin: 0.25rem 0.3rem 0.2rem;
+  background: @mColor;
+  line-height: 0.45rem;
+  color: #fff;
+  font-size: 0.18rem;
+  border-radius: 0.5rem;
+  text-align: center;
 }
 .van-hairline--bottom::after {
-    color: #414141;
+  color: #414141;
 }
-</style>
+</style>

+ 127 - 126
src/views/teacher/CallNames.vue

@@ -1,159 +1,160 @@
 <template>
-    <div class="callnames">
-        <m-header />
+  <div class="callnames">
+    <m-header />
 
-        <van-cell class="title" title-class="title-content">
-            <template slot="default">孙老师</template>
-            <template slot="title">武汉小学乐团·长笛基础课</template>
-            <template slot="label">
-                <p class="time">09月12日(星期一)  13:00-13:45</p>
-                <p class="address">
-                    <van-icon name="location" />
-                    湖北省武汉市红领巾小学
-                </p>
-            </template>
-        </van-cell>
+    <van-cell class="title" title-class="title-content">
+      <template slot="default">孙老师</template>
+      <template slot="title">武汉小学乐团·长笛基础课</template>
+      <template slot="label">
+        <p class="time">09月12日(星期一) 13:00-13:45</p>
+        <p class="address">
+          <van-icon name="location" />
+          湖北省武汉市红领巾小学
+        </p>
+      </template>
+    </van-cell>
 
-        <div class="name-info">
-            <span>共有:30</span>
-            <span>实有:30</span>
-            <span>请假:30</span>
-        </div>
+    <div class="name-info">
+      <span>共有:30</span>
+      <span>实有:30</span>
+      <span>请假:30</span>
+    </div>
 
-        <div class="section">
-            <van-cell-group v-for="i in 6" :key="i">
-                <van-cell class="btn-group" :center="true" :border="false">
-                    <template slot="icon">
-                        <img class="logo" src="http://dev.dayaedu.com/img/teacher1.91bf990d.png" alt="">
-                    </template>
-                    <template slot="title">阿曼湾</template>
-                    <template slot="label"><span>长笛</span><span>合奏课1班</span></template>
-                </van-cell>
-                <van-cell class="btn-group">
-                    <van-button round type="danger">请假</van-button>
-                    <van-button round type="primary">未到</van-button>
-                    <van-button round type="info">到课</van-button>
-                </van-cell>
-            </van-cell-group>
-        </div>
+    <div class="section">
+      <van-cell-group v-for="i in 6" :key="i">
+        <van-cell class="btn-group" :center="true" :border="false">
+          <template slot="icon">
+            <!-- <img class="logo" src="http://dev.dayaedu.com/img/teacher1.91bf990d.png" alt=""> -->
+          </template>
+          <template slot="title">阿曼湾</template>
+          <template slot="label"><span>长笛</span><span>合奏课1班</span></template>
+        </van-cell>
+        <van-cell class="btn-group">
+          <van-button round type="danger">请假</van-button>
+          <van-button round type="primary">未到</van-button>
+          <van-button round type="info">到课</van-button>
+        </van-cell>
+      </van-cell-group>
+    </div>
 
-        <div class="button-group">
-            <van-button type="default">全到</van-button>
-            <van-button type="primary">点名完成</van-button>
-        </div>
+    <div class="button-group">
+      <van-button type="default">全到</van-button>
+      <van-button type="primary">点名完成</van-button>
     </div>
+  </div>
 </template>
 <script>
-import MHeader from '@/components/MHeader'
+import MHeader from "@/components/MHeader";
 export default {
-    name: 'callnames',
-    components: { MHeader }
-}
+  name: "callnames",
+  components: { MHeader },
+};
 </script>
-<style lang='less' scoped>
+<style lang="less" scoped>
 @import url("../../assets/commonLess/variable.less");
-.title { 
-    padding: .16rem;
+.title {
+  padding: 0.16rem;
 }
 .title-content {
-    font-size: .18rem !important;
-    font-weight: bold;
-    .van-cell__label {
-        font-weight: 400;
-        color: @mFontColor;
-        margin-top: .06rem;
-        .time {
-            font-size: .16rem;
-        }
-        .address {
-            padding-top: .03rem;
-            font-size: .14rem;
-            display: flex;
-            align-items: center;
-        }
+  font-size: 0.18rem !important;
+  font-weight: bold;
+  .van-cell__label {
+    font-weight: 400;
+    color: @mFontColor;
+    margin-top: 0.06rem;
+    .time {
+      font-size: 0.16rem;
     }
-    .van-icon-location {
-        margin-right: .03rem;
-        color: @mColor;
+    .address {
+      padding-top: 0.03rem;
+      font-size: 0.14rem;
+      display: flex;
+      align-items: center;
     }
+  }
+  .van-icon-location {
+    margin-right: 0.03rem;
+    color: @mColor;
+  }
 }
 /deep/.van-cell__title {
-    font-size: .14rem;
-    color: @mFontColor;
-    flex: 1 auto;
+  font-size: 0.14rem;
+  color: @mFontColor;
+  flex: 1 auto;
 }
-/deep/.van-cell__value, /deep/.van-cell__label {
-    color: @sFontColor;
+/deep/.van-cell__value,
+/deep/.van-cell__label {
+  color: @sFontColor;
 }
 /deep/.van-cell__label {
-    margin-top: 0;
-    span {
-        padding-right: .1rem;
-    }
+  margin-top: 0;
+  span {
+    padding-right: 0.1rem;
+  }
 }
 .name-info {
-    color: @mFontColor;
-    padding: .09rem .16rem;
-    span {
-        padding-right: .15rem;
-    }
+  color: @mFontColor;
+  padding: 0.09rem 0.16rem;
+  span {
+    padding-right: 0.15rem;
+  }
 }
 .logo {
-    width: .35rem;
-    height: .35rem;
-    margin-right: .12rem;
+  width: 0.35rem;
+  height: 0.35rem;
+  margin-right: 0.12rem;
 }
 .btn-group {
-    &:first-child {
-        padding-bottom: .12rem;
-    }
+  &:first-child {
+    padding-bottom: 0.12rem;
+  }
+  &:last-child {
+    padding-top: 0;
+    padding-left: 0.63rem;
+  }
+  .van-button {
+    padding: 0.04rem 0.24rem;
+    height: auto;
+    line-height: 1.5;
+    font-size: 0.16rem;
+    margin-right: 0.16rem;
     &:last-child {
-        padding-top: 0;
-        padding-left: .63rem;
-    }
-    .van-button {
-        padding: .04rem .24rem;
-        height: auto;
-        line-height: 1.5;
-        font-size: .16rem;
-        margin-right: .16rem;
-        &:last-child {
-            margin-right: 0;
-        }
-    }
-    .van-button--danger {
-        background-color: @redColor;
-        border: 1px solid @redColor;
-    }
-    .van-button--primary {
-        background-color: #FFC10D;
-        border: 1px solid #FFC10D;
+      margin-right: 0;
     }
+  }
+  .van-button--danger {
+    background-color: @redColor;
+    border: 1px solid @redColor;
+  }
+  .van-button--primary {
+    background-color: #ffc10d;
+    border: 1px solid #ffc10d;
+  }
 }
-.section{
-    margin-bottom: .82rem;
+.section {
+  margin-bottom: 0.82rem;
 }
 
 .button-group {
-    position: fixed;
-    bottom: 0;
-    left: 0;
-    z-index: 99;
-    width: 100%;
-    box-shadow:0 .02rem .07rem 0 rgba(0,0,0,0.16);
-    display: flex;
-    .van-button {   
-        flex: 1;
-        height: .52rem;
-        line-height: .5rem;
-        font-size: .16rem;
-    }
-    .van-button--default {
-        color: @mFontColor;
-    }
-    .van-button--primary {
-        background: @mColor;
-        border-color: @mColor;
-    }
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  z-index: 99;
+  width: 100%;
+  box-shadow: 0 0.02rem 0.07rem 0 rgba(0, 0, 0, 0.16);
+  display: flex;
+  .van-button {
+    flex: 1;
+    height: 0.52rem;
+    line-height: 0.5rem;
+    font-size: 0.16rem;
+  }
+  .van-button--default {
+    color: @mFontColor;
+  }
+  .van-button--primary {
+    background: @mColor;
+    border-color: @mColor;
+  }
 }
-</style>
+</style>

+ 194 - 198
src/views/teacher/StartedDetail.vue

@@ -1,227 +1,223 @@
 <template>
-    <div class="starteddetail">
-        <m-header />
+  <div class="starteddetail">
+    <m-header />
 
-        <van-cell :center="true">
-            <template slot="icon">
-                <img class="logo" src="http://dev.dayaedu.com/img/teacher1.91bf990d.png" alt="">
-            </template>
-            <template slot="default">连续旷到2次</template>
-            <template slot="title">阿曼湾</template>
-            <template slot="label">审批通过</template>
-        </van-cell>
-        <div class="started-info">
-            <p>审批事项:合班</p>
-            <p>开始时间:2019-09-01  9:00</p>
-            <p>结束时间:2019-09-01  18:00</p>
-            <p>备注:01班人数较少,01班人数较少01班人数较少
-            01班人数较少01班人数较少01班人数较少01班人数
-            01班人数较少01班人数较少01班人数较少较少</p>
-        </div>
+    <van-cell :center="true">
+      <template slot="icon">
+        <!-- <img class="logo" src="http://dev.dayaedu.com/img/teacher1.91bf990d.png" alt=""> -->
+      </template>
+      <template slot="default">连续旷到2次</template>
+      <template slot="title">阿曼湾</template>
+      <template slot="label">审批通过</template>
+    </van-cell>
+    <div class="started-info">
+      <p>审批事项:合班</p>
+      <p>开始时间:2019-09-01 9:00</p>
+      <p>结束时间:2019-09-01 18:00</p>
+      <p>备注:01班人数较少,01班人数较少01班人数较少 01班人数较少01班人数较少01班人数较少01班人数 01班人数较少01班人数较少01班人数较少较少</p>
+    </div>
 
-        <div class="section">
-            <div class="node success">
-                <div class="message">
-                    <p class="name">我</p>
-                    <p class="content">我发起的</p>
-                </div>
-                <van-icon name="checked" />
-                <div class="step-line"></div>
-            </div>
-            <div class="node success">
-                <div class="message ">
-                    <p class="name">我</p>
-                    <p class="content">我发起的</p>
-                </div>
-                <van-icon name="checked" />
-                <div class="step-line"></div>
-            </div>
-            <div class="node underway">
-                <div class="message ">
-                    <p class="name">主管</p>
-                    <p class="content">审批中</p>
-                </div>
-                <van-icon name="underway" />
-                <div class="step-line"></div>
-            </div>
-            <div class="node empty">
-                <div class="message ">
-                    <p class="name">总经理</p>
-                    <p class="content"></p>
-                </div>
-                <van-icon />
-                <div class="step-line"></div>
-            </div>
-            <div class="node error">
-                <div class="message ">
-                    <p class="name">总经理</p>
-                    <p class="content">已拒绝(原因:理由不充分)</p>
-                </div>
-                <van-icon name="clear" />
-                <div class="step-line"></div>
-            </div>
+    <div class="section">
+      <div class="node success">
+        <div class="message">
+          <p class="name">我</p>
+          <p class="content">我发起的</p>
         </div>
-
-        <div class="button-group">
-            <!-- <van-button type="default">编辑内容</van-button> -->
-            <van-button type="primary">取消审批</van-button>
+        <van-icon name="checked" />
+        <div class="step-line"></div>
+      </div>
+      <div class="node success">
+        <div class="message">
+          <p class="name">我</p>
+          <p class="content">我发起的</p>
+        </div>
+        <van-icon name="checked" />
+        <div class="step-line"></div>
+      </div>
+      <div class="node underway">
+        <div class="message">
+          <p class="name">主管</p>
+          <p class="content">审批中</p>
+        </div>
+        <van-icon name="underway" />
+        <div class="step-line"></div>
+      </div>
+      <div class="node empty">
+        <div class="message">
+          <p class="name">总经理</p>
+          <p class="content"></p>
         </div>
+        <van-icon />
+        <div class="step-line"></div>
+      </div>
+      <div class="node error">
+        <div class="message">
+          <p class="name">总经理</p>
+          <p class="content">已拒绝(原因:理由不充分)</p>
+        </div>
+        <van-icon name="clear" />
+        <div class="step-line"></div>
+      </div>
+    </div>
+
+    <div class="button-group">
+      <!-- <van-button type="default">编辑内容</van-button> -->
+      <van-button type="primary">取消审批</van-button>
     </div>
+  </div>
 </template>
 <script>
-import MHeader from '@/components/MHeader'
+import MHeader from "@/components/MHeader";
 export default {
-    name: 'starteddetail',
-    components: { MHeader }
-}
+  name: "starteddetail",
+  components: { MHeader },
+};
 </script>
-<style lang='less' scoped>
+<style lang="less" scoped>
 @import url("../../assets/commonLess/variable.less");
-/deep/.van-cell__value, /deep/.van-cell__label {
-    color: @tFontColor;
-    span {
-        padding-right: .1rem;
-    }
+/deep/.van-cell__value,
+/deep/.van-cell__label {
+  color: @tFontColor;
+  span {
+    padding-right: 0.1rem;
+  }
 }
 /deep/.van-cell {
-    padding: .16rem;
+  padding: 0.16rem;
 }
 .logo {
-    width: .40rem;
-    height: .40rem;
-    margin-right: .12rem;
+  width: 0.4rem;
+  height: 0.4rem;
+  margin-right: 0.12rem;
 }
 .started-info {
-    background: @whiteColor;
-    font-size: .14rem;
-    padding: .12rem .16rem .25rem;
-    line-height: .22rem;
+  background: @whiteColor;
+  font-size: 0.14rem;
+  padding: 0.12rem 0.16rem 0.25rem;
+  line-height: 0.22rem;
 }
 .section {
+  position: relative;
+  overflow: hidden;
+  padding-left: 0.8rem;
+  padding-bottom: 0.92rem;
+  .node {
     position: relative;
-    overflow: hidden;
-    padding-left: .8rem;
-    padding-bottom: .92rem;
-    .node {
-        position: relative;
-        margin-top: .2rem;
-        margin-right: .26rem;
-        &::before {
-            position: absolute;
-            top: -.2rem;
-            left: -.25rem;
-            z-index: 1;
-            width: .02rem;
-            height: .3rem;
-            background-color: #d8d8d8;
-            content: '';
-        }
-        &:last-child {
-            .step-line {
-                height: 0;
-            }
-        }
+    margin-top: 0.2rem;
+    margin-right: 0.26rem;
+    &::before {
+      position: absolute;
+      top: -0.2rem;
+      left: -0.25rem;
+      z-index: 1;
+      width: 0.02rem;
+      height: 0.3rem;
+      background-color: #d8d8d8;
+      content: "";
+    }
+    &:last-child {
+      .step-line {
+        height: 0;
+      }
+    }
 
-        &.success {
-            .content {
-                color: #62A070;
-            }
-            .van-icon {
-                color: #62A070;
-            }
-        }
-        &.error {
-            .content {
-                color: @sFontColor;
-            }
-            .van-icon {
-                color: #F85043;
-            }
-        }
-        &.underway {
-            .content {
-                color: @orangeColor;
-            }
-            .van-icon {
-                color: @orangeColor;
-            }
-        }
-        &.empty {
-            .van-icon {
-                background: #D8D8D8;
-            }
-        }
+    &.success {
+      .content {
+        color: #62a070;
+      }
+      .van-icon {
+        color: #62a070;
+      }
     }
-    .van-icon {
-        font-size: .22rem;
-        position: absolute;
-        top: .2rem;
-        left: -.25rem;
-        z-index: 2;
-        width: .22rem;
-        height: .22rem;
-        border-radius: 50%;
-        -webkit-transform: translate(-50%, -50%);
-        transform: translate(-50%, -50%);
+    &.error {
+      .content {
+        color: @sFontColor;
+      }
+      .van-icon {
+        color: #f85043;
+      }
     }
-    .step-line {
-        position: absolute;
-        background-color: #d8d8d8;
-        top: .16rem;
-        left: -.25rem;
-        width: .02rem;
-        height: 100%;
+    &.underway {
+      .content {
+        color: @orangeColor;
+      }
+      .van-icon {
+        color: @orangeColor;
+      }
     }
-    .message {
-        position: relative;
-        background: @whiteColor;
-        padding: .08rem .16rem;
-        border-radius: .02rem;
-        &::before {
-            content: ' ';
-            display: block;
-            position: absolute;
-            left: -.05rem;
-            top: .15rem;
-            width: .1rem;
-            height: .1rem;
-            background: @whiteColor;
-            transform: rotate(-45deg);
-        }
-        .name {
-            font-size: .16rem;
-            font-weight: bold;
-            color: @mFontColor;
-        }
-        .content {
-            font-size: .14rem;
-            min-height: .2rem;
-        }
-        
+    &.empty {
+      .van-icon {
+        background: #d8d8d8;
+      }
     }
-
-    
-}
-.button-group {
-    position: fixed;
-    bottom: 0;
-    left: 0;
-    z-index: 99;
-    width: 100%;
-    box-shadow:0 .02rem .07rem 0 rgba(0,0,0,0.16);
-    display: flex;
-    .van-button {   
-        flex: 1;
-        height: .52rem;
-        line-height: .5rem;
-        font-size: .16rem;
+  }
+  .van-icon {
+    font-size: 0.22rem;
+    position: absolute;
+    top: 0.2rem;
+    left: -0.25rem;
+    z-index: 2;
+    width: 0.22rem;
+    height: 0.22rem;
+    border-radius: 50%;
+    -webkit-transform: translate(-50%, -50%);
+    transform: translate(-50%, -50%);
+  }
+  .step-line {
+    position: absolute;
+    background-color: #d8d8d8;
+    top: 0.16rem;
+    left: -0.25rem;
+    width: 0.02rem;
+    height: 100%;
+  }
+  .message {
+    position: relative;
+    background: @whiteColor;
+    padding: 0.08rem 0.16rem;
+    border-radius: 0.02rem;
+    &::before {
+      content: " ";
+      display: block;
+      position: absolute;
+      left: -0.05rem;
+      top: 0.15rem;
+      width: 0.1rem;
+      height: 0.1rem;
+      background: @whiteColor;
+      transform: rotate(-45deg);
     }
-    .van-button--default {
-        color: @mFontColor;
+    .name {
+      font-size: 0.16rem;
+      font-weight: bold;
+      color: @mFontColor;
     }
-    .van-button--primary {
-        background: @mColor;
-        border-color: @mColor;
+    .content {
+      font-size: 0.14rem;
+      min-height: 0.2rem;
     }
+  }
+}
+.button-group {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  z-index: 99;
+  width: 100%;
+  box-shadow: 0 0.02rem 0.07rem 0 rgba(0, 0, 0, 0.16);
+  display: flex;
+  .van-button {
+    flex: 1;
+    height: 0.52rem;
+    line-height: 0.5rem;
+    font-size: 0.16rem;
+  }
+  .van-button--default {
+    color: @mFontColor;
+  }
+  .van-button--primary {
+    background: @mColor;
+    border-color: @mColor;
+  }
 }
-</style>
+</style>

+ 4 - 3
vue.config.js

@@ -1,10 +1,11 @@
-let targetUrl = "https://mteadev.dayaedu.com";
+let targetUrl = "https://dev.gym.lexiaoya.cn";
 // let targetUrl = "http://192.168.3.26:8000";
 // let targetUrl = 'http://192.168.3.20:8000'
-// let targetUrl = 'https://online.dayaedu.com'
-// let targetUrl = 'http://dev.dayaedu.com/'
+// let targetUrl = 'https://online.gym.lexiaoya.cn'
+// let targetUrl = 'http://dev.gym.lexiaoya.cn/'
 // let targetUrl = 'http://192.168.3.124:8000'
 module.exports = {
+  publicPath: "./",
   chainWebpack: (config) => {
     config.devtool("inline-source-map");
     config.output.filename("[name].[hash].js").end();