actionGoodsPopular.js 705 B

123456789101112131415161718192021222324252627
  1. import { gql } from "../helpers";
  2. import { actionPromise } from "../reducers";
  3. export const actionGoodsPopular = () =>
  4. actionPromise(
  5. "goodsPopular",
  6. gql(
  7. `query GoodsPopular($query:String){
  8. GoodFind(query: $query){
  9. _id name price amount
  10. images{
  11. _id url
  12. }
  13. }
  14. }`,
  15. {
  16. query: JSON.stringify([
  17. {},
  18. {
  19. limit: 15,
  20. orderBy: "popular",
  21. },
  22. ]),
  23. }
  24. )
  25. );