Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

262 Zeilen
5.1 KiB

  1. <template>
  2. <view class="content">
  3. <view class="head">
  4. <view class="text">
  5. <view class="text1">
  6. <view style="color: #666666;">输入短信验证码</view>
  7. <view style="color: #303030;margin-top: 20rpx;">短信已发送至{{phone}},请在下方输入框内输入4位数字验证码</view>
  8. </view>
  9. </view>
  10. </view>
  11. <view class="sction">
  12. <view class="mama">
  13. <view class="mamaz">
  14. <input type="text" v-model="msg" maxlength="4" placeholder="请输入验证码" placeholder-class="input-class" class="input" />
  15. </view>
  16. <view class="mamay">
  17. <view class="sada" v-if="sendAuthCode" style="font-size: 35rpx;" @click="getAuthCode">获取验证码</view>
  18. <text class="sada" v-if="!sendAuthCode">
  19. 重新发送
  20. <text>({{ auth_time }})</text>
  21. </text>
  22. </view>
  23. </view>
  24. <view class="login-btn" :style="{ background: msg == '' ? '#F2F2F2' : '#2671E2' }" @click="denglu"><text
  25. class="">确认</text></view>
  26. <view class="code-login" @click="passwordlogin"><text>密码登录</text></view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. var util = require("../../utils/util.js");
  32. var config = require("../../config");
  33. var app = getApp();
  34. export default {
  35. data() {
  36. return {
  37. sendAuthCode: true,
  38. auth_time: 0,
  39. msg: '',
  40. phonecet: '',
  41. role:'',
  42. phone:''
  43. };
  44. },
  45. onLoad: function(options) {
  46. var phonese = options.username;
  47. var phonexxz = phonese.substring(0, 3) + '****' + phonese.substring(7);
  48. this.phone = phonexxz,
  49. this.phonecet = options.username,
  50. this.role = options.role
  51. if (options.role == 2) {
  52. uni.setNavigationBarTitle({
  53. title: '验证手机号'
  54. })
  55. }
  56. this.sendAuthCode = false;
  57. this.auth_time = 60;
  58. var auth_timetimer = setInterval(() => {
  59. this.auth_time--;
  60. if (this.auth_time <= 0) {
  61. this.sendAuthCode = true;
  62. clearInterval(auth_timetimer);
  63. }
  64. }, 1000);
  65. },
  66. methods: {
  67. //跳转密码登录页面
  68. passwordlogin() {
  69. uni.reLaunch({
  70. url: '/pages/login/index',
  71. })
  72. },
  73. //获取验证码
  74. getAuthCode() {
  75. this.sendAuthCode = false;
  76. this.auth_time = 60;
  77. var auth_timetimer = setInterval(() => {
  78. this.auth_time--;
  79. if (this.auth_time <= 0) {
  80. this.sendAuthCode = true;
  81. clearInterval(auth_timetimer);
  82. }
  83. }, 1000);
  84. },
  85. //登录
  86. denglu() {
  87. if (this.msg=='') {
  88. uni.showToast({
  89. title: '验证码不能为空',
  90. icon: 'none'
  91. });
  92. return
  93. }
  94. if (this.msg.length == 4) {
  95. uni.navigateTo({
  96. url: '/pages/login/Setthepassword?username='+this.phonecet,
  97. })
  98. } else {
  99. uni.showToast({
  100. title: '验证码位数不正确',
  101. icon: 'none'
  102. });
  103. }
  104. },
  105. }
  106. };
  107. </script>
  108. <style lang="scss">
  109. .head {
  110. width: 750rpx;
  111. height:400rpx;
  112. position: relative;
  113. .text{
  114. width: 100%;
  115. position: absolute;
  116. top: 180rpx;
  117. left: 0rpx;
  118. .text1{
  119. width: 80%;
  120. margin: 0 auto;
  121. }
  122. }
  123. }
  124. .mama {
  125. width: 620rpx;
  126. display: flex;
  127. border-bottom: 1px solid #E1E1E1;
  128. margin: 60rpx auto;
  129. }
  130. .sadsadasdasdsadasd {
  131. font-size: 34rpx;
  132. font-family: PingFangSC-Medium, PingFang SC;
  133. font-weight: 500;
  134. color: #008EF2;
  135. width: 100%;
  136. text-align: center;
  137. padding-top: 340rpx;
  138. }
  139. .mamaz {
  140. width: 50%;
  141. height: 90rpx;
  142. }
  143. .mamay {
  144. width: 50%;
  145. height: 90rpx;
  146. }
  147. .input {
  148. width: 350rpx;
  149. color: #78DFB0;
  150. height: 100%;
  151. line-height: 90rpx;
  152. font-size: 17px;
  153. color: #171717;
  154. }
  155. .sada {
  156. width: 70%;
  157. line-height: 90rpx;
  158. color: #2B6EFF;
  159. text-align: right;
  160. font-size: 35rpx;
  161. margin-left: 100rpx;
  162. display: block;
  163. }
  164. .content {
  165. margin: 0;
  166. padding: 0;
  167. border-top: 1rpx solid #E0E0E0;
  168. }
  169. .login-text {
  170. font-size: 60rpx;
  171. font-family: PingFang SC;
  172. font-weight: 500;
  173. color: rgba(23, 23, 23, 1);
  174. letter-spacing: 8rpx;
  175. margin-left: 75rpx;
  176. font-weight: bold;
  177. }
  178. .login-input {
  179. border-bottom: 1px solid #e1e1e1;
  180. color: #c9cac9;
  181. margin: 98rpx 64rpx 200rpx 75rpx;
  182. font-size: 17px;
  183. }
  184. .login-btn {
  185. margin: 0 auto;
  186. margin-top: 240rpx;
  187. width: 630rpx;
  188. height: 86rpx;
  189. border-radius: 49rpx;
  190. font-size: 17px;
  191. font-weight: bold;
  192. border: none;
  193. display: flex;
  194. justify-content: center;
  195. align-items: center;
  196. color: #ffffff;
  197. }
  198. .code-login {
  199. display: flex;
  200. justify-content: center;
  201. margin-top: 40rpx;
  202. color: #D6D7D6;
  203. margin-bottom: 200rpx;
  204. font-size: 30rpx;
  205. }
  206. .log-box {
  207. display: flex;
  208. flex-direction: row;
  209. justify-content: center;
  210. align-items: center;
  211. font-size: 28rpx;
  212. color: #bfc0bf;
  213. margin-bottom: 65rpx;
  214. }
  215. .hengx {
  216. margin: 0 20rpx 0 20rpx;
  217. height: 2rpx;
  218. width: 232rpx;
  219. background: #e1e1e1;
  220. }
  221. .wechat {
  222. display: flex;
  223. justify-content: center;
  224. align-items: center;
  225. width: 93rpx;
  226. height: 93rpx;
  227. background: rgba(255, 255, 255, 1);
  228. box-shadow: 0px 10rpx 30rpx rgba(120, 223, 176, 0.22);
  229. border-radius: 50%;
  230. margin: 0 auto;
  231. }
  232. .btn-get {
  233. width: 250rpx;
  234. font-size: 17px;
  235. color: #c9cac9;
  236. position: relative;
  237. top: -290rpx;
  238. right: -450rpx;
  239. }
  240. .input-class {
  241. color: #D6D7D6;
  242. font-size: 17px;
  243. letter-spacing: 1rpx;
  244. }
  245. </style>