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.

239 lines
4.4 KiB

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