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

103 lines
2.3 KiB

  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 rel="stylesheet/less" lang="less">
  52. @import 'common/css/1px.wxss';
  53. @import 'common/css/font.css';
  54. @import "pages/index/index/index.less";
  55. @import "common/css/iconfont.css";
  56. page {
  57. margin: 0;
  58. padding: 0;
  59. border: none;
  60. font-size: 16px;
  61. background-color: #F3F3F3;
  62. line-height: 1.6;
  63. }
  64. .globalColor {
  65. color: #ea4448;
  66. }
  67. .globalBgcolor {
  68. background: #ea4448;
  69. }
  70. .globalBodercolor {
  71. border-color: #ea4448;
  72. }
  73. .bgcolor {
  74. background: #1aad19;
  75. }
  76. .ibrand-author {
  77. text-align: center;
  78. color: #9b9b9b;
  79. font-size: 12px;
  80. margin: 10px 0;
  81. }
  82. .author image {
  83. display: block;
  84. width: 90px;
  85. margin: 10px auto;
  86. }
  87. view {
  88. box-sizing: border-box;
  89. }
  90. uni-page-head {
  91. display: none;
  92. }
  93. </style>