crowdfundingDetails.vue 26 KB

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