dengyinhuan
2 years ago
10 changed files with 152 additions and 67 deletions
@ -1,40 +1,40 @@ |
|||||
// app.js
|
// app.js
|
||||
App({ |
App({ |
||||
onLaunch() { }, |
onLaunch () { }, |
||||
globalData: { |
globalData: { |
||||
userInfo: null, |
userInfo: null, |
||||
baseUrl: 'http://10.8.16.221:4900', //api 本地环境
|
baseUrl: 'http://10.8.30.112:4900', //api 本地环境
|
||||
webUrl: "http://10.8.16.221:5900/", //web 本地环境
|
webUrl: "http://10.8.30.112:5900/", //web 本地环境
|
||||
imgUrl: 'http://10.8.16.221:5900/_file-server/', //文件 本地环境
|
imgUrl: 'http://10.8.30.112:5900/_file-server/', //文件 本地环境
|
||||
key: 'ODQBZ-3FZAU-6VIVL-2XXNM-F7CP7-WVFCY' //获取位置信息
|
key: 'ODQBZ-3FZAU-6VIVL-2XXNM-F7CP7-WVFCY' //获取位置信息
|
||||
}, |
}, |
||||
onShow(e) { |
onShow (e) { |
||||
// 检查是否有更新
|
// 检查是否有更新
|
||||
const updateManager = wx.getUpdateManager(); |
const updateManager = wx.getUpdateManager(); |
||||
updateManager.onCheckForUpdate(function (res) { |
updateManager.onCheckForUpdate(function (res) { |
||||
// 请求完新版本信息的回调
|
// 请求完新版本信息的回调
|
||||
console.log(res.hasUpdate); |
console.log(res.hasUpdate); |
||||
}); |
}); |
||||
updateManager.onUpdateReady(function () { |
updateManager.onUpdateReady(function () { |
||||
wx.showModal({ |
wx.showModal({ |
||||
title: "更新提示", |
title: "更新提示", |
||||
content: "新版本已经准备好,是否重启应用?", |
content: "新版本已经准备好,是否重启应用?", |
||||
success(res) { |
success (res) { |
||||
if (res.confirm) { |
if (res.confirm) { |
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate(); |
updateManager.applyUpdate(); |
||||
} |
} |
||||
} |
} |
||||
}); |
}); |
||||
}); |
}); |
||||
|
|
||||
updateManager.onUpdateFailed(function () { |
updateManager.onUpdateFailed(function () { |
||||
// 新版本下载失败
|
// 新版本下载失败
|
||||
wx.showToast({ |
wx.showToast({ |
||||
title: "新版本下载失败", |
title: "新版本下载失败", |
||||
icon: "none", |
icon: "none", |
||||
duration: 1000 |
duration: 1000 |
||||
}); |
}); |
||||
}); |
}); |
||||
} |
} |
||||
}) |
}) |
||||
|
@ -0,0 +1,66 @@ |
|||||
|
// package/bindTroubleshooting/index.js
|
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad(options) { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage() { |
||||
|
|
||||
|
} |
||||
|
}) |
@ -0,0 +1,3 @@ |
|||||
|
{ |
||||
|
"usingComponents": {} |
||||
|
} |
@ -0,0 +1,2 @@ |
|||||
|
<!--package/bindTroubleshooting/index.wxml--> |
||||
|
<text>package/bindTroubleshooting/index.wxml</text> |
@ -0,0 +1 @@ |
|||||
|
/* package/bindTroubleshooting/index.wxss */ |
@ -1,18 +1,18 @@ |
|||||
<!--pages/overview/overview.wxml--> |
<!-- pages/overview/overview.wxml --> |
||||
<view style="margin-top: 42rpx;"> |
<view style="margin-top: 42rpx;"> |
||||
<view class="box" bindtap="bindPolling"> |
<view class="box" bindtap="bindPolling"> |
||||
<image class="logo" src="/images/xunjian.svg"></image> |
<image class="logo" src="/images/xunjian.svg"></image> |
||||
<view class="txt">巡检</view> |
<view class="txt">巡检</view> |
||||
<image class="right" src="/images/right.svg"></image> |
<image class="right" src="/images/right.svg"></image> |
||||
</view> |
</view> |
||||
<!-- <view class="box"> |
<view class="box" bindtap="bindTroubleshooting"> |
||||
<image class="logo" src="/images/tabBar/icon_menu.png"></image> |
<image class="logo" src="/images/tabBar/icon_menu.png"></image> |
||||
<view class="txt">问题处理</view> |
<view class="txt">问题处理</view> |
||||
<image class="right" src="/images/right.svg"></image> |
<image class="right" src="/images/right.svg"></image> |
||||
</view> |
</view> |
||||
<view class="box"> |
<!-- <view class="box"> |
||||
<image class="logo" src="/images/tabBar/icon_menu.png"></image> |
<image class="logo" src="/images/tabBar/icon_menu.png"></image> |
||||
<view class="txt">巡检报告</view> |
<view class="txt">巡检报告</view> |
||||
<image class="right" src="/images/right.svg"></image> |
<image class="right" src="/images/right.svg"></image> |
||||
</view> --> |
</view> --> |
||||
</view> |
</view> |
@ -1,6 +1,8 @@ |
|||||
{ |
{ |
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
||||
"setting": { |
"setting": { |
||||
"urlCheck": false |
"urlCheck": false, |
||||
} |
"compileHotReLoad": true |
||||
|
}, |
||||
|
"projectname": "%E8%BF%90%E7%BB%B4%E5%B7%A1%E6%A3%80" |
||||
} |
} |
Loading…
Reference in new issue