Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
pptist
Commits
f3ae1551
Commit
f3ae1551
authored
Jun 12, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录 调整
parent
e092dc76
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
135 additions
and
15 deletions
+135
-15
UserCard.vue
src/components/User/UserCard.vue
+3
-3
BackTop.vue
src/components/home/BackTop.vue
+11
-0
Login.vue
src/views/Auth/Login.vue
+25
-10
passwordLogin.vue
src/views/Auth/components/passwordLogin.vue
+94
-0
Index.vue
src/views/Market/Index.vue
+2
-2
No files found.
src/components/User/UserCard.vue
View file @
f3ae1551
...
...
@@ -149,9 +149,9 @@ const forwardUserCenter = ()=>{
router
.
push
(
'/u'
)
}
const
forward
=
(
item
:
any
)
=>
{
if
(
item
.
u
rl
){
if
(
url
.
includes
(
'http://'
)
||
url
.
includes
(
'https://'
))
openNewBlank
(
u
rl
)
else
router
.
push
(
u
rl
)
if
(
item
.
U
rl
){
if
(
item
.
Url
.
includes
(
'http://'
)
||
item
.
Url
.
includes
(
'https://'
))
openNewBlank
(
item
.
U
rl
)
else
router
.
push
(
item
.
U
rl
)
}
if
(
item
.
Id
==
2
)
{
followVisible
.
value
=
true
...
...
src/components/home/BackTop.vue
0 → 100644
View file @
f3ae1551
<
template
>
<div
class=
"BackTopBox animate__animated animate__fadeInUp"
>
</div>
</
template
>
<
script
setup
lang=
"ts"
>
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
\ No newline at end of file
src/views/Auth/Login.vue
View file @
f3ae1551
...
...
@@ -5,7 +5,7 @@
<div
class=
"col column flex-center items-center"
>
<div
class=
"wel"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1711705161000_818.png"
/>
<h1
style=
"font-size: 32px;
text-dark"
class=
"
q-my-lg"
>
快速,智能,美观
</h1>
<h1
style=
"font-size: 32px;
"
class=
"text-dark
q-my-lg"
>
快速,智能,美观
</h1>
<div
class=
"text-info text-small"
style=
"font-size: 13px;"
>
这里有上百种行程设计模板供你选择
</div>
<div
class=
"text-info text-small q-my-md"
style=
"font-size: 13px;"
>
我们为你提供了大量的插件,支持快速实现自己想要的行程
</div>
<div
class=
"text-info text-small"
style=
"font-size: 13px;"
>
AI助手的辅助让你报价与设计快人一步
</div>
...
...
@@ -38,8 +38,13 @@
<span
class=
"q-ml-md"
>
使用短信验证登录
</span>
</div>
</div>
-->
<div
class=
"row LoginTypeBox"
>
<div
v-for=
"(item,index) in LoginType"
>
{{
item
.
Name
}}
</div>
</div>
<el-divider>
<span
class=
"text-info"
>
使用邮箱或者账号登录
</span>
</el-divider>
<el-form
ref=
"loginFormRef"
:model=
"model"
:rules=
"rules"
label-width=
"0px"
size=
"large"
class=
"full-width q-mt-lg"
>
<
!--
<
el-form
ref=
"loginFormRef"
:model=
"model"
:rules=
"rules"
label-width=
"0px"
size=
"large"
class=
"full-width q-mt-lg"
>
<el-form-item
label=
""
prop=
"account"
>
<el-input
v-model=
"model.account"
placeholder=
"账号/邮箱"
/>
</el-form-item>
...
...
@@ -57,14 +62,15 @@
<el-form-item>
<el-button
type=
"primary"
class=
"full-width q-mb-lg"
@
click=
"submitForm(loginFormRef)"
:loading=
"loading"
>
登录
</el-button>
</el-form-item>
<div
class=
"text-info text-small row flex-center"
>
<span>
还没有账号?
</span>
<el-button
link
type=
"primary"
class=
"q-mb-lg"
@
click=
"redicetToRegist"
>
立即注册
</el-button>
</div>
<div
class=
"text-info text-small row flex-center"
>
<img
class=
"cursor-pointer"
src=
"../../assets/img/wechatLogin.png"
style=
"width:1.67vw;"
alt=
""
@
click=
"redicetToWechat"
>
</div>
</el-form>
</el-form>
-->
<passwordLogin></passwordLogin>
<div
class=
"text-info text-small row flex-center"
>
<span>
还没有账号?
</span>
<el-button
link
type=
"primary"
class=
"q-mb-lg"
@
click=
"redicetToRegist"
>
立即注册
</el-button>
</div>
<!--
<div
class=
"text-info text-small row flex-center"
>
<img
class=
"cursor-pointer"
src=
"../../assets/img/wechatLogin.png"
style=
"width:1.67vw;"
alt=
""
@
click=
"redicetToWechat"
>
</div>
-->
</
template
>
<
template
v-if=
"multipleUsers && multipleUsers.length>0"
>
<el-divider>
<span
class=
"text-info"
>
选择你需要登录的组织
</span>
</el-divider>
...
...
@@ -108,6 +114,7 @@ import { useUserStore } from '@/store/user';
import
{
ElMessage
,
FormInstance
,
FormRules
}
from
'element-plus'
;
import
{
reactive
,
ref
}
from
'vue'
;
import
VueHcaptcha
from
"@hcaptcha/vue3-hcaptcha"
;
import
passwordLogin
from
"./components/passwordLogin"
;
interface
RuleForm
{
account
:
string
...
...
@@ -143,6 +150,14 @@ const rules = reactive<FormRules<RuleForm>>({
]
})
const
LoginType
=
reactive
([
{
Name
:
'密码登录'
,
Id
:
1
},
{
Name
:
'验证码登录'
,
Id
:
2
},
{
Name
:
'微信登录'
,
Id
:
3
},
])
const
currentLogin
=
ref
(
0
)
const
submitForm
=
async
(
formEl
:
FormInstance
|
undefined
)
=>
{
if
(
!
formEl
||
loading
.
value
||
(
needVerify
.
value
&&
validateToken
.
value
==
''
))
return
loading
.
value
=
true
...
...
src/views/Auth/components/passwordLogin.vue
0 → 100644
View file @
f3ae1551
<
template
>
<el-form
ref=
"loginFormRef"
:model=
"model"
:rules=
"rules"
label-width=
"0px"
size=
"large"
class=
"full-width q-mt-lg"
>
<el-form-item
label=
""
prop=
"account"
>
<el-input
v-model=
"model.account"
placeholder=
"账号/邮箱"
/>
</el-form-item>
<el-form-item
label=
""
prop=
"password"
>
<el-input
v-model=
"model.password"
type=
"password"
placeholder=
"密码"
autocomplete=
"new-password"
show-password
class=
"q-mt-lg"
/>
</el-form-item>
<el-form-item
label=
""
>
<div
class=
"row q-mt-lg full-width"
>
<div
class=
"col"
>
<vue-hcaptcha
ref=
"invisibleHcaptcha"
sitekey=
"46e00e53-ddb2-4e7b-9c51-621534c2f1f5"
@
verify=
"verifyHandler"
v-if=
"needVerify"
></vue-hcaptcha>
</div>
<el-button
link
type=
"primary"
@
click=
"redicetToForgot"
>
忘记密码?
</el-button>
</div>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
class=
"full-width q-mb-lg"
@
click=
"submitForm(loginFormRef)"
:loading=
"loading"
>
登录
</el-button>
</el-form-item>
</el-form>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
ref
}
from
'vue'
import
{
ElMessage
,
FormInstance
,
FormRules
}
from
'element-plus'
;
import
VueHcaptcha
from
"@hcaptcha/vue3-hcaptcha"
;
import
{
ApiResult
}
from
'@/configs/axios'
;
import
UserServices
from
'@/services/UserService'
;
import
{
useUserStore
}
from
'@/store/user'
;
interface
RuleForm
{
account
:
string
password
:
string
}
const
model
=
ref
<
{
account
:
string
,
password
:
string
,
tid
:
string
}
>
({
account
:
''
,
password
:
''
,
tid
:
''
})
const
rules
=
reactive
<
FormRules
<
RuleForm
>>
({
account
:
[
{
required
:
true
,
message
:
'请输入你的账号/邮箱'
,
trigger
:
'blur'
},
{
min
:
6
,
message
:
'请输入正确的账号'
,
trigger
:
'blur'
},
],
password
:
[
{
required
:
true
,
message
:
'请输入你的密码'
,
trigger
:
'blur'
},
{
min
:
6
,
max
:
20
,
message
:
'请输入正确的密码'
,
trigger
:
'blur'
},
]
})
const
loginFormRef
=
ref
<
FormInstance
>
()
const
loading
=
ref
(
false
)
const
user
=
useUserStore
()
const
multipleUsers
=
ref
<
any
[]
>
([])
const
inviteInfo
=
ref
<
any
>
()
const
needVerify
=
ref
(
false
)
const
validateToken
=
ref
(
''
)
const
invisibleHcaptcha
=
ref
()
if
(
localStorage
.
getItem
(
"invite"
)){
inviteInfo
.
value
=
JSON
.
parse
(
localStorage
.
getItem
(
"invite"
)??
'{}'
)
}
const
redicetToForgot
=
()
=>
{
location
.
href
=
'/forgot'
}
const
submitForm
=
async
(
formEl
:
FormInstance
|
undefined
)
=>
{
if
(
!
formEl
||
loading
.
value
||
(
needVerify
.
value
&&
validateToken
.
value
==
''
))
return
loading
.
value
=
true
await
formEl
.
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
await
userLoginHandler
()
}
loading
.
value
=
false
})
}
const
userLoginHandler
=
async
()
=>
{
const
result
=
await
user
.
setUserPasswordLoginAsync
(
model
.
value
.
account
,
model
.
value
.
password
,
validateToken
.
value
,
model
.
value
.
tid
)
if
(
result
.
status
==
'SUCCESS'
){
ElMessage
.
success
({
message
:
'登录成功'
})
if
(
inviteInfo
.
value
){
localStorage
.
removeItem
(
'invite'
)
localStorage
.
setItem
(
'sure_invite'
,
JSON
.
stringify
(
inviteInfo
.
value
))
}
location
.
href
=
'/space'
;
}
else
if
(
result
.
status
==
'CHOSEN'
&&
Array
.
isArray
(
result
.
data
)){
multipleUsers
.
value
=
result
.
data
}
else
{
if
(
!
needVerify
.
value
)
needVerify
.
value
=
result
.
verify
if
(
invisibleHcaptcha
.
value
&&
needVerify
.
value
)
invisibleHcaptcha
.
value
.
reset
()
ElMessage
.
error
({
message
:
'账号或密码错误'
})
}
}
</
script
>
\ No newline at end of file
src/views/Market/Index.vue
View file @
f3ae1551
...
...
@@ -205,7 +205,7 @@
</div>
<div
v-else-if=
"dataList.length == 0 && !loading"
class=
"q-mt-lg full-width full-height bg-white rounded"
style=
"padding: 3.
7vw 10px
;"
>
style=
"padding: 3.
68vw 0
;"
>
<el-empty
description=
"暂无数据"
:image=
"noDataImg(1)"
/>
</div>
<div
v-if=
'queryObj.pageCount == queryObj.pageIndex && !loading'
class=
"text-center q-pt-lg"
><img
:src=
"noDataImg(2)"
width=
"118"
/></div>
...
...
@@ -246,7 +246,7 @@ import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '@/configs/canvas'
import
foote
from
'@/components/footer/index.vue'
;
import
temDetails
from
"@/components/home/temDetails.vue"
;
import
vipFooter
from
"@/components/home/vipFooter.vue"
;
import
follow
from
"@/components/home/follow
.vue"
;
import
BackTop
from
"@/components/home/BackTop
.vue"
;
import
{
LazyImg
,
Waterfall
}
from
'vue-waterfall-plugin-next'
import
'vue-waterfall-plugin-next/dist/style.css'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment