Skip to content

Commit

Permalink
fix some bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dsaco committed Jul 25, 2017
1 parent 0a68bc5 commit 9b83d79
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 33 deletions.
5 changes: 5 additions & 0 deletions src/sass/layout/_draft.scss
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@
z-index: 2;
background-color: rgba(255, 255, 255, 0.9)
}
@media screen and (max-width: 992px) {
#page-affix{
top:0;
}
}

.draft-image{
position:relative;
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/actions/skuAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function getSku (page = 0) {
.get(`/api/stocks`)
.query(params)
.end((err, res) => {
dispatch(receiveSku(res.body.stocks,res.body.totalPages,page,merchant,type,query))
dispatch(receiveSku(res.body.stocks,res.body.totalPages,page,merchant,type,query,orderBy,asc))
})
}
}
Expand All @@ -70,6 +70,7 @@ export function getSkuBy (merchant = '',type = '',query = '',orderBy,asc) {
return (dispatch,getState) => {
let page = 0
let params = { page,orderBy,asc }
console.log(orderBy,asc)
if(query) {
params.q = query
}
Expand Down
18 changes: 3 additions & 15 deletions src/scripts/components/Common/PlayAliBaichuan.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PlayAliBaichuan extends Component {
// logo: 'http://img.alicdn.com/tps/i3/TB12LD9IFXXXXb3XpXXSyFWJXXX-82-82.png',
// pluginUrl: 'http://www.taobao.com/market/seller/openim/plugindemo.php',
// sendMsgToCustomService: true,
// titleBar:true,
// titleBar:true,
onMsgSent:function() {
console.log('sent')
},
Expand All @@ -41,13 +41,12 @@ class PlayAliBaichuan extends Component {
toAvatar,
});
}

}
render() {
let show = this.props.baichuan.touid === 'none' ? false : true

return(
<div
<div onClick={this.props.setTouidNull}
style={{
position:'fixed',
top:0,right:0,left:0,bottom:0,
Expand All @@ -58,18 +57,7 @@ class PlayAliBaichuan extends Component {
zIndex:9999,
}}
>
<span style={{
position:'absolute',
top:50,right:50,
color:'white',
fontSize:30,
borderRadius:'50%',
border:'1px solid white',
padding:7
}} onClick={this.props.setTouidNull} className="glyphicon glyphicon-remove"></span>
<div id="alibaichuan">

</div>
<div id="alibaichuan" onClick={e => e.stopPropagation()}></div>
</div>
)
}
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/components/FeedbackList/FeedbackList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export default class FeedbackList extends Component{
if(typeof page === 'number') {
this.props.history.push(`/feedbacks?page=${page}`)
}else{
this.props.getFeedback(0)
const ppage = parsePage(this.props.location.search)
this.goPage(ppage)
}
}
_goPage(page) {
Expand Down
9 changes: 8 additions & 1 deletion src/scripts/components/OrderList/OrderList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ export default class OrderList extends Component{
this.props.history.push(path)
this.setState({status,merchant,year,month,filter})
}else{
this.props.getOrder(0)
const ppage = parsePage(this.props.location.search)
const pstatus = parse(this.props.location.search).status || ''
const pmerchant = parse(this.props.location.search).merchant || ''
this.setState({
status:pstatus,merchant:pmerchant
},() => {
this.goPage(ppage)
})
}
}
_goPage(page) {
Expand Down
6 changes: 2 additions & 4 deletions src/scripts/components/OrderList/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { connect } from 'react-redux'
import OrderList from './OrderList'

import { addTracking, setStatus, getOrder, startPay,getOrderByToy } from '../../actions/orderAction'
import { addTracking, setStatus, getOrder, startPay } from '../../actions/orderAction'
import { setTouid } from '../../actions/adminAction'
const mapActionCreators = {
addTracking,
Expand All @@ -11,17 +11,15 @@ const mapActionCreators = {
setTouid,

startPay,
getOrderByToy,
}

const mapStateToProps = (state) => {
const { totalPages,page,status,merchant,init,year,month,summary,filter } = state.order.toJS()
const { totalPages,page,status,merchant,year,month,summary,filter } = state.order.toJS()
return {
totalPages,
page,
status,
merchant,
init,
year,
month,
summary,
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/components/PageList/PageList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default class PageList extends Component{
this.setState({filter,query})
this.props.history.push(`/pages?page=${page}`)
}else{
this.props.getPage(0)
const ppage = parsePage(this.props.location.search)
this.goPage(ppage)
}
}
_goPage(page) {
Expand Down
5 changes: 2 additions & 3 deletions src/scripts/components/PostList/PostList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Row, Col, Modal, Form, FormGroup, InputGroup, FormControl, Button } fro
import ReactPaginate from 'react-paginate'
import PostPanels from '../PostPanels'
import { parsePage } from '../../widgets/parse'
const _ = require('lodash')

export default class Post extends Component{
constructor(props) {
Expand All @@ -25,8 +24,8 @@ export default class Post extends Component{
this.setState({filter,query})
this.props.history.push(`/posts?page=${page}`)
}else{
this.props.history.push(`/posts`)
this.props.getPost(0)
const ppage = parsePage(this.props.location.search)
this.goPage(ppage)
}
}
_search() {
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/components/ReportList/ReportList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export default class ReportList extends Component{
if(typeof page === 'number') {
this.props.history.push(`/reports?page=${page}`)
}else{
this.props.getReport(0)
const ppage = parsePage(this.props.location.search)
this.goPage(ppage)
}
}
_goPage(page) {
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/components/SkuList/SkuList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export default class SkuList extends Component{
this.props.history.push(`/skus?page=${page}`)
this.setState({merchant,type,query,orderBy,asc})
}else{
this.props.history.push(`/skus?page=0`)
this.props.getSku()
const ppage = parsePage(this.props.location.search)
this.goPage(ppage)
}
}
_fillMoney(id,sid) {
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/components/TagList/TagList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export default class TagList extends Component{
this.props.history.push(`/tags?page=${page}`)
this.setState({type,query})
}else{
this.props.getTag(0)
const ppage = parsePage(this.props.location.search)
this.goPage(ppage)
}
}
_setTagClassification(tid,cid) {
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/components/ToyList/ToyList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export default class Toy extends Component{
this.props.history.push(`/toys?page=${page}`)
this.setState({filter,query,sort,month,year})
}else{
this.props.getToy(0)
const ppage = parsePage(this.props.location.search)
this.goPage(ppage)
}
}
_goPage(page) {
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/components/TradeList/TradeList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export default class TradeList extends Component {
if(typeof page === 'number') {
this.props.history.push(`/trades?page=${page}`)
}else{
this.props.getTrade(0)
const ppage = parsePage(this.props.location.search)
this.goPage(ppage)
}
}
_goPage(page) {
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/components/UserList/UserList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export default class UserList extends Component{
this.props.history.push(`/users?page=${page}`)
this.setState({filter,filterType})
}else{
this.props.getUser(0)
const ppage = parsePage(this.props.location.search)
this.goPage(ppage)
}
}
_approve() {
Expand Down

0 comments on commit 9b83d79

Please sign in to comment.