feat: 完成注册功能
This commit is contained in:
parent
77d24ecb54
commit
34e3a49d53
@ -77,7 +77,7 @@ export function passwordLoginRequest(data) {
|
|||||||
// 注册
|
// 注册
|
||||||
export function registerRequest(data) {
|
export function registerRequest(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/user/login',
|
url: '/user/register',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
:style="{ width: imgSize.width, height: '40px', 'line-height': '40px' }"
|
:style="{ width: imgSize.width, height: '40px', 'line-height': '40px' }"
|
||||||
class="verify-bar-area"
|
class="verify-bar-area"
|
||||||
>
|
>
|
||||||
<text class="verify-msg" v-text="text"></text>
|
<text class="verify-msg">{{ text }}</text>
|
||||||
<view
|
<view
|
||||||
:style="{
|
:style="{
|
||||||
width: leftBarWidth ? leftBarWidth : '40px',
|
width: leftBarWidth ? leftBarWidth : '40px',
|
||||||
@ -37,7 +37,7 @@
|
|||||||
}"
|
}"
|
||||||
class="verify-left-bar"
|
class="verify-left-bar"
|
||||||
>
|
>
|
||||||
<text class="verify-msg" v-text="finishText"></text>
|
<text class="verify-msg">{{ finishText }}</text>
|
||||||
<view
|
<view
|
||||||
:style="{
|
:style="{
|
||||||
width: '40px',
|
width: '40px',
|
||||||
@ -181,7 +181,7 @@
|
|||||||
watch: {
|
watch: {
|
||||||
type: {
|
type: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(newVal) {
|
handler() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.init()
|
this.init()
|
||||||
})
|
})
|
||||||
@ -221,11 +221,11 @@
|
|||||||
|
|
||||||
onImageLoad() {},
|
onImageLoad() {},
|
||||||
|
|
||||||
onImageError(e) {
|
onImageError() {
|
||||||
this.error = 'Failed to load verification image'
|
this.error = 'Failed to load verification image'
|
||||||
},
|
},
|
||||||
|
|
||||||
onBlockImageError(e) {},
|
onBlockImageError() {},
|
||||||
|
|
||||||
// 鼠标按下
|
// 鼠标按下
|
||||||
start(e) {
|
start(e) {
|
||||||
@ -256,12 +256,13 @@
|
|||||||
barArea_offsetWidth = Math.ceil(data.width)
|
barArea_offsetWidth = Math.ceil(data.width)
|
||||||
|
|
||||||
if (this.status && this.isEnd === false) {
|
if (this.status && this.isEnd === false) {
|
||||||
|
let x
|
||||||
if (!e.touches) {
|
if (!e.touches) {
|
||||||
// 兼容移动端
|
// 兼容移动端
|
||||||
var x = Math.ceil(e.clientX)
|
x = Math.ceil(e.clientX)
|
||||||
} else {
|
} else {
|
||||||
// 兼容PC端
|
// 兼容PC端
|
||||||
var x = Math.ceil(e.touches[0].pageX)
|
x = Math.ceil(e.touches[0].pageX)
|
||||||
}
|
}
|
||||||
// var bar_area_left = this.getLeft(this.barArea);
|
// var bar_area_left = this.getLeft(this.barArea);
|
||||||
|
|
||||||
@ -317,7 +318,9 @@
|
|||||||
let data = {
|
let data = {
|
||||||
countryCode: _this.params.countryCode || '+86',
|
countryCode: _this.params.countryCode || '+86',
|
||||||
account: _this.params.account,
|
account: _this.params.account,
|
||||||
xWidth: moveLeftDistance.toString()
|
channel: _this.params.channel || '1',
|
||||||
|
codeType: _this.params.codeType,
|
||||||
|
xWidth: Math.round(moveLeftDistance)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('=== 滑动验证请求参数 ===')
|
console.log('=== 滑动验证请求参数 ===')
|
||||||
@ -329,7 +332,7 @@
|
|||||||
console.log('=====================')
|
console.log('=====================')
|
||||||
|
|
||||||
myRequest({
|
myRequest({
|
||||||
url: `/user/isSliderValid`,
|
url: `/user/sendValidationCode`,
|
||||||
data,
|
data,
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
})
|
})
|
||||||
@ -719,7 +722,7 @@
|
|||||||
/* } */
|
/* } */
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
font-family: iconfont !important;
|
font-family: iconfont, sans-serif !important;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user