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.
 
 
 

258 Zeilen
5.0 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. this.sendAuthCode = false;
  52. this.auth_time = 60;
  53. var auth_timetimer = setInterval(() => {
  54. this.auth_time--;
  55. if (this.auth_time <= 0) {
  56. this.sendAuthCode = true;
  57. clearInterval(auth_timetimer);
  58. }
  59. }, 1000);
  60. },
  61. methods: {
  62. //跳转密码登录页面
  63. passwordlogin() {
  64. uni.reLaunch({
  65. url: '/pages/login/index',
  66. })
  67. },
  68. //获取验证码
  69. getAuthCode() {
  70. this.sendAuthCode = false;
  71. this.auth_time = 60;
  72. var auth_timetimer = setInterval(() => {
  73. this.auth_time--;
  74. if (this.auth_time <= 0) {
  75. this.sendAuthCode = true;
  76. clearInterval(auth_timetimer);
  77. }
  78. }, 1000);
  79. },
  80. //登录
  81. denglu() {
  82. if (this.msg=='') {
  83. uni.showToast({
  84. title: '验证码不能为空',
  85. icon: 'none'
  86. });
  87. return
  88. }
  89. if (this.msg.length == 4) {
  90. uni.navigateTo({
  91. url: '/pages/login/Setthepassword?username='+'18655732363',
  92. })
  93. } else {
  94. uni.showToast({
  95. title: '验证码位数不正确',
  96. icon: 'none'
  97. });
  98. }
  99. },
  100. }
  101. };
  102. </script>
  103. <style lang="scss">
  104. .head {
  105. width: 750rpx;
  106. height:400rpx;
  107. position: relative;
  108. .text{
  109. width: 100%;
  110. position: absolute;
  111. top: 180rpx;
  112. left: 0rpx;
  113. .text1{
  114. width: 80%;
  115. margin: 0 auto;
  116. }
  117. }
  118. }
  119. .mama {
  120. width: 620rpx;
  121. display: flex;
  122. border-bottom: 1px solid #E1E1E1;
  123. margin: 60rpx auto;
  124. }
  125. .sadsadasdasdsadasd {
  126. font-size: 34rpx;
  127. font-family: PingFangSC-Medium, PingFang SC;
  128. font-weight: 500;
  129. color: #008EF2;
  130. width: 100%;
  131. text-align: center;
  132. padding-top: 340rpx;
  133. }
  134. .mamaz {
  135. width: 50%;
  136. height: 90rpx;
  137. }
  138. .mamay {
  139. width: 50%;
  140. height: 90rpx;
  141. }
  142. .input {
  143. width: 350rpx;
  144. color: #78DFB0;
  145. height: 100%;
  146. line-height: 90rpx;
  147. font-size: 17px;
  148. color: #171717;
  149. }
  150. .sada {
  151. width: 70%;
  152. line-height: 90rpx;
  153. color: #2B6EFF;
  154. text-align: right;
  155. font-size: 35rpx;
  156. margin-left: 100rpx;
  157. display: block;
  158. }
  159. .content {
  160. margin: 0;
  161. padding: 0;
  162. border-top: 1rpx solid #E0E0E0;
  163. }
  164. .login-text {
  165. font-size: 60rpx;
  166. font-family: PingFang SC;
  167. font-weight: 500;
  168. color: rgba(23, 23, 23, 1);
  169. letter-spacing: 8rpx;
  170. margin-left: 75rpx;
  171. font-weight: bold;
  172. }
  173. .login-input {
  174. border-bottom: 1px solid #e1e1e1;
  175. color: #c9cac9;
  176. margin: 98rpx 64rpx 200rpx 75rpx;
  177. font-size: 17px;
  178. }
  179. .login-btn {
  180. margin: 0 auto;
  181. margin-top: 240rpx;
  182. width: 630rpx;
  183. height: 86rpx;
  184. border-radius: 49rpx;
  185. font-size: 17px;
  186. font-weight: bold;
  187. border: none;
  188. display: flex;
  189. justify-content: center;
  190. align-items: center;
  191. color: #ffffff;
  192. }
  193. .code-login {
  194. display: flex;
  195. justify-content: center;
  196. margin-top: 40rpx;
  197. color: #D6D7D6;
  198. margin-bottom: 200rpx;
  199. font-size: 30rpx;
  200. }
  201. .log-box {
  202. display: flex;
  203. flex-direction: row;
  204. justify-content: center;
  205. align-items: center;
  206. font-size: 28rpx;
  207. color: #bfc0bf;
  208. margin-bottom: 65rpx;
  209. }
  210. .hengx {
  211. margin: 0 20rpx 0 20rpx;
  212. height: 2rpx;
  213. width: 232rpx;
  214. background: #e1e1e1;
  215. }
  216. .wechat {
  217. display: flex;
  218. justify-content: center;
  219. align-items: center;
  220. width: 93rpx;
  221. height: 93rpx;
  222. background: rgba(255, 255, 255, 1);
  223. box-shadow: 0px 10rpx 30rpx rgba(120, 223, 176, 0.22);
  224. border-radius: 50%;
  225. margin: 0 auto;
  226. }
  227. .btn-get {
  228. width: 250rpx;
  229. font-size: 17px;
  230. color: #c9cac9;
  231. position: relative;
  232. top: -290rpx;
  233. right: -450rpx;
  234. }
  235. .input-class {
  236. color: #D6D7D6;
  237. font-size: 17px;
  238. letter-spacing: 1rpx;
  239. }
  240. </style>