接受其他app传递的参数

This commit is contained in:
@fawn-nine
2023-11-27 16:00:43 +08:00
parent d30d3553a1
commit f625109e2d
3 changed files with 19 additions and 12 deletions

24
App.vue
View File

@@ -17,11 +17,11 @@
import updata from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif
import Vue from 'vue'
export default {
data(){
return{
platform:null, // 系统
data() {
return {
platform: null, // 系统
}
},
onLaunch: function(e) {
@@ -144,10 +144,10 @@
}
// APPUpdate();
// #endif
},
onShow: function(e) {
onShow: function(e) {
// #ifdef MP-WEIXIN
//获取二维码携带的参数
let scene = decodeURIComponent(e.query.scene);
@@ -192,6 +192,13 @@
});
}
// #endif
// #ifdef APP-PLUS
var args = plus.runtime.arguments;
if (args) {
// 处理args参数如直达到某新页面等
console.log(args)
}
// #endif
},
onHide: function() {},
destroyed() {
@@ -200,8 +207,7 @@
})
console.log('页面销毁')
},
methods: {
}
methods: {}
};
</script>