| | |
| | | </view> |
| | | </view> |
| | | <view class="row"> |
| | | <view class="label">昵称</view> |
| | | <view class="label"><span class="nike"></span>昵称</view> |
| | | <view class="input"> |
| | | <u-input input-align="right" border="bottom" v-model="formParams.nikeName" placeholder="昵称"></u-input> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { sendResetCode, registerUser } from '@/api/user/index.js'; |
| | | import { sendResetCode, registerSendCodeApi, registerUser } from '@/api/user/index.js'; |
| | | const formParams = ref({ |
| | | userName: '', |
| | | nikeName: '', |
| | |
| | | } |
| | | |
| | | // 这里假设账号就是手机号,实际项目中可能需要验证格式 |
| | | sendResetCode(formParams.value.userName).then(res => { |
| | | console.log('4444',res) |
| | | registerSendCodeApi(formParams.value.userName).then(res => { |
| | | if (res.data.code === 200) { |
| | | uni.showToast({ |
| | | title: '验证码发送成功', |
| | |
| | | title: '注册成功', |
| | | icon: 'success', |
| | | }); |
| | | // 跳转登录页面 |
| | | uni.navigateTo({ |
| | | url: '/pages/login/index' |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.msg || '注册失败', |
| | |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-image: url("../../static/images/user/userbg.svg") no-repeat ; |
| | | background-image: url("https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ja-app-wx/images/user/user-bg.png") no-repeat ; |
| | | background-size: 100%; |
| | | } |
| | | .content { |
| | |
| | | font-weight: 400; |
| | | font-size: 15px; |
| | | color: #222324; |
| | | .nike { |
| | | margin-right: 16rpx; |
| | | } |
| | | .required { |
| | | color: #FF4444; |
| | | } |