AI销管
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

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