diff --git a/README.md b/README.md
index 1a7ddbf..b3b02dc 100644
--- a/README.md
+++ b/README.md
@@ -37,6 +37,13 @@
+### 直达买菜 🛒
+
+收集了许多常用的买菜小程序,一键直达
+
+
+
+
## 如何贡献
### 小程序
@@ -70,10 +77,11 @@ module.exports = {
- [x] 解析并展示 MarkDown 的图片、链接和各种格式 `v0.4.0`
- [x] 增加【学习】模块 `v0.5.0`
- [x] 发送订阅消息 `v1.0.0`
+- [x] 增加【买菜】模块 `v1.0.0`
### v2.0.0
-- [ ] 支持搜索
+- [x] 支持搜索 `v1.1.0`
- [ ] 支持个人分享 (可能受限个人小程序无法做到)
## 补充
diff --git a/cloudfunctions/sendSubscribe/index.js b/cloudfunctions/sendSubscribe/index.js
index 69aef02..2fb9534 100644
--- a/cloudfunctions/sendSubscribe/index.js
+++ b/cloudfunctions/sendSubscribe/index.js
@@ -7,7 +7,7 @@ const db = cloud.database()
const _ = db.command
const SIZE = 100 // 分片读数据的大小
-const MAX = 1 // 限制发送人数
+const MAX = 1000 // 限制发送人数
const sendSubscribeMessage = async ({ openid, templateId, version, content }) => {
const time = dayjs().format('YYYY年M月D日 HH:mm')
diff --git a/miniprogram/app.js b/miniprogram/app.js
index d8af1db..2e232ba 100644
--- a/miniprogram/app.js
+++ b/miniprogram/app.js
@@ -7,7 +7,7 @@ App({
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
- console.log(res.hasUpdate)
+ // console.log(res.hasUpdate)
})
updateManager.onUpdateReady(function () {
diff --git a/miniprogram/app.json b/miniprogram/app.json
index a3cefc7..bff5ff3 100644
--- a/miniprogram/app.json
+++ b/miniprogram/app.json
@@ -8,7 +8,8 @@
"pages/changelog/detail",
"pages/learn/index",
"pages/learn/detail",
- "pages/cart/index"
+ "pages/cart/index",
+ "pages/search/index"
],
"window": {
"backgroundColor": "#f6f6f6",
@@ -34,6 +35,8 @@
"t-tab-panel": "tdesign-miniprogram/tabs/tab-panel",
"t-loading": "tdesign-miniprogram/loading/loading",
"t-message": "tdesign-miniprogram/message/message",
+ "t-navbar": "tdesign-miniprogram/navbar/navbar",
+ "t-search": "tdesign-miniprogram/search/search",
"t-switch": "tdesign-miniprogram/switch/switch",
"t-steps": "tdesign-miniprogram/steps/steps",
"t-step": "tdesign-miniprogram/steps/step-item"
diff --git a/miniprogram/pages/changelog/log.js b/miniprogram/pages/changelog/log.js
index 6aef1bd..ae36cb9 100644
--- a/miniprogram/pages/changelog/log.js
+++ b/miniprogram/pages/changelog/log.js
@@ -1,4 +1,11 @@
export default [{
+ version: '1.1.0',
+ detail: [{
+ type: 'feature',
+ value: '支持搜索'
+ }],
+ date: '2022-03-19'
+}, {
version: '1.0.0',
detail: [{
type: 'feature',
diff --git a/miniprogram/pages/index/index.js b/miniprogram/pages/index/index.js
index d16806d..da99b1d 100644
--- a/miniprogram/pages/index/index.js
+++ b/miniprogram/pages/index/index.js
@@ -6,6 +6,7 @@ Page({
data: {
list: [],
value: 'index',
+ searchKeyword: '',
tabbars: [{
text: '首页',
value: 'index',
@@ -60,6 +61,15 @@ Page({
})
},
+ handleToSearch() {
+ const content = this.data.searchKeyword.trim();
+ wx.navigateTo({
+ url: '/pages/search/index?keyword=' + content,
+ }).then(() => {
+ this.setData({ searchKeyword: '' })
+ })
+ },
+
onShareAppMessage() {
return {
title: '程序员做饭指南',
diff --git a/miniprogram/pages/index/index.js