This commit is contained in:
shijing 2022-08-08 13:26:22 +08:00
commit b9567a9855
4 changed files with 35 additions and 15 deletions

27
App.vue
View File

@ -57,6 +57,27 @@
}
});
// #endif
uni.getSystemInfo({
success(res) {
if (res.platform == 'android') {
that.$u.api.apkCheck().then(res1 => {
if (res.appVersion < res1.version) {
uni.showModal({
title: "版本更新",
content: '有新的版本发布, 请下载新版本',
confirmText: '立即更新',
showCancel: false,
success: function(res2) {
if (res2.confirm) {
plus.runtime.openURL(res1.file)
}
}
});
}
})
}
}
})
// #ifdef APP-PLUS
uni.showLoading({
title: '自动登录中...',
@ -64,10 +85,10 @@
})
uni.getStorage({
key: 'mySecret',
success: function (res) {
success: function(res) {
let secret = res.data
if(secret){
that.$u.api.loginSecret(JSON.parse(secret)).then(res=>{
if (secret) {
that.$u.api.loginSecret(JSON.parse(secret)).then(res => {
that.$u.api.getUserInfo().then(res => {
that.$u.vuex('vuex_user', res)
//

View File

@ -27,6 +27,7 @@ const install = (Vue, vm) => {
let unbindmp = (data = {}) => vm.$u.post('/system/user/unbind_wxmp/', data); //微信小程序解绑
let bindSecret = (data = {}) => vm.$u.post('/system/user/bind_secret/', data); //App密钥绑定
let apkCheck = ()=>vm.$u.get('/system/apk/'); //apk检查
let getDickey = (params = {}) => vm.$u.get('/system/dict/', params); //查询字典
@ -92,6 +93,7 @@ const install = (Vue, vm) => {
unbindmp,
bindSecret,
loginSecret,
apkCheck,
userList,
deptList,

View File

@ -2,8 +2,8 @@
"name" : "曲阳金隅EHS",
"appid" : "__UNI__B00D419",
"description" : "曲阳金隅EHS",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionName" : "1.00.01",
"versionCode" : 10001,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -15,12 +15,8 @@
"delay" : 0
},
"modules" : {
"OAuth" : {},
"Payment" : {},
"Push" : {},
"Share" : {},
"Speech" : {},
"VideoPlayer" : {}
"VideoPlayer" : {},
"Push" : {}
},
/* */
"distribute" : {
@ -63,7 +59,8 @@
},
/* ios */
"ios" : {
"UIBackgroundModes" : [ "audio" ]
"UIBackgroundModes" : [ "audio" ],
"dSYMs" : false
},
/* SDK */
"sdkConfigs" : {

View File

@ -46,7 +46,7 @@
</view>
<text class="title-text-left">实时报警</text>
</view>
<view class="" @click="xinwenList">
<view class="">
<text class="title-text-right">查看更多</text>
<uni-icons type="right" :size="11" color="#ababab"></uni-icons>
</view>
@ -257,7 +257,7 @@
color: #5b5b5b;
overflow: hidden;
text-overflow: ellipsis;
display: box;
display: flex;
display: -webkit-box;
line-clamp: 2;
-webkit-line-clamp: 2;