Selaa lähdekoodia

modify graphql查询出错

wly 7 vuotta sitten
vanhempi
commit
8c5b9870bc

+ 92 - 30
package-lock.json

@@ -915,6 +915,16 @@
       "integrity": "sha1-EXVA4CbWThhGCTq71a3H4n/ae8s=",
       "optional": true
     },
+    "@types/node": {
+      "version": "10.12.10",
+      "resolved": "http://registry.npm.taobao.org/@types/node/download/@types/node-10.12.10.tgz",
+      "integrity": "sha1-T6duZZi33j8Mtuw6usxPWeWzos4="
+    },
+    "@types/semver": {
+      "version": "5.5.0",
+      "resolved": "http://registry.npm.taobao.org/@types/semver/download/@types/semver-5.5.0.tgz",
+      "integrity": "sha1-FGwqKe59O65L8vyydGNuJkyBPEU="
+    },
     "@types/tapable": {
       "version": "1.0.2",
       "resolved": "http://registry.npm.taobao.org/@types/tapable/download/@types/tapable-1.0.2.tgz",
@@ -1099,6 +1109,11 @@
       "resolved": "http://registry.npm.taobao.org/abab/download/abab-2.0.0.tgz",
       "integrity": "sha1-q6CrTF7uLUx500h9hUUPsjduuw8="
     },
+    "abbrev": {
+      "version": "1.1.1",
+      "resolved": "http://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz",
+      "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg="
+    },
     "accepts": {
       "version": "1.3.5",
       "resolved": "http://registry.npm.taobao.org/accepts/download/accepts-1.3.5.tgz",
@@ -3286,6 +3301,15 @@
         "typedarray": "^0.0.6"
       }
     },
+    "config-chain": {
+      "version": "1.1.12",
+      "resolved": "http://registry.npm.taobao.org/config-chain/download/config-chain-1.1.12.tgz",
+      "integrity": "sha1-D96NCRIA616AjK8l/mGMAvSOTvo=",
+      "requires": {
+        "ini": "^1.3.4",
+        "proto-list": "~1.2.1"
+      }
+    },
     "confusing-browser-globals": {
       "version": "1.0.5",
       "resolved": "http://registry.npm.taobao.org/confusing-browser-globals/download/confusing-browser-globals-1.0.5.tgz",
@@ -4248,6 +4272,19 @@
         "safer-buffer": "^2.1.0"
       }
     },
+    "editorconfig": {
+      "version": "0.15.2",
+      "resolved": "http://registry.npm.taobao.org/editorconfig/download/editorconfig-0.15.2.tgz",
+      "integrity": "sha1-BHvpg6u5qzwu7+UZnLK3xWifBwI=",
+      "requires": {
+        "@types/node": "^10.11.7",
+        "@types/semver": "^5.5.0",
+        "commander": "^2.19.0",
+        "lru-cache": "^4.1.3",
+        "semver": "^5.6.0",
+        "sigmund": "^1.0.1"
+      }
+    },
     "ee-first": {
       "version": "1.1.1",
       "resolved": "http://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz",
@@ -5368,6 +5405,11 @@
         "schema-utils": "^1.0.0"
       }
     },
+    "file-saver": {
+      "version": "2.0.0",
+      "resolved": "http://registry.npm.taobao.org/file-saver/download/file-saver-2.0.0.tgz",
+      "integrity": "sha1-dO73dIFZUDtgAIoVry8ZMPtd96s="
+    },
     "filename-regex": {
       "version": "2.0.1",
       "resolved": "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.1.tgz",
@@ -5875,8 +5917,7 @@
         },
         "ansi-regex": {
           "version": "2.1.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "aproba": {
           "version": "1.2.0",
@@ -5894,13 +5935,11 @@
         },
         "balanced-match": {
           "version": "1.0.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
-          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -5913,18 +5952,15 @@
         },
         "code-point-at": {
           "version": "1.1.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "concat-map": {
           "version": "0.0.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "console-control-strings": {
           "version": "1.1.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -6027,8 +6063,7 @@
         },
         "inherits": {
           "version": "2.0.3",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "ini": {
           "version": "1.3.5",
@@ -6038,7 +6073,6 @@
         "is-fullwidth-code-point": {
           "version": "1.0.0",
           "bundled": true,
-          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -6051,20 +6085,17 @@
         "minimatch": {
           "version": "3.0.4",
           "bundled": true,
-          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
         },
         "minimist": {
           "version": "0.0.8",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "minipass": {
           "version": "2.2.4",
           "bundled": true,
-          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.1",
             "yallist": "^3.0.0"
@@ -6081,7 +6112,6 @@
         "mkdirp": {
           "version": "0.5.1",
           "bundled": true,
-          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -6154,8 +6184,7 @@
         },
         "number-is-nan": {
           "version": "1.0.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -6165,7 +6194,6 @@
         "once": {
           "version": "1.4.0",
           "bundled": true,
-          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -6241,8 +6269,7 @@
         },
         "safe-buffer": {
           "version": "5.1.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "safer-buffer": {
           "version": "2.1.2",
@@ -6272,7 +6299,6 @@
         "string-width": {
           "version": "1.0.2",
           "bundled": true,
-          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",
@@ -6290,7 +6316,6 @@
         "strip-ansi": {
           "version": "3.0.1",
           "bundled": true,
-          "optional": true,
           "requires": {
             "ansi-regex": "^2.0.0"
           }
@@ -6329,13 +6354,11 @@
         },
         "wrappy": {
           "version": "1.0.2",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "yallist": {
           "version": "3.0.2",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         }
       }
     },
@@ -8482,6 +8505,17 @@
         "topo": "2.x.x"
       }
     },
+    "js-beautify": {
+      "version": "1.8.8",
+      "resolved": "http://registry.npm.taobao.org/js-beautify/download/js-beautify-1.8.8.tgz",
+      "integrity": "sha1-HrF1tzo1caXx7Y2Y588rBb+phHE=",
+      "requires": {
+        "config-chain": "~1.1.5",
+        "editorconfig": "^0.15.0",
+        "mkdirp": "~0.5.0",
+        "nopt": "~4.0.1"
+      }
+    },
     "js-levenshtein": {
       "version": "1.1.4",
       "resolved": "http://registry.npm.taobao.org/js-levenshtein/download/js-levenshtein-1.1.4.tgz",
@@ -9403,6 +9437,15 @@
         "semver": "^5.3.0"
       }
     },
+    "nopt": {
+      "version": "4.0.1",
+      "resolved": "http://registry.npm.taobao.org/nopt/download/nopt-4.0.1.tgz",
+      "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
+      "requires": {
+        "abbrev": "1",
+        "osenv": "^0.1.4"
+      }
+    },
     "normalize-package-data": {
       "version": "2.4.0",
       "resolved": "http://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-2.4.0.tgz",
@@ -9693,6 +9736,15 @@
       "resolved": "http://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz",
       "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
     },
+    "osenv": {
+      "version": "0.1.5",
+      "resolved": "http://registry.npm.taobao.org/osenv/download/osenv-0.1.5.tgz",
+      "integrity": "sha1-hc36+uso6Gd/QW4odZK18/SepBA=",
+      "requires": {
+        "os-homedir": "^1.0.0",
+        "os-tmpdir": "^1.0.0"
+      }
+    },
     "p-defer": {
       "version": "1.0.0",
       "resolved": "http://registry.npm.taobao.org/p-defer/download/p-defer-1.0.0.tgz",
@@ -11753,6 +11805,11 @@
         "object-assign": "^4.1.1"
       }
     },
+    "proto-list": {
+      "version": "1.2.4",
+      "resolved": "http://registry.npm.taobao.org/proto-list/download/proto-list-1.2.4.tgz",
+      "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk="
+    },
     "proxy-addr": {
       "version": "2.0.4",
       "resolved": "http://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.4.tgz",
@@ -14254,6 +14311,11 @@
       "resolved": "http://registry.npm.taobao.org/shellwords/download/shellwords-0.1.1.tgz",
       "integrity": "sha1-1rkYHBpI05cyTISHHvvPxz/AZUs="
     },
+    "sigmund": {
+      "version": "1.0.1",
+      "resolved": "http://registry.npm.taobao.org/sigmund/download/sigmund-1.0.1.tgz",
+      "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA="
+    },
     "signal-exit": {
       "version": "3.0.2",
       "resolved": "http://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz",

+ 23 - 10
src/case/ShopApp/src/App.js

@@ -1,7 +1,7 @@
 import React, { Component } from 'react';
 import './App.css';
 // import 'antd-mobile/dist/antd-mobile.css';
-import {PageContext} from './context/context'
+import {PageContext,NumContext} from './context/context'
 import NavBars from './components/App/NavBar'
 import TabBarBottom from './components/App/TabBarBottom'
 import ProductDetail from './components/ProductDetailPage/ProductDetail'
@@ -18,15 +18,28 @@ class ShopApp extends Component {
     }
   }
 
-  setNum(num=1){
+  componentWillMount(){
+    sessionStorage.setItem("openid","ovtkn4zONC3IzhpykQ7cSLZ85YFg")
+  }
+
+  setNum(num){
     this.setState({num})
   }
   
   renderPage(page=""){
+    const setNum=this.setNum.bind(this)
+
     if(page==='detail'){
-      return(<div className="pageWrap"><ProductDetail product_id={this.state.product_id}/></div>)
+      return(
+        <div className="pageWrap">
+          <ProductDetail product_id={this.state.product_id} setNum={setNum}/>
+        </div>
+        )
     }else if(page==='order'){
-      return(<div className="pageWrap"><OrderPage product_id={this.state.product_id}/></div>)
+      return(
+        <div className="pageWrap">
+        <OrderPage product_id={this.state.product_id} num={this.state.num}/>
+        </div>)
     }else{
       return(<div><TabBarBottom/></div>)
     }
@@ -40,14 +53,14 @@ class ShopApp extends Component {
     const changePage=this.changePage.bind(this)
     return (
       <PageContext.Provider value={changePage}>
-        <div className="AppWrap">
-          <div className="phone6s">
-            <div className="App">
-              <NavBars />
-              {this.renderPage(this.state.page)}
+          <div className="AppWrap">
+            <div className="phone6s">
+              <div className="App">
+                <NavBars />
+                {this.renderPage(this.state.page)}
+              </div>
             </div>
           </div>
-        </div>
       </PageContext.Provider>
     );
   }

+ 17 - 0
src/case/ShopApp/src/api/graphql/address.js

@@ -0,0 +1,17 @@
+export const getAddressByProps =`query userAddressbyprops($address: String, $updatedAt: String, $telephone: String, $default: Int, $city: String, $username: String, $postcode: String, $createdAt: String, $deletedAt: String, $user_id: ID, $area: String, $province: String) {
+    userAddressbyprops: userAddress_by_props(address: $address updatedAt: $updatedAt telephone: $telephone
+        default: $default city: $city username: $username postcode: $postcode createdAt: $createdAt deletedAt: $deletedAt user_id: $user_id area: $area province: $province) {
+        address
+        updatedAt
+        telephone
+        default
+        city
+        username
+        postcode
+        createdAt
+        deletedAt
+        id
+        area
+        province
+    }
+}`

+ 1487 - 0
src/case/ShopApp/src/api/graphql/ecommerce-js.txt

@@ -0,0 +1,1487 @@
+query userbyid($id: ID) {
+    userbyid: user_by_id(id: $id) {
+        email
+        updatedAt
+        password
+        telephone
+        username
+        createdAt
+        openid
+        id
+        userData_id {
+            id
+            nickname
+            avatar
+            isVip
+            vipCode
+            userPoint
+            createdAt
+            updatedAt
+        }
+    }
+}
+
+query adminbyid($id: ID) {
+    adminbyid: admin_by_id(id: $id) {
+        id
+        openid
+        username
+        password
+        telephone
+        email
+        createdAt
+        updatedAt
+    }
+}
+
+query orderPaybyprops($user_id: ID, $order_id: ID, $totalPay: Float, $transactionId: String, $payTime: String) {
+    orderPaybyprops: orderPay_by_props(user_id: $user_id order_id: $order_id totalPay: $totalPay transactionId: $transactionId payTime: $payTime) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        totalPay
+        transactionId
+        payTime
+    }
+}
+
+query userCartbyid($id: ID) {
+    userCartbyid: userCart_by_id(id: $id) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        count
+        createdAt
+        updatedAt
+    }
+}
+
+query userDatabyid($id: ID) {
+    userDatabyid: userData_by_id(id: $id) {
+        id
+        nickname
+        avatar
+        isVip
+        vipCode
+        userPoint
+        createdAt
+        updatedAt
+    }
+}
+
+query adminbyprops($openid: String, $username: String, $password: String, $telephone: String, $email: String, $createdAt: String, $updatedAt: String) {
+    adminbyprops: admin_by_props(openid: $openid username: $username password: $password telephone: $telephone email: $email createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        openid
+        username
+        password
+        telephone
+        email
+        createdAt
+        updatedAt
+    }
+}
+
+query userSearchbyprops($user_id: ID, $keyword: Int, $createdAt: String, $updatedAt: String) {
+    userSearchbyprops: userSearch_by_props(user_id: $user_id keyword: $keyword createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        keyword
+        createdAt
+        updatedAt
+    }
+}
+
+query userCollectbyprops($user_id: ID, $product_id: ID, $createdAt: String, $updatedAt: String) {
+    userCollectbyprops: userCollect_by_props(user_id: $user_id product_id: $product_id createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        createdAt
+        updatedAt
+    }
+}
+
+query productbyprops($category: String, $updatedAt: String, $name: String, $createdAt: String, $status: String, $intro: String, $price: Float, $img: String, $stock: Int) {
+    productbyprops: product_by_props(category: $category updatedAt: $updatedAt name: $name createdAt: $createdAt status: $status intro: $intro price: $price img: $img stock: $stock) {
+        category
+        updatedAt
+        unit
+        name
+        createdAt
+        status
+        id
+        intro
+        price
+        img
+        stock
+    }
+}
+
+query orderLogisticsbyid($id: ID) {
+    orderLogisticsbyid: orderLogistics_by_id(id: $id) {
+        updatedAt
+        logisticsFee
+        expressId
+        createdAt
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        consigneeTel
+        id
+        consignAddress
+        LogisticsStatus
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        consigneeName
+    }
+}
+
+query orderProductbyid($id: ID) {
+    orderProductbyid: orderProduct_by_id(id: $id) {
+        remark
+        updatedAt
+        unit
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        orderPay
+        createdAt
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        id
+        count
+        productPay
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+    }
+}
+
+query userCollectbyid($id: ID) {
+    userCollectbyid: userCollect_by_id(id: $id) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        createdAt
+        updatedAt
+    }
+}
+
+query userAddressbyprops($address: String, $updatedAt: String, $telephone: String, $default: Int, $city: String, $username: String, $postcode: String, $createdAt: String, $deletedAt: String, $user_id: ID, $area: String, $province: String) {
+    userAddressbyprops: userAddress_by_props(address: $address updatedAt: $updatedAt telephone: $telephone
+        default: $default city: $city username: $username postcode: $postcode createdAt: $createdAt deletedAt: $deletedAt user_id: $user_id area: $area province: $province) {
+        address
+        updatedAt
+        telephone
+        default
+        city
+        username
+        postcode
+        createdAt
+        deletedAt
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        area
+        province
+    }
+}
+
+query orderPaybyid($id: ID) {
+    orderPaybyid: orderPay_by_id(id: $id) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        totalPay
+        transactionId
+        payTime
+    }
+}
+
+query userAddressbyid($id: ID) {
+    userAddressbyid: userAddress_by_id(id: $id) {
+        address
+        updatedAt
+        telephone
+        default
+        city
+        username
+        postcode
+        createdAt
+        deletedAt
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        area
+        province
+    }
+}
+
+query orderLogisticsbyprops($updatedAt: String, $logisticsFee: Float, $expressId: String, $createdAt: String, $order_id: ID, $consigneeTel: String, $consignAddress: String, $LogisticsStatus: String, $user_id: ID, $consigneeName: String) {
+    orderLogisticsbyprops: orderLogistics_by_props(updatedAt: $updatedAt logisticsFee: $logisticsFee expressId: $expressId createdAt: $createdAt order_id: $order_id consigneeTel: $consigneeTel consignAddress: $consignAddress LogisticsStatus: $LogisticsStatus user_id: $user_id consigneeName: $consigneeName) {
+        updatedAt
+        logisticsFee
+        expressId
+        createdAt
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        consigneeTel
+        id
+        consignAddress
+        LogisticsStatus
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        consigneeName
+    }
+}
+
+query orderbyid($id: ID) {
+    orderbyid: order_by_id(id: $id) {
+        deliveryTime
+        updatedAt
+        orderLogistics_id {
+            updatedAt
+            logisticsFee
+            expressId
+            createdAt
+
+            consigneeTel
+            id
+            consignAddress
+            LogisticsStatus
+
+            consigneeName
+        }
+        payTime
+        orderTotalPay
+        createdAt
+        orderStatus
+        userAddress_id {
+            address
+            updatedAt
+            telephone
+            default
+            city
+            username
+            postcode
+            createdAt
+            deletedAt
+            id
+
+            area
+            province
+        }
+        id
+        orderShipFee
+        count
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        productTotalPay
+        orderPay_id {
+            id
+
+
+            totalPay
+            transactionId
+            payTime
+        }
+    }
+}
+
+query orderProductbyprops($remark: String, $updatedAt: String, $product_id: ID, $orderPay: Float, $createdAt: String, $order_id: ID, $count: Int, $productPay: Float, $user_id: ID) {
+    orderProductbyprops: orderProduct_by_props(remark: $remark updatedAt: $updatedAt product_id: $product_id orderPay: $orderPay createdAt: $createdAt order_id: $order_id count: $count productPay: $productPay user_id: $user_id) {
+        remark
+        updatedAt
+        unit
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        orderPay
+        createdAt
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        id
+        count
+        productPay
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+    }
+}
+
+query productbyid($id: ID) {
+    productbyid: product_by_id(id: $id) {
+        category
+        updatedAt
+        unit
+        name
+        createdAt
+        status
+        id
+        intro
+        price
+        img
+        stock
+    }
+}
+
+query userSearchbyid($id: ID) {
+    userSearchbyid: userSearch_by_id(id: $id) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        keyword
+        createdAt
+        updatedAt
+    }
+}
+
+query userDatabyprops($nickname: String, $avatar: String, $isVip: Boolean, $vipCode: String, $userPoint: Int, $createdAt: String, $updatedAt: String) {
+    userDatabyprops: userData_by_props(nickname: $nickname avatar: $avatar isVip: $isVip vipCode: $vipCode userPoint: $userPoint createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        nickname
+        avatar
+        isVip
+        vipCode
+        userPoint
+        createdAt
+        updatedAt
+    }
+}
+
+query userCartbyprops($user_id: ID, $product_id: ID, $count: Int, $createdAt: String, $updatedAt: String) {
+    userCartbyprops: userCart_by_props(user_id: $user_id product_id: $product_id count: $count createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        count
+        createdAt
+        updatedAt
+    }
+}
+
+query userbyprops($openid: String, $username: String, $password: String, $telephone: String, $email: String, $userData_id: ID, $createdAt: String, $updatedAt: String) {
+    userbyprops: user_by_props(openid: $openid username: $username password: $password telephone: $telephone email: $email userData_id: $userData_id createdAt: $createdAt updatedAt: $updatedAt) {
+        email
+        updatedAt
+        password
+        telephone
+        username
+        createdAt
+        openid
+        id
+        userData_id {
+            id
+            nickname
+            avatar
+            isVip
+            vipCode
+            userPoint
+            createdAt
+            updatedAt
+        }
+    }
+}
+
+query orderbyprops($deliveryTime: String, $updatedAt: String, $orderLogistics_id: ID, $payTime: String, $orderTotalPay: Float, $createdAt: String, $orderStatus: String, $userAddress_id: ID, $orderShipFee: Float, $count: Int, $user_id: ID, $productTotalPay: Float, $orderPay_id: ID) {
+    orderbyprops: order_by_props(deliveryTime: $deliveryTime updatedAt: $updatedAt orderLogistics_id: $orderLogistics_id payTime: $payTime orderTotalPay: $orderTotalPay createdAt: $createdAt orderStatus: $orderStatus userAddress_id: $userAddress_id orderShipFee: $orderShipFee count: $count user_id: $user_id productTotalPay: $productTotalPay orderPay_id: $orderPay_id) {
+        deliveryTime
+        updatedAt
+        orderLogistics_id {
+            updatedAt
+            logisticsFee
+            expressId
+            createdAt
+
+            consigneeTel
+            id
+            consignAddress
+            LogisticsStatus
+
+            consigneeName
+        }
+        payTime
+        orderTotalPay
+        createdAt
+        orderStatus
+        userAddress_id {
+            address
+            updatedAt
+            telephone
+            default
+            city
+            username
+            postcode
+            createdAt
+            deletedAt
+            id
+
+            area
+            province
+        }
+        id
+        orderShipFee
+        count
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        productTotalPay
+        orderPay_id {
+            id
+
+
+            totalPay
+            transactionId
+            payTime
+        }
+    }
+}
+
+mutation createorderPay($id: ID!, $user_id: ID, $order_id: ID, $totalPay: Float, $transactionId: String, $payTime: String) {
+    createorderPay: create_orderPay(id: $id user_id: $user_id order_id: $order_id totalPay: $totalPay transactionId: $transactionId payTime: $payTime) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        totalPay
+        transactionId
+        payTime
+    }
+}
+
+mutation createuser($email: String, $updatedAt: String, $password: String, $telephone: String, $username: String, $createdAt: String, $openid: String, $id: ID!, $userData_id: ID) {
+    createuser: create_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone username: $username createdAt: $createdAt openid: $openid id: $id userData_id: $userData_id) {
+        email
+        updatedAt
+        password
+        telephone
+        username
+        createdAt
+        openid
+        id
+        userData_id {
+            id
+            nickname
+            avatar
+            isVip
+            vipCode
+            userPoint
+            createdAt
+            updatedAt
+        }
+    }
+}
+
+mutation updateproduct($category: String, $updatedAt: String, $unit: Int, $name: String, $createdAt: String, $status: String, $id: ID, $intro: String, $price: Float, $img: String, $stock: Int) {
+    updateproduct: update_product(category: $category updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price img: $img stock: $stock) {
+        category
+        updatedAt
+        unit
+        name
+        createdAt
+        status
+        id
+        intro
+        price
+        img
+        stock
+    }
+}
+
+mutation updateuser($email: String, $updatedAt: String, $password: String, $telephone: String, $username: String, $createdAt: String, $openid: String, $id: ID, $userData_id: ID) {
+    updateuser: update_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone username: $username createdAt: $createdAt openid: $openid id: $id userData_id: $userData_id) {
+        email
+        updatedAt
+        password
+        telephone
+        username
+        createdAt
+        openid
+        id
+        userData_id {
+            id
+            nickname
+            avatar
+            isVip
+            vipCode
+            userPoint
+            createdAt
+            updatedAt
+        }
+    }
+}
+
+mutation updateuserData($id: ID, $nickname: String, $avatar: String, $isVip: Boolean, $vipCode: String, $userPoint: Int, $createdAt: String, $updatedAt: String) {
+    updateuserData: update_userData(id: $id nickname: $nickname avatar: $avatar isVip: $isVip vipCode: $vipCode userPoint: $userPoint createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        nickname
+        avatar
+        isVip
+        vipCode
+        userPoint
+        createdAt
+        updatedAt
+    }
+}
+
+mutation createuserCollect($id: ID!, $user_id: ID, $product_id: ID, $createdAt: String, $updatedAt: String) {
+    createuserCollect: create_userCollect(id: $id user_id: $user_id product_id: $product_id createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        createdAt
+        updatedAt
+    }
+}
+
+mutation createuserAddress($address: String, $updatedAt: String, $telephone: String, $default: Int, $city: String, $username: String, $postcode: String, $createdAt: String, $deletedAt: String, $id: ID!, $user_id: ID, $area: String, $province: String) {
+    createuserAddress: create_userAddress(address: $address updatedAt: $updatedAt telephone: $telephone
+        default: $default city: $city username: $username postcode: $postcode createdAt: $createdAt deletedAt: $deletedAt id: $id user_id: $user_id area: $area province: $province) {
+        address
+        updatedAt
+        telephone
+        default
+        city
+        username
+        postcode
+        createdAt
+        deletedAt
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        area
+        province
+    }
+}
+
+mutation deleteuserCart($id: ID, $user_id: ID, $product_id: ID, $count: Int, $createdAt: String, $updatedAt: String) {
+    deleteuserCart: delete_userCart(id: $id user_id: $user_id product_id: $product_id count: $count createdAt: $createdAt updatedAt: $updatedAt)
+}
+
+mutation updateuserAddress($address: String, $updatedAt: String, $telephone: String, $default: Int, $city: String, $username: String, $postcode: String, $createdAt: String, $deletedAt: String, $id: ID, $user_id: ID, $area: String, $province: String) {
+    updateuserAddress: update_userAddress(address: $address updatedAt: $updatedAt telephone: $telephone
+        default: $default city: $city username: $username postcode: $postcode createdAt: $createdAt deletedAt: $deletedAt id: $id user_id: $user_id area: $area province: $province) {
+        address
+        updatedAt
+        telephone
+        default
+        city
+        username
+        postcode
+        createdAt
+        deletedAt
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        area
+        province
+    }
+}
+
+mutation updateadmin($id: ID, $openid: String, $username: String, $password: String, $telephone: String, $email: String, $createdAt: String, $updatedAt: String) {
+    updateadmin: update_admin(id: $id openid: $openid username: $username password: $password telephone: $telephone email: $email createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        openid
+        username
+        password
+        telephone
+        email
+        createdAt
+        updatedAt
+    }
+}
+
+mutation createuserSearch($id: ID!, $user_id: ID, $keyword: Int, $createdAt: String, $updatedAt: String) {
+    createuserSearch: create_userSearch(id: $id user_id: $user_id keyword: $keyword createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        keyword
+        createdAt
+        updatedAt
+    }
+}
+
+mutation createproduct($category: String, $updatedAt: String, $unit: Int, $name: String, $createdAt: String, $status: String, $id: ID!, $intro: String, $price: Float, $img: String, $stock: Int) {
+    createproduct: create_product(category: $category updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price img: $img stock: $stock) {
+        category
+        updatedAt
+        unit
+        name
+        createdAt
+        status
+        id
+        intro
+        price
+        img
+        stock
+    }
+}
+
+mutation deleteuserData($id: ID, $nickname: String, $avatar: String, $isVip: Boolean, $vipCode: String, $userPoint: Int, $createdAt: String, $updatedAt: String) {
+    deleteuserData: delete_userData(id: $id nickname: $nickname avatar: $avatar isVip: $isVip vipCode: $vipCode userPoint: $userPoint createdAt: $createdAt updatedAt: $updatedAt)
+}
+
+mutation deleteorderProduct($remark: String, $updatedAt: String, $product_id: ID, $orderPay: Float, $createdAt: String, $order_id: ID, $id: ID, $count: Int, $productPay: Float, $user_id: ID) {
+    deleteorderProduct: delete_orderProduct(remark: $remark updatedAt: $updatedAt product_id: $product_id orderPay: $orderPay createdAt: $createdAt order_id: $order_id id: $id count: $count productPay: $productPay user_id: $user_id)
+}
+
+mutation deleteuserCollect($id: ID, $user_id: ID, $product_id: ID, $createdAt: String, $updatedAt: String) {
+    deleteuserCollect: delete_userCollect(id: $id user_id: $user_id product_id: $product_id createdAt: $createdAt updatedAt: $updatedAt)
+}
+
+mutation updateuserCollect($id: ID, $user_id: ID, $product_id: ID, $createdAt: String, $updatedAt: String) {
+    updateuserCollect: update_userCollect(id: $id user_id: $user_id product_id: $product_id createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        createdAt
+        updatedAt
+    }
+}
+
+mutation deleteorder($deliveryTime: String, $updatedAt: String, $orderLogistics_id: ID, $payTime: String, $orderTotalPay: Float, $createdAt: String, $orderStatus: String, $userAddress_id: ID, $id: ID, $orderShipFee: Float, $count: Int, $user_id: ID, $productTotalPay: Float, $orderPay_id: ID) {
+    deleteorder: delete_order(deliveryTime: $deliveryTime updatedAt: $updatedAt orderLogistics_id: $orderLogistics_id payTime: $payTime orderTotalPay: $orderTotalPay createdAt: $createdAt orderStatus: $orderStatus userAddress_id: $userAddress_id id: $id orderShipFee: $orderShipFee count: $count user_id: $user_id productTotalPay: $productTotalPay orderPay_id: $orderPay_id)
+}
+
+mutation deleteadmin($id: ID, $openid: String, $username: String, $password: String, $telephone: String, $email: String, $createdAt: String, $updatedAt: String) {
+    deleteadmin: delete_admin(id: $id openid: $openid username: $username password: $password telephone: $telephone email: $email createdAt: $createdAt updatedAt: $updatedAt)
+}
+
+mutation deleteuserAddress($address: String, $updatedAt: String, $telephone: String, $default: Int, $city: String, $username: String, $postcode: String, $createdAt: String, $deletedAt: String, $id: ID, $user_id: ID, $area: String, $province: String) {
+    deleteuserAddress: delete_userAddress(address: $address updatedAt: $updatedAt telephone: $telephone
+        default: $default city: $city username: $username postcode: $postcode createdAt: $createdAt deletedAt: $deletedAt id: $id user_id: $user_id area: $area province: $province)
+}
+
+mutation updateuserCart($id: ID, $user_id: ID, $product_id: ID, $count: Int, $createdAt: String, $updatedAt: String) {
+    updateuserCart: update_userCart(id: $id user_id: $user_id product_id: $product_id count: $count createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        count
+        createdAt
+        updatedAt
+    }
+}
+
+mutation deleteuser($email: String, $updatedAt: String, $password: String, $telephone: String, $username: String, $createdAt: String, $openid: String, $id: ID, $userData_id: ID) {
+    deleteuser: delete_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone username: $username createdAt: $createdAt openid: $openid id: $id userData_id: $userData_id)
+}
+
+mutation createuserCart($id: ID!, $user_id: ID, $product_id: ID, $count: Int, $createdAt: String, $updatedAt: String) {
+    createuserCart: create_userCart(id: $id user_id: $user_id product_id: $product_id count: $count createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        count
+        createdAt
+        updatedAt
+    }
+}
+
+mutation createuserData($id: ID!, $nickname: String, $avatar: String, $isVip: Boolean, $vipCode: String, $userPoint: Int, $createdAt: String, $updatedAt: String) {
+    createuserData: create_userData(id: $id nickname: $nickname avatar: $avatar isVip: $isVip vipCode: $vipCode userPoint: $userPoint createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        nickname
+        avatar
+        isVip
+        vipCode
+        userPoint
+        createdAt
+        updatedAt
+    }
+}
+
+mutation createorder($deliveryTime: String, $updatedAt: String, $orderLogistics_id: ID, $payTime: String, $orderTotalPay: Float, $createdAt: String, $orderStatus: String, $userAddress_id: ID, $id: ID!, $orderShipFee: Float, $count: Int, $user_id: ID, $productTotalPay: Float, $orderPay_id: ID) {
+    createorder: create_order(deliveryTime: $deliveryTime updatedAt: $updatedAt orderLogistics_id: $orderLogistics_id payTime: $payTime orderTotalPay: $orderTotalPay createdAt: $createdAt orderStatus: $orderStatus userAddress_id: $userAddress_id id: $id orderShipFee: $orderShipFee count: $count user_id: $user_id productTotalPay: $productTotalPay orderPay_id: $orderPay_id) {
+        deliveryTime
+        updatedAt
+        orderLogistics_id {
+            updatedAt
+            logisticsFee
+            expressId
+            createdAt
+
+            consigneeTel
+            id
+            consignAddress
+            LogisticsStatus
+
+            consigneeName
+        }
+        payTime
+        orderTotalPay
+        createdAt
+        orderStatus
+        userAddress_id {
+            address
+            updatedAt
+            telephone
+            default
+            city
+            username
+            postcode
+            createdAt
+            deletedAt
+            id
+
+            area
+            province
+        }
+        id
+        orderShipFee
+        count
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        productTotalPay
+        orderPay_id {
+            id
+
+
+            totalPay
+            transactionId
+            payTime
+        }
+    }
+}
+
+mutation deleteuserSearch($id: ID, $user_id: ID, $keyword: Int, $createdAt: String, $updatedAt: String) {
+    deleteuserSearch: delete_userSearch(id: $id user_id: $user_id keyword: $keyword createdAt: $createdAt updatedAt: $updatedAt)
+}
+
+mutation deleteorderPay($id: ID, $user_id: ID, $order_id: ID, $totalPay: Float, $transactionId: String, $payTime: String) {
+    deleteorderPay: delete_orderPay(id: $id user_id: $user_id order_id: $order_id totalPay: $totalPay transactionId: $transactionId payTime: $payTime)
+}
+
+mutation updateorderPay($id: ID, $user_id: ID, $order_id: ID, $totalPay: Float, $transactionId: String, $payTime: String) {
+    updateorderPay: update_orderPay(id: $id user_id: $user_id order_id: $order_id totalPay: $totalPay transactionId: $transactionId payTime: $payTime) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        totalPay
+        transactionId
+        payTime
+    }
+}
+
+mutation deleteorderLogistics($updatedAt: String, $logisticsFee: Float, $expressId: String, $createdAt: String, $order_id: ID, $consigneeTel: String, $id: ID, $consignAddress: String, $LogisticsStatus: String, $user_id: ID, $consigneeName: String) {
+    deleteorderLogistics: delete_orderLogistics(updatedAt: $updatedAt logisticsFee: $logisticsFee expressId: $expressId createdAt: $createdAt order_id: $order_id consigneeTel: $consigneeTel id: $id consignAddress: $consignAddress LogisticsStatus: $LogisticsStatus user_id: $user_id consigneeName: $consigneeName)
+}
+
+mutation updateuserSearch($id: ID, $user_id: ID, $keyword: Int, $createdAt: String, $updatedAt: String) {
+    updateuserSearch: update_userSearch(id: $id user_id: $user_id keyword: $keyword createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        keyword
+        createdAt
+        updatedAt
+    }
+}
+
+mutation updateorder($deliveryTime: String, $updatedAt: String, $orderLogistics_id: ID, $payTime: String, $orderTotalPay: Float, $createdAt: String, $orderStatus: String, $userAddress_id: ID, $id: ID, $orderShipFee: Float, $count: Int, $user_id: ID, $productTotalPay: Float, $orderPay_id: ID) {
+    updateorder: update_order(deliveryTime: $deliveryTime updatedAt: $updatedAt orderLogistics_id: $orderLogistics_id payTime: $payTime orderTotalPay: $orderTotalPay createdAt: $createdAt orderStatus: $orderStatus userAddress_id: $userAddress_id id: $id orderShipFee: $orderShipFee count: $count user_id: $user_id productTotalPay: $productTotalPay orderPay_id: $orderPay_id) {
+        deliveryTime
+        updatedAt
+        orderLogistics_id {
+            updatedAt
+            logisticsFee
+            expressId
+            createdAt
+
+            consigneeTel
+            id
+            consignAddress
+            LogisticsStatus
+
+            consigneeName
+        }
+        payTime
+        orderTotalPay
+        createdAt
+        orderStatus
+        userAddress_id {
+            address
+            updatedAt
+            telephone
+            default
+            city
+            username
+            postcode
+            createdAt
+            deletedAt
+            id
+
+            area
+            province
+        }
+        id
+        orderShipFee
+        count
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        productTotalPay
+        orderPay_id {
+            id
+
+
+            totalPay
+            transactionId
+            payTime
+        }
+    }
+}
+
+mutation createorderLogistics($updatedAt: String, $logisticsFee: Float, $expressId: String, $createdAt: String, $order_id: ID, $consigneeTel: String, $id: ID!, $consignAddress: String, $LogisticsStatus: String, $user_id: ID, $consigneeName: String) {
+    createorderLogistics: create_orderLogistics(updatedAt: $updatedAt logisticsFee: $logisticsFee expressId: $expressId createdAt: $createdAt order_id: $order_id consigneeTel: $consigneeTel id: $id consignAddress: $consignAddress LogisticsStatus: $LogisticsStatus user_id: $user_id consigneeName: $consigneeName) {
+        updatedAt
+        logisticsFee
+        expressId
+        createdAt
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        consigneeTel
+        id
+        consignAddress
+        LogisticsStatus
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        consigneeName
+    }
+}
+
+mutation updateorderLogistics($updatedAt: String, $logisticsFee: Float, $expressId: String, $createdAt: String, $order_id: ID, $consigneeTel: String, $id: ID, $consignAddress: String, $LogisticsStatus: String, $user_id: ID, $consigneeName: String) {
+    updateorderLogistics: update_orderLogistics(updatedAt: $updatedAt logisticsFee: $logisticsFee expressId: $expressId createdAt: $createdAt order_id: $order_id consigneeTel: $consigneeTel id: $id consignAddress: $consignAddress LogisticsStatus: $LogisticsStatus user_id: $user_id consigneeName: $consigneeName) {
+        updatedAt
+        logisticsFee
+        expressId
+        createdAt
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        consigneeTel
+        id
+        consignAddress
+        LogisticsStatus
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+        consigneeName
+    }
+}
+
+mutation createorderProduct($remark: String, $updatedAt: String, $unit: Int, $product_id: ID, $orderPay: Float, $createdAt: String, $order_id: ID, $id: ID!, $count: Int, $productPay: Float, $user_id: ID) {
+    createorderProduct: create_orderProduct(remark: $remark updatedAt: $updatedAt unit: $unit product_id: $product_id orderPay: $orderPay createdAt: $createdAt order_id: $order_id id: $id count: $count productPay: $productPay user_id: $user_id) {
+        remark
+        updatedAt
+        unit
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        orderPay
+        createdAt
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        id
+        count
+        productPay
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+    }
+}
+
+mutation deleteproduct($category: String, $updatedAt: String, $name: String, $createdAt: String, $status: String, $id: ID, $intro: String, $price: Float, $img: String, $stock: Int) {
+    deleteproduct: delete_product(category: $category updatedAt: $updatedAt name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price img: $img stock: $stock)
+}
+
+mutation updateorderProduct($remark: String, $updatedAt: String, $unit: Int, $product_id: ID, $orderPay: Float, $createdAt: String, $order_id: ID, $id: ID, $count: Int, $productPay: Float, $user_id: ID) {
+    updateorderProduct: update_orderProduct(remark: $remark updatedAt: $updatedAt unit: $unit product_id: $product_id orderPay: $orderPay createdAt: $createdAt order_id: $order_id id: $id count: $count productPay: $productPay user_id: $user_id) {
+        remark
+        updatedAt
+        unit
+        product_id {
+            category
+            updatedAt
+            unit
+            name
+            createdAt
+            status
+            id
+            intro
+            price
+            img
+            stock
+        }
+        orderPay
+        createdAt
+        order_id {
+            deliveryTime
+            updatedAt
+
+            payTime
+            orderTotalPay
+            createdAt
+            orderStatus
+
+            id
+            orderShipFee
+            count
+
+            productTotalPay
+        }
+        id
+        count
+        productPay
+        user_id {
+            email
+            updatedAt
+            password
+            telephone
+            username
+            createdAt
+            openid
+            id
+        }
+    }
+}
+
+mutation createadmin($id: ID!, $openid: String, $username: String, $password: String, $telephone: String, $email: String, $createdAt: String, $updatedAt: String) {
+    createadmin: create_admin(id: $id openid: $openid username: $username password: $password telephone: $telephone email: $email createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        openid
+        username
+        password
+        telephone
+        email
+        createdAt
+        updatedAt
+    }
+}

+ 14 - 14
src/case/ShopApp/src/api/graphql/product.js

@@ -13,18 +13,18 @@ export const getProductByProps=`query productbyprops($category: String, $updated
         stock
     }
 }`
-export const getProductById=`query getProductById($id:ID){
-    product_by_id(id:$id){
-      category
-      createdAt
-      id
-      img
-      intro
-      name
-      price
-      status
-      stock
-      unit
-      updatedAt
+export const getProductById=`query productbyid($id: ID) {
+    productbyid: product_by_id(id: $id) {
+        category
+        updatedAt
+        unit
+        name
+        createdAt
+        status
+        id
+        intro
+        price
+        img
+        stock
     }
-  }`
+}`

+ 1 - 1
src/case/ShopApp/src/api/graphql_request.js

@@ -7,7 +7,7 @@ export const graphqls=(schema,variables)=>{
     //console.log(URL.HTTP_DATA_URL)
     const http_request=URL.HTTP_DATA_URL
       
-    return request(http_request, schema,variables).then(data =>data)
+    return request(http_request, schema,variables).then(data =>data).catch(data=>data)
     
 }
 

+ 1 - 2
src/case/ShopApp/src/components/HomePage/Cards.jsx

@@ -12,7 +12,7 @@ import {PageContext} from '../../context/context'
 
 class Cards extends Component{
     constructor(props){
-        //console.log('111',props)
+        console.log('111',props)
         super(props)
         this.state={
             product_id:''
@@ -21,7 +21,6 @@ class Cards extends Component{
     
     render(){
         //console.log('cardProps',this.props.products)
-        
         const Cardss=this.props.products.map((item,index)=>{
             //console.log(item)
             return (

+ 3 - 2
src/case/ShopApp/src/components/HomePage/HomePage.jsx

@@ -28,8 +28,9 @@ class HomePage extends Component{
     //获取所有商品
     getGoods(variables={}){
         return graphqls(getProductByProps,variables).then((data)=>{
-        //console.log("data",data.productbyprops)
-        let products=data.productbyprops
+        console.log("data",data)
+        let products=data.productbyprops||[]
+    
         let arr=products.map((item)=>{
           return item.category
         })

+ 2 - 0
src/case/ShopApp/src/components/OrderPage/Address.jsx

@@ -0,0 +1,2 @@
+import React, { Component } from 'react';
+

+ 39 - 1
src/case/ShopApp/src/components/OrderPage/OrederPage.jsx

@@ -1,7 +1,45 @@
 import React from 'react'
-import Context from '../../context/context'
+import {PageContext} from '../../context/context'
+
+import {graphqls} from '../../api/graphql_request'
+import {getProductById} from '../../api/graphql/product'
+import {getAddressByProps} from '../../api/graphql/address'
 
 class OrderPage extends React.Component{
+
+    constructor(props){
+        super(props)
+        this.state={
+            address:{},
+            product:{}
+        }
+    }
+
+    getProduct(){
+        graphqls(getProductById,{id:this.props.product_id}).then((e)=>{
+            console.log('productId',e.product_by_id)
+            this.setState({
+                product:e.product_by_id
+            })
+        })
+    }
+    getAddress(){
+        let user_id=sessionStorage.getItem('openid')
+        console.log('user_id',user_id)
+        
+        graphqls(getAddressByProps,{user_id}).then((e)=>{
+            console.log('getAddressByProps',e)
+            this.setState({
+                address:e
+            })
+        })
+    }
+
+    componentWillMount(){
+        this.getProduct()
+        this.getAddress()
+    }
+    
     render(){
         console.log('props',this.props)
         return(<div>orderpage</div>)

+ 12 - 15
src/case/ShopApp/src/components/ProductDetailPage/ActionSheet.jsx

@@ -12,31 +12,28 @@ class ActionSheets extends React.Component {
   constructor() {
     super();
     this.state = {
-      val:1
+      num:1
     };
   }
+  
  
   add(){
-      let val=this.state.val
-      if(val===100000){
+      let num=this.state.num+1
+      if(num===100000){
 
       }else{
-        this.setState({
-            val:this.state.val+1
-        })
-      }
-      
+        this.setState({ num })
+      }   
+      this.props.setNum(num)
   }
-
   minius(){
-    let val=this.state.val
-    if(val===0){
+    let num=this.state.num-1
+    if(num===0){
 
     }else{
-      this.setState({
-          val:this.state.val-1
-      })
+      this.setState({num})
     }
+    this.props.setNum(num)
   }
 
   render() {
@@ -47,7 +44,7 @@ class ActionSheets extends React.Component {
                 <div className="row">价格:{this.props.product.price}</div>
                 <div className="row">库存:{this.props.product.stock}</div>
                 <div className="numWrap row">
-                    购买数量:<span onClick={this.add.bind(this)}>+</span><span>{this.state.val}</span><span onClick={this.minius.bind(this)}>-</span>
+                    购买数量:<span onClick={this.add.bind(this)}>+</span><span>{this.state.num}</span><span onClick={this.minius.bind(this)}>-</span>
                 </div>
                 <PageContext.Consumer>
                     {(changePage)=>{

+ 4 - 3
src/case/ShopApp/src/components/ProductDetailPage/ProductDetail.jsx

@@ -7,6 +7,7 @@ import {graphqls} from '../../api/graphql_request'
 import {getProductById} from '../../api/graphql/product'
 
 export default class ProductDetail extends Component{
+
     constructor(props){
         super(props)
         this.state={
@@ -16,9 +17,9 @@ export default class ProductDetail extends Component{
 
     getProduct(){
         graphqls(getProductById,{id:this.props.product_id}).then((e)=>{
-            console.log('productId',e.product_by_id)
+            console.log('productId',e.productbyid)
             this.setState({
-                product:e.product_by_id
+                product:e.productbyid
             })
         })
     }
@@ -32,7 +33,7 @@ export default class ProductDetail extends Component{
         return(
             <div>
                <Card product={this.state.product}/>
-               <UserAction product={this.state.product}/>
+               <UserAction product={this.state.product} setNum={this.props.setNum}/>
             </div>
         )
     }

+ 1 - 1
src/case/ShopApp/src/components/ProductDetailPage/UserAction.jsx

@@ -23,7 +23,7 @@ class UserAction extends Component{
     renderPage(){
         let actionSheet=this.state.actionSheet
         if(actionSheet){
-            return(<div><ActionSheets triggerActionSheet={this.triggerActionSheet} product={this.props.product} /></div>)
+            return(<div><ActionSheets triggerActionSheet={this.triggerActionSheet} product={this.props.product} setNum={this.props.setNum}/></div>)
         }else{
             return(
                 <div className="actionWrap">

+ 1 - 0
src/case/ShopApp/src/context/context.js

@@ -1,4 +1,5 @@
 import React from 'react'
 
 export const PageContext=React.createContext()
+export const NumContext=React.createContext()