Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mp-customer-people-recruitment-h5
Project
Project
Details
Activity
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
彭佳妮(贵阳日报)
mp-customer-people-recruitment-h5
Commits
39c009c6
Commit
39c009c6
authored
Oct 09, 2024
by
陈宗胤(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
合并冲突
parents
c48cec2b
e1fc61f9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
7 deletions
+13
-7
.gitignore
.gitignore
+2
-0
package.json
package.json
+1
-0
user.js
src/api/user.js
+2
-3
main.ts
src/main.ts
+2
-0
index.vue
src/pages/login/index.vue
+4
-1
test.vue
src/pages/login/test.vue
+1
-1
request.js
src/utils/request.js
+1
-2
No files found.
.gitignore
View file @
39c009c6
...
...
@@ -12,6 +12,8 @@ node_modules
dist
build
*.local
yarn.lock
package-lock.json
# Editor directories and files
.idea
...
...
package.json
View file @
39c009c6
...
...
@@ -26,6 +26,7 @@
"
dayjs
"
:
"^1.11.12"
,
"
lodash
"
:
"^4.17.21"
,
"
pinia
"
:
"2.0.36"
,
"
vconsole
"
:
"^3.15.1"
,
"
vue
"
:
"^3.3.11"
,
"
vue-i18n
"
:
"^9.1.9"
,
"
wot-design-uni
"
:
"^1.3.12"
...
...
src/api/user.js
View file @
39c009c6
import
instance
from
"@/utils/request"
;
// 测试登录
export
const
testLogin
=
params
=>
instance
.
post
(
"/
personal/sms/l
ogin"
,
params
);
export
const
testLogin
=
params
=>
instance
.
post
(
"/
user/appUser/smsL
ogin"
,
params
);
export
const
getSmsCode
=
params
=>
instance
.
postForm
(
"/personal/user/getSmsCode"
,
params
);
// 新华登录
export
const
xinhuaMpLogin
=
params
=>
instance
.
post
(
"/personal/xinhua/mpLogin"
,
params
);
export
const
xinhuaMpLogin
=
params
=>
instance
.
post
(
"/user/appUser/xinhua/mpLogin"
,
params
);
// 获取用户简历
export
const
getUserResumeApi
=
()
=>
instance
.
post
(
"/personal/user/resume/get"
);
// 获取等用户信息
...
...
src/main.ts
View file @
39c009c6
...
...
@@ -2,11 +2,13 @@ import { createSSRApp } from "vue";
import
App
from
"./App.vue"
;
import
store
from
"./store"
;
import
NavBar
from
"@/components/navBar/index.vue"
;
import
Vconsole
from
"vconsole"
;
export
function
createApp
()
{
const
app
=
createSSRApp
(
App
);
app
.
component
(
"NavBar"
,
NavBar
);
app
.
use
(
store
);
app
.
use
(
vConsole
);
return
{
app
};
...
...
src/pages/login/index.vue
View file @
39c009c6
...
...
@@ -18,14 +18,17 @@
<
script
setup
>
import
NavBar
from
"@/components/navBar/index.vue"
;
import
{
xinhuaMpLogin
}
from
"@/api/user.js"
;
import
{
setToken
}
from
"@/utils/token"
;
const
res
=
ref
(
""
);
const
login
=
()
=>
{
xma
.
xh
.
getUserProfile
({
range
:
[
"ACCOUNT"
,
"MOBILE"
],
success
(
info
)
{
xinhuaMpLogin
({
phone
:
info
.
data
.
uMobile
})
xinhuaMpLogin
({
encryptedData
:
info
.
data
.
uMobile
,
userType
:
'consumer'
})
.
then
(
data
=>
{
res
.
value
=
data
;
setToken
(
data
.
token
);
})
.
catch
(
err
=>
{
res
.
value
=
err
;
...
...
src/pages/login/test.vue
View file @
39c009c6
...
...
@@ -20,7 +20,7 @@ const login = async () => {
}).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
code
===
200
)
{
setToken
(
res
.
data
);
setToken
(
loginRes
.
data
.
token
);
uni
.
switchTab
({
url
:
"/pages/user/index"
});
...
...
src/utils/request.js
View file @
39c009c6
...
...
@@ -20,8 +20,7 @@ instance.interceptors.request.use(
// config.headers.Authorization = `Bearer ${token}`;
// }·
const
token
=
getToken
();
config
.
headers
.
Authorization
=
`Bearer `
+
token
;
config
.
headers
[
'User-Token'
]
=
token
;
return
config
;
},
error
=>
{
...
...
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