user.wxml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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">
  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>