This commit is contained in:
65
App.vue
65
App.vue
@@ -1,34 +1,49 @@
|
||||
<script>
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
||||
*/
|
||||
export default {
|
||||
onLaunch() {
|
||||
// 国际化,设置当前语言
|
||||
if (this.vuex_locale){
|
||||
this.$i18n.locale = this.vuex_locale;
|
||||
this.$u.api.lang({lang: this.vuex_locale});
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
||||
*/
|
||||
export default {
|
||||
onLaunch() {
|
||||
// 国际化,设置当前语言
|
||||
if (this.vuex_locale) {
|
||||
this.$i18n.locale = this.vuex_locale;
|
||||
this.$u.api.lang({
|
||||
lang: this.vuex_locale
|
||||
});
|
||||
}
|
||||
|
||||
//只有在基座运行的情况下才能打印看到
|
||||
const clientInfo = plus.push.getClientInfo()
|
||||
console.log(clientInfo)
|
||||
|
||||
// 设置底部导航栏角标
|
||||
// uni.setTabBarBadge({
|
||||
// index: 0,
|
||||
// text: '3'
|
||||
// });
|
||||
// uni.removeTabBarBadge({
|
||||
// index: 0
|
||||
// });
|
||||
const clientInfo = plus.push.getClientInfo()
|
||||
|
||||
this.$store.commit('$uStore', {
|
||||
name: 'vuex_push_clientId',
|
||||
value: clientInfo.clientid
|
||||
});
|
||||
|
||||
// 监听系统通知栏点击事件
|
||||
plus.push.addEventListener("click", function(msg) {
|
||||
console.log("用户点击了推送消息:", msg);
|
||||
// msg.payload 就是推送时传的自定义数据
|
||||
uni.navigateTo({
|
||||
url: "/pages/sys/workbench/earlyWarning/warnDetail",
|
||||
});
|
||||
});
|
||||
|
||||
// 设置底部导航栏角标
|
||||
// uni.setTabBarBadge({
|
||||
// index: 0,
|
||||
// text: '3'
|
||||
// });
|
||||
// uni.removeTabBarBadge({
|
||||
// index: 0
|
||||
// });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
@import url("~@/static/iconfont/iconfont.css");
|
||||
</style>
|
||||
<style lang="scss">
|
||||
@import "uview-ui/index.scss";
|
||||
@import "pages/common/aidex.scss";
|
||||
@import "uview-ui/index.scss";
|
||||
@import "pages/common/aidex.scss";
|
||||
</style>
|
Reference in New Issue
Block a user