You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

146 lines
2.8 KiB

<script>
import api from '@/utils/api'
export default {
data() {
return {
}
},
computed: {
i18n() {
return this.$t('me')
},
},
onLaunch: function() {
console.log('App Launch')
api.indexInfo().then(res => {
uni.setStorageSync('coinTypeInfo', res)
})
},
onShow: function() {
console.log('App Show')
// // #ifdef APP-PLUS
// this.appVersion()
// // #endif
},
onHide: function() {
console.log('App Hide')
},
methods: {
// 校验APP应用版本
appVersion() {
console.log("校验APP应用版本", uni.getSystemInfoSync().platform)
// console.log('ss' + JSON.stringify(uni.getSystemInfoSync()))
// const response = await this.$api.appVersion(param)
// console.log(response)
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
console.log('当前版本号' + wgtinfo.versionCode)
console.log(wgtinfo)
let param = {
'appId': 'android',
'versionCode': wgtinfo.version
}
console.log(param)
this.$api.appVersion(param).then(response => {
console.log(response)
if (wgtinfo.version < response.versionCode) {
console.log('更新了吗')
let that = this;
this.conInfo = response
this.showLogOut=true
// uni.showModal({
// title: this.$t("login").Versionupdate,
// content: response.info,
// showCancel: false,
// confirmText: this.$t("login").Confirm,
// success: function(res) {
// if (res.confirm) {
// plus.runtime.openURL(response.appUrl);
// }
// }
// })
}
})
});
},
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import "uview-ui/index.scss";
.main .body {
margin-top: 100rpx !important;
}
/deep/ .u-loadmore__content__text {
line-height: 50rpx !important;
}
/deep/body {
// max-width: 828rpx; //最大宽度自己可以调整
// margin: auto !important;
background-color: #15141F;
height: auto;
margin: 0;
}
/deep/ .u-empty {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
page {
color: #fff;
min-height: 100vh;
}
button::after {
border: none;
}
uni-tabbar {
.uni-tabbar {
// tab背景
padding-top: 28rpx;
padding-bottom: 30rpx !important;
background-image: linear-gradient(to top, #FAF8F8, #FFFFFF) !important; // tab背景图片或者渐变色,背景色和背景图片最多选择一个进行设置
.uni-tabbar-border {
// tabBar上边框
background-color: #F7F4F4 !important; // tabBar上边框的颜色
}
.uni-tabbar__bd {
// tabBar单项
.uni-tabbar__icon {
// 图标
width: 48rpx !important;
height: 48rpx !important;
}
.uni-tabbar__label {
// 文字
font-size: 20rpx !important;
}
}
}
}
</style>