爱简收旧衣按件回收前端代码仓库
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.

90 lines
1.9 KiB

3 weeks ago
1 week ago
3 weeks ago
1 week ago
1 week ago
3 weeks ago
1 week ago
1 week ago
3 weeks ago
1 week ago
3 weeks ago
1 week ago
3 weeks ago
1 week ago
3 weeks ago
1 week ago
1 week ago
3 weeks ago
1 week ago
1 week ago
3 weeks ago
  1. <script>
  2. import routerInterception from '@/utils/router-interception.js'
  3. export default {
  4. globalData: {
  5. flag: 1,
  6. login_status:true,
  7. phone:null,
  8. bannerList: [],
  9. pricePreviewList: []
  10. },
  11. onLaunch: function() {
  12. routerInterception()
  13. this.getBannerList()
  14. this.getPricePreviewList()
  15. // console.log(this.$utils)
  16. console.log('App Launch')
  17. },
  18. onLoad: function() {
  19. this.getBannerList()
  20. console.log('App Show')
  21. },
  22. onHide: function() {
  23. console.log('App Hide')
  24. },
  25. methods: {
  26. getBannerList() {
  27. // 假设 this.$api 可用
  28. this.$api && this.$api('getBanner', {}, res => {
  29. if (res && res.code === 200 && Array.isArray(res.result)) {
  30. getApp().globalData.bannerList = res.result
  31. console.log(getApp().globalData.bannerList,'bannerList')
  32. uni.$emit('bannerListUpdated')
  33. }
  34. })
  35. },
  36. getPricePreviewList() {
  37. this.$api && this.$api('getPricePreviewClassList', {}, res => {
  38. if (res && res.success && Array.isArray(res.result)) {
  39. getApp().globalData.pricePreviewList = res.result
  40. uni.$emit('pricePreviewListUpdated')
  41. }
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style >
  48. /* // @import "./uni_modules/vk-uview-ui/index.scss"; */
  49. /*每个页面公共css */
  50. .uni-tabbar-bottom{
  51. display: none;
  52. }
  53. .icon {
  54. width: 50rpx;
  55. height: 50rpx;
  56. }
  57. .nav-bar{
  58. /* margin-top: calc(70rpx + env(safe-area-inset-top)); */
  59. height: 30%;
  60. display: flex;
  61. justify-content: center;
  62. }
  63. /* 每个页面公共css */
  64. /* 解决小程序和app滚动条的问题 */
  65. ::-webkit-scrollbar {
  66. display: none;
  67. width: 0 !important;
  68. height: 0 !important;
  69. -webkit-appearance: none;
  70. background: transparent;
  71. color: transparent;
  72. }
  73. /* 解决H5的问题 */
  74. uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
  75. display: none;
  76. width: 0 !important;
  77. height: 0 !important;
  78. -webkit-appearance: none;
  79. background: transparent;
  80. color: transparent;
  81. }
  82. </style>