<script>
import {pageLogin, getUrl,wechat,isBirthday} from '@/common/js/utils.js';
	
export default {
	globalData:{
		 giftLogin:false,
		 share: false,  // 分享默认为false
	},
	onLaunch: function(e) {
		// 进入开屏广告页 TODO 暂时注释
		// this.$url('/pages/index/openScreenAd/openScreenAd', {type: 'redirect'});
		
		// #ifdef MP-WEIXIN
		var referrerInfo = e.referrerInfo;
        if (referrerInfo.appId) {
           this.$cookieStorage.set('referrerInfo', referrerInfo);
       }
        var token = this.$cookieStorage.get('user_token');   // 确保缓存跟当前版本保持一致

        const updateManager = wx.getUpdateManager();

        updateManager.onCheckForUpdate(res => {
            if (res.hasUpdate) {
                wx.showLoading({
                    title: '正在更新，请稍后',
                    mask: true
                })
            }
        })

        updateManager.onUpdateReady(res => {
            wx.hideLoading();
            wx.showModal({
                title: '更新提示',
                content: '新版本已经准备好，是否重启应用？',
                success: function (res) {
                    if (res.confirm) {
                        updateManager.applyUpdate()
                    }
                }
            })
        })

        updateManager.onUpdateFailed(err => {
            wx.showModal({
                title: '更新提示',
                content: '更新失败',
            })
        })
      
		// #endif
	}
   
};
</script>

<style>
@import url("/components/gaoyia-parse/parse.css");
</style>
<style lang="scss" rel="stylesheet/scss">
	@import "@/uview-ui/index.scss";
	@import '@/common/styles/theme.css';
	@import '@/common/styles/common.css';
	@import '@/common/styles/main.css';
	@import "@/common/styles/icon.css";
	@import "@/common/styles/iconfont.css";
</style>
<style rel="stylesheet/less" lang="less">
@import 'common/css/1px.wxss';
@import 'common/css/font.css';
@import "pages/index/index/index.less";
@import "common/css/iconfont.css";

page {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 16px;
    background-color: #F3F3F3;
    line-height: 1.6;
}
.globalColor {
	color: #ea4448;
}
.globalBgcolor {
	background: #ea4448;
}
.globalBodercolor {
	border-color: #ea4448;
}
.bgcolor {
	background: #1aad19;
}
.ibrand-author {
	text-align: center;
	color: #9b9b9b;
	font-size: 12px;
	margin: 10px 0;
}
.author image {
	display: block;
	width: 90px;
	margin: 10px auto;
}
view {
	box-sizing: border-box;
}
uni-page-head {
    display: none;
}
</style>
