chore:名片的全部页面下面删除提交申请

This commit is contained in:
2026-10-19 09:00:38 +08:00
parent 7daa3afdc2
commit 91ce0b582b

View File

@@ -90,8 +90,10 @@
<view class="empty-icon">📇</view>
<view class="empty-title" v-if="apply && apply.status === 2">已拒绝:{{ apply.note || '商家未填写理由' }}</view>
<view class="empty-title" v-else>还没有名片</view>
<view class="empty-sub">提交信息,申请商家为您建卡</view>
<view class="apply-form">
<!-- 未登录(游客)不展示建卡申请表单, 改为引导登录 -->
<view class="empty-sub" v-if="isLogin">提交信息,申请商家为您建卡</view>
<view class="empty-sub" v-else>登录后即可申请商家为您建卡</view>
<view class="apply-form" v-if="isLogin">
<input class="apply-input" :value="applyName" @input="onApplyNameInput"
placeholder="您的姓名" />
<input class="apply-input" :value="applyMobile" @input="onApplyMobileInput"
@@ -181,6 +183,16 @@ export default {
return { icon: '🔍', title: '未找到匹配的名片', sub: '换个关键词试试' };
}
return null;
},
/**
* 是否已登录。
*
* 未登录(游客)时不应展示「建卡申请」表单: 提交必然失败(接口要求登录态),
* 而且用户连自己是谁都没确定, 让他填姓名/手机号没有意义。
* token 就绪后这里会自动变为 true, 表单随之出现(bootstrap 已等 token 再拉列表)。
*/
isLogin() {
return !!this.$store.state.token;
}
},
onLoad(options) {
@@ -400,8 +412,9 @@ export default {
this.page = pageNo;
this.list = pageNo === 1 ? rows : this.list.concat(rows);
// 空态(首页无卡): 拉取建卡申请状态, 驱动空态申请 UI(2.11.15)
// 仅「全部 + 无搜索 + 无收藏筛选」时才需要(其余筛选为空不代表用户没卡)
if (pageNo === 1 && rows.length === 0 && !this.emptyScene) this.loadApplyStatus();
// 仅「全部 + 无搜索 + 无收藏筛选 + 已登录」时才需要
// (其余筛选为空不代表用户没卡; 未登录时申请表单纯粹不展示, 不必请求)
if (pageNo === 1 && rows.length === 0 && !this.emptyScene && this.isLogin) this.loadApplyStatus();
this.emptyText = this.keyword.trim()
? '未找到匹配的名片'
: '暂无名片,可点击右上角「新建」或「认领」添加';