feat: 完善分销提现审核与转账流程,增强帖子详情交互
这个提交包含在:
@@ -143,6 +143,58 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商家门店专区(仅商家发布或关联认证商户时展示) -->
|
||||
<view v-if="isMerchantPost" class="fc-card detail__merchant">
|
||||
<view class="detail__merchant-badge-bar">
|
||||
<view class="detail__merchant-flag">
|
||||
<image class="fc-icon fc-icon--xs" :src="iconUrl('shield')" mode="aspectFit" />
|
||||
<text class="detail__merchant-flag-txt">认证商家官方门店</text>
|
||||
</view>
|
||||
<text class="detail__merchant-security">工商资质已核验</text>
|
||||
</view>
|
||||
|
||||
<view class="detail__merchant-main">
|
||||
<image
|
||||
v-if="merchantInfo && merchantInfo.logo"
|
||||
class="detail__merchant-logo"
|
||||
:src="assetUrl(merchantInfo.logo)"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view v-else class="detail__merchant-logo-placeholder">
|
||||
<image class="fc-icon fc-icon--md" :src="iconUrl('login-shop') || iconUrl('home-nearby')" mode="aspectFit" />
|
||||
</view>
|
||||
|
||||
<view class="detail__merchant-meta">
|
||||
<view class="detail__merchant-name-row">
|
||||
<text class="detail__merchant-name">{{ (merchantInfo && merchantInfo.name) || (post.publisher && post.publisher.name) || '同城认证门店' }}</text>
|
||||
</view>
|
||||
<view class="detail__merchant-tags">
|
||||
<text v-if="merchantInfo && merchantInfo.category" class="detail__merchant-tag-item">{{ merchantInfo.category }}</text>
|
||||
<text class="detail__merchant-tag-item detail__merchant-tag-item--credit">实体保障</text>
|
||||
<text class="detail__merchant-tag-item detail__merchant-tag-item--credit">真实经营</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 店铺公告(若有) -->
|
||||
<view v-if="merchantInfo && merchantInfo.notice" class="detail__merchant-notice">
|
||||
<image class="fc-icon fc-icon--xs" :src="iconUrl('notice')" mode="aspectFit" />
|
||||
<text class="detail__merchant-notice-txt">{{ merchantInfo.notice }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 实体门店地址与一键导航 -->
|
||||
<view v-if="merchantAddress" class="detail__merchant-address-box" @click="openMerchantLocation">
|
||||
<view class="detail__merchant-address-left">
|
||||
<image class="fc-icon fc-icon--sm" :src="iconUrl('home-location')" mode="aspectFit" />
|
||||
<text class="detail__merchant-address-txt">{{ merchantAddress }}</text>
|
||||
</view>
|
||||
<view class="detail__merchant-nav-btn">
|
||||
<text>{{ hasMerchantCoord ? '导航到店' : '复制地址' }}</text>
|
||||
<text class="detail__merchant-nav-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 详细内容与服务标签 -->
|
||||
<view class="fc-card">
|
||||
<text class="detail__section-title">详细描述</text>
|
||||
@@ -481,6 +533,55 @@ export default {
|
||||
/**
|
||||
* 相对发布时间
|
||||
*/
|
||||
/**
|
||||
* 是否为商家发布的信息
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isMerchantPost() {
|
||||
return !!(
|
||||
this.post.identityType === 'merchant' ||
|
||||
(this.post.merchant && this.post.merchant.name) ||
|
||||
(this.post.publisher && this.post.publisher.isMerchant)
|
||||
)
|
||||
},
|
||||
/**
|
||||
* 商家门店详细信息
|
||||
* @returns {Object|null}
|
||||
*/
|
||||
merchantInfo() {
|
||||
if (this.post.merchant && typeof this.post.merchant === 'object') {
|
||||
return this.post.merchant
|
||||
}
|
||||
if (this.post.publisher && this.post.publisher.isMerchant) {
|
||||
return {
|
||||
name: this.post.publisher.name || '同城认证商户',
|
||||
logo: this.post.publisher.avatar || '',
|
||||
address: this.post.address || '',
|
||||
lat: this.post.lat,
|
||||
lng: this.post.lng,
|
||||
verified: true,
|
||||
}
|
||||
}
|
||||
return null
|
||||
},
|
||||
/**
|
||||
* 门店实体地址
|
||||
* @returns {string}
|
||||
*/
|
||||
merchantAddress() {
|
||||
return (this.merchantInfo && this.merchantInfo.address) || this.post.address || ''
|
||||
},
|
||||
/**
|
||||
* 门店是否具备坐标
|
||||
* @returns {boolean}
|
||||
*/
|
||||
hasMerchantCoord() {
|
||||
const m = this.merchantInfo
|
||||
if (m && m.lat != null && m.lng != null && Number(m.lat) !== 0 && Number(m.lng) !== 0) {
|
||||
return true
|
||||
}
|
||||
return this.hasLocation
|
||||
},
|
||||
timeText() {
|
||||
return fromNow(this.post.createdAt)
|
||||
},
|
||||
@@ -507,15 +608,26 @@ export default {
|
||||
hasLocation() {
|
||||
return this.post.lat != null && this.post.lng != null
|
||||
},
|
||||
/**
|
||||
* 当前登录用户
|
||||
*/
|
||||
currentUser() {
|
||||
try {
|
||||
const store = useUserStore()
|
||||
const user = (store.userInfo && store.userInfo.value) || store.userInfo || (store.state && store.state.userInfo)
|
||||
return user || null
|
||||
} catch (e) {
|
||||
return null
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 是否为本人发布
|
||||
*/
|
||||
isSelf() {
|
||||
try {
|
||||
const store = useUserStore()
|
||||
const user = (store.userInfo && store.userInfo.value) || store.userInfo
|
||||
const curId = user && user.id
|
||||
const pubId = this.post.publisher && this.post.publisher.id
|
||||
const user = this.currentUser
|
||||
const curId = user && (user.id || user.userId)
|
||||
const pubId = (this.post && this.post.publisher && this.post.publisher.id) || (this.post && (this.post.userId || this.post.user_id))
|
||||
return !!(curId && pubId && Number(curId) === Number(pubId))
|
||||
} catch (e) {
|
||||
return false
|
||||
@@ -536,8 +648,7 @@ export default {
|
||||
onShareAppMessage() {
|
||||
let inviterId = 0
|
||||
try {
|
||||
const store = useUserStore()
|
||||
const user = (store.userInfo && store.userInfo.value) || store.userInfo
|
||||
const user = this.currentUser
|
||||
if (user && user.id) inviterId = user.id
|
||||
} catch (e) {}
|
||||
|
||||
@@ -559,8 +670,7 @@ export default {
|
||||
onShareTimeline() {
|
||||
let inviterId = 0
|
||||
try {
|
||||
const store = useUserStore()
|
||||
const user = (store.userInfo && store.userInfo.value) || store.userInfo
|
||||
const user = this.currentUser
|
||||
if (user && user.id) inviterId = user.id
|
||||
} catch (e) {}
|
||||
|
||||
@@ -891,6 +1001,38 @@ export default {
|
||||
/**
|
||||
* 导航或复制地址
|
||||
*/
|
||||
/**
|
||||
* 导航前往商家门店或复制实体地址
|
||||
*/
|
||||
openMerchantLocation() {
|
||||
const m = this.merchantInfo
|
||||
const addr = this.merchantAddress
|
||||
const lat = m && m.lat != null ? Number(m.lat) : (this.post.lat != null ? Number(this.post.lat) : null)
|
||||
const lng = m && m.lng != null ? Number(m.lng) : (this.post.lng != null ? Number(this.post.lng) : null)
|
||||
const name = (m && m.name) || this.post.title || '商家门店'
|
||||
|
||||
if (lat != null && lng != null && lat !== 0 && lng !== 0) {
|
||||
uni.openLocation({
|
||||
latitude: lat,
|
||||
longitude: lng,
|
||||
name: name,
|
||||
address: addr || '商家实体门店',
|
||||
fail: () => {
|
||||
if (addr) {
|
||||
uni.setClipboardData({
|
||||
data: `${addr}`.trim(),
|
||||
success: () => uni.showToast({ title: '门店地址已复制', icon: 'none' })
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else if (addr) {
|
||||
uni.setClipboardData({
|
||||
data: `${addr}`.trim(),
|
||||
success: () => uni.showToast({ title: '门店地址已复制', icon: 'none' })
|
||||
})
|
||||
}
|
||||
},
|
||||
openMap() {
|
||||
if (!this.hasLocation) {
|
||||
uni.setClipboardData({
|
||||
@@ -1215,8 +1357,7 @@ export default {
|
||||
// 9. 底部扫码交互区(真实高密度二维码 + 醒目指引)
|
||||
let inviterId = 0
|
||||
try {
|
||||
const store = useUserStore()
|
||||
const user = (store.userInfo && store.userInfo.value) || store.userInfo
|
||||
const user = this.currentUser
|
||||
if (user && user.id) inviterId = user.id
|
||||
} catch (e) {}
|
||||
const qrUrl = `https://fenleixinxi.gzyakj.com.cn/pages/detail/detail?id=${this.id}${inviterId ? '&inviterId=' + inviterId : ''}`
|
||||
@@ -1491,6 +1632,151 @@ export default {
|
||||
color: $fc-text-secondary;
|
||||
}
|
||||
|
||||
/* 商家门店卡片 */
|
||||
.detail__merchant {
|
||||
margin-top: 20rpx;
|
||||
background: #ffffff;
|
||||
border-radius: $fc-radius-lg;
|
||||
padding: 24rpx;
|
||||
border: 1rpx solid #e2f4ea;
|
||||
}
|
||||
.detail__merchant-badge-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: linear-gradient(90deg, #edfbf3 0%, #f6fdf9 100%);
|
||||
border-radius: 12rpx;
|
||||
padding: 10rpx 16rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border: 1rpx solid #d4f5e2;
|
||||
}
|
||||
.detail__merchant-flag {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
}
|
||||
.detail__merchant-flag-txt {
|
||||
font-size: 22rpx;
|
||||
font-weight: 700;
|
||||
color: #04874a;
|
||||
}
|
||||
.detail__merchant-security {
|
||||
font-size: 20rpx;
|
||||
color: #04874a;
|
||||
}
|
||||
.detail__merchant-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.detail__merchant-logo {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 16rpx;
|
||||
border: 1rpx solid #eef2f0;
|
||||
flex-shrink: 0;
|
||||
background: #f8faf8;
|
||||
}
|
||||
.detail__merchant-logo-placeholder {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 16rpx;
|
||||
border: 1rpx solid #dcf3e5;
|
||||
background: #f0fbf5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.detail__merchant-meta {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.detail__merchant-name-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.detail__merchant-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #0f172a;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.detail__merchant-tags {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 10rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.detail__merchant-tag-item {
|
||||
font-size: 20rpx;
|
||||
padding: 2rpx 12rpx;
|
||||
border-radius: 6rpx;
|
||||
background: #e6f9ef;
|
||||
color: #04874a;
|
||||
font-weight: 600;
|
||||
|
||||
&--credit {
|
||||
background: #fef7ec;
|
||||
color: #d97706;
|
||||
}
|
||||
}
|
||||
.detail__merchant-notice {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10rpx;
|
||||
background: #fbfdfc;
|
||||
border: 1rpx dashed #d1eedc;
|
||||
border-radius: 12rpx;
|
||||
padding: 14rpx 18rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.detail__merchant-notice-txt {
|
||||
flex: 1;
|
||||
font-size: 24rpx;
|
||||
color: #334155;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.detail__merchant-address-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #f8faf8;
|
||||
border-radius: 14rpx;
|
||||
padding: 16rpx 20rpx;
|
||||
margin-top: 20rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
.detail__merchant-address-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
.detail__merchant-address-txt {
|
||||
font-size: 26rpx;
|
||||
color: #1e293b;
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.detail__merchant-nav-btn {
|
||||
background: #00e070;
|
||||
color: #04301e;
|
||||
font-size: 22rpx;
|
||||
font-weight: 700;
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.detail__merchant-nav-arrow {
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* 发布者 */
|
||||
.detail__publisher {
|
||||
display: flex;
|
||||
|
||||
在新工单中引用
屏蔽一个用户