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

109 lines
2.4 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. // #ifdef MP-WEIXIN
  10. var referrerInfo = e.referrerInfo;
  11. if (referrerInfo.appId) {
  12. this.$cookieStorage.set('referrerInfo', referrerInfo);
  13. }
  14. var token = this.$cookieStorage.get('user_token'); // 确保缓存跟当前版本保持一致
  15. const updateManager = wx.getUpdateManager();
  16. updateManager.onCheckForUpdate(res => {
  17. if (res.hasUpdate) {
  18. wx.showLoading({
  19. title: '正在更新,请稍后',
  20. mask: true
  21. })
  22. }
  23. })
  24. updateManager.onUpdateReady(res => {
  25. wx.hideLoading();
  26. wx.showModal({
  27. title: '更新提示',
  28. content: '新版本已经准备好,是否重启应用?',
  29. success: function (res) {
  30. if (res.confirm) {
  31. updateManager.applyUpdate()
  32. }
  33. }
  34. })
  35. })
  36. updateManager.onUpdateFailed(err => {
  37. wx.showModal({
  38. title: '更新提示',
  39. content: '更新失败',
  40. })
  41. })
  42. // #endif
  43. }
  44. };
  45. </script>
  46. <style>
  47. @import url("/components/gaoyia-parse/parse.css");
  48. </style>
  49. <style lang="scss" scoped>
  50. // @import "@/uview-ui/index.scss";
  51. </style>
  52. <style rel="stylesheet/less" lang="less">
  53. @import 'common/css/1px.wxss';
  54. @import 'common/css/font.css';
  55. @import "pages/index/index/index.less";
  56. @import "common/css/iconfont.css";
  57. @import '@/common/styles/theme.css';
  58. /*公共样式*/
  59. @import '@/common/styles/common.css';
  60. @import '@/common/styles/main.css';
  61. @import "@/common/styles/icon.css";
  62. @import "@/common/styles/iconfont.css";
  63. page {
  64. margin: 0;
  65. padding: 0;
  66. border: none;
  67. font-size: 16px;
  68. background-color: #F3F3F3;
  69. line-height: 1.6;
  70. }
  71. .globalColor {
  72. color: #ea4448;
  73. }
  74. .globalBgcolor {
  75. background: #ea4448;
  76. }
  77. .globalBodercolor {
  78. border-color: #ea4448;
  79. }
  80. .bgcolor {
  81. background: #1aad19;
  82. }
  83. .ibrand-author {
  84. text-align: center;
  85. color: #9b9b9b;
  86. font-size: 12px;
  87. margin: 10px 0;
  88. }
  89. .author image {
  90. display: block;
  91. width: 90px;
  92. margin: 10px auto;
  93. }
  94. view {
  95. box-sizing: border-box;
  96. }
  97. uni-page-head {
  98. display: none;
  99. }
  100. </style>