C/S客户端的Winform窗体直接调用WebApi接口,我使用的C#版本是2019,具体需求如下:
API接口规范: https://www.apifox.cn/apidoc/shared-eecd1f10-bb24-4d1c-9f23-880401344fea
访问密码: CJVXqtLQ
调用方法:
1、先 post {"username":"admin","password":"test123+"} 到 https://api-dev.vlauncher.com/jeecg-boot/apis/login 获取令牌
2、再 post {"isPage":false} 到 https://api-dev.vlauncher.com/jeecg-boot/apis/dwCustomer/listToForeign 获取全部客户数据,header加上"X-Access-Token=获取到的令牌"
返回数据格式:
{
"success": true,
"message": "",
"code": 200,
"result": {
"pageNo": null,
"pageSize": null,
"records": [
{
"custId": "1039778",
"custCode": "K003",
"custName": "金寶電子(中國)有限公司",
"custShortName": "金寶電子",
"activeStatus": "启用",
"approvalStatus": "已审核",
"salesCode": "SALES06",
"salesName": "唐萍",
"salesDept": "ZC业务部",
"salesTeam": "业务1组,业务主管组",
"engCode": null,
"engName": null,
"engDept": null,
"engTeam": null,
"industry": null,
"companyType": null,
"regCapital": null,
"shareholder": null,
"founded": null,
"companySize": null,
"bizLicense": null,
"costStrategyName": null,
"contact": "戴曉青",
"phone1": "156-9769-2262",
"phone2": "轉分機:13064",
"fax": "",
"email": "xiaoqing_dai@kinpo.com.cn",
"region": null,
"country": null,
"province": null,
"addr1": "廣東省東莞市長安鎮沙頭南區 振安路417號 交电通厂,找周思顺",
"addr2": "廣東省東莞市長安鎮沙頭南區 振安路417號",
"currencyName": "人民币",
"discountRate": 1,
"taxFlag": "0",
"taxRate": 0.17,
"shippingMethodName": "By truck",
"paymentTermName": "月结90天付款",
"customerLevel": null,
"customerType": null,
"firstRfqDate": null,
"lastRfqDate": null,
我按照网上的方法试过,但是没有成功,请大侠们帮忙解决,也可以私聊。