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
bc60d150
Commit
bc60d150
authored
May 28, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
73e3efe9
745591f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
58 deletions
+76
-58
UserService.ts
src/services/UserService.ts
+63
-58
Index.vue
src/views/UserCenter/Index.vue
+13
-0
No files found.
src/services/UserService.ts
View file @
bc60d150
import
Api
,{
HttpResponse
,
Result
}
from
'./../utils/request'
;
import
Api
,
{
HttpResponse
,
Result
}
from
'./../utils/request'
;
class
UserServices
{
class
UserServices
{
static
async
setMyNickNamed
(
nk
:
string
):
Promise
<
HttpResponse
>
{
static
async
setMyNickNamed
(
nk
:
string
):
Promise
<
HttpResponse
>
{
let
msg
=
{
nk
}
let
msg
=
{
nk
}
...
@@ -18,24 +18,24 @@ class UserServices{
...
@@ -18,24 +18,24 @@ class UserServices{
return
Api
.
Post
(
"travel_BindUserEmail"
,
msg
)
return
Api
.
Post
(
"travel_BindUserEmail"
,
msg
)
}
}
static
async
AutoLoginAsync
(
t
:
string
):
Promise
<
HttpResponse
>
{
static
async
AutoLoginAsync
(
t
:
string
):
Promise
<
HttpResponse
>
{
let
msg
=
{
t
}
let
msg
=
{
t
}
return
Api
.
Post
(
"travel_auto_login"
,
msg
)
return
Api
.
Post
(
"travel_auto_login"
,
msg
)
}
}
static
async
CollectAsync
():
Promise
<
HttpResponse
>
{
static
async
CollectAsync
():
Promise
<
HttpResponse
>
{
let
msg
=
{}
let
msg
=
{}
return
Api
.
Post
(
"travel_collect"
,
msg
)
return
Api
.
Post
(
"travel_collect"
,
msg
)
}
}
static
async
UserSignOutAsync
():
Promise
<
HttpResponse
>
{
static
async
UserSignOutAsync
():
Promise
<
HttpResponse
>
{
let
msg
=
{}
let
msg
=
{}
return
Api
.
Post
(
"travel_set_signout"
,
msg
)
return
Api
.
Post
(
"travel_set_signout"
,
msg
)
}
}
static
async
PasswordLoginAsync
(
account
:
string
,
pwd
:
string
,
v_token
:
string
,
tid
:
string
=
''
):
Promise
<
HttpResponse
>
{
static
async
PasswordLoginAsync
(
account
:
string
,
pwd
:
string
,
v_token
:
string
,
tid
:
string
=
''
):
Promise
<
HttpResponse
>
{
let
msg
=
{
account
,
pwd
,
v_token
,
tid
}
let
msg
=
{
account
,
pwd
,
v_token
,
tid
}
return
Api
.
Post
(
"travel_login_password"
,
msg
)
return
Api
.
Post
(
"travel_login_password"
,
msg
)
}
}
// static async RegistUserByPassAsync(account:string,pwd:string,nickname:string,token:string,tid:string=''):Promise<HttpResponse>{
// static async RegistUserByPassAsync(account:string,pwd:string,nickname:string,token:string,tid:string=''):Promise<HttpResponse>{
...
@@ -44,76 +44,81 @@ class UserServices{
...
@@ -44,76 +44,81 @@ class UserServices{
// return Api.Post("travel_user_regist_pwd",msg)
// return Api.Post("travel_user_regist_pwd",msg)
// }
// }
static
async
RegistUserAsync
(
mail
:
string
,
pwd
:
string
,
code
:
string
,
token
:
string
,
tid
:
string
=
''
):
Promise
<
HttpResponse
>
{
static
async
RegistUserAsync
(
mail
:
string
,
pwd
:
string
,
code
:
string
,
token
:
string
,
tid
:
string
=
''
):
Promise
<
HttpResponse
>
{
let
msg
:
any
=
{
mail
,
code
,
pwd
,
"v_token"
:
token
}
let
msg
:
any
=
{
mail
,
code
,
pwd
,
"v_token"
:
token
}
if
(
tid
!=
''
)
msg
.
tid
=
tid
if
(
tid
!=
''
)
msg
.
tid
=
tid
return
Api
.
Post
(
"travel_user_regist"
,
msg
)
return
Api
.
Post
(
"travel_user_regist"
,
msg
)
}
}
static
async
GetProductAsync
():
Promise
<
HttpResponse
>
{
static
async
GetProductAsync
():
Promise
<
HttpResponse
>
{
let
msg
=
{
pageIndex
:
1
,
pageSize
:
100
}
let
msg
=
{
pageIndex
:
1
,
pageSize
:
100
}
return
Api
.
Post
(
"ppt_GetPPTProduct"
,
msg
)
return
Api
.
Post
(
"ppt_GetPPTProduct"
,
msg
)
}
}
//
//
static
async
SetMemberInfoAsync
(
nk
:
string
,
id
:
string
,
ia
:
0
|
1
|-
1
):
Promise
<
HttpResponse
>
{
static
async
SetMemberInfoAsync
(
nk
:
string
,
id
:
string
,
ia
:
0
|
1
|
-
1
):
Promise
<
HttpResponse
>
{
let
msg
=
{
nk
,
id
,
ia
}
let
msg
=
{
nk
,
id
,
ia
}
return
Api
.
Post
(
"travel_set_member_info"
,
msg
)
return
Api
.
Post
(
"travel_set_member_info"
,
msg
)
}
}
static
async
RemoveMemberAsync
(
id
:
string
):
Promise
<
HttpResponse
>
{
static
async
RemoveMemberAsync
(
id
:
string
):
Promise
<
HttpResponse
>
{
let
msg
=
{
id
}
let
msg
=
{
id
}
return
Api
.
Post
(
"travel_remove_member"
,
msg
)
return
Api
.
Post
(
"travel_remove_member"
,
msg
)
}
}
static
async
SetTenantSAAsync
(
id
:
string
):
Promise
<
HttpResponse
>
{
static
async
SetTenantSAAsync
(
id
:
string
):
Promise
<
HttpResponse
>
{
let
msg
=
{
id
}
let
msg
=
{
id
}
return
Api
.
Post
(
"travel_set_sa"
,
msg
)
return
Api
.
Post
(
"travel_set_sa"
,
msg
)
}
}
static
async
SetTenantInviteCodeAsync
(
ia
:
0
|
1
):
Promise
<
HttpResponse
>
{
static
async
SetTenantInviteCodeAsync
(
ia
:
0
|
1
):
Promise
<
HttpResponse
>
{
let
msg
=
{
ia
}
let
msg
=
{
ia
}
return
Api
.
Post
(
"travel_set_invite_code"
,
msg
)
return
Api
.
Post
(
"travel_set_invite_code"
,
msg
)
}
}
static
async
JoinTeamByInviteCodeAsync
(
code
:
string
):
Promise
<
HttpResponse
>
{
static
async
JoinTeamByInviteCodeAsync
(
code
:
string
):
Promise
<
HttpResponse
>
{
let
msg
=
{
code
}
let
msg
=
{
code
}
return
Api
.
Post
(
"travel_set_join_code"
,
msg
)
return
Api
.
Post
(
"travel_set_join_code"
,
msg
)
}
}
static
async
ValidateInviteCodeAsync
(
code
:
string
):
Promise
<
HttpResponse
>
{
static
async
ValidateInviteCodeAsync
(
code
:
string
):
Promise
<
HttpResponse
>
{
let
msg
=
{
code
}
let
msg
=
{
code
}
return
Api
.
Post
(
"travel_validate_invite"
,
msg
)
return
Api
.
Post
(
"travel_validate_invite"
,
msg
)
}
}
//
//
static
async
UserExitTenantAsync
():
Promise
<
HttpResponse
>
{
static
async
UserExitTenantAsync
():
Promise
<
HttpResponse
>
{
let
msg
=
{}
let
msg
=
{}
return
Api
.
Post
(
"travel_set_userexit_tenant"
,
msg
)
return
Api
.
Post
(
"travel_set_userexit_tenant"
,
msg
)
}
}
static
async
GetTripSampleCountAsync
():
Promise
<
HttpResponse
>
{
static
async
GetTripSampleCountAsync
():
Promise
<
HttpResponse
>
{
let
msg
=
{}
let
msg
=
{}
return
Api
.
Post
(
"travel_sample_count"
,
msg
)
return
Api
.
Post
(
"travel_sample_count"
,
msg
)
}
}
static
async
SendRegistCodeAsync
(
mail
:
string
):
Promise
<
HttpResponse
>
{
static
async
SendRegistCodeAsync
(
mail
:
string
):
Promise
<
HttpResponse
>
{
let
msg
=
{
mail
}
let
msg
=
{
mail
}
return
Api
.
Post
(
"travel_regist_mail"
,
msg
)
return
Api
.
Post
(
"travel_regist_mail"
,
msg
)
}
}
static
async
NeedVerifyStatusAsync
():
Promise
<
HttpResponse
>
{
static
async
NeedVerifyStatusAsync
():
Promise
<
HttpResponse
>
{
let
msg
=
{}
let
msg
=
{}
return
Api
.
Post
(
"travel_login_verify"
,
msg
)
return
Api
.
Post
(
"travel_login_verify"
,
msg
)
}
static
async
SendResetPassCodeAsync
(
mail
:
string
):
Promise
<
HttpResponse
>
{
let
msg
=
{
mail
}
return
Api
.
Post
(
"travel_forgot_pass"
,
msg
)
}
}
static
async
SendResetPassCodeAsync
(
mail
:
string
):
Promise
<
HttpResponse
>
{
static
async
VerifyResetPassCodeAsync
(
mail
:
string
,
code
:
string
,
v_token
:
string
):
Promise
<
HttpResponse
>
{
let
msg
=
{
mail
}
let
msg
:
any
=
{
code
}
return
Api
.
Post
(
"travel_forgot_pass"
,
msg
)
if
(
mail
!=
''
)
msg
.
mail
=
mail
if
(
v_token
!=
''
)
msg
.
v_token
=
v_token
return
Api
.
Post
(
"travel_verify_forgotcode"
,
msg
)
}
}
static
async
VerifyResetPassCodeAsync
(
mail
:
string
,
code
:
string
,
v_token
:
string
):
Promise
<
HttpResponse
>
{
static
async
ResetPasswordAsync
(
pw
:
string
,
v_token
:
string
):
Promise
<
HttpResponse
>
{
let
msg
:
any
=
{
code
}
let
msg
:
any
=
{
pw
,
v_token
}
if
(
mail
!=
''
)
msg
.
mail
=
mail
return
Api
.
Post
(
"travel_reset_password"
,
msg
)
if
(
v_token
!=
''
)
msg
.
v_token
=
v_token
return
Api
.
Post
(
"travel_verify_forgotcode"
,
msg
)
}
}
static
async
ResetPasswordAsync
(
pw
:
string
,
v_token
:
string
):
Promise
<
HttpResponse
>
{
let
msg
:
any
=
{
pw
,
v_token
}
//测试接口方法
return
Api
.
Post
(
"travel_reset_password"
,
msg
)
static
async
TestMethodAsync
(
cmdStr
:
string
,
postMsg
:
string
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
cmdStr
,
postMsg
)
}
}
}
}
export
default
UserServices
;
export
default
UserServices
;
\ No newline at end of file
src/views/UserCenter/Index.vue
View file @
bc60d150
...
@@ -113,6 +113,7 @@ import { useUserStore } from "@/store";
...
@@ -113,6 +113,7 @@ import { useUserStore } from "@/store";
import
{
storeToRefs
}
from
"pinia"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
OrderReview
from
'@/views/components/Order/Review.vue'
import
OrderReview
from
'@/views/components/Order/Review.vue'
import
UserServices
from
"@/services/UserService"
;
const
useUser
=
useUserStore
()
const
useUser
=
useUserStore
()
const
{
userInfo
}
=
storeToRefs
(
useUser
)
const
{
userInfo
}
=
storeToRefs
(
useUser
)
...
@@ -121,6 +122,18 @@ const orderVisible = ref(false)
...
@@ -121,6 +122,18 @@ const orderVisible = ref(false)
const
vipTheme
=
VIP_USER_THEME
const
vipTheme
=
VIP_USER_THEME
const
enTheme
=
ENT_USER_THEME
const
enTheme
=
ENT_USER_THEME
const
testMethod
=
async
()
=>
{
var
cmd
=
""
;
var
postMsg
=
{
}
if
(
cmd
&&
cmd
!=
''
){
const
response
=
await
UserServices
.
TestMethodAsync
(
cmd
,
postMsg
);
console
.
log
(
"testMethod"
,
response
);
}
}
testMethod
()
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
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