<script>
import {pageLogin, getUrl,wechat,isBirthday} from '@/common/js/utils.js';
	
export default {
	globalData:{
		 giftLogin:false,
		 share: false,  // 分享默认为false
		 app_first_full: true,
		 app_first_alert: true
	},
	onLaunch: function(e) {
		// #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";
</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";
@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";

page {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 16px;
    background-color: white;
    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;
}

// loading加载
	.loading-more {
		align-items: center;
		justify-content: center;
		padding-top: 10px;
		padding-bottom: 10px;
		text-align: center;
		font-size: 28rpx;
		color: #999;
	}
	.loading-more-text::before {
		content: '';
		width: 20px;
		height: 20px;
		display: inline-block;
		vertical-align: middle;
		-webkit-animation: weuiLoading 1s steps(12, end) infinite;
		animation: weuiLoading 1s steps(12, end) infinite;
		background-repeat: no-repeat;
		background-image: url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E");
		background-size: 100%;
	}
	@keyframes weuiLoading {
		0% {
			transform: rotate3d(0, 0, 1, 0deg);
		}
		100% {
			transform: rotate3d(0, 0, 1, 360deg);
		}
	}
</style>
