隐藏立即更新
This commit is contained in:
292
App.vue
292
App.vue
@@ -461,134 +461,38 @@
|
||||
} else {
|
||||
//不是热更新是在线更新 校验是否强制升级
|
||||
|
||||
if (res.method == "true") {
|
||||
uni.showModal({
|
||||
showCancel: false,
|
||||
title: '发现新版本',
|
||||
confirmText: '立即更新',
|
||||
content: res.des,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
plus.runtime.openURL(config.APIHOST2 +
|
||||
'/pages/login/appEq')
|
||||
return
|
||||
uni.showLoading({
|
||||
title: '下载中...',
|
||||
mask: true
|
||||
});
|
||||
if (uni.getSystemInfoSync().platform ==
|
||||
'android') {
|
||||
uni.downloadFile({
|
||||
url: androidLink,
|
||||
success: downloadResult => {
|
||||
console.log(
|
||||
downloadResult
|
||||
)
|
||||
if (downloadResult
|
||||
.statusCode ===
|
||||
200) {
|
||||
plus.runtime
|
||||
.install(
|
||||
downloadResult
|
||||
.tempFilePath, {
|
||||
force: false
|
||||
},
|
||||
d => {
|
||||
console
|
||||
.log(
|
||||
'install success...'
|
||||
);
|
||||
plus.runtime
|
||||
.restart();
|
||||
},
|
||||
e => {
|
||||
console
|
||||
.log(
|
||||
e
|
||||
)
|
||||
console
|
||||
.error(
|
||||
'install fail...'
|
||||
);
|
||||
}
|
||||
);
|
||||
// plus.io.resolveLocalFileSystemURL(downloadResult.tempFilePath, entry => {
|
||||
// entry.getParent(_oldFile=>{
|
||||
// entry.moveTo(_oldFile,'.apk',newFilePath=>{
|
||||
// console.log('newFilePath',newFilePath.fullPath)
|
||||
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (uni.getSystemInfoSync().platform ==
|
||||
'ios') {
|
||||
plus.runtime.openURL(iosLink, function(
|
||||
res) {});
|
||||
}
|
||||
} else if (res.cancel) {
|
||||
console.log('取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '发现新版本',
|
||||
confirmText: '立即更新',
|
||||
cancelText: '下次更新',
|
||||
content: res.des,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
plus.runtime.openURL(config.APIHOST2 +
|
||||
'/pages/login/appEq')
|
||||
return
|
||||
uni.showLoading({
|
||||
title: '下载中...',
|
||||
mask: true
|
||||
});
|
||||
if (uni.getSystemInfoSync().platform ==
|
||||
'android') {
|
||||
uni.downloadFile({
|
||||
url: androidLink,
|
||||
success: downloadResult => {
|
||||
if (downloadResult
|
||||
.statusCode ===
|
||||
200) {
|
||||
plus.runtime
|
||||
.install(
|
||||
downloadResult
|
||||
.tempFilePath, {
|
||||
force: false
|
||||
},
|
||||
d => {
|
||||
console
|
||||
.log(
|
||||
'install success...'
|
||||
);
|
||||
plus.runtime
|
||||
.restart();
|
||||
},
|
||||
e => {
|
||||
console
|
||||
.log(
|
||||
e
|
||||
)
|
||||
console
|
||||
.error(
|
||||
'install fail...'
|
||||
);
|
||||
}
|
||||
);
|
||||
// plus.io.resolveLocalFileSystemURL(downloadResult.tempFilePath, entry => {
|
||||
// entry.getParent(_oldFile=>{
|
||||
// entry.moveTo(_oldFile,'.apk',newFilePath=>{
|
||||
// console.log('newFilePath',newFilePath.fullPath)
|
||||
// if (res.method == "true") {
|
||||
// uni.showModal({
|
||||
// showCancel: false,
|
||||
// title: '发现新版本',
|
||||
// confirmText: '立即更新',
|
||||
// content: res.des,
|
||||
// success: res => {
|
||||
// if (res.confirm) {
|
||||
// plus.runtime.openURL(config.APIHOST2 +
|
||||
// '/pages/login/appEq')
|
||||
// return
|
||||
// uni.showLoading({
|
||||
// title: '下载中...',
|
||||
// mask: true
|
||||
// });
|
||||
// if (uni.getSystemInfoSync().platform ==
|
||||
// 'android') {
|
||||
// uni.downloadFile({
|
||||
// url: androidLink,
|
||||
// success: downloadResult => {
|
||||
// console.log(
|
||||
// downloadResult
|
||||
// )
|
||||
// if (downloadResult
|
||||
// .statusCode ===
|
||||
// 200) {
|
||||
// plus.runtime
|
||||
// .install(newFilePath.fullPath, { force: false },
|
||||
// .install(
|
||||
// downloadResult
|
||||
// .tempFilePath, {
|
||||
// force: false
|
||||
// },
|
||||
// d => {
|
||||
// console
|
||||
// .log(
|
||||
@@ -598,31 +502,127 @@
|
||||
// .restart();
|
||||
// },
|
||||
// e => {
|
||||
// console.log(e)
|
||||
// console
|
||||
// .log(
|
||||
// e
|
||||
// )
|
||||
// console
|
||||
// .error(
|
||||
// 'install fail...'
|
||||
// );
|
||||
// }
|
||||
// );
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (uni.getSystemInfoSync().platform ==
|
||||
'ios') {
|
||||
plus.runtime.openURL(iosLink, function(
|
||||
res) {});
|
||||
}
|
||||
} else if (res.cancel) {
|
||||
console.log('取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// // plus.io.resolveLocalFileSystemURL(downloadResult.tempFilePath, entry => {
|
||||
// // entry.getParent(_oldFile=>{
|
||||
// // entry.moveTo(_oldFile,'.apk',newFilePath=>{
|
||||
// // console.log('newFilePath',newFilePath.fullPath)
|
||||
|
||||
// // })
|
||||
// // })
|
||||
// // })
|
||||
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// if (uni.getSystemInfoSync().platform ==
|
||||
// 'ios') {
|
||||
// plus.runtime.openURL(iosLink, function(
|
||||
// res) {});
|
||||
// }
|
||||
// } else if (res.cancel) {
|
||||
// console.log('取消');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// uni.showModal({
|
||||
// title: '发现新版本',
|
||||
// confirmText: '立即更新',
|
||||
// cancelText: '下次更新',
|
||||
// content: res.des,
|
||||
// success: res => {
|
||||
// if (res.confirm) {
|
||||
// plus.runtime.openURL(config.APIHOST2 +
|
||||
// '/pages/login/appEq')
|
||||
// return
|
||||
// uni.showLoading({
|
||||
// title: '下载中...',
|
||||
// mask: true
|
||||
// });
|
||||
// if (uni.getSystemInfoSync().platform ==
|
||||
// 'android') {
|
||||
// uni.downloadFile({
|
||||
// url: androidLink,
|
||||
// success: downloadResult => {
|
||||
// if (downloadResult
|
||||
// .statusCode ===
|
||||
// 200) {
|
||||
// plus.runtime
|
||||
// .install(
|
||||
// downloadResult
|
||||
// .tempFilePath, {
|
||||
// force: false
|
||||
// },
|
||||
// d => {
|
||||
// console
|
||||
// .log(
|
||||
// 'install success...'
|
||||
// );
|
||||
// plus.runtime
|
||||
// .restart();
|
||||
// },
|
||||
// e => {
|
||||
// console
|
||||
// .log(
|
||||
// e
|
||||
// )
|
||||
// console
|
||||
// .error(
|
||||
// 'install fail...'
|
||||
// );
|
||||
// }
|
||||
// );
|
||||
// // plus.io.resolveLocalFileSystemURL(downloadResult.tempFilePath, entry => {
|
||||
// // entry.getParent(_oldFile=>{
|
||||
// // entry.moveTo(_oldFile,'.apk',newFilePath=>{
|
||||
// // console.log('newFilePath',newFilePath.fullPath)
|
||||
// // plus.runtime
|
||||
// // .install(newFilePath.fullPath, { force: false },
|
||||
// // d => {
|
||||
// // console
|
||||
// // .log(
|
||||
// // 'install success...'
|
||||
// // );
|
||||
// // plus.runtime
|
||||
// // .restart();
|
||||
// // },
|
||||
// // e => {
|
||||
// // console.log(e)
|
||||
// // console
|
||||
// // .error(
|
||||
// // 'install fail...'
|
||||
// // );
|
||||
// // }
|
||||
// // );
|
||||
// // })
|
||||
// // })
|
||||
// // })
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// if (uni.getSystemInfoSync().platform ==
|
||||
// 'ios') {
|
||||
// plus.runtime.openURL(iosLink, function(
|
||||
// res) {});
|
||||
// }
|
||||
// } else if (res.cancel) {
|
||||
// console.log('取消');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -649,7 +649,6 @@
|
||||
},
|
||||
//查看视频
|
||||
seVideo(item) {
|
||||
console.log(item,'dubyg2')
|
||||
const time = 100;
|
||||
// #ifdef H5
|
||||
if (returnIsSafari()) {
|
||||
|
||||
Reference in New Issue
Block a user