index.ttml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <view class="trial-page">
  2. <scroll-view class="page-scroll" scroll-y="true">
  3. <image
  4. class="header-image"
  5. src="/images/trial-hero.jpg"
  6. mode="aspectFill"
  7. />
  8. <view class="form-wrap">
  9. <view class="form-item">
  10. <text class="label">身份职业</text>
  11. <view class="switch-group">
  12. <view
  13. class="switch-item {{formData.occupation === '学生' ? 'switch-item-active' : ''}}"
  14. data-field="occupation"
  15. data-value="学生"
  16. bindtap="handleSelectOption"
  17. >学生</view>
  18. <view
  19. class="switch-item {{formData.occupation === '教师' ? 'switch-item-active' : ''}}"
  20. data-field="occupation"
  21. data-value="教师"
  22. bindtap="handleSelectOption"
  23. >教师</view>
  24. </view>
  25. </view>
  26. <view class="form-item">
  27. <text class="label">您的姓名</text>
  28. <input
  29. class="input"
  30. placeholder="请输入姓名"
  31. value="{{formData.name}}"
  32. data-field="name"
  33. bindinput="handleInputChange"
  34. />
  35. </view>
  36. <view class="form-item">
  37. <text class="label">性别</text>
  38. <view class="switch-group">
  39. <view
  40. class="switch-item {{formData.gender === '男' ? 'switch-item-active' : ''}}"
  41. data-field="gender"
  42. data-value="男"
  43. bindtap="handleSelectOption"
  44. >男</view>
  45. <view
  46. class="switch-item {{formData.gender === '女' ? 'switch-item-active' : ''}}"
  47. data-field="gender"
  48. data-value="女"
  49. bindtap="handleSelectOption"
  50. >女</view>
  51. </view>
  52. </view>
  53. <view class="form-item">
  54. <text class="label">联系电话</text>
  55. <view class="phone-row">
  56. <input
  57. class="input input-flex"
  58. type="number"
  59. maxlength="11"
  60. placeholder="请输入手机号"
  61. value="{{formData.phone}}"
  62. data-field="phone"
  63. bindinput="handleInputChange"
  64. />
  65. <button
  66. class="code-btn"
  67. bindtap="handleSendCode"
  68. disabled="{{isSendingCode || isLoadingImgCode || countdown > 0}}"
  69. >{{countdown > 0 ? (countdown + 's后重试') : '获取验证码'}}</button>
  70. </view>
  71. </view>
  72. <view class="form-item" tt:if="{{isCodeSent}}">
  73. <text class="label">验证码</text>
  74. <input
  75. class="input"
  76. type="number"
  77. maxlength="6"
  78. placeholder="请输入验证码"
  79. value="{{formData.code}}"
  80. data-field="code"
  81. bindinput="handleInputChange"
  82. />
  83. </view>
  84. <button class="submit-btn" bindtap="handleSubmit" disabled="{{isSubmitting}}" loading="{{isSubmitting}}">提交申请</button>
  85. <view class="tips-box">
  86. <text class="tips-title">温馨提示</text>
  87. <text class="tips-line">1. 学生用户:本产品配套有独立APP,可以去应用商店搜索并下载。</text>
  88. <view class="tips-line tips-line-inline">
  89. <text>2. 教师用户:本产品配套有教师端管理系统,安装请</text>
  90. <text class="tips-link" bindtap="handleOpenVideo">查看视频</text>
  91. <text>详情。</text>
  92. </view>
  93. <text class="tips-line">3. 同一手机号仅可申请试用一次,申请后账号(手机号)自动开通,试用期为2天。</text>
  94. <text class="tips-line">4. 有任何问题可以加入抖音主页粉丝群进行咨询。</text>
  95. </view>
  96. </view>
  97. </scroll-view>
  98. <view class="page-tabbar" tt:if="{{!showVideoModal}}">
  99. <view class="page-tab-item" bindtap="handleGoProduct">
  100. <text class="page-tab-text">产品介绍</text>
  101. </view>
  102. <view class="page-tab-item page-tab-item-active" bindtap="handleGoTrial">
  103. <text class="page-tab-text page-tab-text-active">申请试用</text>
  104. </view>
  105. </view>
  106. <view class="img-code-mask" tt:if="{{showImgCodePanel}}">
  107. <view class="img-code-dialog">
  108. <view class="img-code-close" bindtap="handleCloseImgCodeModal">×</view>
  109. <text class="img-code-title">输入图形验证码</text>
  110. <view class="img-code-content">
  111. <input
  112. class="img-code-input"
  113. maxlength="8"
  114. placeholder="请输入验证码"
  115. value="{{imgCodeInput}}"
  116. bindinput="handleImgCodeInput"
  117. />
  118. <view class="img-code-right">
  119. <image
  120. class="img-code-image"
  121. src="{{imgCodeImage}}"
  122. mode="aspectFit"
  123. bindtap="handleRefreshImgCode"
  124. />
  125. <text class="img-code-refresh" bindtap="handleRefreshImgCode">
  126. {{isLoadingImgCode ? '加载中...' : '看不清?换一换'}}
  127. </text>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. <view class="video-mask" tt:if="{{showVideoModal}}" catchtap="noop">
  133. <view class="video-close" bindtap="handleCloseVideo">关闭</view>
  134. <video
  135. id="trialVideo"
  136. class="trial-video-fullscreen"
  137. src="{{trialVideoUrl}}"
  138. controls
  139. autoplay="{{showVideoModal}}"
  140. object-fit="contain"
  141. />
  142. </view>
  143. <view class="submit-tip" tt:if="{{showSubmitTip}}">
  144. <text class="submit-tip-text">{{submitTipText}}</text>
  145. </view>
  146. </view>