App.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!-- App.vue -->
  2. <script>
  3. export default {
  4. onLaunch: function() {
  5. console.log('App Launch')
  6. },
  7. onShow: function(options) {
  8. console.log('App Show')
  9. //传递的参数 query
  10. if (options.query) {
  11. const shareADId = options.query.shareADId;
  12. const shareUserId = options.query.shareUserId;
  13. if(shareADId&&shareUserId) {
  14. uni.reLaunch({
  15. url: `/pagesHome/activityDetail?shareADId=${shareADId}&shareUserId=${shareUserId}`
  16. });
  17. }
  18. }
  19. },
  20. onHide: function() {
  21. console.log('App Hide')
  22. }
  23. }
  24. </script>
  25. <style lang="scss">
  26. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  27. @import "uview-plus/index.scss";
  28. .tab_page{
  29. background: #F7F7F7;
  30. padding: 0 24rpx 184rpx;
  31. box-sizing: border-box;
  32. }
  33. .common_page{
  34. background: #F7F7F7;
  35. padding: 0 24rpx 40rpx;
  36. box-sizing: border-box;
  37. }
  38. .top_bg_img{
  39. width: 100%;
  40. position: fixed;
  41. top: 0;
  42. left: 0;
  43. }
  44. .adf{
  45. display: flex;
  46. }
  47. .adffc{
  48. display: flex;
  49. flex-direction: column;
  50. }
  51. .adfac{
  52. display: flex;
  53. align-items: center;
  54. }
  55. .adfacjc{
  56. display: flex;
  57. align-items: center;
  58. justify-content: center;
  59. }
  60. .adfacjb{
  61. display: flex;
  62. align-items: center;
  63. justify-content: space-between;
  64. }
  65. .adffcjb{
  66. display: flex;
  67. flex-direction: column;
  68. justify-content: space-between;
  69. }
  70. .adffcacjc{
  71. display: flex;
  72. flex-direction: column;
  73. align-items: center;
  74. justify-content: center;
  75. }
  76. .adffcac{
  77. display: flex;
  78. flex-direction: column;
  79. align-items: center;
  80. }
  81. .adffcacjb{
  82. display: flex;
  83. flex-direction: column;
  84. align-items: center;
  85. justify-content: space-between;
  86. }
  87. .dataEmpty{
  88. flex: 1;
  89. display: flex;
  90. flex-direction: column;
  91. align-items: center;
  92. justify-content: center;
  93. }
  94. </style>