调节系统开发
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
},
|
||||
checkLogin() {
|
||||
if (!getToken()) {
|
||||
this.$tab.reLaunch('/pages/login')
|
||||
this.$tab.reLaunch('/pages/switchSystem')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// 应用全局配置
|
||||
module.exports = {
|
||||
// baseUrl: 'https://api.xayunmei.com/zhongcaiapi',
|
||||
baseUrl: 'https://api.xayunmei.com/zhongcaiapitest',
|
||||
// baseUrl: 'https://api.xayunmei.com/zhongcaiapitest',
|
||||
// baseUrl: 'http://121.40.189.20:9001',
|
||||
// baseUrl: 'http://121.40.189.20:8001',
|
||||
// baseUrl: 'http://192.168.3.77:8080',
|
||||
baseUrlZC: 'http://121.40.189.20:6001',
|
||||
baseUrlTJ: 'http://121.40.189.22:8001',
|
||||
// baseUrl: 'http://172.16.1.24:8001',
|
||||
// baseUrl: 'http://localhost:8080',
|
||||
// baseUrl: 'http://192.168.3.18:9001',
|
||||
// 应用信息
|
||||
|
||||
+8
-2
@@ -1,8 +1,14 @@
|
||||
{
|
||||
"pages": [{
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/switchSystem",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}, {
|
||||
"path": "pages/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录"
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}, {
|
||||
"path": "pages/register",
|
||||
|
||||
+12
-3
@@ -1,9 +1,14 @@
|
||||
<template>
|
||||
<view class="normal-login-container">
|
||||
<view class="logo-content align-center justify-center flex">
|
||||
<view class="logo-content align-center justify-center flex" v-if="logSyste==1">
|
||||
<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
|
||||
</image>
|
||||
<text class="title">仲裁平台</text>
|
||||
</view>
|
||||
<view class="logo-content align-center justify-center flex" v-if="logSyste==2">
|
||||
<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
|
||||
</image>
|
||||
<text class="title">调节平台</text>
|
||||
</view>
|
||||
<view class="login-form-content">
|
||||
<view class="input-item flex align-center">
|
||||
@@ -60,7 +65,7 @@
|
||||
return {
|
||||
codeUrl: "",
|
||||
captchaEnabled: true,
|
||||
|
||||
logSyste:0,
|
||||
// 用户注册开关
|
||||
register: true,
|
||||
globalConfig: getApp().globalData.config,
|
||||
@@ -112,7 +117,7 @@
|
||||
},
|
||||
// 登录方法
|
||||
async handleLogin() {
|
||||
console.log(this.isSelectAgree,'xxxx')
|
||||
const sysType = uni.getStorageSync('sysType')
|
||||
if (this.loginForm.username === "") {
|
||||
this.$modal.msgError("请输入您的账号")
|
||||
}else if(this.isSelectAgree.length < 1){
|
||||
@@ -144,6 +149,10 @@
|
||||
this.$tab.reLaunch('/pages/work/index')
|
||||
})
|
||||
},
|
||||
onLoad(options){
|
||||
let vals = decodeURIComponent(options.values);
|
||||
this.logSyste = vals
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -1,11 +1,12 @@
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
//跳转页面
|
||||
const loginPage = "/pages/switchSystem"
|
||||
// 登录页面
|
||||
const loginPage = "/pages/login"
|
||||
// const loginPage = "/pages/login"
|
||||
|
||||
// 页面白名单
|
||||
const whiteList = [
|
||||
'/pages/login', '/pages/register', '/pages/common/webview/index','/pages/realName','/mp_ecard_sdk/index/index', '/pages/personalInfoCollection'
|
||||
'/pages/switchSystem', '/pages/login', '/pages/register', '/pages/common/webview/index','/pages/realName','/mp_ecard_sdk/index/index', '/pages/personalInfoCollection'
|
||||
]
|
||||
|
||||
// 检查地址白名单
|
||||
|
||||
+8
-5
@@ -5,9 +5,11 @@ import errorCode from '@/utils/errorCode'
|
||||
import { toast, showConfirm, tansParams } from '@/utils/common'
|
||||
|
||||
let timeout = 10000
|
||||
const baseUrl = config.baseUrl
|
||||
|
||||
const request = config => {
|
||||
const baseUrlZC = config.baseUrlZC
|
||||
const baseUrlTJ = config.baseUrlTJ
|
||||
const request = config => {
|
||||
const sysType = uni.getStorageSync('sysType')
|
||||
|
||||
// 是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
config.header = config.header || {}
|
||||
@@ -20,11 +22,12 @@ const request = config => {
|
||||
url = url.slice(0, -1)
|
||||
config.url = url
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reqURL = sysType == 1 ? baseUrlZC : baseUrlTJ
|
||||
uni.request({
|
||||
method: config.method || 'get',
|
||||
timeout: config.timeout || timeout,
|
||||
url: config.baseUrl || baseUrl + config.url,
|
||||
url: config.baseUrl || reqURL + config.url,
|
||||
data: config.data,
|
||||
header: config.header,
|
||||
dataType: 'json'
|
||||
|
||||
Reference in New Issue
Block a user