处理搜索
This commit is contained in:
86
pages/s-list/s-list.js
Normal file
86
pages/s-list/s-list.js
Normal file
@@ -0,0 +1,86 @@
|
||||
// pages/list/list.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
searchName : "",
|
||||
},
|
||||
|
||||
|
||||
jumpPage(e) {
|
||||
let jumpType = e.currentTarget.dataset.jumptype;
|
||||
console.log(jumpType == 2);
|
||||
if (jumpType == 2) {
|
||||
wx.navigateTo({
|
||||
url: "/pages/details/details?id=1"
|
||||
})
|
||||
}
|
||||
// wx.navigateTo({
|
||||
// url: this.data.category[index].url
|
||||
// })
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let that = this;
|
||||
console.log(options);
|
||||
that.setData({searchName:options.search})
|
||||
// that.data.searchName = options.search;
|
||||
// if (that.sea)
|
||||
// console.log(options);
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
5
pages/s-list/s-list.json
Normal file
5
pages/s-list/s-list.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"list-nav-bar": "/components/list-nav-bar/list-nav-bar"
|
||||
}
|
||||
}
|
||||
178
pages/s-list/s-list.wxml
Normal file
178
pages/s-list/s-list.wxml
Normal file
@@ -0,0 +1,178 @@
|
||||
<!-- <list-nav-bar title="Weixin" back="{{false}}" color="black" background="#3c8bf6"></list-nav-bar> -->
|
||||
<!-- <navigation-bar title="Weixin" back="{{false}}" color="black" background="#3c8bf6"></navigation-bar> -->
|
||||
|
||||
<list-nav-bar title="WeixinWeixinWeixin" background="#3c8bf6" showNavBtn="{{true}}"></list-nav-bar>
|
||||
|
||||
|
||||
<!-- <view class="index-search-box dis-flex">
|
||||
|
||||
<view class="index-cont-search">
|
||||
<icon class="text-center" color="rgba(0,0,0,0.4)" size="15" type="search"></icon>
|
||||
<text>搜索商品</text>
|
||||
</view>
|
||||
</navigator>
|
||||
<view bindtap="onChangeShowState" class="list-right f-28">
|
||||
<text class="iconfont icon-tubiao_kuaizhuangpailie" wx:if="{{showView}}"></text>
|
||||
<text class="iconfont icon-tubiao_liebiaopailie" wx:else></text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
|
||||
<view class="search-box">
|
||||
<navigator hover-class="none" openType="navigateBack" url="../search/index">
|
||||
<view class="search">
|
||||
<view class="search_in">
|
||||
<image src="../../images/search.png"></image>
|
||||
<view style="width:600rpx;color:#b5b5b5;padding-left:15rpx;" bind:tap="jumpPage">{{searchName}}</view>
|
||||
<!-- <input type="text" bindfocus="bindFocus" bindblur="bindFocus" placeholder="请输入故障代码或关键词" /> -->
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<scroll-view style="height: 100%;overflow:hidden;" scroll-y type="list">
|
||||
<view class="container">
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card" bind:tap="jumpPage" data-jumpType="2">
|
||||
<view class="card-header">
|
||||
<view class="dot"></view>
|
||||
<text class="title">超出焊接时间</text>
|
||||
</view>
|
||||
<view class="details">
|
||||
<!-- 查看详情 -->
|
||||
<text class="group-item-header-tip-txt">查看详情</text>
|
||||
<image class="details-icon" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
95
pages/s-list/s-list.wxss
Normal file
95
pages/s-list/s-list.wxss
Normal file
@@ -0,0 +1,95 @@
|
||||
page {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #f3f2f4;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
|
||||
/* 搜索 start */
|
||||
|
||||
.search-box {
|
||||
/* padding-top: 45rpx; */
|
||||
/* margin-bottom: 20rpx; */
|
||||
background: #f3f2f4;
|
||||
padding-top: 45rpx;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100rpx;
|
||||
background: #f3f2f4;
|
||||
}
|
||||
|
||||
.search .search_in {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 20rpx;
|
||||
/* box-sizing: border-box; */
|
||||
height: 70rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.search_in image {
|
||||
height: 45rpx;
|
||||
width: 45rpx;
|
||||
}
|
||||
|
||||
.search input {
|
||||
width: 600rpx;
|
||||
}
|
||||
|
||||
/* 搜索 end */
|
||||
|
||||
|
||||
|
||||
|
||||
.container{
|
||||
margin-top: 45rpx;
|
||||
margin-left: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
/* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background-color: #3c8bf6; /* 蓝色圆点 */
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.details {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #737373; /* 灰色文本 */
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.details-icon{
|
||||
height: 20rpx;
|
||||
width: 25rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user