【前端】云工厂的纸掌柜app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.3 KiB

<script>
import { go2 } from '@/utils/hook.js'
import store from '@/store/index.js'
export default {
onLaunch: function () {
const token = store.state.qnToken
let flag = uni.getStorageSync('hasLaunch')
if (flag && !token) {
go2('login')
}
if (flag && token) {
go2('client')
}
setTimeout(() => {
plus.push.addEventListener(
'click',
function (msg) {
plus.ui.alert('click:' + JSON.stringify(msg))
plus.ui.alert(msg.payload)
// plus.ui.alert(JSON.stringify(msg));
},
false
)
// 监听在线消息事件
plus.push.addEventListener(
'receive',
function (msg) {
// plus.ui.alert(2);
plus.ui.alert('receive:' + JSON.stringify(msg))
console.log('receive:' + JSON.stringify(msg))
},
false
)
}, 1000)
},
onShow: function () {},
onHide: function () {}
}
</script>
<style>
/*每个页面公共css */
@import url('./common/css/reset.scss');
@import '@/static/icon/iconfont.css';
page {
height: 100%;
}
/* uni-dialog标题样式 */
.uni-dialog-title-text {
font-size: 32rpx !important;
color: #323233 !important;
font-weight: 500 !important;
}
</style>