提交 165461fa 编写于 作者: M MicroMilo

消息通知,小试牛刀

上级 3502ef65
...@@ -4,19 +4,22 @@ ...@@ -4,19 +4,22 @@
"version" : "0.0", "version" : "0.0",
"configurations" : [ "configurations" : [
{ {
"app-plus" : { "app-plus" :
"launchtype" : "remote" {
}, "launchtype" : "remote"
"default" : { },
"launchtype" : "local" "default" :
}, {
"h5" : { "launchtype" : "local"
"launchtype" : "remote" },
}, "h5" :
"type" : "uniCloud" {
"launchtype" : "remote"
},
"type" : "uniCloud"
}, },
{ {
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]
......
...@@ -2,22 +2,47 @@ ...@@ -2,22 +2,47 @@
export default { export default {
onLaunch: function() { onLaunch: function() {
console.log('App Launch') console.log('App Launch')
}, },
onShow: function() { onShow: function() {
// let push_clientid;
// uni.getPushClientId({
// success: (res) => {
// push_clientid = res.cid
// console.log('客户端推送标识:', push_clientid)
// uniCloud.callFunction({
// name: 'uni-cloud-push',
// data: {
// "appId": "__UNI__AAFC50C",
// "push_clientid": push_clientid,
// "title": "unitest",
// "content": push_clientid,
// "payload": {
// "text": "ddddddoooo"
// }
// }
// })
// .then(res => {
// console.log(res);
// });
// },
// fail(err) {
// console.log(err)
// }
// })
console.log('App Show') console.log('App Show')
}, },
onHide: function() { onHide: function() {
console.log('App Hide') console.log('App Hide')
}, },
globalData: { globalData: {
userId:'', userId: '',
name:'', name: '',
type:'', type: '',
icon:'', icon: '',
teamNameStorageCount:1, teamNameStorageCount: 1,
runningRecordStorageCount:1, runningRecordStorageCount: 1,
walkingRecordStorageCount:1, walkingRecordStorageCount: 1,
} }
} }
</script> </script>
...@@ -25,6 +50,4 @@ ...@@ -25,6 +50,4 @@
<style lang="scss"> <style lang="scss">
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */ /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss"; @import "@/uni_modules/uview-ui/index.scss";
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册