12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <script>
- export default {
- onLaunch: function() {
- const that = this
- // 存储手机信息
- uni.getSystemInfo({
- success(res) {
- that.$store.commit('SET_SYSTEMINFO', res)
- }
- })
- if (this.$platform === 'APP-PLUS') {
- const {
- osName, // 操作系统
- osVersion // 操作系统版本号
- } = that.$store.state.info.systemInfo
- plus.runtime.getProperty(plus.runtime.appid, (info) => {
- //版本号
- const {
- version,
- versionCode,
- } = info
- that.$store.commit('SET_VERSIONINFO', {
- version: version,
- versionCode: versionCode,
- osName: osName,
- osVersion: osVersion
- })
- })
- }
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
- <style lang="scss">
- @import '@/static/icon/iconfont.css';
- @import '@/static/style/common.scss';
- /*每个页面公共css */
- page {
- height: 100%;
- background-color: $bg-color-main;
- }
- </style>
|