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.

246 lines
4.7 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <!-- 首页 -->
  2. <template>
  3. <view class="home bx">
  4. <!-- 首页顶部 -->
  5. <view class="home-top content">
  6. <view class="menu-icon">
  7. <!-- <image src="@/static/home/menu.png" mode="aspectFit"></image> -->
  8. </view>
  9. <view class="logo">
  10. <!-- TikTok Shop -->
  11. olx Shop
  12. </view>
  13. <view class="sign">
  14. <image @click="showLanguage = true" src="../../static/home/language.png" mode="widthFix"></image>
  15. </view>
  16. </view>
  17. <view class="home-title content">
  18. <view>{{ $t('page.home.product') }}</view>
  19. </view>
  20. <view class="swiper">
  21. <swiper class="swiper-box" :current="swiperDotIndex" autoplay circular>
  22. <swiper-item v-for="(item,index) in shopList" :key="index">
  23. <view class="swiper-item">
  24. {{ item.image }}
  25. <image :src="item.image" mode="widthFix"></image>
  26. </view>
  27. </swiper-item>
  28. </swiper>
  29. </view>
  30. <view class="home-title content">
  31. <view>{{ $t('page.home.aboutUs') }}</view>
  32. </view>
  33. <view class="about-us"
  34. :style="{'background-image' : `url(${aboutImage})`}">
  35. <view class="about-content">
  36. <view class="title">olx Shop</view>
  37. <!-- <view class="title">{{ $t('page.home.tiktokShop') }}</view> -->
  38. <view class="desc">{{ $t('page.home.company') }}</view>
  39. <view class="click">{{ $t('page.home.introduction') }}</view>
  40. </view>
  41. </view>
  42. <view class="home-title content">
  43. <view>{{ $t('page.home.commission') }}</view>
  44. </view>
  45. <view class="roll">
  46. <virtualScroll :listData="scrollList"></virtualScroll>
  47. </view>
  48. <sTabbar select="0" />
  49. <!-- 弹窗 -->
  50. <popUpWindow :show="showPopUp" @close="closePopUp"></popUpWindow>
  51. <!-- 选择语言弹框 -->
  52. <changeLanguage :show.sync="showLanguage" @close="closeLanguage"></changeLanguage>
  53. </view>
  54. </template>
  55. <script>
  56. import sTabbar from '@/components/base/tabBar.vue'
  57. import popUpWindow from '../../components/popUpWindow/popUpWindow.vue'
  58. import virtualScroll from '../../components/virtualScroll/virtualScroll.vue'
  59. import changeLanguage from '@/components/changeLanguage/changeLanguage.vue'
  60. export default {
  61. components: {
  62. sTabbar,
  63. popUpWindow,
  64. virtualScroll,
  65. changeLanguage
  66. },
  67. data() {
  68. return {
  69. showPopUp: false, //是否显示弹窗
  70. showLanguage: false, //是否显示切换语言
  71. swiperDotIndex: 0, //当前轮播图index
  72. shopList : [], //商品列表
  73. scrollList : [], //提现滚动列表
  74. aboutImage : '',
  75. }
  76. },
  77. onShow() {
  78. this.getShopList()
  79. this.getIndexScroll()
  80. },
  81. methods: {
  82. //关闭语言选项
  83. closeLanguage() {
  84. this.$play()
  85. this.showLanguage = false;
  86. },
  87. //获取商品轮播
  88. getShopList(){
  89. this.request('shopPage').then(res => {
  90. this.shopList = res.result.records
  91. })
  92. this.request('getImageIndex').then(res => {
  93. this.aboutImage = res.result.title
  94. })
  95. },
  96. //获取首页提现滚动
  97. getIndexScroll(){
  98. this.request('getIndexScroll').then(res => {
  99. this.scrollList = res.result
  100. })
  101. }
  102. }
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .home {
  107. width: 750rpx;
  108. min-height: 100vh;
  109. margin: 0 auto;
  110. background-size: 100%;
  111. background-repeat: no-repeat;
  112. padding-bottom: 120rpx;
  113. .content {
  114. width: 96%;
  115. margin: 0 auto;
  116. }
  117. .home-top {
  118. display: flex;
  119. justify-content: space-between;
  120. align-items: center;
  121. height: 60rpx;
  122. padding: 20rpx 0rpx;
  123. .menu-icon {
  124. image {
  125. width: 50rpx;
  126. height: 50rpx;
  127. }
  128. }
  129. .logo {
  130. color: uni-bg-color-app;
  131. font-weight: bold;
  132. font-size: 32rpx;
  133. }
  134. .sign {
  135. image {
  136. width: 60rpx;
  137. }
  138. }
  139. }
  140. .home-title {
  141. position: relative;
  142. display: flex;
  143. justify-content: center;
  144. align-items: center;
  145. font-size: 36rpx;
  146. height: 120rpx;
  147. &::before,
  148. &::after {
  149. position: absolute;
  150. top: 50%;
  151. content: '';
  152. width: 20%;
  153. border-top: 2rpx solid black;
  154. }
  155. &::before {
  156. left: 10%;
  157. }
  158. &::after {
  159. right: 10%;
  160. }
  161. }
  162. .swiper {
  163. .swiper-box {
  164. height: 200px;
  165. }
  166. .swiper-item {
  167. /* #ifndef APP-NVUE */
  168. display: flex;
  169. /* #endif */
  170. flex-direction: column;
  171. justify-content: center;
  172. align-items: center;
  173. height: 200px;
  174. color: #fff;
  175. image {
  176. width: 50%;
  177. }
  178. }
  179. }
  180. .about-us ,
  181. .roll {
  182. display: flex;
  183. align-items: center;
  184. background-image: url('@/static/home/bg.jpeg');
  185. background-size: 100%;
  186. height: 400rpx;
  187. .about-content {
  188. padding: 10% 0rpx 0rpx 5%;
  189. .title ,
  190. .click {
  191. font-size: 40rpx;
  192. font-weight: bold;
  193. }
  194. .desc {
  195. font-size: 20rpx;
  196. color: #464648;
  197. }
  198. .click {
  199. font-size: 22rpx;
  200. }
  201. }
  202. }
  203. .roll {
  204. background-image: url('@/static/home/bg1.jpg');
  205. }
  206. }
  207. </style>