浏览代码

app参数修改

dufeng 1 年之前
父节点
当前提交
04fa774b88
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 4 3
      App.vue
  2. 1 0
      pages/workflowTask/index.vue

+ 4 - 3
App.vue

@@ -10,14 +10,15 @@ export default {
             //额外参数
             let urlParams = ''
             for (let key in query) {
-                if (key != 'authtoken') {
+                if (key != 'authtoken' && key != 'redirect') {
                     urlParams += `&${key}=${query[key]}`
                 }
             }
-            console.log('所有外部参数',urlParams)
+            urlParams=urlParams.replace('&','?')
+            console.log('所有外部参数', urlParams)
             setTimeout(() => {
                 uni.redirectTo({
-                    url: `${query.redirect}?${urlParams}`
+                    url: `${query.redirect}${urlParams}`
                 });
             }, 0);
         }

+ 1 - 0
pages/workflowTask/index.vue

@@ -29,6 +29,7 @@
 		onLoad(options) {
 			this.diStatusBarHeight = uni.getSystemInfoSync().statusBarHeight
 			this.currentType = options.type
+            console.log('类型',options.type)
 		},
 		components: {
 			startWorkflow,