浏览代码

1、新增请求方式。2、有姓名和身份证禁止输入

xuqiaoying 3 年之前
父节点
当前提交
4ece527334
共有 4 个文件被更改,包括 9 次插入5 次删除
  1. 2 2
      src/axios.js
  2. 2 0
      src/main.js
  3. 2 2
      src/pages/course-detail/index.vue
  4. 3 1
      src/pages/living-room/index.vue

+ 2 - 2
src/axios.js

@@ -3,8 +3,8 @@ import store from './store'
 import { Message } from 'element-ui'
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test
-export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-// export const BASE_URL = 'http://192.168.1.24:5055'    //dev
+// export const BASE_URL = 'https://test.xyyxt.net'   //预发布
+export const BASE_URL = 'http://192.168.1.7:5055'    //dev
 // export const BASE_URL = 'http://120.79.166.78:19012'    //测试-外网
 export const tenantId = '867735392558919680'
 

+ 2 - 0
src/main.js

@@ -14,12 +14,14 @@ import upload from '@/common/uploadFile'
 import mixin from '@/mixin/index'
 import moment from "moment"
 import vueEsign from 'vue-esign'
+import axios from './axios.js'
 import 'moment/locale/zh-cn'
 
 console.dir(Vue,'Vue')
 Vue.config.productionTip = false
 Vue.prototype.$store = store
 Vue.prototype.$request = request
+Vue.prototype.$axios = axios
 Vue.prototype.$tools = tools
 Vue.prototype.$upload = upload
 Vue.prototype.$moment = moment

+ 2 - 2
src/pages/course-detail/index.vue

@@ -2034,7 +2034,7 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <el-input
-                :disabled="true"
+                :disabled="infoForm.name ? true : false"
                 v-model="infoForm.name"
                 :placeholder="`请输入${item.fieldName}`"
               />
@@ -2048,7 +2048,7 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <el-input
-                :disabled="true"
+                :disabled="infoForm.idcard ? true : false"
                 v-model="infoForm.idcard"
                 :placeholder="`请输入${item.fieldName}`"
               />

+ 3 - 1
src/pages/living-room/index.vue

@@ -195,6 +195,7 @@ export default {
     });
   },
   created() {
+    console.log('this.$tools.isLogin()', this.$tools.isLogin())
     if (!this.$tools.isLogin()) {
       console.log('1111',this.$route)
       this.setCurrentRouter(this.$route);
@@ -204,6 +205,7 @@ export default {
       return;
     }
     const { a } = this.$route.query
+    console.log('aaaaaaaaa', a)
     this.channelId = this.$route.params.channelId
     // 有a字段是标识是复制链接进来
     if (a ==1) {
@@ -233,7 +235,7 @@ export default {
     // 获取直播间跳转参数的接口
     getParam() {
       const { cid, gid, sid} = this.$route.query
-      this.$request({
+      this.$axios({
         url: '/course/check/watch/per',
         method: 'get',
         params: {