Browse Source

完善orderPage,add order orderProduct function

wly 7 years ago
parent
commit
12d017c796
31 changed files with 275 additions and 99 deletions
  1. 1 0
      .gitignore
  2. 11 11
      src/app/App.jsx
  3. 1 1
      src/app/common/deploy/Deploy.jsx
  4. 0 0
      src/app/common/deploy/ali/AliConfig.jsx
  5. 0 0
      src/app/common/deploy/amazon/AmazonConfig.js
  6. 0 0
      src/app/common/deploy/huawei/HuaweiConfig.jsx
  7. 0 0
      src/app/common/deploy/index.css
  8. 2 2
      src/app/common/deploy/tencent/APIGroupCard.js
  9. 2 2
      src/app/common/deploy/tencent/APIPathCard.js
  10. 2 2
      src/app/common/deploy/tencent/DeployCard.js
  11. 0 0
      src/app/common/deploy/tencent/NotificationCard.js
  12. 1 1
      src/app/common/deploy/tencent/TencentConfig.js
  13. 5 5
      src/app/graphqlService/TrialCase.jsx
  14. 4 4
      src/app/graphqlService/UserCreate.jsx
  15. 0 0
      src/app/graphqlService/component/application/Application.js
  16. 0 0
      src/app/graphqlService/component/caseMetabase/CaseMetabase.jsx
  17. 0 0
      src/app/graphqlService/component/generateJs/GenerateJs.jsx
  18. 0 0
      src/app/graphqlService/component/generateJs/index.css
  19. 0 0
      src/app/graphqlService/component/graphql/Graphql.jsx
  20. 0 0
      src/app/graphqlService/component/graphql/index.css
  21. 0 0
      src/app/graphqlService/component/schema/Create.js
  22. 0 0
      src/app/graphqlService/component/schema/Schema.jsx
  23. 0 0
      src/app/graphqlService/component/schema/Table.js
  24. 0 0
      src/app/graphqlService/component/schema/index.css
  25. 1 1
      src/app/quantService/QuantService.jsx
  26. 7 7
      src/app/wechatService/WxTrialCase.js
  27. 5 6
      src/app/wechatService/WxUserCreate.js
  28. 188 41
      src/app/wechatService/wxConfig/WxConfig.jsx
  29. 1 1
      src/app/wechatService/wxCreate/WxCreate.js
  30. 0 14
      src/app/wechatService/wxDeploy/WxDeploy.js
  31. 44 1
      src/gql.js

+ 1 - 0
.gitignore

@@ -1,5 +1,6 @@
 # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
 .idea
+package-lock.json
 
 # dependencies
 /node_modules

+ 11 - 11
src/app/App.jsx

@@ -10,14 +10,14 @@ import {FormattedMessage} from 'react-intl';
 import zhCN from 'antd/lib/locale-provider/zh_CN';
 
 import QuantService from "./quantService/QuantService";
-import TrialCase from "./graphqlService/trialCase/TrialCase";
-import UserCreate from "./graphqlService/userCreate/UserCreate";
-import WXTrialCase from "./wechatService/wxTrialCase/WXTrialCase";
-import WXUserCreate from "./wechatService/wxUserCreate/WXUserCreate";
+import TrialCase from "./graphqlService/TrialCase";
+import UserCreate from "./graphqlService/UserCreate";
+import WxTrialCase from "./wechatService/WxTrialCase";
+import WxUserCreate from "./wechatService/WxUserCreate";
 import Login from "../login/Login";
-import './graphqlService/common/graphql/index.css';
+import './graphqlService/component/graphql/index.css';
 import './index.css'
-import Create from "./graphqlService/common/schema/Create";
+import Create from "./graphqlService/component/schema/Create";
 import WxCreate from "./wechatService/wxCreate/WxCreate";
 
 
@@ -317,8 +317,8 @@ class App extends Component {
                                 <Route path="/" exact component={TrialCase}/>
                                 <Route path="/graphql-service/trial-case/:case" component={TrialCase}/>
                                 <Route path="/graphql-service/my-create/:case" component={UserCreate}/>
-                                <Route path="/wechat-service/trial-case/:case" component={WXTrialCase}/>
-                                <Route path="/wechat-service/my-create/:case" component={WXUserCreate}/>
+                                <Route path="/wechat-service/trial-case/:case" component={WxTrialCase}/>
+                                <Route path="/wechat-service/my-create/:case" component={WxUserCreate}/>
                                 <Route path="/quant-service/:sidebar/:case" component={QuantService}/>
                                 <Route path="/login/:setting" component={Login}/>
                                 <Route path="/login" component={Login}/>
@@ -470,9 +470,9 @@ class WxConfigSiderbar extends Component {
                                         data.caseWxConfig.map((config) =>
                                             <Menu.Item key={config.appName}>
                                                 <Link to={{
-                                                    pathname: `/graphql-service/trial-case/${config.appName}`,
+                                                    pathname: `/wechat-service/trial-case/${config.appName}`,
                                                     state: {
-                                                        configName: config.appName,
+                                                        appName: config.appName,
                                                         configID: config.id
                                                     }
                                                 }}>{config.appName}</Link>
@@ -498,7 +498,7 @@ class WxConfigSiderbar extends Component {
                                                 <Link to={{
                                                     pathname: `/wechat-service/my-create/${config.appName}`,
                                                     state: {
-                                                        configName: config.appName,
+                                                        appName: config.appName,
                                                         configID: config.id
                                                     }
                                                 }}>{config.appName}</Link>

+ 1 - 1
src/app/graphqlService/common/deploy/Deploy.jsx → src/app/common/deploy/Deploy.jsx

@@ -6,7 +6,7 @@ import AliConfig from './ali/AliConfig';
 import AmazonConfig from './amazon/AmazonConfig';
 
 import './index.css';
-import {SHOW_FC, SEARCH_SCHEMA, SHOW_CLOUD} from "../../../../gql";
+import {SHOW_FC, SEARCH_SCHEMA, SHOW_CLOUD} from "../../../gql";
 import {request} from 'graphql-request'
 
 const tabListNoTitle = [{

+ 0 - 0
src/app/graphqlService/common/deploy/ali/AliConfig.jsx → src/app/common/deploy/ali/AliConfig.jsx


+ 0 - 0
src/app/graphqlService/common/deploy/amazon/AmazonConfig.js → src/app/common/deploy/amazon/AmazonConfig.js


+ 0 - 0
src/app/graphqlService/common/deploy/huawei/HuaweiConfig.jsx → src/app/common/deploy/huawei/HuaweiConfig.jsx


+ 0 - 0
src/app/graphqlService/common/deploy/index.css → src/app/common/deploy/index.css


+ 2 - 2
src/app/graphqlService/common/deploy/tencent/APIGroupCard.js → src/app/common/deploy/tencent/APIGroupCard.js

@@ -1,8 +1,8 @@
 import React, {Component} from 'react';
 import {Input, Collapse, Button, Radio, Icon} from 'antd';
-import {ADD_APIGROUP, UPDATE_APIGROUP} from "../../../../../gql";
+import {ADD_APIGROUP, UPDATE_APIGROUP} from "../../../../gql";
 import {request} from 'graphql-request'
-import {idGen} from "../../../../../func";
+import {idGen} from "../../../../func";
 
 const Panel = Collapse.Panel;
 

+ 2 - 2
src/app/graphqlService/common/deploy/tencent/APIPathCard.js → src/app/common/deploy/tencent/APIPathCard.js

@@ -1,8 +1,8 @@
 import React, {Component} from 'react';
 import {Input, Radio, Collapse, Button, Icon} from 'antd';
 import {request} from 'graphql-request'
-import {ADD_APIGWPATH, UPDATE_APIGWPATH} from "../../../../../gql";
-import {idGen} from "../../../../../func";
+import {ADD_APIGWPATH, UPDATE_APIGWPATH} from "../../../../gql";
+import {idGen} from "../../../../func";
 
 const Panel = Collapse.Panel;
 

+ 2 - 2
src/app/graphqlService/common/deploy/tencent/DeployCard.js → src/app/common/deploy/tencent/DeployCard.js

@@ -1,8 +1,8 @@
 import React, {Component} from 'react';
 import {Input, Radio, Collapse, Button, Icon} from 'antd';
-import {ADD_DEPLOY, UPDATE_DEPLOY} from "../../../../../gql";
+import {ADD_DEPLOY, UPDATE_DEPLOY} from "../../../../gql";
 import {request} from 'graphql-request'
-import {idGen} from "../../../../../func";
+import {idGen} from "../../../../func";
 
 const Panel = Collapse.Panel;
 

+ 0 - 0
src/app/graphqlService/common/deploy/tencent/NotificationCard.js → src/app/common/deploy/tencent/NotificationCard.js


+ 1 - 1
src/app/graphqlService/common/deploy/tencent/TencentConfig.js → src/app/common/deploy/tencent/TencentConfig.js

@@ -5,7 +5,7 @@ import APIPathCard from './APIPathCard';
 import DeployCard from './DeployCard';
 import NotificationCard from './NotificationCard';
 
-import {SHOW_DEPLOY, SHOW_APIGWGROUP, SHOW_APIGWPATH} from "../../../../../gql";
+import {SHOW_DEPLOY, SHOW_APIGWGROUP, SHOW_APIGWPATH} from "../../../../gql";
 import {request} from 'graphql-request'
 
 class TencentConfig extends Component {

+ 5 - 5
src/app/graphqlService/trialCase/TrialCase.jsx → src/app/graphqlService/TrialCase.jsx

@@ -1,12 +1,12 @@
 import React, {Component} from 'react';
 import {Layout, Menu} from 'antd';
 
-import GenerateJs from "../common/generateJs/GenerateJs";
+import GenerateJs from "./component/generateJs/GenerateJs";
 import Deploy from '../common/deploy/Deploy';
-import Schema from '../common/schema/Schema';
-import Graphql from "../common/graphql/Graphql";
-import CaseMetabase from "../common/caseMetabase/CaseMetabase";
-import Application from "../common/application/Application";
+import Schema from './component/schema/Schema';
+import Graphql from "./component/graphql/Graphql";
+import CaseMetabase from "./component/caseMetabase/CaseMetabase";
+import Application from "./component/application/Application";
 import axios from 'axios';
 
 axios.defaults.withCredentials = true;

+ 4 - 4
src/app/graphqlService/userCreate/UserCreate.jsx → src/app/graphqlService/UserCreate.jsx

@@ -1,11 +1,11 @@
 import React, {Component} from 'react';
 import {Layout, Menu} from 'antd';
 
-import GenerateJs from "../common/generateJs/GenerateJs";
+import GenerateJs from "./component/generateJs/GenerateJs";
 import Deploy from '../common/deploy/Deploy';
-import Schema from '../common/schema/Schema';
-import Graphql from "../common/graphql/Graphql";
-import CaseMetabase from "../common/caseMetabase/CaseMetabase";
+import Schema from './component/schema/Schema';
+import Graphql from "./component/graphql/Graphql";
+import CaseMetabase from "./component/caseMetabase/CaseMetabase";
 import axios from 'axios';
 
 axios.defaults.withCredentials = true;

+ 0 - 0
src/app/graphqlService/common/application/Application.js → src/app/graphqlService/component/application/Application.js


+ 0 - 0
src/app/graphqlService/common/caseMetabase/CaseMetabase.jsx → src/app/graphqlService/component/caseMetabase/CaseMetabase.jsx


+ 0 - 0
src/app/graphqlService/common/generateJs/GenerateJs.jsx → src/app/graphqlService/component/generateJs/GenerateJs.jsx


+ 0 - 0
src/app/graphqlService/common/generateJs/index.css → src/app/graphqlService/component/generateJs/index.css


+ 0 - 0
src/app/graphqlService/common/graphql/Graphql.jsx → src/app/graphqlService/component/graphql/Graphql.jsx


+ 0 - 0
src/app/graphqlService/common/graphql/index.css → src/app/graphqlService/component/graphql/index.css


+ 0 - 0
src/app/graphqlService/common/schema/Create.js → src/app/graphqlService/component/schema/Create.js


+ 0 - 0
src/app/graphqlService/common/schema/Schema.jsx → src/app/graphqlService/component/schema/Schema.jsx


+ 0 - 0
src/app/graphqlService/common/schema/Table.js → src/app/graphqlService/component/schema/Table.js


+ 0 - 0
src/app/graphqlService/common/schema/index.css → src/app/graphqlService/component/schema/index.css


+ 1 - 1
src/app/quantService/QuantService.jsx

@@ -3,7 +3,7 @@ import React, {Component} from 'react';
 import {Layout, Menu} from 'antd';
 
 import QuantConfig from "./quantConfig/QuantConfig";
-import Deploy from "../graphqlService/common/deploy/Deploy";
+import Deploy from "../common/deploy/Deploy";
 import QuantResult from "./quantResult/QuantResult";
 
 const { Content } = Layout;

+ 7 - 7
src/app/wechatService/wxUserCreate/WXUserCreate.js → src/app/wechatService/WxTrialCase.js

@@ -2,14 +2,14 @@ import React, {Component} from 'react';
 
 import {Layout, Menu} from 'antd';
 
-import WxConfig from "../wxConfig/WxConfig";
-import WxDeploy from "../wxDeploy/WxDeploy";
-import WxResult from '../wxResult/WxResult';
-import Schema from "../../graphqlService/common/schema/Schema";
+import WxConfig from "./wxConfig/WxConfig";
+import WxDeploy from "../common/deploy/Deploy";
+import WxResult from './wxResult/WxResult';
+import Schema from "../graphqlService/component/schema/Schema";
 
 const {Content} = Layout;
 
-class WXUserCreate extends Component {
+class WxTrialCase extends Component {
     constructor() {
         super();
         this.state = {
@@ -50,7 +50,7 @@ class WXUserCreate extends Component {
                         {(() => {
                             switch (this.state.menuLevel3) {
                                 case 'wechat-config':
-                                    return <WxConfig history={this.props.history} location={this.props.location}/>;
+                                    return <WxConfig defaultAppName={'ec... whatever'} defaultConfigID={'wxConfig_1543997888848_62199988'} trialcase={true} history={this.props.history} location={this.props.location}/>;
                                 case 'wechat-deploy':
                                     return <WxDeploy/>;
                                 case 'wechat-result':
@@ -66,4 +66,4 @@ class WXUserCreate extends Component {
     }
 }
 
-export default WXUserCreate;
+export default WxTrialCase;

+ 5 - 6
src/app/wechatService/wxTrialCase/WXTrialCase.js → src/app/wechatService/WxUserCreate.js

@@ -2,14 +2,13 @@ import React, {Component} from 'react';
 
 import {Layout, Menu} from 'antd';
 
-import WxConfig from "../wxConfig/WxConfig";
-import WxDeploy from "../wxDeploy/WxDeploy";
-import WxResult from '../wxResult/WxResult';
-import Schema from "../../graphqlService/common/schema/Schema";
+import WxConfig from "./wxConfig/WxConfig";
+import WxDeploy from "../common/deploy/Deploy";
+import WxResult from './wxResult/WxResult';
 
 const {Content} = Layout;
 
-class WXTrialCase extends Component {
+class WxUserCreate extends Component {
     constructor() {
         super();
         this.state = {
@@ -66,4 +65,4 @@ class WXTrialCase extends Component {
     }
 }
 
-export default WXTrialCase;
+export default WxUserCreate;

+ 188 - 41
src/app/wechatService/wxConfig/WxConfig.jsx

@@ -1,45 +1,27 @@
 import React, {Component} from 'react';
-import {Input, Spin, Button, Icon} from 'antd';
+import {Input, Spin, Button, Icon, Modal} from 'antd';
 import './index.css';
-import {idGen} from "../../../func";
-import {SHOW_WXCONTENT} from "../../../gql";
+import {UPDATE_WXCONFIG, SHOW_WXCONTENT, DELETE_WXCONFIG, SHOW_WXCONFIG} from "../../../gql";
 import gql from "graphql-tag";
 import {Mutation, Query} from "react-apollo";
+import {getCookie} from "../../../cookie";
 
-class WxConfig extends Component {
+const confirm = Modal.confirm;
 
+class WxConfig extends Component {
     constructor(props) {
         super(props);
         this.state = {
-            configs: ['AppName', 'AppID', 'AppSecret', 'URL', 'Token', 'welcome_words', 'pay_api_key', 'attach', 'mch_id', 'body', 'spbill_create_ip', 'notify_url'],
-            mch_id: '',
-            notify_url: '',
-            appSecret: '',
-            appID: '',
-            token: '',
-            spbill_create_ip: '',
-            enter_url: '',
-            pay_api_key: '',
-            body: '',
-            welcome_words: '',
-            attach: '',
-            configID: props.location.state === undefined ? props.configID : props.location.state.configID,
-            appName: props.location.state === undefined ? props.appName : props.location.state.appName,
+            configs: ['appName', 'appID', 'appSecret', 'enter_url', 'token', 'welcome_words', 'pay_api_key', 'attach', 'mch_id', 'body', 'spbill_create_ip', 'notify_url'],
+            configID: props.location.state === undefined ? props.defaultConfigID : props.location.state.configID,
+            appName: props.location.state === undefined ? props.defaultAppName : props.location.state.appName,
         }
     }
 
-    switchConfig = (label) => {
-        return (e) => {
-            this.setState({
-                [label]: e.target.value
-            })
-        };
-    };
-
     componentWillReceiveProps(next) {
         this.setState({
-            configID: next.configID,
-            appName: next.appName,
+            configID: next.location.state === undefined ? next.defaultConfigID : next.location.state.configID,
+            appName: next.location.state === undefined ? next.defaultAppName : next.location.state.appName,
         });
     }
 
@@ -54,26 +36,191 @@ class WxConfig extends Component {
                         if (error) {
                             return 'error!';
                         }
-                        console.log(data);
+                        let {history, location, defaultConfigID, defaultAppName, trialcase} = this.props;
+                        let {appName, configID, configs} = this.state;
                         return (
-                            <div>
-                                {
-                                    this.state.configs.map(config => (
-                                        <div key={config} style={{marginBottom: 10}}>
-                                            <span className='vice-title'>{config}: </span>
-                                            <Input value={this.state[config]} style={{width: 200}} onChange={this.switchConfig(config)}/>
-                                        </div>
-                                    ))
-                                }
-                                <Button type={'primary'}>save</Button>
-                            </div>
+                            <Display
+                                configs={configs}
+                                configID={configID}
+                                appName={appName}
+                                location={location}
+                                history={history}
+                                defaultConfigID={defaultConfigID}
+                                defaultAppName={defaultAppName}
+                                trialcase={trialcase}
+                                data={data.wxConfig_by_id}
+                            />
                         )
                     }
                 }
             </Query>
+        )
+    }
+}
 
+export default WxConfig;
+
+class Display extends Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+            configID: props.configID,
+            appName: props.appName,
+            mch_id: props.data === null ? '' : props.data.mch_id,
+            notify_url: props.data === null ? '' : props.data.notify_url,
+            appSecret: props.data === null ? '' : props.data.appSecret,
+            appID: props.data === null ? '' : props.data.appID,
+            token: props.data === null ? '' : props.data.token,
+            spbill_create_ip: props.data === null ? '' : props.data.spbill_create_ip,
+            enter_url: props.data === null ? '' : props.data.enter_url,
+            pay_api_key: props.data === null ? '' : props.data.pay_api_key,
+            body: props.data === null ? '' : props.data.body,
+            welcome_words: props.data === null ? '' : props.data.welcome_words,
+            attach: props.data === null ? '' : props.data.attach,
+        }
+    }
+
+
+    switchConfig = (label) => {
+        return (e) => {
+            this.setState({
+                [label]: e.target.value
+            })
+        };
+    };
+
+    render() {
+        let {configs} = this.props;
+        let {configID, appName, mch_id, notify_url, appSecret, appID, token, spbill_create_ip, enter_url, pay_api_key, body, welcome_words, attach} = this.state;
+        return (
+            <div>
+                {
+                    configs.map(config => (
+                        <div key={config} style={{marginBottom: 10}}>
+                            <span className='vice-title'>{config}: </span>
+                            <Input value={this.state[config]} style={{width: 200}}
+                                   onChange={this.switchConfig(config)}/>
+                        </div>
+                    ))
+                }
+                {
+                    this.props.trialcase ?
+                        <Button type={'primary'}> need copy</Button>
+                        :
+                        <div>
+                            <UpdateWXConfigButton
+                                id={configID}
+                                appName={appName}
+                                mch_id={mch_id}
+                                notify_url={notify_url}
+                                appSecret={appSecret}
+                                appID={appID}
+                                token={token}
+                                spbill_create_ip={spbill_create_ip}
+                                enter_url={enter_url}
+                                pay_api_key={pay_api_key}
+                                body={body}
+                                welcome_words={welcome_words}
+                                attach={attach}
+                            />
+                            <DeleteWXConfigButton
+                                id={configID}
+                                history={this.props.history}
+                            />
+                        </div>
+
+                }
+            </div>
+        )
+    }
+}
+
+class UpdateWXConfigButton extends Component {
+    constructor(props) {
+        super(props);
+        this.state = {}
+    }
+
+    render() {
+        return (
+            <Mutation mutation={gql(UPDATE_WXCONFIG)}>
+                {(update_wxConfig, {loading, error}) => {
+                    if (loading)
+                        return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
+                    if (error)
+                        return 'error';
+                    let {id, appName, mch_id, notify_url, appSecret, appID, token, spbill_create_ip, enter_url, pay_api_key, body, welcome_words, attach} = this.props;
+                    return (
+                        <Button type={'primary'} onClick={() => {
+                            update_wxConfig({
+                                variables: {
+                                    id,
+                                    appName,
+                                    mch_id,
+                                    notify_url,
+                                    appSecret,
+                                    appID,
+                                    token,
+                                    spbill_create_ip,
+                                    enter_url,
+                                    pay_api_key,
+                                    body,
+                                    welcome_words,
+                                    attach,
+                                    updatedAt: new Date().getTime()
+                                }
+                            });
+                        }}>save</Button>
+                    )
+                }}
+            </Mutation>
         )
     }
 }
 
-export default WxConfig;
+class DeleteWXConfigButton extends Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+            userID: getCookie('user_id')
+        }
+    }
+
+    showConfirm = (delete_wxConfig, id) => {
+        let _this = this;
+        confirm({
+            title: 'Do you want to delete this config?',
+            content: 'It cannot be found back!',
+            onOk() {
+                delete_wxConfig({variables: {id}});
+                _this.props.history.push({
+                    pathname: `/wechat-service/trial-case/index`,
+                });
+            },
+            onCancel() {
+            },
+        });
+    };
+
+    render() {
+        return (
+            <Mutation
+                mutation={gql(DELETE_WXCONFIG)}
+                refetchQueries={[{query: gql(SHOW_WXCONFIG), variables: {user_id: this.state.userID}}]}
+            >
+                {(delete_wxConfig, {loading, error}) => {
+                    if (loading)
+                        return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
+                    if (error)
+                        return 'error';
+                    let {id} = this.props;
+                    return (
+                        <Button type={'danger'} onClick={() => {
+                            this.showConfirm(delete_wxConfig, id);
+                        }}>delete</Button>
+                    )
+                }}
+            </Mutation>
+        )
+    }
+}

+ 1 - 1
src/app/wechatService/wxCreate/WxCreate.js

@@ -120,7 +120,7 @@ class WxCreate extends Component {
                                     <p>app name</p>
                                     <Input
                                         className='add-input'
-                                        placeholder="input schema_name"
+                                        placeholder="input app_name"
                                         onChange={e => {
                                             e.persist();
                                             this.setState({

+ 0 - 14
src/app/wechatService/wxDeploy/WxDeploy.js

@@ -1,14 +0,0 @@
-import React, {Component} from 'react';
-
-class WxDeploy extends Component {
-
-    render() {
-        return (
-            <div>
-                Wechat Deploy
-            </div>
-        )
-    }
-}
-
-export default WxDeploy;

+ 44 - 1
src/gql.js

@@ -487,6 +487,47 @@ const SHOW_WXCONTENT = `
             }
         `;
 
+const UPDATE_WXCONFIG = `
+            mutation updatewxConfig($id: ID, $updatedAt: String, $mch_id: String, $appName: String, $notify_url: String, $appSecret: String, $appID: String, $token: String, $spbill_create_ip: String, $enter_url: String, $pay_api_key: String, $body: String, $welcome_words: String, $attach: String) {
+                update_wxConfig(
+                    id: $id 
+                    updatedAt: $updatedAt 
+                    mch_id: $mch_id 
+                    appName: $appName 
+                    notify_url: $notify_url 
+                    appSecret: $appSecret 
+                    appID: $appID 
+                    token: $token 
+                    spbill_create_ip: $spbill_create_ip 
+                    enter_url: $enter_url 
+                    pay_api_key: $pay_api_key 
+                    body: $body 
+                    welcome_words: $welcome_words 
+                    attach: $attach
+                ) {
+                    id
+                    mch_id
+                    appName
+                    notify_url
+                    appSecret
+                    appID
+                    token
+                    spbill_create_ip
+                    enter_url
+                    pay_api_key
+                    body
+                    welcome_words
+                    attach
+                }
+            }
+        `;
+
+const DELETE_WXCONFIG = `
+            mutation deletewxConfig($id: ID) {
+                delete_wxConfig(id: $id)
+            }
+        `;
+
 export {
     ADD_USER,
     GET_USER,
@@ -515,5 +556,7 @@ export {
     SHOW_ALL_WXCONFIG,
     SHOW_WXCONFIG,
     ADD_WXCONFIG,
-    SHOW_WXCONTENT
+    SHOW_WXCONTENT,
+    UPDATE_WXCONFIG,
+    DELETE_WXCONFIG
 }