From 2206df0da6499846c78a358cf95ca33c218a5c5d Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 14 九月 2022 08:43:37 +0800
Subject: [PATCH] 2022.9.13
---
pages/test2/test2.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/pages/test2/test2.js b/pages/test2/test2.js
index db9fc64..8dfbe1b 100644
--- a/pages/test2/test2.js
+++ b/pages/test2/test2.js
@@ -50,4 +50,64 @@
showPreview: true
});
},
+
+ /**
+ * 鑾峰彇鐑棬鎼滅储鍐呭
+ */
+ getHotTopic() {
+ var that = this
+ // 1. 鐑棬娉曞緥娉曡
+ consultservice.getTopicLaw(app.globalData.accessToken.userId, {
+ success(res) {
+ res.forEach(r => {
+ r.mfKeywordLv1 = r.mfKeywordLv1.split('銆�').slice(0, 5)
+ r.mfReleaseDate = that.formatTime(r.mfReleaseDate)
+ r.mfEffectiveDate = that.formatTime(r.mfEffectiveDate)
+ r.mfClosingDate = that.formatTime(r.mfClosingDate)
+ });
+ that.setData({
+ 'pageList[0]': res,
+ 'pageList[4]': res
+ })
+ }
+ })
+ // 2. 鐑棬娉曞緥娉曡鏉$洰
+ consultservice.getTopicItem(app.globalData.accessToken.userId, {
+ success(res) {
+ res.forEach(r => {
+ r.miItemContent = r.miItemContent.replaceAll('\\n', '<br/>')
+ });
+ that.setData({
+ 'pageList[3]': res
+ })
+ }
+ })
+ // 3. 鐑棬闂瓟
+ consultservice.getTopicQA(app.globalData.accessToken.userId, {
+ success(res) {
+ res.forEach(r => {
+ r.cqCreateTime = that.formatTime(r.cqCreateTime)
+ });
+ that.setData({
+ 'pageList[1]': res
+ })
+ }
+ })
+ // 4. 鐑棬妗堜緥
+ consultservice.getTopicCase(app.globalData.accessToken.userId, {
+ success(res) {
+ res.forEach(r => {
+ r.ecSummary = r.ecSummary.replaceAll('\\n', '<br/>')
+ r.ecMeaning = r.ecMeaning.replaceAll('\\n', '<br/>')
+ r.ecExamined = r.ecExamined.replaceAll('\\n', '<br/>')
+ r.ecEnlightenment = r.ecEnlightenment.replaceAll('\\n', '<br/>')
+ r.ecOccurDate = that.formatTime(r.ecOccurDate)
+ });
+ that.setData({
+ 'pageList[2]': res
+ })
+ console.log(that.data.pageList);
+ }
+ })
+ },
})
\ No newline at end of file
--
Gitblit v1.9.3