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

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