guojy 1 vuosi sitten
vanhempi
commit
d422d6b2c6

+ 10 - 8
src/course/api/index.js

@@ -32,14 +32,16 @@ export function getAdminTokenId(token) {
 //获取课程列表
 export function getCourseList(data) {
     return new Promise((resolve, reject) => {
-        axiosKc('get', `/mkt/admin/${getCourseId()}/subject/list`, data).then(res => {
-            if (res.data.code == 1) {
-                resolve(res.data.data)
-            } else {
-                Message(res.data.message)
-                reject(res.data.message)
-            }
-        })
+        if(getCourseId()){
+            axiosKc('get', `/mkt/admin/${getCourseId()}/subject/list`, data).then(res => {
+                if (res.data.code == 1) {
+                    resolve(res.data.data)
+                } else {
+                    Message(res.data.message)
+                    reject(res.data.message)
+                }
+            })
+        }
     })
 }
 //删除课程

+ 0 - 1
src/course/courseManage/create.vue

@@ -244,7 +244,6 @@ export default {
     },
     // 查看预览图
     showApm(url){
-      console.log(123)
       this.dialogVisible = true;
       this.dialogImageUrl = url;
     },

+ 8 - 3
src/course/index.vue

@@ -16,10 +16,10 @@
         <div
           class="flex-1 flex-box-ce"
           style="padding: 0 20px"
-          v-if="course_account_info.name"
+          v-if="courseName"
         >
           <div class="left-menu">
-            <p>{{ course_account_info.name }}</p>
+            <p>{{ courseName }}</p>
           </div>
           <div class="flex-1"></div>
           <div class="right-menu">
@@ -93,6 +93,7 @@ export default {
   },
   data() {
     return {
+      courseName:'首页',
       loading: false,
       isLog: false,
       menuIndex: 2,
@@ -140,12 +141,12 @@ export default {
   watch: {
     //监视路由变化,有变化就缓存导航状态
     $route(to, from) {
-      console.log(to.path)
       var str = to.path;
       this.menuArr.some((item, index) => {
         if (item.path == str) {
           this.menuIndex = item.index;
           this.$setCache("course_path", item.index);
+          this.setTit()
           return true;
         }
       });
@@ -157,9 +158,13 @@ export default {
     if (this.$route.path != "/course") {
       this.menuIndex =
         this.$getCache("course_path") != 1 ? this.$getCache("course_path") : 1;
+        this.setTit()
     }
   },
   methods: {
+    setTit(){
+      this.courseName = this.$getCache("course_path")==1?'首页':this.$getCache("course_path")==2?'课程管理':this.$getCache("course_path")==3?'经销商管理':this.$getCache("course_path")==4?'统计':this.$getCache("course_path")==5?'设置':'管理员'
+    },
     judegLogin() {
       if (!this.$getCourseId()) {
         if (!localStorage.getItem("Course-Id")) {

+ 8 - 3
src/course/statistics/home.vue

@@ -107,13 +107,13 @@
     <el-dialog
       :title="recordTit"
       :visible.sync="showDetail"
-      width="70%"
+      width="80%"
       center
       @close="cancle()"
     >
       <el-table :data="recordDetails" border stripe v-loading="rLoading">
         <el-table-column
-          label="发起人姓名(名额交易发起人)"
+          :label="fromPerson"
           align="center"
         >
           <template slot-scope="scope">{{ scope.row.fromUserName }}</template>
@@ -125,7 +125,7 @@
           <template slot-scope="scope">{{ scope.row.fromUserMobile===0?'平台增加':scope.row.fromUserMobile }}</template>
         </el-table-column>
         <el-table-column
-          label="接收人姓名(名额交易接收人)"
+          :label="toPerson"
           align="center"
         >
           <template slot-scope="scope">{{ scope.row.toUserName}}</template>
@@ -184,6 +184,8 @@ export default {
   props: [],
   data() {
     return {
+      toPerson:'接收人姓名\n(名额交易接收人)',
+      fromPerson:'发起人姓名\n(名额交易发起人)',
       loading:true,
       rLoading:true,
       page: {
@@ -398,4 +400,7 @@ export default {
 .el-tabs__item:hover {
   font-weight: 600 !important;
 }
+/deep/ .el-table .cell{
+  white-space: pre-line;
+}
 </style>

+ 2 - 2
src/course/user/login.vue

@@ -63,7 +63,7 @@
       <div class="login-right flex-2" style="position: relative">
         <div class="login_input">
           <div class="third-login-box">
-            <p class="third-account" @click="getToken">平台ID登录</p>
+            <!-- <p class="third-account" @click="getToken">平台ID登录</p>
             <el-input
               v-model="testId"
               placeholder="请输入平台ID,回车登录"
@@ -71,7 +71,7 @@
               style="width: 250px; margin: 0 0 20px"
               clearable
               @keyup.enter.native="getToken(testId)"
-            ></el-input>
+            ></el-input> -->
             <p class="third-account">微信扫码登录</p>
             <div class="account-login">
               <a

+ 0 - 2
src/permission.js

@@ -41,9 +41,7 @@ router.beforeEach((to, from, next) => {
       }
     }
   } else if (whiteList2.indexOf(to.path) !== -1 || filterWhite(to.path)) {
-    console.log(to.path)
     if (localStorage.getItem('Course-Token')||localStorage.getItem('Course-Id')|| to.path == '/courseLogin') {
-      console.log(12)
       next()
     } else {
       Message({

+ 1 - 1
src/store/modules/course.js

@@ -8,7 +8,7 @@ const courseStore = {
     state: {
         course_account_info: {
             "id": 2722,
-            "name": "管理员",
+            "name": "首页",
             "img_url": ""
         },//个人账号信息
     },

+ 2 - 2
src/utils/axiosKc.js

@@ -12,8 +12,8 @@ import {
 import qs from 'qs'
 import Vue from 'vue'
 const service = axios.create({
-  baseURL: process.env.BASE_API,
-  // baseURL:'https://oa.g107.com',
+  // baseURL: process.env.BASE_API,
+  baseURL:'https://oa.g107.com',
   // baseURL:'https://3g954g5149.picp.vip',
   // baseURL:'http://192.168.0.66:8081',
   

+ 1 - 1
src/views/weixin.vue

@@ -239,7 +239,7 @@ export default {
         localStorage.setItem("Course-Token", res.auToken);
         localStorage.setItem("Course-Id", res.adminUserId);
         this.$message({
-          message: "登成功!",
+          message: "登成功!",
           type: "success",
           showClose: true,
           duration: 2000,