feat: 新增地址选择插件及订阅消息等多项功能优化

- 新增地址选择插件,支持地图位置选择并返回地址和经纬度
- 新增微信订阅消息发送功能,支持审核结果、提现通知等场景
- 新增订单支付状态查询、提现收款人姓名保存等接口
- 新增服务区域管理,支持按省市区划分并同步到信息发布
- 新增资金流水和营收报表导出功能
- 新增可用优惠券查询、订单退款拆分处理等功能
- 优化后台角标显示、首页数据统计、UI配置下发等
- 修复订单支付并发问题、地区管理逻辑等
这个提交包含在:
2026-10-22 17:14:56 +08:00
父节点 088a08d43a
当前提交 cb12bf5fc8
共有 180 个文件被更改,包括 9695 次插入 和 1680 次删除

查看文件

@@ -216,8 +216,8 @@ import postApi from '@/common/api/post.js'
import favoriteApi from '@/common/api/favorite.js'
import reportApi from '@/common/api/report.js'
import { REPORT_REASONS } from '@/common/constants/report.js'
import { iconUrl, categoryIconUrl, loadUiConfig } from '@/common/store/ui.js'
import { fromNow, maskPhone } from '@/common/utils/format.js'
import { iconUrl, categoryIconUrl, loadUiConfig, uiState } from '@/common/store/ui.js'
import { fromNow } from '@/common/utils/format.js'
import { pay } from '@/common/utils/pay.js'
import { useUserStore } from '@/common/store/index.js'
import config from '@/common/config/index.js'
@@ -245,6 +245,8 @@ export default {
// 支付/提交中:防连点重复下单(余额支付是即时扣款)
submitting: false,
activeSwiperIndex: 0,
// 首次详情已加载(用于返回页面时只刷新解锁态,不重复拉整页)
loaded: false,
}
},
computed: {
@@ -275,6 +277,23 @@ export default {
loadUiConfig()
this.fetch()
},
/** 从会员中心 / 登录页返回时,刷新解锁态(已开通会员应立即能看到联系方式) */
onShow() {
if (this.loaded) this.refreshAccess()
},
/** 转发:优先用信息标题,否则用后台分享标题 */
onShareAppMessage() {
return {
title: (this.post && this.post.title) || uiState.shareTitle || uiState.siteName || '同城分类信息',
path: '/pages/detail/detail?id=' + this.id,
}
},
onShareTimeline() {
return {
title: (this.post && this.post.title) || uiState.shareTitle || uiState.siteName || '同城分类信息',
query: 'id=' + this.id,
}
},
methods: {
iconUrl,
catIcon() {
@@ -291,7 +310,9 @@ export default {
} catch (e) {
this.comments = []
}
this.contact = { phone: maskPhone(res.contact), wechat: '' }
// 解锁态由后端判定(会员 / 已付费 / 本人发布),不再只依赖本地点击
this.applyAccess(res)
this.loaded = true
// 契约:详情出参已带 faved/followed,先用返回值回显;
// 兼容旧后端:缺失时再用 /favorite/status 批量回显。
this.faved = !!res.faved
@@ -312,6 +333,26 @@ export default {
return false
}
},
/**
* 应用详情接口返回的解锁态:
* 后端按「会员有效期内 / 已付费解锁 / 本人发布」返回 unlocked=true + 明文联系方式,
* 其余情况返回脱敏串,前端据此决定显示「已受保护」还是联系方式。
*/
applyAccess(res) {
this.unlocked = !!(res && res.unlocked)
this.contact = this.unlocked
? { phone: (res && res.contact) || '', wechat: (res && res.wechat) || '' }
: { phone: '', wechat: '' }
},
/** 返回详情页时只刷新解锁态(例如刚在会员中心开通完会员) */
async refreshAccess() {
try {
const res = await postApi.detail(this.id, { accessOnly: 1 })
this.applyAccess(res)
} catch (e) {
// 静默失败,保持现有展示
}
},
/** 进入详情时回显收藏 / 关注状态(失败静默,保持默认状态) */
async loadInteractStatus() {
const publisherId = this.post.publisher && this.post.publisher.id