user.wxml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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-github"></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. </view>
  44. <view class="icon_">
  45. <text class="icon-right text-gray"></text>
  46. </view>
  47. </view>
  48. </view>
  49. <!-- 选项卡部分 -->
  50. <view class="chioce">
  51. <!-- 选项卡item -->
  52. <view class="choiceItem">
  53. <view class="">
  54. <text class="icon-time text-gray"></text>定时关闭
  55. </view>
  56. <text class="icon-right text-gray"></text>
  57. </view>
  58. <view class="choiceItem">
  59. <view class="">
  60. <text class="icon-creative text-gray"></text>夜间模式
  61. </view>
  62. <switch></switch>
  63. </view>
  64. <view class="choiceItem">
  65. <view class="">
  66. <text class="icon-post text-gray"></text>意见反馈
  67. </view>
  68. <text class="icon-right text-gray"></text>
  69. </view>
  70. <view class="choiceItem" bindtap="gotoLogin">
  71. <view class="">
  72. <text class="icon-order text-gray"></text>切换账号
  73. </view>
  74. <text class="icon-right text-gray"></text>
  75. </view>
  76. </view>
  77. </view>
  78. </block>