|
@@ -4,7 +4,8 @@
|
|
|
<view class="head flex-column">
|
|
|
<view class="head-personal flex-row">
|
|
|
<image class="head-personal-logo" src="/images/welfareMall/head-portrait.png" />
|
|
|
- <view class="head-personal-login">登录/注册</view>
|
|
|
+ <view class="head-personal-login" wx:if="{{isLogin}}">{{phone.toHide(mobileTop)}}</view>
|
|
|
+ <view class="head-login"><button class="personal-isLogin" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">登录/注册</button></view>
|
|
|
</view>
|
|
|
<view class="head-card flex-row">
|
|
|
<view class="head-card-coupon">我的优惠券</view>
|
|
@@ -76,5 +77,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+<!-- 使用wxs 手机号码中间四位显示为*号 -->
|
|
|
+<wxs module="phone">
|
|
|
+var toHide = function(array) {
|
|
|
+ var mphone = array.substring(0, 3) + '****' + array.substring(7);
|
|
|
+ return mphone;
|
|
|
+}
|
|
|
+module.exports.toHide = toHide;
|
|
|
+</wxs>
|
|
|
<!-- 底部导航 -->
|
|
|
<tab-bar />
|