diff --git a/pages_tool/card/list.vue b/pages_tool/card/list.vue
index 3a75e6b..6c86073 100644
--- a/pages_tool/card/list.vue
+++ b/pages_tool/card/list.vue
@@ -13,15 +13,30 @@
认领
+
+
+ {{ applyBanner.type === 'warn' ? '!' : 'i' }}
+
+ {{ applyBanner.title }}
+ {{ applyBanner.sub }}
+
+ {{ applyBanner.action }}
+
+
{{ avatarText(item.name) }}
+ 申
- {{ item.name || '未命名名片' }}
+
+ {{ item.name || '未命名名片' }}
+ 需修改
+
{{ [item.job_title, item.company].filter(Boolean).join(' · ') }}
@@ -55,9 +70,25 @@ export default {
count: 0,
keyword: '',
isLoading: false,
+ myApply: null,
emptyText: '暂无名片,可「新建」「申请」或「认领」添加'
};
},
+ computed: {
+ // Q7: 申请状态条——只在有进行中/被拒的申请时显示(已通过且有卡不打扰)
+ applyBanner() {
+ const a = this.myApply;
+ if (!a) return null;
+ const st = parseInt(a.status, 10);
+ if (st === 0) {
+ return { type: 'info', title: '建卡申请审核中', sub: '商家处理后名片会自动出现在名片夹', action: '查看' };
+ }
+ if (st === 2) {
+ return { type: 'warn', title: '申请未通过', sub: '可修改姓名/手机号后重新提交申请', action: '重新申请' };
+ }
+ return null;
+ }
+ },
onLoad() {
this.refresh();
},
@@ -96,17 +127,21 @@ export default {
page_size: this.pageSize,
keyword: this.keyword.trim()
},
- success: res => {
- if (res.code == 0) {
- const data = res.data || {};
- const rows = data.list || [];
- this.pageCount = data.page_count || 1;
- this.count = data.count || 0;
- this.page = pageNo;
- this.list = pageNo === 1 ? rows : this.list.concat(rows);
- this.emptyText = this.keyword.trim()
- ? '未找到匹配的名片'
- : '暂无名片,可「新建」「申请」或「认领」添加';
+ success: res => {
+ if (res.code == 0) {
+ const data = res.data || {};
+ const rows = data.list || [];
+ this.pageCount = data.page_count || 1;
+ this.count = data.count || 0;
+ this.page = pageNo;
+ this.list = pageNo === 1 ? rows : this.list.concat(rows);
+ // 申请状态只在首页返回, 分页不覆盖
+ if (pageNo === 1 && data.my_apply !== undefined) {
+ this.myApply = data.my_apply;
+ }
+ this.emptyText = this.keyword.trim()
+ ? '未找到匹配的名片'
+ : '暂无名片,可「新建」「申请」或「认领」添加';
} else {
this.handleApiError(res);
}
@@ -137,6 +172,19 @@ export default {
url: '/pages_tool/card/apply'
});
},
+ // Q7: 申请状态条点按——被拒时去重新申请, 待审时去看进度(申请页自带状态回查)
+ onApplyBannerTap() {
+ this.goApply();
+ },
+ // Q5: 查看商户打的修改建议
+ showReviewNote(item) {
+ uni.showModal({
+ title: '商家修改建议',
+ content: (item && item.review_note) || '商家未填写具体建议,请联系发卡商家',
+ showCancel: false,
+ confirmText: '知道了'
+ });
+ },
onClaimTap() {
uni.showModal({
title: '认领名片',
@@ -233,6 +281,97 @@ export default {
}
}
+ /* Q7 申请状态条 */
+ .apply-banner {
+ display: flex;
+ align-items: center;
+ margin: 20rpx 0 8rpx;
+ padding: 18rpx 22rpx;
+ border-radius: 16rpx;
+ background: #eef4ff;
+
+ &--warn {
+ background: #fdf3e7;
+ }
+
+ &__ico {
+ width: 36rpx;
+ height: 36rpx;
+ line-height: 36rpx;
+ text-align: center;
+ border-radius: 50%;
+ background: var(--main-color, #0054a5);
+ color: #fff;
+ font-size: 24rpx;
+ font-weight: 700;
+ flex: none;
+ }
+
+ &--warn &__ico {
+ background: #e6a23c;
+ }
+
+ &__txt {
+ flex: 1;
+ min-width: 0;
+ margin-left: 16rpx;
+ }
+
+ &__title {
+ display: block;
+ font-size: 26rpx;
+ font-weight: 600;
+ color: #1a1f36;
+ }
+
+ &__sub {
+ display: block;
+ font-size: 22rpx;
+ color: #5a6478;
+ margin-top: 2rpx;
+ }
+
+ &__act {
+ font-size: 24rpx;
+ color: var(--main-color, #0054a5);
+ font-weight: 600;
+ flex: none;
+ }
+
+ &--warn &__act {
+ color: #e6a23c;
+ }
+ }
+
+ /* Q5 需修改标 / Q6 申请角标 */
+ .fix-flag {
+ display: inline-block;
+ vertical-align: middle;
+ margin-left: 12rpx;
+ padding: 2rpx 12rpx;
+ font-size: 20rpx;
+ line-height: 26rpx;
+ color: #e34d59;
+ background: #fdeced;
+ border-radius: 8rpx;
+ font-weight: 600;
+ }
+
+ .avatar-flag {
+ position: absolute;
+ right: -6rpx;
+ bottom: -6rpx;
+ width: 32rpx;
+ height: 32rpx;
+ line-height: 32rpx;
+ text-align: center;
+ font-size: 18rpx;
+ color: #fff;
+ background: #7c5cfc;
+ border-radius: 50%;
+ border: 2rpx solid #fff;
+ }
+
.claim-btn {
margin-left: 20rpx;
height: 72rpx;
@@ -272,6 +411,7 @@ export default {
}
.card-avatar {
+ position: relative;
width: 88rpx;
height: 88rpx;
border-radius: 50%;