123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const stores_userDataManager = require("../../stores/userDataManager.js");
- const data_data = require("../../data/data.js");
- const framework_util = require("../../framework/util.js");
- const framework_log = require("../../framework/log.js");
- const framework_http = require("../../framework/http.js");
- const config_config = require("../../config/config.js");
- require("../../framework/tools.js");
- if (!Math) {
- (alertDialog + MessageVue)();
- }
- const MessageVue = () => "../../components/public/Message.js";
- const alertDialog = () => "../../components/public/alertDialog.js";
- const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
- __name: "index",
- setup(__props) {
- let udata = new data_data.user_data();
- udata.token = "123";
- udata.user_id = "1";
- udata.user_name = "大靓仔";
- let tip_message = common_vendor.ref("");
- stores_userDataManager.UserData().updateUserData(udata);
- const { data } = common_vendor.storeToRefs(stores_userDataManager.UserData());
- let title = common_vendor.ref("123");
- let obj = common_vendor.reactive({ a: "12", b: "123" });
- let cb = function() {
- framework_util.util.alert("你有点呆呆的!");
- title.value = "fuck!";
- obj.a = "world";
- };
- let isOpenDialog = common_vendor.ref(false);
- let titleName = common_vendor.ref("fuck u!");
- function onDialogClose() {
- framework_log.log.Debug("onDialogClose!");
- isOpenDialog.value = false;
- }
- function onDialogConfirm() {
- framework_log.log.Debug("onDialogConfirm!");
- isOpenDialog.value = false;
- framework_http.http.StaticRequest("https://static.hainanmlwl.com/test_books/book_list.json", (err, data2) => {
- if (err) {
- tip_message = err;
- isOpenMessage.value = true;
- return;
- }
- framework_log.log.Debug("data.code", typeof config_config.config.url_confg.StatesCode.SUCCESS);
- if (data2.code == config_config.config.url_confg.StatesCode.SUCCESS) {
- framework_log.log.Debug("book_list", data2);
- } else {
- tip_message = data2.message;
- isOpenMessage.value = true;
- }
- });
- }
- let isOpenMessage = common_vendor.ref(false);
- common_vendor.onMounted(() => {
- });
- common_vendor.onUnmounted(() => {
- });
- common_vendor.watch(obj, async (new_v, old_v) => {
- console.log(new_v, old_v);
- });
- return (_ctx, _cache) => {
- return common_vendor.e({
- a: common_vendor.t(common_vendor.unref(title)),
- b: common_vendor.t(common_vendor.unref(data).user_name),
- c: common_vendor.o(
- //@ts-ignore
- (...args) => common_vendor.unref(cb) && common_vendor.unref(cb)(...args)
- ),
- d: common_vendor.f(common_vendor.unref(obj), (v, k, i) => {
- return {
- a: common_vendor.t(v),
- b: common_vendor.t(i)
- };
- }),
- e: common_vendor.unref(isOpenDialog)
- }, common_vendor.unref(isOpenDialog) ? {
- f: common_vendor.o(onDialogConfirm),
- g: common_vendor.o(onDialogClose),
- h: common_vendor.p({
- titleName: common_vendor.unref(titleName),
- contentText: "你好呀!"
- })
- } : {}, {
- i: common_vendor.o(($event) => common_vendor.isRef(isOpenDialog) ? isOpenDialog.value = true : isOpenDialog = true),
- j: common_vendor.o(($event) => common_vendor.isRef(isOpenMessage) ? isOpenMessage.value = true : isOpenMessage = true),
- k: common_vendor.unref(isOpenMessage)
- }, common_vendor.unref(isOpenMessage) ? {
- l: common_vendor.o(($event) => common_vendor.isRef(isOpenMessage) ? isOpenMessage.value = false : isOpenMessage = false),
- m: common_vendor.p({
- messageText: common_vendor.unref(tip_message)
- })
- } : {});
- };
- }
- });
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b11b71c1"], ["__file", "/Users/future/Desktop/项目/uni-xs/xs-app/pages/test/index.vue"]]);
- tt.createPage(MiniProgramPage);
|