处理搜索

This commit is contained in:
2024-08-22 22:30:52 +08:00
parent b43246074a
commit 49226941c4
13 changed files with 628 additions and 4 deletions

View File

@@ -31,8 +31,8 @@ Page({
]
},
// 页面跳转
jumpPage(e) {
let jumpType = e.currentTarget.dataset.jumptype;
console.log(jumpType == 1);
if(jumpType == 1){
@@ -40,8 +40,21 @@ Page({
url: "/pages/list/list?id=1"
})
}
if(jumpType == 2){
wx.navigateTo({
url: "/pages/list/list?id=1"
})
}
if(jumpType == 3){
wx.navigateTo({
url: "/pages/search/index"
})
}
// wx.navigateTo({
// url: this.data.category[index].url
// })
},
bindFocus(e){
console.log(e);
}
})

View File

@@ -6,7 +6,8 @@
<view class="search">
<view class="search_in">
<image src="../../images/search.png"></image>
<input type="text" placeholder="请输入故障代码或关键词" />
<view style="width: 600rpx;color: #b5b5b5;" bind:tap="jumpPage" data-jumpType="3">请输入故障代码或关键词</view>
<!-- <input type="text" bindfocus="bindFocus" bindblur="bindFocus" placeholder="请输入故障代码或关键词" /> -->
</view>
</view>
</view>

View File

@@ -50,7 +50,7 @@ page {
/* 搜索 start */
.search-box {
padding-top: 20px;
padding-top: 45rpx;
}
.search {