index.wxml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <view class="container">
  2. <view class='logo'>
  3. <image class='logo-img' src='{{logo}}' mode="aspectFit" />
  4. </view>
  5. <view class='logo-name'>{{name}}</view>
  6. <view class='intro'>{{desc}}</view>
  7. <view class='login'>请完成用户登录以继续使用</view>
  8. <view class="mark" wx:if="{{agreement}}" catchtap="onCheckAgreement">
  9. <label class="radio" catchtap="onCheckAgreement">
  10. <radio value="r1" color="#2c70f7" checked="{{check}}" />
  11. </label>
  12. 我已阅读且同意
  13. <view class="text" catchtap="openFile">《{{agreement.title}}》</view>
  14. </view>
  15. <button
  16. wx:if="{{check || !agreement}}"
  17. class='btn-login'
  18. open-type="getPhoneNumber"
  19. bindgetphonenumber="getPhoneNumber"
  20. >
  21. <view class='text'>授权手机登录</view>
  22. </button>
  23. <button wx:else class='btn-login' bindtap="getPhoneNumber">
  24. <view class='text'>授权手机登录</view>
  25. </button>
  26. <view class="btn-phone" bind:tap="showDialogBtn">短信验证码登录</view>
  27. <view class="cancel" bindtap="goBack">取消</view>
  28. </view>
  29. <van-dialog
  30. use-slot
  31. title="短信验证码登录"
  32. show="{{ phoneModal }}"
  33. show-cancel-button
  34. bind:close="hideModal"
  35. bind:confirm="completePhone"
  36. confirm-button-color='#2c70f7'
  37. cancel-button-color='#999'
  38. >
  39. <view class="modal">
  40. <van-cell-group>
  41. <van-field
  42. label="手机号"
  43. model:value="{{ mobile }}"
  44. placeholder="请输入手机号"
  45. maxlength='12'
  46. border="{{ false }}"
  47. type='number'
  48. />
  49. <van-field
  50. model:value="{{ verilyCode }}"
  51. center
  52. clearable
  53. label="短信验证码"
  54. placeholder="请输入验证码"
  55. border="{{ false }}"
  56. use-button-slot
  57. >
  58. <van-button
  59. slot="button"
  60. color="#2c70f7"
  61. size="small"
  62. type="primary"
  63. wx:if="{{s != 0}}"
  64. >
  65. {{s}}s
  66. </van-button>
  67. <van-button
  68. wx:else
  69. slot="button"
  70. color="#2c70f7"
  71. size="small"
  72. type="primary"
  73. bind:tap="getPhoneCode"
  74. >
  75. 发送验证码
  76. </van-button>
  77. </van-field>
  78. </van-cell-group>
  79. </view>
  80. </van-dialog>
  81. <view class="model" wx:if="{{wxModel}}">
  82. <view class="model_box">
  83. <van-icon
  84. name="cross"
  85. class="post_flex"
  86. size="40rpx"
  87. bind:tap="onClose"
  88. />
  89. <view class="model_top">
  90. <view class="company_cover">
  91. <van-icon size="50rpx" name="{{logo}}" />
  92. <view class="title">请填写您的微信头像、昵称</view>
  93. </view>
  94. </view>
  95. <view class="desc">99%用户选择使用微信头像和昵称以便为您提供专属服务</view>
  96. <view class="cell">
  97. <view class="label">微信头像</view>
  98. <view class="cont">
  99. <button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
  100. <image class="avatar {{avatarUrl ? '' : 'avatar_use'}}" src="{{avatarUrl}}" />
  101. </button>
  102. <van-icon name="arrow" style="margin-left:10rpx" />
  103. </view>
  104. </view>
  105. <view class="cell">
  106. <view class="label">微信昵称</view>
  107. <view class="cont">
  108. <input
  109. type="nickname"
  110. class="weui-input"
  111. placeholder="请输入微信昵称"
  112. model:value="{{nickname}}"
  113. bindfocus="onChangeName"
  114. />
  115. <van-icon name="arrow" style="margin-left:10rpx" />
  116. </view>
  117. </view>
  118. <view class="btn" bind:tap="onComplete">确定</view>
  119. </view>
  120. </view>