Api- Customer 账户中心

vue 账户中心页面的api,返回账户中心的各个功能的菜单信息

URL: /customer/account/index

格式:json

方式:get

一:请求部分

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:

请求参数示例如下:

二:返回部分

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 成功状态码
1100003 登录:账户的token已经过期,或者没有登录

4.返回数据举例:

{
    "code": 200,
    "message": "process success",
    "data": {
        "menuList": {   // 各个菜单的列表,key是显示的文字,value是链接url
            "Account Information": "/customer/editaccount",
            "Address Book": "/customer/address",
            "My Orders": "/customer/order",
            "My Product Reviews": "/customer/productreview",
            "My Favorite": "/customer/productfavorite"
        }
    }
}