login.wxml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <scroll-view class="page" scroll-y>
  2. <view class="shell">
  3. <view class="hero">
  4. <view class="hero__eyebrow">CMR Backend</view>
  5. <view class="hero__title">登录</view>
  6. <view class="hero__desc">先把小程序登录态接到 backend,再进入首页和活动页。</view>
  7. </view>
  8. <view class="panel">
  9. <view class="panel__title">连接配置</view>
  10. <view class="field">
  11. <view class="field__label">Backend Base URL</view>
  12. <input class="field__input" value="{{backendBaseUrl}}" bindinput="handleBaseUrlInput" />
  13. </view>
  14. <view class="field">
  15. <view class="field__label">Device Key</view>
  16. <input class="field__input" value="{{deviceKey}}" bindinput="handleDeviceKeyInput" />
  17. </view>
  18. <view class="field">
  19. <view class="field__label">开发登录 Code</view>
  20. <input class="field__input" value="{{loginCode}}" bindinput="handleLoginCodeInput" />
  21. </view>
  22. <view class="actions">
  23. <button class="btn btn--primary" bindtap="handleLoginWithDevCode">开发码登录</button>
  24. <button class="btn btn--secondary" bindtap="handleLoginWithWechat">wx.login 登录</button>
  25. <button class="btn btn--ghost" bindtap="handleClearLoginState">清空登录态</button>
  26. </view>
  27. </view>
  28. <view class="panel">
  29. <view class="panel__title">状态</view>
  30. <view class="status">{{statusText}}</view>
  31. </view>
  32. </view>
  33. </scroll-view>