# jdck **Repository Path**: wangbaosheng/jdck ## Basic Information - **Project Name**: jdck - **Description**: 京东ck获取并自动添加上服务器 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 5 - **Created**: 2024-04-01 - **Last Updated**: 2024-04-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # getjdcookie ### 京东获取新 ck 的脚本 ### 接口 #### 获取token method: get url : http://121.5.104.125:5800/open/auth/token?client_id=你的id&client_secret=你的秘钥 **返回结果** ```json { "code": 200, "data": { "token": "d13ab883-c95f-4864-a72a-87fb20ff1abb", "token_type": "Bearer", "expiration": 1649399665 } } ``` #### 查询原ck的id methods: get url: http://121.5.104.125:5800/open/envs?searchValue=[+原ck] ```json headers={ 'Authorization':token_type+token } headers={ 'Authorization':'Bearer e66413b3-f6f4-4f8a-86dc-ac875344e933' } ``` **返回结果** ```json { "code": 200, "data": [ { "id": 8, "value": "pt_key=AAJiIheMADBEnPzyJ1ngMU_t-wA9FnM-3BmzxlX5aQ6c9IkTERINjT9kRitQOC5ldujl7igk3oU;pt_pin=jd_5f4259e1c2b6a;", "timestamp": "Sat Jan 01 2022 14:07:12 GMT+0800 (中国标准时间)", "status": 0, "position": 4999999999.5, "name": "JD_COOKIE", "remarks": "remark=我;", "createdAt": "2022-01-12T17:04:56.961Z", "updatedAt": "2022-03-04T13:44:16.505Z" } ] } ``` #### 根据 id 更新 ck method: put url :http://121.5.104.125:5800/open/envs ```json body: { "value": value,//变量值 "name": "JD_COOKIE", "remarks": remarks,//备注 "id": id名字 } ``` #### 添加新的 ck method: post url : http://121.5.104.125:5800/open/envs ```json [ { "value": "变量值", "name": "变量名", "remarks": "备注" } ] ``` #### ps: 更新后界面 ![image-20220312031322377](https://gitee.com/zhang-xiaomingreal/images/raw/master/dianshang/image-20220312031322377.png)