123456789101112131415161718192021222324252627282930 |
- import {actionPromise, gql} from "./index";
- const actionOrdersFind = (data) => {
- return async dispatch => {
- const queryJson = JSON.stringify(
- [{"___owner" : data}]
- )
- await dispatch(actionPromise("ordersFind", gql (
- `query orders ($query: String) {
- OrderFind(query: $query){
- total
- _id
- orderGoods {count, _id, price, good {name, price}}
- createdAt
- owner {
- login
- }
-
- }
- }`, {query: queryJson}
- )))
- }
- }
- export default actionOrdersFind;
|