| | |
| | | filename: '', |
| | | dialogContent: '', |
| | | codeTime: 60, |
| | | codeTimeShow: false |
| | | codeTimeShow: false, |
| | | download: '' |
| | | } |
| | | }, |
| | | onLoad: function() { |
| | |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | console.log(res); |
| | | _this.codeTimeShow = true |
| | | let time = setInterval(()=>{ |
| | | _this.codeTime-- |
| | |
| | | console.log(res); |
| | | var res = res.data |
| | | if (res.data) { |
| | | console.log(res); |
| | | that.filename = res.data.path |
| | | that.dialogContent = '发现新版本:' + res.data.version + ', 是否立即更新' |
| | | that.download = res.data.url |
| | | that.$refs.upVersion.open() |
| | | } else { |
| | | uni.showToast({ |
| | |
| | | }, |
| | | downWgt() { |
| | | let that = this; |
| | | const downloadUrl = that.baseUrl + "/appVersion/downloadApp/" + that.filename |
| | | const downloadUrl = that.download |
| | | uni.showLoading({ |
| | | title: '更新中……' |
| | | }) |