index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view style="background-color: #FFFFFF;height: 100%;">
  3. <view class="status_bar">
  4. <!-- 这里是状态栏 -->
  5. </view>
  6. <view class="u-page" style="margin-bottom: 20rpx;">
  7. <view class="u-m-t-20">
  8. <u-swiper :list="tabbarList" :height="310" :effect3d="true" border-radius="20" effect3d-previous-margin="20" bg-color="#FFF"></u-swiper>
  9. </view>
  10. <view class="u-flex u-m-t-20 u-m-l-20 u-m-r-20">
  11. <view class="u-flex u-row-center" style="width: 450rpx; height: 70rpx;border-radius: 50rpx;background: rgba(52,140,245,0.1);font-size: 20rpx;color: #348CF5; font-size: 500;">
  12. <u-image width="45rpx" height="35rpx" src="../../static/sailun/speaker.png" style="margin:10rpx;"></u-image>公告
  13. </view>
  14. <u-notice-bar mode="horizontal" :list="noticebarList" :volume-icon="false" bg-color="#FFF" color="#2B2B2B" padding="18rpx 12rpx"></u-notice-bar>
  15. </view>
  16. <view class="u-flex u-m-t-20 u-row-around u-m-l-10 u-m-r-10">
  17. <u-image width="350rpx" src="../../static/sailun/scan_in.png" @click="scancodeIn" mode="widthFix"></u-image>
  18. <u-image width="350rpx" src="../../static/sailun/scan_out.png" @click="scancodeOut" mode="widthFix"></u-image>
  19. </view>
  20. <view class="u-m-t-20">
  21. <view class="u-m-l-30" style="font-size: 34rpx;">
  22. 快捷服务
  23. </view>
  24. <view class="u-flex u-flex-wrap u-row-center">
  25. <u-image width="350rpx" height="212rpx" src="../../static/sailun/1.png" style="margin: 10rpx;box-shadow:0rpx 0rpx 20rpx rgba(0,0,0,0.2);border-radius: 30rpx;"
  26. @click="inStock"></u-image>
  27. <u-image width="350rpx" height="212rpx" src="../../static/sailun/2.png" style="margin: 10rpx;box-shadow:0rpx 0rpx 20rpx rgba(0,0,0,0.2);border-radius: 30rpx;"></u-image>
  28. <u-image width="350rpx" height="212rpx" src="../../static/sailun/3.png" style="margin: 10rpx;box-shadow:0rpx 0rpx 20rpx rgba(0,0,0,0.2);border-radius: 30rpx;"
  29. @click="inInlineshop"></u-image>
  30. <u-image width="350rpx" height="212rpx" src="../../static/sailun/4.png" style="margin: 10rpx;box-shadow:0rpx 0rpx 20rpx rgba(0,0,0,0.2);border-radius: 30rpx;"
  31. @click="inIntegral"></u-image>
  32. </view>
  33. </view>
  34. <view class="" @click="ceshi">
  35. 测试接口是否连接
  36. </view>
  37. <view class="u-flex u-row-center u-m-t-30">
  38. <u-image width="680rpx" src="../../static/sailun/88reward.png" mode="widthFix"></u-image>
  39. </view>
  40. </view>
  41. <!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
  42. <!-- <u-tabbar v-model="current" :list="list"></u-tabbar> -->
  43. </view>
  44. </template>
  45. <script>
  46. import {request} from '../../common/request/request'
  47. export default {
  48. data() {
  49. return {
  50. tabbarList: [{
  51. image: '../../static/sailun/swiper1.png'
  52. },
  53. {
  54. image: '../../static/sailun/swiper1.png'
  55. },
  56. {
  57. image: '../../static/sailun/swiper1.png'
  58. }
  59. ],
  60. noticebarList: ['恭喜您获得10000000元积分红包', '恭喜您获得10000000元积分红包', '恭喜您获得10000000元积分红包'],
  61. };
  62. },
  63. methods: {
  64. ceshi(){
  65. request({
  66. url: '/homepage/getBanners',
  67. }).then(res => {
  68. console.log(res)
  69. }).catch(err => {
  70. console.log(err)
  71. }).finally(() => {
  72. Loading.close()
  73. })
  74. },
  75. scancodeIn() {
  76. this.$u.route({
  77. url: 'pages/home/scancode/index',
  78. })
  79. },
  80. scancodeOut() {
  81. this.$u.route({
  82. url: 'pages/home/scancode/index',
  83. })
  84. },
  85. inStock() {
  86. this.$u.route({
  87. url: 'pages/home/my-stock/my-stock',
  88. })
  89. },
  90. inInlineshop() {
  91. this.$u.route({
  92. url: 'pages/home/inline-shop/inline_shop',
  93. })
  94. },
  95. inIntegral() {
  96. this.$u.route({
  97. url: 'pages/home/integral-mall/integral_mall',
  98. })
  99. }
  100. }
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .status_bar {
  105. height: var(--status-bar-height);
  106. width: 100%;
  107. background-color: #FFF;
  108. }
  109. </style>