Initial commit
This commit is contained in:
25
miniprogram/pages/home/home.js
Normal file
25
miniprogram/pages/home/home.js
Normal file
@@ -0,0 +1,25 @@
|
||||
Page({
|
||||
data: {
|
||||
keyword: ''
|
||||
},
|
||||
|
||||
onInput(e) {
|
||||
this.setData({
|
||||
keyword: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
startNaming() {
|
||||
if (!this.data.keyword.trim()) {
|
||||
wx.showToast({
|
||||
title: '请输入一抹期待',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
wx.navigateTo({
|
||||
url: `/pages/index/index?keyword=${encodeURIComponent(this.data.keyword)}`
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user