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.

266 lines
5.1 KiB

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