Commit ad6b5e32 authored by liuyuping's avatar liuyuping

'3'

parent ece0f481
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
{ {
"root": "packageB", "root": "packageB",
"pages": [ "pages": [
"pages/warn/warn",
"pages/teach/teach", "pages/teach/teach",
"pages/live/live", "pages/live/live",
"pages/course/course" "pages/course/course"
...@@ -48,6 +47,7 @@ ...@@ -48,6 +47,7 @@
"root": "packageC", "root": "packageC",
"pages": [ "pages": [
"pages/exam/exam", "pages/exam/exam",
"pages/warn/warn",
"pages/evaluate/evaluate", "pages/evaluate/evaluate",
"pages/testpaper/testpaper" "pages/testpaper/testpaper"
], ],
...@@ -70,7 +70,18 @@ ...@@ -70,7 +70,18 @@
"pages/sign/sign", "pages/sign/sign",
"pages/logs/logs", "pages/logs/logs",
"pages/index/index", "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 "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({ ...@@ -145,6 +145,9 @@ Page({
wx.uploadFile({ wx.uploadFile({
filePath: this.data.certifyFile, filePath: this.data.certifyFile,
name: 'file', name: 'file',
header: {
Authorization: app.globalData.Authorization
},
url: app.globalData.appBaseUrlV2 + '/api/dangerJobReport', url: app.globalData.appBaseUrlV2 + '/api/dangerJobReport',
formData: formObj, formData: formObj,
header: { header: {
......
...@@ -23,6 +23,9 @@ Page({ ...@@ -23,6 +23,9 @@ Page({
wx.request({ wx.request({
url: app.globalData.appBaseUrlV2 + '/api/notice/findOwn', url: app.globalData.appBaseUrlV2 + '/api/notice/findOwn',
method: 'get', method: 'get',
header: {
Authorization: app.globalData.Authorization
},
data: { data: {
noticeId: data.adviceId noticeId: data.adviceId
}, },
......
{
"usingComponents": {}
}
\ No newline at end of file
/* pages/certifyitem/certifyitem.wxss */
\ No newline at end of file
This diff is collapsed.
...@@ -3,18 +3,18 @@ ...@@ -3,18 +3,18 @@
<view class="course-title">当前课程: {{curCourse}}</view> <view class="course-title">当前课程: {{curCourse}}</view>
<view class="video-wrapper"> <view class="video-wrapper">
<video id="course" show-center-play-btn="{{false}}" src="{{courseVideoSrc}}" bindtimeupdate="videoUpdate"></video> <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}}"> <view class="mask-video" animation="{{animationDisappear}}">
<image class="paly-video-btn" src="{{courseVideoPlay}}" bindtap="playvideo"> <image class="paly-video-btn" src="{{courseVideoPlay}}" bindtap="playvideo">
</image> </image>
</view> </view> -->
</view> </view>
<view class="artiles-title">章节学习进度</view> <view class="artiles-title">章节学习进度</view>
<scroll-view scroll-y="{{true}}" class="article-wrapper"> <scroll-view scroll-y="{{true}}" class="article-wrapper">
<view wx:for="{{courses}}" class="article-list-warpper" bindtap="showArticle" data-index="{{index}}"> <view wx:for="{{courses}}" class="article-list-warpper" bindtap="showArticle" data-index="{{index}}">
<view class="left-wrapper" 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="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>
<view class="right-wrapper" data-index="{{index}}"> <view class="right-wrapper" data-index="{{index}}">
<ec-canvas ec="{{ ec }}" data-index="{{index}}"></ec-canvas> <ec-canvas ec="{{ ec }}" data-index="{{index}}"></ec-canvas>
......
...@@ -63,6 +63,9 @@ Page({ ...@@ -63,6 +63,9 @@ Page({
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger', url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'get', method: 'get',
header: {
Authorization: app.globalData.Authorization
},
data: { data: {
companyId: app.globalData.currentEnter.companyId, companyId: app.globalData.currentEnter.companyId,
hdId: app.globalData.currentHD.hdId, hdId: app.globalData.currentHD.hdId,
...@@ -216,6 +219,9 @@ Page({ ...@@ -216,6 +219,9 @@ Page({
name: 'hdRectificationPic', name: 'hdRectificationPic',
url: app.globalData.appBaseUrl + '/api/thHiddenDanger/update', url: app.globalData.appBaseUrl + '/api/thHiddenDanger/update',
formData: formData, formData: formData,
header: {
Authorization: app.globalData.Authorization
},
success: (res) => { success: (res) => {
console.log(res, '文件编辑上传') console.log(res, '文件编辑上传')
wx.hideLoading() wx.hideLoading()
......
...@@ -9,12 +9,16 @@ Page({ ...@@ -9,12 +9,16 @@ Page({
dglist: [], dglist: [],
curEnterName: '', curEnterName: '',
leftMove: {}, leftMove: {},
topAnimation: {} topAnimation: {},
curRole: ''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({
curRole: app.globalData.curRole
})
const animation = wx.createAnimation({ const animation = wx.createAnimation({
delay: 20, delay: 20,
timingFunction: 'linear' timingFunction: 'linear'
...@@ -30,6 +34,9 @@ Page({ ...@@ -30,6 +34,9 @@ Page({
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger', url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'GET', method: 'GET',
header: {
Authorization: app.globalData.Authorization
},
data: { data: {
companyId: app.globalData.currentEnter.companyId, companyId: app.globalData.currentEnter.companyId,
sort: 'hdId,asc', sort: 'hdId,asc',
...@@ -89,6 +96,9 @@ Page({ ...@@ -89,6 +96,9 @@ Page({
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger', url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'GET', method: 'GET',
header: {
Authorization: app.globalData.Authorization
},
data: { data: {
companyId: app.globalData.currentEnter.companyId, companyId: app.globalData.currentEnter.companyId,
sort: 'hdId,asc', sort: 'hdId,asc',
...@@ -196,6 +206,9 @@ Page({ ...@@ -196,6 +206,9 @@ Page({
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger', url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'DELETE', method: 'DELETE',
header: {
Authorization: app.globalData.Authorization
},
data: [this.data.dglist[this.deleteIndex].hdId], data: [this.data.dglist[this.deleteIndex].hdId],
header: { header: {
Authorization: app.globalData.Authorization Authorization: app.globalData.Authorization
...@@ -217,6 +230,9 @@ Page({ ...@@ -217,6 +230,9 @@ Page({
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger', url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'GET', method: 'GET',
header: {
Authorization: app.globalData.Authorization
},
data: { data: {
companyId: app.globalData.currentEnter.companyId, companyId: app.globalData.currentEnter.companyId,
sort: 'hdId,asc', sort: 'hdId,asc',
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<view class="hd-name-expert" wx:if="{{item.hdStatus === 1}}">{{item.hdName}}</view> <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> <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="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>
<view wx:if="{{dglist.length === 0}}" class="no-hd">暂无隐患</view> <view wx:if="{{dglist.length === 0}}" class="no-hd">暂无隐患</view>
</scroll-view> </scroll-view>
......
...@@ -220,6 +220,9 @@ Page({ ...@@ -220,6 +220,9 @@ Page({
name: 'hdPic', name: 'hdPic',
url: app.globalData.appBaseUrl + '/api/thHiddenDanger', url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
formData: formData, formData: formData,
header: {
Authorization: app.globalData.Authorization
},
success: (res) => { success: (res) => {
console.log(res, '文件上传') console.log(res, '文件上传')
wx.hideLoading() wx.hideLoading()
......
...@@ -13,13 +13,17 @@ Page({ ...@@ -13,13 +13,17 @@ Page({
animationope: {}, animationope: {},
enternameUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAATBJREFUWEdjZBhgwDjA9jMMPgf49b6vZ/j/v4GSkPn3/6/jllLRA8SYgRECMAcYKnC8IMYAdDXnH/yQoIoDcjwESbb/ybvfDBtOfWEYdQDVQgAUpKfv/ECJClMVDjAflzgoCv4zMOBMgIyMjAc2FQs2wgzFmQhBaYDaDmBkYHBgYGRsINoBpKZCQonQr+fd/1EHkBQCoCAlFSCXA7497/aD9G8uEXIE0SRHASxOkR0RYMYD5oIswiUOy4ZUccCzd39RLJISYgbzcYlTNQRIDX70XEBxCAx5B6B7gKxESE5RTNVEiC+10zwXDPk0MJoLKM4FlKaBoeMAcFMcGfz/32CsxPGe1BAAqT9774cgqMrFqhfU30CSA7WMwE0yanRGSHYstGk2+LpmJPuEQg0DHgIApKUsP22DHJIAAAAASUVORK5CYII=', 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', enterImgUrl: 'http://39.102.232.151:8030/cover/企业搜索icon.png',
animationSearch: {} animationSearch: {},
curRole:''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({
curRole: app.globalData.curRole
})
}, },
/** /**
...@@ -47,6 +51,9 @@ Page({ ...@@ -47,6 +51,9 @@ Page({
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger/pageEnterprise', url: app.globalData.appBaseUrl + '/api/thHiddenDanger/pageEnterprise',
method: 'GET', method: 'GET',
header: {
Authorization: app.globalData.Authorization
},
data: { data: {
page: 0, page: 0,
size: 50, size: 50,
...@@ -132,6 +139,9 @@ Page({ ...@@ -132,6 +139,9 @@ Page({
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thCompany', url: app.globalData.appBaseUrl + '/api/thCompany',
method: 'GET', method: 'GET',
header: {
Authorization: app.globalData.Authorization
},
data: { data: {
page: 0, page: 0,
size: 50, size: 50,
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</view> --> </view> -->
</view> </view>
</scroll-view> </scroll-view>
<view class="search-wrapper"> <view class="search-wrapper" wx:if="{{ curRole !== '企业管理' && curRole!== '企业员工' }}">
<input type="text" class="enter-name-input" placeholder="请输入企业名称" <input type="text" class="enter-name-input" placeholder="请输入企业名称"
confirm-type="search" confirm-type="search"
bindconfirm="enterNameConfirm" 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({ ...@@ -300,6 +300,9 @@ Page({
filePath: res.tempFilePaths[0], filePath: res.tempFilePaths[0],
name: 'file', name: 'file',
url: app.globalData.appBaseUrlV2 + '/api/thUser/updateAvatar', url: app.globalData.appBaseUrlV2 + '/api/thUser/updateAvatar',
header: {
Authorization: app.globalData.Authorization
},
success: (res) => { success: (res) => {
console.log(res, 'upload avatar') console.log(res, 'upload avatar')
if (res.statusCode === 200) { if (res.statusCode === 200) {
......
...@@ -14,7 +14,7 @@ Page({ ...@@ -14,7 +14,7 @@ Page({
{ {
cover: 'http://39.102.232.151:8030/cover/teach1.jpg', cover: 'http://39.102.232.151:8030/cover/teach1.jpg',
introduce: '请大家认真听讲,认真学习、记录,该培训视频和考试要求在一周内完成。-----山东弘煜质检技术服务有限公司祝大家顺利取证', introduce: '请大家认真听讲,认真学习、记录,该培训视频和考试要求在一周内完成。-----山东弘煜质检技术服务有限公司祝大家顺利取证',
title: '安全教育培训课程(一)', title: '安全教育培训课程(一) ',
sum: 6, sum: 6,
isLearnedSum: 3, isLearnedSum: 3,
validDate: 6, validDate: 6,
...@@ -129,6 +129,56 @@ Page({ ...@@ -129,6 +129,56 @@ Page({
backgroundColor: '#090D9C', backgroundColor: '#090D9C',
frontColor: '#ffffff', 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({ ...@@ -201,7 +251,8 @@ Page({
* 跳转到真实课程 * 跳转到真实课程
*/ */
LinkToCourse(event) { 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] app.globalData.currentCourse = this.data.teachList[event.target.dataset.index]
wx.navigateTo({ wx.navigateTo({
url: '/pages/course/course', url: '/pages/course/course',
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<input type="text" class="teach-input" <input type="text" class="teach-input"
animation="{{animationSearch}}" animation="{{animationSearch}}"
confirm-type="search" confirm-type="search"
placeholder="请输入课程名称" placeholder="请输入课程名称 "
bindinput="inputSearchCourse" bindinput="inputSearchCourse"
bindconfirm="searchTeachCourse" bindconfirm="searchTeachCourse"
bindfocus="searchCoursefocus"> bindfocus="searchCoursefocus">
......
// pages/warn/warn.js // pages/warn/warn.js
const app = getApp();
Page({ Page({
/** /**
...@@ -17,54 +18,11 @@ Page({ ...@@ -17,54 +18,11 @@ Page({
type: 'video' type: 'video'
}, },
{ {
title: '安全生产十大禁令', title: '随便一个pdf文件',
instroduce: '', instroduce: '',
coverUrl: 'http://39.102.232.151:8030/warncover/2.png', fileUrl: 'http://39.102.232.151:8030/pdf/1.pdf',
fileUrl: 'http://39.102.232.151:8030/video/2.mp4', type: 'pdf'
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'
},
] ]
}, },
...@@ -74,10 +32,42 @@ Page({ ...@@ -74,10 +32,42 @@ Page({
onLoad: function (options) { onLoad: function (options) {
// animationDisappearArray: [], // animationDisappearArray: [],
// videoCVArray: [], // videoCVArray: [],
for (let i = 0; i < this.data.warnList.length; i++) { // for (let i = 0; i < this.data.warnList.length; i++) {
this.data.animationDisappearArray.push({}) // this.data.animationDisappearArray.push({})
this.data.videoCVArray.push(wx.createVideoContext('video' + i)) // 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({ ...@@ -154,7 +144,26 @@ Page({
wx.openDocument({ wx.openDocument({
filePath: this.data.warnList[event.target.dataset.index].fileUrl, filePath: this.data.warnList[event.target.dataset.index].fileUrl,
success: function(res) { 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 @@ ...@@ -3,15 +3,14 @@
<view wx:for="{{warnList}}" class="warn-item-wrapper" data-index="{{index}}"> <view wx:for="{{warnList}}" class="warn-item-wrapper" data-index="{{index}}">
<view wx:if="{{item.type === 'video'}}" class="warn-video-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> <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="warn-item-title" data-index="{{index}}">{{item.title}}</view>
<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> </view>
<view wx:else data-index="{{index}}"> <view wx:if="{{item.type === 'pdf'}}" class="warn-pdf-wrapper" 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 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>
<view class="warn-item-title" data-index="{{index}}">{{item.title}}</view>
</view> </view>
</view> </view>
\ No newline at end of file
/* pages/warn/warn.wxss */ /* pages/warn/warn.wxss */
.warn-item-wrapper { /* .warn-item-wrapper {
width: 710rpx; width: 710rpx;
height: 357rpx;
margin: 29rpx 20rpx; margin: 29rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 20rpx; border-radius: 20rpx;
box-shadow: 2rpx 2rpx 2rpx 2rpx #eee, -1.5rpx -1.5rpx 1.5rpx 1.5rpx #eee; 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 { .warn-item-wrapper .warn-item-video {
width: 100%; width: 100%;
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} }
.warn-video-wrapper { .warn-video-wrapper {
position: relative; position: relative;
overflow: hidden; overflow: visible;
width: 710rpx; width: 710rpx;
height: 289rpx; height: 289rpx;
border-radius: 20rpx 20rpx 0 0 ; border-radius: 20rpx 20rpx 0 0 ;
...@@ -41,24 +41,88 @@ ...@@ -41,24 +41,88 @@
background-color: rgba(0,0,0, .2); background-color: rgba(0,0,0, .2);
} }
.warn-item-title { .warn-item-title {
height: 68rpx; height: 66rpx;
line-height: 68rpx; line-height: 68rpx;
margin-left: 19rpx; margin-left: 19rpx;
font-size: 32rpx; font-size:28rpx;
font-family: 'PingFang SC'; font-family: 'PingFang SC';
font-weight: 500; font-weight: 500;
color: #333333; 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 { .warn-item-image {
width: 710rpx; width: 710rpx;
height: 289rpx; height: 289rpx;
border-radius: 20rpx 20rpx 0 0 ; 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 @@ ...@@ -21,7 +21,6 @@
"checkSiteMap": true, "checkSiteMap": true,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true, "useMultiFrameRuntime": true,
"useApiHook": true, "useApiHook": true,
"useApiHostProcess": true, "useApiHostProcess": true,
...@@ -30,15 +29,15 @@ ...@@ -30,15 +29,15 @@
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"enableEngineNative": false,
"useIsolateContext": true, "useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false, "userConfirmedBundleSwitch": false,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
"minifyWXSS": true, "minifyWXSS": true,
"disableUseStrict": false, "minifyWXML": true
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.18.0", "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