123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <script>
- export default {
- globalData: {
- musicTimer: null,
- musicTimerCount: 0,
- postHeader: null,
- systemInfo: null
- },
- beforeDestroy() {
- this.stopMusic()
- },
- onLaunch: function(options) {
- let systemInfo = uni.getSystemInfoSync();
- // #ifdef APP-PLUS
- systemInfo.env = 'app';
- // #endif
- systemInfo.isXS = systemInfo.screenWidth < 768;
- this.globalData.systemInfo = systemInfo;
- console.log(systemInfo);
- // this.globalData.launchPage = this.$Route.path;
- console.log('App Launch');
- let postHeader = {
- from: "gushi",
- uuid: systemInfo.deviceId,
- os: "uni",
- dev_os_version: systemInfo.appVersion,
- device_name: systemInfo.osName,
- screen_size: "[" + systemInfo.screenWidth + "," + systemInfo.screenHeight + "]",
- own_version: "" + systemInfo.appVersionCode,
- channel: "normal",
- ios_version: systemInfo.osVersion,
- country_code: "",
- is_jailbreak: "0",
- is_notification_enable: "0",
- sign: "",
- timestamp: "",
- appid: systemInfo.appId,
- ua: systemInfo.ua
- };
- this.globalData.postHeader = postHeader;
- },
- onShow: function(options) {
- console.log('App Show');
- // setTimeout(()=>{
- // uni.hideTabBar()
- // },100)
- },
- onHide: function() {
- console.log('App Hide');
- },
- onAppBackground() {
- // 在后台继续播放音乐
- },
- methods: {
- }
- };
- </script>
- <style>
- /*每个页面公共css */
- @import 'colorui/main.css';
- @import 'colorui/icon.css';
- @import 'style/FontStyle.css';
- body {
- -webkit-text-size-adjust: none;
- overscroll-behavior-y: contain;
- -webkit-overflow-scrolling: touch;
- }
- /* 超出一行省略号 */
- .one-omit {
- white-space: nowrap;
- /*规定段落中的文本不进行换行*/
- overflow: hidden;
- /*内容会被修剪,并且其余内容是不可见的。*/
- text-overflow: ellipsis;
- /*显示省略号来代表被修剪的文本*/
- }
- .two-omit {
- display: -webkit-box;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-box-orient: vertical;
- }
- img {
- width: 100%;
- }
- uni-modal {
- z-index: 998 !important;
- }
- .cu-modal {
- z-index: 997 !important;
- }
- </style>
|