feat: 完成注册功能

This commit is contained in:
fanpeng 2025-06-05 16:22:56 +08:00
parent 77d24ecb54
commit 34e3a49d53
2 changed files with 14 additions and 11 deletions

View File

@ -77,7 +77,7 @@ export function passwordLoginRequest(data) {
// 注册
export function registerRequest(data) {
return request({
url: '/user/login',
url: '/user/register',
method: 'POST',
data
})

View File

@ -27,7 +27,7 @@
:style="{ width: imgSize.width, height: '40px', 'line-height': '40px' }"
class="verify-bar-area"
>
<text class="verify-msg" v-text="text"></text>
<text class="verify-msg">{{ text }}</text>
<view
:style="{
width: leftBarWidth ? leftBarWidth : '40px',
@ -37,7 +37,7 @@
}"
class="verify-left-bar"
>
<text class="verify-msg" v-text="finishText"></text>
<text class="verify-msg">{{ finishText }}</text>
<view
:style="{
width: '40px',
@ -181,7 +181,7 @@
watch: {
type: {
immediate: true,
handler(newVal) {
handler() {
this.$nextTick(() => {
this.init()
})
@ -221,11 +221,11 @@
onImageLoad() {},
onImageError(e) {
onImageError() {
this.error = 'Failed to load verification image'
},
onBlockImageError(e) {},
onBlockImageError() {},
//
start(e) {
@ -256,12 +256,13 @@
barArea_offsetWidth = Math.ceil(data.width)
if (this.status && this.isEnd === false) {
let x
if (!e.touches) {
//
var x = Math.ceil(e.clientX)
x = Math.ceil(e.clientX)
} else {
// PC
var x = Math.ceil(e.touches[0].pageX)
x = Math.ceil(e.touches[0].pageX)
}
// var bar_area_left = this.getLeft(this.barArea);
@ -317,7 +318,9 @@
let data = {
countryCode: _this.params.countryCode || '+86',
account: _this.params.account,
xWidth: moveLeftDistance.toString()
channel: _this.params.channel || '1',
codeType: _this.params.codeType,
xWidth: Math.round(moveLeftDistance)
}
console.log('=== 滑动验证请求参数 ===')
@ -329,7 +332,7 @@
console.log('=====================')
myRequest({
url: `/user/isSliderValid`,
url: `/user/sendValidationCode`,
data,
method: 'POST'
})
@ -719,7 +722,7 @@
/* } */
.iconfont {
font-family: iconfont !important;
font-family: iconfont, sans-serif !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;