Authored by 李奇

接口请求METHOD POST变更

@@ -22,7 +22,6 @@ const encryptedUid = uid => crypto.encryption(null, uid + ''); @@ -22,7 +22,6 @@ const encryptedUid = uid => crypto.encryption(null, uid + '');
22 */ 22 */
23 exports.saveMessage = (uid, conversationId, content) => { 23 exports.saveMessage = (uid, conversationId, content) => {
24 let params = { 24 let params = {
25 - uid,  
26 conversationId, 25 conversationId,
27 content, 26 content,
28 encryptedUid: encryptedUid(uid) 27 encryptedUid: encryptedUid(uid)
@@ -45,7 +44,6 @@ exports.fetchImHistory = (uid, endTime, pageSize, startTime) => { @@ -45,7 +44,6 @@ exports.fetchImHistory = (uid, endTime, pageSize, startTime) => {
45 pageSize = pageSize || 10; 44 pageSize = pageSize || 10;
46 45
47 let params = { 46 let params = {
48 - uid,  
49 pageSize, 47 pageSize,
50 encryptedUid: encryptedUid(uid) 48 encryptedUid: encryptedUid(uid)
51 }; 49 };
@@ -54,7 +52,7 @@ exports.fetchImHistory = (uid, endTime, pageSize, startTime) => { @@ -54,7 +52,7 @@ exports.fetchImHistory = (uid, endTime, pageSize, startTime) => {
54 val && (params[key] = val); 52 val && (params[key] = val);
55 }); 53 });
56 54
57 - return ImService.get('/api/conversationMessage/pageList', params) 55 + return ImService.post('/api/conversationMessage/pageList', params)
58 .then(result => { 56 .then(result => {
59 return result; 57 return result;
60 }, () => { 58 }, () => {
@@ -74,7 +72,6 @@ exports.fetchImHistory = (uid, endTime, pageSize, startTime) => { @@ -74,7 +72,6 @@ exports.fetchImHistory = (uid, endTime, pageSize, startTime) => {
74 */ 72 */
75 exports.fetchOrderList = (uid, createTimeBegin) => { 73 exports.fetchOrderList = (uid, createTimeBegin) => {
76 let params = { 74 let params = {
77 - uid,  
78 encryptedUid: encryptedUid(uid), 75 encryptedUid: encryptedUid(uid),
79 imgSize: '90x120', 76 imgSize: '90x120',
80 }; 77 };
@@ -83,7 +80,7 @@ exports.fetchOrderList = (uid, createTimeBegin) => { @@ -83,7 +80,7 @@ exports.fetchOrderList = (uid, createTimeBegin) => {
83 val && (params[key] = val); 80 val && (params[key] = val);
84 }); 81 });
85 82
86 - return ImService.get('/api/order/queryLastTenOrder', params); 83 + return ImService.post('/api/order/queryLastTenOrder', params);
87 }; 84 };
88 85
89 86
@@ -97,7 +94,7 @@ exports.fetchOrderList = (uid, createTimeBegin) => { @@ -97,7 +94,7 @@ exports.fetchOrderList = (uid, createTimeBegin) => {
97 ``` 94 ```
98 ### 请求参数说明 95 ### 请求参数说明
99 | 名称 | 类型 | 是否必须 | 描述 | 96 | 名称 | 类型 | 是否必须 | 描述 |
100 -| -------------- | ------ | ---- | --------------- | 97 +| -------------- | ------ | ---- | --------------- |
101 | conversationId | long | Y | 会话id | 98 | conversationId | long | Y | 会话id |
102 | uid | int | Y | 用户ID | 99 | uid | int | Y | 用户ID |
103 |encryptedUid | String |Y |加密的用户标识 | 100 |encryptedUid | String |Y |加密的用户标识 |
@@ -111,7 +108,6 @@ exports.fetchOrderList = (uid, createTimeBegin) => { @@ -111,7 +108,6 @@ exports.fetchOrderList = (uid, createTimeBegin) => {
111 exports.saveEvalute = (uid, conversationId, promoter, stars, reasonMsg) => { 108 exports.saveEvalute = (uid, conversationId, promoter, stars, reasonMsg) => {
112 let params = { 109 let params = {
113 conversationId, 110 conversationId,
114 - uid,  
115 encryptedUid: encryptedUid(uid), 111 encryptedUid: encryptedUid(uid),
116 promoter, 112 promoter,
117 stars, 113 stars,
@@ -128,10 +124,10 @@ exports.saveEvalute = (uid, conversationId, promoter, stars, reasonMsg) => { @@ -128,10 +124,10 @@ exports.saveEvalute = (uid, conversationId, promoter, stars, reasonMsg) => {
128 124
129 exports.queryGlobalOrder = uid => { 125 exports.queryGlobalOrder = uid => {
130 let params = { 126 let params = {
131 - uId: uid 127 + encryptedUid: encryptedUid(uid)
132 }; 128 };
133 129
134 - return ImService.get('/api/order/queryGlobalOrder', params); 130 + return ImService.post('/api/order/queryGlobalOrder', params);
135 }; 131 };
136 132
137 /** 133 /**
@@ -20,10 +20,10 @@ const disableBFCache = require('../../doraemon/middleware/disable-BFCache'); @@ -20,10 +20,10 @@ const disableBFCache = require('../../doraemon/middleware/disable-BFCache');
20 20
21 // Your controller here 21 // Your controller here
22 router.get('/im', disableBFCache, chat.appAdapter, authGuard, chat.page); 22 router.get('/im', disableBFCache, chat.appAdapter, authGuard, chat.page);
23 -router.get('/im/fetchHistory', chat.fetchHistory); 23 +router.post('/im/fetchHistory', chat.fetchHistory);
24 router.get('/getOrders', chat.getOrders); 24 router.get('/getOrders', chat.getOrders);
25 -router.get('/im/global-list', chat.queryGlobalOrder);  
26 -router.get('/im/order-list', chat.fetchOrders); 25 +router.post('/im/global-list', chat.queryGlobalOrder);
  26 +router.post('/im/order-list', chat.fetchOrders);
27 router.get('/im/queryReasons', chat.queryReasons); 27 router.get('/im/queryReasons', chat.queryReasons);
28 router.post('/leavemsg/save.json', chat.saveMSG); 28 router.post('/leavemsg/save.json', chat.saveMSG);
29 router.post('/im/saveEvalute', chat.saveEvalute); 29 router.post('/im/saveEvalute', chat.saveEvalute);
@@ -67,20 +67,19 @@ let api = { @@ -67,20 +67,19 @@ let api = {
67 fetchOrders: function(type) { 67 fetchOrders: function(type) {
68 let url = `/service/im/${type}-list`; 68 let url = `/service/im/${type}-list`;
69 69
70 - return $.get(url, {uid}); 70 + return $.post(url, {uid});
71 }, 71 },
72 72
73 // 获取10条历史记录 73 // 获取10条历史记录
74 msghistory: function(uid, encryptedUid, endTime) { 74 msghistory: function(uid, encryptedUid, endTime) {
75 let url = '/service/im/fetchHistory'; 75 let url = '/service/im/fetchHistory';
76 let data = { 76 let data = {
77 - uid,  
78 encryptedUid 77 encryptedUid
79 }; 78 };
80 79
81 endTime && (data.endTime = endTime); 80 endTime && (data.endTime = endTime);
82 81
83 - return $.get(url, data); 82 + return $.post(url, data);
84 }, 83 },
85 84
86 saveEvalute: function(data) { 85 saveEvalute: function(data) {