2025-04-29 16:46:25 +08:00
|
|
|
const {
|
|
|
|
|
getGoods
|
|
|
|
|
} = require("../../api/index.js")
|
2025-04-28 17:55:43 +08:00
|
|
|
Page({
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 页面的初始数据
|
|
|
|
|
*/
|
|
|
|
|
data: {
|
|
|
|
|
searchText: ""
|
2025-04-29 16:46:25 +08:00
|
|
|
|
2025-04-28 17:55:43 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
|
*/
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
/*内容改变*/
|
|
|
|
|
onChange(e) {
|
|
|
|
|
// console.log(e.detail);
|
|
|
|
|
this.setData({
|
|
|
|
|
searchText:e.detail.value,
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 实现搜索
|
|
|
|
|
onSearch() {
|
|
|
|
|
console.log("搜索");
|
|
|
|
|
this.setData({
|
|
|
|
|
searchText:""
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onSearchCliclk() {
|
|
|
|
|
console.log("点击搜索");
|
|
|
|
|
this.setData({
|
|
|
|
|
searchText:""
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|