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.

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