feat: 新增会员浏览/拨打额度并优化无图展示逻辑
新增会员每日浏览完整信息和拨打电话的额度配置,调整付费查看接口描述为解锁完整信息,优化帖子无图时的兜底展示逻辑,修复图片加载路径问题,删除废弃工具脚本。
这个提交包含在:
@@ -7,11 +7,11 @@
|
||||
<text class="call-modal__close" @click="handleClose">✕</text>
|
||||
</view>
|
||||
|
||||
<!-- 联系人与脱敏号码 -->
|
||||
<!-- 联系提示(不展示号码,确认后直接调起拨号) -->
|
||||
<view class="call-modal__target">
|
||||
<view class="call-modal__phone-row">
|
||||
<image class="fc-icon fc-icon--md" :src="iconUrl('phone-orange')" mode="aspectFit" />
|
||||
<text class="call-modal__phone">{{ dialDisplay || '暂无联系电话' }}</text>
|
||||
<text class="call-modal__phone">{{ contactLabel }}</text>
|
||||
</view>
|
||||
<text class="call-modal__quota">
|
||||
{{ quotaText }}
|
||||
@@ -49,8 +49,9 @@
|
||||
<script>
|
||||
/**
|
||||
* 免责声明拨打确认弹窗(信息详情页 / 商家详情页通用)
|
||||
* 流程:展示脱敏号码 → 勾选免责声明 → 确认后由父级调用
|
||||
* 流程:确认联系对象 → 勾选免责声明 → 确认后由父级调用
|
||||
* POST /post/:id/dial 或 POST /merchant/:id/dial 扣减当日拨打额度并调起系统拨号
|
||||
* 号码保护:弹窗不展示任何形式的手机号,确认后由系统拨号盘直接呼出
|
||||
*/
|
||||
import { iconUrl } from '@/common/store/ui.js'
|
||||
|
||||
@@ -59,8 +60,8 @@ export default {
|
||||
props: {
|
||||
/** 弹窗显隐 */
|
||||
show: { type: Boolean, default: false },
|
||||
/** 拨打展示文案(联系人姓氏 + 脱敏手机号,如:夏178****8426) */
|
||||
dialDisplay: { type: String, default: '' },
|
||||
/** 联系对象文案(联系人姓名,如:夏先生) */
|
||||
contactName: { type: String, default: '' },
|
||||
/** 今日拨打总额度(0 代表不限次数) */
|
||||
quotaTotal: { type: Number, default: 0 },
|
||||
/** 今日剩余额度 */
|
||||
@@ -82,8 +83,11 @@ export default {
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
contactLabel() {
|
||||
return this.contactName ? `联系 ${this.contactName}` : '确认后直接拨打'
|
||||
},
|
||||
quotaText() {
|
||||
if (this.unlimited || this.quotaTotal === 0) return 'VIP尊享 · 不限拨打次数'
|
||||
if (this.unlimited || this.quotaTotal === 0) return '会员尊享 · 不限拨打次数'
|
||||
const left = Math.max(0, Number(this.quotaLeft) || 0)
|
||||
return `今日剩余 ${left} 次拨打机会`
|
||||
},
|
||||
|
||||
@@ -90,7 +90,8 @@ export default {
|
||||
return m ? `${parseInt(m[2], 10)}月上市` : ''
|
||||
},
|
||||
/**
|
||||
* 帖子封面图:优先使用实际上传封面或第一张实拍图,无图时回退为空由图标微卡片兜底
|
||||
* 帖子封面图:优先使用实际上传封面或第一张实拍图;
|
||||
* 无图时回退为通用默认实拍图(农产品丰收场景 / 招聘货运场景),与有图卡片视觉一致
|
||||
*/
|
||||
thumbUrl() {
|
||||
if (this.post.cover) {
|
||||
@@ -102,7 +103,9 @@ export default {
|
||||
return assetUrl(first)
|
||||
}
|
||||
}
|
||||
return ''
|
||||
// 无图占位:招聘大类用货运场景,农产品用丰收场景(不在小程序包内,需拼后端域名)
|
||||
const fallback = Number(this.post.categoryId) === 25 ? '/static/posts/job-default.jpg' : '/static/posts/farm-default.jpg'
|
||||
return assetUrl(fallback)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
在新工单中引用
屏蔽一个用户