Commit ece0f481 authored by liuyuping's avatar liuyuping

'

parent f09c2632
...@@ -5,7 +5,36 @@ App({ ...@@ -5,7 +5,36 @@ App({
const logs = wx.getStorageSync('logs') || [] const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now()) logs.unshift(Date.now())
wx.setStorageSync('logs', logs) 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({ // wx.login({
// success: res => { // success: res => {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
}, },
"pages": [ "pages": [
"pages/loginv2/loginv2", "pages/loginv2/loginv2",
"pages/home/home",
"pages/addtrainimg/addtrainimg", "pages/addtrainimg/addtrainimg",
"pages/trainimg/trainimg", "pages/trainimg/trainimg",
"pages/trainimgitem/trainimgitem", "pages/trainimgitem/trainimgitem",
...@@ -18,7 +19,6 @@ ...@@ -18,7 +19,6 @@
"pages/addapproval/addapproval", "pages/addapproval/addapproval",
"pages/addcertify/addcertify", "pages/addcertify/addcertify",
"pages/hwapprovallist/hwapprovallist", "pages/hwapprovallist/hwapprovallist",
"pages/home/home",
"pages/enterprise/enterprise", "pages/enterprise/enterprise",
"pages/person/person" "pages/person/person"
], ],
......
...@@ -18,7 +18,7 @@ Page({ ...@@ -18,7 +18,7 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
wx.request({ wx.request({
url: app.globalData.appBaseUrlV2 + '/api/notice/findOwnTag', url: app.globalData.appBaseUrl + '/api/notice/findOwnTag',
method: 'get', method: 'get',
header: { header: {
Authorization: app.globalData.Authorization Authorization: app.globalData.Authorization
......
...@@ -26,6 +26,9 @@ Page({ ...@@ -26,6 +26,9 @@ Page({
data: { data: {
noticeId: data.adviceId noticeId: data.adviceId
}, },
header: {
Authorization: app.globalData.Authorization
},
success: (res) => { success: (res) => {
console.log(res) console.log(res)
/** /**
......
...@@ -70,6 +70,9 @@ Page({ ...@@ -70,6 +70,9 @@ Page({
size: 2000, size: 2000,
sort: 'hdId,asc' sort: 'hdId,asc'
}, },
header: {
Authorization: app.globalData.Authorization
},
success: (res) => { success: (res) => {
if (res.statusCode === 401) { if (res.statusCode === 401) {
wx.redirectTo({ wx.redirectTo({
...@@ -255,7 +258,8 @@ Page({ ...@@ -255,7 +258,8 @@ Page({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger/update', url: app.globalData.appBaseUrl + '/api/thHiddenDanger/update',
method: 'POST', method: 'POST',
header: { header: {
'content-type': 'multipart/form-data; boundary=XXX' 'content-type': 'multipart/form-data; boundary=XXX',
Authorization: app.globalData.Authorization
}, },
data: this.formatFormData(formData), data: this.formatFormData(formData),
success: (res) => { success: (res) => {
......
...@@ -36,6 +36,9 @@ Page({ ...@@ -36,6 +36,9 @@ Page({
page: 0, page: 0,
size: 99999 size: 99999
}, },
header: {
Authorization: app.globalData.Authorization
},
success: (res) => { success: (res) => {
console.log(res, '获取当前企业的隐患') console.log(res, '获取当前企业的隐患')
if (res.statusCode === 200) { if (res.statusCode === 200) {
...@@ -92,6 +95,9 @@ Page({ ...@@ -92,6 +95,9 @@ Page({
page: 0, page: 0,
size: 99999 size: 99999
}, },
header: {
Authorization: app.globalData.Authorization
},
success: (res) => { success: (res) => {
console.log(res, '获取当前企业的隐患') console.log(res, '获取当前企业的隐患')
if (res.statusCode === 200) { if (res.statusCode === 200) {
...@@ -191,6 +197,9 @@ Page({ ...@@ -191,6 +197,9 @@ Page({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger', url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'DELETE', method: 'DELETE',
data: [this.data.dglist[this.deleteIndex].hdId], data: [this.data.dglist[this.deleteIndex].hdId],
header: {
Authorization: app.globalData.Authorization
},
success: (res) => { success: (res) => {
// console.log(res, 'hehehheeheh') // console.log(res, 'hehehheeheh')
if (res.statusCode === 200) { if (res.statusCode === 200) {
...@@ -214,6 +223,9 @@ Page({ ...@@ -214,6 +223,9 @@ Page({
page: 0, page: 0,
size: 99999 size: 99999
}, },
header: {
Authorization: app.globalData.Authorization
},
success: (res) => { success: (res) => {
console.log(res, '获取当前企业的隐患') console.log(res, '获取当前企业的隐患')
if (res.statusCode === 200) { if (res.statusCode === 200) {
......
...@@ -281,7 +281,8 @@ Page({ ...@@ -281,7 +281,8 @@ Page({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger', url: app.globalData.appBaseUrl + '/api/thHiddenDanger',
method: 'POST', method: 'POST',
header: { header: {
'content-type': 'multipart/form-data; boundary=XXX' 'content-type': 'multipart/form-data; boundary=XXX',
Authorization: app.globalData.Authorization
}, },
data: this.formatFormData(formData), data: this.formatFormData(formData),
success: (res) => { success: (res) => {
......
...@@ -45,15 +45,15 @@ Page({ ...@@ -45,15 +45,15 @@ Page({
}) })
// 验证获取企业信息 // 验证获取企业信息
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thCompany', url: app.globalData.appBaseUrl + '/api/thHiddenDanger/pageEnterprise',
method: 'GET', method: 'GET',
data: { data: {
page: 0, page: 0,
size: 50, size: 50,
companyName: '威海', enterpriseName: '威海',
sort: 'companyId,desc', },
animationsearch: {}, header: {
animationlist: {} Authorization: app.globalData.Authorization
}, },
success: (res) => { success: (res) => {
if (res.statusCode === 200) { if (res.statusCode === 200) {
...@@ -138,6 +138,9 @@ Page({ ...@@ -138,6 +138,9 @@ Page({
companyName: this.inputEnterName, companyName: this.inputEnterName,
sort: 'companyId,desc' sort: 'companyId,desc'
}, },
header: {
Authorization: app.globalData.Authorization
},
success: (res) => { success: (res) => {
if (res.statusCode === 200) { if (res.statusCode === 200) {
this.setData({ this.setData({
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
</view> </view>
<view style="height:{{topNavHeight}}px;"></view> <view style="height:{{topNavHeight}}px;"></view>
<view class="row"> <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-title">法律法规</view>
<view class="info-card-icon law-icon"></view> <view class="info-card-icon law-icon"></view>
</view> </view>
......
This diff is collapsed.
...@@ -73,9 +73,6 @@ Page({ ...@@ -73,9 +73,6 @@ Page({
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thCompany/query', url: app.globalData.appBaseUrl + '/api/thCompany/query',
method: 'get', method: 'get',
header: {
Authorization: app.globalData.Authorization
},
data: { data: {
companyId: app.globalData.companyId 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