Api- Customer Contacts提交

Customer Contacts 页面,填写联系我们信息后,点击提交按钮访问的api

URL: /customer/contact/submit

格式:json

方式:post

一:请求部分

1.Request Header

参数名称 是否必须 类型 描述
access-token 必须 String 从localStorage取出来的值,识别用户登录状态的标示,用户登录成功,服务端返回access-token,VUE保存到localStorage中,在下一次请求从localStorage取出来放到request header中
fecshop-uuid 必须 String 从localStorage取出来的值,用户的唯一标示,VUE第一次访问服务端,服务端会返回fecshop-uuid ,VUE将其保存到本地,后面的每一次请求都需要加上fecshop-uuid
fecshop-currency 必须 String 从localStorage取出来的值,当前的货币值
fecshop-lang 必须 String 从localStorage取出来的值,当前的语言code

2.Request Body Form-Data:

参数名称 是否必须 类型 描述
captcha 必须 String 验证码
customer_name 必须 String 用户名字
email 必须 String 用户的邮箱地址
telephone 必须 String 用户的电话
comment 必须 String 联系我们的内容

3.参数code所有返回状态码:(完整的返回状态码详细参看:Api- 状态码

code Value 描述
200 成功状态码
1100003 登录:账户的token已经过期,或者没有登录

请求参数示例如下:

{
    captcha: "9004",
    customer_name: "terry",
    email: "372716335@qq.com",
    telephone: "18233456766",
    comment: "gogogoogo test test"
}

二:返回部分

1.Reponse Header

参数名称 是否必须 类型 描述
access-token 选填 String 用户登录成功,服务端返回access-token,VUE保存到localStorage中,在下一次请求从localStorage取出来放到request header中
fecshop-uuid 必须 String 用户的唯一标示,VUE第一次访问服务端,服务端会返回fecshop-uuid ,VUE将其保存到本地,后面的每一次请求都需要加上fecshop-uuid

2.Reponse Body Form-Data:

格式:json

参数名称 是否必须 类型 描述
code 必须 Number 返回状态码,200 代表完成,完整的返回状态码详细参看:Api- 状态码
message 必须 String 返回状态字符串描述
data 必须 Array 返回详细数据

3.参数code所有返回状态码:(完整的返回状态码详细参看:Api- 状态码

code Value 描述
200 成功状态码
1000009 参数丢失
1000007 无效数据:验证码错误
1100005 contact:发送邮件失败

4.返回数据举例:

{
    "code": 200,
    "message": "process success",
    "data": {
        "content": "contact us success"
    }
}