wxml
wxss
/* pages/tab/research/index.wxss */
page{
}
.research {
width: 100%;
height: 60rpx;
border-radius: 50rpx;
}
.content {
margin-top: 20rpx;
width: 90%;
margin-left: 5%;
}
.item {
width: 140rpx;
height: 60rpx;
color: #b1b1b1;
line-height: 60rpx;
margin-right: 30rpx;
background:white;
border:1rpx solid #eee;
margin-top: 15px;
box-sizing: border-box;
float: left;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.hop-research {
margin-top: 40rpx;
}
/* 修 */
.mar {
width: 80%;
height: 100%;
background: #eee;
}
.icon {
margin-left: 8px;
width: 50rpx;
height: 100%;
float: left;
}
.sou {
margin-left: 20rpx;
color: #fdb52e;
}
.title_One{
border-bottom:1rpx solid #eee;
padding-bottom:20rpx;
box-sizing:border-box;
}
.f{
border-bottom:1rpx solid #eee;
box-sizing:border-box;
}
.go{
width:25%;
border:1rpx solid #bbb;
text-align:center;
float:left;
margin:10rpx;
box-sizing: border-box;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.iconfont{
font-size: 50rpx;
}
js
// pages/tab/research/index.js
const app = getApp();
Page({
/**
- 页面的初始数据
*/
data: {
statusBarHeight: app.globalData.statusBarHeight,
recordList:[],
inputVal:’’
},
// 返回上一页面
goBack() {
wx.navigateBack({
})
},
confirm(e){
wx.navigateTo({
url: ‘/pages/tab/research/bargainList/index?keyword=’+e.detail.value,
})
e.detail.value=’’;
},
bindKeyInput: function(e){
console.log(e);
this.setData({
inputVal:e.detail.value
})
},
conf(){
wx.navigateTo({
url: ‘/pages/tab/research/bargainList/index?keyword=’ + this.data.inputVal,
})
this.data.inputVal = ‘’;
},
goResearch(e){
const that=this;
console.log(e.currentTarget.id)
wx.navigateTo({
url: ‘/pages/tab/research/bargainList/index?keyword=’ + e.currentTarget.id,
})
},
getRecord(){
app.KaTeX parse error: Expected 'EOF', got '}' at position 199: …age); }) }̲, deleteRecor…api.request({
path: ‘index/deleteRecord’,
data: { ids: ids }
}).then(({ code,data }) => {
if(code==200){
that.setData({
recordList: []
})
}
}).catch(({ message }) => {
app.message(message);
})
}
}
})
},
/**
- 生命周期函数–监听页面加载
*/
onLoad: function (options) {
},
/**
- 生命周期函数–监听页面初次渲染完成
*/
onReady: function () {
},
/**
- 生命周期函数–监听页面显示
*/
onShow: function () {
this.getRecord();
},
/**
- 生命周期函数–监听页面隐藏
*/
onHide: function () {
},
/**
- 生命周期函数–监听页面卸载
*/
onUnload: function () {
},
/**
- 页面相关事件处理函数–监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
- 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
- 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})