调整路由本地存储,调整状态栏

This commit is contained in:
yunkexin 2024-07-31 17:36:49 +08:00
parent 26490dec59
commit d09f0612d1
4 changed files with 19 additions and 35 deletions

View File

@ -27,15 +27,15 @@
{ {
"path": "pages/apply/index", "path": "pages/apply/index",
"style": { "style": {
"navigationBarTitleText": "个人信息", "navigationBarTitleText": "个人信息"
"navigationBarBackgroundColor": "#fff" // "navigationBarBackgroundColor": "#fff"
} }
}, },
{ {
"path": "pages/apply/complete", "path": "pages/apply/complete",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#fff", // "navigationBarBackgroundColor": "#fff",
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
// "titleSize": "18px", // "titleSize": "18px",
@ -56,7 +56,7 @@
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#fff", //f6faff "navigationBarBackgroundColor": "#f6faff", //f6faff
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
}, },
"uniIdRouter": {} "uniIdRouter": {}

View File

@ -60,13 +60,13 @@
<style> <style>
.content { .content {
background-color: #fff; background-color: #f6faff;
width: 100%; width: 100%;
/* #ifndef APP-PLUS */ /* #ifndef APP-PLUS */
height: calc(100vh - 44px - 50px); // APP height: calc(100vh - 44px ); // APP
/* #endif */ /* #endif */
/* #ifdef APP-PLUS */ /* #ifdef APP-PLUS */
height: calc(100vh); // APP height: 100vh; // APP
/* #endif */ /* #endif */
} }

View File

@ -46,30 +46,18 @@
], ],
company: 'XLK' company: ''
} }
}, },
onShow() { onShow() {
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
const Options = currentPage.options
uni.setStorageSync('Company', Options.Company?Options.Company:'XLK')
}, },
onLoad() { onLoad() {
let pages = getCurrentPages()
let currentPage = pages[pages.length - 1]
let options = currentPage.options
console.log(options, 'options')
if (options.Company == 'DCJD') {
this.company = 'DCJD'
} else if (options.Company == 'GXBB') {
this.company = 'GXBB'
} else if (options.Company == 'LYYL') {
this.company = 'LYYL'
} else if (options.Company == 'LYXT') {
this.company = 'LYXT'
} else {
this.company = 'XLK'
}
this.getCaidan() this.getCaidan()
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
let url = 'http://47.122.43.22:9100/' let url = 'http://47.122.43.22:9100/'
@ -83,7 +71,7 @@
if (index == name) { if (index == name) {
if (item.name == '新增用户') { if (item.name == '新增用户') {
uni.navigateTo({ uni.navigateTo({
url: `/pages/apply/index?Company=${this.company}` url: `/pages/apply/index?Company=${uni.getStorageSync('Company')}`
}) })
} }
} }

View File

@ -5,23 +5,19 @@ import handle401 from './handle401'
export default { export default {
send(params) { send(params) {
let pages = getCurrentPages() let Company = uni.getStorageSync('Company')
let currentPage = pages[pages.length - 1]
let options = currentPage.options
let tenantId = '' let tenantId = ''
console.log(options, 'options') if (Company == 'DCJD') {
if (options.Company == 'DCJD') {
tenantId = 'A0000025' tenantId = 'A0000025'
} else if (options.Company == 'GXBB') { } else if (Company == 'GXBB') {
tenantId = 'A0000028' tenantId = 'A0000028'
} else if (options.Company == 'LYYL') { } else if (Company == 'LYYL') {
tenantId = 'A0000024' tenantId = 'A0000024'
} else if (options.Company == 'LYXT') { } else if (Company == 'LYXT') {
tenantId = '0002' tenantId = '0002'
} else { } else {
tenantId = '0001' tenantId = '0001'
} }
console.log(tenantId, 'tenantId')
let url = params.url; let url = params.url;
let method = params.method || "get"; let method = params.method || "get";
let data = params.data || {}; let data = params.data || {};