|
|
@@ -402,25 +402,39 @@ export async function GetMiaoguoTodayAllWords(ctx) {
|
|
402
|
402
|
.then(res => {
|
|
403
|
403
|
let list = res.data.result.List;
|
|
404
|
404
|
if (list && list.length>0) {
|
|
405
|
|
-
|
|
406
|
|
-
|
|
407
|
|
- let arr=[];
|
|
|
405
|
+ let arr=[],arrNew=[];
|
|
|
406
|
+ const today=moment().format("YYYY-MM-DD 00:00:00");
|
|
408
|
407
|
for(let i=0;i<list.length;i++){
|
|
409
|
|
- console.log("问题:"+list[i].Content[1].Content);
|
|
410
|
|
- console.log("标签:"+list[i].Content[0].Content);
|
|
411
|
|
- console.log("答案:"+list[i].Content[2].Content);
|
|
|
408
|
+ // console.log("问题:"+list[i].Content[1].Content);
|
|
|
409
|
+ // console.log("标签:"+list[i].Content[0].Content);
|
|
|
410
|
+ // console.log("答案:"+list[i].Content[2].Content);
|
|
412
|
411
|
|
|
413
|
412
|
let str1=fun1(list[i].Content[1].Content);
|
|
414
|
|
- if (str1)
|
|
415
|
|
- arr.push(str1);
|
|
|
413
|
+ if (str1){
|
|
|
414
|
+ if (list[i].FirstTime>today){
|
|
|
415
|
+ arrNew.push(str1)
|
|
|
416
|
+ }
|
|
|
417
|
+ else{
|
|
|
418
|
+ arr.push(str1);
|
|
|
419
|
+ }
|
|
|
420
|
+ }
|
|
416
|
421
|
else{
|
|
417
|
422
|
let str2=fun1(list[i].Content[2].Content);
|
|
418
|
|
- if (str2)
|
|
419
|
|
- arr.push(str2);
|
|
|
423
|
+ if (str2){
|
|
|
424
|
+ if (list[i].FirstTime>today){
|
|
|
425
|
+ arrNew.push(str2)
|
|
|
426
|
+ }
|
|
|
427
|
+ else{
|
|
|
428
|
+ arr.push(str2);
|
|
|
429
|
+ }
|
|
|
430
|
+ }
|
|
420
|
431
|
}
|
|
421
|
432
|
}
|
|
422
|
433
|
let arr2=stringUtils.extractEnglishWords(arr);
|
|
423
|
|
- return {"errcode": 10000, result:arr2.join(",")}
|
|
|
434
|
+ let arr3=stringUtils.extractEnglishWords(arrNew);
|
|
|
435
|
+ let arr4=arr3.concat(arr2);
|
|
|
436
|
+
|
|
|
437
|
+ return {"errcode": 10000, result:arr4.join(",")}
|
|
424
|
438
|
}
|
|
425
|
439
|
else{
|
|
426
|
440
|
return {errcode: 101};
|