diff --git a/App.vue b/App.vue index 7554c3d..d53ef54 100644 --- a/App.vue +++ b/App.vue @@ -23,12 +23,29 @@ export default { animation: false }) // 初始化应用配置 - this.initConfig() + await this.initConfig() // 检查用户登录状态 this.checkLogin() }, - initConfig() { + async initConfig() { this.globalData.config = config + uni.requestSubscribeMessage({ + //此处填写刚才申请模板的模板ID + tmplIds: ['E8RK91cPLMios6ZHoKx6FJOV4H2kodx6yPWYp7jpLJY'], + success(res) { + console.log('requestSubscribeMessage', res) + } + }) + uni.getSystemInfoAsync({ + success: res => { + uni.setStorageSync('MOBILE', res.model) + uni.setStorageSync('SYSTEM', res.system) + uni.setStorageSync('PIXELRATIO', res.pixelRatio) + }, + fail: err => { + console.error('获取设备信息失败:', err) + } + }) }, checkLogin() { if (!getAccessToken()) { diff --git a/components/cs-page/index.vue b/components/cs-page/index.vue index ad3a20e..234838e 100644 --- a/components/cs-page/index.vue +++ b/components/cs-page/index.vue @@ -1,6 +1,6 @@