App.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <script>
  2. export default {
  3. onPageNotFound(){
  4. mpvue.reLaunch({
  5. url:'/pages/index/main'
  6. })
  7. },
  8. created() {
  9. // 调用API从本地缓存中获取数据
  10. /*
  11. * 平台 api 差异的处理方式: api 方法统一挂载到 mpvue 名称空间, 平台判断通过 mpvuePlatform 特征字符串
  12. * 微信:mpvue === wx, mpvuePlatform === 'wx'
  13. * 头条:mpvue === tt, mpvuePlatform === 'tt'
  14. * 百度:mpvue === swan, mpvuePlatform === 'swan'
  15. * 支付宝(蚂蚁):mpvue === my, mpvuePlatform === 'my'
  16. */
  17. // let logs
  18. // if (mpvuePlatform === 'my') {
  19. // logs = mpvue.getStorageSync({key: 'logs'}).data || []
  20. // logs.unshift(Date.now())
  21. // mpvue.setStorageSync({
  22. // key: 'logs',
  23. // data: logs
  24. // })
  25. // } else {
  26. // logs = mpvue.getStorageSync('logs') || []
  27. // logs.unshift(Date.now())
  28. // mpvue.setStorageSync('logs', logs)
  29. // }
  30. },
  31. log() {
  32. console.log(`log at:${Date.now()}`)
  33. }
  34. }
  35. </script>
  36. <style>
  37. @import "../static/colorui/main.wxss";
  38. @import "../static/colorui/icon.wxss";
  39. .not_show{
  40. visibility: hidden;
  41. }
  42. .full_img {
  43. width: 100%;
  44. }
  45. .main_banner {
  46. height: 241px;
  47. }
  48. #container {
  49. }
  50. .title_color {
  51. color: #4C4C4C;
  52. }
  53. .cu-btn-primary {
  54. background-image: url("https://img.shuimuai.com/web/Rectangle.png");
  55. background-position: center;
  56. background-size: 100% 100%;
  57. width: 100%;
  58. }
  59. .under_line {
  60. text-decoration: underline;
  61. }
  62. .text-primary {
  63. color: #6858C4;
  64. }
  65. .bg-primary {
  66. background-color: #6858C4;
  67. }
  68. /* this rule will be remove */
  69. * {
  70. transition: width 2s;
  71. -moz-transition: width 2s;
  72. -webkit-transition: width 2s;
  73. -o-transition: width 2s;
  74. margin: 0px;
  75. padding: 0px;
  76. font-family: MicrosoftYaHei-Bold;
  77. }
  78. </style>