appointment_weapp/App.vue

62 lines
1.8 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script>
import api_ from '@/common/js/api.js'
export default {
onLaunch: function() {
// uni.login({
// provider: 'weixin',
// success:(res) => {
// console.log(res.code)
// }
// });
// #ifdef H5
this.$isResolve()
// #endif
},
async onShow() {
this.$store.commit('updateTheme', 'haircut')
this.$store.dispatch("HeightActions"); //获取随时获取页面的高度
// // 当向小程序后台请求完新版本信息会进行回调。res: {hasUpdate: true, version: 1.0.0}
// const updateManager = uni.getUpdateManager();
// updateManager.onCheckForUpdate(function(res) {
// if (res.hasUpdate) { // 有更新
// uni.showLoading({
// title: '更新中...'
// }); // 开始下载前显示Loading
// }
// });
// // 当新版本下载完成,会进行回调
// updateManager.onUpdateReady(function() {
// uni.hideLoading(); // 关闭 Loading
// uni.showModal({ // 弹确认框(强制更新)
// title: '更新提示',
// content: '更新完毕,是否重启?',
// success: function(res) {
// if (res.confirm) {
// updateManager.applyUpdate(); // 强制小程序重启并使用新版本。
// }
// }
// })
// });
// // 当新版本下载失败,会进行回调
// updateManager.onUpdateFailed(function() {
// uni.hideLoading(); // 关闭 Loading
// uni.showToast({
// title: '更新失败,稍后再试...',
// icon: "error"
// });
// });
},
onHide: function() {}
}
</script>
<style lang="scss">
@import '@/uni_modules/uview-ui/index.scss';
/* #ifndef APP-PLUS-NVUE */
@import './common/css/uni.scss';
/* #endif */
/* uni.scss */
@import './common/css/theme.scss';
@import './common/css/flex.css';
</style>