<template> <view> <page-head title="getApp"></page-head> <button @click="getApp">getApp</button> </view> </template> <script> export default { data() { return { checked: false } }, methods: { getApp: function () { const app = getApp() // TODO: JSON.stringify(app) 结果不符合预期,待客户端调整后修改逻辑 if (app != null) { this.checked = true } } } } </script>