shawenguan hai 1 ano
pai
achega
81f9f728d5
Modificáronse 1 ficheiros con 9 adicións e 9 borrados
  1. 9 9
      Scripts/wubian/wubianOthersCollectList.js

+ 9 - 9
Scripts/wubian/wubianOthersCollectList.js

@@ -169,24 +169,24 @@ async function tryCheckCollectList() {
             price: goodsInfo.price,
         });
     }
-    let text = `查询用户[${nickName}]拥有${collectList.length}个产品,具体如下:` + '\n';
+    let ownText = `查询用户[${nickName}]拥有${collectList.length}个产品,具体如下:` + '\n';
     if (collectList.length == 0) {
-        text += `用户真的没有收藏或者用户已设置拥有的情况仅自己可见`;
+        ownText += `用户真的没有收藏或者用户已设置拥有的情况仅自己可见`;
     }
-    magicJS.notification.appendNotifyInfo(text);
+    magicJS.notification.appendNotifyInfo(ownText);
     doCheckShowCollectText(collectDict);
-    text += `\n\n`;
+    let buyText = `\n\n当天购买的情况如下:` + '\n';
     let retDetail = await getUserArtScoreInfo(othersHashId);
     if (retDetail && retDetail.code == 200) {
-        let buyText = `当天购买的情况如下:` + '\n';
         let buyArtList = retDetail.data || [];
         for (let j = 0; j < buyArtList.length; j++) {
             let artInfo = buyArtList[j];
             buyText += `   ${artInfo.artName} 均价:¥${artInfo.unitPrice} 数量:${artInfo.num}\n`;
         }
-        magicJS.notification.appendNotifyInfo(buyText);
+    } else {
+        buyText += `${retDetail?.msg || '查询失败'}`;
     }
-
+    magicJS.notification.appendNotifyInfo(buyText);
 }
 
 function doCheckShowCollectText(collectDict) {
@@ -260,7 +260,7 @@ async function queryOtherUserViewGoodsList(hashId, type = 1, page = 1) {
     let result = await magicJS.http.post(options).then(response => {
         try {
             let rspData = response.body;
-            magicJS.logger.info(`rspData=${JSON.stringify(rspData)}`);
+            // magicJS.logger.info(`rspData=${JSON.stringify(rspData)}`);
             return rspData;
         } catch (e) {
             magicJS.logger.error(e);
@@ -284,7 +284,7 @@ async function getUserArtScoreInfo(userId) {
     let result = await magicJS.http.post(options).then(response => {
         try {
             let rspData = response.body;
-            magicJS.logger.info(`rspData=${JSON.stringify(rspData)}`);
+            // magicJS.logger.info(`rspData=${JSON.stringify(rspData)}`);
             return rspData;
         } catch (e) {
             magicJS.logger.error(e);