feat: 优化跳转地址栏带参数

This commit is contained in:
chenli
2026-01-29 11:53:50 +08:00
parent 112a036dd5
commit ebb46dc1b3
6 changed files with 26 additions and 14 deletions

View File

@@ -918,23 +918,23 @@
let enableEdit = this.customEnableRule(item, 'edit') let enableEdit = this.customEnableRule(item, 'edit')
let labelS = {} let labelS = {}
const config = { const config = {
currentMenu, // currentMenu,
btnType, btnType,
list: this.list, // list: this.list,
modelId: this.modelId, modelId: this.modelId,
menuId: this.menuId, menuId: this.menuId,
isPreview: this.isPreview, // isPreview: this.isPreview,
id: item.id || '', id: item.id || '',
index: item.index, index: item.index,
enableEdit, // enableEdit,
labelS, // labelS,
name: this.config.tableTitle, name: this.config.tableTitle,
billNoPrefix: this.config.billNoPrefix billNoPrefix: this.config.billNoPrefix
} }
console.log(config,'config12233') console.log(config,'config12233')
const url = '/pages/apply/dynamicModelList/' + type + '?config=' + const url = '/pages/apply/dynamicModelList/' + type + '?config=' +
this.jnpf.base64.encode(JSON.stringify(config)) JSON.stringify(config)
uni.navigateTo({ uni.navigateTo({
url: url url: url
}) })

View File

@@ -498,7 +498,7 @@
init(option) { init(option) {
const parseConfig = (rawConfig) => { const parseConfig = (rawConfig) => {
try { try {
return JSON.parse(this.jnpf.base64.decode(rawConfig)) || {} return JSON.parse(rawConfig) || {}
} catch (error) { } catch (error) {
return {} return {}
} }

View File

@@ -43,7 +43,7 @@ import { computed } from "vue";
}, },
onLoad(obj) { onLoad(obj) {
// baseStore.getDictionaryDataAll() // baseStore.getDictionaryDataAll()
this.config = JSON.parse(this.jnpf.base64.decode(obj.config)) || {}; this.config = JSON.parse(obj.config) || {};
this.isPreview = this.config.isPreview || false; this.isPreview = this.config.isPreview || false;
this.enableFlow = this.config.type === 9 ? 1 : 0; this.enableFlow = this.config.type === 9 ? 1 : 0;
this.title = this.config.tableTitle || ""; this.title = this.config.tableTitle || "";

View File

@@ -101,7 +101,13 @@
}, },
methods: { methods: {
handelClick(item) { handelClick(item) {
let url = "/pages/apply/dynamicModelList/index?config=" + this.jnpf.base64.encode(JSON.stringify(item)) const config = {
billNoPrefix: item.billNoPrefix,
id: item.id,
name: item.name,
tableTitle: item.tableTitle,
}
let url = "/pages/apply/dynamicModelList/index?config=" + JSON.stringify(config)
uni.navigateTo({ uni.navigateTo({
url, url,
fail: () => { fail: () => {

View File

@@ -261,11 +261,17 @@
}, },
launch(item) { launch(item) {
console.log(item,'item-------') console.log(item,'item-------')
if (item.tabType == 'flow') return this.JumpFlow(item) const config = {
if (item.tabType == 'menu') return this.JumpApply(item) billNoPrefix: item.billNoPrefix,
id: item.id,
name: item.name,
tableTitle: item.tableTitle,
}
if (item.tabType == 'flow') return this.JumpFlow(config)
if (item.tabType == 'menu') return this.JumpApply(config)
}, },
JumpApply(item) { JumpApply(item) {
let url = "/pages/apply/dynamicModelList/index?config=" + this.jnpf.base64.encode(JSON.stringify(item)) let url = "/pages/apply/dynamicModelList/index?config=" + JSON.stringify(item)
// if (item.type == 1) { // if (item.type == 1) {
// getChildList(item.id).then(res => { // getChildList(item.id).then(res => {
// this.listChild = res.data || [] // this.listChild = res.data || []
@@ -458,7 +464,7 @@
} }
uni.navigateTo({ uni.navigateTo({
url: '/pages/apply/dynamicModelList/form?config=' + url: '/pages/apply/dynamicModelList/form?config=' +
this.jnpf.base64.encode(JSON.stringify(config)) JSON.stringify(config)
}) })
} }
}) })

View File

@@ -104,7 +104,7 @@
} }
uni.navigateTo({ uni.navigateTo({
url: '/pages/apply/dynamicModelList/form?config=' + url: '/pages/apply/dynamicModelList/form?config=' +
this.jnpf.base64.encode(JSON.stringify(config)) JSON.stringify(config)
}) })
} }
}) })