user.wxml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!-- pages/user/user.wxml -->
  2. <block wx:if="{{login}}">
  3. <!-- logo -->
  4. <view class="logo">
  5. <image class="logoImg" src="/image/logo.png" mode="widthFix"></image>
  6. </view>
  7. <!-- 登录按钮 -->
  8. <view class="loginButton">
  9. <!-- 在本小程序中只实现了微信登录 -->
  10. <view class="wechatLogin">
  11. <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
  12. <text class="icon-message"></text> 微信登录
  13. </button>
  14. </view>
  15. <view class="phoneLogin" bindtap="phoneLogin">
  16. <button>手机号登录</button>
  17. </view>
  18. </view>
  19. </block>
  20. <!-- 已经登录显示界面 -->
  21. <block wx:else>
  22. <view class="body" style="height:{{phoneHeight}}px">
  23. <!-- 头像昵称签到部分 -->
  24. <view class="topBar">
  25. <!-- 头像昵称 -->
  26. <view class="userImg">
  27. <view class="avatar_nickname">
  28. <view class="avatar">
  29. <image class="avatarImg" src="{{avatarUrl}}"></image>
  30. </view>
  31. <view class="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="kefu"><text class="icon-service"></text>客服服务</view>
  38. </view>
  39. <!-- 签到 -->
  40. <view class="qiandao">
  41. <view class="qianText">
  42. <text class="icon-calendar text-gray"></text>
  43. <text style="margin-left:20rpx">签到</text>
  44. </view>
  45. <view class="icon_">
  46. <text class="icon-right text-gray"></text>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- 选项卡部分 -->
  51. <view class="chioce">
  52. <!-- 选项卡item -->
  53. <view class="choiceItem" bindtap="openSwitch">
  54. <view class="">
  55. <text class="icon-time text-gray"></text>
  56. <text style="margin-left:20rpx">定时关闭</text>
  57. </view>
  58. <text class="icon-right text-gray"></text>
  59. </view>
  60. <view class="choiceItem">
  61. <view class="">
  62. <text class="icon-creative text-gray"></text>
  63. <text style="margin-left:20rpx">夜间模式</text>
  64. </view>
  65. <switch></switch>
  66. </view>
  67. <view class="choiceItem">
  68. <view class="">
  69. <text class="icon-post text-gray"></text>
  70. <text style="margin-left:20rpx">意见反馈</text>
  71. </view>
  72. <text class="icon-right text-gray"></text>
  73. </view>
  74. <view class="choiceItem" bindtap="gotoLogin">
  75. <view class="">
  76. <text class="icon-order text-gray"></text>
  77. <text style="margin-left:20rpx">切换账号</text>
  78. </view>
  79. <text class="icon-right text-gray"></text>
  80. </view>
  81. </view>
  82. </view>
  83. </block>
  84. <!-- 定时关闭部分 -->
  85. <block wx:if="{{show}}">
  86. <view class="switch">
  87. <scroll-view class="scroll-wrapper" scroll-y scroll-with-animation="true" catchtouchmove="preventTouchMove">
  88. <view class="switch-item">不开启</view>
  89. <view class="switch-item">播放当前声音关闭</view>
  90. <view class="switch-item">播放2首声音关闭</view>
  91. <view class="switch-item">播放3首声音关闭</view>
  92. <view class="switch-item">播放3首声音关闭</view>
  93. <view class="switch-item">10分钟后</view>
  94. <view class="switch-item">20分钟后</view>
  95. <view class="switch-item">30分钟后</view>
  96. </scroll-view>
  97. <view class="close" bindtap="close">关闭</view>
  98. </view>
  99. <view class="cover"></view>
  100. </block>