trustbase-seller-backend 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/routes/onboard.html +157 -35
package/package.json
CHANGED
package/routes/onboard.html
CHANGED
|
@@ -49,6 +49,45 @@ h1{font-size:22px;margin-bottom:4px}
|
|
|
49
49
|
.sbtn.primary:hover{background:#A95230}
|
|
50
50
|
.hintbox{display:none;font-size:12px;color:#6B655B;background:#F7F3EB;border-radius:8px;padding:10px 12px;margin-top:8px;line-height:1.9}
|
|
51
51
|
.hintbox code{background:#fff;padding:1px 6px;border-radius:4px;font-family:Consolas,monospace}
|
|
52
|
+
/* ===== ③ 进件表单美化 (2026-10-03): 分组卡片 / 统一控件 / 虚线上传卡 / 状态卡片 ===== */
|
|
53
|
+
#apply-form .acard{background:#FCFAF4;border:1px solid #EAE3D6;border-radius:14px;padding:18px 16px;margin-bottom:14px}
|
|
54
|
+
#apply-form .acard-h{font-size:15px;font-weight:600;color:#33302B;margin-bottom:12px;display:flex;align-items:center;gap:8px}
|
|
55
|
+
#apply-form .anum{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#C4633C;color:#fff;font-size:12px;font-weight:600;flex:none}
|
|
56
|
+
#apply-form .agrid{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}
|
|
57
|
+
#apply-form .afield-full{grid-column:1/-1}
|
|
58
|
+
#apply-form .afield label{display:block;font-size:13px;color:#6B655B;margin:0 0 5px}
|
|
59
|
+
#apply-form .aopt{font-size:11px;color:#BDB5A6;font-weight:400;margin-left:4px}
|
|
60
|
+
#apply-form .afield input,#apply-form .afield select{width:100%;padding:10px 12px;border:1px solid #D4CDBF;border-radius:8px;font-size:15px;background:#fff;transition:border-color .15s,box-shadow .15s}
|
|
61
|
+
#apply-form .afield input::placeholder{color:#BDB5A6}
|
|
62
|
+
#apply-form .afield input:focus,#apply-form .afield select:focus{outline:none;border-color:#C4633C;box-shadow:0 0 0 3px rgba(196,99,60,.15)}
|
|
63
|
+
/* 上传卡片 (结构由 mountApplyUpload 生成: 标题label + label.sbtn>input + span#st_*) */
|
|
64
|
+
#apply-form .auploads{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}
|
|
65
|
+
#apply-form div[id^="a_up_"]>label:first-child{display:block;font-size:13px;font-weight:600;color:#33302B;margin-bottom:6px}
|
|
66
|
+
#apply-form div[id^="a_up_"]>label:first-child::after{content:' *';color:#DC2626}
|
|
67
|
+
#apply-form div[id^="a_up_"] label.sbtn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:2px dashed #D4CDBF;border-radius:10px;background:#FFFDF9;padding:18px 10px;margin:0;text-align:center;cursor:pointer;color:#6B655B;transition:border-color .15s,background .15s}
|
|
68
|
+
#apply-form div[id^="a_up_"] label.sbtn::before{content:'📷';font-size:22px;line-height:1}
|
|
69
|
+
#apply-form div[id^="a_up_"] label.sbtn::after{content:'支持 jpg/png, 本机压缩后上传';font-size:11px;color:#BDB5A6;font-weight:400;border:none;background:none;padding:0}
|
|
70
|
+
#apply-form div[id^="a_up_"] label.sbtn:hover{border-color:#C4633C;background:#FBF1EA}
|
|
71
|
+
#apply-form div[id^="a_up_"] span[id^="st_"]{display:block;font-size:12px;margin-top:6px}
|
|
72
|
+
img.auprev{display:none;width:100%;max-height:140px;object-fit:cover;border-radius:8px;margin-bottom:8px;border:1px solid #EAE3D6}
|
|
73
|
+
.auname{font-size:11px;color:#8A857B;margin:-2px 0 6px;word-break:break-all}
|
|
74
|
+
/* 提交按钮 + 隐私行 */
|
|
75
|
+
#btn-apply-submit{display:block;width:100%;background:#C4633C;color:#fff;border:none;border-radius:10px;padding:15px;font-size:17px;font-weight:600;cursor:pointer;margin-top:4px;transition:background .15s}
|
|
76
|
+
#btn-apply-submit:hover{background:#A95230}
|
|
77
|
+
#btn-apply-submit:disabled{background:#D8D2C8;cursor:not-allowed}
|
|
78
|
+
.aprivacy{font-size:12px;color:#8A857B;text-align:center;margin-top:10px;line-height:1.8}
|
|
79
|
+
/* 状态卡片 (按 data-state 着色, 由追加脚本按内容标) */
|
|
80
|
+
#apply-status{border-radius:12px;padding:14px 16px;font-size:14px;line-height:2;border:1px solid #EAE3D6;background:#FCFAF4;word-break:break-all}
|
|
81
|
+
#apply-status[data-state="done"]{background:#F0FDF4;border-color:#BBF7D0}
|
|
82
|
+
#apply-status[data-state="checking"]{background:#FFFBEB;border-color:#FDE68A}
|
|
83
|
+
#apply-status[data-state="sign"]{background:#EFF6FF;border-color:#BFDBFE}
|
|
84
|
+
#apply-status[data-state="pending"]{background:#FFF7ED;border-color:#FED7AA}
|
|
85
|
+
#apply-status a{display:inline-block;background:#C4633C;color:#fff !important;border-radius:8px;padding:10px 18px;font-size:15px;font-weight:600;text-decoration:none;margin-top:8px}
|
|
86
|
+
#apply-status .aqr{display:flex;align-items:center;justify-content:center;width:120px;height:120px;border:2px dashed #93C5FD;border-radius:10px;background:#fff;color:#8A857B;font-size:12px;text-align:center;margin:10px 0 2px;line-height:1.6}
|
|
87
|
+
@media (max-width:640px){
|
|
88
|
+
#apply-form .agrid{grid-template-columns:1fr}
|
|
89
|
+
#apply-form .auploads{grid-template-columns:1fr}
|
|
90
|
+
}
|
|
52
91
|
@media print{
|
|
53
92
|
body *{visibility:hidden}
|
|
54
93
|
#print-area,#print-area *{visibility:visible}
|
|
@@ -84,41 +123,72 @@ h1{font-size:22px;margin-bottom:4px}
|
|
|
84
123
|
<div class="hintbox" id="verify-msg"></div>
|
|
85
124
|
<div class="ops noprint"><button class="sbtn" id="btn-apply-toggle" onclick="toggleApplyForm()">填写进件资料并上传证件</button></div>
|
|
86
125
|
<div class="hintbox" id="apply-msg"></div>
|
|
87
|
-
<div id="apply-status" style="display:none;margin-top:
|
|
88
|
-
<div id="apply-form" style="display:none;margin-top:
|
|
89
|
-
<div class="desc" style="margin-bottom:
|
|
90
|
-
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<div
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
126
|
+
<div id="apply-status" style="display:none;margin-top:12px"></div>
|
|
127
|
+
<div id="apply-form" style="display:none;margin-top:12px">
|
|
128
|
+
<div class="desc" style="margin-bottom:12px">以下资料由你的电脑<b>本地加密</b>后交给服务商,向微信申请特约商户收款账户。身份证号/银行卡号在你电脑上就已加密,任何人 (含服务商) 都看不到明文。</div>
|
|
129
|
+
|
|
130
|
+
<div class="acard">
|
|
131
|
+
<div class="acard-h"><span class="anum">1</span>主体资料</div>
|
|
132
|
+
<div class="agrid">
|
|
133
|
+
<div class="afield"><label for="a_subject_type">主体类型</label>
|
|
134
|
+
<select id="a_subject_type"><option value="SUBJECT_TYPE_INDIVIDUAL">个体工商户</option><option value="SUBJECT_TYPE_ENTERPRISE">企业</option></select></div>
|
|
135
|
+
<div class="afield"><label for="a_shortname">商户简称</label><input id="a_shortname" placeholder="支付完成页展示, 如: 张三餐饮店"></div>
|
|
136
|
+
<div class="afield"><label for="a_merchant_name">营业执照名称</label><input id="a_merchant_name" placeholder="全称, 与执照一致"></div>
|
|
137
|
+
<div class="afield"><label for="a_license_number">统一社会信用代码</label><input id="a_license_number" placeholder="18 位, 9 开头"></div>
|
|
138
|
+
<div class="afield"><label for="a_service_phone">客服电话</label><input id="a_service_phone" placeholder="交易记录向买家展示"></div>
|
|
139
|
+
<div class="afield"><label for="a_settlement_id">经营类目编码</label><input id="a_settlement_id" placeholder="如: 719 (服务商提供对照表)"></div>
|
|
140
|
+
<div class="afield afield-full"><label for="a_qualification_type">类目资质描述</label><input id="a_qualification_type" placeholder="如: 零售"></div>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div class="acard">
|
|
145
|
+
<div class="acard-h"><span class="anum">2</span>法人身份 / 超级管理员</div>
|
|
146
|
+
<div class="agrid">
|
|
147
|
+
<div class="afield"><label for="a_legal_name">法人/经营者姓名</label><input id="a_legal_name" placeholder="与身份证一致"></div>
|
|
148
|
+
<div class="afield"><label for="a_legal_id_number">法人身份证号</label><input id="a_legal_id_number" placeholder="17 位数字 + 数字或 X"></div>
|
|
149
|
+
<div class="afield"><label for="a_period_begin">身份证有效期开始</label><input id="a_period_begin" placeholder="YYYY-MM-DD"></div>
|
|
150
|
+
<div class="afield"><label for="a_period_end">有效期结束</label><input id="a_period_end" placeholder="YYYY-MM-DD 或 长期"></div>
|
|
151
|
+
<div class="afield"><label for="a_contact_name">超级管理员姓名</label><input id="a_contact_name" placeholder="与微信实名一致"></div>
|
|
152
|
+
<div class="afield"><label for="a_contact_mobile">超管手机号</label><input id="a_contact_mobile" placeholder="11 位, 接收微信验证码"></div>
|
|
153
|
+
<div class="afield afield-full"><label for="a_contact_email">联系邮箱</label><input id="a_contact_email" placeholder="接收微信开户邮件"></div>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<div class="acard">
|
|
158
|
+
<div class="acard-h"><span class="anum">3</span>结算账户</div>
|
|
159
|
+
<div class="agrid">
|
|
160
|
+
<div class="afield"><label for="a_account_type">账户类型</label>
|
|
161
|
+
<select id="a_account_type"><option value="BANK_ACCOUNT_TYPE_PERSONAL">经营者个人银行卡 (个体户)</option><option value="BANK_ACCOUNT_TYPE_CORPORATE">对公银行账户</option></select></div>
|
|
162
|
+
<div class="afield"><label for="a_account_bank">开户银行</label><input id="a_account_bank" placeholder="如: 招商银行"></div>
|
|
163
|
+
<div class="afield"><label for="a_account_name">开户名称</label><input id="a_account_name" placeholder="个人卡=经营者姓名 / 对公=执照名称"></div>
|
|
164
|
+
<div class="afield"><label for="a_account_number">银行账号</label><input id="a_account_number" placeholder="卡号"></div>
|
|
165
|
+
<div class="afield"><label for="a_bank_name">开户支行 <span class="aopt">选填</span></label><input id="a_bank_name" placeholder="如: 招商银行深圳分行营业部"></div>
|
|
166
|
+
<div class="afield"><label for="a_bank_address_code">开户行省市编码 <span class="aopt">选填</span></label><input id="a_bank_address_code" placeholder="如: 440300"></div>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<div class="acard">
|
|
171
|
+
<div class="acard-h"><span class="anum">4</span>门店信息</div>
|
|
172
|
+
<div class="agrid">
|
|
173
|
+
<div class="afield"><label for="a_store_name">门店名称</label><input id="a_store_name" placeholder="线下场所名称"></div>
|
|
174
|
+
<div class="afield"><label for="a_store_address_code">门店省市编码</label><input id="a_store_address_code" placeholder="如: 440300"></div>
|
|
175
|
+
<div class="afield afield-full"><label for="a_store_address">门店详细地址</label><input id="a_store_address" placeholder="xx 路 xx 号"></div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
<div class="acard">
|
|
180
|
+
<div class="acard-h"><span class="anum">5</span>证件上传</div>
|
|
181
|
+
<div class="auploads">
|
|
182
|
+
<div id="a_up_license"></div>
|
|
183
|
+
<div id="a_up_idfront"></div>
|
|
184
|
+
<div id="a_up_idback"></div>
|
|
185
|
+
<div id="a_up_entrance"></div>
|
|
186
|
+
<div id="a_up_indoor"></div>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
<button class="abtn" id="btn-apply-submit" onclick="submitApplyment()">加密并提交进件</button>
|
|
191
|
+
<div class="aprivacy">🔒 资料只保存在这台电脑; 敏感字段本机加密后交服务商; 服务商暂时不可达时加密暂存本机, 可重试。</div>
|
|
122
192
|
</div>
|
|
123
193
|
</div>
|
|
124
194
|
</div>
|
|
@@ -425,5 +495,57 @@ async function submit(){
|
|
|
425
495
|
}catch(e){alert('网络错误: '+e.message);btn.disabled=false}
|
|
426
496
|
}
|
|
427
497
|
</script>
|
|
498
|
+
<script>
|
|
499
|
+
/* ===== ③ 进件表单 美化增强 (2026-10-03) —— 纯追加脚本: 不修改/不覆盖任何现有函数,
|
|
500
|
+
只做两件视觉事: ① 证件选中后显示缩略图+文件名 ② 状态卡片按内容着色 + 签约二维码占位。
|
|
501
|
+
所有字段 id / 上传提交函数 / 状态机 DOM 目标均沿用现有逻辑。 ===== */
|
|
502
|
+
(function(){
|
|
503
|
+
// ① 证件缩略图预览 (事件委托, 与现有上传 handler 并存, 只读文件不干预流程)
|
|
504
|
+
var form=document.getElementById('apply-form');
|
|
505
|
+
if(form){
|
|
506
|
+
form.addEventListener('change',function(ev){
|
|
507
|
+
var input=ev.target;
|
|
508
|
+
if(!input||input.type!=='file'||!input.files||!input.files[0]) return;
|
|
509
|
+
var slot=input.closest('div[id^="a_up_"]');
|
|
510
|
+
if(!slot) return;
|
|
511
|
+
var rd=new FileReader();
|
|
512
|
+
rd.onload=function(){
|
|
513
|
+
var img=slot.querySelector('img.auprev');
|
|
514
|
+
if(!img){
|
|
515
|
+
img=document.createElement('img');
|
|
516
|
+
img.className='auprev';img.alt='预览';
|
|
517
|
+
slot.insertBefore(img,slot.children[1]||null); // 标题label之后
|
|
518
|
+
}
|
|
519
|
+
img.src=rd.result;img.style.display='block';
|
|
520
|
+
var nm=slot.querySelector('.auname');
|
|
521
|
+
if(!nm){nm=document.createElement('div');nm.className='auname';img.insertAdjacentElement('afterend',nm);}
|
|
522
|
+
nm.textContent=input.files[0].name+' · 点卡片可重新选择';
|
|
523
|
+
};
|
|
524
|
+
rd.readAsDataURL(input.files[0]);
|
|
525
|
+
},true);
|
|
526
|
+
}
|
|
527
|
+
// ② 状态卡片着色 + 签约二维码占位 (监听现有状态机的 DOM 更新, 不改其内容逻辑)
|
|
528
|
+
var box=document.getElementById('apply-status');
|
|
529
|
+
if(box){
|
|
530
|
+
var paint=function(){
|
|
531
|
+
var t=box.textContent||'';
|
|
532
|
+
box.setAttribute('data-state',
|
|
533
|
+
t.indexOf('FINISHED')>=0?'done':
|
|
534
|
+
(t.indexOf('TO_BE_SIGNED')>=0||t.indexOf('签约')>=0)?'sign':
|
|
535
|
+
t.indexOf('PENDING_PUSH')>=0?'pending':'checking');
|
|
536
|
+
// 有签约链接 → 补一个二维码占位块 (真二维码后续可接 qrcode 库, 链接本身可点)
|
|
537
|
+
var link=box.querySelector('a');
|
|
538
|
+
if(link&&!box.querySelector('.aqr')){
|
|
539
|
+
var qr=document.createElement('div');
|
|
540
|
+
qr.className='aqr';
|
|
541
|
+
qr.textContent='签约二维码 (用法人微信扫)';
|
|
542
|
+
link.insertAdjacentElement('beforebegin',qr);
|
|
543
|
+
}
|
|
544
|
+
};
|
|
545
|
+
new MutationObserver(paint).observe(box,{childList:true,subtree:true,characterData:true});
|
|
546
|
+
paint();
|
|
547
|
+
}
|
|
548
|
+
})();
|
|
549
|
+
</script>
|
|
428
550
|
</body>
|
|
429
551
|
</html>
|