Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-register-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-register-show-h5
Commits
25a53493
提交
25a53493
authored
6月 08, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加绑定手机号
上级
2cf5d451
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
92 行增加
和
5 行删除
+92
-5
SignForm.vue
src/modules/home/components/SignForm.vue
+91
-4
axios.js
src/utils/axios.js
+1
-1
没有找到文件。
src/modules/home/components/SignForm.vue
浏览文件 @
25a53493
...
...
@@ -124,6 +124,30 @@
</div>
</div>
<batch-import
@
upload=
"upload"
:data=
"data"
v-model=
"isbatchImport"
></batch-import>
<div
class=
"mobile-pop"
v-if=
"isBindMobile"
>
<div
class=
"content"
>
<div
class=
"title"
>
提示
</div>
<div
class=
"tips"
>
您的账号未绑定手机号码,请输入绑定手机号
</div>
<van-form
@
submit=
"bindMobile"
>
<van-field
style=
"margin-top: 20px"
v-model=
"mobile"
name=
"手机号"
label=
"手机号"
placeholder=
"手机号"
:rules=
"[
{ required: true, message: '请填写手机号' },
{ pattern: /^1(3|4|7|5|8)([0-9]{9})/, message: '请输入正确的手机号' }
]"
/>
<div
style=
"margin: 16px"
>
<van-button
style=
"border: none; background: #b80140"
round
block
type=
"info"
native-type=
"submit"
>
提交
</van-button
>
</div>
</van-form>
</div>
</div>
</div>
</template>
...
...
@@ -131,8 +155,7 @@
import
{
Toast
}
from
'vant'
import
BatchImport
from
'../components/BatchImport.vue'
import
Commonheader
from
'../components/Commonheader.vue'
import
{
saveStepInfo
,
getOpenid
}
from
'../api'
// updateUserInfo
import
{
saveStepInfo
,
getOpenid
,
updateUserInfo
}
from
'../api'
import
allFormList
from
'@/utils/formList'
export
default
{
components
:
{
Commonheader
,
BatchImport
},
...
...
@@ -144,21 +167,50 @@ export default {
data
()
{
return
{
mobile
:
''
,
isbatchImport
:
false
,
title
:
'报名'
,
checkedPay
:
false
,
// 勾选是否跳过按钮
index
:
0
,
cIndex
:
0
,
minDate
:
new
Date
()
minDate
:
new
Date
(),
isBindMobile
:
false
}
},
mounted
()
{
console
.
log
(
JSON
.
parse
(
window
.
localStorage
.
userInfo
).
mobile
,
'phone'
)
const
userInfo
=
JSON
.
parse
(
window
.
localStorage
.
userInfo
)
if
(
userInfo
.
mobile
===
''
)
{
this
.
isBindMobile
=
true
}
if
(
this
.
isPc
())
{
document
.
getElementById
(
'main_footer'
).
style
.
width
=
'400px'
}
},
methods
:
{
bindMobile
()
{
updateUserInfo
({
mobile
:
this
.
mobile
}).
then
(
res
=>
{
console
.
log
(
res
,
'res'
)
if
(
res
.
code
===
0
)
{
const
userInfo
=
JSON
.
parse
(
window
.
localStorage
.
userInfo
)
this
.
data
.
user_fields
.
map
(
item
=>
{
const
d
=
item
.
find
(
i
=>
i
.
value
===
userInfo
.
nickname
)
if
(
d
)
{
item
.
map
(
i
=>
{
if
(
i
.
key
===
'mobile'
)
{
i
.
value
=
this
.
mobile
i
.
enable_edit
=
false
}
return
i
})
}
return
item
})
this
.
isBindMobile
=
false
}
else
{
Toast
(
res
.
msg
)
}
})
},
isPc
()
{
const
userAgentInfo
=
navigator
.
userAgent
const
Agents
=
[
'Android'
,
'iPhone'
,
'SymbianOS'
,
'Windows Phone'
,
'iPad'
,
'iPod'
]
...
...
@@ -466,4 +518,39 @@ export default {
border-radius
:
0
.1rem
;
}
}
.mobile-pop
{
width
:
100%
;
height
:
100%
;
position
:
fixed
;
top
:
0
;
left
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
2001
;
.content
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
width
:
90%
;
// height: 210px;
padding-bottom
:
10px
;
background
:
#fff
;
border-radius
:
10px
;
text-align
:
center
;
.title
{
font-size
:
0
.34rem
;
text-align
:
center
;
color
:
#333
;
padding
:
0
.2rem
;
}
.tips
{
font-size
:
0
.24rem
;
padding-left
:
0
.2rem
;
}
input
{
width
:
100%
;
font-size
:
0
.24rem
;
}
}
}
</
style
>
src/utils/axios.js
浏览文件 @
25a53493
...
...
@@ -43,7 +43,7 @@ httpRequest.interceptors.response.use(
// 未登录
if
(
data
.
code
===
1
)
{
// window.location.href = `${import.meta.env.VITE_LOGIN_URL}`
return
return
data
}
// 没有权限
if
(
data
.
code
===
4008
||
data
.
code
===
5018
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论