Commit 9f4ddb62 by 高淑倩

phoneFormat

parent 8d0eb54b
<!--shoppingGuid/page/pages/home/home.wxml--> <!--shoppingGuid/page/pages/home/home.wxml-->
<wxs src="../../../../wxs/utils.wxs" module="utils" />
<!-- 导购首页 --> <!-- 导购首页 -->
<view class='main-container'> <view class='main-container'>
<!-- top --> <!-- top -->
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
<view class='table-list-item'> <view class='table-list-item'>
<view class='lf'> <view class='lf'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/home_default_logo.png' mode='aspectFit' /> <image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/home_default_logo.png' mode='aspectFit' />
<text>1394585xxxx</text> <text>{{utils.phoneFormat(item.member.mobile || 17521232119)}}</text>
</view> </view>
<view class='rg'>已招募 <view class='rg'>已招募
<text>34</text> <text>{{item.recruitCount}}</text>
</view> </view>
</view> </view>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<text>龙阳店</text> <text>龙阳店</text>
</view> </view>
<view class='rg'>已招募 <view class='rg'>已招募
<text>389</text> <text>{{item.recruitCount}}</text>
</view> </view>
</view> </view>
......
...@@ -93,7 +93,7 @@ wxService.page({ ...@@ -93,7 +93,7 @@ wxService.page({
}, },
//销售任务item点击事件 //销售任务item点击事件
onTapToSaleTaskInfo(e){ onTapToSaleTaskInfo(e){
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item.task;
let id = item.id || 0; let id = item.id || 0;
let type = item.type || 1; let type = item.type || 1;
...@@ -104,7 +104,7 @@ wxService.page({ ...@@ -104,7 +104,7 @@ wxService.page({
}, },
//招募任务item点击事件 //招募任务item点击事件
onTapToInviteTaskInfo(e){ onTapToInviteTaskInfo(e){
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item.task;
let id = item.id || 0; let id = item.id || 0;
let type = item.type || 2; let type = item.type || 2;
......
...@@ -7,6 +7,11 @@ function date(time,format){ ...@@ -7,6 +7,11 @@ function date(time,format){
function toPercent(num, total) { function toPercent(num, total) {
return (Math.round(num / total * 10000) / 100.00 + "%");// 小数点后两位百分比 return (Math.round(num / total * 10000) / 100.00 + "%");// 小数点后两位百分比
} }
function phoneFormat(phone) {
var curPhone = phone.toString()
var mphone = curPhone.substring(0, 7) + 'xxxx'
return mphone
};
function numberFormat(val,d){ function numberFormat(val,d){
if(val){ if(val){
...@@ -51,6 +56,7 @@ function hanlerLinkNeedAuth(link){ ...@@ -51,6 +56,7 @@ function hanlerLinkNeedAuth(link){
module.exports = { module.exports = {
toPercent:toPercent, toPercent:toPercent,
phoneFormat: phoneFormat,
formateUrl:formateUrl, formateUrl:formateUrl,
numberFormat: numberFormat, numberFormat: numberFormat,
date: date, date: date,
......
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