江西小程序管理端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

195 lines
4.4 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="main">
  3. <view class="u-back-top">
  4. <view class="backBox">
  5. <u-icon name="arrow-left" color="#333" size="28"></u-icon>
  6. </view>
  7. </view>
  8. <view class="title">
  9. <image src="@/static/images/userCenter/loginTitle.png" mode=""></image>
  10. </view>
  11. <view class="form">
  12. <view class="form-item">
  13. <view class="inputBox my">
  14. <u--input placeholder="请输入登录账号" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
  15. </view>
  16. </view>
  17. <view class="form-item">
  18. <view class="inputBox my">
  19. <u--input placeholder="请输入密码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.password"></u--input>
  20. </view>
  21. </view>
  22. <view class="forgetTps" @click="$u.toast('请联系管理员重置密码!')">忘记密码</view>
  23. <view class="loginBtn" :class="{active: btnHighlight}" @click="submitFn"> </view>
  24. <!-- <view class="radioWrap">
  25. <u-checkbox-group >
  26. <u-checkbox v-model="isCheck" shape="circle" label="已阅读并同意" :labelSize="12" ></u-checkbox>
  27. </u-checkbox-group>
  28. <view class="privacyText">
  29. <text>用户协议</text> <text>隐私协议</text>
  30. </view>
  31. </view> -->
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import { getLoginCode } from '@/config/api.js'
  37. export default {
  38. data() {
  39. return {
  40. isCheck: false,
  41. codeText: '获取验证码',
  42. FormData: {},
  43. codeOn: false
  44. }
  45. },
  46. onLoad() {
  47. },
  48. computed: {
  49. isPhone() {
  50. return uni.$u.test.mobile(this.FormData.phone)
  51. },
  52. btnHighlight() {
  53. return this.isPhone&&this.FormData.password
  54. }
  55. },
  56. methods: {
  57. // 是否选择协议
  58. groupChangeEnvnt(e) {
  59. this.isCheck = e.value
  60. console.log('是否选择协议', this.isCheck)
  61. },
  62. // 发送短信验证码
  63. async goSms() {
  64. const {
  65. FormData
  66. } = this
  67. if (!FormData.phone) return this.$u.toast('请输入手机号');
  68. if (!this.isPhone) return this.$u.toast('手机号格式有误');
  69. if (this.codeOn) return
  70. const data = await getLoginCode({
  71. codeType: 1,
  72. phone: FormData.phone,
  73. })
  74. console.log(data)
  75. // 获取验证码
  76. var time = 60;
  77. var timer = setInterval(() => {
  78. time--;
  79. this.codeText = time + "秒后重新发送"
  80. this.codeOn = true;
  81. if (time == 0) {
  82. clearInterval(timer);
  83. this.codeText = "获取验证码";
  84. this.codeOn = false;
  85. }
  86. }, 1000);
  87. },
  88. submitFn() {
  89. let val = ''
  90. if(this.FormData.phone=='18267103167') {
  91. val = '实操教练'
  92. }else if(this.FormData.phone=='18267103168') {
  93. val = '校长'
  94. }else if (this.FormData.phone=='18267103169'){
  95. val = '考场模拟教练'
  96. }else {
  97. val = '模拟器老师'
  98. }
  99. this.$store.commit('upDateIdentity', val)
  100. uni.reLaunch({
  101. url: '/pages/tabbar/statistics/index'
  102. })
  103. }
  104. }
  105. }
  106. </script>
  107. <style lang="scss" scoped>
  108. .main {
  109. width: 100%;
  110. min-height: 100vh;
  111. background: url('../../../static/images/userCenter/loginTopBg.png') no-repeat;
  112. background-size: 100% 360rpx;
  113. .u-back-top {
  114. padding: 32rpx 0 0 0;
  115. .backBox {
  116. padding: 24rpx;
  117. }
  118. }
  119. .title {
  120. width: 658rpx;
  121. height: 94rpx;
  122. margin: 130rpx auto 114rpx auto;
  123. }
  124. .form {
  125. padding: 0 46rpx;
  126. .form-item {
  127. height: 112rpx;
  128. background: #F4F7FF;
  129. border-radius: 16rpx;
  130. width: 100%;
  131. line-height: 112rpx;
  132. display: flex;
  133. margin-bottom: 40rpx;
  134. padding: 0 40rpx;
  135. .prefix {
  136. display: flex;
  137. align-items: center;
  138. font-size: 32rpx;
  139. color: #333;
  140. font-weight: 600;
  141. }
  142. .inputBox {
  143. flex: 1;
  144. }
  145. .code {
  146. color: #BBBBBB;
  147. margin-left: 30rpx;
  148. &.active {
  149. color: $themC
  150. }
  151. }
  152. }
  153. .forgetTps {
  154. font-size: 28rpx;
  155. color: $themC;
  156. margin-top: -20rpx;
  157. text-align: right;
  158. }
  159. .loginBtn {
  160. width: 100%;
  161. height: 112rpx;
  162. background: rgba(25,137,250,0.3);
  163. border-radius: 16rpx;
  164. text-align: center;
  165. line-height: 112rpx;
  166. font-size: 32rpx;
  167. font-weight: 600;
  168. color: #fff;
  169. margin-top: 100rpx;
  170. &.active {
  171. background: rgba(25,137,250,1);
  172. }
  173. }
  174. .radioWrap {
  175. display: flex;
  176. align-items: center;
  177. margin-top: 40rpx;
  178. .privacyText {
  179. font-size: 24rpx;
  180. color: #888E94;
  181. text {
  182. color: $themC;
  183. }
  184. }
  185. }
  186. }
  187. }
  188. </style>