personal.wxml 3.7 KB

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