Commit fd87dcc8 authored by 刘怀志's avatar 刘怀志

feat(全局): 消息详情 header修改

parent b7537102
...@@ -138,7 +138,8 @@ export default { ...@@ -138,7 +138,8 @@ export default {
await this.getList(); await this.getList();
this.loadData() this.loadData()
// 获取当前地址 ? 后的内容 // 获取当前地址 ? 后的内容
const queryString = window.location.href.split('?')[1]; const queryString = uni.getStorageSync('targetRoute');
console.log('KKKKKKKKKKKKKKKKKKK')
if (queryString) { if (queryString) {
console.log('查询字符串:', queryString); console.log('查询字符串:', queryString);
// 如果你需要将查询字符串解析为对象,可以使用以下方法 // 如果你需要将查询字符串解析为对象,可以使用以下方法
...@@ -148,6 +149,7 @@ export default { ...@@ -148,6 +149,7 @@ export default {
queryObject[key] = value; queryObject[key] = value;
} }
this.targetId = queryObject.targetId; this.targetId = queryObject.targetId;
uni.removeStorageSync('targetRoute');
if(this.targetId){ if(this.targetId){
this.showOneMessage() this.showOneMessage()
} }
......
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
await this.getList(); await this.getList();
this.loadData() this.loadData()
// 获取当前地址 ? 后的内容 // 获取当前地址 ? 后的内容
const queryString = window.location.href.split('?')[1]; const queryString = uni.getStorageSync('targetRoute');
if (queryString) { if (queryString) {
console.log('查询字符串:', queryString); console.log('查询字符串:', queryString);
// 如果你需要将查询字符串解析为对象,可以使用以下方法 // 如果你需要将查询字符串解析为对象,可以使用以下方法
...@@ -128,6 +128,7 @@ export default { ...@@ -128,6 +128,7 @@ export default {
queryObject[key] = value; queryObject[key] = value;
} }
this.targetId = queryObject.targetId; this.targetId = queryObject.targetId;
uni.removeStorageSync('targetRoute');
if(this.targetId){ if(this.targetId){
this.showOneMessage() this.showOneMessage()
} }
......
...@@ -103,8 +103,10 @@ export default { ...@@ -103,8 +103,10 @@ export default {
} }
}, },
created() { created() {
// 获取当前地址 ? 后的内容 // 获取当前地址 ? 后的内容
const queryString = window.location.href.split('?')[1]; // const queryString = window.location.href.split('?')[1];
const queryString = uni.getStorageSync('targetRoute');
if (queryString) { if (queryString) {
console.log('查询字符串:', queryString); console.log('查询字符串:', queryString);
// 如果你需要将查询字符串解析为对象,可以使用以下方法 // 如果你需要将查询字符串解析为对象,可以使用以下方法
......
...@@ -137,7 +137,8 @@ export default { ...@@ -137,7 +137,8 @@ export default {
// 安灯报警 // 安灯报警
targetRoute = '3' targetRoute = '3'
} }
this.$tab.reLaunch( `/pages/index?targetRoute=${targetRoute}&targetId=${row.instanceId}`) uni.setStorageSync('targetRoute', `targetRoute=${targetRoute}&targetId=${row.instanceId}`)
this.$tab.reLaunch( `/pages/index`)
}, },
clickTabs(item) { clickTabs(item) {
this.queryNotice.mesType = item.name === '基础数据审批' ? '1' : '2' this.queryNotice.mesType = item.name === '基础数据审批' ? '1' : '2'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment