first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1 @@
51de4fef-0ad3-4629-a69f-0782d499bd56

View File

@@ -0,0 +1,80 @@
const {
index,
util
} = getApp().globalData
Page({
/**
* 页面的初始数据
*/
data: {
keyWord: '',
searchList: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
async onSearch(e) {
this.setData({
searchList: await index.search({
keyword: e.detail,
page: 1
})
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,9 @@
{
"usingComponents": {
"van-search": "@vant/weapp/search/index",
"van-row": "@vant/weapp/row/index",
"van-col": "@vant/weapp/col/index",
"item": "../../component/item/item"
},
"navigationBarTitleText": "搜索"
}

View File

@@ -0,0 +1,4 @@
<view class="search">
<van-search value="{{ keyWord }}" shape="round" placeholder="输入搜索关键词" bind:search="onSearch" />
<item search-list="{{ searchList }}"></item>
</view>