feat: 新增分销分佣结算、商家认证及草稿管理功能,优化界面与版本更新

这个提交包含在:
2026-10-21 20:06:40 +08:00
父节点 d508949921
当前提交 088a08d43a
共有 117 个文件被更改,包括 10254 次插入 和 3000 次删除

查看文件

@@ -10,16 +10,18 @@
paddingRight: capsulePadding ? (capsulePadding + 'px') : '24rpx',
}"
>
<!-- 返回按钮 -->
<!-- 返回按钮(层级置顶,保证可点击) -->
<view v-if="showBack" class="fc-navbar__back" @click="onBack">
<text class="fc-navbar__back-icon">‹</text>
</view>
<!-- 标题区域 -->
<view class="fc-navbar__title" :class="{ 'fc-navbar__title--center': center }">
<!-- 标题区域:默认居中显示 -->
<view class="fc-navbar__title" :class="{ 'fc-navbar__title--center': center, 'fc-navbar__title--noback': !showBack }">
<slot>
<text class="fc-navbar__title-text fc-ellipsis">{{ title }}</text>
</slot>
</view>
<!-- 右侧功能区(位于胶囊左侧) -->
<view class="fc-navbar__right">
<slot name="right"></slot>
@@ -36,16 +38,16 @@ export default {
props: {
/** 导航标题文字 */
title: { type: String, default: '' },
/** 风格主题:gradient(主色渐变白字) | white(白底黑字) */
/** 风格主题:gradient(主色渐变白字) | white(白底黑字) | transparent(透明底黑字) */
theme: { type: String, default: 'gradient' },
/** 是否展示左侧返回按钮 */
showBack: { type: Boolean, default: false },
/** 标题文字是否居中 */
/** 标题文字是否居中,默认 true(居中排列) */
center: { type: Boolean, default: true },
},
data() {
return {
statusBarHeight: 20,
statusBarHeight: 0,
barHeight: 44,
capsulePadding: 0,
}
@@ -53,6 +55,9 @@ export default {
created() {
this.initMetrics()
},
mounted() {
this.syncStatusBarStyle()
},
methods: {
/**
* 初始化获取设备状态栏和胶囊参数
@@ -62,12 +67,27 @@ export default {
this.statusBarHeight = m.statusBarHeight
this.barHeight = m.navBarHeight
this.capsulePadding = m.capsulePadding
this.syncStatusBarStyle()
},
/**
* 同步原生系统状态栏文字与胶囊颜色
*/
syncStatusBarStyle() {
try {
if (typeof uni !== 'undefined' && uni.setNavigationBarColor) {
const isLightBg = this.theme === 'white' || this.theme === 'transparent'
uni.setNavigationBarColor({
frontColor: isLightBg ? '#000000' : '#ffffff',
backgroundColor: isLightBg ? '#ffffff' : '#04874a',
})
}
} catch (e) {}
},
/**
* 点击返回上一页,若无历史页面则返回首页
*/
onBack() {
const pages = getCurrentPages ? getCurrentPages() : []
const pages = (typeof getCurrentPages === 'function') ? getCurrentPages() : []
if (pages && pages.length > 1) {
uni.navigateBack()
} else {
@@ -112,61 +132,92 @@ export default {
color: $fc-text;
}
}
&--transparent {
background: transparent;
.fc-navbar__title-text {
color: #0c2b1c;
font-weight: 600;
}
.fc-navbar__back-icon {
color: #0c2b1c;
}
}
}
.fc-navbar__bar {
display: flex;
align-items: center;
padding-left: 16rpx;
padding-left: 12rpx;
box-sizing: border-box;
position: relative;
width: 100%;
}
.fc-navbar__back {
width: 72rpx;
height: 72rpx;
width: 68rpx;
height: 68rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
cursor: pointer;
border-radius: 50%;
position: relative;
z-index: 3;
transition: background-color 0.2s ease, transform 0.15s ease;
&:active {
transform: scale(0.92);
background-color: rgba(255, 255, 255, 0.18);
transform: scale(0.9);
background-color: rgba(255, 255, 255, 0.2);
}
}
.fc-navbar--white .fc-navbar__back:active {
background-color: rgba(0, 0, 0, 0.06);
}
.fc-navbar__back-icon {
font-size: 54rpx;
font-size: 52rpx;
line-height: 1;
font-weight: 300;
margin-top: -4rpx;
margin-top: -6rpx;
}
.fc-navbar__title {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
padding: 0 12rpx;
padding-left: 4rpx;
&--noback {
padding-left: 20rpx;
}
&--center {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
pointer-events: none;
padding: 0 160rpx;
box-sizing: border-box;
z-index: 1;
}
}
.fc-navbar__title-text {
font-size: $fc-font-xl;
font-size: 34rpx;
font-weight: 700;
letter-spacing: 0.5rpx;
max-width: 100%;
text-align: center;
}
.fc-navbar__right {
position: relative;
z-index: 1;
z-index: 3;
display: flex;
align-items: center;
flex-shrink: 0;
min-width: 72rpx;
min-width: 68rpx;
justify-content: flex-end;
}
</style>

查看文件

@@ -1,9 +1,21 @@
<template>
<view class="fc-post-card" @click="$emit('click', post)">
<view class="fc-post-card__thumb" :class="{ 'fc-post-card__thumb--icon': !thumbUrl }">
<view
class="fc-post-card"
:class="{ 'fc-post-card--compact': compact }"
@click="$emit('click', post)"
>
<!-- 缩略图:有真实实拍图展示实拍大图;无图时展示高品质分类徽章微名片 -->
<view class="fc-post-card__thumb" :class="{ 'fc-post-card__thumb--badge': !thumbUrl }">
<image v-if="thumbUrl" class="fc-post-card__thumb-img" :src="thumbUrl" mode="aspectFill" />
<image v-else class="fc-post-card__thumb-icon" :src="categoryIconUrl(post.categoryId)" mode="aspectFit" />
<view v-else class="fc-post-card__deco-badge">
<view class="fc-post-card__deco-halo">
<image class="fc-post-card__deco-icon" :src="categoryIconUrl(post.categoryId)" mode="aspectFit" />
</view>
<text class="fc-post-card__deco-name">{{ shortCatName }}</text>
</view>
</view>
<!-- 内容主体 -->
<view class="fc-post-card__body">
<view class="fc-post-card__title fc-ellipsis-2">{{ post.title }}</view>
<view v-if="post.isTop || (post.tags && post.tags.length)" class="fc-post-card__tags">
@@ -28,11 +40,11 @@
</view>
<view class="fc-post-card__stats">
<view class="fc-post-card__stat">
<image class="fc-icon fc-icon--xs" :src="iconUrl('eye')" mode="aspectFit" />
<image class="fc-post-card__stat-icon" :src="iconUrl('eye')" mode="aspectFit" />
<text class="fc-post-card__stat-num">{{ post.views || 0 }}</text>
</view>
<view class="fc-post-card__stat">
<image class="fc-icon fc-icon--xs" :src="iconUrl('comment-gray')" mode="aspectFit" />
<image class="fc-post-card__stat-icon" :src="iconUrl('comment-gray')" mode="aspectFit" />
<text class="fc-post-card__stat-num">{{ post.commentCount || 0 }}</text>
</view>
</view>
@@ -48,7 +60,10 @@ import { fromNow, formatKm, assetUrl } from '@/common/utils/format.js'
export default {
name: 'FcPostCard',
props: {
/** 帖子数据模型 */
post: { type: Object, required: true },
/** 是否开启紧凑模式(适用于双联分栏、弹层等窄容器环境) */
compact: { type: Boolean, default: false },
},
computed: {
/** 相对发布时间描述 */
@@ -59,8 +74,13 @@ export default {
distanceText() {
return this.post.distance == null ? '' : formatKm(this.post.distance)
},
/** 缩略图角标精简分类名(2~4字) */
shortCatName() {
const n = this.post.categoryName || ''
return n.length > 4 ? n.slice(0, 4) : (n || '同城精选')
},
/**
* 帖子封面图:优先使用实际上传封面或第一张实拍图,无图时回退为空由图标兜底
* 帖子封面图:优先使用实际上传封面或第一张实拍图,无图时回退为空由图标微卡片兜底
*/
thumbUrl() {
if (this.post.cover) {
@@ -89,23 +109,26 @@ export default {
display: flex;
padding: 24rpx;
margin: 0 24rpx 20rpx;
background: $fc-bg-card;
background: #ffffff;
border-radius: $fc-radius-lg;
box-shadow: $fc-shadow-sm;
border: 1rpx solid rgba(4, 48, 30, 0.05);
box-shadow: 0 4rpx 16rpx rgba(4, 48, 30, 0.04), 0 10rpx 28rpx rgba(4, 48, 30, 0.03);
border: 1rpx solid rgba(4, 48, 30, 0.06);
cursor: pointer;
box-sizing: border-box;
transition: all 0.2s ease;
&:hover {
box-shadow: $fc-shadow;
box-shadow: 0 8rpx 24rpx rgba(4, 48, 30, 0.1);
}
&:active {
transform: scale(0.985);
}
}
/* 缩略图容器 */
.fc-post-card__thumb {
width: 190rpx;
height: 190rpx;
flex: 0 0 190rpx;
width: 180rpx;
height: 180rpx;
flex: 0 0 180rpx;
margin-right: 22rpx;
border-radius: 16rpx;
overflow: hidden;
@@ -113,19 +136,54 @@ export default {
display: flex;
align-items: center;
justify-content: center;
&--icon {
background: $fc-gradient-soft;
position: relative;
/* 🌟 无实拍图时的分类主题徽章微卡片,精致现代 */
&--badge {
background: linear-gradient(145deg, #eefbf4 0%, #e1f7ec 100%);
border: 1rpx solid rgba(0, 224, 112, 0.18);
}
}
.fc-post-card__thumb-img {
width: 100%;
height: 100%;
}
.fc-post-card__thumb-icon {
width: 88rpx;
height: 88rpx;
opacity: 0.85;
.fc-post-card__deco-badge {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.fc-post-card__deco-halo {
width: 76rpx;
height: 76rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.88);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4rpx 14rpx rgba(4, 48, 30, 0.08);
}
.fc-post-card__deco-icon {
width: 44rpx;
height: 44rpx;
}
.fc-post-card__deco-name {
margin-top: 10rpx;
font-size: 20rpx;
font-weight: 600;
color: $fc-primary-text;
letter-spacing: 0.5rpx;
}
/* 内容主体 */
.fc-post-card__body {
flex: 1;
display: flex;
@@ -139,6 +197,7 @@ export default {
color: $fc-text;
line-height: 1.4;
margin-bottom: 6rpx;
word-break: break-all;
}
.fc-post-card__tags {
display: flex;
@@ -162,6 +221,9 @@ export default {
font-size: 22rpx;
color: $fc-text-placeholder;
margin-bottom: 8rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.fc-post-card__dot {
margin: 0 8rpx;
@@ -175,39 +237,121 @@ export default {
align-items: flex-end;
justify-content: space-between;
padding-top: 4rpx;
gap: 12rpx;
}
.fc-price--card {
display: flex;
align-items: baseline;
white-space: nowrap !important;
flex-shrink: 0;
}
.fc-post-card__amount {
font-size: 36rpx;
font-weight: 700;
line-height: 1;
white-space: nowrap !important;
}
.fc-post-card__neg {
font-size: 28rpx;
font-weight: 700;
color: $fc-price;
white-space: nowrap !important;
line-height: 1;
}
.fc-post-card__unit {
margin-left: 4rpx;
font-size: 22rpx;
color: $fc-text-secondary;
font-weight: 400;
white-space: nowrap !important;
}
.fc-post-card__stats {
display: flex;
align-items: center;
flex-shrink: 0;
white-space: nowrap;
}
.fc-post-card__stat {
display: flex;
align-items: center;
margin-left: 16rpx;
}
.fc-post-card__stat-icon {
width: 26rpx;
height: 26rpx;
flex-shrink: 0;
opacity: 0.65;
}
.fc-post-card__stat-num {
margin-left: 6rpx;
font-size: 22rpx;
color: $fc-text-placeholder;
white-space: nowrap;
}
/* 🌟 紧凑模式:双联分栏专属适配 */
.fc-post-card--compact {
margin: 0 0 16rpx 0;
padding: 16rpx 14rpx;
border-radius: 16rpx;
box-shadow: 0 2rpx 10rpx rgba(4, 48, 30, 0.05);
.fc-post-card__thumb {
width: 136rpx;
height: 136rpx;
flex: 0 0 136rpx;
margin-right: 14rpx;
border-radius: 12rpx;
}
.fc-post-card__deco-halo {
width: 58rpx;
height: 58rpx;
}
.fc-post-card__deco-icon {
width: 34rpx;
height: 34rpx;
}
.fc-post-card__deco-name {
margin-top: 6rpx;
font-size: 18rpx;
}
.fc-post-card__title {
font-size: 27rpx;
line-height: 1.35;
margin-bottom: 4rpx;
max-height: 72rpx;
}
.fc-post-card__tags {
margin-bottom: 4rpx;
gap: 6rpx;
}
.fc-post-card__tag {
font-size: 18rpx;
padding: 2rpx 8rpx;
}
.fc-post-card__meta {
font-size: 20rpx;
margin-bottom: 4rpx;
}
.fc-post-card__bottom {
padding-top: 2rpx;
gap: 8rpx;
}
.fc-post-card__amount {
font-size: 32rpx;
}
.fc-post-card__neg {
font-size: 26rpx;
}
.fc-post-card__stat {
margin-left: 10rpx;
}
.fc-post-card__stat-icon {
width: 22rpx;
height: 22rpx;
}
.fc-post-card__stat-num {
font-size: 20rpx;
}
}
</style>

查看文件

@@ -107,7 +107,7 @@ export default {
cursor: pointer;
transition: transform 0.15s ease;
&:active {
transform: scale(0.96);
transform: scale(0.94);
}
&--active {
.fc-tabbar__text {
@@ -127,12 +127,14 @@ export default {
align-items: center;
justify-content: center;
&--circle {
width: 76rpx;
height: 76rpx;
margin-top: -38rpx;
width: 82rpx;
height: 82rpx;
margin-top: -42rpx;
border-radius: 50%;
background: $fc-gradient-primary;
box-shadow: 0 8rpx 20rpx rgba(4, 48, 30, 0.4);
border: 4rpx solid #ffffff;
box-shadow: 0 8rpx 24rpx rgba(0, 224, 112, 0.45);
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
}
.fc-tabbar__img {