金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
4.7 KiB

4 years ago
4 years ago
  1. <script>
  2. import {pageLogin, getUrl,wechat,isBirthday} from '@/common/js/utils.js';
  3. export default {
  4. globalData:{
  5. giftLogin:false,
  6. share: false, // 分享默认为false
  7. },
  8. onLaunch: function(e) {
  9. // 进入开屏广告页 TODO 暂时注释
  10. // this.$url('/pages/index/openScreenAd/openScreenAd', {type: 'redirect'});
  11. // #ifdef MP-WEIXIN
  12. var referrerInfo = e.referrerInfo;
  13. if (referrerInfo.appId) {
  14. this.$cookieStorage.set('referrerInfo', referrerInfo);
  15. }
  16. var token = this.$cookieStorage.get('user_token'); // 确保缓存跟当前版本保持一致
  17. const updateManager = wx.getUpdateManager();
  18. updateManager.onCheckForUpdate(res => {
  19. if (res.hasUpdate) {
  20. wx.showLoading({
  21. title: '正在更新,请稍后',
  22. mask: true
  23. })
  24. }
  25. })
  26. updateManager.onUpdateReady(res => {
  27. wx.hideLoading();
  28. wx.showModal({
  29. title: '更新提示',
  30. content: '新版本已经准备好,是否重启应用?',
  31. success: function (res) {
  32. if (res.confirm) {
  33. updateManager.applyUpdate()
  34. }
  35. }
  36. })
  37. })
  38. updateManager.onUpdateFailed(err => {
  39. wx.showModal({
  40. title: '更新提示',
  41. content: '更新失败',
  42. })
  43. })
  44. // #endif
  45. }
  46. };
  47. </script>
  48. <style>
  49. @import url("/components/gaoyia-parse/parse.css");
  50. </style>
  51. <style lang="scss" rel="stylesheet/scss">
  52. @import "@/uview-ui/index.scss";
  53. </style>
  54. <style rel="stylesheet/less" lang="less">
  55. // @import 'common/css/1px.wxss';
  56. // @import 'common/css/font.css';
  57. @import "pages/index/index/index.less";
  58. @import "common/css/iconfont.css";
  59. @import '@/common/styles/theme.css';
  60. /*公共样式*/
  61. @import '@/common/styles/common.css';
  62. @import '@/common/styles/main.css';
  63. @import "@/common/styles/icon.css";
  64. @import "@/common/styles/iconfont.css";
  65. page {
  66. margin: 0;
  67. padding: 0;
  68. border: none;
  69. font-size: 16px;
  70. background-color: white;
  71. line-height: 1.6;
  72. }
  73. .globalColor {
  74. color: #ea4448;
  75. }
  76. .globalBgcolor {
  77. background: #ea4448;
  78. }
  79. .globalBodercolor {
  80. border-color: #ea4448;
  81. }
  82. .bgcolor {
  83. background: #1aad19;
  84. }
  85. .ibrand-author {
  86. text-align: center;
  87. color: #9b9b9b;
  88. font-size: 12px;
  89. margin: 10px 0;
  90. }
  91. .author image {
  92. display: block;
  93. width: 90px;
  94. margin: 10px auto;
  95. }
  96. view {
  97. box-sizing: border-box;
  98. }
  99. uni-page-head {
  100. display: none;
  101. }
  102. // loading加载
  103. .loading-more {
  104. align-items: center;
  105. justify-content: center;
  106. padding-top: 10px;
  107. padding-bottom: 10px;
  108. text-align: center;
  109. font-size: 28rpx;
  110. color: #999;
  111. }
  112. .loading-more-text::before {
  113. content: '';
  114. width: 20px;
  115. height: 20px;
  116. display: inline-block;
  117. vertical-align: middle;
  118. -webkit-animation: weuiLoading 1s steps(12, end) infinite;
  119. animation: weuiLoading 1s steps(12, end) infinite;
  120. background-repeat: no-repeat;
  121. 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");
  122. background-size: 100%;
  123. }
  124. @keyframes weuiLoading {
  125. 0% {
  126. transform: rotate3d(0, 0, 1, 0deg);
  127. }
  128. 100% {
  129. transform: rotate3d(0, 0, 1, 360deg);
  130. }
  131. }
  132. </style>