crowdfundingDetails.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078
  1. <template>
  2. <view class="crowdfunding-details">
  3. <view class="custom-navbar" :style="navBgStyle">
  4. <view class="navbar-left scale-tap" @click="goBack">
  5. <image src="@/static/crowdFunding/back.png" mode="widthFix"></image>
  6. </view>
  7. <view class="navbar-center one-omit" style="max-width: 70vw; " :style="{ opacity: navBgOpacity }">
  8. {{ detail.title }}
  9. </view>
  10. <view class="navbar-right scale-tap" @click="showShare = true">
  11. <image src="@/static/crowdFunding/share.png" mode="widthFix"></image>
  12. </view>
  13. </view>
  14. <!-- 顶部视频图片混合轮播 -->
  15. <view class="swiper-container">
  16. <swiper class="top-swiper" :indicator-dots="false" circular :current="currentMediaIndex"
  17. @change="handleSwiperChange" :duration="300">
  18. <swiper-item v-for="(item, idx) in mediaList" :key="idx" class="swiper-item">
  19. <view v-if="item.type === 'video'" class="media-wrapper">
  20. <video class="swiper-video" :src="item.src" :poster="item.poster" :id="'video-' + idx" controls
  21. object-fit="contain" enable-progress-gesture="false" :loop="false"
  22. :show-fullscreen-btn="false" :show-play-btn="true" :enable-play-gesture="false"
  23. @ended="onVideoEnded" @play="onVideoPlay(idx)" @pause="onVideoPause"></video>
  24. </view>
  25. <image v-else class="swiper-img" :src="item.src" mode="aspectFill" />
  26. </swiper-item>
  27. </swiper>
  28. <!-- 自定义指示点 -->
  29. <view class="custom-dots">
  30. <view v-for="(item, index) in mediaList" :key="index"
  31. :class="['dot', currentMediaIndex === index ? 'active' : '']" @click="switchMedia(index)"></view>
  32. </view>
  33. </view>
  34. <view class="content">
  35. <!-- 项目信息 -->
  36. <view class="section project-card">
  37. <view class="project-title">{{ detail.title }}</view>
  38. <view class="progress-bar-wrap">
  39. <uv-line-progress height="8rpx" :showText="false"
  40. :percentage="(detail.current_amount / detail.goal_amount * 100).toFixed(2)"
  41. inactiveColor="#F0F0F0" activeColor="#ACF934"></uv-line-progress>
  42. <view class="progress-percent">{{ (detail.current_amount / detail.goal_amount * 100).toFixed(2) + '%'
  43. }}</view>
  44. </view>
  45. <view class="project-stats">
  46. <view class="stat-block">
  47. <view class="stat-main amountOfMoney">¥{{ detail.current_amount }}</view>
  48. <view class="stat-sub">{{ detail.supporter_count }}人支持</view>
  49. </view>
  50. <view class="stat-block">
  51. <view class="stat-main">{{ detail.daysRemaining }}天</view>
  52. <view class="stat-sub">剩余时间</view>
  53. </view>
  54. <view class="stat-block">
  55. <view class="stat-main">¥{{ detail.goal_amount }}</view>
  56. <view class="stat-sub">众筹目标</view>
  57. </view>
  58. </view>
  59. </view>
  60. <!-- 项目更新 -->
  61. <view class="section project-update" v-if="projectUpdate && projectUpdate.numb">
  62. <view class="project-update-left scale-tap"
  63. @click="goPage('/pages/crowdFunding/projectUpdateDetails?id=' + projectUpdate.id)">
  64. <view class="project-update-left-title">
  65. <view>·第{{ projectUpdate.numb }}次更新</view>
  66. <view style="color: #999;">{{ projectUpdate.create_time }}</view>
  67. </view>
  68. <view class="project-update-left-content">
  69. <view class="two-omit">{{ projectUpdate.title }}</view>
  70. <view class="image">
  71. <image :src="projectUpdate.image" />
  72. </view>
  73. </view>
  74. </view>
  75. <view class="project-update-right scale-tap"
  76. @click="goPage('/pages/crowdFunding/discussionArea?tags=update&id=' + projectId)">
  77. <view>历史更新</view>
  78. <image src="@/static/crowdFunding/updateDetails.png"></image>
  79. </view>
  80. </view>
  81. <view class="section comment scale-tap"
  82. @click="goPage('/pages/crowdFunding/discussionArea?tags=comment&id=' + projectId)">
  83. <view class="comment-title">
  84. <view>项目讨论({{ totalNumberOfComments }})</view>
  85. <view class="comment-more"">查看更多
  86. <image src=" @/static/crowdFunding/right.png">
  87. </image>
  88. </view>
  89. </view>
  90. <view class="comment-content">
  91. <block v-for="(item, idx) in commentList" :key="idx">
  92. <view class="comment-item">
  93. <image class="comment-avatar" :src="item.avatar"></image>
  94. <view class="comment-item-main">
  95. <view class="comment-item-content">{{ item.content }}</view>
  96. </view>
  97. <view class="comment-item-like">
  98. <image class="like-icon"
  99. :src="item.liked ? '/static/icon/icon-18.png' : '/static/icon/icon-19.png'"></image>
  100. <text class="like-num">{{ item.likeNum }}</text>
  101. </view>
  102. </view>
  103. </block>
  104. </view>
  105. </view>
  106. <!-- 塔罗牌介绍 -->
  107. <view class="section poster">
  108. <view class="initiator-bar">
  109. <image class="initiator-avatar" :src="detail.creator_avatar" />
  110. <view class="initiator-info">
  111. <text class="initiator-name">{{ detail.creator_nickname }}</text>
  112. <text class="initiator-tag">发起人</text>
  113. </view>
  114. <view class="initiator-service-btn blick-btn-animation"
  115. @click="goPage('/pages/crowdFunding/customerService?id=' + detail.creator_id + '&zc_id=' + detail.id)">
  116. <image class="service-icon" src="@/static/crowdFunding/service.png" />
  117. <text>客服</text>
  118. </view>
  119. </view>
  120. <block v-for="(item, idx) in detail.content_images" :key="idx">
  121. <image class="intro-img" :src="item" mode="widthFix" />
  122. </block>
  123. </view>
  124. <!-- 风险说明 -->
  125. <view class="section risk-section">
  126. <view class="risk-row" @click="goWeb('https://e.zhichao.art/web/refund.php', '退款说明')">
  127. <view class="risk-title">退款政策</view>
  128. <view class="risk-more ">查看更多
  129. <image src="@/static/crowdFunding/right.png" class="risk-more-icon" />
  130. </view>
  131. </view>
  132. <view class="risk-desc">众筹结束前最后1个小时无法申请退款</view>
  133. <view class="risk-row risk-row-border" @click="goWeb('https://e.zhichao.art/web/crowdtips.php', '风险提示')">
  134. <view class="risk-title">风险提示</view>
  135. <view class="risk-more ">查看更多
  136. <image src="@/static/crowdFunding/right.png" class="risk-more-icon" />
  137. </view>
  138. </view>
  139. <view class="risk-content" >
  140. <view>1. 您参与众筹是支持将创意变为现实的过程,而不是直接的商品交易,因此存在一定风险。请您根据自己的判断选择,支持众筹项目。</view>
  141. <view>2. 众筹存在于发起人与支持者之间,摩点作为第三方平台,提供网络空间、技术支持等服务。众筹的回报产品和承诺由发起人负责。</view>
  142. </view>
  143. </view>
  144. </view>
  145. <view class="bottom-bar-reserveASeat"></view>
  146. <view class="bottom-bar">
  147. <view class="bottom-bar-left">
  148. <view class="bar-btn" @click="toggleFavorite">
  149. <image v-if="isFavorite" src="@/static/crowdFunding/collect-active.png"
  150. class="scale-tap bar-icon" />
  151. <image v-else src="@/static/crowdFunding/collect.png" class="scale-tap bar-icon" />
  152. <view class="bar-text">{{ isFavorite ? '已收藏' : '收藏' }}</view>
  153. </view>
  154. <!-- <view class="bar-btn">
  155. <image v-if="true" src="@/static/crowdFunding/like.png" class=" scale-tap bar-icon" />
  156. <image v-else src="@/static/crowdFunding/like-active.png" class=" scale-tap bar-icon" />
  157. <view class="bar-text">看好</view>
  158. </view> -->
  159. </view>
  160. <button class="buy-btn blick-btn-animation" @click="specificationsOpen()">立即购买支持</button>
  161. </view>
  162. <image src="@/static/crowdFunding/backToTop.png" class="back-top scale-tap" v-show="navBgOpacity > 0.9"
  163. @click="scrollToTop"></image>
  164. <!-- 分享弹窗 -->
  165. <SharePopup :visible="showShare" :userId="0" :share-title="shareTitle" :share-desc="shareDesc"
  166. :share-img="shareImg" view="crowdfundingDetails" @close="showShare = false" :isReportContent="true" />
  167. <productSpecifications ref="specSheet" :rewards="rewards" :title="detail.title" @confirm="onSpecConfirm" />
  168. </view>
  169. </template>
  170. <script>
  171. import VideoPlayer from "@/components/VideoPlayer/VideoPlayer.vue";
  172. import SharePopup from "@/components/SharePopup/SharePopup.vue";
  173. import productSpecifications from "./components/productSpecifications/productSpecifications.vue";
  174. export default {
  175. components: {
  176. VideoPlayer,
  177. SharePopup,
  178. productSpecifications
  179. },
  180. data() {
  181. return {
  182. mediaList: [],
  183. videoPlaying: false,
  184. currentMediaIndex: 0,
  185. commentList: [
  186. ],
  187. navBgOpacity: 0,
  188. swiperHeight: 0,
  189. showShare: false,
  190. shareTitle: '【Woh】灯塔 塔罗牌 治愈风泛传特系',
  191. shareDesc: '快来支持这个有趣的众筹项目吧!',
  192. shareImg: require('@/static/crowdFunding/top-img.png'),
  193. userId: 0, // 可根据实际登录用户赋值
  194. isFavorite: false, // 是否已收藏
  195. projectId: null, // 当前项目id
  196. detail: {}, // 众筹详情
  197. projectUpdate: '',
  198. rewards: [],
  199. totalNumberOfComments: 0
  200. }
  201. },
  202. computed: {
  203. navBgStyle() {
  204. return {
  205. background: `rgba(255,255,255,${this.navBgOpacity})`,
  206. transition: 'background 0.3s'
  207. }
  208. }
  209. },
  210. methods: {
  211. // 返回上一页
  212. goBack() {
  213. uni.navigateBack({
  214. delta: 1,
  215. });
  216. },
  217. scrollToTop() {
  218. uni.pageScrollTo({
  219. scrollTop: 0,
  220. duration: 300
  221. });
  222. },
  223. switchMedia(index) {
  224. if (this.currentMediaIndex === index) return;
  225. // 如果当前在播放视频,先暂停
  226. if (this.mediaList[this.currentMediaIndex]?.type === 'video') {
  227. const videoContext = uni.createVideoContext('video-' + this.currentMediaIndex, this);
  228. if (videoContext) {
  229. videoContext.pause();
  230. }
  231. }
  232. this.currentMediaIndex = index;
  233. },
  234. handleSwiperChange(e) {
  235. const lastIndex = this.currentMediaIndex;
  236. this.currentMediaIndex = e.detail.current;
  237. // 如果上一个是视频,暂停它
  238. if (this.mediaList[lastIndex]?.type === 'video') {
  239. const videoContext = uni.createVideoContext('video-' + lastIndex, this);
  240. if (videoContext) {
  241. videoContext.pause();
  242. this.videoPlaying = false;
  243. }
  244. }
  245. },
  246. onVideoPlay(idx) {
  247. // 更新当前播放的视频索引
  248. this.videoPlaying = true;
  249. if (this.currentMediaIndex !== idx) {
  250. this.currentMediaIndex = idx;
  251. }
  252. },
  253. onVideoPause() {
  254. this.videoPlaying = false;
  255. },
  256. onVideoEnded() {
  257. this.videoPlaying = false;
  258. },
  259. goPage(url) {
  260. uni.navigateTo({
  261. url: url
  262. });
  263. },
  264. onSpecConfirm(selectedSpec) {
  265. uni.navigateTo({
  266. url: '/pages/crowdFunding/orderConfirm',
  267. success: function (res) {
  268. // 通过 eventChannel 向被打开页面传送数据
  269. res.eventChannel.emit('acceptDataFromOpener', { selectedSpec: selectedSpec, detail: this.detail });
  270. }.bind(this)
  271. });
  272. },
  273. specificationsOpen() {
  274. this.$refs.specSheet.show();
  275. },
  276. toggleFavorite() {
  277. if (!this.projectId) {
  278. return;
  279. }
  280. const action = this.isFavorite ? 'remove' : 'add';
  281. uni.request({
  282. url: this.$apiHost + '/crowdfund/favorite',
  283. method: 'POST',
  284. header: {
  285. "content-type": "application/x-www-form-urlencoded",
  286. },
  287. data: {
  288. uuid: getApp().globalData.uuid,
  289. skey: getApp().globalData.skey,
  290. crowdfund_id: this.projectId,
  291. action
  292. },
  293. success: (res) => {
  294. console.log(res.data, "收藏");
  295. if (res.data && res.data.success && res.data.success == 'yes') {
  296. this.isFavorite = !this.isFavorite;
  297. uni.showToast({ title: this.isFavorite ? '已收藏' : '已取消收藏', icon: 'none' });
  298. } else {
  299. uni.showToast({ title: res.data.msg || '操作失败', icon: 'none' });
  300. }
  301. },
  302. fail: () => {
  303. uni.showToast({ title: '网络错误', icon: 'none' });
  304. }
  305. });
  306. },
  307. getDetail() {
  308. if (!this.projectId) return;
  309. uni.request({
  310. url: this.$apiHost + '/crowdfund/detail',
  311. method: 'GET',
  312. data: {
  313. id: this.projectId,
  314. uuid: getApp().globalData.uuid,
  315. skey: getApp().globalData.skey
  316. },
  317. success: (res) => {
  318. if (res.data && res.data.success === 'yes' && res.data.data) {
  319. this.processingDataDetails(res.data.data);
  320. // 可根据接口返回字段设置isFavorite等
  321. }
  322. }
  323. });
  324. uni.request({
  325. url: this.$apiHost + '/crowdfund/favorite/status',
  326. method: 'GET',
  327. data: {
  328. crowdfund_id: this.projectId,
  329. uuid: getApp().globalData.uuid,
  330. skey: getApp().globalData.skey
  331. },
  332. success: (res) => {
  333. if (res.data && res.data.success === 'yes' && res.data.data) {
  334. console.log(res.data.data, "收藏");
  335. this.isFavorite = res.data.data.is_favorited;
  336. // 可根据接口返回字段设置isFavorite等
  337. }
  338. }
  339. });
  340. uni.request({
  341. url: this.$apiHost + '/crowdfund/articles',
  342. method: 'GET',
  343. data: {
  344. crowdfund_id: this.projectId,
  345. page: 1,
  346. pageSize: 1,
  347. uuid: getApp().globalData.uuid,
  348. skey: getApp().globalData.skey
  349. },
  350. success: (res) => {
  351. if (res.data && res.data.success === 'yes' && res.data.data) {
  352. if (Array.isArray(res.data.data.list)) {
  353. this.projectUpdate = res.data.data.list[0]
  354. this.projectUpdate.create_time = this.projectUpdate.create_time.replace(/-/g, '.').slice(0, 16)
  355. console.log(this.projectUpdate, 8888);
  356. }
  357. }
  358. }
  359. });
  360. uni.request({
  361. url: this.$apiHost + '/Article/getcomments',
  362. data: {
  363. uuid: getApp().globalData.uuid,
  364. type: 'crowdfund',
  365. id: this.projectId,
  366. page: 1,
  367. limit: 2,
  368. },
  369. header: {
  370. "content-type": "application/json",
  371. 'sign': getApp().globalData.headerSign
  372. },
  373. success: (res) => {
  374. console.log("评论列表:", res.data);
  375. if (res.data.success == "yes") {
  376. this.totalNumberOfComments = res.data.total
  377. // 确保数据存在且是数组,然后只取前两条
  378. this.commentList = (res.data.list || []).slice(0, 2).map(item => ({
  379. avatar: item.user_avatar || '',
  380. content: item.user_content || '',
  381. likeNum: item.like_count || 0,
  382. liked: item.is_like || false
  383. }));
  384. } else {
  385. // 如果请求失败,使用默认空数组
  386. this.commentList = [];
  387. uni.showToast({
  388. title: '获取评论列表失败',
  389. icon: 'none'
  390. });
  391. }
  392. },
  393. fail: (e) => {
  394. console.log("----e:", e);
  395. // 请求失败时使用默认空数组
  396. this.commentList = [];
  397. }
  398. });
  399. },
  400. goWeb(url, title) {
  401. uni.navigateTo({
  402. url: `/pages/webview/index?url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}`
  403. })
  404. },
  405. processingDataDetails(data) {
  406. this.detail = data;
  407. // 确保 image_list 始终是一个数组
  408. data.image_list = data.image_list || [];
  409. const videoItem = data.video_url ? [{
  410. type: 'video',
  411. poster: data.main_image,
  412. src: data.video_url,
  413. }] : [];
  414. const imageItems = data.image_list.map(v => ({
  415. type: 'image',
  416. src: v
  417. }));
  418. // 计算剩余天数
  419. if (data.start_time && data.end_time) {
  420. const startDate = new Date(data.start_time.replace(/-/g, '/'));
  421. const endDate = new Date(data.end_time.replace(/-/g, '/'));
  422. const now = new Date();
  423. // 如果当前时间在开始时间之前,显示总天数
  424. if (now < startDate) {
  425. this.detail.daysRemaining = Math.ceil((endDate - startDate) / (1000 * 60 * 60 * 24));
  426. }
  427. // 如果当前时间在结束时间之后,显示0天
  428. else if (now > endDate) {
  429. this.detail.daysRemaining = 0;
  430. }
  431. // 如果当前时间在开始和结束时间之间,显示剩余天数
  432. else {
  433. this.detail.daysRemaining = Math.ceil((endDate - now) / (1000 * 60 * 60 * 24));
  434. }
  435. } else {
  436. this.detail.daysRemaining = 0;
  437. }
  438. // 计算进度
  439. this.detail.progress = (data.current_amount / data.goal_amount * 100).toFixed(2)
  440. console.log(this.detail.progress, "进度");
  441. if (Number.isNaN) this.detail.progress = 0
  442. this.mediaList = [...videoItem, ...imageItems];
  443. this.rewards = data.rewards
  444. console.log("回报数据", this.rewards);
  445. console.log("顶部轮播数据", this.mediaList, "mediaList");
  446. console.log("详情", this.detail, "detail");
  447. }
  448. },
  449. mounted() {
  450. this.$nextTick(() => {
  451. // 动态获取轮播图高度
  452. uni.createSelectorQuery().in(this).select('.top-swiper').boundingClientRect(rect => {
  453. if (rect) {
  454. this.swiperHeight = rect.height;
  455. }
  456. }).exec();
  457. });
  458. },
  459. onPageScroll(e) {
  460. const threshold = this.swiperHeight || uni.upx2px(400); // 优先用实际高度
  461. let opacity = 0;
  462. if (e.scrollTop > 0) {
  463. opacity = Math.min(e.scrollTop / threshold, 1);
  464. }
  465. this.navBgOpacity = opacity;
  466. },
  467. onLoad(options) {
  468. // 获取id
  469. this.projectId = options.id || null;
  470. this.getDetail();
  471. },
  472. }
  473. </script>
  474. <style lang="scss" scoped>
  475. .crowdfunding-details {
  476. /* 自定义导航栏样式 */
  477. .custom-navbar {
  478. display: flex;
  479. flex-direction: row;
  480. align-items: center;
  481. justify-content: space-between;
  482. width: 100%;
  483. height: calc(90rpx + var(--status-bar-height));
  484. padding: 0 20rpx;
  485. position: fixed;
  486. top: 0;
  487. z-index: 100;
  488. padding: 12rpx 24rpx;
  489. padding-top: calc(var(--status-bar-height) + 12rpx);
  490. background: transparent;
  491. transition: background 0.3s;
  492. image {
  493. width: 64rpx;
  494. height: 64rpx;
  495. }
  496. }
  497. .swiper-container {
  498. position: relative;
  499. width: 100vw;
  500. height: 100vw;
  501. background: #000;
  502. .top-swiper {
  503. width: 100%;
  504. height: 100%;
  505. .swiper-item {
  506. width: 100%;
  507. height: 100%;
  508. display: flex;
  509. align-items: center;
  510. justify-content: center;
  511. }
  512. .media-wrapper {
  513. width: 100%;
  514. height: 100%;
  515. display: flex;
  516. align-items: center;
  517. justify-content: center;
  518. background: #000;
  519. }
  520. .swiper-video {
  521. width: 100%;
  522. height: 100%;
  523. }
  524. .swiper-img {
  525. width: 100%;
  526. height: 100%;
  527. object-fit: cover;
  528. }
  529. }
  530. .custom-dots {
  531. position: absolute;
  532. bottom: 20rpx;
  533. left: 50%;
  534. transform: translateX(-50%);
  535. display: flex;
  536. gap: 16rpx;
  537. .dot {
  538. width: 12rpx;
  539. height: 12rpx;
  540. border-radius: 50%;
  541. background: rgba(255, 255, 255, 0.5);
  542. transition: all 0.3s;
  543. &.active {
  544. width: 24rpx;
  545. border-radius: 6rpx;
  546. background: #fff;
  547. }
  548. }
  549. }
  550. }
  551. .content {
  552. background: #f2f6f2;
  553. padding: 20rpx;
  554. .section {
  555. background: #fff;
  556. border-radius: 12rpx;
  557. padding: 16rpx;
  558. padding-bottom: 20rpx;
  559. margin: 12rpx 0;
  560. .section-title {
  561. font-size: 28rpx;
  562. font-family: 'PingFang SC-Medium';
  563. margin-bottom: 6rpx;
  564. }
  565. .section-content {
  566. color: #333;
  567. font-size: 24rpx;
  568. line-height: 1.8;
  569. }
  570. .intro-img {
  571. width: 100%;
  572. margin: 0;
  573. padding: 0;
  574. margin-bottom: -10rpx;
  575. }
  576. }
  577. .project-card {
  578. padding-bottom: 15rpx;
  579. .project-title {
  580. font-size: 36rpx;
  581. color: 1f1f1f;
  582. font-family: "PingFang SC-Bold";
  583. font-weight: 400;
  584. }
  585. .progress-bar-wrap {
  586. display: flex;
  587. align-items: center;
  588. font-size: 20rpx;
  589. color: #1F1F1F;
  590. padding-top: 30rpx;
  591. padding-bottom: 14rpx;
  592. .progress-percent {
  593. padding-left: 12rpx;
  594. }
  595. }
  596. .project-stats {
  597. display: flex;
  598. justify-content: space-between;
  599. padding-top: 0;
  600. .stat-block {
  601. display: flex;
  602. flex-direction: column;
  603. align-items: center;
  604. text-align: center;
  605. justify-content: center;
  606. color: #1F1F1F;
  607. &:first-child {
  608. align-items: flex-start;
  609. }
  610. &:last-child {
  611. display: flex;
  612. flex-direction: column;
  613. align-items: center;
  614. text-align: center;
  615. justify-content: center;
  616. color: #1F1F1F;
  617. &:first-child {
  618. align-items: flex-start;
  619. }
  620. &:last-child {
  621. align-items: flex-end;
  622. }
  623. .stat-main {
  624. font-size: 28rpx;
  625. &.amountOfMoney {
  626. font-size: 32rpx;
  627. font-family: "PingFang SC-Bold";
  628. }
  629. }
  630. .stat-sub {
  631. font-size: 20rpx;
  632. }
  633. }
  634. }
  635. }
  636. }
  637. .project-update {
  638. background: transparent;
  639. height: 166rpx;
  640. display: flex;
  641. width: 100%;
  642. justify-content: space-between;
  643. padding: 0;
  644. >view {
  645. border-radius: 12rpx;
  646. background: #fff;
  647. flex-shrink: 0;
  648. }
  649. .project-update-left {
  650. width: 590rpx;
  651. height: 100%;
  652. padding: 16rpx;
  653. .project-update-left-title {
  654. display: flex;
  655. justify-content: space-between;
  656. align-items: center;
  657. font-size: 22rpx;
  658. }
  659. .project-update-left-content {
  660. display: flex;
  661. align-items: center;
  662. margin-top: 8rpx;
  663. >view {
  664. font-size: 24rpx;
  665. font-weight: 400;
  666. font-family: "PingFang SC-Bold";
  667. }
  668. .image {
  669. width: 180rpx;
  670. height: 78rpx;
  671. overflow: hidden;
  672. margin-left: 26rpx;
  673. border-radius: 8rpx;
  674. image {
  675. overflow: hidden;
  676. width: 100%;
  677. }
  678. }
  679. }
  680. }
  681. .project-update-right {
  682. width: 108rpx;
  683. height: 100%;
  684. font-size: 22rpx;
  685. display: flex;
  686. align-items: center;
  687. justify-content: center;
  688. flex-direction: column;
  689. image {
  690. margin-top: 12rpx;
  691. width: 28rpx;
  692. height: 28rpx;
  693. }
  694. }
  695. }
  696. .poster {
  697. padding: 0;
  698. padding-top: 16rpx;
  699. }
  700. }
  701. .comment {
  702. border-radius: 12rpx;
  703. background: #fff;
  704. margin-top: 24rpx;
  705. padding: 0 0 16rpx 0;
  706. .comment-title {
  707. display: flex;
  708. justify-content: space-between;
  709. align-items: center;
  710. font-size: 26rpx;
  711. color: #333;
  712. padding: 18rpx 20rpx 0 20rpx;
  713. .comment-more {
  714. color: #999;
  715. font-size: 22rpx;
  716. display: flex;
  717. align-items: center;
  718. image {
  719. width: 20rpx;
  720. height: 20rpx;
  721. margin-left: 4rpx;
  722. }
  723. }
  724. }
  725. .comment-content {
  726. padding: 0 20rpx;
  727. .comment-item {
  728. display: flex;
  729. //align-items: flex-start;
  730. align-items: center;
  731. padding: 18rpx 0 0 0;
  732. border-bottom: 1rpx solid #f5f5f5;
  733. &:last-child {
  734. border-bottom: none;
  735. }
  736. .comment-avatar {
  737. width: 48rpx;
  738. height: 48rpx;
  739. border-radius: 50%;
  740. margin-right: 16rpx;
  741. flex-shrink: 0;
  742. }
  743. .comment-item-main {
  744. flex: 1;
  745. display: flex;
  746. flex-direction: column;
  747. .comment-item-content {
  748. color: #1f1f1f;
  749. font-size: 24rpx;
  750. line-height: 1.7;
  751. margin-bottom: 8rpx;
  752. display: -webkit-box;
  753. -webkit-line-clamp: 2;
  754. -webkit-box-orient: vertical;
  755. overflow: hidden;
  756. text-overflow: ellipsis;
  757. word-break: break-all;
  758. }
  759. }
  760. .comment-item-like {
  761. display: flex;
  762. align-items: center;
  763. margin-left: 36rpx;
  764. .like-icon {
  765. width: 28rpx;
  766. height: 28rpx;
  767. margin-right: 4rpx;
  768. }
  769. .like-num {
  770. font-size: 22rpx;
  771. color: #888;
  772. }
  773. }
  774. }
  775. }
  776. }
  777. .bottom-bar-reserveASeat {
  778. width: 100%;
  779. height: calc(12rpx + 88rpx + var(--window-bottom) + 30rpx);
  780. }
  781. .bottom-bar {
  782. position: fixed;
  783. left: 0;
  784. right: 0;
  785. bottom: 0;
  786. z-index: 999;
  787. display: flex;
  788. align-items: center;
  789. justify-content: space-between;
  790. background: #fff;
  791. padding: 14rpx 40rpx;
  792. padding-bottom: calc(14rpx + var(--window-bottom));
  793. box-sizing: border-box;
  794. .bottom-bar-left {
  795. display: flex;
  796. align-items: center;
  797. gap: 32rpx;
  798. .bar-btn {
  799. display: flex;
  800. flex-direction: column;
  801. align-items: center;
  802. justify-content: center;
  803. width: 80rpx;
  804. height: 80rpx;
  805. border-radius: 12rpx;
  806. .bar-icon {
  807. width: 48rpx;
  808. height: 48rpx;
  809. margin-bottom: 4rpx;
  810. }
  811. .bar-text {
  812. font-size: 20rpx;
  813. color: #1f1f1f;
  814. font-family: "PingFang SC";
  815. }
  816. }
  817. }
  818. .buy-btn {
  819. width: 588rpx;
  820. height: 88rpx;
  821. background: #1f1f1f;
  822. color: #ACF934;
  823. font-size: 32rpx;
  824. border-radius: 80rpx;
  825. border: none;
  826. font-weight: bold;
  827. text-align: center;
  828. line-height: 80rpx;
  829. margin-left: 24rpx;
  830. }
  831. }
  832. }
  833. .back-top {
  834. position: fixed;
  835. bottom: calc(126rpx + var(--window-bottom));
  836. right: 16rpx;
  837. width: 82rpx;
  838. height: 82rpx;
  839. }
  840. .initiator-bar {
  841. display: flex;
  842. align-items: center;
  843. justify-content: space-between;
  844. background: #fff;
  845. border-radius: 10rpx;
  846. padding: 18rpx 24rpx 18rpx 18rpx;
  847. margin: 0;
  848. .initiator-avatar {
  849. width: 64rpx;
  850. height: 64rpx;
  851. border-radius: 50%;
  852. margin-right: 18rpx;
  853. flex-shrink: 0;
  854. }
  855. .initiator-info {
  856. display: flex;
  857. align-items: center;
  858. flex: 1;
  859. min-width: 0;
  860. }
  861. .initiator-name {
  862. font-size: 30rpx;
  863. color: #222;
  864. font-weight: bold;
  865. margin-right: 12rpx;
  866. max-width: 260rpx;
  867. overflow: hidden;
  868. text-overflow: ellipsis;
  869. white-space: nowrap;
  870. }
  871. .initiator-tag {
  872. background: #1a1a1a;
  873. color: #b6ff4b;
  874. font-size: 20rpx;
  875. border-radius: 8rpx;
  876. padding: 2rpx 12rpx;
  877. margin-left: 2rpx;
  878. }
  879. .initiator-service-btn {
  880. display: flex;
  881. align-items: center;
  882. background: #1a1a1a;
  883. color: #b6ff4b;
  884. font-size: 28rpx;
  885. border-radius: 128rpx;
  886. padding: 0 24rpx 0 12rpx;
  887. height: 56rpx;
  888. margin-left: 18rpx;
  889. font-weight: bold;
  890. }
  891. .service-icon {
  892. width: 32rpx;
  893. height: 32rpx;
  894. margin-right: 8rpx;
  895. }
  896. }
  897. .scale-tap {
  898. transition: transform 0.15s;
  899. }
  900. .scale-tap:active {
  901. transform: scale(0.92);
  902. }
  903. .risk-section {
  904. background: #fff;
  905. border-radius: 12rpx;
  906. margin: 24rpx 0 0 0;
  907. padding: 0 0 18rpx 0;
  908. position: relative;
  909. overflow: hidden;
  910. .risk-row {
  911. display: flex;
  912. align-items: center;
  913. justify-content: space-between;
  914. padding: 18rpx 24rpx 0 0rpx;
  915. font-size: 28rpx;
  916. color: #1f1f1f;
  917. background: #fff;
  918. &.risk-row-border {
  919. border-top: 1rpx solid #f2f2f2;
  920. margin-top: 18rpx;
  921. padding-top: 18rpx;
  922. }
  923. }
  924. .risk-title {
  925. font-size: 28rpx;
  926. color: #1f1f1f;
  927. font-family: 'PingFang SC-Bold';
  928. font-weight: 400;
  929. }
  930. .risk-more {
  931. color: #1f1f1f;
  932. font-size: 24rpx;
  933. display: flex;
  934. align-items: center;
  935. font-weight: 400;
  936. font-family: 'PingFang SC-Bold';
  937. .risk-more-icon {
  938. width: 24rpx;
  939. height: 24rpx;
  940. margin-left: 4rpx;
  941. margin-top: 4rpx;
  942. }
  943. }
  944. .risk-desc {
  945. font-size: 24rpx;
  946. color: #999;
  947. padding: 8rpx 24rpx 0 0;
  948. font-family: 'PingFang SC-Regular';
  949. }
  950. .risk-content {
  951. font-size: 24rpx;
  952. color: #999;
  953. padding: 12rpx 24rpx 0 0;
  954. font-family: 'PingFang SC-Regular';
  955. line-height: 1.7;
  956. >view {
  957. margin-bottom: 6rpx;
  958. }
  959. }
  960. }
  961. </style>