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