diff --git a/.gitignore b/.gitignore
index 5e0a555..b3104e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
node_modules/
.project
unpackage/
-.DS_Store.
\ No newline at end of file
+.DS_Store.
+/config/dev.js
diff --git a/manifest.json b/manifest.json
index 2eedab0..59a3c84 100644
--- a/manifest.json
+++ b/manifest.json
@@ -51,7 +51,7 @@
/* 小程序特有相关 */
"mp-weixin" : {
"libVersion" : "latest",
- "appid" : "wx3914d4d7441fb438",
+ "appid" : "wx58ed81cb59afda38",
"setting" : {
"urlCheck" : false
},
@@ -73,5 +73,5 @@
"enable" : false
},
"vueVersion" : "2",
- "sassImplementationName": "node-sass"
+ "sassImplementationName" : "node-sass"
}
diff --git a/pages/Monk/Monk.vue b/pages/Monk/Monk.vue
index 71c5adb..dd74cc4 100644
--- a/pages/Monk/Monk.vue
+++ b/pages/Monk/Monk.vue
@@ -7,8 +7,15 @@
- 张姗姗
- 搜索
+
+ 搜索
@@ -44,7 +51,8 @@
},
CommonEnum,
MonkEnum,
- monkList: []
+ monkList: [],
+ searchName: ''
}
},
onLoad() {
@@ -53,7 +61,7 @@
methods: {
async fetchMonkList() {
try {
- const res = await getMonkList()
+ const res = await getMonkList({ name: this.searchName })
if (res.code === 200 && Array.isArray(res.rows)) {
this.monkList = res.rows
} else {
@@ -69,6 +77,9 @@
})
}
},
+ onSearch() {
+ this.fetchMonkList()
+ },
// 去除 HTML 标签,返回纯文本
stripHtmlTags(html) {
if (!html) return ''; // 处理空值
@@ -129,13 +140,22 @@
.search-icon {
width: 32rpx;
height: 32rpx;
- margin: 0 16rpx 0 0;
+ margin: 0 28rpx;
}
- .search-text {
+ .search-input {
flex: 1;
font-size: 28rpx;
+ color: #333;
+ background: transparent;
+ border: none;
+ outline: none;
+ height: 100%;
+ }
+
+ .search-placeholder {
color: #bfa16b;
+ font-size: 28rpx;
}
.search-btn {