谢杰标 2 жил өмнө
parent
commit
a37aeeb845

+ 27 - 14
common/config.js

@@ -1,8 +1,27 @@
+
+// test 测试环境
+const test = {
+    // BASE_URL: 'https://test.xyyxt.net', //预发布
+    // BASE_URL: 'https://api.xyyxt.net', //正式
+    // BASE_URL: 'http://192.168.1.24:5055',
+    BASE_URL: 'http://120.79.166.78:19012',
+    BASE_IMG_URL: 'https://file-dev.xyyxt.net/',
+    WEBVIEW_URL: 'http://120.79.166.78:18001/',
+    domain: 'h.xyyxt.net',
+    tenantId: '867735392558919680', //详粤云学堂
+    // tenantId: '667735392758919630', //详粤学堂
+    // tenantId: '867735392558919520', // 勘设云学堂
+    // tenantId: '141250585240548145', // 中山云学堂
+    appid: 'wxd3c8ae80cf43a305',
+    version: '1.0.2',
+    TOP_LOGO: '/static/logo2.png',
+    SCAN_LOGO: '/static/me/logo.png'
+}
+const isdev = process.env.NODE_ENV === 'development'
 const index = 0 // 祥粤云学堂
 // const index = 1 // 祥粤学堂
 // const index = 2 // 勘设云学堂
 // const index = 3 // 中正学堂
-// const index = 4 // 测试环境
 const set = [
     // 祥粤云学堂
     {
@@ -12,7 +31,9 @@ const set = [
         domain: 'h.xyyxt.net',
         tenantId: '867735392558919680',
         appid: 'wxd3c8ae80cf43a305',
-        version: '1.0.2'
+        version: '1.0.2',
+        TOP_LOGO: '/static/logo2.png',
+        SCAN_LOGO: '/static/me/logo.png'
     },
     // 祥粤学堂
     {
@@ -32,7 +53,9 @@ const set = [
         domain: '',
         tenantId: '567735392758918520',
         appid: 'wx29d0ad81e625ad81',
-        version: '1.0.2'
+        version: '1.0.2',
+        TOP_LOGO: '/static/zhongshan_logo.png',
+        
     },
     // 中正学堂
     {
@@ -43,17 +66,7 @@ const set = [
         tenantId: '141250585240548145',
         appid: 'wx5872ef563d13dabf',
         version: '1.0.2'
-    },
-    // test 测试环境
-    {
-        BASE_URL: 'http://120.79.166.78:19012',
-        BASE_IMG_URL: 'https://file-dev.xyyxt.net/',
-        WEBVIEW_URL: 'http://120.79.166.78:18001/',
-        domain: 'h.xyyxt.net',
-        tenantId: '867735392558919680',
-        appid: 'wxd3c8ae80cf43a305',
-        version: '1.0.2'
     }
 ]
-export default set[index]
+export default isdev ? test : set[index]
 

+ 2 - 4
common/methodTool.js

@@ -1,9 +1,7 @@
 import store from '@/store/index.js'
-import * as baseUrls from '@/common/request.js'
+import config from './config'
 import api from '@/common/api.js'
 
-// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'
-
 export default {
 	isGoLogin(isBack = true) {
 		if (!uni.getStorageSync('user_account')) {
@@ -43,7 +41,7 @@ export default {
 		} else if (url.indexOf("http") != -1 || url.indexOf("https") != -1 || url.indexOf("wxfile") != -1) {
 
 		} else {
-			url = baseUrls.BASE_IMG_URL + url
+			url = config.BASE_IMG_URL + url
 		}
 		if (scale) {
 			url = url + "?x-oss-process=image/resize,w_" + width

+ 18 - 16
common/request.js

@@ -1,18 +1,20 @@
 import store from '@/store/index.js'
+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 = 'http://120.79.166.78:19012' // 测试环境
+
+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
+//图片上传api
 // export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+export const BASE_IMG_URL = config.BASE_IMG_URL  //test
 
 // web_view的
 // export const WEBVIEW_URL = 'https://m.xyyxt.net/'  //release-祥粤云学堂
@@ -20,22 +22,22 @@ export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 // 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 = 'http://120.79.166.78:18001/' // 测试环境-祥粤云学堂
+export const WEBVIEW_URL = config.WEBVIEW_URL // 测试环境-祥粤云学堂
 // export const WEBVIEW_URL = 'http://120.79.166.78:18011/' // 测试环境-祥粤学堂  
 
-export const version = '1.0.2' 
-export const tenantId = '867735392558919680'  // 祥粤云学堂:867735392558919680,祥粤学堂:667735392758919630, 中建云学堂-567735392758918520
+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({
 			title: '拼命加载中...',
-			mask:true,
+			mask: true,
 		})
 	}
 
 	return new Promise((resolve, reject) => {
 		let token = uni.getStorageSync('token')
-		
+
 		uni.request({
 			url: BASE_URL + options.url,
 			method: options.method || 'GET',
@@ -54,9 +56,9 @@ export const myRequest = (options) => {
 					if (num <= 2) {
 						if (!uni.getStorageSync('user_account')) {
 							var pages = getCurrentPages() // 获取栈实例
-							let currentRoute  = pages[pages.length-1].route; // 获取当前页面路由
+							let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
 							console.log('request-->1111:', currentRoute);
-							if(currentRoute != 'pages4/login/login') {
+							if (currentRoute != 'pages4/login/login') {
 								uni.navigateTo({
 									url: '/pages4/login/login'
 								});
@@ -67,12 +69,12 @@ export const myRequest = (options) => {
 							res = await doRequest(options)
 						}
 
-					}else{
+					} else {
 						uni.removeStorageSync('user_account');
 						var pages = getCurrentPages() // 获取栈实例
-						let currentRoute  = pages[pages.length-1].route; // 获取当前页面路由
+						let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
 						console.log('request-->2222:', currentRoute);
-						if(currentRoute != 'pages4/login/login') {
+						if (currentRoute != 'pages4/login/login') {
 							uni.navigateTo({
 								url: '/pages4/login/login'
 							});
@@ -119,16 +121,16 @@ export const myRequest = (options) => {
 			const resUser = await myRequest(userInfo)
 			if (resUser.data.code === 200) {
 				store.state.userInfo = resUser.data.data
-				uni.setStorageSync('user_account',user_account)
+				uni.setStorageSync('user_account', user_account)
 				num = 1;
 			}
 			let onset = await myRequest(response)
 			return onset
 		} else {
 			var pages = getCurrentPages() // 获取栈实例
-			let currentRoute  = pages[pages.length-1].route; // 获取当前页面路由
+			let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
 			console.log('request-->333:', currentRoute);
-			if(currentRoute != 'pages4/login/login') {
+			if (currentRoute != 'pages4/login/login') {
 				uni.navigateTo({
 					url: '/pages4/login/login'
 				});

+ 3 - 1
pages/course/index.vue

@@ -9,7 +9,7 @@
     >
       <view class="slot-wrap">
         <image
-          src="/static/logo2.png"
+          :src="logo"
           style="width: 178rpx; height: 31rpx; margin-left: 30rpx"
         ></image>
       </view>
@@ -373,10 +373,12 @@
 
 <script>
 import { mapGetters } from "vuex";
+import config from '@/common/config'
 export default {
   components: {},
   data() {
     return {
+      logo: config.TOP_LOGO,
       show: false,
       courseLists: [
         {

+ 5 - 11
pages/index/index.vue

@@ -8,11 +8,7 @@
       back-icon-color="#ffffff"
     >
       <view class="slot-wrap">
-        <image
-          v-if="tenantId == '567735392758918520'"
-          src="/static/zhongshan_logo.png"
-        ></image>
-        <image v-else src="/static/logo2.png"></image>
+        <image :src="logo"></image>
       </view>
     </u-navbar>
     <view class="swiper">
@@ -345,11 +341,11 @@
 
 <script>
 import { mapGetters, mapActions } from "vuex";
-import { version, tenantId } from "@/common/request.js";
+import config from "@/common/config";
 export default {
   data() {
     return {
-      tenantId: tenantId,
+      logo: config.TOP_LOGO,
       tabNum: 0,
       infoNums: 0,
       list: [],
@@ -459,9 +455,7 @@ export default {
       // 没有code,就重定向到地址https://www.xyyxt.net?ask_type=h.xyyxt.net 去获取code,授权后就会把code带上然后访问域名
       // h.gdzzkj.net
       if (!uni.getStorageSync("h5_code")) {
-        let ask_type =
-          tenantId == "867735392558919680" ? "h.xyyxt.net" : "h.gdzzkj.net";
-        location.replace("https://www.xyyxt.net/?ask_type=" + ask_type);
+        // location.replace("https://www.xyyxt.net/?ask_type=" + config.domain);
         return;
       }
     }
@@ -481,7 +475,7 @@ export default {
     }
 
     this.appCommonConfig({
-      version,
+      version: config.version,
     });
     if (this.$method.isLogin()) {
       this.$store.state.allowLoading = false;

+ 4 - 10
pages/learn/index.vue

@@ -9,13 +9,7 @@
     >
       <view class="slot-wrap">
         <image
-          v-if="tenantId == '567735392758918520'"
-          src="/static/zhongshan_logo.png"
-          style="width: 178rpx; height: 31rpx; margin-left: 30rpx"
-        ></image>
-        <image
-          v-else
-          src="/static/logo2.png"
+          :src="logo"
           style="width: 178rpx; height: 31rpx; margin-left: 30rpx"
         ></image>
       </view>
@@ -764,11 +758,11 @@
 <script>
 var curTime = new Date().getTime(); // 当前时间的时间戳
 import { mapGetters, mapActions } from "vuex";
-import { WEBVIEW_URL, tenantId } from "@/common/request.js";
+import config from "@/common/config";
 export default {
   data() {
     return {
-      tenantId: tenantId,
+      logo: config.TOP_LOGO,
       leftDays: 0,
       paramC: {
         pageNum: 1,
@@ -940,7 +934,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=" +

+ 3 - 4
pages/questionBank/index.vue

@@ -2,8 +2,7 @@
     <view class="questionBank">
         <u-navbar :is-back="false" title="题库中心" :border-bottom="false"  title-color="#333333" back-icon-color="#ffffff">
 			<view class="slot-wrap">
-				<image v-if="tenantId == '567735392758918520'" src="/static/zhongshan_logo.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
-				<image v-else src="/static/logo2.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
+				<image  :src="logo" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
 			</view>
 		</u-navbar>
 		<!-- 有学习的课程 -->
@@ -92,11 +91,11 @@
 
 <script>
 import { mapGetters } from 'vuex'
-import { tenantId } from '@/common/request.js';
+import config from '@/common/config'
 export default {
 	data() {
 		return {
-			tenantId: tenantId,
+			logo: config.TOP_LOGO,
 			allLoading: false, // 加载样式
 			questionLists: [], // 题库列表
 			param: {

+ 3 - 4
pages/wd/index.vue

@@ -3,8 +3,7 @@
 		<!-- <image mode="widthFix" :src="isLogin ? '/static/wd_bg_login.jpg' : '/static/wd_bg.jpg'" :class="isLogin ? 'login_full_img' : 'full_img'"></image> -->
 		<u-navbar :is-back="false" title="我的" :border-bottom="false"  title-color="#333333" back-icon-color="#ffffff">
 			<view class="slot-wrap">
-				<image v-if="tenantId == '567735392758918520'" src="/static/zhongshan_logo.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
-				<image v-else src="/static/logo2.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
+				<image :src="logo" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
 			</view>
 		</u-navbar>
 		<view v-if="isLogin" class="imgs_bg">
@@ -142,11 +141,11 @@
 <script>
 // import { websocket } from '@/common/socket.js';
 import { mapGetters } from 'vuex';
-import { tenantId } from '@/common/request.js';
+import config from '@/common/config'
 export default {
 	data() {
 		return {
-			tenantId: tenantId,
+			logo: config.TOP_LOGO,
 			list: [23, 24, 25, 26, 27, 28, 29],
 			content: '此功能暂未开放',
 			show: false,

+ 101 - 74
pages2/verify/input.vue

@@ -484,23 +484,20 @@
     <!--用于图片压缩的canvas画布,不在页面中展示,且id固定不可变 position: absolute; z-index: -1; left: -10000rpx;; top: -10000rpx;-->
     <!-- style="width: {{cw}}px; height: {{cw}}px;" -->
     <view class="photo_can">
-      <canvas
-        class="zip_canvas"
-        canvas-id="zipCanvas"
-      ></canvas>
+      <canvas class="zip_canvas" canvas-id="zipCanvas"></canvas>
     </view>
-
   </view>
 </template>
 
 <script>
-import * as baseUrls from "@/common/request.js";
+import config from "../../common/config";
 import { mapGetters, mapActions } from "vuex";
 import Handwriting from "@/common/signature.js";
-import getLessLimitSizeImage from '@/common/compressPhoto.js'
+import getLessLimitSizeImage from "@/common/compressPhoto.js";
 export default {
   data() {
     return {
+      baseUrls: config.BASE_IMG_URL,
       cw: wx.getSystemInfoSync().windowWidth, //画板边长默认是屏幕宽度,正方形画布
       list: [
         {
@@ -737,7 +734,7 @@ export default {
     this.orderGoodsId = Number(option.orderGoodsId);
     this.goodsId = Number(option.id);
     this.gradeId = Number(option.gradeId);
-    
+
     await this.getInfo();
     await this.getGoodsDetail();
   },
@@ -758,7 +755,7 @@ export default {
         this.listData.forEach((item) => {
           if (item.fieldKey == "idcard") {
             this.form.idcard = this.userInfo.idCard;
-            console.log('监听监听111')
+            console.log("监听监听111");
           }
           if (item.fieldKey == "telphone") {
             this.form.telphone = this.userInfo.telphone;
@@ -766,7 +763,7 @@ export default {
 
           if (item.fieldKey == "name") {
             this.form.name = this.userInfo.realname;
-            console.log('监听监听')
+            console.log("监听监听");
           }
         });
       }
@@ -775,7 +772,7 @@ export default {
   methods: {
     ...mapActions(["getUserInfo"]),
     inputName(event) {
-      console.log('enevt', event, this.form.name)
+      console.log("enevt", event, this.form.name);
     },
     clickIndex(inds) {
       if (inds === 0) {
@@ -810,7 +807,6 @@ export default {
         );
       }
 
-
       if (this.remarkStatus) {
         var arsty = {};
         for (let k in data) {
@@ -929,30 +925,36 @@ export default {
           if (res.tempFiles[0].size > 2097152) {
             // this.$method.showToast("上传图片不得大于2M");
             // 需要压缩
-            let canvasId = 'zipCanvas'
-            let imagePath = res.tempFiles[0].path //原图的路径
-            let limitSize = 2048 //大小限制2048kb
-            let drawWidth = wx.getSystemInfoSync().windowWidth //初始绘画区域是画布自身的宽度也就是屏幕宽度
-            getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, async (resPath)=>{
-              //resPath就是压缩后图片的路径
-              this.uploadImgsChild(resPath)
-            })
+            let canvasId = "zipCanvas";
+            let imagePath = res.tempFiles[0].path; //原图的路径
+            let limitSize = 2048; //大小限制2048kb
+            let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
+            getLessLimitSizeImage(
+              canvasId,
+              imagePath,
+              limitSize,
+              drawWidth,
+              async (resPath) => {
+                //resPath就是压缩后图片的路径
+                this.uploadImgsChild(resPath);
+              }
+            );
             return;
           } else {
-            this.uploadImgsChild(res.tempFiles[0].path)
+            this.uploadImgsChild(res.tempFiles[0].path);
           }
         },
       });
     },
     uploadImgsChild(path) {
-      var type = path.split(".").splice(-1)
+      var type = path.split(".").splice(-1);
       if (type[0] != "jpg" && type[0] != "png" && type[0] != "jpeg") {
-        this.$method.showToast("请上传图片格式")
-        return
+        this.$method.showToast("请上传图片格式");
+        return;
       }
-      this.$set(this.form, "commitment_seal", path)
+      this.$set(this.form, "commitment_seal", path);
       this.$nextTick(() => {
-        this.resultForm()
+        this.resultForm();
       });
     },
     uploadFieds() {
@@ -1133,10 +1135,9 @@ export default {
                                       this.$method.showToast("提交成功");
                                       this.getUserInfo();
                                       setTimeout(() => {
-                                        console.log('延迟')
+                                        console.log("延迟");
                                         uni.navigateBack();
-                                      }, 1500)
-                                      
+                                      }, 1500);
                                     } else {
                                       this.$method.showToast(res.data.msg);
                                       this.isUploading = false;
@@ -1180,9 +1181,9 @@ export default {
                                       this.$method.showToast("提交成功");
                                       this.getUserInfo();
                                       setTimeout(() => {
-                                        console.log('延迟')
+                                        console.log("延迟");
                                         uni.navigateBack();
-                                      }, 1500)
+                                      }, 1500);
                                     } else {
                                       this.$method.showToast(res.data.msg);
                                       this.isUploading = false;
@@ -1276,9 +1277,9 @@ export default {
             this.$method.showToast("提交成功");
             this.getUserInfo();
             setTimeout(() => {
-              console.log('延迟')
+              console.log("延迟");
               uni.navigateBack();
-            }, 1500)
+            }, 1500);
           } else {
             this.$method.showToast(res.data.msg);
             this.isUploading = false;
@@ -1318,9 +1319,9 @@ export default {
               this.$method.showToast("提交成功");
               this.getUserInfo();
               setTimeout(() => {
-                console.log('延迟')
+                console.log("延迟");
                 uni.navigateBack();
-              }, 1500)
+              }, 1500);
             } else {
               this.$method.showToast(res.data.msg);
               this.isUploading = false;
@@ -1459,17 +1460,31 @@ export default {
         ) {
           if (lists[0].file.size < 2 * 1024 * 1024) {
             // 以前的
-            this.$set(this.form, "recent_photos", await this.$method.imageInfos(lists[0].url))
+            this.$set(
+              this.form,
+              "recent_photos",
+              await this.$method.imageInfos(lists[0].url)
+            );
           } else {
             // 需要压缩
-            let canvasId = 'zipCanvas'
+            let canvasId = "zipCanvas";
             let imagePath = lists[0].url; //原图的路径
             let limitSize = 2048; //大小限制2048kb
-            let drawWidth = wx.getSystemInfoSync().windowWidth //初始绘画区域是画布自身的宽度也就是屏幕宽度
-            getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, async (resPath)=>{
-              //resPath就是压缩后图片的路径
-              this.$set(this.form, "recent_photos", await this.$method.imageInfos(resPath))
-            })
+            let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
+            getLessLimitSizeImage(
+              canvasId,
+              imagePath,
+              limitSize,
+              drawWidth,
+              async (resPath) => {
+                //resPath就是压缩后图片的路径
+                this.$set(
+                  this.form,
+                  "recent_photos",
+                  await this.$method.imageInfos(resPath)
+                );
+              }
+            );
           }
         }
       } else {
@@ -1490,23 +1505,29 @@ export default {
           lists[0].url.indexOf("//temp") !== -1
         ) {
           let url = lists[0].url;
-          let size = lists[0].file.size
+          let size = lists[0].file.size;
           this.$refs.idcard_face_photo[0].remove(0);
 
           // console.log('url', url, size)
-          let titleMsg = '请上传正确清晰的身份证人像面照片'
+          let titleMsg = "请上传正确清晰的身份证人像面照片";
           if (size < 2 * 1024 * 1024) {
-            this.checkIdCard(1, url, titleMsg, 'idcard_face_photo')
+            this.checkIdCard(1, url, titleMsg, "idcard_face_photo");
           } else {
             // 需要压缩
-            let canvasId = 'zipCanvas'
-            let imagePath = url //原图的路径
-            let limitSize = 2048 //大小限制2048kb
-            let drawWidth = wx.getSystemInfoSync().windowWidth //初始绘画区域是画布自身的宽度也就是屏幕宽度
-            getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, async (resPath)=>{
-              //resPath就是压缩后图片的路径
-              this.checkIdCard(1, resPath, titleMsg, 'idcard_face_photo')
-            })
+            let canvasId = "zipCanvas";
+            let imagePath = url; //原图的路径
+            let limitSize = 2048; //大小限制2048kb
+            let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
+            getLessLimitSizeImage(
+              canvasId,
+              imagePath,
+              limitSize,
+              drawWidth,
+              async (resPath) => {
+                //resPath就是压缩后图片的路径
+                this.checkIdCard(1, resPath, titleMsg, "idcard_face_photo");
+              }
+            );
           }
 
           // uni.compressImage({
@@ -1559,22 +1580,28 @@ export default {
         ) {
           console.log("//tem");
           let url = lists[0].url;
-          let size = lists[0].file.size
+          let size = lists[0].file.size;
           this.$refs.idcard_national_photo[0].remove(0);
 
-          let titleMsg = '请上传正确清晰的身份证国徽面照片'
+          let titleMsg = "请上传正确清晰的身份证国徽面照片";
           if (size < 2 * 1024 * 1024) {
-            this.checkIdCard(2, url, titleMsg, 'idcard_national_photo')
+            this.checkIdCard(2, url, titleMsg, "idcard_national_photo");
           } else {
             // 需要压缩
-            let canvasId = 'zipCanvas'
-            let imagePath = url //原图的路径
-            let limitSize = 2048 //大小限制2048kb
-            let drawWidth = wx.getSystemInfoSync().windowWidth //初始绘画区域是画布自身的宽度也就是屏幕宽度
-            getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, async (resPath)=>{
-              //resPath就是压缩后图片的路径
-              this.checkIdCard(2, resPath, titleMsg, 'idcard_national_photo')
-            })
+            let canvasId = "zipCanvas";
+            let imagePath = url; //原图的路径
+            let limitSize = 2048; //大小限制2048kb
+            let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
+            getLessLimitSizeImage(
+              canvasId,
+              imagePath,
+              limitSize,
+              drawWidth,
+              async (resPath) => {
+                //resPath就是压缩后图片的路径
+                this.checkIdCard(2, resPath, titleMsg, "idcard_national_photo");
+              }
+            );
           }
         }
       } else {
@@ -1661,7 +1688,7 @@ export default {
             if (item.fieldKey == "idcard") {
               console.log(this.userInfo.idCard, "this.userInfo.idCard");
               this.form.idcard = this.userInfo.idCard;
-              this.disCard = this.form.idcard ? true : false
+              this.disCard = this.form.idcard ? true : false;
               console.log(this.form.idcard);
             }
             if (item.fieldKey == "telphone") {
@@ -1673,8 +1700,8 @@ export default {
             if (item.fieldKey == "name") {
               console.log(this.userInfo.realname, "this.userInfo.realname");
               this.form.name = this.userInfo.realname;
-              this.disName = this.form.name ? true : false
-              console.log('this.disName', this.form.name, this.disName);
+              this.disName = this.form.name ? true : false;
+              console.log("this.disName", this.form.name, this.disName);
             }
           });
           self.isRequired = self.listData.every((ims) => {
@@ -1724,7 +1751,7 @@ export default {
                                   self.fileList1 = [
                                     {
                                       url:
-                                        baseUrls.BASE_IMG_URL + ajson[k].value,
+                                        baseUrls + ajson[k].value,
                                     },
                                   ];
                                 }
@@ -1734,7 +1761,7 @@ export default {
                                   self.fileList2 = [
                                     {
                                       url:
-                                        baseUrls.BASE_IMG_URL + ajson[k].value,
+                                        baseUrls + ajson[k].value,
                                     },
                                   ];
                                 }
@@ -1744,7 +1771,7 @@ export default {
                                   self.fileList3 = [
                                     {
                                       url:
-                                        baseUrls.BASE_IMG_URL + ajson[k].value,
+                                        baseUrls + ajson[k].value,
                                     },
                                   ];
                                 }
@@ -1819,21 +1846,21 @@ export default {
                       self.$set(self.form, k, arrays[k].value);
                       if (arrays[k].value) {
                         self.fileList1 = [
-                          { url: baseUrls.BASE_IMG_URL + arrays[k].value },
+                          { url: baseUrls + arrays[k].value },
                         ];
                       }
                     } else if (k === "idcard_face_photo") {
                       self.$set(self.form, k, arrays[k].value);
                       if (arrays[k].value) {
                         self.fileList2 = [
-                          { url: baseUrls.BASE_IMG_URL + arrays[k].value },
+                          { url: baseUrls + arrays[k].value },
                         ];
                       }
                     } else if (k === "idcard_national_photo") {
                       self.$set(self.form, k, arrays[k].value);
                       if (arrays[k].value) {
                         self.fileList3 = [
-                          { url: baseUrls.BASE_IMG_URL + arrays[k].value },
+                          { url: baseUrls + arrays[k].value },
                         ];
                       }
                     } else if (k === "name") {
@@ -1954,7 +1981,7 @@ page {
     width: 100%;
     height: 100%;
     position: absolute;
-    z-index: -1; 
+    z-index: -1;
     left: -10000rpx;
     top: -10000rpx;
   }

+ 3 - 1
pages4/login/pcLogin.vue

@@ -5,7 +5,7 @@
         <u-line color="#D6D6DB" />
         <view class="contents">
             <!-- 正文内容 -->
-            <image class="logo" src="/static/me/logo.png" style="width: 360rpx;height: 72rpx;"></image>
+            <image class="logo" :src="SCAN_LOGO" style="width: 360rpx;height: 72rpx;"></image>
             <text>登录后您可在网页端继续浏览课程</text>
             <!-- <view class="login_bt" @click="pcLogin()">微信登录</view> -->
             <button type="default" open-type="getPhoneNumber" @getphonenumber="wxLogin" class="login_bt">微信登录</button>
@@ -14,9 +14,11 @@
 </template>
 
 <script>
+import config from '@/common/config'
 export default {
     data() {
         return {
+            SCAN_LOGO:config.SCAN_LOGO,
             scanCode: '', // 获取扫码的路径最后面的6位标识码
             code: '',
         }

+ 3 - 4
pages4/shopping/shoppingCart.vue

@@ -2,8 +2,7 @@
 	<view>
 		<u-navbar :is-back="false" title="购物车" :border-bottom="false" title-color="#333333" back-icon-color="#ffffff">
 			<view class="slot-wrap">
-				<image v-if="tenantId == '567735392758918520'" src="/static/zhongshan_logo.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
-				<image v-else src="/static/logo2.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
+				<image :src="logo" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
 			</view>
 		</u-navbar>
 		<view v-show="isLogin">
@@ -164,11 +163,11 @@
 
 <script>
 import { mapGetters } from 'vuex';
-import { tenantId } from '@/common/request.js';
+import config from '@/common/config'
 export default {
 	data() {
 		return {
-			tenantId: tenantId,
+			logo: config.TOP_LOGO,
 			gradeValue: -1,
 			isLogin: false,
 			allChecked: false,