123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <script>
- export default {
- data(){
- return{
- lastTapTime: 0,
- }
- },
- onLaunch: function() {
- console.log('App Launch');
-
- var info = plus.push.getClientInfo();
- console.log(JSON.stringify(info));
- uni.setStorageSync('clientid', info.clientid);
-
-
- plus.push.addEventListener("receive", function(msg) {
- console.log("(receive):" + JSON.stringify(msg));
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }, false);
-
-
-
- plus.push.addEventListener("click", function(msg) {
- console.log("(click):" + JSON.stringify(msg));
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }, false);
-
- },
- onShow: function() {
- console.log('App Show');
- let that = this
-
- plus.key.addEventListener('backbutton', that.handleBackButton)
-
-
-
-
- },
- onHide: function() {
- console.log('App Hide');
- let that = this
-
- plus.key.removeEventListener('backbutton', that.handleBackButton)
-
-
-
-
-
- },
- methods: {
- handleBackButton() {
- let currentTime = new Date().getTime();
- if (currentTime - this.lastTapTime < 500) {
-
- console.log('双击了返回键');
-
- plus.runtime.quit();
- }
- this.lastTapTime = currentTime;
- }
- }
- }
- </script>
- <style>
- @import url("./static/font/iconfont.css");
- @import url("/node_modules/spinkit/spinkit.css");
- /*每个页面公共css */
- html {
- width: 100%;
- height: 100%;
- background: #f9fafb;
- --sk-size: 20rpx !important;
- --sk-color: #49b856 !important;
- }
- body {
- height: 100%;
- box-sizing: border-box;
- /* padding-top: 96rpx; */
- font-family: "Helvetica Neue";
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- }
- #app {
- margin: 0px;
- padding: 0px;
- text-align: center;
- font-size: 14px;
- color: rgb(51, 51, 51);
- width: 100%;
- height: 100%;
- }
- /* 按钮点击态 */
- .seimin-btn-hover {
- box-shadow: 0px 0px 8px rgba(0, 0, 0, .1) inset !important;
- }
- .uni-picker-action-confirm {
- color: #49b856 !important;
- }
-
- .selected-item-active{
- border-color: #49b856 !important;;
- }
-
- .footerPadding {
- padding-bottom: 50rpx !important;
- }
- .footerOtherMargin {
- padding-bottom: 174rpx !important;
- }
- .red {
- color: red !important;
- }
- .fweight {
- font-weight: bold !important;
- }
- .f30 {
- font-size: 30rpx !important;
- }
- .mt8{
- margin-top: 16rpx !important;
- }
- .check{
- border-color:#49b856 !important;
- }
- </style>
|