Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
|
b683362763 | |
|
4f1d986016 | |
|
6058add5e2 | |
|
ac5f82223d | |
|
ad1e964359 | |
|
80190b6693 | |
|
3475817aa9 |
4
app.js
4
app.js
|
@ -123,8 +123,8 @@ App({
|
|||
perms:[],
|
||||
openid:null
|
||||
},
|
||||
serverUrl: 'https://safeyun.ctcshe.com/',
|
||||
//serverUrl: 'http://127.0.0.1:8000/',
|
||||
serverUrl: 'https://cbma.ctc-gz.com/',
|
||||
// serverUrl: 'http://127.0.0.1:8000/',
|
||||
//serverUrl: 'http://10.21.28.148:8000/',
|
||||
//serverUrl: 'http://192.168.0.103:8000/',
|
||||
//serverUrl:'http://10.0.11.195:8000/',
|
||||
|
|
5
app.json
5
app.json
|
@ -95,12 +95,13 @@
|
|||
"pages/user/chose",
|
||||
"pages/safelist/index",
|
||||
"pages/safefeedback/index",
|
||||
"pages/safefeedback/add"
|
||||
"pages/safefeedback/add",
|
||||
"pages/totalrate/index2"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "安全生产管理工具",
|
||||
"navigationBarTitleText": "安全环保专题网络考评",
|
||||
"navigationBarTextStyle": "black"
|
||||
},
|
||||
"tabBar": {
|
||||
|
|
|
@ -10,6 +10,7 @@ Page({
|
|||
password:'',
|
||||
mpopenid:'',
|
||||
isExists:false,
|
||||
userInfo:null,
|
||||
msg:''
|
||||
},
|
||||
usernameChange: function (e) {
|
||||
|
@ -23,7 +24,8 @@ Page({
|
|||
var postdata = {
|
||||
username: that.data.username,
|
||||
password: that.data.password,
|
||||
mpopenid: getApp().globalData.userInfo.mpopenid
|
||||
mpopenid: getApp().globalData.userInfo.mpopenid,
|
||||
userinfo: that.data.userInfo
|
||||
}
|
||||
wx.request({
|
||||
url: getApp().globalData.serverUrl + 'bindmp',
|
||||
|
@ -127,11 +129,27 @@ Page({
|
|||
|
||||
},
|
||||
onGetInfo:function(e){
|
||||
|
||||
this.setData({
|
||||
userInfo:e.detail.userInfo
|
||||
})
|
||||
this.denglu()
|
||||
},
|
||||
getUserProfile: function(e){
|
||||
wx.getUserProfile({
|
||||
desc: '获取头像和昵称', //
|
||||
success: (res) => {
|
||||
this.setData({
|
||||
userInfo: res.userInfo
|
||||
})
|
||||
this.denglu()
|
||||
},
|
||||
fail:(res)=>{
|
||||
this.denglu()
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
onGetInfo2:function(e){
|
||||
this.setData({
|
||||
userInfo:e.detail.userInfo
|
||||
|
@ -245,7 +263,7 @@ Page({
|
|||
showPw(){
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '默认密码是0000,如果您修改过或者账号错误,请联系贵公司管理员(一般是安全管理部门),请及时登陆pc端修改密码!',
|
||||
content: '默认密码是0000,如果您修改过或者账号错误,请联系管理员协助处理',
|
||||
showCancel:false,
|
||||
confirmText:'知道了',
|
||||
success (res) {
|
||||
|
@ -253,7 +271,7 @@ Page({
|
|||
})
|
||||
},
|
||||
intro:function(){
|
||||
let fileurl = getApp().globalData.serverUrl + 'media/安全生产管理系统-国检集团.docx'
|
||||
let fileurl = getApp().globalData.serverUrl + 'media/default/通知.pdf'
|
||||
wx.showLoading({
|
||||
title: '下载中...',
|
||||
})
|
||||
|
@ -267,6 +285,9 @@ Page({
|
|||
if (fileurl.indexOf(".docx") != -1) {
|
||||
filetype = 'docx'
|
||||
}
|
||||
if (fileurl.indexOf(".pdf") != -1) {
|
||||
filetype = 'pdf'
|
||||
}
|
||||
wx.openDocument({
|
||||
filePath,
|
||||
fileType: filetype,
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
<view class="page">
|
||||
<view class="page__hd">
|
||||
<view class="page__title">登陆安全生产管理工具</view>
|
||||
<view class="page__desc">首次使用需要绑定账号</view>
|
||||
<view class="page__desc">请输入账号密码</view>
|
||||
<view class="page__desc">PC端请访问safeyun.ctcshe.com</view>
|
||||
<view style="text-align:center;margin-top:12px">
|
||||
<image src="/pages/images/logo.jpg" mode="aspectFit" style="width: 200px; height: 200px;"></image>
|
||||
</view>
|
||||
<view class="page__bd">
|
||||
<view class="weui-cells__title">登陆</view>
|
||||
<view class="weui-cells__title" style="text-align:center">登陆</view>
|
||||
<view class="weui-cells_desc" wx:if="{{!isExists}}" style="color:red">{{msg}}</view>
|
||||
<view class="weui-cells_desc" wx:if="{{isExists}}" style="text-align:center">
|
||||
<span style="color:orange;font-weight:bold">{{name}}</span>
|
||||
|
@ -28,15 +25,15 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="weui-btn" type="primary" open-type="getUserInfo" bindgetuserinfo="onGetInfo">授权并绑定登陆</button>
|
||||
<button class="weui-btn" type="primary" bindtap="getUserProfile">授权并绑定登陆</button>
|
||||
<view style="text-align:center;color:gray" bindtap="showPw">账号错误或忘记密码?</view>
|
||||
<view style="text-align:center;color:gray">获取测试账户请致电15810169371</view>
|
||||
<!-- <view style="text-align:center;color:gray">获取测试账户请致电15810169371</view> -->
|
||||
<!-- <button class="weui-btn" bindtap="denglu2">测试账户登录</button> -->
|
||||
</view>
|
||||
<view class="weui-footer weui-footer_fixed-bottom">
|
||||
<!-- <view class="weui-footer__links">
|
||||
<navigator url="" class="weui-footer__link">WeUI首页</navigator>
|
||||
</view> -->
|
||||
<view class="weui-footer__text" bindtap="intro">点击下载系统/小程序文档介绍</view>
|
||||
<view class="weui-footer__text">Copyright © 2018-2020 国检集团</view>
|
||||
<view class="weui-footer__text" bindtap="intro">点击下载活动通知</view>
|
||||
<view class="weui-footer__text">Copyright © 2018-2021 中存大数据</view>
|
||||
</view>
|
|
@ -12,7 +12,7 @@
|
|||
<view class="weui-media-box__desc">最近编辑时间:{{modifytime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-article">
|
||||
<view class="weui-article" wx:if="{{description}}">
|
||||
<view class="weui-article__section">
|
||||
<span> </span>
|
||||
{{desciption}}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<view class="head">共{{total}}条资料</view>
|
||||
<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">
|
||||
<button type="primary" bindtap="query" >查询</button>
|
||||
</view>
|
||||
|
@ -34,12 +34,13 @@
|
|||
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
|
||||
<view class="weui-media-box__title">{{item.title}}</view>
|
||||
<view class="weui-media-box__desc">{{item.user__ubelongpart__partname}} {{item.user__name}}分享</view>
|
||||
<view class="weui-media-box__desc">类别:{{item.cate__name}}</view>
|
||||
<view class="weui-media-box__desc">{{item.title}}</view>
|
||||
<!-- <view class="weui-media-box__desc">类别:{{item.cate__name}}</view> -->
|
||||
</view>
|
||||
<view class="weui-panel__ft weui-cell__ft_in-access">
|
||||
<view class="weui-media-box__title">
|
||||
<span wx:if="{{item.type==1}}">播放量</span>
|
||||
<span wx:else>下载量</span>
|
||||
<span wx:if="{{item.type==1}}">播放</span>
|
||||
<span wx:else>下载</span>
|
||||
<span style="color:green;font-weight:bold"> {{item.downnum}}</span>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -33,8 +33,8 @@ Page({
|
|||
*/
|
||||
onShow: function () {
|
||||
var that = this;
|
||||
that.getRatelist(1)
|
||||
this.data.page = 1;
|
||||
that.getRatelist()
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -56,9 +56,10 @@ Page({
|
|||
*/
|
||||
onPullDownRefresh: function () {
|
||||
var that = this;
|
||||
that.getRatelist(1);
|
||||
wx.stopPullDownRefresh();
|
||||
this.data.page = 1;
|
||||
that.getRatelist();
|
||||
wx.stopPullDownRefresh();
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -66,9 +67,9 @@ Page({
|
|||
*/
|
||||
onReachBottom: function () {
|
||||
//上拉分页,将页码加1,然后调用分页函数
|
||||
// this.data.page = this.data.page + 1;
|
||||
// this.getRatelist();
|
||||
// wx.stopPullDownRefresh();
|
||||
this.data.page = this.data.page + 1;
|
||||
this.getRatelist();
|
||||
wx.stopPullDownRefresh();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -77,9 +78,9 @@ Page({
|
|||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
getRatelist: function (page) {
|
||||
getRatelist: function () {
|
||||
var that = this;
|
||||
if (page != 1) { page = that.data.page }
|
||||
let page = that.data.page
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
}),
|
||||
|
@ -108,7 +109,7 @@ Page({
|
|||
} else {
|
||||
let list
|
||||
if (page == 1) {
|
||||
list = res.data.rows.slice(0,10)
|
||||
list = res.data.rows
|
||||
} else {
|
||||
list = this.data.ratelist.concat(res.data.rows)
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "考试排名"
|
||||
"navigationBarTitleText": "考试排名",
|
||||
"onReachBottomDistance": 50
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
<view class="page">
|
||||
<view class="head" style="font-weight:bold;font-size:24px">{{examtestname}}</view>
|
||||
<view class="head">已有{{total}}人参与,前10名如下</view>
|
||||
<view class="head">已有{{total}}人参与</view>
|
||||
<block wx:for="{{ratelist}}" wx:key="unique">
|
||||
<view class="weui-panel__bd">
|
||||
<view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
|
||||
|
|
|
@ -82,8 +82,9 @@ Page({
|
|||
})
|
||||
},
|
||||
showRate: function () {
|
||||
wx.navigateTo({
|
||||
url: 'rate?examtestid=' + this.data.examtestid,
|
||||
})
|
||||
wx.navigateTo({
|
||||
url: 'rate?examtestid=' + this.data.examtestid,
|
||||
})
|
||||
|
||||
}
|
||||
})
|
Binary file not shown.
After Width: | Height: | Size: 9.1 KiB |
|
@ -105,6 +105,6 @@
|
|||
<!-- <view class="weui-footer__links">
|
||||
<navigator url="" class="weui-footer__link">WeUI首页</navigator>
|
||||
</view> -->
|
||||
<view class="weui-footer__text" bindtap="intro">点击下载系统/小程序文档介绍</view>
|
||||
<view class="weui-footer__text">Copyright © 2018-2020 国检集团</view>
|
||||
<!-- <view class="weui-footer__text" bindtap="intro">点击下载系统/小程序文档介绍</view>
|
||||
<view class="weui-footer__text">Copyright © 2018-2021 国检集团</view> -->
|
||||
</view>
|
|
@ -19,7 +19,7 @@ Page({
|
|||
sbtodonum:0,
|
||||
yhgznum:0,
|
||||
serverUrl: getApp().globalData.serverUrl,
|
||||
isGjjt:false,
|
||||
companyId:null,
|
||||
// Banner数据
|
||||
images: [],
|
||||
// 是否显示面板指示点
|
||||
|
@ -39,7 +39,7 @@ Page({
|
|||
// 后边距,可用于露出后一项的一小部分,接受 px 和 rpx 值
|
||||
nextMargin: 0,
|
||||
msgList: [
|
||||
{ title: "欢迎使用安全生产管理工具!" },{title:"每晚10-11点不定期更新,请尽量不在此时间使用"}]
|
||||
{ title: "欢迎参加安全环保专题网络考评!" },{title:"每晚10-11点不定期更新,请尽量不在此时间使用"}],
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -59,12 +59,6 @@ Page({
|
|||
},
|
||||
callback: function () {
|
||||
var that = this;
|
||||
if (getApp().globalData.userInfo.companyid == 2681) {
|
||||
this.setData({
|
||||
isGjjt: true,
|
||||
user__name:getApp().globalData.userInfo.name,
|
||||
})
|
||||
}
|
||||
// let openid = getApp().globalData.userInfo.openid;
|
||||
// if (openid == null && getApp().globalData.userInfo.companyid != 2681) {
|
||||
// wx.showModal({
|
||||
|
@ -83,6 +77,8 @@ Page({
|
|||
// })
|
||||
// }
|
||||
this.getNew()
|
||||
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
@ -98,15 +94,11 @@ Page({
|
|||
var that = this
|
||||
if(getApp().globalData.sessionId){
|
||||
that.getNew()
|
||||
this.setData({
|
||||
companyId: getApp().globalData.userInfo.companyid
|
||||
})
|
||||
}
|
||||
if (getApp().globalData.userInfo.companyid == 2681) {
|
||||
this.setData({
|
||||
isGjjt: true,
|
||||
user__name: getApp().globalData.userInfo.name,
|
||||
msgList: [
|
||||
{ title: "知识竞赛火热进行中!" },]
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -416,12 +408,7 @@ Page({
|
|||
}
|
||||
},
|
||||
tapexercise: function () {
|
||||
if (this.data.isGjjt) { //练习功能
|
||||
wx.showModal({
|
||||
content: '本次活动该功能不便访问!',
|
||||
showCancel: false
|
||||
})
|
||||
} else if (getApp().globalData.userInfo.perms != undefined) {
|
||||
if (getApp().globalData.userInfo.perms != undefined) {
|
||||
if (getApp().globalData.userInfo.perms.indexOf(25) != -1) {//考试功能
|
||||
wx.navigateTo({
|
||||
url: '/pages/exercise/index',
|
||||
|
|
|
@ -17,8 +17,11 @@
|
|||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<!-- <view class="weui-cells__title" wx:if="{{!isGjjt}}">数据采集</view> -->
|
||||
<view class="weui-grids" wx:if="{{!isGjjt}}">
|
||||
<!-- <view style="margin-top:4px;margin-bottom:4px;text-align:right;margin-right:4px">
|
||||
<switch bindchange="open">打开全部功能</switch>
|
||||
</view> -->
|
||||
<!-- <view class="weui-cells__title" wx:if="{{!showAll}}">数据采集</view> -->
|
||||
<view class="weui-grids" wx:if="{{companyId!=2}}">
|
||||
<navigator url="/pages/checkjob/index" class="weui-grid" hover-class="weui-grid_active">
|
||||
<image class="weui-grid__icon" src="../images/task.png" />
|
||||
<view class="weui-grid__label">检查任务</view>
|
||||
|
@ -43,7 +46,7 @@
|
|||
<!-- <view class="weui-badge" style="position: absolute;top: 1em;right: 1em;" wx:if="{{yhgznum!=0}}">{{yhgznum}}</view> -->
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="weui-grids">
|
||||
<view class="weui-grids" wx:if="{{companyId!=2}}">
|
||||
<navigator url="/pages/observe/observe" class="weui-grid" hover-class="weui-grid_active">
|
||||
<image class="weui-grid__icon" src="../images/watch.png" />
|
||||
<view class="weui-grid__label">行为观察</view>
|
||||
|
@ -60,7 +63,7 @@
|
|||
<view class="weui-grid__label">合理化建议</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="weui-grids">
|
||||
<view class="weui-grids" wx:if="{{companyId!=2}}">
|
||||
<navigator url="/pages/public/public" class="weui-grid" hover-class="weui-grid_active">
|
||||
<image class="weui-grid__icon" src="../images/public.png" />
|
||||
<view class="weui-grid__label">公告</view>
|
||||
|
@ -81,7 +84,7 @@
|
|||
</navigator>
|
||||
|
||||
</view>
|
||||
<view class="weui-grids">
|
||||
<view class="weui-grids" wx:if="{{companyId!=2}}">
|
||||
<navigator url="/pages/operation/operation" class="weui-grid" hover-class="weui-grid_active">
|
||||
<image class="weui-grid__icon" src="../images/operation.png" />
|
||||
<view class="weui-grid__label">作业许可</view>
|
||||
|
@ -98,8 +101,8 @@
|
|||
</navigator>
|
||||
</view>
|
||||
<!-- <view class="weui-cells__title">
|
||||
<span wx:if="{{!isGjjt}}">学习园地</span>
|
||||
<view wx:if="{{isGjjt}}">
|
||||
<span wx:if="{{!showAll}}">学习园地</span>
|
||||
<view wx:if="{{showAll}}">
|
||||
<span style="color:orange;font-weight:bold">{{user__name}}</span>
|
||||
,进入在线考试答题吧!
|
||||
</view>
|
||||
|
@ -115,16 +118,16 @@
|
|||
<view class="weui-grid__label">在线考试</view>
|
||||
<view class="weui-badge" style="position: absolute;top: 1em;right: 1em;" wx:if="{{dknum!=0}}">{{dknum}}</view>
|
||||
</view>
|
||||
<navigator class="weui-grid" hover-class="weui-grid_active" url="../totalrate/index" wx:if="{{isGjjt}}">
|
||||
<!-- <navigator class="weui-grid" hover-class="weui-grid_active" url="../totalrate/index2">
|
||||
<image class="weui-grid__icon" src="../images/rate.png" />
|
||||
<view class="weui-grid__label">实时总排名</view>
|
||||
</navigator>
|
||||
<view class="weui-grid__label">实时排名</view>
|
||||
</navigator> -->
|
||||
<navigator url="/pages/train/train" class="weui-grid" hover-class="weui-grid_active">
|
||||
<image class="weui-grid__icon" src="../images/train.png" />
|
||||
<view class="weui-grid__label">线下培训</view>
|
||||
<view class="weui-badge" style="position: absolute;top: 1em;right: 1em;" wx:if="{{dqdnum!=0}}">{{dqdnum}}</view>
|
||||
</navigator>
|
||||
<view class="weui-grid" hover-class="weui-grid_active" bindtap='tapexercise' wx:if="{{!isGjjt}}">
|
||||
<view class="weui-grid" hover-class="weui-grid_active" bindtap='tapexercise'>
|
||||
<image class="weui-grid__icon" src="../images/exercise.png" />
|
||||
<view class="weui-grid__label">模拟练习</view>
|
||||
</view>
|
||||
|
|
|
@ -26,10 +26,10 @@ text-overflow: ellipsis;
|
|||
white-space: nowrap;
|
||||
}
|
||||
.weui-grids {
|
||||
/* border-top:none; */
|
||||
border-top:none;
|
||||
}
|
||||
.weui-grid {
|
||||
width: 25%;
|
||||
/* border-right:none; */
|
||||
border-right:none;
|
||||
border-bottom:none;
|
||||
}
|
|
@ -0,0 +1,169 @@
|
|||
// pages/examtest/rate.js
|
||||
var util = require('../../utils/util.js')
|
||||
var sliderWidth = 96;
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
page: 1,
|
||||
serverUrl: getApp().globalData.serverUrl,
|
||||
ratelist: [],
|
||||
inputValue:'',
|
||||
tabs: ["个人排名", "机构排名"],
|
||||
activeIndex: 0,
|
||||
sliderOffset: 0,
|
||||
sliderLeft: 0
|
||||
},
|
||||
tabClick: function (e) {
|
||||
var that = this
|
||||
that.setData({
|
||||
sliderOffset: e.currentTarget.offsetLeft,
|
||||
activeIndex: e.currentTarget.id
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function () {
|
||||
var that =this
|
||||
wx.getSystemInfo({
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
sliderLeft: (res.windowWidth / that.data.tabs.length - sliderWidth) / 2,
|
||||
sliderOffset: res.windowWidth / that.data.tabs.length * that.data.activeIndex
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
var that = this;
|
||||
that.getRatelist(that.data.page)
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
var that = this;
|
||||
if (that.data.activeIndex == 0) {
|
||||
that.getRatelist(1);
|
||||
wx.stopPullDownRefresh();
|
||||
this.data.page = 1;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
//上拉分页,将页码加1,然后调用分页函数
|
||||
var that = this
|
||||
if (that.data.activeIndex == 0) {
|
||||
this.data.page = this.data.page + 1;
|
||||
this.getRatelist();
|
||||
wx.stopPullDownRefresh();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
getRatelist: function () {
|
||||
var that = this;
|
||||
let page = that.data.page
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
}),
|
||||
wx.request({
|
||||
url: this.data.serverUrl + 'api/examtestdetail?a=totalrate&rows=20&page=' + page + '&companyid=' + getApp().globalData.userInfo.companyid + '&search=' + that.data.inputValue,
|
||||
header: {
|
||||
'content-type': 'application/json', // 默认值
|
||||
'Cookie': getApp().globalData.sessionId,
|
||||
},
|
||||
success: res => {
|
||||
if (res.statusCode === 200) {
|
||||
if (res.data.rows.length == 0) {
|
||||
if (page == 1) {
|
||||
this.setData({
|
||||
total: res.data.total,
|
||||
ratelist: []
|
||||
})
|
||||
}
|
||||
else {
|
||||
wx.showModal({
|
||||
content: "已经到底啦!",
|
||||
showCancel: false,
|
||||
confirmText: "确定",
|
||||
})
|
||||
}
|
||||
} else {
|
||||
let list
|
||||
if (page == 1) {
|
||||
list = res.data.rows
|
||||
} else {
|
||||
list = this.data.ratelist.concat(res.data.rows)
|
||||
}
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
list[i].totaltookformat = util.formatSeconds(list[i].totaltook)
|
||||
}
|
||||
this.setData({
|
||||
total: res.data.total,
|
||||
ratelist: list,
|
||||
updatetime:res.data.updatetime
|
||||
})
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
orglist:res.data.rows2
|
||||
})
|
||||
wx.hideLoading();
|
||||
}
|
||||
});
|
||||
},
|
||||
//搜索框文本内容显示
|
||||
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)
|
||||
}
|
||||
})
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "活动总排名",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
<view class="page">
|
||||
<view class="head">
|
||||
<view style="font-weight:bold;font-size:22px">活动总排名</view>
|
||||
<view>已有
|
||||
<span style="font-weight:bold;color:orange">{{total}}</span>
|
||||
人参与 更新时间:{{updatetime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-tab">
|
||||
<view class="weui-navbar">
|
||||
<block wx:for="{{tabs}}" wx:key="*this">
|
||||
<view id="{{index}}" class="weui-navbar__item {{activeIndex == index ? 'weui-bar__item_on' : ''}}" bindtap="tabClick">
|
||||
<view class="weui-navbar__title">{{item}}</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="weui-navbar__slider" style="left: {{sliderLeft}}px; transform: translateX({{sliderOffset}}px); -webkit-transform: translateX({{sliderOffset}}px);"></view>
|
||||
</view>
|
||||
<view class="weui-tab__panel">
|
||||
<view class="weui-tab__content" hidden="{{activeIndex != 0}}">
|
||||
<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>
|
||||
<block wx:for="{{ratelist}}" wx:key="unique">
|
||||
<view class="weui-panel__bd">
|
||||
<view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
|
||||
<view class="weui-media-box__hd weui-media-box__hd_in-appmsg" style="width:30px;" wx:if="{{item.rate==1||item.rate==2||item.rate==3}}">
|
||||
<image class="weui-media-box__thumb" src="../images/guanjun.svg" wx:if="{{item.rate==1}}"></image>
|
||||
<image class="weui-media-box__thumb" src="../images/yajun.svg" wx:if="{{item.rate==2}}"></image>
|
||||
<image class="weui-media-box__thumb" src="../images/jijun.svg" wx:if="{{item.rate==3}}"></image>
|
||||
|
||||
</view>
|
||||
<span class="index" style="width:auto" wx:else>{{item.rate}}</span>
|
||||
<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="{{item.user__headimgurl}}"></image>
|
||||
</view>
|
||||
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
|
||||
<view class="weui-media-box__title">{{item.user__name}}
|
||||
</view>
|
||||
<view class="weui-media-box__desc">部门: {{item.user__ubelongpart__partname}}
|
||||
</view>
|
||||
<view class="weui-media-box__desc">已参加
|
||||
<span style="font-weight:bold;color:darkblue">{{item.testnum}}</span>
|
||||
场答题
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-panel__ft">
|
||||
|
||||
<view class="weui-media-box__title" style="background-color:orange;color:white;font-weight:bold">最高{{item.maxscore}}分</view>
|
||||
|
||||
<view class="weui-media-box__desc" style="background-color:green;color:white">总{{item.totalscore}}分</view>
|
||||
<view class="weui-media-box__desc" style="background-color:green;color:white">场均{{item.avgscore}}分</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="weui-tab__content" hidden="{{activeIndex != 1}}">
|
||||
<block wx:for="{{orglist}}" wx:key="unique">
|
||||
<view class="weui-panel__bd">
|
||||
<view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
|
||||
<span class="index">{{index+1}}</span>
|
||||
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
|
||||
<view class="weui-media-box__title">{{item.user__ubelongpart__partname}}
|
||||
</view>
|
||||
<view class="weui-media-box__desc">共
|
||||
<span style="font-weight:bold;color:darkblue">{{item.totaluser}}</span>
|
||||
名成员
|
||||
参加了
|
||||
<span style="font-weight:bold;color:darkblue">{{item.totaltest}}</span>
|
||||
场答题
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-panel__ft">
|
||||
|
||||
<view class="weui-media-box__title" style="background-color:orange;color:white;font-weight:bold">场均:{{item.avgscore}}分</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
|
@ -0,0 +1,34 @@
|
|||
.head{
|
||||
color:#fff;
|
||||
background-color: cornflowerblue;
|
||||
text-align: center;
|
||||
height:60px;
|
||||
width:100%
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.index{
|
||||
color:#fff;
|
||||
background-color: darkslateblue;
|
||||
border-radius: 6px;
|
||||
width:30px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"description": "项目配置文件。",
|
||||
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"es6": true,
|
||||
|
@ -18,7 +18,7 @@
|
|||
"checkSiteMap": true,
|
||||
"uploadWithSourceMap": true,
|
||||
"compileHotReLoad": false,
|
||||
"useMultiFrameRuntime": false,
|
||||
"useMultiFrameRuntime": true,
|
||||
"useApiHook": false,
|
||||
"useApiHostProcess": false,
|
||||
"babelSetting": {
|
||||
|
@ -27,34 +27,29 @@
|
|||
"outputPath": ""
|
||||
},
|
||||
"enableEngineNative": false,
|
||||
"useIsolateContext": false,
|
||||
"useCompilerModule": false,
|
||||
"userConfirmedUseCompilerModuleSwitch": false,
|
||||
"useIsolateContext": true,
|
||||
"userConfirmedBundleSwitch": false,
|
||||
"packNpmManually": false,
|
||||
"packNpmRelationList": [],
|
||||
"minifyWXSS": true
|
||||
"minifyWXSS": true,
|
||||
"showES6CompileOption": false,
|
||||
"disableUseStrict": false,
|
||||
"useCompilerPlugins": false,
|
||||
"useStaticServer": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.9.4",
|
||||
"appid": "wx5c39b569f01c27db",
|
||||
"libVersion": "2.20.0",
|
||||
"appid": "wx8cc62edbfed029b9",
|
||||
"projectname": "aqyj",
|
||||
"isGameTourist": false,
|
||||
"simulatorType": "wechat",
|
||||
"simulatorPluginLibVersion": {},
|
||||
"condition": {
|
||||
"search": {
|
||||
"list": []
|
||||
},
|
||||
"conversation": {
|
||||
"list": []
|
||||
},
|
||||
"game": {
|
||||
"currentL": -1,
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"list": []
|
||||
}
|
||||
"condition": {},
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 2
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue