Commit ad6b5e32 authored by liuyuping's avatar liuyuping

'3'

parent ece0f481
......@@ -37,7 +37,6 @@
{
"root": "packageB",
"pages": [
"pages/warn/warn",
"pages/teach/teach",
"pages/live/live",
"pages/course/course"
......@@ -48,6 +47,7 @@
"root": "packageC",
"pages": [
"pages/exam/exam",
"pages/warn/warn",
"pages/evaluate/evaluate",
"pages/testpaper/testpaper"
],
......@@ -70,7 +70,18 @@
"pages/sign/sign",
"pages/logs/logs",
"pages/index/index",
"pages/hwcatapproval/hwcatapproval"
"pages/hwcatapproval/hwcatapproval",
"pages/addtrainimg/addtrainimg",
"pages/trainimg/trainimg",
"pages/trainimgitem/trainimgitem",
"pages/certify/certify",
"pages/trainimgenter/trainimgenter",
"pages/certifyenter/certifyenter",
"pages/hwapprovals/hwapprovals",
"pages/certifyitem/certifyitem",
"pages/addapproval/addapproval",
"pages/addcertify/addcertify",
"pages/hwapprovallist/hwapprovallist"
],
"independent": true
}
......
// packageC/pages/warn/warn.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageC/pages/warn/warn.wxml-->
<text>packageC/pages/warn/warn.wxml</text>
/* packageC/pages/warn/warn.wxss */
\ No newline at end of file
// packageE/pages/addapproval/addapproval.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageE/pages/addapproval/addapproval.wxml-->
<text>packageE/pages/addapproval/addapproval.wxml</text>
/* packageE/pages/addapproval/addapproval.wxss */
\ No newline at end of file
// packageE/pages/addcertify/addcertify.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageE/pages/addcertify/addcertify.wxml-->
<text>packageE/pages/addcertify/addcertify.wxml</text>
/* packageE/pages/addcertify/addcertify.wxss */
\ No newline at end of file
// packageE/pages/addtrainimg/addtrainimg.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageE/pages/addtrainimg/addtrainimg.wxml-->
<text>packageE/pages/addtrainimg/addtrainimg.wxml</text>
/* packageE/pages/addtrainimg/addtrainimg.wxss */
\ No newline at end of file
// packageE/pages/certify/certify.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageE/pages/certify/certify.wxml-->
<text>packageE/pages/certify/certify.wxml</text>
/* packageE/pages/certify/certify.wxss */
\ No newline at end of file
// packageE/pages/certifyenter/certifyenter.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageE/pages/certifyenter/certifyenter.wxml-->
<text>packageE/pages/certifyenter/certifyenter.wxml</text>
/* packageE/pages/certifyenter/certifyenter.wxss */
\ No newline at end of file
// packageE/pages/certifyitem/certifyitem.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageE/pages/certifyitem/certifyitem.wxml-->
<text>packageE/pages/certifyitem/certifyitem.wxml</text>
/* packageE/pages/certifyitem/certifyitem.wxss */
\ No newline at end of file
// packageE/pages/hwapprovals/hwapprovals.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageE/pages/hwapprovals/hwapprovals.wxml-->
<text>packageE/pages/hwapprovals/hwapprovals.wxml</text>
/* packageE/pages/hwapprovals/hwapprovals.wxss */
\ No newline at end of file
// packageE/pages/trainimg/trainimg.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageE/pages/trainimg/trainimg.wxml-->
<text>packageE/pages/trainimg/trainimg.wxml</text>
/* packageE/pages/trainimg/trainimg.wxss */
\ No newline at end of file
// packageE/pages/trainimgenter/trainimgenter.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageE/pages/trainimgenter/trainimgenter.wxml-->
<text>packageE/pages/trainimgenter/trainimgenter.wxml</text>
/* packageE/pages/trainimgenter/trainimgenter.wxss */
\ No newline at end of file
// packageE/pages/trainimgitem/trainimgitem.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packageE/pages/trainimgitem/trainimgitem.wxml-->
<text>packageE/pages/trainimgitem/trainimgitem.wxml</text>
/* packageE/pages/trainimgitem/trainimgitem.wxss */
\ No newline at end of file
......@@ -145,6 +145,9 @@ Page({
wx.uploadFile({
filePath: this.data.certifyFile,
name: 'file',
header: {
Authorization: app.globalData.Authorization
},
url: app.globalData.appBaseUrlV2 + '/api/dangerJobReport',
formData: formObj,
header: {
......
......@@ -23,6 +23,9 @@ Page({
wx.request({
url: app.globalData.appBaseUrlV2 + '/api/notice/findOwn',
method: 'get',
header: {
Authorization: app.globalData.Authorization
},
data: {
noticeId: data.adviceId
},
......
{
"usingComponents": {}
}
\ No newline at end of file
/* pages/certifyitem/certifyitem.wxss */
\ No newline at end of file
......@@ -14,7 +14,7 @@ let curIndex = 0
canvas.setChart(chart)
const option = {
title: {
text: app.globalData.currentCourse.courses[curIndex].process + '%',
text: app.globalData.currentCourse.coursehour[curIndex].speed,
left: 'center',
top: 'center'
},
......@@ -34,10 +34,10 @@ let curIndex = 0
},
data: [
{
value: app.globalData.currentCourse.courses[curIndex].process
value: parseInt(app.globalData.currentCourse.coursehour[curIndex].speed)
},
{
value: 100 - app.globalData.currentCourse.courses[curIndex].process
value: parseInt(100 - app.globalData.currentCourse.coursehour[curIndex].speed)
}
]
}
......@@ -54,15 +54,16 @@ Page({
* 页面的初始数据
*/
data: {
curCourse: app.globalData.currentCourse.title,
curCourse: app.globalData.currentCourse.courseBriefIntroduction,
curCoursePic: 'https://img0.baidu.com/it/u=2265254049,1802113800&fm=26&fmt=auto&gp=0.jpg',
courseVideoSrc: 'http://39.102.232.151:8030/video/8.mp4',
courseVideoPlay: 'data:image/png;base64,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',
animationDisappear: {},
courses: [],
courses: app.globalData.currentCourse.coursehour,
ec: {
onInit: initChart
}
},
curCourseHourIndex: 0
},
/**
......@@ -70,10 +71,9 @@ Page({
*/
onLoad: function (options) {
this.setData({
courseVideoSrc: app.globalData.currentCourse.courses ? app.globalData.currentCourse.courses[0]: '',
curCourse: app.globalData.currentCourse.title,
courses: app.globalData.currentCourse.courses,
curCoursePic: app.globalData.currentCourse.cover
courseVideoSrc: app.globalData.currentCourse.coursehour ? (app.globalData.appBaseUrlV3 + '/online-training/' + app.globalData.currentCourse.coursehour[0].lessonFilePath.split('\\online-training\\')[1]): '',
curCourse: app.globalData.currentCourse.courseBriefIntroduction,
courses: app.globalData.currentCourse.coursehour
})
},
......@@ -102,14 +102,16 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
console.log('onhide is onhide?')
curIndex = 0
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
console.log('onUnload is onUnload?')
curIndex = 0
},
/**
......@@ -154,16 +156,132 @@ Page({
*/
videoUpdate(event) {
console.log(event.detail, '视频继续播放')
if (event.detail.currentTime > 0) {
if (this.timerUpdate) {
clearTimeout(this.timerUpdate)
this.timerUpdate = setTimeout(() => {
console.log('条用了吗')
const seconds = parseInt('' + event.detail.currentTime)
let hour = parseInt('' + seconds / 3600)
let minute = parseInt('' + (seconds - hour * 3600) / 60)
let second = parseInt('' + (seconds - 3600 * hour - 60 * minute))
if (hour < 10) {
hour = '0' + hour
}
if (minute < 10) {
minute = '0' + minute
}
if (second < 10) {
second = '0' + second
}
wx.request({
url: app.globalData.appBaseUrlV2 + '/api/onlineTrainingRecord',
method: 'POST',
header: {
Authorization: app.globalData.Authorization
},
data: {
lastTimePoint: hour + ':' + minute + ':' + second,
lessonId: this.data.courses[this.data.curCourseHourIndex].id
},
success: (res) => {
console.log(res , 'authoriazation111')
},
fail: (res1) => {
console.log(res1, 'lessonId lessonId')
}
})
},500)
} else {
this.timerUpdate = setTimeout(() => {
console.log('条用了吗')
wx.request({
url: app.globalData.appBaseUrlV2 + '/api/onlineTrainingRecord',
method: 'POST',
header: {
Authorization: app.globalData.Authorization
},
data: {
lastTimePoint: '00:00:00',
lessonId: this.data.courses[this.data.curCourseHourIndex].id
},
success: (res) => {
console.log(res , 'authoriazation111')
},
fail: (res1) => {
console.log(res1, 'lessonId lessonId')
}
})
},1000)
}
// if (!this.timerUpdate) {
// console.log('进来了吗 发三大倒计时拉肯德基垮落法结束了大甲方撒凤林街道')
// this.timerUpdate = setTimeout(() => {
// wx.request({
// url: app.globalData.appBaseUrlV2 + '/api/onlineTrainingRecord',
// method: 'POST',
// header: {
// Authorization: app.globalData.Authorization
// },
// data: {
// lastTimePoint: '00:00:00',
// lessonId: this.data.courses[this.data.curCourseHourIndex].id
// },
// success: (res) => {
// },
// fail: () => {}
// })
// },1000)
// console.log(this.timerUpdate, 'this.timerUpdate this.timerUpdate')
// }else {
// console.log('fjksladjflkjdsalkjflkjsdalkfjlkdsjalkfjlsdajlfj')
// clearTimeout(this.timerUpdate)
// this.timerUpdate = 0
// }
}
// this.data.curCourseHourIndex
},
/**
* 展示章节
*/
showArticle(event) {
// console.log(event.target.dataset.index, 'heheheh')
if (this.data.courses[event.target.dataset.index].fileType === 'mp4' || this.data.courses[event.target.dataset.index].fileType === 'wmv') {
console.log(this.data.courses, 'this.data.courses this.data.courses ')
console.log(this.data.courses[event.currentTarget.dataset.index], 'this.data.courses[event.target.dataset.index]')
if (this.data.courses[event.currentTarget.dataset.index].lessonFilePath.endsWith('.mp4')) {
this.setData({
courseVideoSrc: this.data.courses[event.target.dataset.index].fileUrl
courseVideoSrc: app.globalData.currentCourse.coursehour ? (app.globalData.appBaseUrlV3 + '/online-training/' + app.globalData.currentCourse.coursehour[event.currentTarget.dataset.index].lessonFilePath.split('\\online-training\\')[1]): '',
curCourseHourIndex: event.currentTarget.dataset.index
})
}
if (this.data.courses[event.currentTarget.dataset.index].lessonFilePath.endsWith('.pdf')) {
wx.showLoading({
title: '正在加载',
})
wx.downloadFile({
url: app.globalData.appBaseUrlV3 + '/online-training/' + this.data.courses[event.currentTarget.dataset.index].lessonFilePath.split('\\online-training\\')[1],
success: (res) => {
console.log(res, 'realdownloadfile')
// this.setData({})
wx.openDocument({
filePath: res.tempFilePath,
showMenu: true
})
},
complete: () => {
console.log('调用了吗 调用了吗')
wx.hideLoading()
},
fail: () => {
console.log('fail fail fail')
}
})
}
// if (this.data.courses[event.target.dataset.index].fileType === 'mp4' || this.data.courses[event.target.dataset.index].fileType === 'wmv') {
// this.setData({
// courseVideoSrc: this.data.courses[event.target.dataset.index].fileUrl
// })
// }
}
})
\ No newline at end of file
......@@ -3,18 +3,18 @@
<view class="course-title">当前课程: {{curCourse}}</view>
<view class="video-wrapper">
<video id="course" show-center-play-btn="{{false}}" src="{{courseVideoSrc}}" bindtimeupdate="videoUpdate"></video>
<image class="video-cover" mode="scaleToFill" src="{{curCoursePic}}" animation="{{animationDisappear}}"></image>
<!-- <image class="video-cover" mode="scaleToFill" src="{{curCoursePic}}" animation="{{animationDisappear}}"></image>
<view class="mask-video" animation="{{animationDisappear}}">
<image class="paly-video-btn" src="{{courseVideoPlay}}" bindtap="playvideo">
</image>
</view>
</view> -->
</view>
<view class="artiles-title">章节学习进度</view>
<scroll-view scroll-y="{{true}}" class="article-wrapper">
<view wx:for="{{courses}}" class="article-list-warpper" bindtap="showArticle" data-index="{{index}}">
<view class="left-wrapper" data-index="{{index}}">
<view class="article-name-wrapper" data-index="{{index}}">章节:<text class="toright" data-index="{{index}}">第 {{index}} 章</text></view>
<view class="artilce-title-wrapper">课程名称:<text class="toright" data-index="{{index}}">{{item.title}}</text></view>
<view class="artilce-title-wrapper">课程名称:<text class="toright" data-index="{{index}}">{{item.lessonTitle}}</text></view>
</view>
<view class="right-wrapper" data-index="{{index}}">
<ec-canvas ec="{{ ec }}" data-index="{{index}}"></ec-canvas>
......
......@@ -63,6 +63,9 @@ Page({
wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'get',
header: {
Authorization: app.globalData.Authorization
},
data: {
companyId: app.globalData.currentEnter.companyId,
hdId: app.globalData.currentHD.hdId,
......@@ -216,6 +219,9 @@ Page({
name: 'hdRectificationPic',
url: app.globalData.appBaseUrl + '/api/thHiddenDanger/update',
formData: formData,
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
console.log(res, '文件编辑上传')
wx.hideLoading()
......
......@@ -9,12 +9,16 @@ Page({
dglist: [],
curEnterName: '',
leftMove: {},
topAnimation: {}
topAnimation: {},
curRole: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
curRole: app.globalData.curRole
})
const animation = wx.createAnimation({
delay: 20,
timingFunction: 'linear'
......@@ -30,6 +34,9 @@ Page({
wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'GET',
header: {
Authorization: app.globalData.Authorization
},
data: {
companyId: app.globalData.currentEnter.companyId,
sort: 'hdId,asc',
......@@ -89,6 +96,9 @@ Page({
wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'GET',
header: {
Authorization: app.globalData.Authorization
},
data: {
companyId: app.globalData.currentEnter.companyId,
sort: 'hdId,asc',
......@@ -196,6 +206,9 @@ Page({
wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'DELETE',
header: {
Authorization: app.globalData.Authorization
},
data: [this.data.dglist[this.deleteIndex].hdId],
header: {
Authorization: app.globalData.Authorization
......@@ -217,6 +230,9 @@ Page({
wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'GET',
header: {
Authorization: app.globalData.Authorization
},
data: {
companyId: app.globalData.currentEnter.companyId,
sort: 'hdId,asc',
......
......@@ -11,7 +11,7 @@
<view class="hd-name-expert" wx:if="{{item.hdStatus === 1}}">{{item.hdName}}</view>
<view class="hd-name-expoer-to-green" wx:else>{{item.hdName}}</view>
<button type="default" class="editBtn" size="mini" bindtap="editHD" data-index="{{index}}">编辑</button>
<button type="warn" class="delBtn" size="mini" data-index="{{index}}" bindtap="deleteHD">删除</button>
<button type="warn" class="delBtn" size="mini" data-index="{{index}}" bindtap="deleteHD" wx:if="{{ curRole !== '企业管理' && curRole !== '企业员工' }}">删除</button>
</view>
<view wx:if="{{dglist.length === 0}}" class="no-hd">暂无隐患</view>
</scroll-view>
......
......@@ -220,6 +220,9 @@ Page({
name: 'hdPic',
url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
formData: formData,
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
console.log(res, '文件上传')
wx.hideLoading()
......
......@@ -13,13 +13,17 @@ Page({
animationope: {},
enternameUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAATBJREFUWEdjZBhgwDjA9jMMPgf49b6vZ/j/v4GSkPn3/6/jllLRA8SYgRECMAcYKnC8IMYAdDXnH/yQoIoDcjwESbb/ybvfDBtOfWEYdQDVQgAUpKfv/ECJClMVDjAflzgoCv4zMOBMgIyMjAc2FQs2wgzFmQhBaYDaDmBkYHBgYGRsINoBpKZCQonQr+fd/1EHkBQCoCAlFSCXA7497/aD9G8uEXIE0SRHASxOkR0RYMYD5oIswiUOy4ZUccCzd39RLJISYgbzcYlTNQRIDX70XEBxCAx5B6B7gKxESE5RTNVEiC+10zwXDPk0MJoLKM4FlKaBoeMAcFMcGfz/32CsxPGe1BAAqT9774cgqMrFqhfU30CSA7WMwE0yanRGSHYstGk2+LpmJPuEQg0DHgIApKUsP22DHJIAAAAASUVORK5CYII=',
enterImgUrl: 'http://39.102.232.151:8030/cover/企业搜索icon.png',
animationSearch: {}
animationSearch: {},
curRole:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
curRole: app.globalData.curRole
})
},
/**
......@@ -47,6 +51,9 @@ Page({
wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger/pageEnterprise',
method: 'GET',
header: {
Authorization: app.globalData.Authorization
},
data: {
page: 0,
size: 50,
......@@ -132,6 +139,9 @@ Page({
wx.request({
url: app.globalData.appBaseUrl + '/api/thCompany',
method: 'GET',
header: {
Authorization: app.globalData.Authorization
},
data: {
page: 0,
size: 50,
......
......@@ -21,7 +21,7 @@
</view> -->
</view>
</scroll-view>
<view class="search-wrapper">
<view class="search-wrapper" wx:if="{{ curRole !== '企业管理' && curRole!== '企业员工' }}">
<input type="text" class="enter-name-input" placeholder="请输入企业名称"
confirm-type="search"
bindconfirm="enterNameConfirm"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -300,6 +300,9 @@ Page({
filePath: res.tempFilePaths[0],
name: 'file',
url: app.globalData.appBaseUrlV2 + '/api/thUser/updateAvatar',
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
console.log(res, 'upload avatar')
if (res.statusCode === 200) {
......
......@@ -14,7 +14,7 @@ Page({
{
cover: 'http://39.102.232.151:8030/cover/teach1.jpg',
introduce: '请大家认真听讲,认真学习、记录,该培训视频和考试要求在一周内完成。-----山东弘煜质检技术服务有限公司祝大家顺利取证',
title: '安全教育培训课程(一)',
title: '安全教育培训课程(一) ',
sum: 6,
isLearnedSum: 3,
validDate: 6,
......@@ -129,6 +129,56 @@ Page({
backgroundColor: '#090D9C',
frontColor: '#ffffff',
})
// 获取所有课程
wx.request({
url: app.globalData.appBaseUrlV2 + '/api/onlineTraining/pageCourse',
method: 'get',
header: {
Authorization: app.globalData.Authorization
},
data: {
page: 0,
size: 9999
},
success: (res) => {
console.log(res, 'authorization authorization authorizatoin')
let courses = []
courses = [...res.data.content]
for (let i = 0; i < courses.length; i++) {
courses[i].coursehour = []
courses[i].sum = 0
courses[i].isLearnedSum = 0
courses[i].validDate = 6
}
for (let i = 0; i < courses.length; i++) {
wx.request({
url: app.globalData.appBaseUrlV2 + '/api/onlineTraining/findLesson',
method: 'get',
header: {
Authorization: app.globalData.Authorization
},
data: {
page: 0,
size: 9999,
pid: courses[i].id
},
success: (res1) => {
console.log(res1, 'coursehour coursehour')
courses[i].coursehour = [...res1.data]
courses[i].sum = courses[i].coursehour.length
courses[i].isLearnedSum = courses[i].coursehour.filter(item => parseInt(item.speed) > 98).length
courses[i].cover = app.globalData.appBaseUrlV3 + '/online-training/cover/' + courses[i].courseCoverFilePath.split('\\online-training\\cover\\')[1]
courses[i].introduce = courses[i].courseBriefIntroduction
this.setData({
teachList: courses
})
},
fail: () => {}
})
}
},
fail: () => {}
})
},
/**
......@@ -201,7 +251,8 @@ Page({
* 跳转到真实课程
*/
LinkToCourse(event) {
console.log(event.target.dataset.index)
console.log(event, 'LinkToCourse LinkToCourse LinkToCourse LinkToCourse')
console.log(event.target.dataset.index, 'event.target.dataset.index')
app.globalData.currentCourse = this.data.teachList[event.target.dataset.index]
wx.navigateTo({
url: '/pages/course/course',
......
......@@ -4,7 +4,7 @@
<input type="text" class="teach-input"
animation="{{animationSearch}}"
confirm-type="search"
placeholder="请输入课程名称"
placeholder="请输入课程名称 "
bindinput="inputSearchCourse"
bindconfirm="searchTeachCourse"
bindfocus="searchCoursefocus">
......
// pages/warn/warn.js
const app = getApp();
Page({
/**
......@@ -17,54 +18,11 @@ Page({
type: 'video'
},
{
title: '安全生产十大禁令',
title: '随便一个pdf文件',
instroduce: '',
coverUrl: 'http://39.102.232.151:8030/warncover/2.png',
fileUrl: 'http://39.102.232.151:8030/video/2.mp4',
type: 'video'
},
{
title: '叉车事故警示录',
instroduce: '',
coverUrl: 'http://39.102.232.151:8030/warncover/3.png',
fileUrl: 'http://39.102.232.151:8030/video/3.mp4',
type: 'video'
},
{
title: '城市燃气安全教育片',
instroduce: '',
coverUrl: 'http://39.102.232.151:8030/warncover/4.png',
fileUrl: 'http://39.102.232.151:8030/video/4.mp4',
type: 'video'
},
{
title: '触电事故警示案例',
instroduce: '',
coverUrl: 'http://39.102.232.151:8030/warncover/5.png',
fileUrl: 'http://39.102.232.151:8030/video/5.mp4',
type: 'video'
},
{
title: '吊装作业事故',
instroduce: '',
coverUrl: 'http://39.102.232.151:8030/warncover/6.png',
fileUrl: 'http://39.102.232.151:8030/video/6.mp4',
type: 'video'
},
// {
// title: '安全生产警示教育片之密闭空间涂装',
// instroduce: '',
// coverUrl: 'https://img0.baidu.com/it/u=2265254049,1802113800&fm=26&fmt=auto&gp=0.jpg',
// fileUrl: 'http://39.102.232.151:8030/pdf/1.pdf',
// type: 'pdf'
// },
{
title: '道路交通事故案例',
instroduce: '',
coverUrl: 'http://39.102.232.151:8030/warncover/7.png',
fileUrl: 'http://39.102.232.151:8030/video/7.mp4',
type: 'video'
},
fileUrl: 'http://39.102.232.151:8030/pdf/1.pdf',
type: 'pdf'
}
]
},
......@@ -74,10 +32,42 @@ Page({
onLoad: function (options) {
// animationDisappearArray: [],
// videoCVArray: [],
for (let i = 0; i < this.data.warnList.length; i++) {
this.data.animationDisappearArray.push({})
this.data.videoCVArray.push(wx.createVideoContext('video' + i))
}
// for (let i = 0; i < this.data.warnList.length; i++) {
// this.data.animationDisappearArray.push({})
// this.data.videoCVArray.push(wx.createVideoContext('video' + i))
// }
wx.showLoading({
title: '正在加载',
})
wx.request({
url: app.globalData.appBaseUrlV2 + '/api/warningEducation/page',
header: {
Authorization: app.globalData.Authorization
},
data: {
page: 0,
size: 99999
},
success: (res) => {
console.log(res, 'warningEducation warningEducation warningEducation')
this.setData({
warnList: [...res.data.content.map(item => {
return {
...item,
title: item.title,
instroduce: item.briefIntroduction,
fileUrl: app.globalData.appBaseUrlV3 + '/warning-education/' + item.filePath.split('\\warning-education\\')[1],
fileUrl1: item.filePath.split('\\warning-education\\')[1],
type: (item.filePath.endsWith('.mp4') || item.filePath.endsWith('.m3u8'))?'video':'pdf'
}
})]
})
},
complete: () => {
wx.hideLoading()
},
fail: () => {}
})
},
/**
......@@ -154,7 +144,26 @@ Page({
wx.openDocument({
filePath: this.data.warnList[event.target.dataset.index].fileUrl,
success: function(res) {
console.log(res, '打开文件成功')
console.log(res, ' 打开文件成功')
}
})
},
viewPdfFile(event) {
wx.showLoading({
title: '正在加载'
})
wx.downloadFile({
url: this.data.warnList[event.currentTarget.dataset.inde].fileUrl,
success: (res) => {
console.log(res, 'wx.downloadFile wx.downloadFile')
wx.hideLoading()
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath
})
},
fail: () => {
wx.hideLoading()
}
})
},
......
......@@ -3,15 +3,14 @@
<view wx:for="{{warnList}}" class="warn-item-wrapper" data-index="{{index}}">
<view wx:if="{{item.type === 'video'}}" class="warn-video-wrapper" data-index="{{index}}">
<video id="{{'video' + index}}" class="warn-item-video" src="{{item.fileUrl}}" data-index="{{index}}"></video>
<image class="video-cover" mode="scaleToFill" src="{{item.coverUrl}}" animation="{{animationDisappearArray[index]}}" data-index="{{index}}"></image>
<view class="mask-video" animation="{{animationDisappearArray[index]}}" data-index="{{index}}">
<image class="paly-video-btn" src="{{courseVideoPlay}}" bindtap="playvideo" data-index="{{index}}">
</image>
</view>
<view class="warn-item-title" data-index="{{index}}">{{item.title}}</view>
</view>
<view wx:else data-index="{{index}}">
<image class="warn-item-image" src="https://img0.baidu.com/it/u=198011595,2520892471&fm=26&fmt=auto" data-index="{{index}}" bindtap="clickToShowFile"></image>
<view wx:if="{{item.type === 'pdf'}}" class="warn-pdf-wrapper" data-index="{{index}}">
<view class="warn-pdf-title">{{item.title}}</view>
<view class="warn-pdf-fileUrl">{{item.fileUrl1}}</view>
<view class="warn-pdf-view">
<button class="warn-pdf-btn" data-inde="{{index}}" bindtap="viewPdfFile">查看</button>
</view>
</view>
<view class="warn-item-title" data-index="{{index}}">{{item.title}}</view>
</view>
</view>
\ No newline at end of file
</view>
/* pages/warn/warn.wxss */
.warn-item-wrapper {
/* .warn-item-wrapper {
width: 710rpx;
height: 357rpx;
margin: 29rpx 20rpx;
box-sizing: border-box;
border-radius: 20rpx;
box-shadow: 2rpx 2rpx 2rpx 2rpx #eee, -1.5rpx -1.5rpx 1.5rpx 1.5rpx #eee;
margin-bottom: 120rpx;
}
.warn-item-wrapper .warn-item-video {
width: 100%;
......@@ -13,7 +13,7 @@
}
.warn-video-wrapper {
position: relative;
overflow: hidden;
overflow: visible;
width: 710rpx;
height: 289rpx;
border-radius: 20rpx 20rpx 0 0 ;
......@@ -41,24 +41,88 @@
background-color: rgba(0,0,0, .2);
}
.warn-item-title {
height: 68rpx;
height: 66rpx;
line-height: 68rpx;
margin-left: 19rpx;
font-size: 32rpx;
font-size:28rpx;
font-family: 'PingFang SC';
font-weight: 500;
color: #333333;
margin-bottom: 30rpx;
box-shadow: 2rpx 2rpx 2rpx 2rpx #eee, -1.5rpx -1.5rpx 1.5rpx 1.5rpx #eee;
}
.paly-video-btn {
position: absolute;
left: 50%;
top: 50%;
width: 84rpx;
height: 84rpx;
transform: translate(-50%, -50%);
}
.warn-item-image {
width: 710rpx;
height: 289rpx;
border-radius: 20rpx 20rpx 0 0 ;
}
.warn-pdf-wrapper {
width: 710rpx;
height: 157rpx;
padding: 0 0 10rpx 10rpx;
margin: 20rpx auto;
} */
.warn-total-wrapper {}
.warn-item-wrapper {
margin: 30rpx auto;
width: 710rpx;
}
.warn-item-video {
width: 710rpx;
height: 289rpx;
border-radius: 20rpx 20rpx 0 0 ;
}
.warn-item-title {
height: 66rpx;
line-height: 68rpx;
font-size:28rpx;
font-family: 'PingFang SC';
font-weight: 500;
color: #333333;
border-radius: 0 0 20rpx 20rpx;
box-shadow: 0 0 9rpx 1rpx #eee;
padding-left: 20rpx;
margin-top: -5rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.warn-pdf-wrapper {
height: 180rpx;
padding: 20rpx;
box-shadow: 0 0 9rpx 1rpx #eee;
display: flex;
flex-direction: column;
justify-content: center;
border-radius: 20rpx;
}
.warn-pdf-title {
margin: 10rpx 0;
}
.warn-pdf-fileUrl {
margin: 10rpx 0;
text-decoration: underline;
font-size: 20rpx;
color: #057AFD;
}
.warn-pdf-view {
display: flex;
justify-content: flex-end;
padding-right: 20rpx;
width: 100%;
}
.warn-pdf-btn {
width: 120rpx!important;
height: 60rpx!important;
font-size: 24rpx!important;
margin: 10rpx 0!important;
padding: 0!important;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
color: white;
background-color: #090D9C;
}
\ No newline at end of file
......@@ -21,7 +21,6 @@
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
......@@ -30,15 +29,15 @@
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false
"minifyWXML": true
},
"compileType": "miniprogram",
"libVersion": "2.18.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment