Commit e4e4cc5e authored by xinzhedeai's avatar xinzhedeai

add:商户信息明文加密处理;特种工作也报备详情明文加密处理

parent bc731524
......@@ -67,7 +67,7 @@ if (window.env == 'dev') {
// 管理员 线上
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiZGFiZWMwMTAtYzM1MS00NGUzLTk5OTAtZGJjMmRhMzgyNGU5In0.SgeTLyYLDbJyvPxvPSpX6rRg2anfR12_40x9cKcTFXOmPzyiLv5OHMdYufBlW5btrver7aBcCLm7QQEFYBTemA'
// 管理员 本地
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiNGM3MDViODYtNjI1ZC00ZTM2LTk0MjktMGI0YzI3M2RmYzgzIn0.VBLduy3ERQ8wsNDiV8iuEHzisqWjrbocL2d4cOTCHkLax44iqA1q8vDNF7dlESIpSPU6Hk8BFkGKgfynyEguvw'
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiZjA5OWU0ZTAtNzMxMS00MDlkLTg3YTUtYjhkNDNjMWVjNjQ4In0.qrivFnf68QSQ9mG0tOg9jeSB7loDMnP4NlpNthEBywPLkIaGZoE74IrTGSzFvajyay2-gBJ8GCunVOTyvTEebw'
// 街道
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqaWVkYW8iLCJsb2dpbl91c2VyX2tleSI6ImNjNjRkMmZhLWQzNmItNGRkZi05MjcxLTliYTA0ZDJkYzM4NiJ9.G2BAs3XnlqR6QgDRWDfXkOpdLYhFdqEaTxvE8GxLAgU8vcsHPEKdhQ4VvOwsiNAtIaUpMDXirOb-FrHVNvZo4g'
......
......@@ -237,3 +237,10 @@ select:disabled {
height: 0.88rem;
line-height: 0.88rem;
} */
/* 图标样式优化 */
.van-icon-closed-eye, .van-icon-eye-o {
font-size: 16px;
transition: color 0.2s;
}
This diff is collapsed.
......@@ -57,6 +57,19 @@ window.addEventListener('load', function () {
dict4community: [],
dict4industryType: [],
consumerSuggestList: [],
// 添加显示状态管理对象
showOriginal: {
merchantName: false,
merchantPhone: false,
businessAddress: false,
owner: false,
ownerPhone: false,
operator: false,
operatorPhone: false,
landlordName: false,
landlordContact: false
}
}
},
computed: {
......@@ -93,6 +106,26 @@ window.addEventListener('load', function () {
}
},
methods: {
// 添加脱敏处理函数
desensitize(value, type) {
if (!value) return '';
switch(type) {
case 'name': // 姓名脱敏:保留姓氏
return value.length > 1 ? value.charAt(0) + '*'.repeat(value.length - 1) : value;
case 'phone': // 手机号脱敏:保留前3后4
return value.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2');
case 'address': // 地址脱敏:保留前5后5
if (value.length <= 10) return value;
return value.substring(0, 5) + '*****' + value.substring(value.length - 5);
default: // 默认脱敏:保留前3后3
if (value.length <= 6) return value;
return value.substring(0, 3) + '*****' + value.substring(value.length - 3);
}
},
// 切换显示状态方法
toggleShow(field) {
this.$set(this.showOriginal, field, !this.showOriginal[field]);
},
reset(){
this.page = 1
this.size = 9999
......
......@@ -397,3 +397,10 @@ iframe{
color: #FFFFFF; /* 文字颜色 */
line-height: 1.2; /* 行高 */
}
/* 图标样式优化 */
.van-icon-closed-eye, .van-icon-eye-o {
font-size: 16px;
transition: color 0.2s;
}
\ No newline at end of file
......@@ -30,14 +30,32 @@
<div class="form-item">
<span class="form-label title_require">联系人</span>
<div class="form-input-wrap" style="font-size: 15px;color: #737373;">
{{ formData.merchantName }}
<template>
<span :class="'form-input'" style="line-height: .7rem;">
{{ showOriginal.merchantName ? formData.merchantName : desensitize(formData.merchantName, 'name') }}
</span>
<van-icon
:name="showOriginal.merchantName ? 'eye-o' : 'closed-eye'"
@click="toggleShow('merchantName')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
</div>
</div>
<div class="form-item">
<span class="form-label title_require">电话</span>
<div class="form-input-wrap" style="font-size: 15px;color: #737373;">
{{ formData.merchantPhone }}
<template><!-- 详情模式 -->
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.merchantPhone ? formData.merchantPhone : desensitize(formData.merchantPhone, 'phone') }}
</span>
<van-icon
:name="showOriginal.merchantPhone ? 'eye-o' : 'closed-eye'"
@click="toggleShow('merchantPhone')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
</div>
</div>
<div class="form-item">
......
......@@ -38,7 +38,12 @@ window.addEventListener("load", function () {
},
id: '',
errorReqCount: 0,
iosFlag: gemhoUtil.isIOSStrict()
iosFlag: gemhoUtil.isIOSStrict(),
// 添加显示状态管理对象
showOriginal: {
merchantName: false,
merchantPhone: false,
}
}
},
created() {
......@@ -56,6 +61,26 @@ window.addEventListener("load", function () {
this.getDict4tab1()
},
methods: {
// 添加脱敏处理函数
desensitize(value, type) {
if (!value) return '';
switch(type) {
case 'name': // 姓名脱敏:保留姓氏
return value.length > 1 ? value.charAt(0) + '*'.repeat(value.length - 1) : value;
case 'phone': // 手机号脱敏:保留前3后4
return value.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2');
case 'address': // 地址脱敏:保留前5后5
if (value.length <= 10) return value;
return value.substring(0, 5) + '*****' + value.substring(value.length - 5);
default: // 默认脱敏:保留前3后3
if (value.length <= 6) return value;
return value.substring(0, 3) + '*****' + value.substring(value.length - 3);
}
},
// 切换显示状态方法
toggleShow(field) {
this.$set(this.showOriginal, field, !this.showOriginal[field]);
},
goback4ios() { // 全部标记为已读
let params = {
merId: gemhoUtil.getCookie('merId') || '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment