diff --git a/app.js b/app.js
index 0061caa..bbc867e 100644
--- a/app.js
+++ b/app.js
@@ -123,7 +123,7 @@ App({
perms:[],
openid:null
},
- serverUrl: 'http://cbma.ctc-gz.com/',
+ 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/',
diff --git a/app.json b/app.json
index 2d055c4..1419a11 100644
--- a/app.json
+++ b/app.json
@@ -95,7 +95,8 @@
"pages/user/chose",
"pages/safelist/index",
"pages/safefeedback/index",
- "pages/safefeedback/add"
+ "pages/safefeedback/add",
+ "pages/totalrate/index2"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/pages/bind/binduser.js b/pages/bind/binduser.js
index 548e73a..3951b94 100644
--- a/pages/bind/binduser.js
+++ b/pages/bind/binduser.js
@@ -245,7 +245,7 @@ Page({
showPw(){
wx.showModal({
title: '',
- content: '默认密码是0000,如果您修改过或者账号错误,请联系贵公司管理员(一般是安全管理部门),请及时登陆pc端修改密码!',
+ content: '默认密码是0000,如果您修改过或者账号错误,请联系管理员协助处理',
showCancel:false,
confirmText:'知道了',
success (res) {
@@ -253,7 +253,7 @@ Page({
})
},
intro:function(){
- let fileurl = getApp().globalData.serverUrl + 'media/安全生产管理系统-国检集团.docx'
+ let fileurl = getApp().globalData.serverUrl + 'media/default/通知.pdf'
wx.showLoading({
title: '下载中...',
})
@@ -267,6 +267,9 @@ Page({
if (fileurl.indexOf(".docx") != -1) {
filetype = 'docx'
}
+ if (fileurl.indexOf(".pdf") != -1) {
+ filetype = 'pdf'
+ }
wx.openDocument({
filePath,
fileType: filetype,
diff --git a/pages/bind/binduser.wxml b/pages/bind/binduser.wxml
index 57a845c..e3cada6 100644
--- a/pages/bind/binduser.wxml
+++ b/pages/bind/binduser.wxml
@@ -34,6 +34,6 @@
-
+
\ No newline at end of file
diff --git a/pages/data/detail.wxml b/pages/data/detail.wxml
index 6bac746..3673a4d 100644
--- a/pages/data/detail.wxml
+++ b/pages/data/detail.wxml
@@ -12,7 +12,7 @@
最近编辑时间:{{modifytime}}
-
+
{{desciption}}
diff --git a/pages/data/index.wxml b/pages/data/index.wxml
index 4f05dc0..c3d7401 100644
--- a/pages/data/index.wxml
+++ b/pages/data/index.wxml
@@ -2,7 +2,7 @@
共{{total}}条资料
-
+
@@ -34,12 +34,13 @@
{{item.title}}
{{item.user__ubelongpart__partname}} {{item.user__name}}分享
- 类别:{{item.cate__name}}
+ {{item.title}}
+
- 播放量
- 下载量
+ 播放
+ 下载
{{item.downnum}}
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index a2da864..094e667 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -105,6 +105,6 @@
-
-
+
\ No newline at end of file
diff --git a/pages/main/main.wxml b/pages/main/main.wxml
index 4bc7c6d..23a04cd 100644
--- a/pages/main/main.wxml
+++ b/pages/main/main.wxml
@@ -17,9 +17,9 @@
-
+
@@ -118,9 +118,9 @@
在线考试
{{dknum}}
-
+
- 实时总排名
+ 实时排名
diff --git a/pages/totalrate/index2.js b/pages/totalrate/index2.js
new file mode 100644
index 0000000..a39d2f7
--- /dev/null
+++ b/pages/totalrate/index2.js
@@ -0,0 +1,170 @@
+// 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 (page) {
+ var that = this;
+ if (page != 1) { 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) {
+ console.log(res.data)
+ 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)
+ }
+})
\ No newline at end of file
diff --git a/pages/totalrate/index2.json b/pages/totalrate/index2.json
new file mode 100644
index 0000000..6f7af09
--- /dev/null
+++ b/pages/totalrate/index2.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "活动总排名",
+ "enablePullDownRefresh": true
+}
\ No newline at end of file
diff --git a/pages/totalrate/index2.wxml b/pages/totalrate/index2.wxml
new file mode 100644
index 0000000..ec91ab3
--- /dev/null
+++ b/pages/totalrate/index2.wxml
@@ -0,0 +1,92 @@
+
+
+ 活动总排名
+ 已有
+ {{total}}
+ 人参与 更新时间:{{updatetime}}
+
+
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.rate}}
+
+
+
+
+
+ {{item.user__name}}
+
+ 部门: {{item.user__ubelongpart__partname}}
+
+ 已参加
+ {{item.testnum}}
+ 场答题
+
+
+
+
+ 最高{{item.maxscore}}分
+
+ 总{{item.totalscore}}分
+ 场均{{item.avgscore}}分
+
+
+
+
+
+
+
+
+
+
+ {{index+1}}
+
+ {{item.user__ubelongpart__partname}}
+
+ 共
+ {{item.totaluser}}
+ 名成员
+ 参加了
+ {{item.totaltest}}
+ 场答题
+
+
+
+
+ 场均:{{item.avgscore}}分
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/totalrate/index2.wxss b/pages/totalrate/index2.wxss
new file mode 100644
index 0000000..3b6c237
--- /dev/null
+++ b/pages/totalrate/index2.wxss
@@ -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
+}
\ No newline at end of file