personal.wxml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!--pages/welfareMall/personal/personal.wxml-->
  2. <view class="{{grayTheme?'page':''}}">
  3. <view class="personal flex-column">
  4. <!-- 首部个人信息 -->
  5. <view class="head flex-column">
  6. <view class="head-personal flex-row">
  7. <image wx:if="{{!isLogin}}" class="head-personal-logo" src="/images/welfareMall/head-portrait.png" />
  8. <!-- 获取用户头像 -->
  9. <open-data wx:if="{{isLogin}}" class="head-personal-logo" type="userAvatarUrl"></open-data>
  10. <view class="head-personal-nl flex-column" wx:if="{{isLogin}}">
  11. <!-- 获取用户微信昵称 -->
  12. <open-data class="head-personal-name" type="userNickName" lang="zh_CN"></open-data>
  13. <view class="head-personal-login">{{phone.toHide(mobileTop)}}</view>
  14. </view>
  15. <button class="personal-isLogin" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">登录/注册</button>
  16. </view>
  17. <view class="head-card flex-row">
  18. <view class="head-card-coupon">我的优惠券</view>
  19. <view class="head-card-nt flex-row">
  20. <view class="head-card-num">{{countNum}}</view>
  21. <view class="head-card-text">张</view>
  22. </view>
  23. </view>
  24. </view>
  25. <!-- 中部详细信息 -->
  26. <!-- 内容 -->
  27. <view class="content flex-column">
  28. <!-- 导航栏遍历 -->
  29. <view class="sign-in content-style" wx:for="{{navigationList}}" data-appid="{{item.appId}}" wx:key="unique">
  30. <button class="wx-isLogin" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNav" data-path="{{item.path}}"></button>
  31. <view class="grant flex-row" bindtap="goToCoupon" data-path="{{item.path}}">
  32. <view class="content-img-text flex-row">
  33. <image class="content-img" src="{{item.figure}}"></image>
  34. <view class="content-text">{{item.title}}</view>
  35. </view>
  36. <image class="content-jump" src="/images/welfareMall/jump.png" />
  37. </view>
  38. <view class="content-lower"></view>
  39. </view>
  40. <view></view>
  41. </view>
  42. </view>
  43. </view>
  44. <!-- 使用wxs 手机号码中间四位显示为*号 -->
  45. <wxs module="phone">
  46. var toHide = function (array) {
  47. var mphone = array.substring(0, 3) + '****' + array.substring(7);
  48. return mphone;
  49. }
  50. module.exports.toHide = toHide;
  51. </wxs>