Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
eabebd02
提交
eabebd02
authored
4 年前
作者:
徐立
浏览文件
操作
浏览文件
下载
差异文件
修改bug
上级
d4ab3de5
8c29166c
master
revert-0d777914
yaanzhiyuan_2021
无相关合并请求
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
17 行增加
和
15 行删除
+17
-15
index.js
one_stop_public/libs/formList/index.js
+1
-1
LoginWithQrCode.js
zyd_public/LoginFromQrCode/LoginWithQrCode.js
+16
-14
没有找到文件。
one_stop_public/libs/formList/index.js
浏览文件 @
eabebd02
...
...
@@ -883,7 +883,7 @@ class FormList extends React.Component {
isMobile
=
true
}
let
showDiv
=
document
.
querySelector
(
'#mobelDiv'
)?
document
.
querySelector
(
'#mobelDiv'
).
clientWidth
document
.
querySelector
(
'#mobelDiv'
)
?.
parentNode
.
clientWidth
:
1100
const
parentMethods
=
{
handleAdd
:
this
.
handleAdd
,
...
...
This diff is collapsed.
Click to expand it.
zyd_public/LoginFromQrCode/LoginWithQrCode.js
浏览文件 @
eabebd02
...
...
@@ -8,11 +8,12 @@ import { isJSON } from '../utils/utils';
let
ws
=
null
;
/**
* props 定义
* url: 二维码url
* show: 是否显示二维码Modal
* wxSocketGateWay: webscoket 链接地址
* mockServer: 接口地址前缀 用于获取sessionid;
* props{
* url: 二维码url
* show: 是否显示二维码Modal
* wxSocketGateWay: webscoket 链接地址
* mockServer: 接口地址前缀 用于获取sessionid;
* }
* */
export
default
class
LoginWithQrCode
extends
Component
{
constructor
(
props
)
{
...
...
@@ -20,10 +21,10 @@ export default class LoginWithQrCode extends Component {
const
{
wxSocketGateWay
,
mockServer
}
=
this
.
props
;
this
.
wxSocketGateWay
=
wxSocketGateWay
;
this
.
mockServer
=
mockServer
;
if
(
!
wxSocketGateWay
)
{
if
(
!
wxSocketGateWay
)
{
this
.
wxSocketGateWay
=
config
.
wxSocketGateWay
;
}
if
(
!
mockServer
)
{
if
(
!
mockServer
)
{
this
.
mockServer
=
config
.
mockServer
;
}
this
.
state
=
{
...
...
@@ -40,7 +41,7 @@ export default class LoginWithQrCode extends Component {
};
componentWillUnmount
(){
componentWillUnmount
()
{
this
.
initWs
();
// 组件不加载的时候 注销websocket
}
...
...
@@ -73,7 +74,7 @@ export default class LoginWithQrCode extends Component {
// that.getAppId();
that
.
setState
({
showRefresh
:
true
,
})
})
;
};
ws
.
onmessage
=
(
evt
)
=>
{
if
(
typeof
evt
.
data
===
String
)
{
...
...
@@ -144,11 +145,11 @@ export default class LoginWithQrCode extends Component {
connectTimes
:
0
,
showRefresh
:
false
,
connectStatus
:
false
,
})
})
;
};
render
()
{
const
{
sessionId
,
connectStatus
,
showRefresh
,
loading
}
=
this
.
state
;
const
{
sessionId
,
connectStatus
,
showRefresh
,
loading
}
=
this
.
state
;
const
{
url
,
show
}
=
this
.
props
;
if
(
this
.
props
.
show
&&
!
connectStatus
)
{
this
.
startConnect
();
...
...
@@ -160,9 +161,10 @@ export default class LoginWithQrCode extends Component {
margin
:
'0 auto'
,
}}
>
{
this
.
props
.
show
&&
!
connectStatus
?
<
Spin
size
=
"large"
style
=
{{
this
.
props
.
show
&&
!
connectStatus
?
<
Spin
size
=
"large"
style
=
{{
height
:
'200px'
,
paddingTop
:
'100px'
,}}
/>
:
paddingTop
:
'100px'
,
}}
/>
:
<
QRCode
bgColor
=
"white"
fgColor
=
'black'
...
...
@@ -177,7 +179,7 @@ export default class LoginWithQrCode extends Component {
marginTop
:
'10px'
,
borderTop
:
'1px solid #eee'
,
}}
>
<
Icon
type
=
"info-circle"
style
=
{{
color
:
'#E36968'
}}
/
>
<
Icon
type
=
"info-circle"
style
=
{{
color
:
'#E36968'
}}
/
>
<
span
style
=
{{
fontWeight
:
'blod'
,
}}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论