金诚优选前端代码
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.

113 lines
2.5 KiB

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: #F3F3F3;
  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. </style>