| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <template>
- <view class="tab-page">
- <view class="backimage">
- <image class="back" src="/static/image/login/back.png" mode=""></image>
- <image class="title-img" src="/static/image/login/bindPhoneNumber.png" mode=""></image>
- <image class="title" src="/static/image/login/bindTip.png" mode=""></image>
- </view>
- <view class="info ">
- <u--input v-model="info.mobile" border="bottom" clearable maxlength="11" placeholderStyle="color:#999"
- style="padding: 34rpx 0;box-sizing: border-box;" :focus="true">
- </u--input>
- </view>
- <view class=" btn dis a-c j-c " @click="getVerificationCode">
- 获取验证码
- </view>
- <uni-Popup :show="modalshow" @close='modalshow=false' headerTitle="请输入下方图形验证码" overflow="auto"
- maxHeight="580rpx" mode="center" width="90%">
- <template #content>
- <view class="codemodal">
- <u--input v-model="info.captcha" border="bottom" clearable placeholder="请输入图形验证码" maxlength="5"
- placeholderStyle="color:#999" style="padding: 34rpx 0;box-sizing: border-box;">
- </u--input>
- <view class="suffixClass">
- <image :src="imgcodesrc" mode="" @tap="refreshCaptcha" style="width: 146rpx;height: 52rpx;">
- </image>
- </view>
- <view class="dis a-c j-end mt-1">
- <text style="font-size: 26rpx; color: #666;" @tap="refreshCaptcha">看不清?换一张</text>
- </view>
- <view class="buttom dis a-c j-c mt-4" @click="confirm">
- <text>确定</text>
- </view>
- </view>
- </template>
- </uni-Popup>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapMutations
- } from "vuex"
- export default {
- data() {
- return {
- modalshow: false,
- imgcodesrc: "", //图形验证码
- info: {
- code: "",
- mobile: "",
- captcha: "", //验证码
- captchaId: "", //验证码id
- },
- }
- },
- onLoad(options) {
- if (options.code) {
- this.info.code = options.code;
- }
- },
- watch: {
- },
- onShow() {},
- methods: {
- getVerificationCode() {
- if (this.info.mobile.length < 11) {
- return uni.showToast({
- title: '请输入正确的手机号',
- icon: 'none'
- });
- }
- this.modalshow = true;
- this.refreshCaptcha();
- },
- // 图片验证码
- refreshCaptcha() {
- let randnum = Math.floor(Math.random() * (1000000 - 1 + 1)) + 1
- this.imgcodesrc = this.$base.baseUrl + "/auth/captchaById?t=" + new Date().getTime() +
- '&captchaId=' + randnum;
- this.info.captchaId = randnum;
- },
- confirm() {
- uni.navigateTo({
- url: '/pages/login/smsCode?info=' + JSON.stringify(this.info),
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- page {
- background-color: #fff;
- }
- .backimage {
- width: 100%;
- height: 503rpx;
- background-color: #fff;
- position: relative;
- .back {
- width: 100%;
- height: 100%;
- }
- .title-img {
- position: absolute;
- top: 247rpx;
- left: 60rpx;
- width: 516rpx;
- height: 91rpx;
- }
- .title {
- position: absolute;
- top: 347rpx;
- left: 60rpx;
- width: 612rpx;
- height: 36rpx;
- }
- }
- .info {
- padding: 0 75rpx;
- box-sizing: border-box;
- .icon-img {
- width: 30rpx;
- height: 30rpx;
- }
- }
- //登录
- .performLogin {
- margin-top: 100rpx;
- .buttom {
- width: 100%;
- padding: 19rpx;
- box-sizing: border-box;
- background-color: #FDE935;
- border-radius: 45rpx;
- font-weight: bold;
- font-size: 36rpx;
- color: #1f1f1f;
- }
- .arigon {
- font-size: 28rpx;
- color: #666;
- padding: 0 30rpx;
- box-sizing: border-box;
- }
- }
- .footer {
- position: fixed;
- left: 0;
- right: 0;
- bottom: 62rpx;
- text {
- font-size: 26rpx;
- color: #999;
- }
- }
- .codemodal {
- padding: 40rpx;
- box-sizing: border-box;
- .buttom {
- width: 100%;
- padding: 19rpx;
- box-sizing: border-box;
- background-color: #FDE935;
- border-radius: 45rpx;
- font-weight: bold;
- font-size: 36rpx;
- color: #1f1f1f;
- }
- }
- .sendcode {
- font-size: 28rpx;
- color: #F9E000;
- }
- .u-page__code-text {
- padding: 4rpx 18rpx;
- background: rgba(253, 233, 53, 0.2);
- border-radius: 6rpx 6rpx 6rpx 6rpx;
- border: 1rpx solid #FDE935;
- color: #333333;
- font-size: 26rpx;
- }
- .btn {
- margin: 60rpx 75rpx 0;
- box-sizing: border-box;
- background: #FDE935;
- border-radius: 58rpx 58rpx 58rpx 58rpx;
- padding: 20rpx;
- box-sizing: border-box;
- font-weight: bold;
- }
- .suffixClass {
- margin-left: 10rpx;
- font-size: 30rpx;
- }
- </style>
|