推广小程序前端代码
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.

274 lines
6.7 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. <template>
  2. <view class="page">
  3. <view class="head-box"></view>
  4. <uv-navbar title=" " bgColor="transparent" height="100rpx"></uv-navbar>
  5. <view class="content">
  6. <view class="search-box">
  7. <view class="search-box-l">
  8. <image class="address-img" src="@/static/image/home/address-icon.png" mode="widthFix"></image>
  9. <view>成都</view>
  10. <image class="sjx-img" src="@/static/image/home/sjx-icon.png" mode="widthFix"></image>
  11. </view>
  12. <view class="search-box-r">
  13. <uv-search placeholder="请输入搜索内容" v-model="keyword" shape="square" :showAction="false" color="#fff" placeholderColor="#BDABAC" :clearabled="false" searchIconColor="#fff" searchIconSize="50rpx" bgColor="#FFB9B9" height="63rpx"></uv-search>
  14. </view>
  15. </view>
  16. <view class="swipe-box">
  17. <uv-swiper :list="list" height="336rpx" radius="30rpx" bgColor="transparent" indicator indicatorMode="dot"></uv-swiper>
  18. </view>
  19. <view class="ydsk-box">
  20. <view class="ydsk-box-title">悦动时刻</view>
  21. <view class="ydsk-box-gird">
  22. <view class="gird-l">
  23. <view class="left-box">
  24. <view class="title-box">
  25. <view>活动签到</view>
  26. <view>签到有好礼</view>
  27. </view>
  28. <view class="btn-box">立即查看</view>
  29. </view>
  30. <image class="hdqd-img" src="@/static/image/home/hdqd-img.png" mode="widthFix"></image>
  31. </view>
  32. <view class="gird-r">
  33. <view class="hd-box">
  34. <view class="left-box">
  35. <view class="title-box">
  36. 活动
  37. </view>
  38. <view class="btn-box">立即查看</view>
  39. </view>
  40. <image class="hdqd-img" src="@/static/image/home/hd-img.png" mode="widthFix"></image>
  41. </view>
  42. <view class="hd-box lx-box">
  43. <view class="left-box">
  44. <view class="title-box">
  45. 旅行
  46. </view>
  47. <view class="btn-box">立即查看</view>
  48. </view>
  49. <image class="hdqd-img" src="@/static/image/home/lx-img.png" mode="widthFix"></image>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <tabber select="home" />
  56. </view>
  57. </template>
  58. <script>
  59. import tabber from '@/components/base/tabbar.vue'
  60. export default {
  61. components:{
  62. tabber
  63. },
  64. data() {
  65. return {
  66. keyword:'',
  67. list: [
  68. 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  69. 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  70. 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  71. ]
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss">
  77. page {
  78. background-color: #060504;
  79. }
  80. </style>
  81. <style scoped lang="scss">
  82. .page {
  83. .head-box {
  84. background: url('@/static/image/nav-bg.png') no-repeat;
  85. background-size: 100% 100%;
  86. width: 100%;
  87. height: 534rpx;
  88. position: absolute;
  89. }
  90. .content {
  91. color: #fff;
  92. padding: 0 30rpx;
  93. padding-top: calc(var(--status-bar-height) + 100rpx);
  94. .search-box {
  95. display: flex;
  96. align-items: center;
  97. margin-bottom: 32rpx;
  98. &-l {
  99. display: flex;
  100. align-items: center;
  101. margin-right: 30rpx;
  102. view {
  103. font-weight: 400;
  104. font-size: 27rpx;
  105. color: #FFFFFF;
  106. margin: 0 18rpx 0 15rpx;
  107. }
  108. .address-img {
  109. width: 26rpx;
  110. }
  111. .sjx-img {
  112. width: 13rpx;
  113. }
  114. }
  115. &-r {
  116. flex:1;
  117. }
  118. }
  119. .swipe-box {
  120. margin-bottom: 41rpx;
  121. }
  122. .ydsk-box {
  123. &-title {
  124. width: 250rpx;
  125. background: url('@/static/image/home/title-bg.png') no-repeat;
  126. background-size: 100% 100%;
  127. text-align: center;
  128. height: 31rpx;
  129. line-height: 31rpx;
  130. font-weight: bold;
  131. font-size: 35rpx;
  132. color: #FFFFFF;
  133. margin: 0 auto 33rpx;
  134. }
  135. &-gird {
  136. display: flex;
  137. justify-content: space-between;
  138. .gird-l {
  139. box-sizing: border-box;
  140. width: 378rpx;
  141. height: 278rpx;
  142. padding: 36rpx 0 24rpx 26rpx;
  143. background: url('@/static/image/home/hdqd-bg.png') no-repeat;
  144. background-size: 100% 100%;
  145. position: relative;
  146. .hdqd-img {
  147. position: absolute;
  148. right: 34rpx;
  149. top: 48rpx;
  150. width: 200rpx;
  151. }
  152. .left-box {
  153. height: 100%;
  154. display: flex;
  155. flex-direction: column;
  156. justify-content: space-between;
  157. .title-box {
  158. view {
  159. font-weight: bold;
  160. font-size: 29rpx;
  161. color: #060504;
  162. &:nth-child(2) {
  163. font-weight: 400;
  164. font-size: 21rpx;
  165. color: #4C4C4C;
  166. margin-top: 20rpx;
  167. }
  168. }
  169. }
  170. .btn-box {
  171. width: 108rpx;
  172. height: 41rpx;
  173. background: url('@/static/image/home/hdqd-btn.png') no-repeat;
  174. background-size: 100% 100%;
  175. font-weight: 500;
  176. font-size: 17rpx;
  177. color: #FFFFFF;
  178. text-align: center;
  179. line-height: 41rpx;
  180. }
  181. }
  182. }
  183. .gird-r {
  184. .hd-box {
  185. width: 288rpx;
  186. height: 130rpx;
  187. padding: 25rpx 0 24rpx 26rpx;
  188. box-sizing: border-box;
  189. background: url('@/static/image/home/hd-bg.png') no-repeat;
  190. background-size: 100% 100%;
  191. position: relative;
  192. .left-box {
  193. height: 100%;
  194. display: flex;
  195. flex-direction: column;
  196. justify-content: space-between;
  197. .title-box {
  198. font-weight: bold;
  199. font-size: 28rpx;
  200. color: #57270F;
  201. }
  202. .btn-box {
  203. width: 98rpx;
  204. height: 35rpx;
  205. background: url('@/static/image/home/hd-btn.png') no-repeat;
  206. background-size: 100% 100%;
  207. font-weight: 500;
  208. font-size: 16rpx;
  209. color: #FFFFFF;
  210. text-align: center;
  211. line-height: 35rpx;
  212. }
  213. }
  214. .hdqd-img {
  215. position: absolute;
  216. right: 22rpx;
  217. top: 25rpx;
  218. width: 123rpx;
  219. }
  220. }
  221. .lx-box {
  222. width: 288rpx;
  223. height: 130rpx;
  224. padding: 25rpx 0 24rpx 26rpx;
  225. box-sizing: border-box;
  226. background: url('@/static/image/home/lx-bg.png') no-repeat;
  227. background-size: 100% 100%;
  228. position: relative;
  229. margin-top: 18rpx;
  230. .left-box {
  231. height: 100%;
  232. display: flex;
  233. flex-direction: column;
  234. justify-content: space-between;
  235. .title-box {
  236. font-weight: bold;
  237. font-size: 28rpx;
  238. color: #57270F;
  239. }
  240. .btn-box {
  241. width: 98rpx;
  242. height: 35rpx;
  243. background: url('@/static/image/home/lx-btn.png') no-repeat;
  244. background-size: 100% 100%;
  245. font-weight: 500;
  246. font-size: 16rpx;
  247. color: #FFFFFF;
  248. text-align: center;
  249. line-height: 35rpx;
  250. }
  251. }
  252. .hdqd-img {
  253. position: absolute;
  254. right: 22rpx;
  255. top: 25rpx;
  256. width: 123rpx;
  257. }
  258. }
  259. }
  260. }
  261. }
  262. }
  263. }
  264. </style>