user.wxml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!-- pages/user/user.wxml -->
  2. <block wx:if="{{login}}">
  3. <!-- logo -->
  4. <view class="hmly-logo">
  5. <image class="hmly-logo-img" src="/image/logo.png" mode="widthFix"></image>
  6. </view>
  7. <!-- 登录按钮 -->
  8. <view class="hmly-login-button">
  9. <!-- 在本小程序中只实现了微信登录 -->
  10. <view class="hmly-wechat-login">
  11. <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
  12. <text class="icon-message"></text> 微信登录
  13. </button>
  14. </view>
  15. <view class="hmly-phone-login" bindtap="phoneLogin">
  16. <button>手机号登录</button>
  17. </view>
  18. </view>
  19. </block>
  20. <!-- 已经登录显示界面 -->
  21. <block wx:else>
  22. <view class="hmly-body" style="height:{{phoneHeight}}px">
  23. <!-- 头像昵称签到部分 -->
  24. <view class="hmly-top-bar">
  25. <!-- 头像昵称 -->
  26. <view class="hmly-user-img">
  27. <view class="hmly-avatar-nickname">
  28. <view class="hmly-avatar">
  29. <image class="hmly-avatar-img" src="{{avatarUrl}}"></image>
  30. </view>
  31. <view class="hmly-nickname">
  32. <text class="#">{{nickName}}</text>
  33. <!-- vip勋章 -->
  34. <text class="icon-vip" style="margin-left:30rpx"></text>
  35. </view>
  36. </view>
  37. <view class="hmly-kefu"><text class="icon-service"></text>客服服务</view>
  38. </view>
  39. <!-- 签到 -->
  40. <view class="hmly-qian-dao">
  41. <!-- 签到涉及canvas所以暂时搁置 -->
  42. <view class="hmly-qian-text">
  43. <text class="icon-dateTable text-gray"></text>
  44. <text style="margin-left:20rpx">签到</text>
  45. </view>
  46. <view class="hmly-icon_">
  47. <text class="icon-right text-gray"></text>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 选项卡部分 -->
  52. <view class="hmly-chioce">
  53. <!-- 选项卡item -->
  54. <view class="hmly-choice-item" bindtap="openSwitch">
  55. <view class="">
  56. <text class="icon-time text-gray"></text>
  57. <text style="margin-left:20rpx">定时关闭</text>
  58. </view>
  59. <text class="icon-right text-gray"></text>
  60. </view>
  61. <view class="hmly-choice-item">
  62. <!--
  63. 因为切换为夜间模式需要使用自定义的tarbar,
  64. 而这个小程序是一个初级学习项目,所以此功能暂时搁置
  65. -->
  66. <view class="">
  67. <text class="icon-tip text-gray"></text>
  68. <text style="margin-left:20rpx">夜间模式</text>
  69. </view>
  70. <switch></switch>
  71. </view>
  72. <view class="hmly-choice-item">
  73. <!-- 意见反馈需要使用button的open-type属性 此处没有设置-->
  74. <view class="">
  75. <text class="icon-write text-gray"></text>
  76. <text style="margin-left:20rpx">意见反馈</text>
  77. </view>
  78. <text class="icon-right text-gray"></text>
  79. </view>
  80. <view class="hmly-choice-item" bindtap="gotoLogin">
  81. <view class="">
  82. <text class="icon-changeCount text-gray"></text>
  83. <text style="margin-left:20rpx">切换账号</text>
  84. </view>
  85. <text class="icon-right text-gray"></text>
  86. </view>
  87. </view>
  88. </view>
  89. </block>
  90. <!-- 定时关闭部分 -->
  91. <block wx:if="{{show}}">
  92. <view class="hmly-switch">
  93. <scroll-view class="hmly-scroll-wrapper" scroll-y scroll-with-animation="true" catchtouchmove="preventTouchMove">
  94. <view class="hmly-switch-item" wx:for="{{timeout}}" wx:key="{{index}}" bindtap="chooseTimeOut" data-activeIndex="{{index}}">
  95. <view>{{item.text}}</view>
  96. <view class="hmly-active" wx:if="{{index == activeIndex}}"></view>
  97. </view>
  98. </scroll-view>
  99. <view class="hmly-close" bindtap="close">关闭</view>
  100. </view>
  101. <view class="hmly-cover"></view>
  102. </block>