Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
1e40c1d0
提交
1e40c1d0
authored
5月 24, 2025
作者:
毛细亚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新代码
上级
bcc40a83
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
6 行删除
+11
-6
login.vue
src/views/login.vue
+11
-6
没有找到文件。
src/views/login.vue
浏览文件 @
1e40c1d0
...
...
@@ -20,7 +20,6 @@
<span
class=
"loading-spinner"
></span>
</div>
</div>
<el-button
type=
"primary"
@
click=
'goDingding'
>
钉钉跳转
</el-button>
<!-- 组织切换弹窗 -->
<el-dialog
:visible
.
sync=
"showOrgDialog"
width=
"300px"
title=
"选择组织"
>
<ul
style=
"list-style:none;padding:0;margin-top: -20px;"
>
...
...
@@ -102,9 +101,6 @@ export default {
},
methods
:
{
...
mapMutations
(
'user'
,[
'set_corp_id'
,
'set_userid'
,
'set_external_userid'
,
'set_userInfo'
,
'set_token'
,
'set_cser_info'
,
'set_signData'
]),
goDingding
(){
window
.
location
.
href
=
this
.
DDTestUrl
},
// 设置缓存
cacheCorp_id
(
corp_id
){
Cookies
.
set
(
'corp_id'
,
corp_id
,
{
expires
:
7
})
...
...
@@ -126,6 +122,10 @@ export default {
cser_name
:
cser_name
})
},
cacheExternal_userid
(
external_userid
){
Cookies
.
set
(
'external_userid'
,
external_userid
,
{
expires
:
7
})
this
.
set_external_userid
(
external_userid
)
},
cacheSignData
(
signData
){
Cookies
.
set
(
'signData'
,
JSON
.
stringify
(
signData
),
{
expires
:
7
})
this
.
set_signData
(
signData
)
...
...
@@ -156,17 +156,21 @@ export default {
async
getSignature
(){
console
.
log
(
'获取签名'
,
window
.
location
.
href
)
const
corp_id
=
Cookies
.
get
(
'corp_id'
)
try
{
const
res
=
await
getSignature
({
corp_id
:
corp_id
,
path
:
window
.
location
.
href
});
if
(
res
.
status_code
===
1
){
this
.
signData
=
res
.
data
this
.
cacheSignData
(
res
.
data
)
try
{
this
.
registerWeComSDK
();
// this.$router.push('/')// 一切准备工作就绪
}
catch
(
err
){
console
.
log
(
err
,
'初始化sdk 失败'
)
}
}
}
catch
(
err
){
console
.
log
(
err
,
'获取签名失败'
)
window
.
location
.
href
=
window
.
location
.
origin
+
'/company_app/index.html?corp_id='
+
corp_id
+
'&msg=signerror'
}
},
// 2. 注册企微JS-SDK
...
...
@@ -300,8 +304,9 @@ export default {
success
:
(
res
)
=>
{
if
(
res
.
err_msg
===
"getCurExternalContact:ok"
)
{
this
.
external_userid
=
res
.
userId
;
this
.
set_e
xternal_userid
(
this
.
external_userid
)
this
.
cacheE
xternal_userid
(
this
.
external_userid
)
console
.
log
(
this
.
external_userid
,
'获取企微外部联系人'
)
this
.
$router
.
push
(
'/'
)
// 一切准备工作就绪
}
},
fail
:
(
err
)
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论