Răsfoiți Sursa

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/app/common/deploy/tencent/TencentConfig.js
Csy817 7 ani în urmă
părinte
comite
2719c95c4c

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

@@ -1,6 +1,6 @@
 import React, {Component} from 'react';
 import {Input, Collapse, Button, Radio, Icon, Tooltip} from 'antd';
-import {ADD_APIGROUP, UPDATE_APIGROUP} from "../../../../gql";
+import {ADD_APIGROUP, UPDATE_APIGROUP, UPDATE_PROJECT_GROUP} from "../../../../gql";
 import {request} from 'graphql-request'
 import {idGen} from "../../../../func";
 import {graphqlUrl} from "../../../../config";
@@ -139,7 +139,15 @@ class APIGroupCard extends Component {
                         this.setState({
                             showOK: true
                         });
-                        this.props.stepByStep(2);
+                        // 写回 project
+                        request(graphqlUrl, UPDATE_PROJECT_GROUP, {
+                            id: this.props.projectID,
+                            updatedAt: new Date().getTime(),
+                            apiGWGroup_id: id
+                        }).then(data => {
+                            if(data.update_project !== null)
+                                this.props.stepByStep(2);
+                        });
                     }
                     setTimeout(()=>{
                         this.setState({

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

@@ -1,7 +1,7 @@
 import React, {Component} from 'react';
 import {FormattedMessage} from 'react-intl';
 import {Input, Radio, Collapse, Button, Icon, Tooltip} from 'antd';
-import {ADD_DEPLOY, UPDATE_DEPLOY} from "../../../../gql";
+import {ADD_DEPLOY, UPDATE_DEPLOY, UPDATE_PROJECT_DEPLOY_AND_CLOUD} from "../../../../gql";
 import {request} from 'graphql-request'
 import {idGen} from "../../../../func";
 import {graphqlUrl} from "../../../../config";
@@ -160,7 +160,16 @@ class DeployCard extends Component {
                         this.setState({
                             showOK: true
                         });
-                        this.props.stepByStep(1);
+                        // 写回 project
+                        request(graphqlUrl, UPDATE_PROJECT_DEPLOY_AND_CLOUD, {
+                            id: this.props.projectID,
+                            updatedAt: new Date().getTime(),
+                            deploy_id: id,
+                            cloud_id: this.props.cloudID
+                        }).then(data => {
+                            if(data.update_project !== null)
+                                this.props.stepByStep(1);
+                        })
                     }
                     setTimeout(() => {
                         this.setState({

+ 8 - 6
src/case/BillApp/src/App.js

@@ -41,12 +41,7 @@ class BillApp extends Component{
     console.log(page)
     this.setState({page})
   }
-  renderBottom(){
-    let page=this.state.page
-    if(page==='home'||page==='assets'||page==='my'){
-      return(<TabBarBottom changePage={this.changePage}/>)
-    }
-  }
+  
 
   setDetail(detail){
     this.setState({detail})
@@ -113,6 +108,13 @@ class BillApp extends Component{
           )
     }
   }
+  //是否渲染底部bar
+  renderBottom(){
+    let page=this.state.page
+    if(page==='home'||page==='assets'||page==='my'){
+      return(<TabBarBottom changePage={this.changePage}/>)
+    }
+  }
 
   render(){
     const changePage=this.changePage

+ 0 - 1
src/case/BillApp/src/api/billsGraphql.txt

@@ -96,7 +96,6 @@ query tagbyprops($user_id: ID, $account_id: ID, $name: String, $icon: String, $c
         }
         account_id {
             id
-
             accountName
             createdAt
             updateAt

+ 51 - 0
src/case/BillApp/src/api/graphql/tag.js

@@ -0,0 +1,51 @@
+export const TAG_BY_PROPS=`query tagbyprops($user_id: ID, $account_id: ID, $name: String, $icon: String, $createdAt: String, $updateAt: String) {
+    tagbyprops: tag_by_props(user_id: $user_id account_id: $account_id name: $name icon: $icon createdAt: $createdAt updateAt: $updateAt) {
+        id
+        user_id {
+            id
+            openid
+            username
+            password
+            avatar
+            createdAt
+            updateAt
+        }
+        account_id {
+            id
+
+            accountName
+            createdAt
+            updateAt
+        }
+        name
+        icon
+        createdAt
+        updateAt
+    }
+}`
+
+export const CREATE_TAG=`mutation createtag($id: ID!, $user_id: ID, $account_id: ID, $name: String, $icon: String, $createdAt: String, $updateAt: String) {
+    createtag: create_tag(id: $id user_id: $user_id account_id: $account_id name: $name icon: $icon createdAt: $createdAt updateAt: $updateAt) {
+        id
+        user_id {
+            id
+            openid
+            username
+            password
+            avatar
+            createdAt
+            updateAt
+        }
+        account_id {
+            id
+
+            accountName
+            createdAt
+            updateAt
+        }
+        name
+        icon
+        createdAt
+        updateAt
+    }
+}`

+ 85 - 70
src/case/BillApp/src/components/Bill/Bill.jsx

@@ -1,68 +1,73 @@
 import React, { Component } from 'react'
 import TabBar from './TabBar'
 import NavBars from '../common/NavBar'
+import Pickers from '../common/Picker'
+import Input from '../common/Input'
+import {  WhiteSpace } from 'antd-mobile';
+
 
 import {graphqls} from '../../api/graphql_request'
 import {ACCOUNT_BY_PROPS} from '../../api/graphql/account'
-import {CLASS_BY_PROPS} from '../../api/graphql/class'
+import {TAG_BY_PROPS} from '../../api/graphql/tag'
 import {CREATE_BILL} from '../../api/graphql/bills'
 
 import {failToast} from '../common/Toast'
 
+
+
+
 let user_id=sessionStorage.getItem('openid')
 
 export default class Bill extends Component {
   constructor(props){
-      super(props)
-      this.state={
-          tabs:[{title:'收入'},{title:'支出'}],
-          class:'收入',
-          account:[],
-          classs:[],
-          account_id:'',
-          time:'',
-          remark:'',
-          money:'',
-          tag_id:''
-
-      }
+    super(props)
+    this.state={
+        picker:[],
+        tabs:[{title:'收入'},{title:'支出'}],
+        class:'收入',
+        account:[],
+        tags:[],
+        account_id:'',
+        time:'',
+        remark:'',
+        money:'',
+        tag_id:'',
+        showPicker:false
+    }
 
     this.tabChange=this.tabChange.bind(this)
     this.handleSubmit=this.handleSubmit.bind(this)
+    this.setMoney=this.setMoney.bind(this)
+    this.setAccount_id=this.setAccount_id.bind(this)
+    this.setTime=this.setTime.bind(this)
+    this.setRemark=this.setRemark.bind(this)
+    this.handleSubmit=this.handleSubmit.bind(this)
+    this.showAccountPicker=this.showAccountPicker.bind(this)
+    this.showTimetPicker=this.showTimetPicker.bind(this)
+    this.showTagPicker=this.showTagPicker.bind(this)
   }
 
   componentDidMount(){
+    
     this.getAccount()
-    this.getClass()
+    this.getTag()
   }
 
   getAccount(){
-   
     console.log(user_id)
     graphqls(ACCOUNT_BY_PROPS,{user_id}).then((e)=>{
-        console.log(e.accountbyprops)
-        this.setState({
-            account:e.accountbyprops
-        })
+        //console.log('account',e.accountbyprops)
+        this.setState({account:e.accountbyprops})
     })
   }
 
-  getClass(){
+  getTag(){
     let user_id=sessionStorage.getItem('openid')
-    graphqls(CLASS_BY_PROPS,{user_id}).then((e)=>{
-        console.log(e.classbyprops)
-        this.setState({
-            classs:e.classbyprops
-        })
+    graphqls(TAG_BY_PROPS,{user_id}).then((e)=>{
+        this.setState({account:e.accountbyprops})
     })
   }
 
-
-  tabChange(e){
-      console.log(e)
-      this.setState({class:e.title})
-  }
-
   handleSubmit(e){
     e.preventDefault()
     let data={
@@ -94,56 +99,66 @@ export default class Bill extends Component {
         failToast('所有选项不能为空',1)
     }
   }
+  //picker
+  showAccountPicker(){
+    
+    this.setState({showPicker:true})
+  }
+  showTimetPicker(){
+      
+  }
+  showTagPicker(){
+    
+    this.setState({showPicker:true}) 
+  }
+  //设置state的函数
+  tabChange(e){
+    console.log(e)
+    this.setState({class:e.title})
+  }
+  setMoney(money){
+    console.log(money)
+    this.setState({money})
+  }
+  setAccount_id(account_id){
+    console.log(account_id)
+    this.setState({account_id})
+  }
+  setTime(time){
+    console.log(time)
+    this.setState({time})
+  }  
+  setRemark(remark){
+    console.log(remark)
+    this.setState({remark})
+  }
 
 
 
   render() {
     const account=this.state.account
-    const classs=this.state.classs
+    const classs=this.state.classs  
     return (
       <div className="billWrap">
         <NavBars page='home' navBarText='记一笔' changePage={this.props.changePage}/>
         <TabBar tabs={this.state.tabs} tabChange={this.tabChange}/>
         <form onSubmit={this.handleSubmit}>
-            <div className="moneyWrap row">
-                <label>金额:</label>
-                <input type="text" name="money" className="input" onChange={(e)=>this.setState({money:e.currentTarget.value})}/>
-            </div>
-            <div className="accountWrap row">
-                <label>账户:</label>
-                <select name="account" className="input" onChange={(e)=>this.setState({account_id:e.currentTarget.value})}>
-                    <option value="0">下拉选择你的账户</option>
-                    {
-                        account.map((item)=>{
-                            return(
-                                <option key={item.id} value={item.id}>{item.accountName}</option> 
-                            )
-                        })            
-                    } 
-                </select>
-            </div>
-
-            <div className="classWrap row">
-                <label>分类:</label>
-                <select name="class" className="input" onChange={(e)=>this.setState({tag_id:e.currentTarget.value})}>
-                    <option value="0">下拉选择你的分类</option>
-                    {
-                        classs.map((item)=>{
-                            return(
-                                <option key={item.id} value={item.id}>{item.name}</option> 
-                            )
-                        })            
-                    } 
-                </select>
-            </div>
-            <div className="timeWrap row">
-                <label>时间:</label><input type="text" name="time" className="input" placeholder="格式:2018/12/1 00:00:00" onChange={(e)=>this.setState({time:e.currentTarget.value})}/>
-            </div> 
-            <div className="remarkWrap row">
-                <label>备注:</label><input type="text" name="remark" className="input" onChange={(e)=>this.setState({remark:e.currentTarget.value})}/>
-            </div> 
+            <Input title="金额" callback={this.setMoney} value={this.state.money} />
+            <WhiteSpace />
+            <div onClick={this.showAccountPicker}><Input title="账户"  disabled={true} callback={this.setAccount_id} value={this.state.account_id} extra={true} /></div>
+            
+            <WhiteSpace />
+            <div onClick={this.showTagPicker}><Input title="分类"  disabled={true} extra={true} onClick={()=>{}}/></div>
+            
+            <WhiteSpace />
+            <div onClick={()=>{console.log('click time')}}><Input title="时间"  disabled={true} callback={this.setTime} value={this.state.time} extra={true} onClick={()=>{}}/></div>
+            
+            <WhiteSpace />
+            <Input title="备注" callback={this.setRemark} value={this.state.remark}/>
             <button className="submit" type="submit">保存</button>
         </form>
+        <div style={this.state.showPicker?{}:{display:"none"}}><Pickers data={this.state.picker}/></div>
+    
       </div>
     )
   }

+ 19 - 3
src/case/BillApp/src/components/BillDetail/BillDetail.jsx

@@ -1,10 +1,26 @@
 import React, { Component } from 'react'
 
 import NavBars from '../common/NavBar'
+import Pickers from '../common/Picker'
+
 
 //import {setSessionStorage,getSessionStorage} from '../../untils/session_help'
 import {collectByDate} from '../../untils/date'
 
+
+
+
+const season = [
+    {
+      label: '春',
+      value: '春',
+    },
+    {
+      label: '夏',
+      value: '夏',
+    },
+  ];
+
 export default class BillDetail extends Component {
     constructor(props){
         super(props)
@@ -14,8 +30,8 @@ export default class BillDetail extends Component {
         console.log('detailPage',props)
     }
 
-    componentDidMount(){
-
+    componentDidMount(props){
+        
     }
 
     componentWillUnmount(){
@@ -31,7 +47,7 @@ export default class BillDetail extends Component {
         <div>
             <NavBars changePage={this.props.changePage} page="home"/>
             <div className="deatilWrap">
-                detailPAGE
+                <Pickers data={season}/>
             </div>
         </div>
         )

+ 1 - 2
src/case/BillApp/src/components/HomePage/IconList.jsx

@@ -37,7 +37,7 @@ export default class IconList extends Component{
 
                 //console.log('todayBill',[item])
                 //setSessionStorage('todayBill',[item])
-
+                
                 if(item.class==='pay'){
                     this.setState({
                         dayPay:item.money
@@ -55,7 +55,6 @@ export default class IconList extends Component{
     }
 
     getWeekCollect(bills,week){
-
         let bottom=new Date(week.weekBottom).getTime(),
             top=new Date(week.weekTop).getTime();
        // console.log(bottom,top)

+ 1 - 1
src/case/BillApp/src/components/HomePage/List.jsx

@@ -5,6 +5,7 @@ import {collectByDate} from '../../untils/date'
 const Item = List.Item;
 
 export default class Lists extends React.Component {
+  
   state = {
     disabled: false,
     monthPay:0.00,
@@ -19,7 +20,6 @@ export default class Lists extends React.Component {
     let collect=collectByDate(bills,bottom,top)
     
     this.setState({monthPay:collect.Pay,monthIncome:collect.Income})
-    
     //console.log('---',collect)
   }
 

+ 28 - 0
src/case/BillApp/src/components/common/Input.jsx

@@ -0,0 +1,28 @@
+import React, { Component } from 'react'
+import { List, InputItem, WhiteSpace } from 'antd-mobile';
+import { createForm } from 'rc-form';
+
+export default class Input extends Component {
+  render() {
+    const placeholder=this.props.placeholder||''
+    const extra=this.props.extra?{display:"block",background:"url(https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/right.svg)",backgroundSize:"cover",width:"14px",height:"14px"}:{display:"block",background:"transparent",backgroundSize:"cover",width:"14px",height:"14px"}
+    const disabled =this.props.disabled||false
+    const callback=this.props.callback
+    const value=this.props.value
+    return (
+      <div style={{width:"246px"}}>
+        <List>
+            <InputItem
+                clear
+                value={value}
+                placeholder={placeholder}
+                ref={el => this.autoFocusInst = el}
+                extra={<span style={extra}></span>}
+                disabled={disabled}
+                onChange={(e)=>{callback(e)}}
+            >{this.props.title}</InputItem>
+        </List>
+      </div>
+    )
+  }
+}

+ 18 - 0
src/case/BillApp/src/components/common/Picker.jsx

@@ -0,0 +1,18 @@
+import React, { Component } from 'react'
+import { PickerView, WhiteSpace } from 'antd-mobile';
+
+export default class Pickers extends Component {
+  render() {
+    const data=this.props.data
+    return (
+        <div style={{position:"absolute",bottom:"0",left:"0",width:"100%",background:"#fff"}}>
+            <PickerView
+                data={data}
+                cascade={false}
+                indicatorStyle={{bottom:"0"}}
+                onScrollChange={(e)=>{console.log(e)}}
+            />
+        </div>
+    )
+  }
+}

+ 1 - 1
src/case/BillApp/src/components/context.js

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

+ 1 - 0
src/case/BillApp/src/untils/date.js

@@ -49,6 +49,7 @@ export function collectByDate(arr=[],bottom,top){
             Income+=parseInt(item.money,10)
         }
     })
+    
     //console.log(Pay,Income)
     return{Pay,Income,arr}
 }

+ 1 - 2
src/case/OrderApp/src/components/UserPage/userPage.jsx

@@ -13,8 +13,7 @@ class UserPage extends Component{
         this.state={
 
         }
-
-
+        
         this.toOrder=this.toOrder.bind(this)
     }
 

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

@@ -655,12 +655,10 @@ query orderbyprops($deliveryTime: String, $updatedAt: String, $orderLogistics_id
             logisticsFee
             expressId
             createdAt
-
             consigneeTel
             id
             consignAddress
             LogisticsStatus
-
             consigneeName
         }
         payTime

+ 0 - 13
src/case/ShopApp/src/api/graphql/order.js

@@ -2,19 +2,6 @@ export const getOrderByProps=`query orderbyprops($deliveryTime: String, $updated
     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

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

@@ -1,5 +1,5 @@
 var config={
-    APPID:"wxc4831335ae194243",
+    USER_ID:"ovtkn4zONC3IzhpykQ7cSLZ85YFg",
     HTTP_DATA_URL:'http://ec.ioobot.cn/graphql',  //  电商fc  http://ec.ioobot.cn/graphql
     HTTP_PAY_URL:'https://xcx.ioobot.com/payinfo'
 }

+ 2 - 2
src/case/ShopApp/src/components/AddressPage/AddressPage.jsx

@@ -31,7 +31,7 @@ class AddressPage extends Component {
 
   getAddress(data){
     graphqls(getAddressByProps,data).then((res)=>{
-        console.log(res.userAddressbyprops)
+        //console.log(res.userAddressbyprops)
         this.setState({
           addressList:res.userAddressbyprops
         })
@@ -46,7 +46,7 @@ class AddressPage extends Component {
         <div>
         <NavBars navBarText="编辑地址" changePage={this.props.changePage} page="addressPage" triggerAddress={triggerAddress}/>
         <div style={{marginTop:"45px"}}></div>
-        <EditAddress address={this.props.address} address_id={this.props.address_id} getAddress={this.getAddress}/>
+        <EditAddress address={this.props.address} address_id={this.props.address_id} getAddress={this.getAddress} setAddressId={this.props.setAddressId} />
         </div>
         )
     }else{

+ 1 - 1
src/case/ShopApp/src/components/AddressPage/EditAddress.jsx

@@ -27,7 +27,7 @@ export default class EditAddress extends Component {
   render() {
     return (
       <div>
-        <FormAddress createUserAddress={this.createUserAddress} address={this.props.address} address_id={this.props.address_id} getAddress={this.getAddress}/>
+        <FormAddress setAddressId={this.props.setAddressId}  createUserAddress={this.createUserAddress} address={this.props.address} address_id={this.props.address_id} getAddress={this.getAddress}/>
       </div>
     )
   }

+ 5 - 1
src/case/ShopApp/src/components/AddressPage/FormAddress.jsx

@@ -57,6 +57,10 @@ export default class FormAddress extends Component {
     }
 
   }
+
+  componentWillUnmount(){
+    this.props.setAddressId('')
+  }
   nameChange(e){
     console.log(e)
     this.setState({
@@ -84,7 +88,7 @@ export default class FormAddress extends Component {
     })
   }
 
-  areaChange(e){
+  areaChange(e=[0]){
     console.log('e',e)
     console.log(district)
 

+ 7 - 4
src/case/ShopApp/src/components/OrderCenterPage/OrderCenterPage.jsx

@@ -11,6 +11,8 @@ import {PageContext} from '../../context/context'
 import {graphqls} from '../../api/graphql_request'
 import {getOrderByProps,getProductByProps,DELETE_ORDER,DELETE_ORDER_PRODUCT} from '../../api/graphql/order'
 
+import config from "../../api/url_config";
+
 class OrderCenterPage extends Component {
   constructor(props){
     super(props)
@@ -27,19 +29,18 @@ class OrderCenterPage extends Component {
   }
 
   componentDidMount(){
-    let user_id=sessionStorage.getItem('openid')
+    let user_id='ovtkn4zONC3IzhpykQ7cSLZ85YFg'
     this.getOrder({user_id})
   }
   //获取订单,并根据订单id获取订单产品信息,之后重构数据结构
   getOrder(data){
     graphqls(getOrderByProps,data).then((res)=>{
-        //console.log(res.orderbyprops)
+        console.log('order',res)
         let orderArr=res.orderbyprops||[]
         for(let i=0;i<orderArr.length;i++){
             //根据order_id获取订单产品信息,可以优化,可以只发出一次请求获取所有订单产品信息之后再经行处理
             graphqls(getProductByProps,{order_id:orderArr[i].id}).then((res)=>{
-                //console.log('order_id',orderArr[i].id)
-                //console.log('getProductByProps',res)
+                console.log('getProductByProps',res)
                 orderArr[i].orderProducts=res.orderProductbyprops
                 
                 if(i===orderArr.length-1){
@@ -55,6 +56,8 @@ class OrderCenterPage extends Component {
                 }
             })
         }
+    }).catch((e)=>{
+        console.log('catct',e)
     })
   }
 

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

@@ -23,7 +23,7 @@ export default class Card extends Component{
         const product =this.state.product
         return (
             <div className="card">
-                <img src={product.img} alt="Avatar" style={{width:"100%",height:'200px'}}/>
+                <img src={product.img||''} alt="Avatar" style={{width:"100%",height:'200px'}}/>
                 <div className="container">
                     <h4>{product.name}</h4> 
                     <p style={{fontSize:"12px"}}>{product.intro}</p>

+ 7 - 5
src/config.js

@@ -1,17 +1,19 @@
 // 全局配置
-const faasEnvironment = 'development';
+const environment = 'development';
+
+// 全局差异化配置,无需配置请留空
+const faasEnvironment = '';
 const graphqlEnvironment = 'production';
 
 // 基础配置
 const localIP = 'http://localhost';
 const serverIP = 'http://123.206.193.98';
-
-const faasIp = faasEnvironment === 'development' ? localIP : serverIP;
-const graphqlIP = graphqlEnvironment === 'development' ? localIP : serverIP;
-
 const backendPort = '8999';
 const graphqlPort = '3000';
 
+// 无需配置
+const faasIp = (faasEnvironment || environment) === 'development' ? localIP : serverIP;
+const graphqlIP = (graphqlEnvironment || environment) === 'development' ? localIP : serverIP;
 const backend = faasIp + ':' + backendPort;
 
 // graphql 配置

+ 52 - 107
src/gql.js

@@ -862,116 +862,57 @@ const GET_PROJECT = `
                 }
         `;
 
-const UPDATE_PROJECT = `
-            mutation updateproject($id: ID, $updatedAt: String, $database_id: ID, $apiGWGroup_id: ID, $createdAt: String, $projectName: String, $deploy_id: ID, $projectType: String, $cloud_id: ID, $user_id: ID, $wxConfig_id: ID, $schema_id: ID) {
-              update_project(id: $id updatedAt: $updatedAt database_id: $database_id apiGWGroup_id: $apiGWGroup_id createdAt: $createdAt projectName: $projectName deploy_id: $deploy_id projectType: $projectType cloud_id: $cloud_id user_id: $user_id wxConfig_id: $wxConfig_id schema_id: $schema_id) {
+const UPDATE_PROJECT_GROUP = `
+            mutation updateproject($id: ID, $updatedAt: String, $apiGWGroup_id: ID) {
+              update_project(id: $id updatedAt: $updatedAt apiGWGroup_id: $apiGWGroup_id) {
+                updatedAt
+                projectName
+                id
+                projectType
+              }
+            }
+        `;
+
+const UPDATE_PROJECT_DEPLOY = `
+            mutation updateproject($id: ID, $updatedAt: String, $deploy_id: ID) {
+              update_project(id: $id updatedAt: $updatedAt deploy_id: $deploy_id) {
+                updatedAt
+                projectName
+                id
+                projectType
+              }
+            }
+        `;
+
+const UPDATE_PROJECT_CLOUD = `
+            mutation updateproject($id: ID, $updatedAt: String, $cloud_id: ID) {
+              update_project(id: $id updatedAt: $updatedAt cloud_id: $cloud_id) {
+                updatedAt
+                projectName
+                id
+                projectType
+              }
+            }
+        `;
+
+const UPDATE_PROJECT_DATABASE = `
+            mutation updateproject($id: ID, $updatedAt: String, $database_id: ID) {
+              update_project(id: $id updatedAt: $updatedAt database_id: $database_id) {
+                updatedAt
+                projectName
+                id
+                projectType
+              }
+            }
+        `;
+
+const UPDATE_PROJECT_DEPLOY_AND_CLOUD = `
+            mutation updateproject($id: ID, $updatedAt: String, $deploy_id: ID, $cloud_id: ID) {
+              update_project(id: $id updatedAt: $updatedAt deploy_id: $deploy_id cloud_id: $cloud_id) {
                 updatedAt
-                database_id {
-                  dbPort
-                  updatedAt
-                  dbHost
-                  dbUsername
-                  dbPassword
-                  createdAt
-                  id
-            
-            
-                  dbName
-                }
-                apiGWGroup_id {
-                  environmentName
-                  userStatus
-                  defaultDomain
-                  updatedAt
-                  userDomain
-                  groupName
-                  createdAt
-                  frontType
-                  region
-                  serviceId
-                  status
-                  id
-            
-                }
-                createdAt
                 projectName
-                deploy_id {
-                  description
-                  updatedAt
-                  cosBucketName
-                  memorySize
-            
-                  createdAt
-                  subnetId
-                  cosObjectName
-                  region
-                  vpcId
-                  cosBucketRegion
-                  id
-            
-            
-                  serviceName
-                  timeout
-                  handler
-                  functionName
-                }
                 id
                 projectType
-                cloud_id {
-                  id
-            
-                  cloudName
-                  secretId
-                  secretKey
-                  appId
-                  createdAt
-                  updatedAt
-                }
-                user_id {
-                  email
-                  updatedAt
-                  password
-                  telephone
-                  nickname
-                  username
-                  createdAt
-                  openid
-                  id
-                  avatar
-                }
-                wxConfig_id {
-                  updatedAt
-                  mch_id
-                  appName
-                  notify_url
-                  appSecret
-                  createdAt
-                  appID
-                  token
-                  spbill_create_ip
-                  enter_url
-                  id
-                  pay_api_key
-            
-                  body
-                  welcome_words
-                  attach
-                }
-                schema_id {
-                  updatedAt
-                  schemaState
-                  authWrite
-                  authReadObjects
-                  createdAt
-                  authRead
-                  schemaName
-                  reference
-                  id
-                  schemaData
-                  authReadWrite
-            
-                  authWriteObjects
-                }
               }
             }
         `;
@@ -1012,5 +953,9 @@ export {
     UPDATE_WXCONFIG,
     DELETE_WXCONFIG,
     GET_PROJECT,
-    UPDATE_PROJECT
+    UPDATE_PROJECT_GROUP,
+    UPDATE_PROJECT_DEPLOY,
+    UPDATE_PROJECT_CLOUD,
+    UPDATE_PROJECT_DATABASE,
+    UPDATE_PROJECT_DEPLOY_AND_CLOUD
 }