Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react'
import List from '../List';
import { Tabs } from 'antd-mobile';
import { connect } from 'react-redux';
import { topics } from '../../store/actions';
const TabPane = Tabs.TabPane;
const tabs = {
'全部': 'all',
'精华': 'good',
'分享': 'share',
'问答': 'ask',
'招聘': 'job',
// '测试': 'dev'
};
class MyTabs extends React.Component {
changeTab = (value) => {
const { loading, refresh, changeTab } = this.props;
if (loading || refresh) return;
changeTab(value);
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)){
//console.log(login)
dispatch(actions.markall_Message(login.accesstoken))
}
}
render() {
import React from 'react';
import BusinessCard from '../../components/BusinessCard';
import ListItem from '../../components/ListItem';
import { BackNavBar } from '../../components/NavBar';
import Loading from '../../components/Loading';
import { Tabs } from 'antd-mobile';
import { user, global } from '../../store/actions';
import { connect } from 'react-redux';
const TabPane = Tabs.TabPane;
class Homepage extends React.Component {
componentWillMount () {
const { loginname } = this.props.params;
this.props.getInfo(loginname);
}
componentWillReceiveProps ({to, from, change}) {
if (!change) return;
const reg = /\/user/;
if (reg.test(from) && reg.test(to) && from !== to) {
this.props.getInfo(to.split('/')[2]);
this.props.setChange();
}
}
useTabs() {
const TabPane = Tabs.TabPane;
return (
import React from 'react';
import {
connect
} from 'react-redux';
import Header from '../components/Topic/Header/index';
import List from '../components/Topic/List/index';
//import List from '../components/Homepage/List/qwe';
import Loadmore from '../components/Topic/Loadmore/loadmore';
import {
Tabs,
WhiteSpace,
ActivityIndicator
} from 'antd-mobile';
const TabPane = Tabs.TabPane;
let myAction, mYdispatch; //保存action和dispatch
let tab = [{
name: '全部',
tab: 'all',
key: 1
}, {
name: '精华',
tab: 'good',
key: 2
}, {
name: '分享',
tab: 'share',
key: 3
}, {
name: '问答',
import React from 'react'
import List from '../../components/List';
import ListItem from '../../components/ListItem';
import { Tabs } from 'antd-mobile';
import { observer, inject } from 'mobx-react';
const TabPane = Tabs.TabPane;
const tabs = {
'全部': 'all',
'精华': 'good',
'分享': 'share',
'问答': 'ask',
'招聘': 'job'
};
@inject(({topics, status}) => ({
loading: status.loading,
refreshing: status.refreshing,
reachEnd: topics.reachEnd,
data: topics.data,
type: topics.type,
firstcome: topics.firstcome,
changeType: topics.changeType,
getData: topics.loadData,
import React from 'react';
import {
Card,
Tabs,
WhiteSpace,
ActivityIndicator
} from 'antd-mobile';
import {
Link
} from 'react-router'
const TabPane = Tabs.TabPane;
require('./UserInfo.less');
import GetTime from '../../../utils/GetTime';
function callback(key) {
}
class UserInfo extends React.Component {
render() {
let {
userinfo,
collect,
gotoLogin
} = this.props;
if (JSON.stringify(userinfo) != '{}' && collect) {
return (
import React from 'react';
import { SimpleNavbar } from '../../components/NavBar';
import Success from './Success';
import { InputItem, TextareaItem, Tabs, Button, Picker, List } from 'antd-mobile';
import { inject, observer } from 'mobx-react';
const TabPane = Tabs.TabPane;
const data = [
{label: '问答', value: 'ask'},
{label: '分享', value: 'share'},
{label: '工作', value: 'job'},
{label: '测试', value: 'dev'}
];
@inject(({publish, status}) => ({
publish,
submitting: status.submitting
}))
@observer
class Publish extends React.Component {
componentWillUnmount () {