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