From 43a0780edd2db8e841325cb73032e819716c3595 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期三, 10 八月 2022 09:27:59 +0800
Subject: [PATCH] 智能咨询模块、台账模块
---
pages/module_consult/consulthome/consulthome.js | 64 ++++++++++++++++++++------------
1 files changed, 40 insertions(+), 24 deletions(-)
diff --git a/pages/module_consult/consulthome/consulthome.js b/pages/module_consult/consulthome/consulthome.js
index aec7504..27ce796 100644
--- a/pages/module_consult/consulthome/consulthome.js
+++ b/pages/module_consult/consulthome/consulthome.js
@@ -1,4 +1,7 @@
// pages/module_consult/consulthome/consulthome.js
+const consultservice = require("../../../service/consultservice")
+const app = getApp()
+
Page({
/**
@@ -7,29 +10,14 @@
data: {
searchTips: '璇疯緭鍏ュ叧閿瓧鎼滅储',
hotTopics: [{
- pic: '',
- title: '鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇',
- abstract: '鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌�',
- time: '2022-02-04',
- author: '浣滆��',
- itemCount: '5',
- tags: ['tag1', 'tag2']
- },{
- pic: '',
- title: '鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇',
- abstract: '鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌�',
- time: '2022-02-04',
- author: '浣滆��',
- itemCount: '5',
- tags: ['tag1', 'tag2']
- },{
- pic: '',
- title: '鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇',
- abstract: '鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌愭煇鏌�',
- time: '2022-02-04',
- author: '浣滆��',
- itemCount: '5',
- tags: ['tag1', 'tag2']
+ id: '',
+ name: '娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡',
+ des: '娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡娉曞緥娉曡',
+ fileIndustry: '鐢熸�佺幆澧�',
+ itemType: '澶ф皵',
+ fileUrl: '',
+ keywords: ['鐢熸�佺幆澧�', '澶ф皵', '鐢熸�佺幆澧�', '澶ф皵澶�', '澶ф皵', '澶ф皵', '澶ф皵澶ф皵澶ф皵澶ф皵澶ф皵澶ф皵'],
+ time: ''
}]
},
@@ -37,7 +25,7 @@
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad: function (options) {
-
+ this.getHotTopic()
},
/**
@@ -80,5 +68,33 @@
mask: true,
})
}
+ },
+
+ /**
+ * 鑾峰彇鐑棬鎼滅储鍐呭
+ */
+ getHotTopic() {
+ var that = this
+ consultservice.getTopicLaw(app.globalData.accessToken.userId, {
+ success (res) {
+ that.setData({
+ hotTopics: res
+ })
+ }
+ })
+ },
+
+ gotoDetail (e) {
+ var i = e.currentTarget.dataset.index
+ var fileId = this.data.hotTopics[i].id
+ wx.navigateTo({
+ url: '/pages/module_consult/consultdetail/consultdetail',
+ success: (res) => {
+ // 閫氳繃 eventChannel 鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', {
+ fileId: fileId
+ })
+ },
+ })
}
})
\ No newline at end of file
--
Gitblit v1.9.3