login.wxml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <view class='login-box' wx:if="{{flag==true}}">
  2. <image src='https://img.bbztx.com/miniProgram/challengeFamily/loginLogo.png'></image>
  3. <!-- 授权登录 -->
  4. <block wx:if="{{authorization}}">
  5. <view class='list-block'>
  6. <block>
  7. <button wx:if="{{firstLogin}}" bindtap='getUserProfile' class='button button-radius' disabled="{{clickTimes}}">手机号授权登录</button>
  8. <button wx:else bindgetphonenumber='registerLogin' disabled="{{phoneNum}}" open-type="getPhoneNumber" class='button button-radius' disabled="{{clickTimes}}">手机号授权登录</button>
  9. </block>
  10. <view class="btnBottom" bindtap='toggleLogin'>手机号密码登录</view>
  11. </view>
  12. </block>
  13. <block wx:else>
  14. <view class='list-block'>
  15. <view class='item-content'>
  16. <input type='Number' class="loginInput" maxlength="11" bindinput="phoneNumInput" placeholder='请输入你的手机号'></input>
  17. </view>
  18. <view class='item-content'>
  19. <input type='text' focus='{{passwordFocus}}' class="loginInput" password="true" bindinput="passwordInput" placeholder='请输入密码'></input>
  20. </view>
  21. <view style="overflow: hidden;">
  22. <text style="float: right;font-size: 24rpx;" bindtap='navigatorURl'>忘记密码?</text>
  23. </view>
  24. <button bindtap='accountLogin' class='button button-radius' disabled="{{clickTimes}}">登录</button>
  25. <block>
  26. <view wx:if="{{firstLogin}}" class="btnBottom" bindtap='getUserProfile'>手机号授权登录</view>
  27. <view wx:else class="btnBottom" bindtap='registerLogin'>手机号授权登录</view>
  28. </block>
  29. </view>
  30. </block>
  31. </view>
  32. <caseCoupon show="{{!show}}" invitePrice="{{invitePrice}}" vouchers="{{vouchers}}" bind:close="back"></caseCoupon>
  33. <!-- 第一次授权登录 -->
  34. <view wx:if="{{flag==false}}" data-weui-theme="{{theme}}" class="div">
  35. <view class="name">
  36. <view class="nc">手机号:</view>
  37. <input style="width: 300rpx;" value='{{phoneNum}}' disabled placeholder="请获取你的手机号" />
  38. <button bindgetphonenumber='getPhoneNumber' disabled="{{phoneNum}}" open-type="getPhoneNumber" class="getPhoneNumber">获取手机号</button>
  39. </view>
  40. <view class="name">
  41. <view class="nc">头像上传:</view>
  42. <button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
  43. <image class="avatar" src="{{avatarUrl}}" wx:if="{{avatarUrl}}"></image>
  44. <view wx:else>+</view>
  45. </button>
  46. </view>
  47. <view title="昵称" class="name">
  48. <view class="nc">昵称:</view>
  49. <input type="nickname" bindinput="username" placeholder="请输入你的昵称" />
  50. </view>
  51. <view class="name">
  52. <view class="nc">密码设置:</view>
  53. <input password bindinput="pwSetting" placeholder="请输入你的密码" />
  54. </view>
  55. <!-- <view class="name">
  56. <view class="nc">密码确认:</view>
  57. <input password bindinput="pwConfirmation" placeholder="请重新输入密码" />
  58. </view> -->
  59. <!-- <button bindgetphonenumber='getPhoneNumber' open-type="getPhoneNumber" class='sure'>注册</button> -->
  60. <button bindtap="signIn" class='sure'>注册</button>
  61. </view>
  62. <!-- 弹窗 -->
  63. <noticePopup show="{{registeredShow}}">
  64. <view class="popupContent">
  65. <view class="contentText">
  66. <view class="progressText">当前手机号已存在账号,可直接进行登录</view>
  67. <view class="button button-warn button-radius btnSize" bindtap="getUserProfile"> 立即登录</view>
  68. </view>
  69. </view>
  70. </noticePopup>