Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
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
wangxuelai
biz.qingxiao.com
Commits
ef5722f7
Commit
ef5722f7
authored
Apr 17, 2020
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'绑定公总号状态添加'
parent
a688575e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
5 deletions
+51
-5
index.html
index.html
+3
-3
pushsetting.js
src/models/pushsetting.js
+36
-1
index.js
src/pages/pushsetting/index.js
+12
-1
No files found.
index.html
View file @
ef5722f7
...
...
@@ -11,12 +11,12 @@
<script src="js/console-polyfill.js"></script>
<![endif]-->
<script
charset=
"utf-8"
src=
"https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"
></script>
<script
src=
"/js/ueeditor/ueditor.config.js?20200107"
charset=
"utf-8"
></script><script
src=
"/js/ueeditor/ueditor.all.js?20200107"
charset=
"utf-8"
></script>
<script
src=
"js/console-polyfill.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/es6-shim.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/es5-shim.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/es5-sham.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/json3.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/html5shiv.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/polyfill.js?20200107"
charset=
"utf-8"
></script><script
src=
"lib/vendor.dll.js?20200107"
charset=
"utf-8"
></script>
</head>
</head>
<body>
<div
id=
"root"
></div>
<script
type=
"text/javascript"
src=
"/dist/main.
1b5c4c
.js"
></script></body>
</html>
<script
type=
"text/javascript"
src=
"/dist/main.
4197ae
.js"
></script></body>
</html>
\ No newline at end of file
src/models/pushsetting.js
View file @
ef5722f7
...
...
@@ -46,6 +46,40 @@ export default {
});
}
},
*
refreshPushSetting
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
data
=
yield
call
(
pushSettingAjax
.
getOfficialAccount
,
{
school_id
:
sid
,
});
if
(
data
.
code
==
200
)
{
yield
put
({
type
:
'updateState'
,
payload
:
{
isEmpty
:
false
,
wxInfo
:
{
title
:
data
.
data
.
title
,
created_at
:
data
.
data
.
created_at
,
logo
:
data
.
data
.
head_img
,
template_config_status
:
data
.
data
.
template_config_status
,
},
},
});
}
else
if
(
data
.
code
==
40000
)
{
yield
put
({
type
:
'updateState'
,
payload
:
{
isEmpty
:
true
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
queryinfo
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
,
locationQuery
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
auth_code
}
=
locationQuery
;
...
...
@@ -101,7 +135,8 @@ export default {
wxInfo
:
{
title
:
data
.
data
.
title
,
created_at
:
data
.
data
.
created_at
,
logo
:
''
,
logo
:
data
.
data
.
head_img
,
template_config_status
:
data
.
data
.
template_config_status
,
},
},
});
...
...
src/pages/pushsetting/index.js
View file @
ef5722f7
...
...
@@ -27,6 +27,12 @@ class PushSetting extends React.Component {
type
:
'pushsetting/gobindwx'
,
});
}
refreshPushSetting
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'pushsetting/refreshPushSetting'
,
});
}
render
()
{
const
{
isEmpty
,
...
...
@@ -34,6 +40,7 @@ class PushSetting extends React.Component {
sid
,
hasPushAuth
,
}
=
this
.
props
;
console
.
log
(
wxInfo
,
'wxInfo'
);
const
data
=
[
{
title
:
'Ant Design Title 1'
,
...
...
@@ -48,12 +55,16 @@ class PushSetting extends React.Component {
renderItem
=
{
item
=>
(
<
List
.
Item
>
<
List
.
Item
.
Meta
avatar
=
{
<
Avatar
src
=
{
imagify
(
item
.
head_img
)}
/>
}
avatar
=
{
<
Avatar
src
=
{
imagify
(
item
.
logo
)}
/>
}
title
=
{
<
span
>
{
item
.
title
}
<
/span>
}
description
=
{
(
<
div
>
<
div
>
{
`
${
item
.
created_at
}
绑定`
}
<
/div
>
{
item
.
template_config_status
==
1
&&
<
div
>
状态:未配置
<
/div>
}
{
item
.
template_config_status
==
2
&&
<
div
>
状态:配置中
<
span
style
=
{{
paddingLeft
:
'10px'
}}
className
=
"hreflink"
onClick
=
{
this
.
refreshPushSetting
}
>
刷新状态
<
/span></
div
>
}
{
item
.
template_config_status
==
3
&&
<
div
>
状态:配置成功
<
/div>
}
{
item
.
template_config_status
==
4
&&
<
div
>
状态:配置失败,请联系轻校客服
<
/div>
}
<
div
><
span
id
=
"linkcopy"
>
{
ENVIRONMENT
==
'pro'
?
`https://h5.qingxiao.online/qxbindpush.html?sid=
${
sid
}
`
:
`https://clock-h5.wp53.cn/qxbindpush.html?sid=
${
sid
}
`
}
<
/span><span style={{ paddingLeft: '10px' }} className="hreflink" data-clipboard-target="#linkcopy" id="btnCopyLink">复制</
span
><
/div
>
<
/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