Commit ece0f481 authored by liuyuping's avatar liuyuping

'

parent f09c2632
......@@ -5,7 +5,36 @@ App({
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
if (wx.canIUse('getUpdateManager')) {
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
console.log('onCheckForUpdate====', res)
// 请求完新版本信息的回调
if (res.hasUpdate) {
console.log('res.hasUpdate====')
updateManager.onUpdateReady(function() {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好, 是否重启应用?',
success: function(res) {
console.log('success====', res)
if (res.confirm) {
// 新的版本已经下载好, 调用 applyUpdate 应用新版本重启
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpadateFailed(function() {
// 新的版本下载失败
wx.showModal({
title: '已经有新版本了',
content: '新版本已经上线, 请您删除当前小程序, 重新搜索打开'
})
})
}
})
}
// 登录
// wx.login({
// success: res => {
......
......@@ -7,6 +7,7 @@
},
"pages": [
"pages/loginv2/loginv2",
"pages/home/home",
"pages/addtrainimg/addtrainimg",
"pages/trainimg/trainimg",
"pages/trainimgitem/trainimgitem",
......@@ -18,7 +19,6 @@
"pages/addapproval/addapproval",
"pages/addcertify/addcertify",
"pages/hwapprovallist/hwapprovallist",
"pages/home/home",
"pages/enterprise/enterprise",
"pages/person/person"
],
......
......@@ -18,7 +18,7 @@ Page({
*/
onLoad: function (options) {
wx.request({
url: app.globalData.appBaseUrlV2 + '/api/notice/findOwnTag',
url: app.globalData.appBaseUrl + '/api/notice/findOwnTag',
method: 'get',
header: {
Authorization: app.globalData.Authorization
......
......@@ -26,6 +26,9 @@ Page({
data: {
noticeId: data.adviceId
},
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
console.log(res)
/**
......
......@@ -70,6 +70,9 @@ Page({
size: 2000,
sort: 'hdId,asc'
},
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
if (res.statusCode === 401) {
wx.redirectTo({
......@@ -255,7 +258,8 @@ Page({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger/update',
method: 'POST',
header: {
'content-type': 'multipart/form-data; boundary=XXX'
'content-type': 'multipart/form-data; boundary=XXX',
Authorization: app.globalData.Authorization
},
data: this.formatFormData(formData),
success: (res) => {
......
......@@ -36,6 +36,9 @@ Page({
page: 0,
size: 99999
},
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
console.log(res, '获取当前企业的隐患')
if (res.statusCode === 200) {
......@@ -92,6 +95,9 @@ Page({
page: 0,
size: 99999
},
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
console.log(res, '获取当前企业的隐患')
if (res.statusCode === 200) {
......@@ -191,6 +197,9 @@ Page({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'DELETE',
data: [this.data.dglist[this.deleteIndex].hdId],
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
// console.log(res, 'hehehheeheh')
if (res.statusCode === 200) {
......@@ -214,6 +223,9 @@ Page({
page: 0,
size: 99999
},
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
console.log(res, '获取当前企业的隐患')
if (res.statusCode === 200) {
......
......@@ -281,7 +281,8 @@ Page({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'POST',
header: {
'content-type': 'multipart/form-data; boundary=XXX'
'content-type': 'multipart/form-data; boundary=XXX',
Authorization: app.globalData.Authorization
},
data: this.formatFormData(formData),
success: (res) => {
......
......@@ -45,15 +45,15 @@ Page({
})
// 验证获取企业信息
wx.request({
url: app.globalData.appBaseUrl + '/api/thCompany',
url: app.globalData.appBaseUrl + '/api/thHiddenDanger/pageEnterprise',
method: 'GET',
data: {
page: 0,
size: 50,
companyName: '威海',
sort: 'companyId,desc',
animationsearch: {},
animationlist: {}
enterpriseName: '威海',
},
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
if (res.statusCode === 200) {
......@@ -138,6 +138,9 @@ Page({
companyName: this.inputEnterName,
sort: 'companyId,desc'
},
header: {
Authorization: app.globalData.Authorization
},
success: (res) => {
if (res.statusCode === 200) {
this.setData({
......
......@@ -10,7 +10,9 @@
</view>
<view style="height:{{topNavHeight}}px;"></view>
<view class="row">
<view class="info-card law-wrapper" bindtap="linkToLaw">
<view class="info-card law-wrapper"
src="https://8.143.198.78/fonts/1001.png"
bindtap="linkToLaw">
<view class="info-card-title">法律法规</view>
<view class="info-card-icon law-icon"></view>
</view>
......
This diff is collapsed.
......@@ -73,9 +73,6 @@ Page({
wx.request({
url: app.globalData.appBaseUrl + '/api/thCompany/query',
method: 'get',
header: {
Authorization: app.globalData.Authorization
},
data: {
companyId: app.globalData.companyId
},
......
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