123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791 |
- <template>
- <view class="crowdfunding-details">
- <view class="custom-navbar" :style="navBgStyle">
- <view class="navbar-left scale-tap" @click="goBack">
- <image src="@/static/crowdFunding/back.png" mode="widthFix"></image>
- </view>
- <view class="navbar-center one-omit" style="max-width: 70vw; " :style="{ opacity: navBgOpacity }">
- 【Woh】灯塔 塔罗牌 治愈风泛伟特系伟特系伟特系
- </view>
- <view class="navbar-right scale-tap" @click="showShare = true">
- <image src="@/static/crowdFunding/share.png" mode="widthFix"></image>
- </view>
- </view>
- <!-- 顶部视频图片混合轮播 -->
- <swiper class="top-swiper" indicator-dots circular>
- <swiper-item v-for="(item, idx) in mediaList" :key="idx">
- <view v-if="item.type === 'video'" class="video-wrapper">
- <video class="swiper-video" :src="item.src" :poster="item.poster" controls autoplay
- @ended="videoPlaying = false"></video>
- </view>
- <image v-else class="swiper-img" :src="item.src" mode="aspectFill" />
- </swiper-item>
- </swiper>
- <view class="content">
- <!-- 项目信息 -->
- <view class="section project-card">
- <view class="project-title">【Woh】灯塔 塔罗牌 治愈风泛传特系</view>
- <view class="progress-bar-wrap">
- <uv-line-progress height="8rpx" :showText="false" :percentage="85.45" inactiveColor="#F0F0F0"
- activeColor="#ACF934"></uv-line-progress>
- <view class="progress-percent">85.45%</view>
- </view>
- <view class="project-stats">
- <view class="stat-block">
- <view class="stat-main amountOfMoney">¥70,808.00</view>
- <view class="stat-sub">357人支持</view>
- </view>
- <view class="stat-block">
- <view class="stat-main">31天</view>
- <view class="stat-sub">剩余时间</view>
- </view>
- <view class="stat-block">
- <view class="stat-main">¥20,000</view>
- <view class="stat-sub">众筹目标</view>
- </view>
- </view>
- </view>
- <!-- 项目更新 -->
- <view class="section project-update">
- <view class="project-update-left">
- <view class="project-update-left-title">
- <view>·2次更新</view>
- <view style="color: #999;">2025.5.23 16:23</view>
- </view>
- <view class="project-update-left-content">
- <view>附赠精品灯塔牌包装,附赠精品灯塔牌包装</view>
- <view class="image">
- <image src="@/static/crowdFunding/crowdfundingDetails-poster.png" />
- </view>
- </view>
- </view>
- <view class="project-update-right scale-tap">
- <view>历史更新</view>
- <image src="@/static/crowdFunding/updateDetails.png"></image>
- </view>
- </view>
- <view class="section comment">
- <view class="comment-title">
- <view>项目讨论(10)</view>
- <view class="comment-more">查看更多 <image src="@/static/crowdFunding/right.png"></image>
- </view>
- </view>
- <view class="comment-content">
- <block v-for="(item, idx) in commentList" :key="idx">
- <view class="comment-item">
- <image class="comment-avatar" :src="item.avatar"></image>
- <view class="comment-item-main">
- <view class="comment-item-content">{{ item.content }}</view>
- </view>
- <view class="comment-item-like">
- <image class="like-icon"
- :src="item.liked ? '/static/icon/icon-18.png' : '/static/icon/icon-19.png'"></image>
- <text class="like-num">{{ item.likeNum }}</text>
- </view>
- </view>
- </block>
- </view>
- </view>
- <!-- 塔罗牌介绍 -->
- <view class="section poster">
- <view class="initiator-bar">
- <image class="initiator-avatar" :src="initiator.avatar" />
- <view class="initiator-info">
- <text class="initiator-name">{{ initiator.name }}</text>
- <text class="initiator-tag">发起人</text>
- </view>
- <view class="initiator-service-btn blick-btn-animation">
- <image class="service-icon" src="@/static/crowdFunding/service.png" />
- <text>客服</text>
- </view>
- </view>
- <image class="intro-img" src="@/static/crowdFunding/crowdfundingDetails-poster.png" mode="widthFix" />
-
- </view>
- <!-- 风险说明 -->
- <view class="section risk-section">
- <view class="risk-row">
- <view class="risk-title">退款政策</view>
- <view class="risk-more ">查看更多 <image src="@/static/crowdFunding/right.png" class="risk-more-icon" /></view>
- </view>
- <view class="risk-desc">众筹结束前最后1个小时无法申请退款</view>
- <view class="risk-row risk-row-border">
- <view class="risk-title">风险提示</view>
- </view>
- <view class="risk-content">
- <view>1. 您参与众筹是支持将创意变为现实的过程,而不是直接的商品交易,因此存在一定风险。请您根据自己的判断选择,支持众筹项目。</view>
- <view>2. 众筹存在于发起人与支持者之间,摩点作为第三方平台,提供网络空间、技术支持等服务。众筹的回报产品和承诺由发起人负责。</view>
- </view>
- </view>
- </view>
- <view class="bottom-bar-reserveASeat"></view>
- <view class="bottom-bar">
- <view class="bottom-bar-left">
- <view class="bar-btn">
- <image v-if="true" src="@/static/crowdFunding/collect.png" class=" scale-tap bar-icon" />
- <image v-else src="@/static/crowdFunding/collect-active.png" class=" scale-tap bar-icon" />
- <view class="bar-text">收藏</view>
- </view>
- <view class="bar-btn">
- <image v-if="true" src="@/static/crowdFunding/like.png" class=" scale-tap bar-icon" />
- <image v-else src="@/static/crowdFunding/like-active.png" class=" scale-tap bar-icon" />
- <view class="bar-text">看好</view>
- </view>
- </view>
- <button class="buy-btn blick-btn-animation">立即购买支持</button>
- </view>
- <image src="@/static/crowdFunding/backToTop.png" class="back-top scale-tap" v-show="navBgOpacity > 0.9" @click="scrollToTop"></image>
- <!-- 分享弹窗 -->
- <SharePopup :visible="showShare" :userId="userId" :share-title="shareTitle" :share-desc="shareDesc" :share-img="shareImg" view="crowdfundingDetails" @close="showShare = false" />
- </view>
- </template>
- <script>
- import VideoPlayer from "@/components/VideoPlayer/VideoPlayer.vue";
- import SharePopup from "@/components/SharePopup/SharePopup.vue";
- export default {
- components: {
- VideoPlayer,
- SharePopup
- },
- data() {
- return {
- mediaList: [
- // { type: 'video', src: 'https://media.w3.org/2010/05/sintel/trailer.mp4', poster: 'https://www.w3schools.com/html/pic_trulli.jpg' },
- { type: 'image', src: '../../static/crowdFunding/top-img.png' },
- { type: 'image', src: 'https://img.alicdn.com/imgextra/i3/2200704180017/O1CN01Qw6QwF1w6Qw6QwF1w6QwF_!!2200704180017.jpg' }
- ],
- videoPlaying: false,
- currentMediaIndex: 0,
- commentList: [
- {
- avatar: '/static/crowdFunding/top-img.png',
- content: '还是希望签名能签在书上,还是希望签名能签在书上还是希望签名能签在书上还是希望签名能签在书上,还是希望签名能签在书上还是希望签名能签在书上',
- likeNum: 12,
- liked: false
- },
- {
- avatar: '/static/crowdFunding/top-img.png',
- content: '还是希望签名能签在书上',
- likeNum: 12,
- liked: true
- }
- ],
- navBgOpacity: 0,
- swiperHeight: 0,
- initiator: {
- avatar: '/static/crowdFunding/top-img.png',
- name: '也许时间是一种解药'
- },
- showShare: false,
- shareTitle: '【Woh】灯塔 塔罗牌 治愈风泛传特系',
- shareDesc: '快来支持这个有趣的众筹项目吧!',
- shareImg: require('@/static/crowdFunding/top-img.png'),
- userId: 0, // 可根据实际登录用户赋值
- }
- },
- computed: {
- navBgStyle() {
- return {
- background: `rgba(255,255,255,${this.navBgOpacity})`,
- transition: 'background 0.3s'
- }
- }
- },
- methods: {
- // 返回上一页
- goBack() {
- uni.navigateBack({
- delta: 1,
- });
- },
- scrollToTop() {
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 300
- });
- },
- playVideo(idx) {
- this.currentMediaIndex = idx;
- this.videoPlaying = true;
- }
- },
- mounted() {
- this.$nextTick(() => {
- // 动态获取轮播图高度
- uni.createSelectorQuery().in(this).select('.top-swiper').boundingClientRect(rect => {
- if (rect) {
- this.swiperHeight = rect.height;
- }
- }).exec();
- });
- },
- onPageScroll(e) {
- const threshold = this.swiperHeight || uni.upx2px(400); // 优先用实际高度
- let opacity = 0;
- if (e.scrollTop > 0) {
- opacity = Math.min(e.scrollTop / threshold, 1);
- }
- this.navBgOpacity = opacity;
- }
- }
- </script>
- <style lang="scss" scoped>
- .crowdfunding-details {
- /* 自定义导航栏样式 */
- .custom-navbar {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- height: calc(90rpx + var(--status-bar-height));
- padding: 0 20rpx;
- padding-top: var(--status-bar-height);
- position: fixed;
- top: 0;
- z-index: 100;
- padding: 12rpx 24rpx;
- background: transparent;
- transition: background 0.3s;
- image {
- width: 64rpx;
- height: 64rpx;
- }
- }
- .top-swiper {
- width: 100vw;
- height: 100vw;
- overflow: hidden;
- .video-wrapper {
- position: relative;
- width: 100%;
- height: 400rpx;
- .swiper-img,
- .swiper-video {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .custom-play-btn {
- position: absolute;
- left: 30rpx;
- bottom: 30rpx;
- width: 80rpx;
- height: 80rpx;
- background: rgba(0, 0, 0, 0.4);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- .play-icon {
- width: 48rpx;
- height: 48rpx;
- }
- }
- }
- .swiper-img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- }
- .content {
- background: #f2f6f2;
- padding: 20rpx;
- .section {
- background: #fff;
- border-radius: 12rpx;
- padding: 16rpx;
- padding-bottom: 20rpx;
- margin: 12rpx 0;
- .section-title {
- font-size: 28rpx;
- font-family: 'PingFang SC-Medium';
- margin-bottom: 6rpx;
- }
- .section-content {
- color: #333;
- font-size: 24rpx;
- line-height: 1.8;
- }
- .intro-img {
- width: 100%;
- margin: 0;
- padding: 0;
- margin-bottom: -10rpx;
- }
- }
- .project-card {
- padding-bottom: 15rpx;
- .project-title {
- font-size: 36rpx;
- color: 1f1f1f;
- font-family: "PingFang SC-Bold";
- font-weight: 400;
- }
- .progress-bar-wrap {
- display: flex;
- align-items: center;
- font-size: 20rpx;
- color: #1F1F1F;
- padding-top: 30rpx;
- padding-bottom: 14rpx;
- .progress-percent {
- padding-left: 12rpx;
- }
- }
- .project-stats {
- display: flex;
- justify-content: space-between;
- padding-top: 0;
- .stat-block {
- display: flex;
- flex-direction: column;
- align-items: center;
- text-align: center;
- justify-content: center;
- color: #1F1F1F;
- &:first-child {
- align-items: flex-start;
- }
- &:last-child {
- display: flex;
- flex-direction: column;
- align-items: center;
- text-align: center;
- justify-content: center;
- color: #1F1F1F;
- &:first-child {
- align-items: flex-start;
- }
- &:last-child {
- align-items: flex-end;
- }
- .stat-main {
- font-size: 28rpx;
- &.amountOfMoney {
- font-size: 32rpx;
- font-family: "PingFang SC-Bold";
- }
- }
- .stat-sub {
- font-size: 20rpx;
- }
- }
- }
- }
- }
- .project-update {
- background: transparent;
- height: 166rpx;
- display: flex;
- width: 100%;
- justify-content: space-between;
- padding: 0;
- >view {
- border-radius: 12rpx;
- background: #fff;
- flex-shrink: 0;
- }
- .project-update-left {
- width: 590rpx;
- height: 100%;
- padding: 16rpx;
- .project-update-left-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 22rpx;
- }
- .project-update-left-content {
- display: flex;
- align-items: center;
- margin-top: 8rpx;
- >view {
- font-size: 24rpx;
- font-weight: 400;
- font-family: "PingFang SC-Bold";
- }
- .image {
- width: 180rpx;
- height: 78rpx;
- overflow: hidden;
- margin-left: 26rpx;
- border-radius: 8rpx;
- image {
- overflow: hidden;
- width: 100%;
- }
- }
- }
- }
- .project-update-right {
- width: 108rpx;
- height: 100%;
- font-size: 22rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- image {
- margin-top: 12rpx;
- width: 28rpx;
- height: 28rpx;
- }
- }
- }
- .poster{
- padding: 0;
- padding-top: 16rpx;
- }
- }
- .comment {
- border-radius: 12rpx;
- background: #fff;
- margin-top: 24rpx;
- padding: 0 0 16rpx 0;
- .comment-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 26rpx;
- color: #333;
- padding: 18rpx 20rpx 0 20rpx;
- .comment-more {
- color: #999;
- font-size: 22rpx;
- display: flex;
- align-items: center;
- image {
- width: 20rpx;
- height: 20rpx;
- margin-left: 4rpx;
- }
- }
- }
- .comment-content {
- padding: 0 20rpx;
- .comment-item {
- display: flex;
- align-items: flex-start;
- padding: 18rpx 0 0 0;
- border-bottom: 1rpx solid #f5f5f5;
- &:last-child {
- border-bottom: none;
- }
- .comment-avatar {
- width: 48rpx;
- height: 48rpx;
- border-radius: 50%;
- margin-right: 16rpx;
- flex-shrink: 0;
- }
- .comment-item-main {
- flex: 1;
- display: flex;
- flex-direction: column;
- .comment-item-content {
- color: #1f1f1f;
- font-size: 24rpx;
- line-height: 1.7;
- margin-bottom: 8rpx;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- }
- }
- .comment-item-like {
- display: flex;
- align-items: center;
- margin-left: 36rpx;
- .like-icon {
- width: 28rpx;
- height: 28rpx;
- margin-right: 4rpx;
- }
- .like-num {
- font-size: 22rpx;
- color: #888;
- }
- }
- }
- }
- }
- .bottom-bar-reserveASeat {
- width: 100%;
- height: calc(12rpx + 88rpx + var(--window-bottom) + 30rpx);
- }
- .bottom-bar {
- position: fixed;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 999;
- display: flex;
- align-items: center;
- justify-content: space-between;
- background: #fff;
- padding: 14rpx 40rpx;
- padding-bottom: calc(14rpx + var(--window-bottom));
- box-sizing: border-box;
- .bottom-bar-left {
- display: flex;
- align-items: center;
- gap: 32rpx;
- .bar-btn {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 80rpx;
- height: 80rpx;
- border-radius: 12rpx;
- .bar-icon {
- width: 48rpx;
- height: 48rpx;
- margin-bottom: 4rpx;
- }
- .bar-text {
- font-size: 20rpx;
- color: #1f1f1f;
- font-family: "PingFang SC";
- }
- }
- }
- .buy-btn {
- width: 500rpx;
- height: 88rpx;
- background: #1f1f1f;
- color: #ACF934;
- font-size: 32rpx;
- border-radius: 80rpx;
- border: none;
- font-weight: bold;
- text-align: center;
- line-height: 80rpx;
- margin-left: 24rpx;
- }
- }
- }
- .back-top {
- position: fixed;
- bottom: calc(126rpx + var(--window-bottom));
- right: 16rpx;
- width: 82rpx;
- height: 82rpx;
- }
- .initiator-bar {
- display: flex;
- align-items: center;
- justify-content: space-between;
- background: #fff;
- border-radius: 10rpx;
- padding: 18rpx 24rpx 18rpx 18rpx;
- margin: 0;
- .initiator-avatar {
- width: 64rpx;
- height: 64rpx;
- border-radius: 50%;
- margin-right: 18rpx;
- flex-shrink: 0;
- }
- .initiator-info {
- display: flex;
- align-items: center;
- flex: 1;
- min-width: 0;
- }
- .initiator-name {
- font-size: 30rpx;
- color: #222;
- font-weight: bold;
- margin-right: 12rpx;
- max-width: 260rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .initiator-tag {
- background: #1a1a1a;
- color: #b6ff4b;
- font-size: 20rpx;
- border-radius: 8rpx;
- padding: 2rpx 12rpx;
- margin-left: 2rpx;
- }
- .initiator-service-btn {
- display: flex;
- align-items: center;
- background: #1a1a1a;
- color: #b6ff4b;
- font-size: 28rpx;
- border-radius: 128rpx;
- padding: 0 24rpx 0 12rpx;
- height: 56rpx;
- margin-left: 18rpx;
- font-weight: bold;
- }
- .service-icon {
- width: 32rpx;
- height: 32rpx;
- margin-right: 8rpx;
- }
- }
- .scale-tap {
- transition: transform 0.15s;
- }
- .scale-tap:active {
- transform: scale(0.92);
- }
- .risk-section {
- background: #fff;
- border-radius: 12rpx;
- margin: 24rpx 0 0 0;
- padding: 0 0 18rpx 0;
- position: relative;
- overflow: hidden;
-
- .risk-row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 18rpx 24rpx 0 0rpx;
- font-size: 28rpx;
- color: #1f1f1f;
- background: #fff;
- &.risk-row-border {
- border-top: 1rpx solid #f2f2f2;
- margin-top: 18rpx;
- padding-top: 18rpx;
- }
- }
-
- .risk-title {
- font-size: 28rpx;
- color: #1f1f1f;
- font-family: 'PingFang SC-Bold';
- font-weight: 400;
-
- }
-
- .risk-more {
- color: #1f1f1f;
- font-size: 24rpx;
- display: flex;
- align-items: center;
- font-weight: 400;
- font-family: 'PingFang SC-Bold';
- .risk-more-icon {
- width: 24rpx;
- height: 24rpx;
- margin-left: 4rpx;
- margin-top: 4rpx;
- }
- }
-
- .risk-desc {
- font-size: 24rpx;
- color: #999;
- padding: 8rpx 24rpx 0 0;
- font-family: 'PingFang SC-Regular';
- }
-
- .risk-content {
- font-size: 24rpx;
- color: #999;
- padding: 12rpx 24rpx 0 0;
- font-family: 'PingFang SC-Regular';
- line-height: 1.7;
- > view {
- margin-bottom: 6rpx;
- }
- }
- }
- </style>
|