| | |
| | | </view> |
| | | <view class="form-input set-flex set-flex-content-between"> |
| | | <input type="number" v-model="form.code" placeholder="请输入验证码" /> |
| | | <view> |
| | | <view @tap='toGetCode'> |
| | | <text class="driver"></text> |
| | | <text class="getcode">{{tips}}</text> |
| | | </view> |
| | |
| | | |
| | | <script> |
| | | // 00营商办,01执法,02企业 区分不同的登陆页面 |
| | | import { |
| | | getCode, |
| | | codeLogin, |
| | | getInfo, |
| | | getCompanyList |
| | | } from '@/api/auth.js' |
| | | import { getCode, codeLogin, getInfo, getCompanyList } from '@/api/auth.js' |
| | | import selectVue from '@/components/select.vue' |
| | | export default { |
| | | components: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | getCode() { |
| | | toGetCode() { |
| | | if (!this.form.phone) { |
| | | uni.showToast({ |
| | | title: '请输入手机号', |
| | |
| | | uni.showLoading({ |
| | | title: '正在获取验证码' |
| | | }) |
| | | getCode({ |
| | | phone: this.form.phone |
| | | }).then(val => { |
| | | getCode({phone: this.form.phone }).then(val => { |
| | | if (val.data.code == 200) { |
| | | this.startCountdown() |
| | | uni.hideLoading(); |
| | |
| | | }) |
| | | return |
| | | } |
| | | // if(!this.form.code){ |
| | | // uni.showToast({ |
| | | // title: '请输入验证码', |
| | | // icon: 'none' |
| | | // }) |
| | | // return |
| | | // } |
| | | if(!this.form.code){ |
| | | uni.showToast({ |
| | | title: '请输入验证码', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | codeLogin(this.form).then(val => { |
| | | if (val.data.token) { |
| | | this.loginToken = val.data.token |
| | |
| | | }) |
| | | }, |
| | | getCompanyList(companyPhone) { |
| | | getCompanyList({ |
| | | companyPhone, |
| | | companyStatus: 0, |
| | | checkStatus: 2 |
| | | }).then(val => { |
| | | getCompanyList({companyPhone, companyStatus: 0, checkStatus: 2}).then(val => { |
| | | if (val.data.rows.length > 1) { |
| | | this.$refs.selectVue.open(val.data.rows) |
| | | } else { |
| | |
| | | height: 345rpx; |
| | | text-align: center; |
| | | background-color: #111; |
| | | |
| | | &>image { |
| | | width: 100%; |
| | | height: 345rpx; |
| | | } |
| | | } |
| | | |
| | | .content-box { |
| | | border-radius: 40rpx 40rpx 0 0; |
| | | padding: 40rpx 32rpx; |
| | | position: relative; |
| | | top: 80rpx; |
| | | background-color: white; |
| | | |
| | | .form { |
| | | .form-item { |
| | | .form-label { |
| | | font-size: 34rpx; |
| | | margin: 0 0 24rpx 16rpx; |
| | | } |
| | | |
| | | .form-input { |
| | | background-color: #F7F7F7; |
| | | padding: 20rpx; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .margin-bottom { |
| | | margin-bottom: 36rpx; |
| | | } |
| | | |
| | | .getcode { |
| | | color: #1171E0; |
| | | font-size: 34rpx; |
| | | font-weight: 500; |
| | | width: 20%; |
| | | } |
| | | |
| | | .driver { |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | |
| | | background-color: #C3C6CD; |
| | | } |
| | | } |
| | | |
| | | .company-register { |
| | | position: fixed; |
| | | bottom: 32rpx; |
| | |
| | | background: #F0F8FF; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .u-radio { |
| | | margin-bottom: 20rpx; |
| | | } |
| | |
| | | }
|
| | | }
|
| | |
|
| | | /deep/.u-radio {
|
| | | ::v-deep .u-radio {
|
| | | margin-bottom: 20rpx;
|
| | | margin-right: 20rpx !important;
|
| | | }
|
| | |
|
| | | /deep/.u-radio-group {
|
| | | ::v-deep .u-radio-group {
|
| | | margin-top: 10rpx !important;
|
| | | flex-wrap: wrap !important;
|
| | | }
|