1 Star 0 Fork 185

Evan / chatgpt微信小程序智能AI聊天免费开源

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
App.vue 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
郑洪旭 提交于 2023-04-15 20:45 . 更新最新的版本V4.0
<script>
import util from "@/util/util.js";
export default {
onLaunch: function() {
this.updateVersion()
util.getbaseConfig()
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
methods:{
updateVersion(){
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
console.log(res.hasUpdate)
})
updateManager.onUpdateReady(function () {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
showCancel:false,//隐藏取消按钮
success: function (res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function () {
// 新的版本下载失败
wx.showModal({
title: '已经有新版本了哟~',
content: '老版本不支持很多功能~,请您删除当前小程序,重新搜索打开!',
})
})
}
}
}
</script>
<style lang="scss">
@import "colorui/main.css";
@import "colorui/icon.css";
@import "static/css/index-app.css";
@import "uview-ui/index.scss";
@import "cl-uni/index.scss";
</style>
Java
1
https://gitee.com/xugaoyi/chatgpt_wechat_font.git
git@gitee.com:xugaoyi/chatgpt_wechat_font.git
xugaoyi
chatgpt_wechat_font
chatgpt微信小程序智能AI聊天免费开源
master

搜索帮助