apt15e安装包
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
{
|
||||
"pages": [{
|
||||
"path": "uni_modules/yykj-tv/pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},{
|
||||
"path": "uni_modules/yykj-tv/pages/home/home",
|
||||
"path": "uni_modules/yykj-tv/pages/home/home1",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view :src="url"></web-view>
|
||||
<web-view :src="url" @onPostMessage="onMessage" @error="onWebViewError"></web-view>
|
||||
<view v-if="loading" class="loading">页面加载中...</view>
|
||||
<view v-if="loadError" class="error">
|
||||
页面加载失败
|
||||
<button @tap="retryLoad">重新加载</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -8,21 +13,67 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: ''
|
||||
url: '',
|
||||
originalUrl: 'http://192.168.100.201',
|
||||
loading: true,
|
||||
loadError: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
const url = 'http://192.168.100.201'
|
||||
const timestamp = new Date().getTime()
|
||||
this.url = `${url}?timestamp=${timestamp}`
|
||||
uni.onNetworkStatusChange((res) => {
|
||||
if (res.isConnected) {
|
||||
this.url = `${url}?timestamp=${timestamp}`;
|
||||
}
|
||||
})
|
||||
onLoad(options) {
|
||||
this.initWebView()
|
||||
},
|
||||
onUnload () {
|
||||
methods: {
|
||||
initWebView() {
|
||||
this.loading = true
|
||||
this.loadError = false
|
||||
|
||||
const timestamp = new Date().getTime()
|
||||
this.url = `${this.originalUrl}?timestamp=${timestamp}`
|
||||
|
||||
// 设置超时检测
|
||||
setTimeout(() => {
|
||||
if (this.loading) {
|
||||
this.loading = false
|
||||
this.loadError = true
|
||||
}
|
||||
}, 10000) // 10秒超时
|
||||
|
||||
uni.onNetworkStatusChange((res) => {
|
||||
if (res.isConnected && this.loadError) {
|
||||
this.retryLoad()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onWebViewError(e) {
|
||||
console.error('WebView加载错误:', e)
|
||||
this.loading = false
|
||||
this.loadError = true
|
||||
},
|
||||
|
||||
onMessage(e) {
|
||||
// WebView内部发送的消息,可以用于确认页面加载完成
|
||||
this.loading = false
|
||||
this.loadError = false
|
||||
},
|
||||
|
||||
retryLoad() {
|
||||
this.initWebView()
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
uni.offNetworkStatusChange()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.loading, .error {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
</style>
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
;(function(){
|
||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","rpxCalcMaxDeviceWidth":1920,"rpxCalcBaseDeviceWidth":750,"navigationBar":{"backgroundColor":"#F8F8F8","titleText":"","style":"custom","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"tv-pro","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"3.8.12","entryPagePath":"uni_modules/yykj-tv/pages/home/home","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"uni_modules/yykj-tv/pages/home/home","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","rpxCalcMaxDeviceWidth":1920,"rpxCalcBaseDeviceWidth":750,"navigationBar":{"backgroundColor":"#F8F8F8","titleText":"","style":"custom","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"tv-pro","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"3.8.12","entryPagePath":"uni_modules/yykj-tv/pages/home/home1","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"uni_modules/yykj-tv/pages/home/home1","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
__uniConfig.styles=[];//styles
|
||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
|
||||
@@ -1 +1 @@
|
||||
if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const n=this.constructor;return this.then((r=>n.resolve(e()).then((()=>r))),(r=>n.resolve(e()).then((()=>{throw r}))))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e){"use strict";__definePage("uni_modules/yykj-tv/pages/home/home",((e,n)=>{const r=e.__vccOpts||e;for(const[t,o]of n)r[t]=o;return r})({data:()=>({url:""}),onLoad(e){const n="http://localhost:8080",r=(new Date).getTime();this.url=`${n}?timestamp=${r}`,uni.onNetworkStatusChange((e=>{e.isConnected&&(this.url=`${n}?timestamp=${r}`)}))},onUnload(){uni.offNetworkStatusChange()}},[["render",function(n,r,t,o,a,i){return e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("web-view",{src:a.url},null,8,["src"])])}]]));const n={onLaunch:function(){plus.screen.lockOrientation("landscape-primary"),plus.navigator.setFullscreen(!0)},onHide:function(){!function(e,n,...r){uni.__log__?uni.__log__(e,n,...r):console[e].apply(console,[...r,n])}("log","at App.vue:10","App Hide")},onUnload(){plus.screen.lockOrientation("landscape-primary")}};const{app:r,Vuex:t,Pinia:o}={app:e.createVueApp(n)};uni.Vuex=t,uni.Pinia=o,r.provide("__globalStyles",__uniConfig.styles),r._component.mpType="app",r._component.render=()=>{},r.mount("#app")}(Vue);
|
||||
if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const r=this.constructor;return this.then((o=>r.resolve(e()).then((()=>o))),(o=>r.resolve(e()).then((()=>{throw o}))))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e){"use strict";function r(e,r,...o){uni.__log__?uni.__log__(e,r,...o):console[e].apply(console,[...o,r])}__definePage("uni_modules/yykj-tv/pages/home/home1",((e,r)=>{const o=e.__vccOpts||e;for(const[n,t]of r)o[n]=t;return o})({data:()=>({url:"",originalUrl:"http://192.168.100.201",loading:!0,loadError:!1}),onLoad(e){this.initWebView()},methods:{initWebView(){this.loading=!0,this.loadError=!1;const e=(new Date).getTime();this.url=`${this.originalUrl}?timestamp=${e}`,setTimeout((()=>{this.loading&&(this.loading=!1,this.loadError=!0)}),1e4),uni.onNetworkStatusChange((e=>{e.isConnected&&this.loadError&&this.retryLoad()}))},onWebViewError(e){r("error","at uni_modules/yykj-tv/pages/home/home1.vue:49","WebView加载错误:",e),this.loading=!1,this.loadError=!0},onMessage(e){this.loading=!1,this.loadError=!1},retryLoad(){this.initWebView()}},onUnload(){uni.offNetworkStatusChange()}},[["render",function(r,o,n,t,i,a){return e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("web-view",{src:i.url,"on:onPostMessage":o[0]||(o[0]=(...e)=>a.onMessage&&a.onMessage(...e)),onError:o[1]||(o[1]=(...e)=>a.onWebViewError&&a.onWebViewError(...e))},null,40,["src"]),i.loading?(e.openBlock(),e.createElementBlock("view",{key:0,class:"loading"},"页面加载中...")):e.createCommentVNode("",!0),i.loadError?(e.openBlock(),e.createElementBlock("view",{key:1,class:"error"},[e.createTextVNode(" 页面加载失败 "),e.createElementVNode("button",{onClick:o[2]||(o[2]=(...e)=>a.retryLoad&&a.retryLoad(...e))},"重新加载")])):e.createCommentVNode("",!0)])}]]));const o={onLaunch:function(){plus.screen.lockOrientation("landscape-primary"),plus.navigator.setFullscreen(!0)},onHide:function(){r("log","at App.vue:10","App Hide")},onUnload(){plus.screen.lockOrientation("landscape-primary")}};const{app:n,Vuex:t,Pinia:i}={app:e.createVueApp(o)};uni.Vuex=t,uni.Pinia=i,n.provide("__globalStyles",__uniConfig.styles),n._component.mpType="app",n._component.render=()=>{},n.mount("#app")}(Vue);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
;(function(){
|
||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","rpxCalcMaxDeviceWidth":1920,"rpxCalcBaseDeviceWidth":750,"navigationBar":{"backgroundColor":"#F8F8F8","titleText":"","style":"custom","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"tv-pro","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"3.8.12","entryPagePath":"uni_modules/yykj-tv/pages/home/home","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"uni_modules/yykj-tv/pages/home/home","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","rpxCalcMaxDeviceWidth":1920,"rpxCalcBaseDeviceWidth":750,"navigationBar":{"backgroundColor":"#F8F8F8","titleText":"","style":"custom","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"tv-pro","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"3.8.12","entryPagePath":"uni_modules/yykj-tv/pages/home/home1","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"uni_modules/yykj-tv/pages/home/home1","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
__uniConfig.styles=[];//styles
|
||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
|
||||
2
unpackage/dist/build/app-plus/app-service.js
vendored
2
unpackage/dist/build/app-plus/app-service.js
vendored
@@ -1 +1 @@
|
||||
if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const n=this.constructor;return this.then((r=>n.resolve(e()).then((()=>r))),(r=>n.resolve(e()).then((()=>{throw r}))))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e){"use strict";__definePage("uni_modules/yykj-tv/pages/home/home",((e,n)=>{const r=e.__vccOpts||e;for(const[t,o]of n)r[t]=o;return r})({data:()=>({url:""}),onLoad(e){const n="http://localhost:8080",r=(new Date).getTime();this.url=`${n}?timestamp=${r}`,uni.onNetworkStatusChange((e=>{e.isConnected&&(this.url=`${n}?timestamp=${r}`)}))},onUnload(){uni.offNetworkStatusChange()}},[["render",function(n,r,t,o,a,i){return e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("web-view",{src:a.url},null,8,["src"])])}]]));const n={onLaunch:function(){plus.screen.lockOrientation("landscape-primary"),plus.navigator.setFullscreen(!0)},onHide:function(){!function(e,n,...r){uni.__log__?uni.__log__(e,n,...r):console[e].apply(console,[...r,n])}("log","at App.vue:10","App Hide")},onUnload(){plus.screen.lockOrientation("landscape-primary")}};const{app:r,Vuex:t,Pinia:o}={app:e.createVueApp(n)};uni.Vuex=t,uni.Pinia=o,r.provide("__globalStyles",__uniConfig.styles),r._component.mpType="app",r._component.render=()=>{},r.mount("#app")}(Vue);
|
||||
if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const r=this.constructor;return this.then((o=>r.resolve(e()).then((()=>o))),(o=>r.resolve(e()).then((()=>{throw o}))))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e){"use strict";function r(e,r,...o){uni.__log__?uni.__log__(e,r,...o):console[e].apply(console,[...o,r])}__definePage("uni_modules/yykj-tv/pages/home/home1",((e,r)=>{const o=e.__vccOpts||e;for(const[n,t]of r)o[n]=t;return o})({data:()=>({url:"",originalUrl:"http://192.168.100.201",loading:!0,loadError:!1}),onLoad(e){this.initWebView()},methods:{initWebView(){this.loading=!0,this.loadError=!1;const e=(new Date).getTime();this.url=`${this.originalUrl}?timestamp=${e}`,setTimeout((()=>{this.loading&&(this.loading=!1,this.loadError=!0)}),1e4),uni.onNetworkStatusChange((e=>{e.isConnected&&this.loadError&&this.retryLoad()}))},onWebViewError(e){r("error","at uni_modules/yykj-tv/pages/home/home1.vue:49","WebView加载错误:",e),this.loading=!1,this.loadError=!0},onMessage(e){this.loading=!1,this.loadError=!1},retryLoad(){this.initWebView()}},onUnload(){uni.offNetworkStatusChange()}},[["render",function(r,o,n,t,i,a){return e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("web-view",{src:i.url,"on:onPostMessage":o[0]||(o[0]=(...e)=>a.onMessage&&a.onMessage(...e)),onError:o[1]||(o[1]=(...e)=>a.onWebViewError&&a.onWebViewError(...e))},null,40,["src"]),i.loading?(e.openBlock(),e.createElementBlock("view",{key:0,class:"loading"},"页面加载中...")):e.createCommentVNode("",!0),i.loadError?(e.openBlock(),e.createElementBlock("view",{key:1,class:"error"},[e.createTextVNode(" 页面加载失败 "),e.createElementVNode("button",{onClick:o[2]||(o[2]=(...e)=>a.retryLoad&&a.retryLoad(...e))},"重新加载")])):e.createCommentVNode("",!0)])}]]));const o={onLaunch:function(){plus.screen.lockOrientation("landscape-primary"),plus.navigator.setFullscreen(!0)},onHide:function(){r("log","at App.vue:10","App Hide")},onUnload(){plus.screen.lockOrientation("landscape-primary")}};const{app:n,Vuex:t,Pinia:i}={app:e.createVueApp(o)};uni.Vuex=t,uni.Pinia=i,n.provide("__globalStyles",__uniConfig.styles),n._component.mpType="app",n._component.render=()=>{},n.mount("#app")}(Vue);
|
||||
|
||||
Reference in New Issue
Block a user