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

304 lines
7.3 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 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 class="hd-list">
  55. <uv-tabs
  56. @click= "tabs"
  57. :list="hdList"
  58. lineWidth="50rpx"
  59. :lineColor="`url(${lineBg}) 100% 100%`"
  60. :activeStyle="{
  61. color: '#fff',
  62. fontWeight: 'bold',
  63. transform: 'scale(1.05)'
  64. }"
  65. :inactiveStyle="{
  66. color: '#999',
  67. transform: 'scale(1)'
  68. }"
  69. itemStyle="padding-left: 15px; padding-right: 15px; height: 44px;"
  70. ></uv-tabs>
  71. </view>
  72. </view>
  73. <tabber select="home" />
  74. </view>
  75. </template>
  76. <script>
  77. import tabber from '@/components/base/tabbar.vue'
  78. export default {
  79. components:{
  80. tabber
  81. },
  82. data() {
  83. return {
  84. keyword:'',
  85. list: [
  86. 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  87. 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  88. 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  89. ],
  90. hdList: [
  91. { id: 0, name: '近期活动' },
  92. { id: 1, name: '往期活动' },
  93. ],
  94. lineBg: require('@/static/image/cart/tabIcon.png')
  95. }
  96. },
  97. methods:{
  98. tabs(val) {
  99. console.log(val);
  100. }
  101. }
  102. }
  103. </script>
  104. <style lang="scss">
  105. page {
  106. background-color: #060504;
  107. }
  108. </style>
  109. <style scoped lang="scss">
  110. .page {
  111. .head-box {
  112. background: url('@/static/image/nav-bg.png') no-repeat;
  113. background-size: 100% 100%;
  114. width: 100%;
  115. height: 534rpx;
  116. position: absolute;
  117. }
  118. .content {
  119. color: #fff;
  120. padding: 0 30rpx;
  121. padding-top: calc(var(--status-bar-height) + 100rpx);
  122. .search-box {
  123. display: flex;
  124. align-items: center;
  125. margin-bottom: 32rpx;
  126. &-l {
  127. display: flex;
  128. align-items: center;
  129. margin-right: 30rpx;
  130. view {
  131. font-weight: 400;
  132. font-size: 27rpx;
  133. color: #FFFFFF;
  134. margin: 0 18rpx 0 15rpx;
  135. }
  136. .address-img {
  137. width: 26rpx;
  138. }
  139. .sjx-img {
  140. width: 13rpx;
  141. }
  142. }
  143. &-r {
  144. flex:1;
  145. }
  146. }
  147. .swipe-box {
  148. margin-bottom: 41rpx;
  149. }
  150. .ydsk-box {
  151. margin-bottom: 10rpx;
  152. &-title {
  153. width: 250rpx;
  154. background: url('@/static/image/home/title-bg.png') no-repeat;
  155. background-size: 100% 100%;
  156. text-align: center;
  157. height: 31rpx;
  158. line-height: 31rpx;
  159. font-weight: bold;
  160. font-size: 35rpx;
  161. color: #FFFFFF;
  162. margin: 0 auto 33rpx;
  163. }
  164. &-gird {
  165. display: flex;
  166. justify-content: space-between;
  167. .gird-l {
  168. box-sizing: border-box;
  169. width: 378rpx;
  170. height: 278rpx;
  171. padding: 36rpx 0 24rpx 26rpx;
  172. background: url('@/static/image/home/hdqd-bg.png') no-repeat;
  173. background-size: 100% 100%;
  174. position: relative;
  175. .hdqd-img {
  176. position: absolute;
  177. right: 34rpx;
  178. top: 48rpx;
  179. width: 200rpx;
  180. }
  181. .left-box {
  182. height: 100%;
  183. display: flex;
  184. flex-direction: column;
  185. justify-content: space-between;
  186. .title-box {
  187. view {
  188. font-weight: bold;
  189. font-size: 29rpx;
  190. color: #060504;
  191. &:nth-child(2) {
  192. font-weight: 400;
  193. font-size: 21rpx;
  194. color: #4C4C4C;
  195. margin-top: 20rpx;
  196. }
  197. }
  198. }
  199. .btn-box {
  200. width: 108rpx;
  201. height: 41rpx;
  202. background: url('@/static/image/home/hdqd-btn.png') no-repeat;
  203. background-size: 100% 100%;
  204. font-weight: 500;
  205. font-size: 17rpx;
  206. color: #FFFFFF;
  207. text-align: center;
  208. line-height: 41rpx;
  209. }
  210. }
  211. }
  212. .gird-r {
  213. .hd-box {
  214. width: 288rpx;
  215. height: 130rpx;
  216. padding: 25rpx 0 24rpx 26rpx;
  217. box-sizing: border-box;
  218. background: url('@/static/image/home/hd-bg.png') no-repeat;
  219. background-size: 100% 100%;
  220. position: relative;
  221. .left-box {
  222. height: 100%;
  223. display: flex;
  224. flex-direction: column;
  225. justify-content: space-between;
  226. .title-box {
  227. font-weight: bold;
  228. font-size: 28rpx;
  229. color: #57270F;
  230. }
  231. .btn-box {
  232. width: 98rpx;
  233. height: 35rpx;
  234. background: url('@/static/image/home/hd-btn.png') no-repeat;
  235. background-size: 100% 100%;
  236. font-weight: 500;
  237. font-size: 16rpx;
  238. color: #FFFFFF;
  239. text-align: center;
  240. line-height: 35rpx;
  241. }
  242. }
  243. .hdqd-img {
  244. position: absolute;
  245. right: 22rpx;
  246. top: 25rpx;
  247. width: 123rpx;
  248. }
  249. }
  250. .lx-box {
  251. width: 288rpx;
  252. height: 130rpx;
  253. padding: 25rpx 0 24rpx 26rpx;
  254. box-sizing: border-box;
  255. background: url('@/static/image/home/lx-bg.png') no-repeat;
  256. background-size: 100% 100%;
  257. position: relative;
  258. margin-top: 18rpx;
  259. .left-box {
  260. height: 100%;
  261. display: flex;
  262. flex-direction: column;
  263. justify-content: space-between;
  264. .title-box {
  265. font-weight: bold;
  266. font-size: 28rpx;
  267. color: #57270F;
  268. }
  269. .btn-box {
  270. width: 98rpx;
  271. height: 35rpx;
  272. background: url('@/static/image/home/lx-btn.png') no-repeat;
  273. background-size: 100% 100%;
  274. font-weight: 500;
  275. font-size: 16rpx;
  276. color: #FFFFFF;
  277. text-align: center;
  278. line-height: 35rpx;
  279. }
  280. }
  281. .hdqd-img {
  282. position: absolute;
  283. right: 22rpx;
  284. top: 25rpx;
  285. width: 123rpx;
  286. }
  287. }
  288. }
  289. }
  290. }
  291. }
  292. }
  293. </style>