Commit 8a66ef90 authored by wangxuelai's avatar wangxuelai

'微信消息推送给'

parent c007c73a
......@@ -226,15 +226,15 @@ export default {
// },
{
id: '80',
name: '公众号消息推送配置',
name: '公众号推送配置',
key: 80,
isFather: false,
style: {
width: '20px',
height: '20px',
width: '15px',
height: '15px',
},
activeurl: `${__IMGCDN__}menu/live.png?v=1`,
notactiveurl: `${__IMGCDN__}menu/liveactive.png`,
activeurl: `${__IMGCDN__}menu/push.png?v=1`,
notactiveurl: `${__IMGCDN__}menu/pushactive.png`,
path: '/sjd/pushsetting',
relativePath: ['/sjd/pushsetting'],
},
......
import React from 'react';
import { connect } from 'dva';
import qs from 'qs';
import { List, Avatar, Empty, Button } from 'antd';
import { List, Avatar, Empty, Button, message } from 'antd';
import ClipboardJS from 'clipboard';
import pageStyles from './index.less';
import disData from '../../common/dis.data';
import { LocalStorage, SessionStorage, pageIn } from '../../utils/index';
import { LocalStorage, SessionStorage, pageIn, imagify } from '../../utils/index';
class PushSetting extends React.Component {
constructor(props) {
super(props);
......@@ -13,6 +14,10 @@ class PushSetting extends React.Component {
}
componentDidMount() {
pageIn('轻校-公众号消息推送配置');
this.clipboard = new ClipboardJS('#btnCopyLink'); // 点击按钮复制到粘贴板
this.clipboard.on('success', () => {
message.success('复制成功', 0.3);
});
}
componentWillUnmount() {
}
......@@ -26,6 +31,7 @@ class PushSetting extends React.Component {
const {
isEmpty,
wxInfo,
sid,
} = this.props;
const data = [
{
......@@ -41,9 +47,15 @@ class PushSetting extends React.Component {
renderItem={item => (
<List.Item>
<List.Item.Meta
avatar={<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />}
avatar={<Avatar src={imagify(item.head_img)} />}
title={<span>{item.title}</span>}
description={`${item.created_at}绑定`}
description={
(
<div>
<div>{`${item.created_at}绑定`}</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>
)}
/>
</List.Item>
)}
......@@ -77,10 +89,11 @@ function mapStateToProps(state) {
isEmpty,
wxInfo,
} = state.pushsetting;
const { locationQuery } = state.webapp;
const { locationQuery, sid } = state.webapp;
return {
isEmpty,
wxInfo,
sid,
};
}
export default connect(mapStateToProps)(PushSetting);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment