1 Star 0 Fork 21

烟草ai奶茶/uniapp+uview-ui项目基础模版

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
App.vue 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
<script>
export default {
onLaunch: function() {
// #ifdef H5
// this.$u.wx.wxOauth()
// #endif
// #ifdef MP-WEIXIN
this.checkUpdataWxapp()
// #endif
},
onShow: function() {},
onHide: function() {},
methods: {
// #ifdef MP-WEIXIN
checkUpdataWxapp() {
const updateManager = uni.getUpdateManager()
updateManager.onCheckForUpdate(function(res) {
// 请求完新版本信息的回调
})
updateManager.onUpdateReady(function(res) {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,重启应用以更新',
success(res) {
if (res.cancel) return
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
})
})
updateManager.onUpdateFailed(function(res) {
// 新的版本下载失败
})
}
// #endif
}
}
</script>
<style lang="scss">
@import 'uview-ui/index.scss';
/*每个页面公共css */
@import '@/common/common.style.scss';
/*toast字体图标*/
@import '@/components/iconfont.css';
</style>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/abc00/uniapp-uview-ui-template.git
git@gitee.com:abc00/uniapp-uview-ui-template.git
abc00
uniapp-uview-ui-template
uniapp+uview-ui项目基础模版
master

搜索帮助