| | |
| | | <template> |
| | | <view class="login"> |
| | | <view class="tools"> |
| | | <uni-icons size="48rpx" color="#292C39" @click="doScan"></uni-icons> |
| | | <uni-icons type="gear-filled" size="48rpx" color="#292C39" @click="goSetAddress"></uni-icons> |
| | | </view> |
| | | <view class="login-main"> |
| | | <text class="login-main-title">欢è¿ç»å½</text> |
| | | <view class="login-main-subtitle">èè½æ°è½æºPDAç¨åº</view> |
| | | <view class="login-main-subtitle">èµ£éæ°è½æºPDAç¨åº</view> |
| | | <view class="login-main-body"> |
| | | <!-- <login-input key="username" v-model="user" clearable placeholder="ç¨æ·å" |
| | | :maxlength="20"></login-input> --> |
| | |
| | | :maxlength="10"></uni-easyinput> |
| | | <view class="canvas-img-code" @click="refresh()"> |
| | | <img :src="validCodeBase64" :style="{ width: width + 'px', height: height + 'px' }" |
| | | class="login-validCode-img"/> |
| | | <!-- <img v-show="validCodeBase64 != ''" :src="validCodeBase64" :style="{ width: width + 'px', height: height + 'px' }"/> --> |
| | | class="login-validCode-img" /> |
| | | <!-- <img v-show="validCodeBase64 != ''" :src="validCodeBase64" :style="{ width: width + 'px', height: height + 'px' }"/> --> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <u-button type="success" size="default" shape="circle" :ripple="true" ripple-bg-color="#909399" |
| | | @click="login"> |
| | | ç»å½ |
| | |
| | | SYS_DEFAULT_CAPTCHA_OPEN: true, |
| | | validCodeBase64: '', |
| | | validCodeReqNo: '', |
| | | code:'1234' |
| | | code: '1234' |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | this.configSysBaseList() |
| | | }, |
| | | methods: { |
| | | //跳转å°SetAddressé¡µé¢ |
| | | goSetAddress() { |
| | | this.$u.route('/pages/SetAddress/SetAddress'); |
| | | }, |
| | | configSysBaseList() { |
| | | // this.$u.get('/api/User/getVierificationCode', null).then(res => { |
| | | // if (res.code == 200) { |
| | |
| | | // } |
| | | // } |
| | | // }) |
| | | //妿éªè¯ç å¼å
³æ¯å¼å°±å è½½éªè¯ç |
| | | if (this.SYS_DEFAULT_CAPTCHA_OPEN) { |
| | | this.loginCaptcha() |
| | | } |
| | | // } |
| | | // }) |
| | | //妿éªè¯ç å¼å
³æ¯å¼å°±å è½½éªè¯ç |
| | | if (this.SYS_DEFAULT_CAPTCHA_OPEN) { |
| | | this.loginCaptcha() |
| | | } |
| | | // } |
| | | // }) |
| | | }, |
| | | loginCaptcha() { |
| | | this.$u.get('/api/User/getVierificationCode', null).then(res => { |
| | | |
| | | this.validCodeBase64 = "data:image/png;base64," + res.img; |
| | | |
| | | this.validCodeBase64 = "data:image/png;base64," + res.img; |
| | | this.validCodeReqNo = res.uuid |
| | | |
| | | |
| | | }) |
| | | }, |
| | | refresh() { |
| | |
| | | // UserName: this.user, |
| | | // VerificationCode: this.SYS_DEFAULT_CAPTCHA_OPEN ? this.code : null |
| | | // } |
| | | this.$u.post('/api/User/login', |
| | | {UUID: this.validCodeReqNo, |
| | | passWord: this.pass, |
| | | userName: this.user, |
| | | verificationCode: this.code} |
| | | ).then(res => { |
| | | this.$u.post('/api/User/login', { |
| | | UUID: this.validCodeReqNo, |
| | | passWord: this.pass, |
| | | userName: this.user, |
| | | verificationCode: this.code |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.$t.message.toast("ç»å½æå") |
| | | this.$t.message.closeLoading() |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .tools { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-bottom: 32rpx; |
| | | box-sizing: border-box; |
| | | padding: 0 12rpx; |
| | | } |
| | | |
| | | .login { |
| | | // font-family: PingFangSC-Regular, PingFang SC; |
| | | // background-color: $color-white; |