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

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 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="travelDetails.image" mode=""></image>
  8. <view class="msg-box">
  9. <view class="msg-box-title">{{travelDetails.title}}</view>
  10. <view class="msg-box-time">开始时间{{travelDetails.startTime}}</view>
  11. <view class="lingdui-box">
  12. <image class="use-img" src="@/static/image/center/3.png" mode=""></image>
  13. <view class="lingdui-msg">
  14. <view class="lingdui-msg-name">
  15. <view>VTrip微程</view>
  16. <view class="name-tip">领队</view>
  17. </view>
  18. <view>
  19. <uv-rate :count="count" v-model="value" size="23" activeColor="#FFA200"></uv-rate>
  20. </view>
  21. </view>
  22. <view class="add-wx">添加微信</view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="lv-miaoshu">
  27. <view class="title-box">旅行描述</view>
  28. <view class="value-box">
  29. <view class="tabs-box">
  30. <uv-tabs :list="list" @click="click" lineColor="#FE5E5E" :activeStyle="{color:'#FE5E5E',fontSize:'29rpx',fontWeight: 'bold'}" :inactiveStyle="{color:'#D6D6D6',fontSize:'29rpx',fontWeight: 'bold'}"></uv-tabs>
  31. </view>
  32. <view class="lv-msg-box">
  33. 当金黄的落叶轻柔地铺满了小城的每个角落我们知道最温柔的季节已悄然而至在这个收获的季节里我们诚挚邀请您加入我们的秋日私旅
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="bottom-box">
  39. <view class="price-box">
  40. <view class="peice-val"><text></text>{{travelDetails.price}}</view>
  41. <view>报名费用</view>
  42. </view>
  43. <view class="caozuo-box">
  44. <view class="caozuo-item border-r">
  45. <image src="@/static/image/home/shoucang-icon.png" mode=""></image>
  46. <view>收藏</view>
  47. </view>
  48. <view class="caozuo-item">
  49. <image src="@/static/image/home/zhuanfa-icon.png" mode=""></image>
  50. <view>转发</view>
  51. </view>
  52. </view>
  53. <view class="btn-box">立即报名</view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default{
  59. data() {
  60. return {
  61. travelDetails: null,
  62. bgColor:'transparent',
  63. count:5,
  64. value:3,
  65. list:[
  66. {
  67. name:'介绍'
  68. },
  69. {
  70. name:'路线'
  71. },
  72. {
  73. name:'费用'
  74. },
  75. {
  76. name:'须知'
  77. },
  78. {
  79. name:'代理'
  80. },
  81. ]
  82. }
  83. },
  84. onPageScroll(e) {
  85. if(e.scrollTop > 50) {
  86. this.bgColor = '#49070c'
  87. }else{
  88. this.bgColor = 'transparent'
  89. }
  90. },
  91. onLoad({travelId}) {
  92. this.travelInfo(travelId)
  93. },
  94. methods:{
  95. travelInfo(travelId) {
  96. this.$api('travelInfo',{travelId},res=> {
  97. if(res.code==200) {
  98. this.travelDetails = res.result
  99. }
  100. })
  101. }
  102. }
  103. }
  104. </script>
  105. <style lang="scss">
  106. page {
  107. background-color: #060504;
  108. }
  109. </style>
  110. <style lang="scss" scoped>
  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. z-index: -1;
  118. }
  119. .content {
  120. padding: 0 30rpx 170rpx;
  121. padding-top: calc(var(--status-bar-height) + 110rpx);
  122. .content-head {
  123. position: relative;
  124. .image-box {
  125. width: 100%;
  126. height: 546rpx;
  127. }
  128. .msg-box {
  129. background: #1B1713;
  130. border-radius: 27rpx 27rpx 67rpx 67rpx;
  131. position: absolute;
  132. top: 429rpx;
  133. left: 0;
  134. right: 0;
  135. padding-top: 38rpx;
  136. .msg-box-title {
  137. font-weight: 500;
  138. font-size: 32rpx;
  139. color: #FFFFFF;
  140. margin-bottom: 40rpx;
  141. padding-left: 38rpx;
  142. }
  143. .msg-box-time {
  144. font-weight: 400;
  145. font-size: 27rpx;
  146. color: #999999;
  147. padding-left: 38rpx;
  148. }
  149. .lingdui-box {
  150. margin-top: 43rpx;
  151. height: 130rpx;
  152. background: #26201A;
  153. border-radius: 60rpx;
  154. display: flex;
  155. align-items: center;
  156. padding: 0 40rpx;
  157. .use-img {
  158. width: 86rpx;
  159. height: 86rpx;
  160. }
  161. .lingdui-msg {
  162. flex: 1;
  163. margin-left: 24rpx;
  164. .lingdui-msg-name {
  165. font-weight: 500;
  166. font-size: 29rpx;
  167. color: #E6E6E6;
  168. display: flex;
  169. align-items: center;
  170. margin-bottom: 11rpx;
  171. .name-tip {
  172. padding: 0 20rpx;
  173. height: 27rpx;
  174. background: #3C2D17;
  175. border-radius: 0rpx 12rpx 12rpx 12rpx;
  176. font-weight: 500;
  177. font-size: 19rpx;
  178. color: #FFA200;
  179. line-height: 27rpx;
  180. margin-left: 14rpx;
  181. }
  182. }
  183. }
  184. .add-wx {
  185. width: 172rpx;
  186. height: 51rpx;
  187. background: #3C2D17;
  188. border-radius: 23rpx 23rpx 23rpx 23rpx;
  189. text-align: center;
  190. line-height: 51rpx;
  191. font-weight: 400;
  192. font-size: 25rpx;
  193. color: #FF8A00;
  194. }
  195. }
  196. }
  197. }
  198. .title-box {
  199. font-weight: 500;
  200. font-size: 33rpx;
  201. color: #E6E6E6;
  202. text-align: center;
  203. position: relative;
  204. &::after {
  205. content: "";
  206. position: absolute;
  207. top: 50%;
  208. left: 0;
  209. transform: translate(0,-50%);
  210. width: 100%;
  211. height: 12rpx;
  212. background: url(@/static/image/home/title-line.png) no-repeat;
  213. background-size: 100% 100%;
  214. }
  215. }
  216. .lv-miaoshu {
  217. margin-top: 250rpx;
  218. .value-box {
  219. background: #1B1713;
  220. border-radius: 27rpx;
  221. margin-top: 35rpx;
  222. .tabs-box {
  223. border-bottom: 1px solid #2D241B;
  224. }
  225. .lv-msg-box {
  226. padding: 20rpx 40rpx;
  227. font-weight: 400;
  228. font-size: 27rpx;
  229. color: #E6E6E6;
  230. line-height: 41rpx;
  231. }
  232. }
  233. }
  234. }
  235. .bottom-box {
  236. position: fixed;
  237. bottom: 0;
  238. left: 0;
  239. right: 0;
  240. height: 150rpx;
  241. background-color: #1B1713;
  242. display: flex;
  243. align-items: center;
  244. padding: 0 40rpx;
  245. .price-box {
  246. font-weight: 400;
  247. font-size: 25rpx;
  248. color: #999999;
  249. flex: 1;
  250. .peice-val {
  251. font-weight: 500;
  252. font-size: 40rpx;
  253. color: #FF3535;
  254. margin-bottom: 15rpx;
  255. text {
  256. font-size: 26rpx;
  257. }
  258. }
  259. }
  260. .caozuo-box {
  261. display: flex;
  262. align-items: center;
  263. .caozuo-item {
  264. font-weight: 400;
  265. font-size: 20rpx;
  266. color: #999999;
  267. padding: 0 35rpx;
  268. text-align: center;
  269. image {
  270. width: 48rpx;
  271. height: 48rpx;
  272. margin-bottom: 10rpx;
  273. }
  274. }
  275. .border-r {
  276. position: relative;
  277. // border-right: 1px solid #4A3E32;
  278. &::after {
  279. content: "";
  280. width: 2rpx;
  281. height: 47rpx;
  282. position: absolute;
  283. right: 0;
  284. top: 50%;
  285. transform: translate(0,-50%);
  286. background-color: #4A3E32;
  287. }
  288. }
  289. }
  290. .btn-box {
  291. width: 252rpx;
  292. height: 74rpx;
  293. font-weight: 500;
  294. font-size: 32rpx;
  295. color: #FFFFFF;
  296. text-align: center;
  297. line-height: 74rpx;
  298. background: url(@/static/image/home/hdqd-btn.png) no-repeat;
  299. background-size: 100% 100%;
  300. }
  301. }
  302. </style>