getRecentlyExtractRecord static method
获取最新萃取记录(萃取笔记)
userId
app用户id
deviceId
绑定的设备id
Implementation
static Future<String> getRecentlyExtractRecord(String userId, String deviceId) async {
Map<String,String> headers = {
'tenantId': '10002',
'token': SpUtil().getString(SpUtil.SP_KEY_ACCESS_TOKEN) ?? '',
'appSource': 'Maxims',
'reqSource': '1',
};
int timestamp = DateTime.now().millisecondsSinceEpoch;
String randomStr = CipherUtil.generateRandomString(6);
Map<String,dynamic> data = {
'timestamp': timestamp,
'appKey': BaseHttpConstant.APP_BUSINESS_KEY,
'nonceStr': randomStr,
'signVersion': '1',
'data': {
'userId': userId,
'deviceId': deviceId,
},
};
String sign = CipherUtil.generateSignature2(data, ['data'], BaseHttpConstant.APP_BUSINESS_SECRET);
data['sign'] = sign;
Options options = Options(
headers: headers,
contentType: Headers.jsonContentType,
);
var result = await HttpUtils.post(true, Api.PATH_GET_RECENTLY_ONE_EXTRACT_RECORD,
data: data,
options: options);
return formatResponse(result);
}