app-service.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710
  1. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  2. Promise.prototype.finally = function(callback) {
  3. const promise = this.constructor;
  4. return this.then(
  5. (value) => promise.resolve(callback()).then(() => value),
  6. (reason) => promise.resolve(callback()).then(() => {
  7. throw reason;
  8. })
  9. );
  10. };
  11. }
  12. ;
  13. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  14. const global = uni.requireGlobal();
  15. ArrayBuffer = global.ArrayBuffer;
  16. Int8Array = global.Int8Array;
  17. Uint8Array = global.Uint8Array;
  18. Uint8ClampedArray = global.Uint8ClampedArray;
  19. Int16Array = global.Int16Array;
  20. Uint16Array = global.Uint16Array;
  21. Int32Array = global.Int32Array;
  22. Uint32Array = global.Uint32Array;
  23. Float32Array = global.Float32Array;
  24. Float64Array = global.Float64Array;
  25. BigInt64Array = global.BigInt64Array;
  26. BigUint64Array = global.BigUint64Array;
  27. }
  28. ;
  29. if (uni.restoreGlobal) {
  30. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  31. }
  32. (function(vue) {
  33. "use strict";
  34. function formatAppLog(type, filename, ...args) {
  35. if (uni.__log__) {
  36. uni.__log__(type, filename, ...args);
  37. } else {
  38. console[type].apply(console, [...args, filename]);
  39. }
  40. }
  41. const DEV_CONFIG = {
  42. BASE_URL: "https://www.w3cschool.cn",
  43. APP_ID: "python_harmony_dev",
  44. APP_TYPE: "development",
  45. CHANNEL: "dev_channel"
  46. };
  47. const CONFIG$1 = DEV_CONFIG;
  48. const config = {
  49. ...CONFIG$1,
  50. // 超时时间
  51. TIMEOUT: 3e4,
  52. // 版本号
  53. VERSION: "1.0.0",
  54. // 其他全局配置
  55. TOKEN_KEY: "auth_token",
  56. USER_INFO_KEY: "userInfo"
  57. };
  58. const CONFIG = config;
  59. const getUserInfo = function(callback) {
  60. try {
  61. const userInfoStr = uni.getStorageSync("userInfo");
  62. if (userInfoStr) {
  63. const userInfo = JSON.parse(userInfoStr);
  64. callback && callback({ status: true, data: userInfo });
  65. } else {
  66. callback && callback({ status: false });
  67. }
  68. } catch (e) {
  69. formatAppLog("error", "at utils/request.js:27", "获取用户信息失败", e);
  70. callback && callback({ status: false, error: e });
  71. }
  72. };
  73. const checkValue = function(value) {
  74. return value !== void 0 && value !== null ? value : "";
  75. };
  76. const requestInterceptor = function(options) {
  77. return options;
  78. };
  79. const responseInterceptor = function(response, options) {
  80. return response;
  81. };
  82. const request = function(url, headParam = {}, bodyParam = {}, callback) {
  83. getUserInfo(function(ret) {
  84. let userInfo = {};
  85. if (ret && ret.status === true && ret.data) {
  86. userInfo = ret.data;
  87. }
  88. if (!(headParam instanceof Object)) {
  89. headParam = {};
  90. }
  91. if (!(bodyParam instanceof Object)) {
  92. bodyParam = {};
  93. }
  94. let systemInfo = {};
  95. try {
  96. systemInfo = uni.getSystemInfoSync();
  97. } catch (e) {
  98. formatAppLog("error", "at utils/request.js:90", "获取系统信息失败:", e);
  99. systemInfo = { platform: "unknown", deviceId: "" };
  100. }
  101. let appVersion = "";
  102. try {
  103. if (typeof plus !== "undefined" && plus.runtime) {
  104. appVersion = plus.runtime.version;
  105. } else {
  106. appVersion = CONFIG.VERSION || "1.0.0";
  107. }
  108. } catch (e) {
  109. formatAppLog("error", "at utils/request.js:105", "获取应用版本失败:", e);
  110. appVersion = CONFIG.VERSION || "1.0.0";
  111. }
  112. bodyParam.deviceId = systemInfo.deviceId || "";
  113. bodyParam.platform = systemInfo.platform || "unknown";
  114. bodyParam.appVersion = appVersion;
  115. bodyParam.systemType = systemInfo.platform || "unknown";
  116. bodyParam.channel = CONFIG.CHANNEL || "default";
  117. bodyParam.apikey = checkValue(userInfo.apikey);
  118. bodyParam.apiauth = checkValue(userInfo.apiauth);
  119. const requestOptions = {
  120. url: /^(http|https):\/\//.test(url) ? url : CONFIG.BASE_URL + url,
  121. method: headParam.method || "POST",
  122. header: headParam.header || {
  123. "Content-Type": "application/json;charset=UTF-8"
  124. },
  125. data: bodyParam,
  126. timeout: headParam.timeout || 3e4
  127. };
  128. const finalOptions = requestInterceptor(requestOptions);
  129. uni.request({
  130. ...finalOptions,
  131. success: (res) => {
  132. const processedRes = responseInterceptor(res, finalOptions);
  133. callback && callback(processedRes, null);
  134. },
  135. fail: (err) => {
  136. formatAppLog("error", "at utils/request.js:143", "请求失败", err);
  137. callback && callback(null, err);
  138. }
  139. });
  140. });
  141. };
  142. const get = function(url, data = {}, options = {}, callback) {
  143. const headParam = { ...options, method: "GET" };
  144. request(url, headParam, data, callback);
  145. };
  146. const post = function(url, data = {}, options = {}, callback) {
  147. const headParam = { ...options, method: "POST" };
  148. request(url, headParam, data, callback);
  149. };
  150. const requestPromise = function(url, headParam = {}, bodyParam = {}) {
  151. return new Promise((resolve, reject) => {
  152. request(url, headParam, bodyParam, (res, err) => {
  153. if (err) {
  154. reject(err);
  155. } else {
  156. resolve(res);
  157. }
  158. });
  159. });
  160. };
  161. const getPromise = function(url, data = {}, options = {}) {
  162. return requestPromise(url, { ...options, method: "GET" }, data);
  163. };
  164. const postPromise = function(url, data = {}, options = {}) {
  165. return requestPromise(url, { ...options, method: "POST" }, data);
  166. };
  167. const requestModule = {
  168. request,
  169. get,
  170. post,
  171. requestPromise,
  172. getPromise,
  173. postPromise,
  174. getUserInfo,
  175. checkValue
  176. };
  177. const _export_sfc = (sfc, props) => {
  178. const target = sfc.__vccOpts || sfc;
  179. for (const [key, val] of props) {
  180. target[key] = val;
  181. }
  182. return target;
  183. };
  184. const _sfc_main$5 = {
  185. __name: "discover",
  186. setup(__props, { expose: __expose }) {
  187. __expose();
  188. const swipeGroup = vue.ref([]);
  189. const functionList = vue.ref([
  190. { name: "学练课", icon: "/static/icons/study.png", bgColor: "#FF6B6B", badge: "好课" },
  191. { name: "视频课", icon: "/static/icons/video.png", bgColor: "#9B59B6" },
  192. { name: "题库", icon: "/static/icons/question.png", bgColor: "#F39C12" },
  193. { name: "教程", icon: "/static/icons/tutorial.png", bgColor: "#2ECC71" },
  194. { name: "VIP会员", icon: "/static/icons/vip.png", bgColor: "#E74C3C", badge: "16周年" },
  195. { name: "基础入门", icon: "/static/icons/basic.png", bgColor: "#3498DB" },
  196. { name: "数据分析", icon: "/static/icons/data.png", bgColor: "#1ABC9C" },
  197. { name: "人工智能", icon: "/static/icons/ai.png", bgColor: "#95A5A6" },
  198. { name: "爬虫", icon: "/static/icons/spider.png", bgColor: "#34495E" },
  199. { name: "办公自动化", icon: "/static/icons/office.png", bgColor: "#16A085" }
  200. ]);
  201. const courseCards = vue.ref([
  202. {
  203. title: "Python高薪就业课",
  204. subtitle: "面向大学、职场就业提效",
  205. bgColor: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
  206. image: "/static/cards/job-card.png"
  207. },
  208. {
  209. title: "Python少儿编程",
  210. subtitle: "面向小学、初高中学习",
  211. bgColor: "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
  212. image: "/static/cards/kids-card.png"
  213. }
  214. ]);
  215. const courseList = vue.ref([
  216. {
  217. cover: "/static/courses/python-basic.png",
  218. title: "Python3 入门课程",
  219. students: "5037",
  220. type: "学练课",
  221. description: "爬虫+机器学习? Python无所不能..."
  222. },
  223. {
  224. cover: "/static/courses/python-zero.png",
  225. title: "零基础入门学Python",
  226. students: "619",
  227. type: "视频课",
  228. description: "通过Python入门到实战全套教程..."
  229. },
  230. {
  231. cover: "/static/courses/python-guide.png",
  232. title: "Python3零基础入门先导课",
  233. students: "5847",
  234. type: "学练课",
  235. description: "0基础的python入门先导课程..."
  236. }
  237. ]);
  238. const getSwipe = () => {
  239. try {
  240. const cachedSwipe = uni.getStorageSync("swipeGroup");
  241. if (cachedSwipe) {
  242. swipeGroup.value = JSON.parse(cachedSwipe);
  243. }
  244. } catch (e) {
  245. formatAppLog("error", "at pages/discover/discover.vue:159", "获取缓存轮播图失败:", e);
  246. }
  247. if (!requestModule || !config) {
  248. formatAppLog("error", "at pages/discover/discover.vue:164", "request或config模块未正确导入");
  249. return;
  250. }
  251. try {
  252. const systemInfo = uni.getSystemInfoSync();
  253. requestModule.request("/api/appapi/getSlide", {}, {
  254. apptype: config.APP_TYPE || "production",
  255. systemType: systemInfo.platform || "unknown"
  256. }, (ret, err) => {
  257. try {
  258. if (ret && ret.statusCode < 300 && ret.data) {
  259. swipeGroup.value = [];
  260. let dataArray = ret.data;
  261. if (typeof ret.data === "string") {
  262. try {
  263. dataArray = JSON.parse(ret.data);
  264. } catch (e) {
  265. formatAppLog("error", "at pages/discover/discover.vue:189", "解析轮播图数据失败:", e);
  266. dataArray = [];
  267. }
  268. }
  269. if (!Array.isArray(dataArray)) {
  270. if (dataArray && dataArray.list && Array.isArray(dataArray.list)) {
  271. dataArray = dataArray.list;
  272. } else if (dataArray && dataArray.data && Array.isArray(dataArray.data)) {
  273. dataArray = dataArray.data;
  274. } else {
  275. formatAppLog("error", "at pages/discover/discover.vue:201", "轮播图数据格式不正确:", dataArray);
  276. dataArray = [];
  277. }
  278. }
  279. if (Array.isArray(dataArray) && dataArray.length > 0) {
  280. dataArray.forEach((item) => {
  281. if (item && item.cover) {
  282. const swipeItem = {
  283. cover: config.BASE_URL + "/" + item.cover,
  284. link: item.link || "",
  285. title: item.title || ""
  286. };
  287. swipeGroup.value.push(swipeItem);
  288. }
  289. });
  290. }
  291. try {
  292. uni.setStorageSync("swipeGroup", JSON.stringify(swipeGroup.value));
  293. } catch (e) {
  294. formatAppLog("error", "at pages/discover/discover.vue:224", "缓存轮播图失败:", e);
  295. }
  296. } else if (swipeGroup.value.length === 0) {
  297. swipeGroup.value = [{
  298. cover: "/static/banner/default-slide.png",
  299. link: "",
  300. title: "默认轮播图"
  301. }];
  302. }
  303. if (err) {
  304. formatAppLog("error", "at pages/discover/discover.vue:238", "获取轮播图失败:", err);
  305. }
  306. } catch (error) {
  307. formatAppLog("error", "at pages/discover/discover.vue:241", "处理轮播图数据时出错:", error);
  308. }
  309. });
  310. } catch (error) {
  311. formatAppLog("error", "at pages/discover/discover.vue:245", "获取系统信息或发起请求时出错:", error);
  312. }
  313. };
  314. const navigateToSwipeLink = (index) => {
  315. const item = swipeGroup.value[index];
  316. if (!item || !item.link)
  317. return;
  318. formatAppLog("log", "at pages/discover/discover.vue:254", "点击轮播图:", item.title, item.link);
  319. if (item.link.startsWith("http")) {
  320. uni.navigateTo({
  321. url: `/pages/webview/webview?url=${encodeURIComponent(item.link)}&title=${encodeURIComponent(item.title || "详情")}`
  322. });
  323. } else if (item.link.includes("||")) {
  324. const linkParts = item.link.split("||");
  325. if (linkParts.length >= 2) {
  326. const pagePath = linkParts[1];
  327. const params = linkParts[2] || "";
  328. let navigateUrl = `/pages/${pagePath}`;
  329. if (params) {
  330. navigateUrl += `?params=${encodeURIComponent(params)}`;
  331. }
  332. uni.navigateTo({
  333. url: navigateUrl
  334. });
  335. }
  336. }
  337. };
  338. const handleFunctionClick = (item) => {
  339. formatAppLog("log", "at pages/discover/discover.vue:284", "点击功能:", item.name);
  340. };
  341. const handleCourseClick = (course) => {
  342. formatAppLog("log", "at pages/discover/discover.vue:289", "点击课程:", course.title);
  343. };
  344. vue.onMounted(() => {
  345. try {
  346. formatAppLog("log", "at pages/discover/discover.vue:295", "发现页面加载完成");
  347. getSwipe();
  348. } catch (error) {
  349. formatAppLog("error", "at pages/discover/discover.vue:299", "页面初始化时出错:", error);
  350. }
  351. });
  352. const __returned__ = { swipeGroup, functionList, courseCards, courseList, getSwipe, navigateToSwipeLink, handleFunctionClick, handleCourseClick, ref: vue.ref, onMounted: vue.onMounted, get requestModule() {
  353. return requestModule;
  354. }, get config() {
  355. return config;
  356. } };
  357. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  358. return __returned__;
  359. }
  360. };
  361. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  362. return vue.openBlock(), vue.createElementBlock("view", { class: "discover-container" }, [
  363. vue.createCommentVNode(" 自定义状态栏 "),
  364. vue.createElementVNode("view", { class: "status-bar" }),
  365. vue.createCommentVNode(" 搜索框 "),
  366. vue.createElementVNode("view", { class: "search-section" }, [
  367. vue.createElementVNode("view", { class: "search-box" }, [
  368. vue.createElementVNode("text", { class: "search-icon" }, "🔍"),
  369. vue.createElementVNode("input", {
  370. class: "search-input",
  371. placeholder: "python · html · java..."
  372. })
  373. ])
  374. ]),
  375. vue.createCommentVNode(" 轮播图 "),
  376. $setup.swipeGroup.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  377. key: 0,
  378. class: "banner-section"
  379. }, [
  380. vue.createElementVNode("swiper", {
  381. class: "banner-swiper",
  382. "indicator-dots": true,
  383. autoplay: true,
  384. interval: 3e3,
  385. duration: 1e3
  386. }, [
  387. (vue.openBlock(true), vue.createElementBlock(
  388. vue.Fragment,
  389. null,
  390. vue.renderList($setup.swipeGroup, (item, index) => {
  391. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
  392. vue.createElementVNode("image", {
  393. class: "swipe-image",
  394. src: item.cover,
  395. mode: "aspectFill",
  396. onClick: ($event) => $setup.navigateToSwipeLink(index)
  397. }, null, 8, ["src", "onClick"])
  398. ]);
  399. }),
  400. 128
  401. /* KEYED_FRAGMENT */
  402. ))
  403. ])
  404. ])) : vue.createCommentVNode("v-if", true),
  405. vue.createCommentVNode(" 功能模块 "),
  406. vue.createElementVNode("view", { class: "function-section" }, [
  407. vue.createElementVNode("view", { class: "function-row" }, [
  408. (vue.openBlock(true), vue.createElementBlock(
  409. vue.Fragment,
  410. null,
  411. vue.renderList($setup.functionList.slice(0, 5), (item, index) => {
  412. return vue.openBlock(), vue.createElementBlock("view", {
  413. class: "function-item",
  414. key: index,
  415. onClick: ($event) => $setup.handleFunctionClick(item)
  416. }, [
  417. vue.createElementVNode("view", { class: "function-icon" }, [
  418. vue.createElementVNode("image", {
  419. src: item.icon,
  420. mode: "aspectFit"
  421. }, null, 8, ["src"])
  422. ]),
  423. vue.createElementVNode(
  424. "text",
  425. { class: "function-text" },
  426. vue.toDisplayString(item.name),
  427. 1
  428. /* TEXT */
  429. ),
  430. item.badge ? (vue.openBlock(), vue.createElementBlock(
  431. "view",
  432. {
  433. key: 0,
  434. class: "function-badge"
  435. },
  436. vue.toDisplayString(item.badge),
  437. 1
  438. /* TEXT */
  439. )) : vue.createCommentVNode("v-if", true)
  440. ], 8, ["onClick"]);
  441. }),
  442. 128
  443. /* KEYED_FRAGMENT */
  444. ))
  445. ]),
  446. vue.createElementVNode("view", { class: "function-row" }, [
  447. (vue.openBlock(true), vue.createElementBlock(
  448. vue.Fragment,
  449. null,
  450. vue.renderList($setup.functionList.slice(5, 10), (item, index) => {
  451. return vue.openBlock(), vue.createElementBlock("view", {
  452. class: "function-item",
  453. key: index,
  454. onClick: ($event) => $setup.handleFunctionClick(item)
  455. }, [
  456. vue.createElementVNode(
  457. "view",
  458. {
  459. class: "function-icon",
  460. style: vue.normalizeStyle({ backgroundColor: item.bgColor })
  461. },
  462. [
  463. vue.createElementVNode("image", {
  464. src: item.icon,
  465. mode: "aspectFit"
  466. }, null, 8, ["src"])
  467. ],
  468. 4
  469. /* STYLE */
  470. ),
  471. vue.createElementVNode(
  472. "text",
  473. { class: "function-text" },
  474. vue.toDisplayString(item.name),
  475. 1
  476. /* TEXT */
  477. )
  478. ], 8, ["onClick"]);
  479. }),
  480. 128
  481. /* KEYED_FRAGMENT */
  482. ))
  483. ])
  484. ]),
  485. vue.createCommentVNode(" 课程推荐卡片 "),
  486. vue.createElementVNode("view", { class: "course-cards" }, [
  487. (vue.openBlock(true), vue.createElementBlock(
  488. vue.Fragment,
  489. null,
  490. vue.renderList($setup.courseCards, (card, index) => {
  491. return vue.openBlock(), vue.createElementBlock(
  492. "view",
  493. {
  494. class: "course-card",
  495. key: index,
  496. style: vue.normalizeStyle({ backgroundColor: card.bgColor })
  497. },
  498. [
  499. vue.createElementVNode("view", { class: "card-content" }, [
  500. vue.createElementVNode(
  501. "text",
  502. { class: "card-title" },
  503. vue.toDisplayString(card.title),
  504. 1
  505. /* TEXT */
  506. ),
  507. vue.createElementVNode(
  508. "text",
  509. { class: "card-subtitle" },
  510. vue.toDisplayString(card.subtitle),
  511. 1
  512. /* TEXT */
  513. )
  514. ]),
  515. vue.createElementVNode("image", {
  516. class: "card-image",
  517. src: card.image,
  518. mode: "aspectFit"
  519. }, null, 8, ["src"])
  520. ],
  521. 4
  522. /* STYLE */
  523. );
  524. }),
  525. 128
  526. /* KEYED_FRAGMENT */
  527. ))
  528. ]),
  529. vue.createCommentVNode(" 课程列表 "),
  530. vue.createElementVNode("view", { class: "course-section" }, [
  531. vue.createElementVNode("view", { class: "section-header" }, [
  532. vue.createElementVNode("text", { class: "section-title" }, "大家都在学"),
  533. vue.createElementVNode("view", { class: "more-btn" }, [
  534. vue.createElementVNode("text", null, "更多课程"),
  535. vue.createElementVNode("text", { class: "arrow-icon" }, "›")
  536. ])
  537. ]),
  538. vue.createElementVNode("view", { class: "course-list" }, [
  539. (vue.openBlock(true), vue.createElementBlock(
  540. vue.Fragment,
  541. null,
  542. vue.renderList($setup.courseList, (course, index) => {
  543. return vue.openBlock(), vue.createElementBlock("view", {
  544. class: "course-item",
  545. key: index,
  546. onClick: ($event) => $setup.handleCourseClick(course)
  547. }, [
  548. vue.createElementVNode("image", {
  549. class: "course-cover",
  550. src: course.cover,
  551. mode: "aspectFill"
  552. }, null, 8, ["src"]),
  553. vue.createElementVNode("view", { class: "course-info" }, [
  554. vue.createElementVNode(
  555. "text",
  556. { class: "course-title" },
  557. vue.toDisplayString(course.title),
  558. 1
  559. /* TEXT */
  560. ),
  561. vue.createElementVNode("view", { class: "course-stats" }, [
  562. vue.createElementVNode(
  563. "text",
  564. { class: "course-students" },
  565. vue.toDisplayString(course.students) + "人学习",
  566. 1
  567. /* TEXT */
  568. ),
  569. vue.createElementVNode(
  570. "text",
  571. { class: "course-type" },
  572. vue.toDisplayString(course.type),
  573. 1
  574. /* TEXT */
  575. )
  576. ]),
  577. vue.createElementVNode(
  578. "text",
  579. { class: "course-desc" },
  580. vue.toDisplayString(course.description),
  581. 1
  582. /* TEXT */
  583. )
  584. ])
  585. ], 8, ["onClick"]);
  586. }),
  587. 128
  588. /* KEYED_FRAGMENT */
  589. ))
  590. ])
  591. ])
  592. ]);
  593. }
  594. const PagesDiscoverDiscover = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-7f6951af"], ["__file", "E:/work/python_Harmony/python_Harmony/pages/discover/discover.vue"]]);
  595. const _sfc_main$4 = {
  596. __name: "codebase",
  597. setup(__props, { expose: __expose }) {
  598. __expose();
  599. vue.onMounted(() => {
  600. formatAppLog("log", "at pages/codebase/codebase.vue:14", "代码库页面加载完成");
  601. });
  602. const __returned__ = { onMounted: vue.onMounted };
  603. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  604. return __returned__;
  605. }
  606. };
  607. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  608. return vue.openBlock(), vue.createElementBlock("view", { class: "codebase-container" }, [
  609. vue.createElementVNode("view", { class: "page-content" }, [
  610. vue.createElementVNode("text", { class: "page-title" }, "代码库"),
  611. vue.createElementVNode("text", { class: "page-desc" }, "这里是代码库页面,功能开发中...")
  612. ])
  613. ]);
  614. }
  615. const PagesCodebaseCodebase = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-c13aa6cc"], ["__file", "E:/work/python_Harmony/python_Harmony/pages/codebase/codebase.vue"]]);
  616. const _sfc_main$3 = {
  617. __name: "editor",
  618. setup(__props, { expose: __expose }) {
  619. __expose();
  620. vue.onMounted(() => {
  621. formatAppLog("log", "at pages/editor/editor.vue:14", "编辑器页面加载完成");
  622. });
  623. const __returned__ = { onMounted: vue.onMounted };
  624. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  625. return __returned__;
  626. }
  627. };
  628. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  629. return vue.openBlock(), vue.createElementBlock("view", { class: "editor-container" }, [
  630. vue.createElementVNode("view", { class: "page-content" }, [
  631. vue.createElementVNode("text", { class: "page-title" }, "编辑器"),
  632. vue.createElementVNode("text", { class: "page-desc" }, "这里是编辑器页面,功能开发中...")
  633. ])
  634. ]);
  635. }
  636. const PagesEditorEditor = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-17f547cb"], ["__file", "E:/work/python_Harmony/python_Harmony/pages/editor/editor.vue"]]);
  637. const _sfc_main$2 = {
  638. __name: "study",
  639. setup(__props, { expose: __expose }) {
  640. __expose();
  641. vue.onMounted(() => {
  642. formatAppLog("log", "at pages/study/study.vue:14", "学习页面加载完成");
  643. });
  644. const __returned__ = { onMounted: vue.onMounted };
  645. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  646. return __returned__;
  647. }
  648. };
  649. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  650. return vue.openBlock(), vue.createElementBlock("view", { class: "study-container" }, [
  651. vue.createElementVNode("view", { class: "page-content" }, [
  652. vue.createElementVNode("text", { class: "page-title" }, "学习"),
  653. vue.createElementVNode("text", { class: "page-desc" }, "这里是学习页面,功能开发中...")
  654. ])
  655. ]);
  656. }
  657. const PagesStudyStudy = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-3f273c1e"], ["__file", "E:/work/python_Harmony/python_Harmony/pages/study/study.vue"]]);
  658. const _sfc_main$1 = {
  659. __name: "profile",
  660. setup(__props, { expose: __expose }) {
  661. __expose();
  662. vue.onMounted(() => {
  663. formatAppLog("log", "at pages/profile/profile.vue:14", "账号页面加载完成");
  664. });
  665. const __returned__ = { onMounted: vue.onMounted };
  666. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  667. return __returned__;
  668. }
  669. };
  670. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  671. return vue.openBlock(), vue.createElementBlock("view", { class: "profile-container" }, [
  672. vue.createElementVNode("view", { class: "page-content" }, [
  673. vue.createElementVNode("text", { class: "page-title" }, "账号"),
  674. vue.createElementVNode("text", { class: "page-desc" }, "这里是账号页面,功能开发中...")
  675. ])
  676. ]);
  677. }
  678. const PagesProfileProfile = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-dd383ca2"], ["__file", "E:/work/python_Harmony/python_Harmony/pages/profile/profile.vue"]]);
  679. __definePage("pages/discover/discover", PagesDiscoverDiscover);
  680. __definePage("pages/codebase/codebase", PagesCodebaseCodebase);
  681. __definePage("pages/editor/editor", PagesEditorEditor);
  682. __definePage("pages/study/study", PagesStudyStudy);
  683. __definePage("pages/profile/profile", PagesProfileProfile);
  684. const _sfc_main = {
  685. onLaunch: function() {
  686. formatAppLog("log", "at App.vue:4", "App Launch");
  687. },
  688. onShow: function() {
  689. formatAppLog("log", "at App.vue:7", "App Show");
  690. },
  691. onHide: function() {
  692. formatAppLog("log", "at App.vue:10", "App Hide");
  693. }
  694. };
  695. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/work/python_Harmony/python_Harmony/App.vue"]]);
  696. function createApp() {
  697. const app = vue.createVueApp(App);
  698. return {
  699. app
  700. };
  701. }
  702. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  703. uni.Vuex = __Vuex__;
  704. uni.Pinia = __Pinia__;
  705. __app__.provide("__globalStyles", __uniConfig.styles);
  706. __app__._component.mpType = "app";
  707. __app__._component.render = () => {
  708. };
  709. __app__.mount("#app");
  710. })(Vue);