فهرست منبع

config引入修改

谢杰标 2 سال پیش
والد
کامیت
976310b8dc

+ 1 - 1
common/methodTool.js

@@ -1,5 +1,5 @@
 import store from '@/store/index.js'
-import config from './config'
+import config from '@/common/config'
 import api from '@/common/api.js'
 
 export default {

+ 1 - 21
common/request.js

@@ -3,30 +3,10 @@ import config from '@/common/config'
 var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
-// export const BASE_URL = 'https://h.gdzzkj.net'
-// export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-
 export const BASE_URL = config.BASE_URL // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
-// export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
-// export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地
-// export const BASE_URL = 'http://192.168.1.7:5055'    //后端本地
-
-//图片上传api
-// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-export const BASE_IMG_URL = config.BASE_IMG_URL  //test
-
-// web_view的
-// export const WEBVIEW_URL = 'https://m.xyyxt.net/'  //release-祥粤云学堂
-// export const WEBVIEW_URL = 'https://cm.xyyxt.net/'  //release-祥粤学堂
-// export const WEBVIEW_URL = 'https://zstcm.xyyxt.net/'  //release-中建云学堂
-// export const WEBVIEW_URL = 'https://live.gdzzkj.net/'  //release-中正学堂
-// export const WEBVIEW_URL = 'https://testm.xyyxt.net/'  //预发布
-export const WEBVIEW_URL = config.WEBVIEW_URL // 测试环境-祥粤云学堂
-// export const WEBVIEW_URL = 'http://120.79.166.78:18011/' // 测试环境-祥粤学堂  
-
-export const version = config.version
 export const tenantId = config.tenantId  // 祥粤云学堂:867735392558919680,祥粤学堂:667735392758919630, 中建云学堂-567735392758918520
+
 export const myRequest = (options) => {
 	if (store.state.allowLoading && !options.noLoading) {
 		uni.showLoading({

+ 3 - 3
components/course/courseSection.vue

@@ -81,7 +81,7 @@
 
 <script>
 import { mapGetters } from 'vuex';
-import {WEBVIEW_URL} from '@/common/request.js'
+import config from '@/common/config'
 export default {
 	name: 'courseSection',
 	props: {
@@ -423,7 +423,7 @@ export default {
 					let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
 					let uuid = new Date().valueOf() + ""
 					// buyCourse 是否购买课程:1是 0否,type=vod是回放
-					let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
+					let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
 					'&channelId='+this.menuItem.liveUrl+'&gradeId='+this.gradeId+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+
 					'&sectionId='+sectionId+'&chapterId='+chapterId+'&moduleId='+moduleId+'&buyCourse=1'+'&ident='+uuid+'&sectionType=3'+'&vid='+this.menuItem.recordingUrl)
 					uni.navigateTo({
@@ -520,7 +520,7 @@ export default {
 				let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
 				let uuid = new Date().valueOf() + ""
          		 // buyCourse 是否购买课程:1是 0否
-				let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
+				let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
 				'&channelId='+this.menuItem.liveUrl+'&gradeId='+this.gradeId+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+
 				'&sectionId='+sectionId+'&chapterId='+chapterId+'&moduleId='+moduleId+'&buyCourse=1'+'&ident='+uuid+'&sectionType=2')
 				uni.navigateTo({

+ 2 - 17
pages/webview/index.vue

@@ -14,8 +14,8 @@
 </template>
 
 <script>
-import { WEBVIEW_URL } from '@/common/request.js'
 import { mapGetters } from 'vuex'
+import config from '@/common/config'
 export default {
   components: {},
   data() {
@@ -42,21 +42,6 @@ export default {
       vid: '', // 回放id
     };
   },
-  // onShareAppMessage() {
-  //   let item = this.paramObj
-  //   let moduleId = item.moduleId || 0
-  //   let chapterId = item.chapterId || 0
-  //   let sectionId = item.sectionId
-  //   let uuid = new Date().valueOf() + ""
-  //   // buyCourse 是否购买课程:1是 0否
-  //   let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
-  //   +item.channelId+'&gradeId='+0+'&courseId='+item.courseId+'&goodsId='+item.goodsId+'&orderGoodsId='+item.orderGoodsId+'&sectionId='+sectionId+'&chapterId='
-  //   +chapterId+'&moduleId='+moduleId+'&buyCourse='+item.buyCourse+'&ident='+uuid+'&sectionType='+this.sectionType+'&vid='+this.vid)
-	// 	return {
-	// 		title: '直播',
-	// 		path: `/pages/webview/index?url=` + encode
-	// 	};
-	// },
   onLoad(option) {
     console.log('--option-', option)
     this.options = option
@@ -137,7 +122,7 @@ export default {
             
             let uuid = new Date().valueOf() + ""
             // buyCourse 是否购买课程:1是 0否
-            this.url = WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
+            this.url = config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
             +item.channelId+'&gradeId='+0+'&courseId='+item.courseId+'&goodsId='+item.goodsId+'&orderGoodsId='+item.orderGoodsId+'&sectionId='+sectionId
             +'&chapterId='+chapterId+'&moduleId='+moduleId+'&buyCourse='+item.buyCourse+'&ident='+uuid+'&sectionType='+ this.sectionType+'&vid='+this.vid
             console.log('url:', this.url)

+ 1 - 1
pages2/verify/input.vue

@@ -490,7 +490,7 @@
 </template>
 
 <script>
-import config from "../../common/config";
+import config from "@/common/config";
 import { mapGetters, mapActions } from "vuex";
 import Handwriting from "@/common/signature.js";
 import getLessLimitSizeImage from "@/common/compressPhoto.js";

+ 2 - 3
pages3/live/detail.vue

@@ -653,8 +653,7 @@ import courseModule from "@/components/course/courseModule.vue";
 import courseChapter from "@/components/course/courseChapter.vue";
 import courseSection from "@/components/course/courseSection.vue";
 import PopupPhoto from '@/components/popup/index.vue'
-import {WEBVIEW_URL} from '@/common/request.js'
-// import { websocket } from "@/common/socket.js";
+import config from '@/common/config'
 import { mapGetters, mapMutations } from "vuex";
 export default {
   components: {
@@ -1144,7 +1143,7 @@ export default {
 			let sectionId = item.sectionId || item.menuId;
       let uuid = new Date().valueOf() + ""
       // buyCourse 是否购买课程:1是 0否
-			let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='+
+			let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='+
       item.liveUrl+'&gradeId='+this.gradeId+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+'&sectionId='+sectionId+
       '&chapterId='+chapterId+'&moduleId='+moduleId+'&buyCourse=1'+'&ident='+uuid)
 			uni.navigateTo({

+ 2 - 3
pages3/polyv/detail.vue

@@ -782,8 +782,7 @@ import courseModule from "@/components/course/courseModule.vue";
 import courseChapter from "@/components/course/courseChapter.vue";
 import courseSection from "@/components/course/courseSection.vue";
 import PopupPhoto from "@/components/popup/index.vue";
-import { WEBVIEW_URL } from "@/common/request.js";
-// import { websocket } from "@/common/socket.js";
+import config from '@/common/config'
 import { mapGetters, mapMutations } from "vuex";
 var polyvPlayerContext = null;
 export default {
@@ -1844,7 +1843,7 @@ export default {
       let uuid = new Date().valueOf() + "";
       // buyCourse 是否购买课程:1是 0否
       let encode = encodeURIComponent(
-        WEBVIEW_URL +
+        config.WEBVIEW_URL +
           "pages/live/index?token=" +
           uni.getStorageSync("token") +
           "&userInfo=" +

+ 2 - 2
pages5/exam/index.vue

@@ -30,7 +30,7 @@
 </template>
 
 <script>
-import {WEBVIEW_URL} from '@/common/request.js'
+import config from '@/common/config'
 import { mapGetters } from 'vuex';
 export default {
 	components: {
@@ -56,7 +56,7 @@ export default {
 		goLive() {
 			let uuid = new Date().valueOf() + ""
       		// buyCourse 是否购买课程:1是 0否
-			let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
+			let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
 			+this.livingInfo.liveUrl+'&buyCourse=1'+'&ident='+uuid)
 			uni.navigateTo({
 				url:`../../pages/webview/index?url=`+encode

+ 2 - 2
pages5/examList/index.vue

@@ -154,7 +154,7 @@
 
 <script>
 import { mapGetters } from 'vuex';
-import {WEBVIEW_URL} from '@/common/request.js'
+import config from '@/common/config'
 export default {
 	data() {
 		return {
@@ -340,7 +340,7 @@ export default {
 		goLive(item) {
 			let uuid = new Date().valueOf() + ""
       		// buyCourse 是否购买课程:1是 0否
-			let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
+			let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
 			+item.liveUrl+'&buyCourse=1'+'&ident='+uuid)
 			uni.navigateTo({
 				url:`../../pages/webview/index?url=`+encode

+ 2 - 2
pages5/examReport/index.vue

@@ -284,7 +284,7 @@
 
 <script>
 import { mapGetters, mapActions } from "vuex";
-import { WEBVIEW_URL } from "@/common/request.js";
+import config from '@/common/config'
 export default {
   data() {
     return {
@@ -538,7 +538,7 @@ export default {
       let uuid = new Date().valueOf() + "";
       // buyCourse 是否购买课程:1是 0否
       let encode = encodeURIComponent(
-        WEBVIEW_URL +
+        config.WEBVIEW_URL +
           "pages/live/index?token=" +
           uni.getStorageSync("token") +
           "&userInfo=" +

+ 2 - 3
pages5/liveDetail/list.vue

@@ -34,8 +34,7 @@
 </template>
 
 <script>
-// import { websocket } from '@/common/socket.js';
-import {WEBVIEW_URL} from '@/common/request.js'
+import config from '@/common/config'
 import { mapGetters } from 'vuex';
 export default {
 	data() {
@@ -122,7 +121,7 @@ export default {
 			let sectionId = item.sectionId || item.menuId;
 			let uuid = new Date().valueOf() + ""
       		// buyCourse 是否购买课程:1是 0否
-			let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
+			let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
 			+item.liveUrl+'&gradeId='+0+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+'&sectionId='+sectionId+'&chapterId='
 			+chapterId+'&moduleId='+moduleId+'&buyCourse=1'+'&ident='+uuid)
 			uni.navigateTo({

+ 2 - 2
pages5/liveList/index.vue

@@ -86,7 +86,7 @@
 </template>
 
 <script>
-import {WEBVIEW_URL} from '@/common/request.js'
+import config from '@/common/config'
 import { mapGetters } from 'vuex';
 export default {
 	data() {
@@ -163,7 +163,7 @@ export default {
 			if(item.liveStatus == 0) { //直播中
 				let uuid = new Date().valueOf() + ""
 				// buyCourse 是否购买课程:1是 0否
-				let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
+				let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
 				'&channelId='+item.liveUrl+'&buyCourse=1'+'&ident='+uuid)
 				uni.navigateTo({
 					url:`../../pages/webview/index?url=`+encode