cashier_weapp/App.vue

158 lines
4.0 KiB
Vue
Raw 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>
export default {
onLaunch: function() {
// #ifdef MP-WEIXIN
uni.cache.set('menuInfo', uni.getMenuButtonBoundingClientRect());
// #endif
},
onShow: function() {
this.$store.dispatch("HeightActions"); //获取随时获取页面的高度
// console.log('App Show');
try {
// #ifdef APP-PLUS
// uni.getSystemInfo({
// success: (res) => {
// let system = res;
// if (system.platform == 'ios') {
// console.log('ios', 64);
// uni.request({
// url: uni.conf.baseUrl + '/api/systemConfig/updateSystemVersion?platformCode=' + 1,
// method: 'POST',
// // header: {
// // userId: uni.getStorageSync('userId'),
// // token: uni.getStorageSync('token'),
// // myLoginName: uni.getStorageSync('myLoginName')
// // },
// success: (res) => {
// let datares = res.data;
// // uni.showToast({
// // title: res.message || res.msg,
// // icon: "none",
// // })
// // console.log(datares, '11111111')
// if (datares.code == 200) {
// uni.is_update = datares.data.versionCode; //是版本号,判断是否升级
// uni.is_force = datares.data.forceUpdate; //是否强制更新 1强制 0未强制
// uni.versionName = datares.data.versionName; //是版本号 显示版本号
// uni.is_wgt = 0; //是热更新 目前好像没有该功能
// uni.updateUrlApp = datares.data.url; //是下载地址
// uni.update_content = datares.data.updateInfo; //版本说明
// // uni.pro.switchTab('index/index');
// }
// },
// fail: (res) => {
// // uni.showToast({
// // title: res.message || res.msg,
// // icon: "none",
// // })
// }
// });
// } else {
// console.log(res, 66);
// uni.request({
// url: uni.conf.baseUrl + '/api/systemConfig/updateSystemVersion?platformCode=' + 0,
// method: 'POST',
// // header: {
// // userId: uni.getStorageSync('userId'),
// // token: uni.getStorageSync('token'),
// // myLoginName: uni.getStorageSync('myLoginName')
// // },
// success: (res) => {
// let datares = res.data;
// console.log(res);
// if (datares.code == 200) {
// uni.is_update = datares.data.versionCode; //是版本号,判断是否升级
// uni.is_force = datares.data.forceUpdate; //是否强制更新 1强制 0未强制
// uni.versionName = datares.data.versionName; //是版本号 显示版本号
// uni.is_wgt = 0; //是热更新 目前好像没有该功能
// uni.updateUrlApp = datares.data.url; //是下载地址
// uni.update_content = datares.data.updateInfo; //版本说明
// // uni.pro.switchTab('index/index');
// }
// }
// });
// }
// }
// });
// #endif
} catch (e) {}
},
onHide: function() {
// console.log('App Hide');
}
};
</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/flex.css';
page,
view,
scroll-view,
swiper,
swiper-item,
match-media,
movable-area,
movable-view,
cover-view,
cover-image,
icon,
text,
rich-text,
progress,
button,
checkbox-group,
editor,
form,
input,
label,
picker,
picker-view,
radio-group,
slider,
switch,
textarea,
navigator,
audio,
camera,
image,
video,
live-player,
live-pusher,
map,
canvas,
web-view {
box-sizing: border-box;
}
input {
height: auto;
}
image {
display: block;
}
page {
background-color: #F9F9F9;
}
text {
font-size: 28upx;
color: #333;
}
@font-face {
font-family: 'BebasNeue-Regular';
src: url('./static/font/BebasNeue-Regular.woff');
}
.num {
font-family: 'BebasNeue-Regular';
}
</style>