Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
27b3681b
Commit
27b3681b
authored
Jul 15, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8e33b134
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
2 deletions
+42
-2
src/common/js/wechatApi.js
+0
-1
src/core/wechatApi.js
+40
-0
src/modules/college-manage/EmployeeManage.tsx
+2
-1
No files found.
src/common/js/wechatApi.js
View file @
27b3681b
...
...
@@ -26,7 +26,6 @@ export default class WechatApi {
signature
:
res
.
signature
,
// 必填,签名,见 附录-JS-SDK使用权限签名算法
jsApiList
:
[
'chooseImage'
,
'shareToExternalContact'
,
'selectExternalContact'
,
'selectEnterpriseContact'
],
}).
then
(()
=>
{
console
.
log
(
'微信config设置完毕'
)
if
(
params
.
isAgentConfig
)
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
Service
.
Hades
(
'anon/hades/getWxWorkJSAPISignature'
,
{
...
...
src/core/wechatApi.js
0 → 100644
View file @
27b3681b
import
Platform
from
'./platform'
;
import
Service
from
"@/common/js/service"
;
import
User
from
'@/common/js/user'
;
export
default
class
WechatApi
{
static
initShareConfig
()
{
// if (Platform.isWeiXin()) {
const
data
=
{
url
:
window
.
location
.
href
.
split
(
'#'
)[
0
],
storeId
:
User
.
getStoreId
(),
}
Service
.
Hades
(
'anon/hades/getWxWorkJSAPISignature'
,
data
).
then
((
result
)
=>
{
const
res
=
result
.
result
;
const
conf
=
{
corpid
:
res
.
corpid
,
// 必填,企业微信的corpid,必须与当前登录的企业一致
agentid
:
res
.
agentid
,
// 必填,企业微信的应用id (e.g. 1000247)
timestamp
:
res
.
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
res
.
nonceStr
,
// 必填,生成签名的随机串
signature
:
res
.
signature
,
jsApiList
:
[
'startLiving'
,
'downloadLivingReplay'
],
success
:
function
(
res
)
{
console
.
log
(
'agentConfig注册成功'
)
console
.
log
(
res
,
'agentConfig'
)
},
fail
:
function
(
res
)
{
console
.
log
(
res
,
' agentConfig1 错误'
)
if
(
res
.
errMsg
.
indexOf
(
'function not exist'
)
>
-
1
){
alert
(
'版本过低请升级'
)
}
},
complete
:(
res
)
=>
{
console
.
log
(
res
,
' agentConfig2 错误'
)
}
}
console
.
log
(
conf
)
wx
.
agentConfig
(
conf
);
});
// }
}
}
\ No newline at end of file
src/modules/college-manage/EmployeeManage.tsx
View file @
27b3681b
...
...
@@ -153,8 +153,9 @@ function EmployeeManage() {
/>
)
}
{
/* <span className="title">{val}</span> */
}
<
span
className=
"title"
>
<
WWOpenDataCom
type=
"userName"
openid=
{
val
}
/>
<
WWOpenDataCom
type=
"userName"
openid=
{
val
}
/>
</
span
>
</
div
>
);
...
...
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