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

412 lines
9.4 KiB

2 months ago
2 months ago
2 months ago
  1. <template>
  2. <view>
  3. <view class="head-box"></view>
  4. <uv-navbar autoBack title="活动详情" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
  5. <view class="content">
  6. <view class="content-head">
  7. <image class="image-box" src="https://cdn.uviewui.com/uview/swiper/swiper3.png" mode=""></image>
  8. <view class="msg-box">
  9. <view class="msg-box-title">泰酷辣-清迈治愈之旅</view>
  10. <view class="msg-box-time">开始时间2024.12.28 10:00</view>
  11. <view class="msg-box-address">
  12. <view class="msg-box-address-text">活动地址黄金海岸草场浴池中心广场</view>
  13. <view class="address-icon">
  14. <image src="@/static/image/home/address-icon-2.png" mode=""></image>
  15. <view>导航</view>
  16. </view>
  17. </view>
  18. <view class="lingdui-box">
  19. <image class="use-img" src="@/static/image/center/3.png" mode=""></image>
  20. <view class="lingdui-msg">
  21. <view class="lingdui-msg-name">
  22. <view>VTrip微程</view>
  23. <view class="name-tip">主理人</view>
  24. </view>
  25. <view>
  26. <uv-rate :count="count" v-model="value" size="23" activeColor="#FFA200"></uv-rate>
  27. </view>
  28. </view>
  29. <view class="add-wx">添加微信</view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="lv-miaoshu">
  34. <view class="title-box">活动描述</view>
  35. <view class="value-box">
  36. <view class="lv-msg-box">
  37. 当金黄的落叶轻柔地铺满了小城的每个角落我们知道最温柔的季节已悄然而至在这个收获的季节里我们诚挚邀请您加入我们的秋日私旅
  38. </view>
  39. </view>
  40. <view class="title-box">注意事项</view>
  41. <view class="value-box">
  42. <view class="lv-msg-box">
  43. 当金黄的落叶轻柔地铺满了小城的每个角落我们知道最温柔的季节已悄然而至在这个收获的季节里我们诚挚邀请您加入我们的秋日私旅
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="bottom-box">
  49. <view class="price-box">
  50. <view class="peice-val"><text></text>3000</view>
  51. <view>报名费用</view>
  52. </view>
  53. <view class="caozuo-box">
  54. <view class="caozuo-item border-r">
  55. <image src="@/static/image/home/shoucang-icon.png" mode=""></image>
  56. <view>收藏</view>
  57. </view>
  58. <view class="caozuo-item">
  59. <image src="@/static/image/home/zhuanfa-icon.png" mode=""></image>
  60. <view>转发</view>
  61. </view>
  62. </view>
  63. <view class="btn-box" @click="toBaoming">立即报名</view>
  64. <!-- <view class="btn-box end-btn">已结束</view> -->
  65. </view>
  66. <uv-popup ref="popup" mode="bottom" bgColor="">
  67. <view class="popup-cont">
  68. <view class="popup-title">
  69. <view></view>
  70. <view>选择活动状态</view>
  71. <uv-icon name="close" color="#fff" @click="$refs.popup.close();"></uv-icon>
  72. </view>
  73. <view class="popup-list">
  74. <view class="list-item" v-for="(item,i) in typeList" :key="i" @click="chooseClick(item,i)">
  75. <view class="item-l" :class="chooseIndex == i ? 'chooose-class' : ''">
  76. <view>{{item.name}}</view>
  77. <view class="item-l-val">{{item.price}}</view>
  78. </view>
  79. <uv-icon name="checkmark" color="#FF5858" v-if="chooseIndex == i"></uv-icon>
  80. </view>
  81. </view>
  82. <view class="confirm-box">
  83. <uv-button @click="confirmClick" text="确定" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
  84. </view>
  85. </view>
  86. </uv-popup>
  87. </view>
  88. </template>
  89. <script>
  90. export default{
  91. data() {
  92. return {
  93. btnCustomStyle:{
  94. color:'#FF5858'
  95. },
  96. chooseIndex:0,
  97. bgColor:'transparent',
  98. count:5,
  99. value:3,
  100. typeList:[
  101. {
  102. name:'早鸟票',
  103. price:'168'
  104. },
  105. {
  106. name:'单人票',
  107. price:'198'
  108. },
  109. {
  110. name:'尊享票',
  111. price:'268'
  112. }
  113. ]
  114. }
  115. },
  116. onPageScroll(e) {
  117. if(e.scrollTop > 50) {
  118. this.bgColor = '#49070c'
  119. }else{
  120. this.bgColor = 'transparent'
  121. }
  122. },
  123. methods:{
  124. toBaoming() {
  125. this.$refs.popup.open();
  126. },
  127. chooseClick(item,i) {
  128. this.chooseIndex = i
  129. },
  130. confirmClick() {
  131. }
  132. }
  133. }
  134. </script>
  135. <style lang="scss">
  136. page {
  137. background-color: #060504;
  138. }
  139. </style>
  140. <style lang="scss" scoped>
  141. .head-box {
  142. background: url('@/static/image/nav-bg.png') no-repeat;
  143. background-size: 100% 100%;
  144. width: 100%;
  145. height: 534rpx;
  146. position: absolute;
  147. z-index: -1;
  148. }
  149. .content {
  150. padding: 0 30rpx 170rpx;
  151. padding-top: calc(var(--status-bar-height) + 110rpx);
  152. .content-head {
  153. position: relative;
  154. .image-box {
  155. width: 100%;
  156. height: 546rpx;
  157. }
  158. .msg-box {
  159. background: #1B1713;
  160. border-radius: 27rpx 27rpx 67rpx 67rpx;
  161. position: absolute;
  162. top: 429rpx;
  163. left: 0;
  164. right: 0;
  165. padding-top: 38rpx;
  166. .msg-box-title {
  167. font-weight: 500;
  168. font-size: 32rpx;
  169. color: #FFFFFF;
  170. margin-bottom: 40rpx;
  171. padding-left: 38rpx;
  172. }
  173. .msg-box-time {
  174. font-weight: 400;
  175. font-size: 27rpx;
  176. color: #999999;
  177. padding-left: 38rpx;
  178. }
  179. .msg-box-address {
  180. font-weight: 400;
  181. font-size: 27rpx;
  182. color: #999999;
  183. padding-left: 38rpx;
  184. padding-right: 30rpx;
  185. margin-top: 24rpx;
  186. display: flex;
  187. justify-content: space-between;
  188. &-text {
  189. flex: 1;
  190. }
  191. .address-icon {
  192. font-weight: 400;
  193. font-size: 23rpx;
  194. color: #999999;
  195. display: flex;
  196. image {
  197. width: 25rpx;
  198. height: 27rpx;
  199. margin-right: 8rpx;
  200. }
  201. }
  202. }
  203. .lingdui-box {
  204. margin-top: 43rpx;
  205. height: 130rpx;
  206. background: #26201A;
  207. border-radius: 60rpx;
  208. display: flex;
  209. align-items: center;
  210. padding: 0 40rpx;
  211. .use-img {
  212. width: 86rpx;
  213. height: 86rpx;
  214. }
  215. .lingdui-msg {
  216. flex: 1;
  217. margin-left: 24rpx;
  218. .lingdui-msg-name {
  219. font-weight: 500;
  220. font-size: 29rpx;
  221. color: #E6E6E6;
  222. display: flex;
  223. align-items: center;
  224. margin-bottom: 11rpx;
  225. .name-tip {
  226. padding: 0 20rpx;
  227. height: 27rpx;
  228. background: #3C2D17;
  229. border-radius: 0rpx 12rpx 12rpx 12rpx;
  230. font-weight: 500;
  231. font-size: 19rpx;
  232. color: #FFA200;
  233. line-height: 27rpx;
  234. margin-left: 14rpx;
  235. }
  236. }
  237. }
  238. .add-wx {
  239. width: 172rpx;
  240. height: 51rpx;
  241. background: #3C2D17;
  242. border-radius: 23rpx 23rpx 23rpx 23rpx;
  243. text-align: center;
  244. line-height: 51rpx;
  245. font-weight: 400;
  246. font-size: 25rpx;
  247. color: #FF8A00;
  248. }
  249. }
  250. }
  251. }
  252. .title-box {
  253. font-weight: 500;
  254. font-size: 33rpx;
  255. color: #E6E6E6;
  256. text-align: center;
  257. position: relative;
  258. &::after {
  259. content: "";
  260. position: absolute;
  261. top: 50%;
  262. left: 0;
  263. transform: translate(0,-50%);
  264. width: 100%;
  265. height: 12rpx;
  266. background: url(@/static/image/home/title-line.png) no-repeat;
  267. background-size: 100% 100%;
  268. }
  269. }
  270. .lv-miaoshu {
  271. margin-top: 300rpx;
  272. .value-box {
  273. background: #1B1713;
  274. border-radius: 27rpx;
  275. margin-top: 35rpx;
  276. margin-bottom: 52rpx;
  277. .tabs-box {
  278. border-bottom: 1px solid #2D241B;
  279. }
  280. .lv-msg-box {
  281. padding: 20rpx 40rpx;
  282. font-weight: 400;
  283. font-size: 27rpx;
  284. color: #E6E6E6;
  285. line-height: 41rpx;
  286. }
  287. }
  288. }
  289. }
  290. .bottom-box {
  291. position: fixed;
  292. bottom: 0;
  293. left: 0;
  294. right: 0;
  295. height: 150rpx;
  296. background-color: #1B1713;
  297. display: flex;
  298. align-items: center;
  299. padding: 0 40rpx;
  300. .price-box {
  301. font-weight: 400;
  302. font-size: 25rpx;
  303. color: #999999;
  304. flex: 1;
  305. .peice-val {
  306. font-weight: 500;
  307. font-size: 40rpx;
  308. color: #FF3535;
  309. margin-bottom: 15rpx;
  310. text {
  311. font-size: 26rpx;
  312. }
  313. }
  314. }
  315. .caozuo-box {
  316. display: flex;
  317. align-items: center;
  318. .caozuo-item {
  319. font-weight: 400;
  320. font-size: 20rpx;
  321. color: #999999;
  322. padding: 0 35rpx;
  323. text-align: center;
  324. image {
  325. width: 48rpx;
  326. height: 48rpx;
  327. margin-bottom: 10rpx;
  328. }
  329. }
  330. .border-r {
  331. position: relative;
  332. // border-right: 1px solid #4A3E32;
  333. &::after {
  334. content: "";
  335. width: 2rpx;
  336. height: 47rpx;
  337. position: absolute;
  338. right: 0;
  339. top: 50%;
  340. transform: translate(0,-50%);
  341. background-color: #4A3E32;
  342. }
  343. }
  344. }
  345. .btn-box {
  346. width: 252rpx;
  347. height: 74rpx;
  348. font-weight: 500;
  349. font-size: 32rpx;
  350. color: #FFFFFF;
  351. text-align: center;
  352. line-height: 74rpx;
  353. background: url(@/static/image/home/hdqd-btn.png) no-repeat;
  354. background-size: 100% 100%;
  355. }
  356. .end-btn {
  357. background: #666666;
  358. border-radius: 37rpx 37rpx 37rpx 37rpx;
  359. }
  360. }
  361. .popup-cont {
  362. width: 95%;
  363. margin: 0 auto;
  364. background-image: linear-gradient(to top, #000000, #331212);
  365. height:662rpx;
  366. border-radius: 33rpx 33rpx 0 0;
  367. .popup-title {
  368. display: flex;
  369. align-items: center;
  370. justify-content: space-between;
  371. padding: 54rpx 52rpx;
  372. font-weight: 500;
  373. font-size: 29rpx;
  374. color: #999999;
  375. }
  376. .popup-list {
  377. padding: 0 50rpx;
  378. .list-item {
  379. display: flex;
  380. justify-content: space-between;
  381. align-items: center;
  382. height: 110rpx;
  383. border-bottom: 1px solid #3F3535;
  384. .item-l {
  385. font-weight: 500;
  386. font-size: 29rpx;
  387. color: #CCCCCC;
  388. display: flex;
  389. align-items: center;
  390. .item-l-val {
  391. margin-left: 40rpx;
  392. }
  393. }
  394. .chooose-class {
  395. color: #FF5858;
  396. }
  397. }
  398. }
  399. .confirm-box {
  400. padding: 0 50rpx;
  401. margin-top: 30rpx;
  402. .confirm-btn-box {
  403. }
  404. }
  405. }
  406. </style>