Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bb25672b
authored
Aug 09, 2024
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接待记录 客户姓名/手机号脱敏开发
1 parent
d3cf45e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
packageEquity/index.wxs
packageEquity/pages/index/components/record-item/recordItem.wxml
packageEquity/index.wxs
View file @
bb25672
...
@@ -33,6 +33,30 @@ var convertCentsToYuan = function (cents) {
...
@@ -33,6 +33,30 @@ var convertCentsToYuan = function (cents) {
return dollars
return dollars
}
}
// 客户姓名脱敏
var desensitizeName = function(name) {
if (name) {
var nameStr = name.trim() + ''
if (nameStr.length <= 1) {
return nameStr
} else {
return nameStr[0] + '**'
}
}
}
// 客户手机号脱敏
var desensitizePhoneNumber = function(phoneNumber) {
if (phoneNumber) {
var phoneNumberStr = phoneNumber.trim() + ''
if (phoneNumberStr.length !== 11) {
return phoneNumberStr
} else {
return phoneNumberStr.slice(0, 3) + '****' + phoneNumberStr.slice(7)
}
}
}
/*
/*
* 导出
* 导出
*/
*/
...
@@ -41,5 +65,7 @@ module.exports = {
...
@@ -41,5 +65,7 @@ module.exports = {
isIncludesItem: isIncludesItem,
isIncludesItem: isIncludesItem,
filterMerchantName: filterMerchantName,
filterMerchantName: filterMerchantName,
isShowEmpty: isShowEmpty,
isShowEmpty: isShowEmpty,
convertCentsToYuan: convertCentsToYuan
convertCentsToYuan: convertCentsToYuan,
desensitizeName: desensitizeName,
desensitizePhoneNumber: desensitizePhoneNumber
}
}
packageEquity/pages/index/components/record-item/recordItem.wxml
View file @
bb25672
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
<view class="base-message">
<view class="base-message">
<view>
<view>
<view class="record-name text-hide">
<view class="record-name text-hide">
<text class="value">{{
itemInfo.customerName
}}</text>
<text class="value">{{
filter.desensitizeName(itemInfo.customerName)
}}</text>
<text class="order-name" wx:if="{{itemInfo.realCustomerName && itemInfo.realCustomerName != itemInfo.customerName}}">({{
itemInfo.realCustomerName
}})</text>
<text class="order-name" wx:if="{{itemInfo.realCustomerName && itemInfo.realCustomerName != itemInfo.customerName}}">({{
filter.desensitizeName(itemInfo.realCustomerName)
}})</text>
</view>
</view>
<text class="record-phone" data-phone="{{itemInfo.phoneNumber}}">{{
itemInfo.phoneNumber
}}</text>
<text class="record-phone" data-phone="{{itemInfo.phoneNumber}}">{{
filter.desensitizePhoneNumber(itemInfo.phoneNumber)
}}</text>
</view>
</view>
<view wx:if="{{itemInfo.employeeName && showEmployeeName}}" catchtap="phoneCall" data-phone="{{itemInfo.employeePhone}}" class="employee-name text-hide">{{itemInfo.employeeName}}</view>
<view wx:if="{{itemInfo.employeeName && showEmployeeName}}" catchtap="phoneCall" data-phone="{{itemInfo.employeePhone}}" class="employee-name text-hide">{{itemInfo.employeeName}}</view>
</view>
</view>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment