(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["uni_modules-guyue-updater-pages-updater"],{"00fb":function(t,a){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAUFQTFRFAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////bof29AAAAGt0Uk5TAEJ+m7LG3/VKq/9JCW7k4m0G5uCgcEAgawFT2dCAMNhQA4uJEr1guw0a1RDUGzLjKtzwDMkHqJh4IpCfLE7PaNKlFmXzDogE8gXvOHnA3cPo+NdzqRdP01qvW8Ij5X8PXwKXVkxv5z9mdUZZd32PAAADIElEQVR4nO1XaVsTMRAO1xZCsfTYVqCtC5YqFEQqZyvFAwWWs4qKCgUvqv7/H+BMtt0mm8m2PnzU+dKdzLxvJpNJMmXsvxilr39gcMiKRKyhwYH+vr9FD49EuCKRkdHe0dGxO5yQ2Hi0J3h8PCH8kyk7nc4wlkmn7VRSDCXuxrvCJyan0DWby6vj+VwWx+85E+H46RkxuUPZHBHG/ekwfGEW4UWTuYgUDx6a8XPz4JAqmR1KKXBYWDSZH2Hyc2ERMpYDl6XHtK2wzHnZGH5bimXOlwuU5ckK4POURZU8MKysEoY1CK7r/CIGcFzXhzda69+s8OpTA3SrtoU/mIftoC0OO5TCjwpYDQw258/EB+yFFVwEBJAU+7f53MRgYx2JrxKkYUM1vij7CXi5QzMIvO19QxrKrxQrBJ5sf9MMMp4xWPBr2boLGMfXKAYVzxzO9/YlM+hZSdUZAnjGsvKMogaUEg4yaHjcyrWOFocUqjWoMuh4lufc7WhpKYUEA4FnDOY88JXDVhHRDCQei+lQVjQHn4HGYxI6kx5xntY82gw0Hpd95CvHJIHHcELjkeDYV045zxA+HgONx2049ZV665BoItZ/Qp9NzutdCWzvSaJPt0xgWILA1w0MyhLoJHr7ZzrdkMQ3vkJuY3v/DQzKNlKF1KkfmiEn36xEKcv1RzLApG995QAuSTOeZnDlw4SacpyD9a8zwCaUJfVMvVD086MxQArOJDtcabUwvM5QU6+0/T1Jp8+vygD3+s6ubK500mg4/y2GTU+xAtc6e+c/LO9jpvMnGCrtAAIPC5aCJZ62rAkvGBIigpIr32eerEJQVRHBBxOesfPkufj9CJew1vB96t7etAWf90l9eP2WDQZj0OK4vbQ4kIDPpAWbLLd7k+WamizGLi4huEY4vgEulxcm6+IC1kpYown55/NzZocrbHXda5P5GsLns1dhEX75ioVsOZTNsdA2E9psg3wT7X6tEWz3GzUcn/reBY7y40a8Bm610WwCTb7ZbFRdMXTzswc4SPTXEickNtbbXx4ho/qfruHe0Z78zt3mb9+/JX8A2PRvGKvELJwAAAAASUVORK5CYII="},"36d7":function(t,a,e){t.exports=e.p+"static/img/bg1.90df8214.png"},"5ea3":function(t,a,e){"use strict";e.r(a);var i=e("bafc"),o=e.n(i);for(var n in i)["default"].indexOf(n)<0&&function(t){e.d(a,t,(function(){return i[t]}))}(n);a["default"]=o.a},6124:function(t,a,e){"use strict";e.r(a);var i=e("9374"),o=e("5ea3");for(var n in o)["default"].indexOf(n)<0&&function(t){e.d(a,t,(function(){return o[t]}))}(n);e("bab6");var r=e("f0c5"),d=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"41a5d30b",null,!1,i["a"],void 0);a["default"]=d.exports},6162:function(t,a,e){var i=e("ba6c");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=e("4f06").default;o("08bc2402",i,!0,{sourceMap:!1,shadowMode:!1})},"6f81":function(t,a,e){"use strict";e("7a82"),Object.defineProperty(a,"__esModule",{value:!0}),a.install=a.download=void 0;a.download=function(t){var a=t.url,e=t.onProgress,i=t.onSuccess,o=t.onFail,n=uni.downloadFile({url:a,success:function(t){200===t.statusCode&&i&&i(t.tempFilePath)},fail:function(){o&&o()}});n.onProgressUpdate((function(t){e&&e(t.progress)}))};a.install=function(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";plus.runtime.install(t,{force:!0},(function(){a&&(uni.setStorageSync("wgt_version",e),plus.runtime.restart())}),(function(t){}))}},9374:function(t,a,e){"use strict";e.d(a,"b",(function(){return i})),e.d(a,"c",(function(){return o})),e.d(a,"a",(function(){}));var i=function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("v-uni-view",{staticClass:"container"},[i("v-uni-view",{staticClass:"main",on:{click:function(a){a.stopPropagation(),arguments[0]=a=t.$handleEvent(a)}}},[i("v-uni-view",{staticClass:"header"},[i("v-uni-view",{staticClass:"bg1",staticStyle:{display:"flex","justify-content":"center","align-items":"center"}},[i("v-uni-view",{staticStyle:{"text-align":"center",color:"#fff","font-size":"34rpx"}},[t._v("发现新版本")])],1),i("v-uni-view",{staticClass:"bg2"})],1),i("v-uni-view",{staticStyle:{color:"#333","padding-left":"30rpx"}},[t._v(t._s(t.updateParams.title))]),i("v-uni-view",{staticClass:"title"},[t._v("V"+t._s(t.updateParams.versionName)+" 更新内容")]),i("v-uni-view",{staticClass:"content"},[i("v-uni-rich-text",{attrs:{nodes:t.content}})],1),t.downloading?i("v-uni-view",{staticClass:"progress"},[i("v-uni-view",{staticClass:"slider"},[i("v-uni-view",{staticClass:"active-slider",style:{width:t.progress+"%"}},[i("v-uni-view",{staticClass:"bar"}),i("v-uni-view",{staticClass:"dot"},[i("v-uni-view",{staticClass:"text"},[t._v(t._s(t.progress)+"%")]),i("v-uni-view",{staticClass:"circle"})],1)],1)],1)],1):t._e(),i("v-uni-view",{staticClass:"button",class:{active:!t.downloading||t.downloadError},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.handleButton.apply(void 0,arguments)}}},[t._v(t._s(t.downloadText))])],1),t.updateParams.force?t._e():i("v-uni-view",{staticClass:"bottom",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.back.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"line"}),i("v-uni-image",{staticClass:"close",attrs:{src:e("00fb")}})],1)],1)},o=[]},ba6c:function(t,a,e){var i=e("24fb"),o=e("1de5"),n=e("36d7");a=i(!1);var r=o(n);a.push([t.i,"uni-page-body[data-v-41a5d30b]{width:100vw;height:100vh;background:transparent}body.?%PAGE?%[data-v-41a5d30b]{background:transparent}.container[data-v-41a5d30b]{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;background-color:rgba(0,0,0,.3)}.main[data-v-41a5d30b]{width:75%;border-radius:%?8?%;padding-bottom:%?10?%;background-image:url("+r+");background-size:100% 100%}.header[data-v-41a5d30b]{position:relative}.header .bg1[data-v-41a5d30b]{width:100%;height:calc(100vw * .305);border-top-left-radius:%?8?%;border-top-right-radius:%?8?%}.header .bg2[data-v-41a5d30b]{position:absolute;top:-40%;right:13%;width:35.9%;height:calc(100vw * .5441)}.header .version-title[data-v-41a5d30b]{position:absolute;top:13%;left:8%;color:#961c00;font-size:%?40?%}.header .version-name[data-v-41a5d30b]{position:absolute;top:36%;left:24%;background-color:#e54139;color:#fff;font-size:%?26?%;line-height:%?26?%;padding:%?8?% %?20?%;border-radius:%?20?%}.title[data-v-41a5d30b]{background-color:#ff6d20;color:#fff;display:inline-block;margin-top:%?12?%;margin-left:%?30?%;font-size:%?26?%;line-height:%?26?%;padding:%?8?% %?20?%;border-radius:%?8?%}.content[data-v-41a5d30b]{margin-top:%?12?%;margin-left:%?30?%;font-size:%?28?%;line-height:2;max-height:%?240?%;overflow-y:auto}.button[data-v-41a5d30b]{margin:%?20?% %?30?%;background-color:#ff6d20;color:#fff;font-size:%?30?%;text-align:center;padding:%?20?% 0;border-radius:%?14?%;opacity:.5;pointer-events:none}.button[data-v-41a5d30b]:active{opacity:.6}.button.active[data-v-41a5d30b]{opacity:1;pointer-events:auto}.progress[data-v-41a5d30b]{padding:%?50?% %?50?% %?18?%}.progress .slider[data-v-41a5d30b]{position:relative;width:100%;height:%?10?%;border-radius:%?5?%;background-color:#e2e2e2}.progress .slider .active-slider[data-v-41a5d30b]{display:flex;flex-direction:row;align-items:center;position:absolute;left:0;top:0;width:0;height:%?10?%;border-radius:%?5?%}.progress .slider .active-slider .bar[data-v-41a5d30b]{flex:1;height:100%;background-color:#e84116;border-top-left-radius:%?5?%;border-bottom-left-radius:%?5?%}.progress .slider .active-slider .dot[data-v-41a5d30b]{position:relative;margin-left:%?-12?%}.progress .slider .active-slider .dot .text[data-v-41a5d30b]{position:absolute;top:%?-34?%;left:-50%;color:#e84116;font-size:%?24?%;font-weight:500}.progress .slider .active-slider .dot .circle[data-v-41a5d30b]{width:%?12?%;height:%?12?%;border:%?6?% solid #e84116;border-radius:50%;background-color:#fff}.bottom[data-v-41a5d30b]{display:flex;flex-direction:column;align-items:center}.bottom .line[data-v-41a5d30b]{width:%?3?%;height:%?50?%;background-color:#fff}.bottom .close[data-v-41a5d30b]{width:%?64?%;height:%?64?%;margin-top:%?-4?%}",""]),t.exports=a},bab6:function(t,a,e){"use strict";var i=e("6162"),o=e.n(i);o.a},bafc:function(t,a,e){"use strict";e("7a82");var i=e("4ea4").default;Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var o=i(e("5530"));e("ac1f"),e("5319"),e("d3b7"),e("caad"),e("2532");var n=e("6f81"),r={data:function(){return{updateParams:{},progress:0,downloading:!1,downloadSucc:!1,downloadError:!1}},computed:{content:function(){return(this.updateParams.content||"").replace(/[\r\n]/gim,"
")},downloadText:function(){return this.downloadSucc?this.updateParams.downSucTip:this.downloadError?this.updateParams.downErrorTip:this.downloading?this.updateParams.downMsgTip:this.updateParams.updateBtnText}},onLoad:function(t){var a=(0,o.default)({title:"发现新版本",updateBtnText:"立即升级",downMsgTip:"正在更新中",downSucTip:"下载完成,安装中",downErrorTip:"下载失败,请重试",quiet:!1,force:!1},JSON.parse(decodeURIComponent(t.data)));this.updateParams=a},onBackPress:function(){return this.updateParams.force},methods:{back:function(){this.updateParams.force||uni.navigateBack()},start:function(){var t=this;if(this.updateParams.downUrl){var a=[".apk",".wgt"].some((function(a){return t.updateParams.downUrl.toLocaleLowerCase().includes(a)}));if("Android"===plus.os.name&&a){this.downloading=!0;var e=this;(0,n.download)({url:e.updateParams.downUrl,onProgress:function(t){e.progress=t},onSuccess:function(t){e.downloadSucc=!0,e.downloadError=!1,(0,n.install)(t,!0)},onFail:function(){e.downloading=!1,e.downloadSucc=!1,e.downloadError=!0}})}else plus.runtime.openURL(this.updateParams.downUrl)}},handleButton:function(){var t=this;if(this.updateParams.brand.length>0)if("Android"==plus.os.name){var a=this.updateParams.downUrl;plus.runtime.openURL(a),setTimeout((function(a){t.back()}),1e3)}else plus.runtime.launchApplication({action:this.updateParams.downUrl}),setTimeout((function(a){t.back()}),1e3);else{if(!this.downloading)return this.start();if(this.downloadError)return this.progress=0,this.downloading=!1,this.downloadSucc=!1,this.downloadError=!0,this.start()}}}};a.default=r}}]);