fix(build): build

build

Signed-off-by: liubaixun <liubaixun@yinxiang.com>
mini-program
liubaixun 2023-10-13 10:17:11 +08:00
commit 987fda70f3
35 changed files with 117 additions and 42 deletions

45
App.vue
View File

@ -1,13 +1,50 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
// console.log('App Launch')
const updateManager = uni.getUpdateManager();
//
updateManager.onCheckForUpdate(function(res) {
//
if (res.hasUpdate) {
//
updateManager.onUpdateReady(function() {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
showCancel: false,
success(res) {
// console.log(res)
if (res.confirm) {
// applyUpdate
updateManager.applyUpdate();
}
// if (res.cancel) {
// // applyUpdate
// uni.showModal({
// title: '',
// content: ' - ',
// })
// }
}
})
})
updateManager.onUpdateFailed(function() {
//
uni.showModal({
title: '已经有新版本啦!',
content: '请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开。',
})
})
}
})
},
onShow: function() {
console.log('App Show')
// console.log('App Show')
},
onHide: function() {
console.log('App Hide')
// console.log('App Hide')
}
}
</script>
@ -15,4 +52,4 @@
<style lang="scss">
/*每个页面公共css */
@import "uview-ui/index.scss";
</style>
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -103,7 +103,7 @@ __webpack_require__.r(__webpack_exports__);
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {
Object.defineProperty(exports, "__esModule", {
value: true
@ -111,16 +111,54 @@ Object.defineProperty(exports, "__esModule", {
exports.default = void 0;
var _default = {
onLaunch: function onLaunch() {
console.log('App Launch');
// console.log('App Launch')
var updateManager = uni.getUpdateManager();
//检测版本更新
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
if (res.hasUpdate) {
//监听小程序有版本更新事件
updateManager.onUpdateReady(function () {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
showCancel: false,
success: function success(res) {
// console.log(res)
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate();
}
// if (res.cancel) {
// // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
// uni.showModal({
// title: '取消更新将会无法体验新功能',
// content: '请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开。',
// })
// }
}
});
});
updateManager.onUpdateFailed(function () {
// 新版本下载失败
uni.showModal({
title: '已经有新版本啦!',
content: '请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开。'
});
});
}
});
},
onShow: function onShow() {
console.log('App Show');
// console.log('App Show')
},
onHide: function onHide() {
console.log('App Hide');
// console.log('App Hide')
}
};
exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
/***/ }),

View File

@ -8,7 +8,7 @@
"urlCheck": false,
"es6": false,
"postcss": false,
"minified": true,
"minified": false,
"newFeature": true,
"bigPackageSizeSupport": true,
"babelSetting": {
@ -19,7 +19,7 @@
},
"compileType": "miniprogram",
"libVersion": "3.1.2",
"appid": "wx0518521f67048cc8",
"appid": "wx05b45a2699f02a2b",
"projectname": "greenhouse-wisdom-applet",
"condition": {},
"editorSetting": {