crowdfundingDetailsDesign.vue 27 KB

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