diff --git a/app.json b/app.json
index 4bb2c6b..b19e884 100644
--- a/app.json
+++ b/app.json
@@ -5,7 +5,9 @@
"pages/author-list/author-list",
"pages/favorite/favorite",
"pages/poem-detail/poem-detail",
- "pages/author-detail/author-detail"
+ "pages/author-detail/author-detail",
+ "pages/search/search",
+ "pages/search-result/search-result"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/pages/poem-list/poem-list.js b/pages/poem-list/poem-list.js
index 468c03f..ac1d15e 100644
--- a/pages/poem-list/poem-list.js
+++ b/pages/poem-list/poem-list.js
@@ -43,6 +43,11 @@ Page({
})
})
},
+ search: function () {
+ wx.navigateTo({
+ url: '/pages/search/search',
+ })
+ },
// 更换分类
changeCategorys(e) {
let select = e.detail.value
diff --git a/pages/poem-list/poem-list.json b/pages/poem-list/poem-list.json
index 0f181b4..0037b43 100644
--- a/pages/poem-list/poem-list.json
+++ b/pages/poem-list/poem-list.json
@@ -3,6 +3,7 @@
"t-tabs": "tdesign-miniprogram/tabs/tabs",
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
"poem-list": "/components/poem-list/poem-list",
- "poem-translate": "/components/poem-translate/poem-translate"
+ "poem-translate": "/components/poem-translate/poem-translate",
+ "t-search": "tdesign-miniprogram/search/search"
}
}
\ No newline at end of file
diff --git a/pages/poem-list/poem-list.wxml b/pages/poem-list/poem-list.wxml
index 99ddad6..2fe8d49 100644
--- a/pages/poem-list/poem-list.wxml
+++ b/pages/poem-list/poem-list.wxml
@@ -8,5 +8,8 @@
wx:key="id"
value="{{item.id}}" />
+
+
+
\ No newline at end of file
diff --git a/pages/poem-list/poem-list.wxss b/pages/poem-list/poem-list.wxss
index eb0239d..75991b5 100644
--- a/pages/poem-list/poem-list.wxss
+++ b/pages/poem-list/poem-list.wxss
@@ -1,3 +1,7 @@
.tabs {
height: 100vh;
+}
+
+.search-box {
+ padding: 20rpx 20rpx;
}
\ No newline at end of file
diff --git a/pages/search-result/search-result.js b/pages/search-result/search-result.js
new file mode 100644
index 0000000..2f9804b
--- /dev/null
+++ b/pages/search-result/search-result.js
@@ -0,0 +1,66 @@
+// pages/search-result/search-result.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/search-result/search-result.json b/pages/search-result/search-result.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/search-result/search-result.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/search-result/search-result.wxml b/pages/search-result/search-result.wxml
new file mode 100644
index 0000000..d55ca47
--- /dev/null
+++ b/pages/search-result/search-result.wxml
@@ -0,0 +1,2 @@
+
+pages/search-result/search-result.wxml
diff --git a/pages/search-result/search-result.wxss b/pages/search-result/search-result.wxss
new file mode 100644
index 0000000..f28623b
--- /dev/null
+++ b/pages/search-result/search-result.wxss
@@ -0,0 +1 @@
+/* pages/search-result/search-result.wxss */
\ No newline at end of file
diff --git a/pages/search/search.js b/pages/search/search.js
new file mode 100644
index 0000000..da12236
--- /dev/null
+++ b/pages/search/search.js
@@ -0,0 +1,68 @@
+// pages/search/search.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ recommend: [
+ '此处均为测试数据!', '黄鹤楼', '扬州', '春', '黄鹤楼送孟浩然之广陵', '瀑布', '李白', '忆江南'
+ ]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/search/search.json b/pages/search/search.json
new file mode 100644
index 0000000..c44629c
--- /dev/null
+++ b/pages/search/search.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "t-search": "tdesign-miniprogram/search/search",
+ "t-tag": "tdesign-miniprogram/tag/tag"
+ }
+}
\ No newline at end of file
diff --git a/pages/search/search.wxml b/pages/search/search.wxml
new file mode 100644
index 0000000..349db54
--- /dev/null
+++ b/pages/search/search.wxml
@@ -0,0 +1,9 @@
+
+
+ 最多搜索:
+
+ {{tag}}
+
+
\ No newline at end of file
diff --git a/pages/search/search.wxss b/pages/search/search.wxss
new file mode 100644
index 0000000..4586a2f
--- /dev/null
+++ b/pages/search/search.wxss
@@ -0,0 +1,16 @@
+.search-container {
+ padding: 20rpx;
+}
+
+.recommend-title {
+ margin-top: 20rpx;
+ margin-left: 10rpx;
+}
+
+.recommend-list {
+ margin-top: 10rpx;
+}
+
+.recommend-tag {
+ margin: 10rpx 10rpx;
+}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
index 1536b97..f514609 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -28,6 +28,13 @@
"query": "",
"launchMode": "default",
"scene": null
+ },
+ {
+ "name": "search",
+ "pathName": "pages/search/search",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
}
]
}