| | |
| | | <image :src="codeUrl" @click="getCode" class="login-code-img"></image> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 协议同意 --> |
| | | <view class="agreement-section"> |
| | | <checkbox-group @change="handleAgreementChange"> |
| | | <label class="agreement-label"> |
| | | <checkbox value="agreed" :checked="agreedToTerms" color="#007AFF" /> |
| | | <text class="agreement-text"> |
| | | 我已阅读并同意 |
| | | <text class="agreement-link" @click.stop="handleUserAgreement">《用户服务协议》</text> |
| | | 和 |
| | | <text class="agreement-link" @click.stop="handlePrivacy">《隐私政策》</text> |
| | | </text> |
| | | </label> |
| | | </checkbox-group> |
| | | </view> |
| | | |
| | | <view class="action-btn"> |
| | | <button @click="handleRegister()" class="register-btn cu-btn block bg-blue lg round">注册</button> |
| | | </view> |
| | |
| | | return { |
| | | codeUrl: "", |
| | | captchaEnabled: true, |
| | | agreedToTerms: false, |
| | | globalConfig: getApp().globalData.config, |
| | | registerForm: { |
| | | username: "", |
| | |
| | | // 用户登录 |
| | | handleUserLogin() { |
| | | this.$tab.navigateTo(`/pages/login`) |
| | | }, |
| | | // 协议选择变更 |
| | | handleAgreementChange(e) { |
| | | this.agreedToTerms = e.detail.value.length > 0 |
| | | }, |
| | | // 用户协议 |
| | | handleUserAgreement() { |
| | | this.$tab.navigateTo('/pages/mine/user-agreement/index') |
| | | }, |
| | | // 隐私政策 |
| | | handlePrivacy() { |
| | | this.$tab.navigateTo('/pages/mine/privacy-policy/index') |
| | | }, |
| | | // 获取图形验证码 |
| | | getCode() { |
| | |
| | | this.$modal.msgError("两次输入的密码不一致") |
| | | } else if (this.registerForm.code === "" && this.captchaEnabled) { |
| | | this.$modal.msgError("请输入验证码") |
| | | } else if (!this.agreedToTerms) { |
| | | this.$modal.msgError("请先阅读并同意用户服务协议和隐私政策") |
| | | } else { |
| | | this.$modal.loading("注册中,请耐心等待...") |
| | | this.register() |
| | |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .agreement-section { |
| | | margin: 30rpx 0; |
| | | |
| | | .agreement-label { |
| | | display: flex; |
| | | align-items: flex-start; |
| | | |
| | | checkbox { |
| | | margin-right: 15rpx; |
| | | transform: scale(0.9); |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .agreement-text { |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | color: #666; |
| | | line-height: 2; |
| | | text-align: left; |
| | | |
| | | .agreement-link { |
| | | color: #007AFF; |
| | | text-decoration: underline; |
| | | padding: 8rpx 5rpx; |
| | | display: inline-block; |
| | | position: relative; |
| | | z-index: 10; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .login-code { |
| | | height: 38px; |
| | | float: right; |