Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render(){
const Item = List.Item
const Brief = Item.Brief
const userid = this.props.user._id
const userinfo = this.props.chat.users
// console.log(this.props)
const msgGroup = {}
this.props.chat.chatmsg.forEach(v=>{
msgGroup[v.chatid] = msgGroup[v.chatid] || []
msgGroup[v.chatid].push(v)
})
const chatList = Object.values(msgGroup).sort((a,b)=>{
const a_last = this.getLast(a).create_time
const b_last = this.getLast(b).create_time
return b_last - a_last
})
/**
* Created by Administrator on 2017/8/10.
*/
import React, { Component } from 'react'
import { List, Button } from 'antd-mobile'
import { connect } from 'react-redux'
import { saveListData } from '../../redux/actions'
import './listItem.less'
const Item = List.Item
class ListItems extends Component {
// 确认参会
ensurePart = () => {
this.props.ensurePart()
}
// 取消参会
cancelPart = () => {
this.props.cancelPart()
}
//签到
sign = () => {
this.props.sign()
render(){
console.log(this.props)
const Item=List.Item
const Brief=Item.Brief
//从redux中取值,之前authRoute组件已将获取到了数据
//记得判空
return this.props.name?(
<div style="{{position:"relative",zIndex:11}}">
}
title={this.props.name}
message={this.props.type==='boss'?this.props.company:null}>
'简介'}>
{this.props.title}
{this.props.desc.split('\n').map(d=>{d})}
{this.props.money?薪资:{this.props.money}:null}
</div>
import React from 'react';
import {
RefreshControl,
ListView,
List
} from 'antd-mobile';
const Item = List.Item;
const Brief = Item.Brief;
import {
Link
} from 'react-router';
let pageIndex = 0;
class App extends React.Component {
constructor(props) {
super(props);
const dataSource = new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2,
});
console.log(dataSource)
this.onRefresh = this.onRefresh.bind(this)
import React from 'react';
import { List } from 'antd-mobile';
import router from 'umi/router';
import { dataFormat } from '../../utils/index';
const Item = List.Item;
function ListView({ data }) {
if (!data || data.length < 1) return null;
return (
{data.map((item, index) => {
return (
router.push(`/topicDetail/${item.id}`)}
>
{item.title}
);
})}
import React from 'react';
import {
List,
Card,
Button
} from 'antd-mobile';
const Item = List.Item;
const Brief = Item.Brief;
import {
Link
} from 'react-router';
import GetTime from '../../../utils/GetTime';
require('./Content.less')
class Content extends React.Component {
constructor(...arg) {
super(...arg);
this.is_collect = false;
}
render() {
let _this = this;
let {
import React from "react";
import { List, Stepper } from "antd-mobile";
import ImmutablePropTypes from "react-immutable-proptypes";
import PropTypes from "prop-types";
const Item = List.Item;
const Brief = Item.Brief;
function getCount(shopCart, id) {
let obj = shopCart.find(value => {
return id === value.get("id");
});
return obj ? obj.get("count") : 0;
}
const GoodsList = ({ goodsList, addToCart, shopCart }) => {
return (
{goodsList.map(v => (
import React from 'react';
import {
Card,
Tabs,
WhiteSpace,
List,
Badge
} from 'antd-mobile';
const Item = List.Item;
const Brief = Item.Brief;
import {
Link
} from 'react-router';
const TabPane = Tabs.TabPane;
require('./MessageList.less')
import GetTime from '../../utils/GetTime';
class Message extends React.Component {
constructor(){
super();
this.handleTabClick=this.handleTabClick.bind(this);
}
handleTabClick(key) {
let {dispatch,actions,state,login}=this.props;
if(key==2&&(state.hasnot_read_messages.length==0)){
import React, {Component} from 'react';
import { Link } from 'react-router';
import className from 'classnames';
import { Icon, List, Modal } from 'antd-mobile';
import { is, fromJS} from 'immutable';
import {Tool} from 'src/Config/Tool';
const Item = List.Item;
const Brief = Item.Brief;
export default class PanelTab extends Component {
constructor(props) {
super(props);
this.state = {
index: 0,
history: []
};
}
shouldComponentUpdate(nextProps, nextState) {
return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state),fromJS(nextState))
}
componentDidMount() {
import React, {Component} from 'react'
import {List, WhiteSpace, Switch, Toast} from 'antd-mobile'
import {createForm} from 'rc-form'
import './style.less'
const Item = List.Item
class Setting extends Component {
state = {
weiboChecked: false,
wechatChecked: false,
githubChecked: false,
imgChecked: false,
pasteChecked: false
}
handleNotComplete = () => {
Toast.info('功能尚未开发', 1.5)
}
render() {
const {getFieldProps} = this.props.form