Explorar el Código

调节系统开发

gyj hace 2 años
padre
commit
70e12e5618
Se han modificado 6 ficheros con 37 adiciones y 17 borrados
  1. 1
    1
      App.vue
  2. 4
    3
      config.js
  3. 8
    2
      pages.json
  4. 12
    3
      pages/login.vue
  5. 4
    3
      permission.js
  6. 8
    5
      utils/request.js

+ 1
- 1
App.vue Ver fichero

32
 			},
32
 			},
33
 			checkLogin() {
33
 			checkLogin() {
34
 				if (!getToken()) {
34
 				if (!getToken()) {
35
-					this.$tab.reLaunch('/pages/login')
35
+					this.$tab.reLaunch('/pages/switchSystem')
36
 				}
36
 				}
37
 			}
37
 			}
38
 		}
38
 		}

+ 4
- 3
config.js Ver fichero

1
 // 应用全局配置
1
 // 应用全局配置
2
 module.exports = {
2
 module.exports = {
3
 	// baseUrl: 'https://api.xayunmei.com/zhongcaiapi',
3
 	// baseUrl: 'https://api.xayunmei.com/zhongcaiapi',
4
-	baseUrl: 'https://api.xayunmei.com/zhongcaiapitest',
4
+	// baseUrl: 'https://api.xayunmei.com/zhongcaiapitest',
5
 	// baseUrl: 'http://121.40.189.20:9001',
5
 	// baseUrl: 'http://121.40.189.20:9001',
6
-	// baseUrl: 'http://121.40.189.20:8001',
7
-	// baseUrl: 'http://192.168.3.77:8080',
6
+	baseUrlZC: 'http://121.40.189.20:6001',
7
+	baseUrlTJ: 'http://121.40.189.22:8001',
8
+	// baseUrl: 'http://172.16.1.24:8001',
8
 	// baseUrl: 'http://localhost:8080',
9
 	// baseUrl: 'http://localhost:8080',
9
 	// baseUrl: 'http://192.168.3.18:9001',
10
 	// baseUrl: 'http://192.168.3.18:9001',
10
 	// 应用信息
11
 	// 应用信息

+ 8
- 2
pages.json Ver fichero

1
 {
1
 {
2
-	"pages": [{
2
+	"pages": [
3
+		{
4
+			"path": "pages/switchSystem",
5
+			"style": {
6
+				"navigationBarTitleText": ""
7
+			}
8
+		}, {
3
 			"path": "pages/login",
9
 			"path": "pages/login",
4
 			"style": {
10
 			"style": {
5
-				"navigationBarTitleText": "登录"
11
+				"navigationBarTitleText": ""
6
 			}
12
 			}
7
 		}, {
13
 		}, {
8
 			"path": "pages/register",
14
 			"path": "pages/register",

+ 12
- 3
pages/login.vue Ver fichero

1
 <template>
1
 <template>
2
 	<view class="normal-login-container">
2
 	<view class="normal-login-container">
3
-		<view class="logo-content align-center justify-center flex">
3
+		<view class="logo-content align-center justify-center flex" v-if="logSyste==1">
4
 			<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
4
 			<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
5
 			</image>
5
 			</image>
6
 			<text class="title">仲裁平台</text>
6
 			<text class="title">仲裁平台</text>
7
+		</view>
8
+		<view class="logo-content align-center justify-center flex" v-if="logSyste==2">
9
+			<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
10
+			</image>
11
+			<text class="title">调节平台</text>
7
 		</view>
12
 		</view>
8
 		<view class="login-form-content">
13
 		<view class="login-form-content">
9
 			<view class="input-item flex align-center">
14
 			<view class="input-item flex align-center">
60
 			return {
65
 			return {
61
 				codeUrl: "",
66
 				codeUrl: "",
62
 				captchaEnabled: true,
67
 				captchaEnabled: true,
63
-				
68
+				logSyste:0,
64
 				// 用户注册开关
69
 				// 用户注册开关
65
 				register: true,
70
 				register: true,
66
 				globalConfig: getApp().globalData.config,
71
 				globalConfig: getApp().globalData.config,
112
 			},
117
 			},
113
 			// 登录方法
118
 			// 登录方法
114
 			async handleLogin() {
119
 			async handleLogin() {
115
-				console.log(this.isSelectAgree,'xxxx')
120
+				const sysType = uni.getStorageSync('sysType')
116
 				if (this.loginForm.username === "") {
121
 				if (this.loginForm.username === "") {
117
 					this.$modal.msgError("请输入您的账号")
122
 					this.$modal.msgError("请输入您的账号")
118
 				}else if(this.isSelectAgree.length < 1){
123
 				}else if(this.isSelectAgree.length < 1){
144
 					this.$tab.reLaunch('/pages/work/index')
149
 					this.$tab.reLaunch('/pages/work/index')
145
 				})
150
 				})
146
 			},
151
 			},
152
+			onLoad(options){
153
+				 let vals = decodeURIComponent(options.values);
154
+				 this.logSyste = vals
155
+			}
147
 			
156
 			
148
 		}
157
 		}
149
 	}
158
 	}

+ 4
- 3
permission.js Ver fichero

1
 import { getToken } from '@/utils/auth'
1
 import { getToken } from '@/utils/auth'
2
-
2
+//跳转页面
3
+const loginPage = "/pages/switchSystem"
3
 // 登录页面
4
 // 登录页面
4
-const loginPage = "/pages/login"
5
+// const loginPage = "/pages/login"
5
   
6
   
6
 // 页面白名单
7
 // 页面白名单
7
 const whiteList = [
8
 const whiteList = [
8
-  '/pages/login', '/pages/register', '/pages/common/webview/index','/pages/realName','/mp_ecard_sdk/index/index', '/pages/personalInfoCollection'
9
+'/pages/switchSystem', '/pages/login', '/pages/register', '/pages/common/webview/index','/pages/realName','/mp_ecard_sdk/index/index', '/pages/personalInfoCollection'
9
 ]
10
 ]
10
 
11
 
11
 // 检查地址白名单
12
 // 检查地址白名单

+ 8
- 5
utils/request.js Ver fichero

5
 import { toast, showConfirm, tansParams } from '@/utils/common'
5
 import { toast, showConfirm, tansParams } from '@/utils/common'
6
 
6
 
7
 let timeout = 10000
7
 let timeout = 10000
8
-const baseUrl = config.baseUrl
9
-
10
-const request = config => {
8
+const baseUrlZC = config.baseUrlZC
9
+const baseUrlTJ = config.baseUrlTJ
10
+const request = config => {
11
+  const sysType = uni.getStorageSync('sysType')
12
+  
11
   // 是否需要设置 token
13
   // 是否需要设置 token
12
   const isToken = (config.headers || {}).isToken === false
14
   const isToken = (config.headers || {}).isToken === false
13
   config.header = config.header || {}
15
   config.header = config.header || {}
20
     url = url.slice(0, -1)
22
     url = url.slice(0, -1)
21
     config.url = url
23
     config.url = url
22
   }
24
   }
23
-  return new Promise((resolve, reject) => {
25
+  return new Promise((resolve, reject) => {
26
+	const reqURL = sysType == 1 ? baseUrlZC : baseUrlTJ
24
     uni.request({
27
     uni.request({
25
         method: config.method || 'get',
28
         method: config.method || 'get',
26
         timeout: config.timeout ||  timeout,
29
         timeout: config.timeout ||  timeout,
27
-        url: config.baseUrl || baseUrl + config.url,
30
+        url: config.baseUrl || reqURL + config.url,
28
         data: config.data,
31
         data: config.data,
29
         header: config.header,
32
         header: config.header,
30
         dataType: 'json'
33
         dataType: 'json'