diff --git a/App.vue b/App.vue index 83e2dff..195ec5a 100644 --- a/App.vue +++ b/App.vue @@ -461,168 +461,168 @@ } 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 (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) - // 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('取消'); - } - } - }); - } + // } + // } + // }); + // } + // 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('取消'); + // } + // } + // }); + // } } } }); diff --git a/pages/index/index.vue b/pages/index/index.vue index 567f20a..f3c6346 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -649,7 +649,6 @@ }, //查看视频 seVideo(item) { - console.log(item,'dubyg2') const time = 100; // #ifdef H5 if (returnIsSafari()) {