Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wecom-sidebar
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
wanghuihui
wecom-sidebar
Commits
7f0d87d4
Commit
7f0d87d4
authored
Dec 29, 2021
by
Aivs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:接口对接,切换到行知探索的企业微信配置
parent
78a4e998
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
155 additions
and
65 deletions
+155
-65
index.ts
src/api/index.ts
+28
-1
home.css
src/css/home.css
+25
-0
initSdk.ts
src/lib/utils/initSdk.ts
+1
-1
Home.tsx
src/pages/Home.tsx
+100
-63
findCustom.tsx
src/pages/findCustom.tsx
+1
-0
No files found.
src/api/index.ts
View file @
7f0d87d4
import
axios
from
'axios'
import
qs
from
'qs'
axios
.
defaults
.
headers
[
'Content-Type'
]
=
'application/x-www-form-urlencoded'
;
// 后端地址
// const baseURL = 'http://192.168.30.239:5000'
...
...
@@ -96,5 +98,30 @@ export const unlinkData = async (params:any) => {
})
return
response
.
data
;
}
//获取标签
export
const
getWxLabel
=
async
(
params
:
any
)
=>
{
const
response
=
await
api
.
get
(
'/user_center/getWxLabel'
,
{
params
})
return
response
.
data
;
}
// 创建标签
export
const
addWxLabel
=
async
(
params
:
any
)
=>
{
const
response
=
await
api
.
get
(
'/user_center/addWxLabel'
,
{
params
})
return
response
.
data
;
}
// 删除
export
const
deleteWxLabel
=
async
(
data
:
any
)
=>
{
const
response
=
await
api
.
post
(
'/user_center/deleteWxLabel'
,
[...
data
]
)
return
response
.
data
;
}
// 更新用户信息
export
const
updateBaseInfoFromCompanyWx
=
async
(
data
:
any
)
=>
{
const
response
=
await
api
.
post
(
'/user_center/updateBaseInfoFromCompanyWx'
,
data
)
return
response
.
data
;
}
export
default
api
src/css/home.css
View file @
7f0d87d4
...
...
@@ -93,6 +93,7 @@
padding
:
0
10px
;
line-height
:
24px
;
margin-right
:
10px
;
margin-bottom
:
10px
;
}
.grey
{
width
:
100%
;
...
...
@@ -131,6 +132,7 @@
border-radius
:
4px
!important
;
height
:
25px
!important
;
line-height
:
24px
!important
;
margin-bottom
:
10px
!important
}
.labelAdd
{
border-bottom
:
1px
solid
#F3F3F3
;
...
...
@@ -144,6 +146,7 @@
align-items
:
center
;
margin-right
:
10px
;
border-radius
:
4px
;
border
:
0
!important
;
}
.innerline
{
width
:
16px
;
...
...
@@ -232,3 +235,25 @@
font-size
:
17px
;
margin-bottom
:
18px
;
}
.save
{
background-color
:
#e55151
!important
;
border-color
:
#e55151
!important
;
}
.border0
{
border
:
1px
solid
rgba
(
1
,
113
,
194
,
.4
)
!important
;
}
.border1
{
border
:
1px
solid
#038924
!important
;
}
.border2
{
border
:
1px
solid
#F7B500
!important
;
}
.border3
{
border
:
1px
solid
#C21C07
!important
;
}
.border4
{
border
:
1px
solid
#8C8C8C
!important
;
}
.none
{
display
:
none
;
}
\ No newline at end of file
src/lib/utils/initSdk.ts
View file @
7f0d87d4
...
...
@@ -23,7 +23,7 @@ const initSdk = async (config: Config, getSignatures: GetSignatures) => {
const
configRes
=
await
jsSdk
.
config
({
beta
:
true
,
debug
:
false
,
appId
:
'ww25792c97eaa37ba7'
,
appId
:
corpId
,
timestamp
:
signaturesRes
.
meta
.
timestamp
,
nonceStr
:
signaturesRes
.
meta
.
noncestr
,
signature
:
signaturesRes
.
corp
.
signature
,
...
...
src/pages/Home.tsx
View file @
7f0d87d4
This diff is collapsed.
Click to expand it.
src/pages/findCustom.tsx
View file @
7f0d87d4
...
...
@@ -112,6 +112,7 @@ const Actions: React.FC = () => {
},
[
msg
])
const
getUserBase
=
async
()
=>
{
const
res
=
await
jsSdk
.
invoke
<
{
userId
?:
string
}
>
(
'getCurExternalContact'
,
{})
console
.
log
(
res
)
if
(
!
res
||
!
res
.
userId
)
return
let
data
:
any
=
{...
listQuery
}
data
.
wxId
=
res
.
userId
...
...
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