1 Star 0 Fork 150

BulusDuan / uni-nvue-chat

forked from wzJun1 / uni-nvue-chat 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
App.vue 940 Bytes
一键复制 编辑 原始数据 按行查看 历史
wzJun1 提交于 2020-09-11 15:38 . 初步支持H5,优化小程序使用
<script>
export default {
onLaunch: function() {
console.log('App Launch')
// #ifdef H5
let path = "/paths" + window.location.href.split("/pages")[1];
let user = uni.getStorageSync('user');
if(!user){
if(path != "/pages/index/login" || path != "/pages/index/regist"){
uni.reLaunch({
url: "/pages/index/login"
})
}
}
// #endif
},
onShow: function() {
console.log('App Show')
this.$store.dispatch('initLogin')
},
onHide: function() {
console.log('App Hide')
this.$store.dispatch('closeWebSocket')
},
onUnload:function(){
console.log('App onUnload')
},
onError:function(err){
console.log(err)
}
}
</script>
<style lang="scss">
image {
will-change: transform
}
.line{
height: 20rpx;
width: 750rpx;
background-color: #ededed;
}
/* #ifndef APP-NVUE */
page{
background-color: #ededed;
}
/* #endif */
</style>
JavaScript
1
https://gitee.com/cate1206Admin/uni-nvue-chat.git
git@gitee.com:cate1206Admin/uni-nvue-chat.git
cate1206Admin
uni-nvue-chat
uni-nvue-chat
master

搜索帮助