This commit is contained in:
2025-11-10 14:30:23 +08:00
parent ca97e8dba2
commit 508f6154f8
32 changed files with 472 additions and 248 deletions

View File

@@ -31,71 +31,6 @@ if (uni.restoreGlobal) {
}
(function(vue) {
"use strict";
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _sfc_main$2 = {
data() {
return {
url: "http://192.168.10.34:8080"
};
},
methods: {
toConfig() {
let url = "/uni_modules/yykj-tv/pages/home/home?url=" + this.url;
uni.redirectTo({
url
});
}
}
};
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
vue.createElementVNode("view", { class: "" }, [
vue.withDirectives(vue.createElementVNode(
"input",
{
type: "text",
class: "input",
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.url = $event)
},
null,
512
/* NEED_PATCH */
), [
[vue.vModelText, $data.url]
]),
vue.createElementVNode("button", {
type: "primary",
size: "size",
onClick: _cache[1] || (_cache[1] = (...args) => $options.toConfig && $options.toConfig(...args))
}, "跳转")
])
]);
}
const Uni_modulesYykjTvPagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-7892acfb"], ["__file", "/Users/nuoli/Downloads/yykj-tv_1.0.0_example/uni_modules/yykj-tv/pages/index/index.vue"]]);
const _sfc_main$1 = {
data() {
return {
url: ""
};
},
onLoad(options) {
this.url = options.url;
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", null, [
vue.createElementVNode("web-view", { src: $data.url }, null, 8, ["src"])
]);
}
const Uni_modulesYykjTvPagesHomeHome = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "/Users/nuoli/Downloads/yykj-tv_1.0.0_example/uni_modules/yykj-tv/pages/home/home.vue"]]);
__definePage("uni_modules/yykj-tv/pages/index/index", Uni_modulesYykjTvPagesIndexIndex);
__definePage("uni_modules/yykj-tv/pages/home/home", Uni_modulesYykjTvPagesHomeHome);
function formatAppLog(type, filename, ...args) {
if (uni.__log__) {
uni.__log__(type, filename, ...args);
@@ -103,20 +38,115 @@ if (uni.restoreGlobal) {
console[type].apply(console, [...args, filename]);
}
}
const _sfc_main = {
onLaunch: function() {
formatAppLog("log", "at App.vue:4", "App Launch");
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _sfc_main$1 = {
data() {
return {
url: "",
originalUrl: "http://192.168.10.38:8080/#/login",
logMessages: []
// 用于收集日志
};
},
onShow: function() {
formatAppLog("log", "at App.vue:7", "App Show");
onLoad(options) {
this.addLog("🏠 home1页面开始加载");
formatAppLog("log", "at uni_modules/yykj-tv/pages/home/home1.vue:18", "📄 home1 onLoad 执行", options);
this.initWebView();
},
onHide: function() {
formatAppLog("log", "at App.vue:10", "App Hide");
onReady() {
this.addLog("✅ home1页面准备就绪");
formatAppLog("log", "at uni_modules/yykj-tv/pages/home/home1.vue:23", "✅ home1 onReady 执行");
},
onShow() {
this.addLog("👀 home1页面显示");
formatAppLog("log", "at uni_modules/yykj-tv/pages/home/home1.vue:27", "✅ home1 onShow 执行");
},
onHide() {
this.addLog("🔚 home1页面隐藏");
formatAppLog("log", "at uni_modules/yykj-tv/pages/home/home1.vue:31", "🔚 home1 onHide 执行");
},
onUnload() {
this.addLog("🗑️ home1页面卸载");
formatAppLog("log", "at uni_modules/yykj-tv/pages/home/home1.vue:35", "🗑️ home1 onUnload 执行");
},
onError(err) {
this.addLog("💥 home1页面错误: " + err);
formatAppLog("error", "at uni_modules/yykj-tv/pages/home/home1.vue:39", "💥 home1页面错误:", err);
},
methods: {
addLog(message) {
const timestamp = (/* @__PURE__ */ new Date()).toLocaleTimeString();
this.logMessages.push(`[${timestamp}] ${message}`);
formatAppLog("log", "at uni_modules/yykj-tv/pages/home/home1.vue:45", message);
},
initWebView() {
this.addLog("🌐 开始初始化WebView");
const timestamp = (/* @__PURE__ */ new Date()).getTime();
this.url = `${this.originalUrl}?timestamp=${timestamp}`;
this.addLog(`🔗 设置WebView URL: ${this.url}`);
uni.onNetworkStatusChange((res) => {
this.addLog(`📶 网络状态变化: ${res.isConnected ? "已连接" : "未连接"}`);
});
}
}
};
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/nuoli/Downloads/yykj-tv_1.0.0_example/App.vue"]]);
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", null, [
vue.createElementVNode("web-view", { src: $data.url }, null, 8, ["src"])
]);
}
const Uni_modulesYykjTvPagesHomeHome1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "/Users/nuoli/Documents/2025work/git/tv-pro/uni_modules/yykj-tv/pages/home/home1.vue"]]);
__definePage("uni_modules/yykj-tv/pages/home/home1", Uni_modulesYykjTvPagesHomeHome1);
const _sfc_main = {
onLaunch: function(options) {
formatAppLog("log", "at App.vue:4", "🎯 App onLaunch 开始执行", (/* @__PURE__ */ new Date()).toISOString());
formatAppLog("log", "at App.vue:5", "📱 启动参数:", JSON.stringify(options));
formatAppLog("log", "at App.vue:6", "🔧 平台信息:", uni.getSystemInfoSync());
try {
formatAppLog("log", "at App.vue:10", "🔄 设置屏幕方向");
plus.screen.lockOrientation("landscape-primary");
plus.navigator.setFullscreen(true);
formatAppLog("log", "at App.vue:13", "✅ 屏幕方向设置成功");
} catch (e) {
formatAppLog("error", "at App.vue:15", "❌ 屏幕方向设置失败:", e);
}
uni.getNetworkType({
success: (res) => {
formatAppLog("log", "at App.vue:22", "📶 网络类型:", res.networkType);
},
fail: (err) => {
formatAppLog("error", "at App.vue:25", "❌ 获取网络状态失败:", err);
}
});
},
onShow: function(options) {
formatAppLog("log", "at App.vue:31", "👀 App onShow 执行", (/* @__PURE__ */ new Date()).toISOString());
formatAppLog("log", "at App.vue:32", "📱 显示参数:", JSON.stringify(options));
},
onError: function(error) {
formatAppLog("error", "at App.vue:36", "💥 App 全局错误:", error);
},
onPageNotFound: function(res) {
formatAppLog("error", "at App.vue:40", "❌ 页面未找到:", JSON.stringify(res));
},
onHide: function() {
formatAppLog("log", "at App.vue:44", "🔚 App Hide", (/* @__PURE__ */ new Date()).toISOString());
},
onUnload() {
formatAppLog("log", "at App.vue:47", "🗑️ App Unload", (/* @__PURE__ */ new Date()).toISOString());
}
};
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/nuoli/Documents/2025work/git/tv-pro/App.vue"]]);
function createApp() {
formatAppLog("log", "at main.js:23", "🚀 Vue3应用开始初始化", (/* @__PURE__ */ new Date()).toISOString());
const app = vue.createVueApp(App);
formatAppLog("log", "at main.js:25", "✅ Vue3应用实例创建完成", (/* @__PURE__ */ new Date()).toISOString());
return {
app
};