personal.wxml 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!--pages/welfareMall/personal/personal.wxml-->
  2. <page-wrap id="Page" class="{{grayTheme?'page':''}}">
  3. <custom-page head-bg-image="/images/welfareMall/my.png" bind:sizes="handlePageSizes">
  4. <view slot="body" class="sign-scroll-body">
  5. <view slot="body" class="personal flex-column">
  6. <!-- 首部个人信息 -->
  7. <view class="head flex-column" style="height: {{bodyImageHeight}}px;">
  8. <view class="head-personal flex-row" wx:if="{{hasUserInfo}}">
  9. <!-- 获取用户头像 -->
  10. <!-- <view class="hat"></view> -->
  11. <image class="head-personal-logo" src="{{userInfo.avatarUrl}}"> </image>
  12. <view class="head-personal-nl flex-column">
  13. <!-- 获取用户微信昵称 -->
  14. <view class="head-personal-name">{{userInfo.nickName}}</view>
  15. <view class="flex-row">
  16. <view class="head-personal-name" wx:if="{{isLogin}}">{{phone.toHide(mobileTop)}}</view>
  17. <button class="head-personal-login" style="background-color: transparent;" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">授权手机号</button>
  18. <view class="logout" wx:if="{{isLogin}}" bindtap="logout">重新授权</view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="head-personal flex-row" wx:else>
  23. <image class="head-personal-logo" src="/images/welfareMall/head-portrait.png"> </image>
  24. <view class="head-personal-nl flex-column">
  25. <!-- 获取用户微信昵称 -->
  26. <button class="personal-isLogin" wx:if="{{isLogin}}" bindtap="getUserProfile">头像/昵称</button>
  27. <view class="flex-row">
  28. <view class="head-personal-name" wx:if="{{isLogin}}">{{phone.toHide(mobileTop)}}</view>
  29. <button class="personal-isLogin" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">登录/注册</button>
  30. <view class="logout" wx:if="{{isLogin}}" bindtap="logout">重新授权</view>
  31. </view>
  32. </view>
  33. </view>
  34. <view>
  35. <!-- <view class="head-card flex-row" catchtap="{{couponPath?'getCouponPath':''}}">
  36. <view class="head-card-coupon">我的优惠券</view>
  37. <view class="head-card-nt flex-row">
  38. <view class="head-card-num">{{countNum}}</view>
  39. <view class="head-card-text">张</view>
  40. </view>
  41. </view> -->
  42. <view class="head-card-no flex-row" catchtap="{{couponPath?'getCouponPath':''}}">
  43. <view class="head-card-coupon">我的优惠券</view>
  44. <view class="head-card-nt flex-row">
  45. <view class="head-card-num">{{countNum}}</view>
  46. <view class="head-card-text">张</view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 员工通道 -->
  52. <view><button class="wx-isLogin-broadcast" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getStaff"></button>
  53. <view class="broadcast" catchtap="toStaff"></view>
  54. </view>
  55. <!-- 内容 -->
  56. <view class="content flex-column">
  57. <!-- 导航栏遍历 -->
  58. <view class="sign-in content-style" wx:for="{{navigationList}}" data-appid="{{item.appId}}" wx:key="unique">
  59. <button class="wx-isLogin" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNav" data-path="{{item.path}}"></button>
  60. <view class="grant flex-row" bindtap="goToCoupon" data-path="{{item.path}}">
  61. <view class="content-img-text flex-row">
  62. <image class="content-img" src="{{item.figure}}"></image>
  63. <view class="content-text">{{item.title}}</view>
  64. </view>
  65. <image class="content-jump" src="/images/welfareMall/jump.png" />
  66. </view>
  67. <view class="content-lower"></view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. </custom-page>
  73. <view>
  74. <button open-type="contact" class="call" type="warn" size="mini">
  75. <image class="service-style" src="../../../images/welfareMall/service-img.png"></image>
  76. </button>
  77. </view>
  78. </page-wrap>
  79. <!-- 使用wxs 手机号码中间四位显示为*号 -->
  80. <wxs module="phone">
  81. var toHide = function (array) {
  82. var mphone = array.substring(0, 3) + '****' + array.substring(7);
  83. return mphone;
  84. }
  85. module.exports.toHide = toHide;
  86. </wxs>