personal.wxml 3.3 KB

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