总排名查询统计
This commit is contained in:
parent
5579d456a3
commit
275ad1018a
1
app.js
1
app.js
|
@ -95,6 +95,7 @@ App({
|
||||||
openid:null
|
openid:null
|
||||||
},
|
},
|
||||||
serverUrl: 'https://safeyun.ctcshe.com/',
|
serverUrl: 'https://safeyun.ctcshe.com/',
|
||||||
|
//serverUrl: 'http://127.0.0.1:8001/',
|
||||||
//serverUrl: 'http://10.21.28.148:8000/',
|
//serverUrl: 'http://10.21.28.148:8000/',
|
||||||
//serverUrl: 'http://192.168.0.107:8000/',
|
//serverUrl: 'http://192.168.0.107:8000/',
|
||||||
//serverUrl:'http://10.0.11.195:8000/',
|
//serverUrl:'http://10.0.11.195:8000/',
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
<view class='search'>
|
<view class='search'>
|
||||||
<input type='text' placeholder='输入你想要的内容' confirm-type='search' value="{{inputValue}}" bindinput='inputBind' bindconfirm='query' style="flex: 1;"></input>
|
<input type='text' placeholder='输入你想要的内容' confirm-type='search' value="{{inputValue}}" bindinput='inputBind' bindconfirm='query' style="flex: 1;"></input>
|
||||||
<view style="padding:2rpx">
|
<view style="padding:2rpx">
|
||||||
<button type="primary" size="{{mini}}" bindtap="query" >查询</button>
|
<button type="primary" bindtap="query" >查询</button>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding:2rpx">
|
<view style="padding:2rpx">
|
||||||
<button type="primary" size="{{mini}}" bindtap="reset" >重置</button>
|
<button type="primary" bindtap="reset" >重置</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view style="display:flex;">
|
<!-- <view style="display:flex;">
|
||||||
|
|
|
@ -7,7 +7,8 @@ Page({
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
testdisable: false,
|
testdisable: false,
|
||||||
fromWx: false
|
fromWx: false,
|
||||||
|
state:1
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,7 +8,8 @@ Page({
|
||||||
data: {
|
data: {
|
||||||
page: 1,
|
page: 1,
|
||||||
serverUrl: getApp().globalData.serverUrl,
|
serverUrl: getApp().globalData.serverUrl,
|
||||||
ratelist: []
|
ratelist: [],
|
||||||
|
inputValue:''
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,7 +81,7 @@ Page({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
}),
|
}),
|
||||||
wx.request({
|
wx.request({
|
||||||
url: this.data.serverUrl + 'api/examtestdetail?a=totalrate&rows=20&page=' + page +'&companyid='+getApp().globalData.userInfo.companyid,
|
url: this.data.serverUrl + 'api/examtestdetail?a=totalrate&rows=20&page=' + page + '&companyid=' + getApp().globalData.userInfo.companyid + '&search=' + that.data.inputValue,
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/json', // 默认值
|
'content-type': 'application/json', // 默认值
|
||||||
'Cookie': wx.getStorageSync("sessionid"),
|
'Cookie': wx.getStorageSync("sessionid"),
|
||||||
|
@ -91,7 +92,7 @@ Page({
|
||||||
if (res.data.rows.length == 0) {
|
if (res.data.rows.length == 0) {
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
this.setData({
|
this.setData({
|
||||||
total: 0,
|
total: res.data.total,
|
||||||
ratelist: []
|
ratelist: []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -123,4 +124,19 @@ Page({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//搜索框文本内容显示
|
||||||
|
inputBind: function (event) {
|
||||||
|
this.setData({
|
||||||
|
inputValue: event.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
query: function () {
|
||||||
|
this.page = 1
|
||||||
|
this.getRatelist(this.page)
|
||||||
|
},
|
||||||
|
reset: function () {
|
||||||
|
this.page = 1
|
||||||
|
this.inputValue = ''
|
||||||
|
this.getRatelist(this.page)
|
||||||
|
}
|
||||||
})
|
})
|
|
@ -3,11 +3,20 @@
|
||||||
<view class="head">已有
|
<view class="head">已有
|
||||||
<span style="font-weight:bold;color:orange">{{total}}</span>
|
<span style="font-weight:bold;color:orange">{{total}}</span>
|
||||||
人参与 更新时间:{{updatetime}}
|
人参与 更新时间:{{updatetime}}
|
||||||
|
</view>
|
||||||
|
<view class='search'>
|
||||||
|
<input type='text' placeholder='输入姓名查询' confirm-type='search' value="{{inputValue}}" bindinput='inputBind' bindconfirm='query' style="flex: 1;"></input>
|
||||||
|
<view style="padding:2rpx">
|
||||||
|
<button type="primary" bindtap="query" >查询</button>
|
||||||
|
</view>
|
||||||
|
<view style="padding:2rpx">
|
||||||
|
<button type="primary" bindtap="reset" >重置</button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block wx:for="{{ratelist}}" wx:key="unique">
|
<block wx:for="{{ratelist}}" wx:key="unique">
|
||||||
<view class="weui-panel__bd">
|
<view class="weui-panel__bd">
|
||||||
<view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
|
<view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
|
||||||
<span style="color:darkblue">{{index+1}}</span>
|
<span style="color:darkblue">{{item.rate}}</span>
|
||||||
<view class="weui-media-box__hd weui-media-box__hd_in-appmsg">
|
<view class="weui-media-box__hd weui-media-box__hd_in-appmsg">
|
||||||
<!-- <image class="weui-media-box__thumb" src="{{userInfo.avatarUrl}}" /> -->
|
<!-- <image class="weui-media-box__thumb" src="{{userInfo.avatarUrl}}" /> -->
|
||||||
<image class="weui-media-box__thumb" src="{{item.user__headimgurl}}"></image>
|
<image class="weui-media-box__thumb" src="{{item.user__headimgurl}}"></image>
|
||||||
|
|
|
@ -3,3 +3,21 @@
|
||||||
background-color: cornflowerblue;
|
background-color: cornflowerblue;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.search
|
||||||
|
{
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
width:100%;
|
||||||
|
height:auto;
|
||||||
|
background-color:white;
|
||||||
|
border:2rpx solid goldenrod;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 搜索框提示文字样式 */
|
||||||
|
.search input
|
||||||
|
{
|
||||||
|
padding-left:30rpx;
|
||||||
|
}
|
Loading…
Reference in New Issue