Commit e4e4cc5e authored by xinzhedeai's avatar xinzhedeai

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

parent bc731524
...@@ -67,7 +67,7 @@ if (window.env == 'dev') { ...@@ -67,7 +67,7 @@ if (window.env == 'dev') {
// 管理员 线上 // 管理员 线上
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiZGFiZWMwMTAtYzM1MS00NGUzLTk5OTAtZGJjMmRhMzgyNGU5In0.SgeTLyYLDbJyvPxvPSpX6rRg2anfR12_40x9cKcTFXOmPzyiLv5OHMdYufBlW5btrver7aBcCLm7QQEFYBTemA' // 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiZGFiZWMwMTAtYzM1MS00NGUzLTk5OTAtZGJjMmRhMzgyNGU5In0.SgeTLyYLDbJyvPxvPSpX6rRg2anfR12_40x9cKcTFXOmPzyiLv5OHMdYufBlW5btrver7aBcCLm7QQEFYBTemA'
// 管理员 本地 // 管理员 本地
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiNGM3MDViODYtNjI1ZC00ZTM2LTk0MjktMGI0YzI3M2RmYzgzIn0.VBLduy3ERQ8wsNDiV8iuEHzisqWjrbocL2d4cOTCHkLax44iqA1q8vDNF7dlESIpSPU6Hk8BFkGKgfynyEguvw' 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiZjA5OWU0ZTAtNzMxMS00MDlkLTg3YTUtYjhkNDNjMWVjNjQ4In0.qrivFnf68QSQ9mG0tOg9jeSB7loDMnP4NlpNthEBywPLkIaGZoE74IrTGSzFvajyay2-gBJ8GCunVOTyvTEebw'
// 街道 // 街道
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqaWVkYW8iLCJsb2dpbl91c2VyX2tleSI6ImNjNjRkMmZhLWQzNmItNGRkZi05MjcxLTliYTA0ZDJkYzM4NiJ9.G2BAs3XnlqR6QgDRWDfXkOpdLYhFdqEaTxvE8GxLAgU8vcsHPEKdhQ4VvOwsiNAtIaUpMDXirOb-FrHVNvZo4g' // 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqaWVkYW8iLCJsb2dpbl91c2VyX2tleSI6ImNjNjRkMmZhLWQzNmItNGRkZi05MjcxLTliYTA0ZDJkYzM4NiJ9.G2BAs3XnlqR6QgDRWDfXkOpdLYhFdqEaTxvE8GxLAgU8vcsHPEKdhQ4VvOwsiNAtIaUpMDXirOb-FrHVNvZo4g'
......
...@@ -236,4 +236,11 @@ select:disabled { ...@@ -236,4 +236,11 @@ select:disabled {
padding: 0 0.3rem; padding: 0 0.3rem;
height: 0.88rem; height: 0.88rem;
line-height: 0.88rem; line-height: 0.88rem;
} */ } */
\ No newline at end of file
/* 图标样式优化 */
.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 () { ...@@ -57,6 +57,19 @@ window.addEventListener('load', function () {
dict4community: [], dict4community: [],
dict4industryType: [], dict4industryType: [],
consumerSuggestList: [], consumerSuggestList: [],
// 添加显示状态管理对象
showOriginal: {
merchantName: false,
merchantPhone: false,
businessAddress: false,
owner: false,
ownerPhone: false,
operator: false,
operatorPhone: false,
landlordName: false,
landlordContact: false
}
} }
}, },
computed: { computed: {
...@@ -93,6 +106,26 @@ window.addEventListener('load', function () { ...@@ -93,6 +106,26 @@ window.addEventListener('load', function () {
} }
}, },
methods: { 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(){ reset(){
this.page = 1 this.page = 1
this.size = 9999 this.size = 9999
......
...@@ -396,4 +396,11 @@ iframe{ ...@@ -396,4 +396,11 @@ iframe{
font-size: 0.28rem; /* 文字大小 */ font-size: 0.28rem; /* 文字大小 */
color: #FFFFFF; /* 文字颜色 */ color: #FFFFFF; /* 文字颜色 */
line-height: 1.2; /* 行高 */ line-height: 1.2; /* 行高 */
} }
\ No newline at end of file
/* 图标样式优化 */
.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 @@ ...@@ -30,14 +30,32 @@
<div class="form-item"> <div class="form-item">
<span class="form-label title_require">联系人</span> <span class="form-label title_require">联系人</span>
<div class="form-input-wrap" style="font-size: 15px;color: #737373;"> <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> </div>
<div class="form-item"> <div class="form-item">
<span class="form-label title_require">电话</span> <span class="form-label title_require">电话</span>
<div class="form-input-wrap" style="font-size: 15px;color: #737373;"> <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> </div>
<div class="form-item"> <div class="form-item">
......
...@@ -38,7 +38,12 @@ window.addEventListener("load", function () { ...@@ -38,7 +38,12 @@ window.addEventListener("load", function () {
}, },
id: '', id: '',
errorReqCount: 0, errorReqCount: 0,
iosFlag: gemhoUtil.isIOSStrict() iosFlag: gemhoUtil.isIOSStrict(),
// 添加显示状态管理对象
showOriginal: {
merchantName: false,
merchantPhone: false,
}
} }
}, },
created() { created() {
...@@ -56,6 +61,26 @@ window.addEventListener("load", function () { ...@@ -56,6 +61,26 @@ window.addEventListener("load", function () {
this.getDict4tab1() this.getDict4tab1()
}, },
methods: { 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() { // 全部标记为已读 goback4ios() { // 全部标记为已读
let params = { let params = {
merId: gemhoUtil.getCookie('merId') || '', 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