diff --git a/src/view/developmentDocking/index.css b/src/view/developmentDocking/index.css index d91dcb9..e8ccb50 100644 --- a/src/view/developmentDocking/index.css +++ b/src/view/developmentDocking/index.css @@ -15,6 +15,9 @@ border: none; width: 120px; } + .blueTips { + color: #0076f6; + } .el-main { padding: 0; } diff --git a/src/view/developmentDocking/index.vue b/src/view/developmentDocking/index.vue index b2f8c9b..5265f2d 100644 --- a/src/view/developmentDocking/index.vue +++ b/src/view/developmentDocking/index.vue @@ -48,15 +48,16 @@ export default { data() { return { searchQuery: "", - selectedVersion: '1.0', + selectedVersion: 'V1.0', versions: [ // { value: 'next', label: 'Next', tag: '' }, // { value: '3.9', label: '3.9', tag: 'LATEST' }, // { value: '3.8', label: '3.8', tag: '' }, // { value: '3.7', label: '3.7', tag: '' }, // { value: '3.6', label: '3.6', tag: '' }, - { value: '新智慧1.0', label: '新智慧1.0', tag: '' }, - { value: '1.0', label: '1.0', tag: '' } + { value: 'V1.0', label: 'V1.0', tag: '' }, + + { value: 'oldSystem', label: '老系统(兼容版本)', tag: '' }, ], code: `{ "shipment": { @@ -70,15 +71,23 @@ export default { } }`, menuItems: { - "1.0": [ + + "V1.0": [ + { + "账户模块": [ + { title: '账户验证', index: '1' }, + ] + }, { "订单模块": [ { title: '创建订单', index: '1' }, - { title: '取消订单', index: '2' }, { title: '根据订单id获取订单详情', index: '3' }, { title: '获取渠道信息', index: '4' }, { title: '获取FBA仓库编码', index: '5' }, { title: '获取订单轨迹', index: '6' }, + { title: '获取第三方海外信息', index: '7' }, + { title: '取消订单', index: '2' }, + // { title: '系统状态', index: '2' }, // { title: '配置选项', index: '3' }, // { title: '用户管理', index: '4' }, @@ -86,15 +95,7 @@ export default { ] }, - // { - // "hhh": [ - // { title: '来玩呀', index: '1' }, - // { title: '系统状态', index: '2' }, - // { title: '配置选项', index: '3' }, - // { title: '用户管理', index: '4' }, - // { title: '日志', index: '5' } - // ] - // }, + // { // "小妹妹": [ // { title: '嘿嘿嘿', index: '1' }, @@ -105,7 +106,7 @@ export default { // ] // } ], - "新智慧1.0": [ + "oldSystem": [ { "运单模块": [ { title: '创建运单', index: '1' }, diff --git a/src/view/developmentDocking/mainComponents.vue b/src/view/developmentDocking/mainComponents.vue index 8af82dd..47a4594 100644 --- a/src/view/developmentDocking/mainComponents.vue +++ b/src/view/developmentDocking/mainComponents.vue @@ -7,7 +7,7 @@
             
-              {{ idx + 1 }} {{ line }}
+ {{ idx + 1 }}
复制 @@ -15,9 +15,10 @@
{{ item.description }}
+
{{ it.h2Title }}
-
2-1 请求报文示例
+
{{item.apiAdd}}-1 请求报文示例
接口地址:
{{ it.requestUrl }}
@@ -27,18 +28,22 @@
请求数据类型:
{{ it.type }}
-
2-2 请求字段解析
+
{{item.apiAdd}}-2 请求字段解析
                 
-                  {{ idx + 1 }} {{ line }}
+ {{ idx + 1 }}
复制
-
2-3 请求参数说明
+
{{item.apiAdd}}-3 请求参数说明
+
+ {{ it.description1 }} +
@@ -48,21 +53,21 @@ -
2-4 返回示例
+
{{item.apiAdd}}-4 返回示例
                 
-                  {{ idx + 1 }} {{ line }}
+ {{ idx + 1 }}
复制
-
2-5 返回参数说明
+
{{item.apiAdd}}-5 返回参数说明
                 
-                  {{ idx + 1 }} {{ line }}
+ {{ idx + 1 }}
复制 @@ -85,30 +90,92 @@ export default { searchQuery: "", totalIndex: 1, propList: [], - apiData: [] - }; - }, - computed: { - codeLines() { - return this.code.split('\n'); - }, - }, - methods: { - fetchData(api,selected) { - console.log(api,selected,'selectedVe666rsionselectedVersion') - - // 模拟 API 数据,根据实际情况修改 - const allData = [ - { + apiData: [], + allData : [ + { api:'1-0', - selectedVersion:'1.0', - mainTitle: '账号验证', - h2Title1: '1-1 HTTP请求头格式', - description: 'ACCESS_TOKEN 可以联系客服创建,在对应用户的 API 密钥中创建。每一个 api 请求都要在 HTTP 请求头中包含 密钥,具体格式查看上面的 HTTP 请求头格式。', - codeLines: ` Authorization: Bearer ACCESS_TOKEN - Content-Type: application/json - Accept: application/json - Accept-Language: zh-CN`.split('\n'), + apiAdd:'1', + selectedVersion:'V1.0', + mainTitle: '账户验证接口HTTP请求头格式', + h2Title1: '', + description: '', + codeLines: ` Host:请求ip+端口号 + Content-Type:multipart/form-data`.split('\n'), + apiDesc:[ + { + h2Title: '账户验证', + requestUrl: '[POST] /v1/user/oauth/token', + type:"formdata", + description:"", + codeLines: ` + grant_type="password" + client_id="aaf" + client_secret="aaf88888888" + username="17777777777" + password="123456" + login_type="api_key" + user_type="1"`.split('\n'), + codeLines1: ` { + "access_token": + "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJicmFuY2hJZCI6IjAwYzgwNzBiNzBhMTQ3NWQ5MGE0NzI0MzMxYj + g0ZDNhIiwiYWdlbnRJZCI6IjA2NTVmNzI5ZGY3MTQ4ZTZiNDQ4ZDBmMGIzNTdiOTlmIiwiY29kZSI6MjAwLCJ1c2VyX2 + 5hbWUiOiIxNzc3Nzc3Nzc3NyIsImFnZW50TmFtZSI6IjE3Nzc3Nzc3Nzc3IiwidXNlck5hbWUiOiJudWxsIG51bGwiLC + J1c2VySWQiOiIwNjU1ZjcyOWRmNzE0OGU2YjQ0OGQwZjBiMzU3Yjk5ZiIsImF1dGhvcml0aWVzIjpbInVzZXIiLCJhZG + 1pbiJdLCJ1c2VyQ29kZSI6bnVsbCwiY2xpZW50X2lkIjoiYWFmIiwiaXNJbml0UHdkIjoiZmFsc2UiLCJzY29wZSI6Wy + JhbGwiXSwiZXhwIjoxNzIwNjY5NjEwLCJqdGkiOiIxZWYyODZiYS1jZGYyLTRkN2EtOWVjYS04NmU0MGI0N2E0OGEifQ. + jzqOHTzmbM4mQL4oqLacIS2AXx3b4ZCYh9M8imrNcU_mhMuNnZlsFznmj1Z1_kW71CM0kr5dCzR4egy17UhCasAoWe6B + dtw3gPMBvlpS3IJ5b8fvwFkorHXqU9xwfpB8PdhHAPPBPUduIrlYMPRnocUxCTftMeMm7TThQERKltiCXRS3nNzwopzz + -daKwfRgFS9U8i1q_noynL-Ood5eG30QwD6mI4M-_wjS3jSgBNKT6Kr4moWjiwyoNQdx14DrFGKsolI3WRRIW_q1s1X5 + P8sAVGRSIKLeTp3yN92LarE3TqzGbZWBhnhvD9_5W8D8U-glAbvDTGFREEdgkAQgfg", + "token_type":"bearer", + "refresh_token": + "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJicmFuY2hJZCI6IjAwYzgwNzBiNzBhMTQ3NWQ5MGE0NzI0MzMxYj + g0ZDNhIiwiYWdlbnRJZCI6IjA2NTVmNzI5ZGY3MTQ4ZTZiNDQ4ZDBmMGIzNTdiOTlmIiwiY29kZSI6MjAwLCJ1c2VyX2 + 5hbWUiOiIxNzc3Nzc3Nzc3NyIsImFnZW50TmFtZSI6IjE3Nzc3Nzc3Nzc3IiwidXNlck5hbWUiOiJudWxsIG51bGwiLC + J1c2VySWQiOiIwNjU1ZjcyOWRmNzE0OGU2YjQ0OGQwZjBiMzU3Yjk5ZiIsImF1dGhvcml0aWVzIjpbInVzZXIiLCJhZG + 1pbiJdLCJ1c2VyQ29kZSI6bnVsbCwiY2xpZW50X2lkIjoiYWFmIiwiaXNJbml0UHdkIjoiZmFsc2UiLCJzY29wZSI6Wy + JhbGwiXSwiYXRpIjoiMWVmMjg2YmEtY2RmMi00ZDdhLTllY2EtODZlNDBiNDdhNDhhIiwiZXhwIjoxNzIwNjY5NjEwLC + JqdGkiOiI0OTVjYzc0MC00MmZlLTQ2ZjMtOGQ5Mi05ZjI3NmIzOTNhZTEifQ.So-P4-9POyrVsDq2aJc8XrNj9NoZG1_ + g9c-rbkz_59So3z1T3mtqripoIvJnrTRGxEC7IZcEpOX-BT_OB1YA8JrjI5fBiMpzBQdYBoCCHlOe_HUoiYpfS6ox5ql + wS1dCQXZGVYa6jxSE0CHKd1ZjofNRbBcbyJ5AOYny2qsYuFjuww5x709hNNpZD5quJjjVsWqbPFmZw8YL1tHgPyf251V + 5mHN04b1RqnCOohDikWYe9bVTj2wxM0VYo8kZPEaQsao_luZwMh0pUsrIZEHgr6Eu5GEi73TjnYT2bTpKH_9-Wy1Am4E + ZPo-M9vvOgPSYGLp1_efxjh7cx-4Tnmkb2w", + "expires_in":604799, + "scope":"all", + "branchId":"00c8070b70a1475d90a4724331b84d3a", + "isInitPwd":"false", + "agentId":"0655f729df7148e6b448d0f0b357b99f", + "code":200, + "agentName":"17777777777", + "userName":"nullnull", + "userId":"0655f729df7148e6b448d0f0b357b99f", + "userCode":null, + "jti":"1ef286ba-cdf2-4d7a-9eca-86e40b47a48a" + }`.split('\n'), + codeLines2: ` access_token:访问令牌,拼接固定前缀"Bearer"组成后续接口的访问token`.split('\n'), + tableData:[ + { id: 'grant_type', field: 'grant_type', fieldName: '授权类型', required: '是', dataType: 'string', example: 'password', description: '固定值' }, + { id: 'client_id', field: 'client_id', fieldName: '客户端id', required: '是', dataType: 'string', example: 'aaf', description: '固定值' }, + { id: 'client_secret', field: 'client_secret', fieldName: '客户端密钥', required: '是', dataType: 'string', example: 'aaf88888888', description: '固定值' }, + { id: 'username', field: 'username', fieldName: '用户名', required: '是', dataType: 'string', example: '17777777777', description: '客户登录手机号' }, + { id: 'password', field: 'password', fieldName: '密码', required: '是', dataType: 'string', example: '123456', description: '固定值' }, + { id: 'login_type', field: 'login_type', fieldName: '登录类型', required: '是', dataType: 'string', example: 'api_key', description: '固定值' }, + { id: 'user_type', field: 'user_type', fieldName: '用户类型', required: '是', dataType: 'string', example: '1', description: '固定值' }, + + + ] + }, + ], + }, + { + api:'2-0', + apiAdd:'1', + selectedVersion:'V1.0', + mainTitle: '常规接口HTTP请求头格式', + h2Title1: '', + description: '', + codeLines: ` Authorization:Bearer ACCESS_TOKEN + Content-Type:application/json`.split('\n'), apiDesc:[ { h2Title: '创建订单', @@ -197,609 +264,134 @@ export default { "companyName": null }, - "orderTake": { - "warehouseId": "00c8070b70a1475d90a4724331b85w44", - "province": null, - "city": null, - "district": null, - "address": null, - "contact": null, - "phone": null, - "takeTime": null - } - }`.split('\n'), - codeLines1: ` { - "success": true, - "reTry": false, - "message": "下单成功,您的订单是:AABB2407010041", - "code": 200, - "data": "8175052ed64143f093c401feb91346ec", - "timestamp": 1719836214170 - }`.split('\n'), - codeLines2: ` success:请求成功标志,true仅代表请求成功,不代表通过 - message:请求描述 - dode:200则代表请求通过,完成下单,500则代表校验未通过 - data:订单id,请求成功会返回订单的id`.split('\n'), - tableData:[ - { id: 'transportMode', field: 'transportMode', fieldName: '运输方式', required: '是', dataType: 'string', example: 'AIR', description: '海运-OCEAN, 空运-AIR, 铁路-RAIL, 卡航-ROAD' }, - { id: 'countryCode', field: 'countryCode', fieldName: '国家编码', required: '是', dataType: 'string', example: 'GB', description: '国家二字码' }, - { id: 'channelId', field: 'channelId', fieldName: '渠道id', required: '是', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '通过渠道信息接口获取' }, - { id: 'custOrderNo', field: 'custOrderNo', fieldName: '客户订单号', required: '否', dataType: 'string', example: 'GZGM2406171807', description: '客户订单号' }, - { id: 'isPurchaseInsurance', field: 'isPurchaseInsurance', fieldName: '是否购买保险', required: '是', dataType: 'string', example: '1', description: '0:否 1:是' }, - { id: 'insuranceType', field: 'insuranceType', fieldName: '投保类型', required: '否', dataType: 'string', example: '1', description: '1-上架险,2-签收险' }, - { id: 'insuranceCurrency', field: 'insuranceCurrency', fieldName: '保险币种', required: '否', dataType: 'string', example: 'CNY', description: '币种' }, - { id: 'insuranceAmount', field: 'insuranceAmount', fieldName: '购买保险金额', required: '否', dataType: 'string', example: '500.00', description: '金额' }, - { id: 'isSpecifyDelivery', field: 'isSpecifyDelivery', fieldName: '是否指定末端快递', required: '否', dataType: 'string', example: '0', description: '0:否 1:是' }, - { id: 'deliveryCompanyId', field: 'deliveryCompanyId', fieldName: '快递公司id', required: '否', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '根据快递公司信息接口获取' }, - { id: 'forecastNumber', field: 'forecastNumber', fieldName: '预报件数', required: '是', dataType: 'integer(int32)', example: '10', description: '订单箱数' }, - { id: 'forecastWeight', field: 'forecastWeight', fieldName: '预报重量', required: '是', dataType: 'number', example: '50.00', description: '重量(KG)' }, - { id: 'forecastVolume', field: 'forecastVolume', fieldName: '预报体积', required: '是', dataType: 'number', example: '1.00', description: '体积(M³)' }, - { id: 'isArrangeInspection', field: 'isArrangeInspection', fieldName: '是否安排商检', required: '否', dataType: 'string', example: '0', description: '0:否 1:是' }, - { id: 'declareType', field: 'declareType', fieldName: '报关方式', required: '是', dataType: 'string', example: '1', description: '1:买单报关 2:退税报关 3:买单+退税' }, - { id: 'taxRefundInfo', field: 'taxRefundInfo', fieldName: '退税资料url', required: '否', dataType: 'string', example: 'https://public-shenzhen-file.oss-cn-beijing.aliyuncs.com/aaf1.0/file/退税资料.zip', description: '文件下载地址' }, - { id: 'taxRefundRemark', field: 'taxRefundRemark', fieldName: '退税资料说明', required: '是', dataType: 'string', example: '1', description: '1-一对多(单订单多份资料), 2-一对一(单订单一份资料), 3-多对多(合并报关,多份资料), 4-多对一(合并报关,一份资料);报关方式为买单+退税则必填' }, - { id: 'taxType', field: 'taxType', fieldName: '交税方式', required: '是', dataType: 'string', example: '1', description: '1-不包税,2-包税,3-自主税号,4-自税递延' }, - { id: 'receiveType', field: 'receiveType', fieldName: '收件地址类型', required: '是', dataType: 'string', example: '1', description: '1:FBA地址 2:第三方海外仓 3:商业地址 4:住宅地址' }, - { id: 'takeType', field: 'takeType', fieldName: '交货方式', required: '是', dataType: 'string', example: '1', description: '1:送货到仓 2:上门提货' }, - { id: 'orderRemark', field: 'orderRemark', fieldName: '客户订单备注', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'goodsAttrTypeList', field: 'goodsAttrTypeList', fieldName: '产品属性列表', required: '是', dataType: 'array', example: '["1","2"]', description: '1-普货 2-带电 3-带磁 4-液体 5-粉末 6-危险品 7-木制品' }, - { id: 'goodsAttrObj', field: 'goodsAttrObj', fieldName: '电池信息', required: '是', dataType: 'object', example: '{}', description: '如果产品属性列表带电,需要填写电池信息',children:[ - { id: 'batteryType', field: 'batteryType', fieldName: '电池类型', required: '是', dataType: 'string', example: '1', description: '1:干电池 2:纽扣电池 3:锂电池 4:镍氢电池' }, - { id: 'documents', field: 'documents', fieldName: '鉴定文件', required: '否', dataType: 'string', example: '', description: '文件下载地址' }, - { id: 'power', field: 'power', fieldName: '功率', required: '是', dataType: 'string', example: '100', description: '电池锂电池、镍氢电池必填' }, - { id: 'watts', field: 'watts', fieldName: '瓦数', required: '是', dataType: 'string', example: '100', description: '电池类型为锂电池、镍氢电池必填' }, - ] - }, - { id: 'orderGoodsList', field: 'orderGoodsList', fieldName: '货物/产品明细', required: '是', dataType: 'array', example: '{}', description: '订单产品信息列表',children:[ - { id: 'boxNo', field: 'boxNo', fieldName: '货箱编号', required: '是', dataType: 'string', example: 'FBAABCD1234U000001', description: '货箱编号:如果收件地址类型是FBA,需要通过正则校验:^FBA[A-Z0-9]+U[0-9]{6}$' }, - { id: 'referenceId', field: 'referenceId', fieldName: 'PO Number', required: '否', dataType: 'string', example: '', description: '亚马逊后台的货件追踪编号' }, - { id: 'boxWeight', field: 'boxWeight', fieldName: '单箱货箱重量(KG)', required: '是', dataType: 'number', example: '10', description: '' }, - { id: 'length', field: 'length', fieldName: '货箱长度(CM)', required: '是', dataType: 'number', example: '100', description: '' }, - { id: 'width', field: 'width', fieldName: '货箱宽度(CM)', required: '是', dataType: 'number', example: '100', description: '' }, - { id: 'height', field: 'height', fieldName: '货箱高度(CM)', required: '是', dataType: 'number', example: '100', description: '' }, - { id: 'skuEnglishName', field: 'skuEnglishName', fieldName: '产品英文品名', required: '是', dataType: 'string', example: 'Bluetooth Earphones', description: '' }, - { id: 'skuName', field: 'skuName', fieldName: '产品中文品名', required: '是', dataType: 'string', example: '蓝牙耳机', description: '' }, - { id: 'declarePrice', field: 'declarePrice', fieldName: '(单个产品)申报单价', required: '是', dataType: 'number', example: '2.7', description: '' }, - { id: 'number', field: 'number', fieldName: '(单箱)申报数量', required: '是', dataType: 'integer', example: '100', description: '' }, - { id: 'exportHscode', field: 'exportHscode', fieldName: '产品海关编码(出口)', required: '是', dataType: 'string', example: '', description: '' }, - { id: 'clearanceHscode', field: 'clearanceHscode', fieldName: '产品海关编码(清关)', required: '是', dataType: 'string', example: '', description: '' }, - { id: 'brand', field: 'brand', fieldName: '产品品牌/商标', required: '是', dataType: 'string', example: '无', description: '' }, - { id: 'brandType', field: 'brandType', fieldName: '品牌类型', required: '是', dataType: 'string', example: '1', description: '1:无品牌 2:境内自主品牌 3:境内收购品牌 4:境外品牌(贴牌生产) 5:境外品牌(其他)' }, - { id: 'model', field: 'model', fieldName: '产品型号', required: '是', dataType: 'string', example: 'ABC', description: '' }, - { id: 'material', field: 'material', fieldName: '产品属性,材质', required: '是', dataType: 'string', example: '塑料', description: '' }, - { id: 'purpose', field: 'purpose', fieldName: '产品用途', required: '是', dataType: 'string', example: '手机配件', description: '' }, - { id: 'saleUrl', field: 'saleUrl', fieldName: '产品销售链接', required: '是', dataType: 'string', example: 'https://www.amazon.co.gb/dp/ABCD1234', description: '' }, - { id: 'salesPrice', field: 'salesPrice', fieldName: '产品销售价格', required: '否', dataType: 'number', example: '', description: '' }, - { id: 'picUrl', field: 'picUrl', fieldName: '产品图片链接', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'productWeight', field: 'productWeight', fieldName: '(单个产品)产品重量(kg)', required: '否', dataType: 'number', example: '', description: '' }, - { id: 'purchasePrice', field: 'purchasePrice', fieldName: '产品采购单价', required: '是', dataType: 'number', example: '2.7', description: '' }, - { id: 'asin', field: 'asin', fieldName: '产品ASIN', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'sku', field: 'sku', fieldName: '客户产品SKU', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'isElectric', field: 'isElectric', fieldName: '是否带电', required: '是', dataType: 'string', example: '1', description: '' }, - { id: 'isMagnetic', field: 'isMagnetic', fieldName: '是否带磁', required: '是', dataType: 'string', example: '0', description: '' }, - { id: 'isLiquid', field: 'isLiquid', fieldName: '是否液体', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'isPowder', field: 'isPowder', fieldName: '是否粉末', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'isHazardous', field: 'isHazardous', fieldName: '是否危险品', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'isWooden', field: 'isWooden', fieldName: '是否木制品', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'declareType', field: 'declareType', fieldName: '出口报关类型', required: '否', dataType: 'string', example: '', description: '1:买单报关 2:退税报关' }, - ] - }, - { id: 'orderReceive', field: 'orderReceive', fieldName: '收件地址类型详情', required: '是', dataType: '订单收件信息', example: '{}', description: '订单收件信息',children:[ - { id: 'fbaWarehouseCode', field: 'fbaWarehouseCode', fieldName: 'FBA仓库编号', required: '是', dataType: 'string', example: 'ORF2', description: '收件地址类型是FBA,则必填' }, - { id: 'tpWarehouseCode', field: 'tpWarehouseCode', fieldName: '第三方海外仓id', required: '是', dataType: 'string', example: '', description: '收件地址类型是第三方海外仓,则必填' }, - { id: 'inBoundCode', field: 'inBoundCode', fieldName: '第三方海外仓的入仓代码', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'state', field: 'state', fieldName: '省/州地区', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, - { id: 'city', field: 'city', fieldName: '城市', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, - { id: 'receivePostcode', field: 'receivePostcode', fieldName: '收件人邮编', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, - { id: 'address', field: 'address', fieldName: '详细地址', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, - { id: 'receiveName', field: 'receiveName', fieldName: '收件人', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, - { id: 'receivePhone', field: 'receivePhone', fieldName: '收件人电话', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, - { id: 'receiveLandline', field: 'receiveLandline', fieldName: '收件人座机号', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, - { id: 'email', field: 'email', fieldName: '邮箱', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, - { id: 'companyName', field: 'companyName', fieldName: '商业地址的公司名称', required: '是', dataType: 'string', example: '', description: '商业地址必填' }, - ] - }, - { id: 'orderTake', field: 'orderTake', fieldName: '提货信息', required: '是', dataType: '提货信息', example: '{}', description: '提货信息' ,children:[ - { id: 'warehouseId', field: 'warehouseId', fieldName: '交货仓库Id', required: '是', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '交货方式为送货到仓必填' }, - { id: 'warehouseName', field: 'warehouseName', fieldName: '交货仓库名称', required: '是', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '交货方式为送货到仓必填' }, - { id: 'province', field: 'province', fieldName: '省/州/自治区', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'city', field: 'city', fieldName: '市', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'district', field: 'district', fieldName: '区/县', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'address', field: 'address', fieldName: '详细地址', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'contact', field: 'contact', fieldName: '提货联系人', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'phone', field: 'phone', fieldName: '提货联系电话', required: '否', dataType: 'string', example: '', description: '' }, - { id: 'takeTime', field: 'takeTime', fieldName: '交货时间', required: '否', dataType: 'string', example: '', description: '' } - ] - }, - - ] - }, - { - h2Title: '取消订单', - requestUrl: '[POST] /v1/order/aafOrder/cancelOrderById', - type:"application/json", - description:"id:下单时返回的订单id", - codeLines: ` - { - "id" : "e9569b7d755c4eeea069740f997b4c05" - }`.split('\n'), - codeLines1: ` - { - "success": true, - "reTry": false, - "message": "操作成功", - "code": 200, - "data": "订单取消成功", - "timestamp": 1719836871024 - }`.split('\n'), - codeLines2: '', - tableData:[ - { - id: 'id', field: 'id', fieldName: '参数', required: '是', dataType: 'string', example: '', description: '' }, - - ] - }, - { - h2Title: '根据订单id获取订单详情', - requestUrl: '[GET] /v1/order/aafOrder/querySupplementOrderById', - type:"", - description:"orderId:下单时返回的订单id", - codeLines: ` - /v1/order/aafOrder/querySupplementOrderById?orderId=e9569b7d755c4eeea069740f997b4c05`.split('\n'), - codeLines1: ` - { - "success": true, - "reTry": false, - "message": "操作成功", - "code": 200, - "data": { - "transportMode": "AIR", - "cabinetType": "1", - "countryCode": "GB", - "orderType": null, - "countryName": "英国", - "channelId": "06f73b6cfc914fb1adb80292ca280416", - "channelName": "英国空派Send-UK-F-不递延", - "cabinetSize": null, - "custOrderNo": "2406290003", - "isUseCustOrderNo": null, - "shipmentId": "FBAABCD1234", - "goodsAttrList": [ - { - "id": "7ff7e778112148d38fa8f236a8fd4dd0", - "materialType": "2", - "materialTypeStr": "带电", - "batteryType": "1", - "batteryTypeStr": "干电池", - "power": "123", - "watts": "123", - "documents": "https://public-aaf-shenzhen-file.oss-cn-beijing.aliyuncs.com/aaf1.0/file/鉴定文件.zip", - "documentsStr": "鉴定文件.zip" - }, - { - "id": "d8394d0c13ff4ff891534694bbe1a572", - "materialType": "1", - "materialTypeStr": "普货", - "batteryType": null, - "batteryTypeStr": null, - "power": null, - "watts": null, - "documents": null, - "documentsStr": null - } - ], - "goodsAttrTypeList": [ - "2", - "1" - ], - "forecastNumber": 1, - "declareType": "3", - "receiveType": "1", - "orderReceive": { - "id": "4b3eea4d93a645e3adba35eabf28d82b", - "orderId": "c20c09dafc6d400791e0b91bc1b49d1e", - "orderNo": "aaGM2407010042", - "warehouseCode": "ORF2", - "shipmentType": "1", - "fbaWarehouseCode": "ORF2", - "fbaWarehouseName": null, - "tpWarehouseCode": null, - "tpWarehouseName": null, - "receiveCountryName": null, - "receivePostcode": null, - "state": "VA", - "city": "CHESAPEAKE", - "address": "5045 PORTSMOUTH BLVD", - "receiveAddress": "VA-CHESAPEAKE-5045 PORTSMOUTH BLVD", - "receiveName": null, - "receivePhone": null, - "receiveLandline": null, - "email": null, - "inBoundCode": null, - "companyName": null, - "isDel": "0", - "createTime": "2024-07-01 20:27:13", - "createBy": "admin null", - "updateTime": null, - "updateBy": null - }, - "takeType": "1", - "orderTake": { - "id": "b6727d5bf3e740cfb4879e48e695cd16", - "orderId": "c20c09dafc6d400791e0b91bc1b49d1e", - "orderNo": "aaGM2407010042", - "type": "1", - "contact": null, - "phone": null, - "takeTime": null, - "province": null, - "city": null, - "district": null, - "address": null, - "takeAddress": null, - "warehouseId": "00c8070b70a1475d90a4724331b85w44", - "warehouseName": "深圳市美通一号仓", - "remark": null, - "createTime": "2024-07-01 20:27:12", - "createBy": "admin null", - "updateTime": null, - "updateBy": null - }, - "orderRemark": null, - "docRemark": null, - "orderId": "c20c09dafc6d400791e0b91bc1b49d1e", - "orderDetailId": "903007bf123d492abcfca1adfc09ca89", - "orderNo": "aaGM2407010042", - "importType": "页面录入", - "isPurchaseInsurance": "0", - "insuranceType": null, - "insuranceCurrency": null, - "insuranceAmount": null, - "isSpecifyDelivery": null, - "deliveryCompanyId": null, - "deliveryCompanyStr": null, - "forecastWeight": 100.000, - "forecastVolume": 1.000, - "isArrangeInspection": null, - "goodsAttrObj": { - "batteryType": "1", - "batteryTypeStr": "干电池", - "power": "123", - "watts": "123", - "documents": "https://public-aaf-shenzhen-file.oss-cn-beijing.aliyuncs.com/aaf1.0/file/鉴定文件.zip", - "documentsStr": "鉴定文件.zip", - "batteryFileList": null - }, - "orderGoodsList": [ - { - "id": "7eb1b9b4cf5b4fa8b989eff6b28c8d77", - "orderId": "c20c09dafc6d400791e0b91bc1b49d1e", - "orderNo": "aaGM2407010042", - "boxNo": "FBAABCD1234U000002", - "shipmentId": "FBAABCD1234", - "referenceId": null, - "boxWeight": 100.000, - "length": 100.000, - "width": 100.000, - "height": 100.000, - "skuEnglishName": "Bluetooth Earphones", - "skuName": "蓝牙耳机", - "declarePrice": 2.700, - "number": 100, - "exportHscode": "123", - "clearanceHscode": "123", - "brand": "无", - "brandType": "1", - "brandTypeStr": "无品牌", - "model": "ABC", - "material": "塑料", - "purpose": "手机配件", - "saleUrl": "https://www.amazon.co.gb/dp/ABCD1234", - "salesPrice": 0.000, - "picUrl": null, - "productWeight": 0.000, - "purchasePrice": 2.700, - "asin": null, - "sku": null, - "isElectric": "0", - "isElectricStr": "否", - "isMagnetic": "0", - "isMagneticStr": "否", - "isLiquid": null, - "isLiquidStr": null, - "isPowder": null, - "isPowderStr": null, - "isHazardous": null, - "isHazardousStr": null, - "isWooden": null, - "isWoodenStr": null, - "declareType": "1", - "declareTypeStr": "买单报关", - "description": null, - "productId": null, - "country": null, - "addtionalCode": null, - "specialCode": null, - "specialRate": null, - "preTariff": null, - "taxRate": null, - "unit": null, - "costPrice": null, - "totalPrice": null, - "grossWeight": null, - "netWeight": null, - "volume": null, - "materialRate": null, - "maker": null, - "makerAddress": null, - "remark": null, - "mixed": null, - "sort": null, - "size": null, - "isVat": null, - "invoiceCode": null, - "declareTotalPrice": null, - "declareNetWeight": null, - "isDel": "0", - "createTime": "2024-07-01T12:27:13.000+00:00", - "createBy": "admin null", - "updateTime": null, - "updateBy": null - } - ], - "taxRefundInfo": null, - "taxRefundInfoStr": null, - "taxRefundFileList": null, - "taxRefundRemark": "1", - "taxType": "1", - "taxTypeStr": "不包税", - "vatNo": null, - "eoriNo": null, - "einNo": null, - "taxNo": null, - "taxId": null - }, - "timestamp": 1719885098599 - }`.split('\n'), - codeLines2: '', - tableData:[{ - id: 'orderId', field: 'orderId', fieldName: '参数', required: '是', dataType: 'string', example: '', description: '' }, ] - }, - { - h2Title: '获取渠道信息', - requestUrl: '[GET] /v1/sys/bdChannel/queryAllChannelList', - type:"", - description:"无需传参", - codeLines: ` - /v1/sys/bdChannel/queryAllChannelList`.split('\n'), - codeLines1: ` - { - "success": true, - "reTry": false, - "message": "操作成功", - "code": 200, - "data": [ - { - "id": "0255c7d5c717461db6deebee27d00bac", - "channelName": "加拿大海运快线-普船卡派", - "transportMode": "OCEAN" - }, - { - "id": "05c91b525c9443039d40821251feb147", - "channelName": "德国空派Send-DE-B-Slow-不递延", - "transportMode": "AIR" - }, - { - "id": "06f73b6cfc914fb1adb80292ca280416", - "channelName": "英国空派Send-UK-F-不递延", - "transportMode": "AIR" - }, - { - "id": "07d664c49d124f41a4dabc31259ff03f", - "channelName": "加拿大海运快线-美森快递派", - "transportMode": "OCEAN" - } - ] - } - `.split('\n'), - codeLines2: ` - success:请求成功标志,true仅代表请求成功,不代表通过 - message:请求描述 - code:200则代表请求通过,完成下单,500则代表校验未通过 - data:返回数据 - id:渠道id - channelName:渠道名称 - transportMode:运输方式:OCEAN-海运, AIR-空运, RAIL-铁路, ROAD-卡航 - `.split('\n'), - tableData:[ ] - }, - { - h2Title: '获取FBA仓库编码', - requestUrl: '[GET] /v1/sys/bdFbaCode/queryAllFbaCode', - type:"", - description:"无需传参", - codeLines: ` - /v1/sys/bdFbaCode/queryAllFbaCode`.split('\n'), - codeLines1: ` - { - "success": true, - "reTry": false, - "message": "操作成功", - "code": 200, - "data": [ - "XFR2", - "SCK4", - "ITX2", - "BWI4", - "ACY2", - "DFW8", - "EWR9", - "VESK", - "TPFD", - "SAMB", - "MAA5", - "CAE1" - ] - } - `.split('\n'), - codeLines2: ` - success:请求成功标志,true仅代表请求成功,不代表通过 - message:请求描述 - code:200则代表请求通过,完成下单,500则代表校验未通过 - data:FBA仓库编码列表 - `.split('\n'), - tableData:[ ] - }, - { - h2Title: '获取订单轨迹', - requestUrl: '[GET] /v1/track/aafOrderTrack/queryByOrderIdForAnonymous', - type:"", - description:"orderNo:下单时返回的订单号", - codeLines: ` - /v1/track/aafOrderTrack/queryByOrderIdForAnonymous?orderNo=2405090002`.split('\n'), - codeLines1: ` - { - "success":true, - "reTry":false, - "message":"操作成功", - "code":200, - "data":[ - { - "trackNode":"1400", - "trackNodeStr":"到港", - "location":"PRINCERUPERT,BC", - "expand":false, - "timeLessInfoVO":{ - "transportTime":"3天9小时45分钟", - "transportTimeCompare":null, - "transportTimeCompareType":null - }, - "childTrackNodeList":[ - { - "trackNode":"1401", - "trackNodeStr":"已到港", - "eventTime":"2024-05-1300:00:00", - "eventTimeType":"2", - "location":"PRINCERUPERT,BC" - } - ] - }, - { - "trackNode":"0300", - "trackNodeStr":"到仓", - "location":"国内地点", - "expand":false, - "timeLessInfoVO":{ - "transportTime":"0天0小时1分钟", - "transportTimeCompare":null, - "transportTimeCompareType":null - }, - "childTrackNodeList":[ - { - "trackNode":"0301", - "trackNodeStr":"已到仓", - "eventTime":"2024-05-0914:14:46", - "eventTimeType":"1", - "location":"国内地点" - } - ] - }, - { - "trackNode":"0100", - "trackNodeStr":"下单", - "location":"国内地点", - "expand":false, - "timeLessInfoVO":null, - "childTrackNodeList":[ - { - "trackNode":"0101", - "trackNodeStr":"已下单", - "eventTime":"2024-05-0914:13:35", - "eventTimeType":"1", - "location":"国内地点" - } - ] - } - ], - "timestamp":1719974617607 - } - `.split('\n'), - codeLines2: ` - success:请求成功标志,true仅代表请求成功,不代表通过 - message:请求描述 - code:200则代表请求通过,完成下单,500则代表校验未通过 - data:订单轨迹数据列表 - `.split('\n'), - tableData:[ - { id: 'trackNode', field: 'trackNode', fieldName: '节点类型', required: '是', dataType: 'String', example: '1400', description: '节点类型' }, - { id: 'trackNodeStr', field: 'trackNodeStr', fieldName: '节点类型', required: '是', dataType: 'String', example: '到港', description: '节点类型' }, - { id: 'location', field: 'location', fieldName: '地点', required: '是', dataType: 'String', example: 'PRINCE RUPERT, BC', description: '地点' }, - { id: 'expand', field: 'expand', fieldName: '前端是否能展开子节点', required: '是', dataType: 'Boolean', example: 'false', description: '前端是否能展开子节点' }, - { id: 'timeLessInfoVO', field: 'timeLessInfoVO', fieldName: '运输时长信息', required: '否', dataType: 'Object', example: '见下方示例', description: '运输时长信息',children:[ - { id: 'transportTime', field: 'transportTime', fieldName: '运输时长', required: '是', dataType: 'String', example: '3天9小时45分钟', description: '运输时长' }, - { id: 'transportTimeCompare', field: 'transportTimeCompare', fieldName: '预计时长对比', required: '否', dataType: 'String', example: '提前3天9小时45分钟', description: '预计时长对比' }, - { id: 'transportTimeCompareType', field: 'transportTimeCompareType', fieldName: '预计时长对比类型', required: '否', dataType: 'String', example: '1', description: '预计时长对比类型 1、提前 2、延迟' }, - ] }, - { id: 'childTrackNodeList', field: 'childTrackNodeList', fieldName: '订单轨迹子节点', required: '是', dataType: 'array', example: '见下方示例', description: '订单轨迹子节点',children:[ - { id: 'trackNode', field: 'trackNode', fieldName: '节点类型', required: '是', dataType: 'String', example: '1401', description: '节点类型' }, - { id: 'trackNodeStr', field: 'trackNodeStr', fieldName: '节点类型', required: '是', dataType: 'String', example: '已到港', description: '节点类型' }, - { id: 'eventTime', field: 'eventTime', fieldName: '事件发生时间', required: '是', dataType: 'Date', example: '2024-05-13 00:00:00', description: '事件发生时间' }, - { id: 'eventTimeType', field: 'eventTimeType', fieldName: '时间发生时间类型', required: '是', dataType: 'String', example: '2', description: '时间发生时间类型 1、实际发生 2、预计发生' }, - { id: 'location', field: 'location', fieldName: '地点', required: '是', dataType: 'String', example: 'PRINCE RUPERT, BC', description: '地点' }, - ] }, - - ] - }, - ], - }, - { - api:'1-1', - selectedVersion:'1.0', - mainTitle: '账号验证', - h2Title1: '1-1 HTTP请求头格式', - description: 'ACCESS_TOKEN 可以联系客服创建,在对应用户的 API 密钥中创建。每一个 api 请求都要在 HTTP 请求头中包含 密钥,具体格式查看上面的 HTTP 请求头格式。', - codeLines: ` Authorization: Bearer ACCESS_TOKEN - Content-Type: application/json - Accept: application/json - Accept-Language: zh-CN`.split('\n'), - apiDesc:[ - { - h2Title: '取消订单', - requestUrl: '[POST] /v1/order/aafOrder/cancelOrderById', - type:"application/json", - description:"id:下单时返回的订单id", - codeLines: ` - { - "id" : "e9569b7d755c4eeea069740f997b4c05" - }`.split('\n'), - codeLines1: ` - { + "orderTake": { + "warehouseId": "00c8070b70a1475d90a4724331b85w44", + "province": null, + "city": null, + "district": null, + "address": null, + "contact": null, + "phone": null, + "takeTime": null + } + }`.split('\n'), + codeLines1: ` { "success": true, "reTry": false, - "message": "操作成功", + "message": "下单成功,您的订单是:AABB2407010041", "code": 200, - "data": "订单取消成功", - "timestamp": 1719836871024 + "data": "8175052ed64143f093c401feb91346ec", + "timestamp": 1719836214170 }`.split('\n'), - codeLines2: '', + codeLines2: ` success:请求成功标志,true仅代表请求成功,不代表通过 + message:请求描述 + code:200则代表请求通过,完成下单,500则代表校验未通过 + data:订单id,请求成功会返回订单的id`.split('\n'), tableData:[ - { - id: 'id', field: 'id', fieldName: '参数', required: '是', dataType: 'string', example: '', description: '' }, + { id: 'transportMode', field: 'transportMode', fieldName: '运输方式', required: '是', dataType: 'string', example: 'AIR', description: '海运-OCEAN, 空运-AIR, 铁路-RAIL, 卡航-ROAD' }, + { id: 'countryCode', field: 'countryCode', fieldName: '国家编码', required: '是', dataType: 'string', example: 'GB', description: '国家二字码' }, + { id: 'channelId', field: 'channelId', fieldName: '渠道id', required: '是', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '通过渠道信息接口获取' }, + { id: 'custOrderNo', field: 'custOrderNo', fieldName: '客户订单号', required: '否', dataType: 'string', example: 'GZGM2406171807', description: '客户订单号' }, + { id: 'isPurchaseInsurance', field: 'isPurchaseInsurance', fieldName: '是否购买保险', required: '是', dataType: 'string', example: '1', description: '0:否 1:是' }, + { id: 'insuranceType', field: 'insuranceType', fieldName: '投保类型', required: '否', dataType: 'string', example: '1', description: '1-上架险,2-签收险' }, + { id: 'insuranceCurrency', field: 'insuranceCurrency', fieldName: '保险币种', required: '否', dataType: 'string', example: 'CNY', description: '币种' }, + { id: 'insuranceAmount', field: 'insuranceAmount', fieldName: '购买保险金额', required: '否', dataType: 'string', example: '500.00', description: '金额' }, + { id: 'isSpecifyDelivery', field: 'isSpecifyDelivery', fieldName: '是否指定末端快递', required: '否', dataType: 'string', example: '0', description: '0:否 1:是' }, + { id: 'deliveryCompanyId', field: 'deliveryCompanyId', fieldName: '快递公司id', required: '否', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '根据快递公司信息接口获取' }, + { id: 'forecastNumber', field: 'forecastNumber', fieldName: '预报件数', required: '是', dataType: 'integer(int32)', example: '10', description: '订单箱数' }, + { id: 'forecastWeight', field: 'forecastWeight', fieldName: '预报重量', required: '是', dataType: 'number', example: '50.00', description: '重量(KG)' }, + { id: 'forecastVolume', field: 'forecastVolume', fieldName: '预报体积', required: '是', dataType: 'number', example: '1.00', description: '体积(M³)' }, + { id: 'isArrangeInspection', field: 'isArrangeInspection', fieldName: '是否安排商检', required: '否', dataType: 'string', example: '0', description: '0:否 1:是' }, + { id: 'declareType', field: 'declareType', fieldName: '报关方式', required: '是', dataType: 'string', example: '1', description: '1:买单报关 2:退税报关 3:买单+退税' }, + { id: 'taxRefundInfo', field: 'taxRefundInfo', fieldName: '退税资料url', required: '否', dataType: 'string', example: 'https://public-shenzhen-file.oss-cn-beijing.aliyuncs.com/aaf1.0/file/退税资料.zip', description: '文件下载地址' }, + { id: 'taxRefundRemark', field: 'taxRefundRemark', fieldName: '退税资料说明', required: '是', dataType: 'string', example: '1', description: '1-一对多(单订单多份资料), 2-一对一(单订单一份资料), 3-多对多(合并报关,多份资料), 4-多对一(合并报关,一份资料);报关方式为买单+退税则必填' }, + { id: 'taxType', field: 'taxType', fieldName: '交税方式', required: '是', dataType: 'string', example: '1', description: '1-不包税,2-包税,3-自主税号,4-自税递延' }, + { id: 'receiveType', field: 'receiveType', fieldName: '收件地址类型', required: '是', dataType: 'string', example: '1', description: '1:FBA地址 2:第三方海外仓 3:商业地址 4:住宅地址' }, + { id: 'takeType', field: 'takeType', fieldName: '交货方式', required: '是', dataType: 'string', example: '1', description: '1:送货到仓 2:上门提货' }, + { id: 'orderRemark', field: 'orderRemark', fieldName: '客户订单备注', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'goodsAttrTypeList', field: 'goodsAttrTypeList', fieldName: '产品属性列表', required: '是', dataType: 'array', example: '["1","2"]', description: '1-普货 2-带电 3-带磁 4-液体 5-粉末 6-危险品 7-木制品' }, + { id: 'goodsAttrObj', field: 'goodsAttrObj', fieldName: '电池信息', required: '是', dataType: 'object', example: '{}', description: '如果产品属性列表带电,需要填写电池信息',children:[ + { id: 'batteryType', field: 'batteryType', fieldName: '电池类型', required: '是', dataType: 'string', example: '1', description: '1:干电池 2:纽扣电池 3:锂电池 4:镍氢电池' }, + { id: 'documents', field: 'documents', fieldName: '鉴定文件', required: '否', dataType: 'string', example: '', description: '文件下载地址' }, + { id: 'power', field: 'power', fieldName: '功率', required: '是', dataType: 'string', example: '100', description: '电池锂电池、镍氢电池必填' }, + { id: 'watts', field: 'watts', fieldName: '瓦数', required: '是', dataType: 'string', example: '100', description: '电池类型为锂电池、镍氢电池必填' }, + ] + }, + { id: 'orderGoodsList', field: 'orderGoodsList', fieldName: '货物/产品明细', required: '是', dataType: 'array', example: '{}', description: '订单产品信息列表',children:[ + { id: 'boxNo', field: 'boxNo', fieldName: '货箱编号', required: '是', dataType: 'string', example: 'FBAABCD1234U000001', description: '货箱编号:如果收件地址类型是FBA,需要通过正则校验:^FBA[A-Z0-9]+U[0-9]{6}$' }, + { id: 'referenceId', field: 'referenceId', fieldName: 'PO Number', required: '否', dataType: 'string', example: '', description: '亚马逊后台的货件追踪编号' }, + { id: 'boxWeight', field: 'boxWeight', fieldName: '单箱货箱重量(KG)', required: '是', dataType: 'number', example: '10', description: '' }, + { id: 'length', field: 'length', fieldName: '货箱长度(CM)', required: '是', dataType: 'number', example: '100', description: '' }, + { id: 'width', field: 'width', fieldName: '货箱宽度(CM)', required: '是', dataType: 'number', example: '100', description: '' }, + { id: 'height', field: 'height', fieldName: '货箱高度(CM)', required: '是', dataType: 'number', example: '100', description: '' }, + { id: 'skuEnglishName', field: 'skuEnglishName', fieldName: '产品英文品名', required: '是', dataType: 'string', example: 'Bluetooth Earphones', description: '' }, + { id: 'skuName', field: 'skuName', fieldName: '产品中文品名', required: '是', dataType: 'string', example: '蓝牙耳机', description: '' }, + { id: 'declarePrice', field: 'declarePrice', fieldName: '(单个产品)申报单价', required: '是', dataType: 'number', example: '2.7', description: '' }, + { id: 'number', field: 'number', fieldName: '(单箱)申报数量', required: '是', dataType: 'integer', example: '100', description: '' }, + { id: 'exportHscode', field: 'exportHscode', fieldName: '产品海关编码(出口)', required: '是', dataType: 'string', example: '', description: '' }, + { id: 'clearanceHscode', field: 'clearanceHscode', fieldName: '产品海关编码(清关)', required: '是', dataType: 'string', example: '', description: '' }, + { id: 'brand', field: 'brand', fieldName: '产品品牌/商标', required: '是', dataType: 'string', example: '无', description: '' }, + { id: 'brandType', field: 'brandType', fieldName: '品牌类型', required: '是', dataType: 'string', example: '1', description: '1:无品牌 2:境内自主品牌 3:境内收购品牌 4:境外品牌(贴牌生产) 5:境外品牌(其他)' }, + { id: 'model', field: 'model', fieldName: '产品型号', required: '是', dataType: 'string', example: 'ABC', description: '' }, + { id: 'material', field: 'material', fieldName: '产品属性,材质', required: '是', dataType: 'string', example: '塑料', description: '' }, + { id: 'purpose', field: 'purpose', fieldName: '产品用途', required: '是', dataType: 'string', example: '手机配件', description: '' }, + { id: 'saleUrl', field: 'saleUrl', fieldName: '产品销售链接', required: '是', dataType: 'string', example: 'https://www.amazon.co.gb/dp/ABCD1234', description: '' }, + { id: 'salesPrice', field: 'salesPrice', fieldName: '产品销售价格', required: '否', dataType: 'number', example: '', description: '' }, + { id: 'picUrl', field: 'picUrl', fieldName: '产品图片链接', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'productWeight', field: 'productWeight', fieldName: '(单个产品)产品重量(kg)', required: '否', dataType: 'number', example: '', description: '' }, + { id: 'purchasePrice', field: 'purchasePrice', fieldName: '产品采购单价', required: '是', dataType: 'number', example: '2.7', description: '' }, + { id: 'asin', field: 'asin', fieldName: '产品ASIN', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'sku', field: 'sku', fieldName: '客户产品SKU', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'isElectric', field: 'isElectric', fieldName: '是否带电', required: '是', dataType: 'string', example: '1', description: '' }, + { id: 'isMagnetic', field: 'isMagnetic', fieldName: '是否带磁', required: '是', dataType: 'string', example: '0', description: '' }, + { id: 'isLiquid', field: 'isLiquid', fieldName: '是否液体', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'isPowder', field: 'isPowder', fieldName: '是否粉末', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'isHazardous', field: 'isHazardous', fieldName: '是否危险品', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'isWooden', field: 'isWooden', fieldName: '是否木制品', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'declareType', field: 'declareType', fieldName: '出口报关类型', required: '否', dataType: 'string', example: '', description: '1:买单报关 2:退税报关' }, + ] + }, + { id: 'orderReceive', field: 'orderReceive', fieldName: '收件地址类型详情', required: '是', dataType: '订单收件信息', example: '{}', description: '订单收件信息',children:[ + { id: 'fbaWarehouseCode', field: 'fbaWarehouseCode', fieldName: 'FBA仓库编号', required: '是', dataType: 'string', example: 'ORF2', description: '收件地址类型是FBA,则必填' }, + { id: 'tpWarehouseCode', field: 'tpWarehouseCode', fieldName: '第三方海外仓id', required: '是', dataType: 'string', example: '', description: '收件地址类型是第三方海外仓,则必填' }, + { id: 'inBoundCode', field: 'inBoundCode', fieldName: '第三方海外仓的入仓代码', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'state', field: 'state', fieldName: '省/州地区', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, + { id: 'city', field: 'city', fieldName: '城市', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, + { id: 'receivePostcode', field: 'receivePostcode', fieldName: '收件人邮编', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, + { id: 'address', field: 'address', fieldName: '详细地址', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, + { id: 'receiveName', field: 'receiveName', fieldName: '收件人', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, + { id: 'receivePhone', field: 'receivePhone', fieldName: '收件人电话', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, + { id: 'receiveLandline', field: 'receiveLandline', fieldName: '收件人座机号', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, + { id: 'email', field: 'email', fieldName: '邮箱', required: '是', dataType: 'string', example: '', description: '商业地址,住宅地址必填' }, + { id: 'companyName', field: 'companyName', fieldName: '商业地址的公司名称', required: '是', dataType: 'string', example: '', description: '商业地址必填' }, + ] + }, + { id: 'orderTake', field: 'orderTake', fieldName: '提货信息', required: '是', dataType: '提货信息', example: '{}', description: '提货信息' ,children:[ + { id: 'warehouseId', field: 'warehouseId', fieldName: '交货仓库Id', required: '是', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '交货方式为送货到仓必填' }, + { id: 'warehouseName', field: 'warehouseName', fieldName: '交货仓库名称', required: '是', dataType: 'string', example: '73d277d502024515b92ecf9e95c048df', description: '交货方式为送货到仓必填' }, + { id: 'province', field: 'province', fieldName: '省/州/自治区', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'city', field: 'city', fieldName: '市', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'district', field: 'district', fieldName: '区/县', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'address', field: 'address', fieldName: '详细地址', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'contact', field: 'contact', fieldName: '提货联系人', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'phone', field: 'phone', fieldName: '提货联系电话', required: '否', dataType: 'string', example: '', description: '' }, + { id: 'takeTime', field: 'takeTime', fieldName: '交货时间', required: '否', dataType: 'string', example: '', description: '' } + ] + }, ] }, ], }, { - api:'1-2', - selectedVersion:'1.0', - mainTitle: '账号验证', - h2Title1: '1-1 HTTP请求头格式', - description: 'ACCESS_TOKEN 可以联系客服创建,在对应用户的 API 密钥中创建。每一个 api 请求都要在 HTTP 请求头中包含 密钥,具体格式查看上面的 HTTP 请求头格式。', - codeLines: ` Authorization: Bearer ACCESS_TOKEN - Content-Type: application/json - Accept: application/json - Accept-Language: zh-CN`.split('\n'), + api:'2-1', + apiAdd:'2', + selectedVersion:'V1.0', + mainTitle: '常规接口HTTP请求头格式', + h2Title1: '', + description: '', + codeLines: ` Authorization:Bearer ACCESS_TOKEN + Content-Type:application/json`.split('\n'), apiDesc:[ { h2Title: '根据订单id获取订单详情', @@ -1030,15 +622,14 @@ export default { ], }, { - api:'1-3', - selectedVersion:'1.0', - mainTitle: '账号验证', - h2Title1: '1-1 HTTP请求头格式', - description: 'ACCESS_TOKEN 可以联系客服创建,在对应用户的 API 密钥中创建。每一个 api 请求都要在 HTTP 请求头中包含 密钥,具体格式查看上面的 HTTP 请求头格式。', - codeLines: ` Authorization: Bearer ACCESS_TOKEN - Content-Type: application/json - Accept: application/json - Accept-Language: zh-CN`.split('\n'), + api:'2-2', + apiAdd:'3', + selectedVersion:'V1.0', + mainTitle: '常规接口HTTP请求头格式', + h2Title1: '', + description: '', + codeLines: ` Authorization:Bearer ACCESS_TOKEN + Content-Type:application/json`.split('\n'), apiDesc:[ { h2Title: '获取渠道信息', @@ -1091,15 +682,14 @@ export default { ], }, { - api:'1-4', - selectedVersion:'1.0', - mainTitle: '账号验证', - h2Title1: '1-1 HTTP请求头格式', - description: 'ACCESS_TOKEN 可以联系客服创建,在对应用户的 API 密钥中创建。每一个 api 请求都要在 HTTP 请求头中包含 密钥,具体格式查看上面的 HTTP 请求头格式。', - codeLines: ` Authorization: Bearer ACCESS_TOKEN - Content-Type: application/json - Accept: application/json - Accept-Language: zh-CN`.split('\n'), + api:'2-3', + apiAdd:'4', + selectedVersion:'V1.0', + mainTitle: '常规接口HTTP请求头格式', + h2Title1: '', + description: '', + codeLines: ` Authorization:Bearer ACCESS_TOKEN + Content-Type:application/json`.split('\n'), apiDesc:[ { h2Title: '获取FBA仓库编码', @@ -1141,23 +731,22 @@ export default { ], }, { - api:'1-5', - selectedVersion:'1.0', - mainTitle: '账号验证', - h2Title1: '1-1 HTTP请求头格式', - description: 'ACCESS_TOKEN 可以联系客服创建,在对应用户的 API 密钥中创建。每一个 api 请求都要在 HTTP 请求头中包含 密钥,具体格式查看上面的 HTTP 请求头格式。', - codeLines: ` Authorization: Bearer ACCESS_TOKEN - Content-Type: application/json - Accept: application/json - Accept-Language: zh-CN`.split('\n'), + api:'2-4', + apiAdd:'5', + selectedVersion:'V1.0', + mainTitle: '常规接口HTTP请求头格式', + h2Title1: '', + description: '', + codeLines: ` Authorization:Bearer ACCESS_TOKEN + Content-Type:application/json`.split('\n'), apiDesc:[ { h2Title: '获取订单轨迹', - requestUrl: '[GET] /v1/track/aafOrderTrack/queryByOrderIdForAnonymous', + requestUrl: '[GET] /v1/track/aafOrderTrack/getTrackInfo', type:"", description:"orderNo:下单时返回的订单号", codeLines: ` - /v1/track/aafOrderTrack/queryByOrderIdForAnonymous?orderNo=2405090002`.split('\n'), + /v1/track/aafOrderTrack/getTrackInfo?orderNo=2405090002`.split('\n'), codeLines1: ` { "success":true, @@ -1254,23 +843,26 @@ export default { ], }, { - api:'1-6', - selectedVersion:'1.0', - mainTitle: '账号验证', - h2Title1: '1-1 HTTP请求头格式', - description: 'ACCESS_TOKEN 可以联系客服创建,在对应用户的 API 密钥中创建。每一个 api 请求都要在 HTTP 请求头中包含 密钥,具体格式查看上面的 HTTP 请求头格式。', - codeLines: ` Authorization: Bearer ACCESS_TOKEN - Content-Type: application/json - Accept: application/json - Accept-Language: zh-CN`.split('\n'), + api:'2-5', + apiAdd:'6', + selectedVersion:'V1.0', + mainTitle: '常规接口HTTP请求头格式', + h2Title1: '', + description: '', + codeLines: ` Authorization:Bearer ACCESS_TOKEN + Content-Type:application/json`.split('\n'), apiDesc:[ - { - h2Title: '获取订单轨迹', - requestUrl: '[GET] /v1/track/aafOrderTrack/queryByOrderIdForAnonymous', - type:"", - description:"orderNo:下单时返回的订单号", - codeLines: ` - /v1/track/aafOrderTrack/queryByOrderIdForAnonymous?orderNo=2405090002`.split('\n'), + { + h2Title: '获取第三方海外仓信息', + requestUrl: '[POST] /v1/sys/bdThirdOverseasWarehouse/queryList', + type:"application/json", + description:"", + codeLines: ` + { + "country":"US", + "warehouseCode":"MT", + "company":"Amazon" + }`.split('\n'), codeLines1: ` { "success":true, @@ -1278,116 +870,98 @@ export default { "message":"操作成功", "code":200, "data":[ - { - "trackNode":"1400", - "trackNodeStr":"到港", - "location":"PRINCERUPERT,BC", - "expand":false, - "timeLessInfoVO":{ - "transportTime":"3天9小时45分钟", - "transportTimeCompare":null, - "transportTimeCompareType":null - }, - "childTrackNodeList":[ - { - "trackNode":"1401", - "trackNodeStr":"已到港", - "eventTime":"2024-05-1300:00:00", - "eventTimeType":"2", - "location":"PRINCERUPERT,BC" - } - ] - }, - { - "trackNode":"0300", - "trackNodeStr":"到仓", - "location":"国内地点", - "expand":false, - "timeLessInfoVO":{ - "transportTime":"0天0小时1分钟", - "transportTimeCompare":null, - "transportTimeCompareType":null - }, - "childTrackNodeList":[ - { - "trackNode":"0301", - "trackNodeStr":"已到仓", - "eventTime":"2024-05-0914:14:46", - "eventTimeType":"1", - "location":"国内地点" - } - ] - }, - { - "trackNode":"0100", - "trackNodeStr":"下单", - "location":"国内地点", - "expand":false, - "timeLessInfoVO":null, - "childTrackNodeList":[ - { - "trackNode":"0101", - "trackNodeStr":"已下单", - "eventTime":"2024-05-0914:13:35", - "eventTimeType":"1", - "location":"国内地点" - } - ] - } + { + "id":"3dab6656127c4622a715a3a23fe98db7", + "warehouseCode":"MT0004", + "country":"US", + "countryStr":"US-美国", + "address":"广东省", + "company":"Amazon" + } ], - "timestamp":1719974617607 - } - `.split('\n'), + "timestamp":1720063477558 + }`.split('\n'), codeLines2: ` success:请求成功标志,true仅代表请求成功,不代表通过 message:请求描述 code:200则代表请求通过,完成下单,500则代表校验未通过 - data:订单轨迹数据列表 + data:返回第三方海外仓数据列表 + id:主键id + warehouseCode:仓库代码 + country:国家二字码 + countryStr:国家名称 + address:仓库地址 + company:仓库所属公司 `.split('\n'), tableData:[ - { id: 'trackNode', field: 'trackNode', fieldName: '节点类型', required: '是', dataType: 'String', example: '1400', description: '节点类型' }, - { id: 'trackNodeStr', field: 'trackNodeStr', fieldName: '节点类型', required: '是', dataType: 'String', example: '到港', description: '节点类型' }, - { id: 'location', field: 'location', fieldName: '地点', required: '是', dataType: 'String', example: 'PRINCE RUPERT, BC', description: '地点' }, - { id: 'expand', field: 'expand', fieldName: '前端是否能展开子节点', required: '是', dataType: 'Boolean', example: 'false', description: '前端是否能展开子节点' }, - { id: 'timeLessInfoVO', field: 'timeLessInfoVO', fieldName: '运输时长信息', required: '否', dataType: 'Object', example: '见下方示例', description: '运输时长信息',children:[ - { id: 'transportTime', field: 'transportTime', fieldName: '运输时长', required: '是', dataType: 'String', example: '3天9小时45分钟', description: '运输时长' }, - { id: 'transportTimeCompare', field: 'transportTimeCompare', fieldName: '预计时长对比', required: '否', dataType: 'String', example: '提前3天9小时45分钟', description: '预计时长对比' }, - { id: 'transportTimeCompareType', field: 'transportTimeCompareType', fieldName: '预计时长对比类型', required: '否', dataType: 'String', example: '1', description: '预计时长对比类型 1、提前 2、延迟' }, - ] }, - { id: 'childTrackNodeList', field: 'childTrackNodeList', fieldName: '订单轨迹子节点', required: '是', dataType: 'array', example: '见下方示例', description: '订单轨迹子节点',children:[ - { id: 'trackNode', field: 'trackNode', fieldName: '节点类型', required: '是', dataType: 'String', example: '1401', description: '节点类型' }, - { id: 'trackNodeStr', field: 'trackNodeStr', fieldName: '节点类型', required: '是', dataType: 'String', example: '已到港', description: '节点类型' }, - { id: 'eventTime', field: 'eventTime', fieldName: '事件发生时间', required: '是', dataType: 'Date', example: '2024-05-13 00:00:00', description: '事件发生时间' }, - { id: 'eventTimeType', field: 'eventTimeType', fieldName: '时间发生时间类型', required: '是', dataType: 'String', example: '2', description: '时间发生时间类型 1、实际发生 2、预计发生' }, - { id: 'location', field: 'location', fieldName: '地点', required: '是', dataType: 'String', example: 'PRINCE RUPERT, BC', description: '地点' }, - ] }, - - ] + {id: 'country', field: 'country', fieldName: '国家', required: '否', dataType: 'string', example: 'US', description: '仓库所在国家,传国家二字码' }, + {id: 'warehouseCode', field: 'warehouseCode', fieldName: '仓库编码', required: '否', dataType: 'string', example: 'MT1001', description: '仓库代码,模糊查询' }, + {id: 'company', field: 'company', fieldName: '仓库所属公司', required: '否', dataType: 'string', example: 'Amazon', description: '仓库所属公司,模糊查询' }, + + ] + }, + ], + }, + { + api:'2-6', + apiAdd:'7', + selectedVersion:'V1.0', + mainTitle: '常规接口HTTP请求头格式', + h2Title1: '', + description: '', + codeLines: ` Authorization:Bearer ACCESS_TOKEN + Content-Type:application/json`.split('\n'), + apiDesc:[ + { + h2Title: '取消订单', + requestUrl: '[POST] /v1/order/aafOrder/cancelOrderById', + type:"application/json", + description:"id:下单时返回的订单id", + codeLines: ` + { + "id" : "e9569b7d755c4eeea069740f997b4c05" + }`.split('\n'), + codeLines1: ` + { + "success": true, + "reTry": false, + "message": "操作成功", + "code": 200, + "data": "订单取消成功", + "timestamp": 1719836871024 + }`.split('\n'), + codeLines2: '', + tableData:[ + { + id: 'id', field: 'id', fieldName: '参数', required: '是', dataType: 'string', example: '', description: '' }, + + ] }, ], }, { api:'1-0', - selectedVersion:'新智慧1.0', - mainTitle: '账号验证', - h2Title1: '1-1 HTTP请求头格式', - description: 'ACCESS_TOKEN 可以联系客服创建,在对应用户的 API 密钥中创建。每一个 api 请求都要在 HTTP 请求头中包含 密钥,具体格式查看上面的 HTTP 请求头格式。', - codeLines: ` Authorization: Bearer ACCESS_TOKEN - Content-Type: application/json - Accept: application/json - Accept-Language: zh-CN`.split('\n'), + apiAdd:'1', + selectedVersion:'oldSystem', + mainTitle: '常规接口HTTP请求头格式', + h2Title1: '', + description: '', + codeLines: ` Authorization:Bearer ACCESS_TOKEN + Content-Type:application/json`.split('\n'), apiDesc:[ { h2Title: '创建运单', requestUrl: '[POST] http://aafexp.nextsls.com/api/v5/shipment/create', type:"", description:"", + description1: '注:蓝色字体为兼容老系统和新接口所需的新增字段', + codeLines: ` { "shipment": { "service": "B2B", - "shipmentType": "1", - "transportMode": "AIR", + "shipmentType": "1", + "transportMode": "AIR", "store_id": "", "client_reference": "", "parcel_count": 2, @@ -1600,7 +1174,7 @@ export default { { id: 'cod_currency', field: 'cod_currency', fieldName: '代收币种', required: '否', dataType: 'String', example: '', description: '' }, { id: 'declaration_currency', field: 'declaration_currency', fieldName: '申报币种', required: '否', dataType: 'String', example: '', description: '' }, { id: 'amazon_ref_id', field: 'amazon_ref_id', fieldName: 'Amazon Reference ID', required: '否', dataType: 'String', example: '', description: '' }, - { id: 'to_warehouse_code', field: 'to_warehouse_code', fieldName: '仓库代码', required: '否', dataType: 'String', example: '', description: '' }, + { id: 'to_warehouse_code', field: 'to_warehouse_code', fieldName: '仓库代码', required: '否', dataType: 'String', example: '', description: '收件地址类型是FBA/海外仓,则必填,数据从获取FBA仓库编码/获取海外仓仓库编码接口中获取' }, { id: 'to_address', field: 'to_address', fieldName: '收件人地址', required: '是', dataType: 'Address Object', example: '', description: '' }, { id: 'from_address', field: 'from_address', fieldName: '发件人地址', required: '条件', dataType: 'Address Object', example: '', description: '选填,如果填了,Address Object必填项要填上' }, { id: 'parcels', field: 'parcels', fieldName: '箱子', required: '是', dataType: 'Parcels Object Array', example: '', description: '' }, @@ -1671,10 +1245,31 @@ export default { ], }, // 其他数据对象 - ]; + ] + }; + }, + computed: { + codeLines() { + return this.code.split('\n'); + }, + }, + methods: { + rowClassName({ row, rowIndex }) { + const selected = this.$route.query.selectedVersion; + // console.log(selectedVersion,row, rowIndex,'selectedVersionselectedVersion') + if ((row.id === 'transportMode' || row.id === 'shipmentType')&&selected==='oldSystem') { + return 'blueTips'; + } + }, + fetchData(api,selected) { + console.log(api,selected,'selectedVe666rsionselectedVersion') + // 模拟 API 数据,根据实际情况修改 + + + console.log(api,'api,',selected,'selected') // 根据 api 参数筛选数据 - this.apiData = allData.filter(item => item.api.includes(api)&&item.selectedVersion.includes(selected)); + this.apiData = this.allData.filter(item => item.api === api && item.selectedVersion === selected); }, copyToClipboard (text) { const code = text.join('\n'); @@ -1722,25 +1317,17 @@ export default { created() { const api = this.$route.query.api; const selectedVersion = this.$route.query.selectedVersion; - if (api&&selectedVersion) { + if (api) { this.fetchData(api,selectedVersion); } }, watch: { // 监听 api 变化 - '$route.query.api': { - handler(newApi) { - if (newApi) { - this.fetchData(newApi, this.$route.query.selectedVersion); - } - }, - immediate: true - }, - // 监听 selectedVersion 变化 - '$route.query.selectedVersion': { - handler(newVersion) { - if (newVersion) { - this.fetchData(this.$route.query.api, newVersion); + '$route.query': { + deep: true, + handler(query) { + if (query.api && query.selectedVersion) { + this.fetchData(query.api, query.selectedVersion); } }, immediate: true @@ -1749,3 +1336,11 @@ export default { }; +