if (typeof Promise !== "undefined" && !Promise.prototype.finally) { Promise.prototype.finally = function(callback) { const promise = this.constructor; return this.then( (value) => promise.resolve(callback()).then(() => value), (reason) => promise.resolve(callback()).then(() => { throw reason; }) ); }; } ; if (typeof uni !== "undefined" && uni && uni.requireGlobal) { const global2 = uni.requireGlobal(); ArrayBuffer = global2.ArrayBuffer; Int8Array = global2.Int8Array; Uint8Array = global2.Uint8Array; Uint8ClampedArray = global2.Uint8ClampedArray; Int16Array = global2.Int16Array; Uint16Array = global2.Uint16Array; Int32Array = global2.Int32Array; Uint32Array = global2.Uint32Array; Float32Array = global2.Float32Array; Float64Array = global2.Float64Array; BigInt64Array = global2.BigInt64Array; BigUint64Array = global2.BigUint64Array; } ; if (uni.restoreGlobal) { uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval); } (function(vue) { "use strict"; var _a, _b; const stringProp = (defaultVal) => ({ type: String, default: defaultVal }); const stringOrObjectProp = (defaultVal) => ({ type: [String, Object], default: defaultVal }); const baseProps = { /** * 自定义根节点样式 */ customStyle: stringOrObjectProp(""), /** * 自定义根节点样式类 */ customClass: stringProp("") }; function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") { const prefix = isPrefix ? "?" : ""; const _result = []; if (!["indices", "brackets", "repeat", "comma"].includes(arrayFormat)) arrayFormat = "brackets"; for (const key in data) { const value = data[key]; if (["", void 0, null].includes(value)) { continue; } if (Array.isArray(value)) { switch (arrayFormat) { case "indices": for (let i = 0; i < value.length; i++) { _result.push(`${key}[${i}]=${value[i]}`); } break; case "brackets": value.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); break; case "repeat": value.forEach((_value) => { _result.push(`${key}=${_value}`); }); break; case "comma": let commaStr = ""; value.forEach((_value) => { commaStr += (commaStr ? "," : "") + _value; }); _result.push(`${key}=${commaStr}`); break; default: value.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); } } else { _result.push(`${key}=${value}`); } } return _result.length ? prefix + _result.join("&") : ""; } class Router { // route: (options?: string | RouterConfig, params?: Record) => Promise; constructor() { this.config = { type: "navigateTo", url: "", delta: 1, // navigateBack页面后退时,回退的层数 params: {}, // 传递的参数 animationType: "pop-in", // 窗口动画,只在APP有效 animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效 intercept: false // 是否需要拦截 }; this.route = this.route.bind(this); } // 判断url前面是否有"/",如果没有则加上,否则无法跳转 addRootPath(url2) { return url2[0] === "/" ? url2 : `/${url2}`; } // 整合路由参数 mixinParam(url2, params) { url2 = url2 && this.addRootPath(url2); let query = ""; if (/.*\/.*\?.*=.*/.test(url2)) { query = uni.$u.queryParams(params, false); return url2 + "&" + query; } else { query = uni.$u.queryParams(params); return url2 + query; } } /** * 路由跳转主方法 * @param options 跳转配置或url字符串 * @param params 跳转参数 */ async route(options = {}, params = {}) { let mergeConfig = {}; if (typeof options === "string") { mergeConfig.url = this.mixinParam(options, params); mergeConfig.type = "navigateTo"; } else { mergeConfig = uni.$u.deepMerge(this.config, options); mergeConfig.url = this.mixinParam(options.url || "", options.params || {}); } if (params.intercept) { this.config.intercept = params.intercept; } mergeConfig.params = params; mergeConfig = uni.$u.deepMerge(this.config, mergeConfig); if (uni.$u.routeIntercept && typeof uni.$u.routeIntercept === "function") { const isNext = await new Promise((resolve2) => { uni.$u.routeIntercept(mergeConfig, resolve2); }); isNext && this.openPage(mergeConfig); } else { this.openPage(mergeConfig); } } // 执行路由跳转 openPage(config2) { const { url: url2 = "", type: type2 = "", delta = 1, animationDuration = 300 } = config2; if (type2 == "navigateTo" || type2 == "to") { uni.navigateTo({ url: url2, animationDuration }); } if (type2 == "redirectTo" || type2 == "redirect") { uni.redirectTo({ url: url2 }); } if (type2 == "switchTab" || type2 == "tab") { uni.switchTab({ url: url2 }); } if (type2 == "reLaunch" || type2 == "launch") { uni.reLaunch({ url: url2 }); } if (type2 == "navigateBack" || type2 == "back") { uni.navigateBack({ delta }); } } } const route = new Router().route; if (!String.prototype.padStart) { String.prototype.padStart = function(maxLength2, fillString = " ") { if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError("fillString must be String"); let str = this; if (str.length >= maxLength2) return String(str); let fillLength = maxLength2 - str.length, times = Math.ceil(fillLength / fillString.length); while (times >>= 1) { fillString += fillString; if (times === 1) { fillString += fillString; } } return fillString.slice(0, fillLength) + str; }; } function timeFormat(dateTime = null, fmt = "yyyy-mm-dd") { if (!dateTime) dateTime = Number(/* @__PURE__ */ new Date()); if (typeof dateTime === "number" || typeof dateTime === "string") { if (dateTime.toString().length == 10) dateTime = Number(dateTime) * 1e3; } const date2 = new Date(dateTime); let ret; const opt = { "y+": date2.getFullYear().toString(), // 年 "m+": (date2.getMonth() + 1).toString(), // 月 "d+": date2.getDate().toString(), // 日 "h+": date2.getHours().toString(), // 时 "M+": date2.getMinutes().toString(), // 分 "s+": date2.getSeconds().toString() // 秒 // 有其他格式化字符需求可以继续添加,必须转化成字符串 }; for (const k in opt) { ret = new RegExp("(" + k + ")").exec(fmt); if (ret) { fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0")); } } return fmt; } function timeFrom(dateTime = null, format2 = "yyyy-mm-dd") { if (!dateTime) dateTime = Number(/* @__PURE__ */ new Date()); if (typeof dateTime === "number" || typeof dateTime === "string") { if (dateTime.toString().length == 10) dateTime = Number(dateTime) * 1e3; } const timestamp = +new Date(Number(dateTime)); const timer = (Number(/* @__PURE__ */ new Date()) - timestamp) / 1e3; let tips = ""; switch (true) { case timer < 300: tips = "刚刚"; break; case (timer >= 300 && timer < 3600): tips = parseInt(String(timer / 60)) + "分钟前"; break; case (timer >= 3600 && timer < 86400): tips = parseInt(String(timer / 3600)) + "小时前"; break; case (timer >= 86400 && timer < 2592e3): tips = parseInt(String(timer / 86400)) + "天前"; break; default: if (format2 === false) { if (timer >= 2592e3 && timer < 365 * 86400) { tips = parseInt(String(timer / (86400 * 30))) + "个月前"; } else { tips = parseInt(String(timer / (86400 * 365))) + "年前"; } } else { tips = timeFormat(timestamp, format2); } } return tips; } function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) { const startRGB = hexToRgb(startColor, false); const [startR, startG, startB] = startRGB; const endRGB = hexToRgb(endColor, false); const [endR, endG, endB] = endRGB; const sR = (endR - startR) / step; const sG = (endG - startG) / step; const sB = (endB - startB) / step; const colorArr = []; for (let i = 0; i < step; i++) { const hex = rgbToHex( `rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})` ); colorArr.push(hex); } return colorArr; } function hexToRgb(sColor, str = true) { const reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/; sColor = sColor.toLowerCase(); if (sColor && reg.test(sColor)) { if (sColor.length === 4) { let sColorNew = "#"; for (let i = 1; i < 4; i += 1) { sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)); } sColor = sColorNew; } const sColorChange = [ parseInt("0x" + sColor.slice(1, 3)), parseInt("0x" + sColor.slice(3, 5)), parseInt("0x" + sColor.slice(5, 7)) ]; if (!str) { return sColorChange; } else { return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`; } } else if (/^(rgb|RGB)/.test(sColor)) { const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); return arr.map((val) => Number(val)); } else { return sColor; } } function rgbToHex(rgb) { const reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/; if (/^(rgb|RGB)/.test(rgb)) { const aColor = rgb.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); let strHex = "#"; for (let i = 0; i < aColor.length; i++) { let hex = Number(aColor[i]).toString(16); hex = hex.length == 1 ? "0" + hex : hex; strHex += hex; } if (strHex.length !== 7) { strHex = rgb; } return strHex; } else if (reg.test(rgb)) { const aNum = rgb.replace(/#/, "").split(""); if (aNum.length === 6) { return rgb; } else if (aNum.length === 3) { let numHex = "#"; for (let i = 0; i < aNum.length; i += 1) { numHex += aNum[i] + aNum[i]; } return numHex; } } else { return rgb; } return rgb; } function colorToRgba(color2, alpha = 0.3) { color2 = rgbToHex(color2); const reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/; let sColor = color2.toLowerCase(); if (sColor && reg.test(sColor)) { if (sColor.length === 4) { let sColorNew = "#"; for (let i = 1; i < 4; i += 1) { sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)); } sColor = sColorNew; } const sColorChange = [ parseInt("0x" + sColor.slice(1, 3)), parseInt("0x" + sColor.slice(3, 5)), parseInt("0x" + sColor.slice(5, 7)) ]; return `rgba(${sColorChange.join(",")},${alpha})`; } else { return sColor; } } const colorGradients = { colorGradient, hexToRgb, rgbToHex, colorToRgba }; function guid(len = 32, firstU = true, radix) { const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""); const uuid = []; const base = radix || chars.length; if (len) { for (let i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * base]; } else { let r; uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-"; uuid[14] = "4"; for (let i = 0; i < 36; i++) { if (!uuid[i]) { r = 0 | Math.random() * 16; uuid[i] = chars[i == 19 ? r & 3 | 8 : r]; } } } if (firstU) { uuid.shift(); return "u" + uuid.join(""); } else { return uuid.join(""); } } const version$1 = "0.5.7"; const config$2 = vue.reactive({ v: version$1, version: version$1, // 主题名称 type: ["primary", "success", "info", "error", "warning"], // 默认为官方主题名称 defaultTheme: "uviewpro", // 默认为亮色模式 defaultDarkMode: "light", // 默认为中文 defaultLocale: "zh-CN" }); const lightPalette = { primary: "#2979ff", primaryDark: "#2b85e4", primaryDisabled: "#a0cfff", primaryLight: "#ecf5ff", success: "#19be6b", successDark: "#18b566", successDisabled: "#71d5a1", successLight: "#dbf1e1", warning: "#ff9900", warningDark: "#f29100", warningDisabled: "#fcbd71", warningLight: "#fdf6ec", error: "#fa3534", errorDark: "#dd6161", errorDisabled: "#fab6b6", errorLight: "#fef0f0", info: "#909399", infoDark: "#82848a", infoDisabled: "#c8c9cc", infoLight: "#f4f4f5", whiteColor: "#ffffff", blackColor: "#000000", mainColor: "#303133", contentColor: "#606266", tipsColor: "#909399", lightColor: "#c0c4cc", borderColor: "#dcdfe6", dividerColor: "#e4e7ed", maskColor: "rgba(0, 0, 0, 0.4)", shadowColor: "rgba(0, 0, 0, 0.1)", bgColor: "#f3f4f6", bgWhite: "#ffffff", bgGrayLight: "#f1f1f1", bgGrayDark: "#2f343c", bgBlack: "#000000" }; const darkPalette = { primary: "#8ab4ff", primaryDark: "#5f8dff", primaryDisabled: "#3d4f74", primaryLight: "#1d273f", success: "#4ade80", successDark: "#1f9d57", successDisabled: "#2f4d3d", successLight: "#10291f", warning: "#fbbf24", warningDark: "#c88f00", warningDisabled: "#4a3b17", warningLight: "#2b1f05", error: "#ff6b6b", errorDark: "#d83a3a", errorDisabled: "#4f2323", errorLight: "#2d1414", info: "#a0a7b8", infoDark: "#7c8394", infoDisabled: "#3b3f4c", infoLight: "#1d2029", whiteColor: "#f5f6f7", blackColor: "#f5f6f7", mainColor: "#f5f6f7", contentColor: "#cfd3dc", tipsColor: "#9aa1af", lightColor: "#6b7082", borderColor: "#3a4251", dividerColor: "#3a4251", maskColor: "rgba(0, 0, 0, 0.6)", shadowColor: "rgba(0, 0, 0, 0.3)", bgColor: "#111827", bgWhite: "#000000", bgGrayLight: "#1a1a1a", bgGrayDark: "#f5f7fa", bgBlack: "#ffffff" }; const lightCss = { "--u-background": "#ffffff", "--u-surface": "#f7f8fa", "--u-text": "#303133" }; const darkCss = { "--u-background": "#0f1115", "--u-surface": "#1c2233", "--u-text": "#f5f6f7" }; const defaultThemes = [ { name: config$2.defaultTheme, label: "默认蓝", description: "uView Pro 默认主题,支持亮色与暗黑模式", color: lightPalette, darkColor: darkPalette, css: lightCss, darkCss } ]; const color = vue.reactive({ ...lightPalette }); function getSystemDarkMode() { try { if (typeof uni !== "undefined" && typeof uni.getSystemInfoSync === "function") { const systemInfo2 = uni.getSystemInfoSync(); const theme2 = systemInfo2.osTheme || systemInfo2.theme || "light"; if (theme2 === "dark") { return "dark"; } if (theme2 === "light") { return "light"; } } } catch (e) { console.warn("[system-theme] getSystemDarkMode failed", e); } return "light"; } const zhCN = { name: "zh-CN", label: "简体中文", locale: "zh-Hans", uActionSheet: { cancelText: "取消" }, uUpload: { uploadText: "选择图片", retry: "点击重试", overSize: "超出允许的文件大小", overMaxCount: "超出最大允许的文件个数", reUpload: "重新上传", uploadFailed: "上传失败,请重试", modalTitle: "提示", deleteConfirm: "您确定要删除此项吗?", terminatedRemove: "已终止移除", removeSuccess: "移除成功", previewFailed: "预览图片失败", notAllowedExt: "不允许选择{ext}格式的文件", noAction: "请配置上传地址" }, uVerificationCode: { startText: "获取验证码", changeText: "X秒重新获取", endText: "重新获取" }, uSection: { subTitle: "更多" }, uSelect: { cancelText: "取消", confirmText: "确认" }, uSearch: { placeholder: "请输入关键字", actionText: "搜索" }, uNoNetwork: { tips: "哎呀,网络信号丢失", checkNetwork: "请检查网络,或前往", setting: "设置", retry: "重试", noConnection: "无网络连接", connected: "网络已连接" }, uReadMore: { closeText: "展开阅读全文", openText: "收起" }, uPagination: { prevText: "上一页", nextText: "下一页" }, uPicker: { cancelText: "取消", confirmText: "确认" }, uModal: { title: "提示", content: "内容", confirmText: "确认", cancelText: "取消" }, uLoadmore: { loadmore: "加载更多", loading: "正在加载...", nomore: "没有更多了" }, uLink: { mpTips: "链接已复制,请在浏览器打开" }, uKeyboard: { cancelText: "取消", confirmText: "确认", number: "数字键盘", idCard: "身份证键盘", plate: "车牌号键盘" }, uInput: { placeholder: "请输入内容" }, uCalendar: { startText: "开始", endText: "结束", toolTip: "选择日期", outOfRange: "日期超出范围啦~", year: "年", month: "月", sun: "日", mon: "一", tue: "二", wed: "三", thu: "四", fri: "五", sat: "六", confirmText: "确定", to: "至" }, uEmpty: { car: "购物车为空", page: "页面不存在", search: "没有搜索结果", address: "没有收货地址", wifi: "没有WiFi", order: "订单为空", coupon: "没有优惠券", favor: "暂无收藏", permission: "无权限", history: "无历史记录", news: "无新闻列表", message: "消息列表为空", list: "列表为空", data: "数据为空" }, uCountDown: { day: "天", hour: "时", minute: "分", second: "秒" }, uFullScreen: { title: "发现新版本", upgrade: "升级" } }; const enUS = { name: "en-US", label: "English", locale: "en", uActionSheet: { cancelText: "Cancel" }, uUpload: { uploadText: "Select Image", retry: "Retry", overSize: "File size exceeds allowed limit", overMaxCount: "Exceeds maximum allowed number of files", reUpload: "Re-upload", uploadFailed: "Upload failed, please try again", modalTitle: "Notice", deleteConfirm: "Are you sure you want to delete this item?", terminatedRemove: "Removal cancelled", removeSuccess: "Removed successfully", previewFailed: "Failed to preview image", notAllowedExt: "Files with {ext} format are not allowed", noAction: "Please configure upload address" }, uVerificationCode: { startText: "Get Code", changeText: "Retry in Xs", endText: "Retry" }, uSection: { subTitle: "More" }, uSelect: { cancelText: "Cancel", confirmText: "Confirm" }, uSearch: { placeholder: "Please enter keywords", actionText: "Search" }, uNoNetwork: { tips: "Ooops, network disconnected", checkNetwork: "Please check network or go to", setting: "Settings", retry: "Retry", noConnection: "No network connection", connected: "Network connected" }, uReadMore: { closeText: "Read More", openText: "Collapse" }, uPagination: { prevText: "Prev", nextText: "Next" }, uPicker: { cancelText: "Cancel", confirmText: "Confirm" }, uModal: { title: "Notice", content: "Content", confirmText: "Confirm", cancelText: "Cancel" }, uLoadmore: { loadmore: "Load more", loading: "Loading...", nomore: "No more" }, uLink: { mpTips: "Link copied, please open it in browser" }, uKeyboard: { cancelText: "Cancel", confirmText: "Confirm", number: "Number Keyboard", idCard: "ID Card Keyboard", plate: "Plate Keyboard" }, uInput: { placeholder: "Please enter" }, uCalendar: { startText: "Start", endText: "End", toolTip: "Select date", outOfRange: "Date out of range", year: "", month: "", sun: "Sun", mon: "Mon", tue: "Tue", wed: "Wed", thu: "Thu", fri: "Fri", sat: "Sat", confirmText: "Confirm", to: " to " }, uEmpty: { car: "Shopping cart is empty", page: "Page not found", search: "No search results", address: "No shipping address", wifi: "No WiFi", order: "No orders", coupon: "No coupons", favor: "No favorites", permission: "No permission", history: "No history", news: "No news", message: "No messages", list: "No list", data: "No data" }, uCountDown: { day: "days", hour: "hours", minute: "minutes", second: "Second" }, uFullScreen: { title: "New Version Available", upgrade: "Upgrade" } }; const localePack = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, enUS, zhCN }, Symbol.toStringTag, { value: "Module" })); const THEME_STORAGE_KEY$1 = "uview-pro-theme"; const DARK_MODE_STORAGE_KEY$1 = "uview-pro-dark-mode"; const LOCALE_STORAGE_KEY = "uview-pro-locale"; const DEFAULT_LIGHT_TOKENS = ((_a = defaultThemes[0]) == null ? void 0 : _a.color) || {}; const DEFAULT_DARK_TOKENS = ((_b = defaultThemes[0]) == null ? void 0 : _b.darkColor) || {}; const STRUCTURAL_TOKENS = /* @__PURE__ */ new Set([ "bgColor", "bgWhite", "bgGrayLight", "bgGrayDark", "bgBlack", "borderColor", "lightColor", "mainColor", "contentColor", "tipsColor", "whiteColor", "blackColor", "dividerColor", "maskColor", "shadowColor" ]); class ConfigProvider { constructor() { this.themesRef = vue.ref([]); this.currentThemeRef = vue.ref(null); this.darkModeRef = vue.ref(config$2.defaultDarkMode); this.cssVarsRef = vue.ref({}); this.localesRef = vue.ref([]); this.currentLocaleRef = vue.ref(null); this.baseColorTokens = DEFAULT_LIGHT_TOKENS; this.baseDarkColorTokens = DEFAULT_DARK_TOKENS; this.debug = false; this.systemDarkModeMediaQuery = null; this.lastAppliedCssKeys = []; this.interval = 0; this.initSystemDarkModeListener(); } /** * 初始化系统暗黑模式监听器 * 支持 H5、App、小程序等平台 */ initSystemDarkModeListener() { try { if (typeof window !== "undefined" && window.matchMedia) { this.systemDarkModeMediaQuery = window.matchMedia("(prefers-color-scheme: dark)"); const listener = () => { if (this.darkModeRef.value === "auto") { this.applyTheme(this.currentThemeRef.value); } }; if (this.systemDarkModeMediaQuery.addEventListener) { this.systemDarkModeMediaQuery.addEventListener("change", listener); } else if (this.systemDarkModeMediaQuery.addListener) { this.systemDarkModeMediaQuery.addListener(listener); } } } catch (e) { if (this.debug) console.warn("[ConfigProvider] H5 system dark mode listener failed", e); } try { if (typeof uni !== "undefined" && typeof uni.onThemeChange === "function") { uni.onThemeChange((res) => { console.log("[ConfigProvider] system theme changed", res); if (this.darkModeRef.value === "auto") { this.applyTheme(this.currentThemeRef.value); } }); } } catch (e) { if (this.debug) console.warn("[ConfigProvider] uni-app system dark mode listener failed", e); } this.initAppEvent(); } /** * App 平台事件监听 * 经测试 uni.onThemeChange 在 App 平台目前没生效,暂时只能通过定时检查 */ initAppEvent() { try { if (this.interval) clearInterval(this.interval); this.interval = setInterval(() => { if (this.darkModeRef.value === "auto") { this.applyTheme(this.currentThemeRef.value); } }, 5e3); } catch (e) { if (this.debug) console.warn("[ConfigProvider] setInterval failed", e); } } /** * 检测当前是否应该使用暗黑模式 */ isSystemDarkMode() { try { if (this.systemDarkModeMediaQuery) { return this.systemDarkModeMediaQuery.matches; } } catch (e) { if (this.debug) console.warn("[ConfigProvider] matchMedia check failed", e); } try { return getSystemDarkMode() === "dark"; } catch (e) { if (this.debug) console.warn("[ConfigProvider] native system theme check failed", e); return false; } } /** * 初始化主题系统 * @param themes 可用主题数组 * @param defaultTheme 可选默认主题名 */ initTheme(themes, defaultConfig, isForce) { const normalizedThemes = this.normalizeThemes(themes); if (!normalizedThemes.length) { console.warn("[ConfigProvider] init called with empty themes"); return; } if (defaultConfig) { if (typeof defaultConfig === "string") { config$2.defaultTheme = defaultConfig || config$2.defaultTheme; } else if (typeof defaultConfig === "object") { const { defaultTheme, defaultDarkMode } = defaultConfig; config$2.defaultTheme = defaultTheme || config$2.defaultTheme; config$2.defaultDarkMode = defaultDarkMode || config$2.defaultDarkMode; } } this.themesRef.value = normalizedThemes.slice(); const saved = this.readStorage(THEME_STORAGE_KEY$1); let initialName = saved || config$2.defaultTheme || this.themesRef.value[0].name; if (isForce && config$2.defaultTheme) initialName = config$2.defaultTheme; let found = this.themesRef.value.find((t2) => t2.name === initialName); if (!found) found = this.themesRef.value.find((t2) => t2.name === config$2.defaultTheme); if (!found) found = this.themesRef.value[0]; this.currentThemeRef.value = found; this.initDarkMode(config$2.defaultDarkMode, isForce); this.applyTheme(found); if (this.debug) console.log("[ConfigProvider] initialized, theme=", found.name, "darkMode=", this.darkModeRef.value); return this; } /** * 初始化暗黑模式设置 * @param darkMode */ initDarkMode(darkMode, isForce) { const savedDarkMode = this.readStorage(DARK_MODE_STORAGE_KEY$1); let darkModeValue = savedDarkMode || darkMode || config$2.defaultDarkMode; if (isForce && darkMode) darkModeValue = darkMode; this.darkModeRef.value = darkModeValue; } /** * 初始化国际化数据 * @param locales 可选的 locale 列表(对象数组,包含 name 字段) * @param defaultLocaleName 可选默认 locale 名称 */ initLocales(locales, defaultLocaleName, isForce) { const normalized = this.normalizeLocales(locales); if (!normalized.length) { if (this.debug) console.warn("[ConfigProvider] initLocales called with empty locales"); return; } this.localesRef.value = normalized.slice(); const saved = this.readStorage(LOCALE_STORAGE_KEY); let initialName = saved || defaultLocaleName || config$2.defaultLocale; if (isForce && defaultLocaleName) initialName = defaultLocaleName; let found = this.localesRef.value.find((l) => l.name === initialName); if (!found) found = this.localesRef.value.find((l) => l.name === config$2.defaultLocale); if (!found) found = this.localesRef.value[0]; this.currentLocaleRef.value = found; if (this.debug) console.log("[ConfigProvider] locales initialized, locale=", found == null ? void 0 : found.name); return this; } /** * 归一化 locale 配置,保证始终至少有一个默认 locale */ normalizeLocales(locales) { let builtinList = []; try { builtinList = Object.values(localePack || {}).filter((v) => v && typeof v === "object"); } catch (e) { if (this.debug) console.warn("[ConfigProvider] normalizeLocales read builtin failed", e); } if (!Array.isArray(locales) || !locales.length) { return builtinList.slice(); } const map = /* @__PURE__ */ new Map(); builtinList.forEach((item) => { if (item && item.name) { map.set(item.name, { ...item || {} }); } }); locales.forEach((loc) => { if (!loc || !loc.name) return; const existing = map.get(loc.name); if (!existing) { map.set(loc.name, { ...loc || {} }); return; } const merged = { ...existing }; Object.keys(loc).forEach((k) => { const v = loc[k]; if (v != null && typeof v === "object" && !Array.isArray(v) && typeof merged[k] === "object") { merged[k] = { ...merged[k] || {}, ...v || {} }; } else { merged[k] = v; } }); map.set(loc.name, merged); }); return Array.from(map.values()); } /** * 获取所有可用 locale */ getLocales() { return this.localesRef.value.slice(); } /** * 获取当前 locale 对象 */ getCurrentLocale() { return this.currentLocaleRef.value; } /** * 切换 locale 并持久化 */ setLocale(localeName) { if (!this.localesRef.value || this.localesRef.value.length === 0) { console.warn("[ConfigProvider] setLocale called but locales list empty"); return; } const locale = this.localesRef.value.find((l) => l.name === localeName); if (!locale) { console.warn("[ConfigProvider] locale not found:", localeName); return; } this.currentLocaleRef.value = locale; this.writeStorage(LOCALE_STORAGE_KEY, localeName); if (this.debug) console.log("[ConfigProvider] setLocale ->", localeName); } /** * 翻译函数 * 支持 key 路径,例如 'calendar.placeholder' * replacements 支持数组或对象替换占位符 {0} 或 {name} */ t(key, replacements, localeName) { try { if (!Array.isArray(this.localesRef.value) || this.localesRef.value.length === 0) { this.initLocales(); } } catch (e) { if (this.debug) console.warn("[ConfigProvider] lazy initLocales failed", e); } const localeObj = localeName && this.localesRef.value.find((l) => l.name === localeName) || this.currentLocaleRef.value; if (!localeObj) return key; const parts = key.split("."); let cur = localeObj; for (let i = 0; i < parts.length; i++) { if (cur == null) break; cur = cur[parts[i]]; } let text = typeof cur === "string" ? cur : key; if (replacements != null) { if (Array.isArray(replacements)) { replacements.forEach((val, idx) => { text = text.split(`{${idx}}`).join(String(val)); }); } else if (typeof replacements === "object") { Object.keys(replacements).forEach((k) => { text = text.split(`{${k}}`).join(String(replacements[k])); }); } } return text; } /** * 获取所有可用主题 */ getThemes() { return this.themesRef.value.slice(); } /** * 获取当前主题 */ getCurrentTheme() { return this.currentThemeRef.value; } /** * 切换主题并持久化 */ setTheme(themeName) { if (!this.themesRef.value || this.themesRef.value.length === 0) { console.warn("[ConfigProvider] setTheme called but themes list empty"); return; } const theme2 = this.themesRef.value.find((t2) => t2.name === themeName); if (!theme2) { console.warn("[ConfigProvider] theme not found:", themeName); return; } this.currentThemeRef.value = theme2; this.applyTheme(theme2); this.writeStorage(THEME_STORAGE_KEY$1, themeName); if (this.debug) console.log("[ConfigProvider] setTheme ->", themeName); } /** * 运行时更新当前主题颜色并应用(不持久化) * @param colors 主题颜色键值,支持部分更新 */ setThemeColor(colors) { if (!colors || Object.keys(colors).length === 0) return; if (!this.currentThemeRef.value) { console.warn("[ConfigProvider] setThemeColor called but no current theme"); return; } const mode = this.getActiveMode(); if (mode === "dark") { const existing = this.currentThemeRef.value.darkColor || {}; this.currentThemeRef.value.darkColor = { ...existing, ...colors }; } else { const existing = this.currentThemeRef.value.color || {}; this.currentThemeRef.value.color = { ...existing, ...colors }; } this.applyTheme(this.currentThemeRef.value); if (this.debug) console.log("[ConfigProvider] setThemeColor ->", colors); } /** * 获取当前暗黑模式设置 */ getDarkMode() { return this.darkModeRef.value; } /** * 设置暗黑模式 * @param mode 'auto' (跟随系统) | 'light' (强制亮色) | 'dark' (强制暗黑) */ setDarkMode(mode) { this.darkModeRef.value = mode; this.writeStorage(DARK_MODE_STORAGE_KEY$1, mode); this.applyTheme(this.currentThemeRef.value); if (this.debug) console.log("[ConfigProvider] setDarkMode ->", mode); } /** * 检查当前是否处于暗黑模式 */ isInDarkMode() { const mode = this.darkModeRef.value; if (mode === "dark") return true; if (mode === "light") return false; return this.isSystemDarkMode(); } /** * 归一化主题配置,保证始终至少有一个默认主题 */ normalizeThemes(themes) { if (Array.isArray(themes) && themes.length) { return this.mergeThemes(defaultThemes, themes); } return defaultThemes.slice(); } mergeThemes(...lists) { const map = /* @__PURE__ */ new Map(); lists.filter((list2) => Array.isArray(list2) && list2.length > 0).forEach((list2) => { list2.forEach((theme2) => { const normalized = this.ensureDarkVariant({ ...theme2, color: this.applyColorFallbacks(theme2.color), darkColor: theme2.darkColor ? { ...theme2.darkColor } : void 0, css: theme2.css ? { ...theme2.css } : void 0, darkCss: theme2.darkCss ? { ...theme2.darkCss } : void 0 }); map.set(normalized.name, normalized); }); }); return Array.from(map.values()); } ensureDarkVariant(theme2) { const finalDark = this.buildDarkPalette(theme2); return { ...theme2, darkColor: this.applyDarkFallbacks(finalDark) }; } buildDarkPalette(theme2) { const provided = theme2.darkColor || {}; const generated = this.generateDarkFromLight(theme2.color || {}, provided); return { ...generated, ...provided }; } /** * 应用亮色主题 */ applyColorFallbacks(color2) { return { ...this.baseColorTokens || {}, ...color2 || {} }; } /** * 应用暗黑主题 */ applyDarkFallbacks(color2) { return { ...this.baseDarkColorTokens || {}, ...color2 || {} }; } filterNonStructuralTokens(palette) { const result = {}; Object.entries(palette || {}).forEach(([key, value]) => { if (!this.isStructuralToken(key)) { result[key] = value; } }); return result; } generateDarkFromLight(palette, provided) { const result = {}; const nonStructural = this.filterNonStructuralTokens(palette); Object.entries(nonStructural).forEach(([key, value]) => { var _a2; if (typeof value !== "string") return; if (provided && Object.prototype.hasOwnProperty.call(provided, key)) { return; } const fallback = (_a2 = this.baseDarkColorTokens) == null ? void 0 : _a2[key]; result[key] = this.createDarkVariantFromLight(value, fallback); }); return result; } createDarkVariantFromLight(color2, fallback) { const normalized = this.normalizeHex(color2); const fallbackHex = fallback ? this.normalizeHex(fallback) : null; if (normalized && fallbackHex) { return this.mixHex(normalized, fallbackHex, 0.6); } if (fallbackHex) return fallbackHex; return normalized || color2; } normalizeHex(color2) { if (!color2) return null; const hex = color2.trim(); if (/^#([0-9a-fA-F]{6})$/.test(hex)) return hex.toLowerCase(); return null; } mixHex(fromHex, toHex, ratio) { const from = this.hexToRgb(fromHex); const to = this.hexToRgb(toHex); if (!from || !to) return toHex; const clamp = (val) => Math.min(255, Math.max(0, Math.round(val))); const r = clamp(from.r * (1 - ratio) + to.r * ratio); const g = clamp(from.g * (1 - ratio) + to.g * ratio); const b = clamp(from.b * (1 - ratio) + to.b * ratio); return this.rgbToHex(r, g, b); } hexToRgb(hex) { const match = /^#([0-9a-fA-F]{6})$/.exec(hex); if (!match) return null; return { r: parseInt(match[1].slice(0, 2), 16), g: parseInt(match[1].slice(2, 4), 16), b: parseInt(match[1].slice(4, 6), 16) }; } rgbToHex(r, g, b) { const toHex = (val) => val.toString(16).padStart(2, "0"); return `#${toHex(r)}${toHex(g)}${toHex(b)}`; } isStructuralToken(token) { return STRUCTURAL_TOKENS.has(token); } /** * 运行时同步主题颜色($u.color) * 更新响应式 color 对象,确保所有使用 $u.color 的地方都能响应式更新 */ syncRuntimeTheme(palette) { var _a2; try { const defaultPalette = this.getActiveMode() === "dark" ? this.baseDarkColorTokens : this.baseColorTokens; const mergedPalette = { ...defaultPalette, ...palette }; Object.keys(mergedPalette).forEach((key) => { const value = mergedPalette[key]; if (value != null) { color[key] = value; } }); if (typeof uni !== "undefined" && ((_a2 = uni == null ? void 0 : uni.$u) == null ? void 0 : _a2.color)) { uni.$u.color = color; } } catch (e) { if (this.debug) console.warn("[ConfigProvider] sync runtime theme failed", e); } } /** * 获取当前激活的模式 */ getActiveMode() { return this.isInDarkMode() ? "dark" : "light"; } /** * 获取当前主题的配色方案 */ getPaletteForMode(theme2, mode) { if (mode === "dark") { return theme2.darkColor && Object.keys(theme2.darkColor).length ? theme2.darkColor : theme2.color || {}; } return theme2.color || {}; } /** * 获取当前主题的CSS变量覆盖 */ getCssOverrides(theme2, mode) { if (mode === "dark") { return (theme2.darkCss && Object.keys(theme2.darkCss).length ? theme2.darkCss : theme2.css) || {}; } return theme2.css || {}; } /** * 读取Storage key */ readStorage(key) { try { if (typeof uni === "undefined" || typeof uni.getStorageSync !== "function") return null; const value = uni.getStorageSync(key); return value ?? null; } catch (e) { if (this.debug) console.warn("[ConfigProvider] failed to read storage", e); return null; } } /** * 写入Storage key value */ writeStorage(key, value) { try { if (typeof uni === "undefined" || typeof uni.setStorageSync !== "function") return; uni.setStorageSync(key, value); } catch (e) { if (this.debug) console.warn("[ConfigProvider] failed to write storage", e); } } /** * 更新文档主题模式 H5 */ updateDocumentMode(mode) { if (typeof document === "undefined" || !document.documentElement) return; const root = document.documentElement; root.dataset.uThemeMode = mode; root.classList.remove("u-theme-light", "u-theme-dark"); root.classList.add(`u-theme-${mode}`); } /** * 转换为 CSS 变量名称 */ toCssVarName(key, prefix = "--u") { const types2 = config$2.type; if (types2.some((type2) => key.startsWith(type2))) { prefix += "-type"; } const kebab = key.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(); return `${prefix}-${kebab}`; } /** * 添加 RGB 值 */ attachRgbVar(target, varName, value) { if (typeof value !== "string") return; const hex = value.startsWith("#") ? value.slice(1) : ""; if (!/^[0-9a-fA-F]{6}$/.test(hex)) return; const r = parseInt(hex.slice(0, 2), 16); const g = parseInt(hex.slice(2, 4), 16); const b = parseInt(hex.slice(4, 6), 16); target[`${varName}-rgb`] = `${r}, ${g}, ${b}`; } /** * 构建 CSS 变量映射表 * 生成格式: */ buildCssVarMap(theme2, mode) { const map = { "--u-theme-mode": mode }; const palette = this.getPaletteForMode(theme2, mode); const cssOverrides = this.getCssOverrides(theme2, mode); const applyEntry = (key, value) => { if (value == null) return; const strValue = String(value); if (key.startsWith("--")) { map[key] = strValue; this.attachRgbVar(map, key, strValue); return; } const cssVarName = this.toCssVarName(key); map[cssVarName] = strValue; this.attachRgbVar(map, cssVarName, strValue); }; Object.entries(palette || {}).forEach(([key, value]) => applyEntry(key, value)); Object.entries(cssOverrides || {}).forEach(([key, value]) => applyEntry(key, value)); return map; } /** * 刷新 CSS 变量 H5 */ flushCssVars(vars) { if (typeof document === "undefined" || !document.documentElement) return; const root = document.documentElement; this.lastAppliedCssKeys.forEach((key) => { root.style.removeProperty(key); }); Object.entries(vars).forEach(([key, value]) => { root.style.setProperty(key, value); }); this.lastAppliedCssKeys = Object.keys(vars); } /** * 将主题应用到运行时: * - 1) 调用 uni.$u.setColor(theme.color) 如果存在 * - 2) 在 H5 环境中,将 css map 注入到 document.documentElement 的 CSS 变量中 * - 3) 支持暗黑模式:根据 darkColor 或 color 应用相应的颜色 */ applyTheme(theme2) { if (!theme2) return; const mode = this.getActiveMode(); const palette = this.getPaletteForMode(theme2, mode); this.syncRuntimeTheme(palette); const cssVarMap = this.buildCssVarMap(theme2, mode); this.cssVarsRef.value = cssVarMap; this.flushCssVars(cssVarMap); this.updateDocumentMode(mode); } } const configProvider = new ConfigProvider(); function getColor(name) { if (color[name]) { return color[name]; } return lightPalette[name] || ""; } function setColor(theme2) { if (theme2) { configProvider.setThemeColor(theme2); } } function type2icon(type2 = "success", fill = false) { if (!["primary", "info", "error", "warning", "success"].includes(type2)) type2 = "success"; let iconName = ""; switch (type2) { case "primary": iconName = "info-circle"; break; case "info": iconName = "info-circle"; break; case "error": iconName = "close-circle"; break; case "warning": iconName = "error-circle"; break; case "success": iconName = "checkmark-circle"; break; default: iconName = "checkmark-circle"; } if (fill) iconName += "-fill"; return iconName; } function randomArray(array2 = []) { return array2.sort(() => Math.random() - 0.5); } function deepClone(obj, cache2 = /* @__PURE__ */ new WeakMap()) { if (obj === null || typeof obj !== "object") return obj; if (cache2.has(obj)) return cache2.get(obj); let clone; if (obj instanceof Date) { clone = new Date(obj.getTime()); } else if (obj instanceof RegExp) { clone = new RegExp(obj); } else if (obj instanceof Map) { clone = new Map(Array.from(obj, ([key, value]) => [key, deepClone(value, cache2)])); } else if (obj instanceof Set) { clone = new Set(Array.from(obj, (value) => deepClone(value, cache2))); } else if (Array.isArray(obj)) { clone = obj.map((value) => deepClone(value, cache2)); } else if (Object.prototype.toString.call(obj) === "[object Object]") { clone = Object.create(Object.getPrototypeOf(obj)); cache2.set(obj, clone); for (const [key, value] of Object.entries(obj)) { clone[key] = deepClone(value, cache2); } } else { clone = Object.assign({}, obj); } cache2.set(obj, clone); return clone; } function deepMerge$1(target = {}, source = {}) { target = deepClone(target); if (typeof target !== "object" || target === null || typeof source !== "object" || source === null) return target; const merged = Array.isArray(target) ? target.slice() : Object.assign({}, target); for (const prop in source) { if (!Object.prototype.hasOwnProperty.call(source, prop)) continue; const sourceValue = source[prop]; const targetValue = merged[prop]; if (sourceValue instanceof Date) { merged[prop] = new Date(sourceValue); } else if (sourceValue instanceof RegExp) { merged[prop] = new RegExp(sourceValue); } else if (sourceValue instanceof Map) { merged[prop] = new Map(sourceValue); } else if (sourceValue instanceof Set) { merged[prop] = new Set(sourceValue); } else if (typeof sourceValue === "object" && sourceValue !== null) { merged[prop] = deepMerge$1(targetValue, sourceValue); } else { merged[prop] = sourceValue; } } return merged; } function email(value) { return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test( value ); } function mobile(value) { return /^1[3-9]\d{9}$/.test(value); } function url(value) { return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value); } function date$1(value) { return !/Invalid|NaN/.test(new Date(value).toString()); } function dateISO(value) { return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value); } function number$2(value) { return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value); } function digits(value) { return /^\d+$/.test(value); } function idCard(value) { return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value); } function carNo(value) { const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/; const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/; if (value.length === 7) { return creg.test(value); } else if (value.length === 8) { return xreg.test(value); } else { return false; } } function amount(value) { return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value); } function chinese(value) { let reg = /^[\u4e00-\u9fa5]+$/gi; return reg.test(value); } function letter(value) { return /^[a-zA-Z]*$/.test(value); } function enOrNum(value) { let reg = /^[0-9a-zA-Z]*$/g; return reg.test(value); } function contains(value, param) { return value.indexOf(param) >= 0; } function range$1(value, param) { return value >= param[0] && value <= param[1]; } function rangeLength(value, param) { return value.length >= param[0] && value.length <= param[1]; } function landline(value) { let reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/; return reg.test(value); } function empty(value) { switch (typeof value) { case "undefined": return true; case "string": if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0) return true; break; case "boolean": if (!value) return true; break; case "number": if (0 === value || isNaN(value)) return true; break; case "object": if (null === value || value.length === 0) return true; for (var i in value) { return false; } return true; } return false; } function jsonString(value) { if (typeof value == "string") { try { var obj = JSON.parse(value); if (typeof obj == "object" && obj) { return true; } else { return false; } } catch (e) { return false; } } return false; } function array$1(value) { if (typeof Array.isArray === "function") { return Array.isArray(value); } else { return Object.prototype.toString.call(value) === "[object Array]"; } } function object$1(value) { return Object.prototype.toString.call(value) === "[object Object]"; } function code(value, len = 6) { return new RegExp(`^\\d{${len}}$`).test(value); } function func(value) { return typeof value === "function"; } function promise(value) { return object$1(value) && func(value.then) && func(value.catch); } function image(value) { const newValue = value.split("?")[0]; const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i; return IMAGE_REGEXP.test(newValue); } function video(value) { const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i; return VIDEO_REGEXP.test(value); } function regExp(o) { return o && Object.prototype.toString.call(o) === "[object RegExp]"; } function string$1(value) { return typeof value === "string"; } const test$1 = { email, mobile, url, date: date$1, dateISO, number: number$2, digits, idCard, carNo, amount, chinese, letter, enOrNum, contains, range: range$1, rangeLength, empty, isEmpty: empty, jsonString, landline, object: object$1, array: array$1, code, func, promise, video, image, regExp, string: string$1 }; function addUnit$1(value = "auto", unit = "rpx") { const strValue = String(value); if (!strValue) return ""; if (strValue === "auto") return strValue; if (strValue.includes(" ")) { return strValue.split(" ").map((s) => { if (s === "auto" || /^-?\d*\.?\d+(%|px|rpx|em|rem|vh|vw)$/.test(s)) return s; return test$1.number(s) ? `${s}${unit}` : s; }).join(" "); } if (/^-?\d*\.?\d+(%|px|rpx|em|rem|vh|vw)$/.test(strValue)) return strValue; return test$1.number(strValue) ? `${strValue}${unit}` : strValue; } function random(min, max) { if (min >= 0 && max > 0 && max >= min) { const gab = max - min + 1; return Math.floor(Math.random() * gab + min); } else { return 0; } } function trim(str, pos = "both") { if (pos === "both") { return str.replace(/^\s+|\s+$/g, ""); } else if (pos === "left") { return str.replace(/^\s*/, ""); } else if (pos === "right") { return str.replace(/(\s*$)/g, ""); } else if (pos === "all") { return str.replace(/\s+/g, ""); } else { return str; } } function toast(title, option = 1500) { uni.showToast({ title, icon: typeof option === "string" ? option : typeof option === "object" ? option.icon || "none" : "none", duration: typeof option === "number" ? option : typeof option === "object" ? option.duration || "1500" : 1500 }); } function getParent$1(name, keys) { var _a2; let parent = this.$parent; while (parent) { if (((_a2 = parent.$options) == null ? void 0 : _a2.name) !== name) { parent = parent.$parent; } else { const data = {}; if (Array.isArray(keys)) { keys.forEach((val) => { data[val] = (parent == null ? void 0 : parent[val]) ? parent[val] : ""; }); } else { for (const i in keys) { if (Array.isArray(keys[i])) { if (keys[i].length) { data[i] = keys[i]; } else { data[i] = parent[i]; } } else if (keys[i] && keys[i].constructor === Object) { if (Object.keys(keys[i]).length) { data[i] = keys[i]; } else { data[i] = parent[i]; } } else { data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i]; } } } return data; } } return {}; } function $parent(componentName, _instance = null) { var _a2; const instance = _instance || vue.getCurrentInstance(); let parent = instance && instance.parent; if (!componentName) return parent; while (parent) { const name = (_a2 = parent.type) == null ? void 0 : _a2.name; if (name === componentName) { return parent; } parent = parent.parent; } return null; } function os() { return uni.getSystemInfoSync().platform; } function sys() { return uni.getSystemInfoSync(); } let timeout = null; function debounce(func2, wait2 = 500, immediate = false) { if (timeout !== null) clearTimeout(timeout); if (immediate) { const callNow = !timeout; timeout = setTimeout(() => { timeout = null; }, wait2); if (callNow) typeof func2 === "function" && func2(); } else { timeout = setTimeout(() => { typeof func2 === "function" && func2(); }, wait2); } } let flag; function throttle(func2, wait2 = 500, immediate = true) { if (immediate) { if (!flag) { flag = true; typeof func2 === "function" && func2(); setTimeout(() => { flag = false; }, wait2); } } else { if (!flag) { flag = true; setTimeout(() => { flag = false; typeof func2 === "function" && func2(); }, wait2); } } } function getRect(selector, _instance = null, all = false) { const instance = _instance || vue.getCurrentInstance(); return new Promise((resolve2) => { uni.createSelectorQuery().in(instance == null ? void 0 : instance.proxy)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => { if (all && Array.isArray(rect) && rect.length) { resolve2(rect); } if (!all && rect) { resolve2(rect); } }).exec(); }); } function UniCopy(text, config2) { const opt = Object.assign({ data: text }, config2); uni.setClipboardData(opt); } function clipboard(content, options) { const text = String(content); const defaultOpt = { showToast: true, success: () => { }, fail: () => { }, complete: () => { } }; const config2 = Object.assign(defaultOpt, options); UniCopy(text, config2); } const zIndex = { toast: 10090, noNetwork: 10080, // popup包含popup,actionSheet,keyboard,picker的值 popup: 10075, mask: 10070, navbar: 980, topTips: 975, sticky: 970, indexListSticky: 965, tabbar: 998 }; function mitt(all) { all = all || /* @__PURE__ */ new Map(); return { /** * A Map of event names to registered handler functions. */ all, /** * Register an event handler for the given type. * @param {string|symbol} type Type of event to listen for, or `'*'` for all events * @param {Function} handler Function to call in response to given event * @memberOf mitt */ on(type2, handler) { const handlers = all.get(type2); if (handlers) { handlers.push(handler); } else { all.set(type2, [handler]); } }, /** * Remove an event handler for the given type. * If `handler` is omitted, all handlers of the given type are removed. * @param {string|symbol} type Type of event to unregister `handler` from (`'*'` to remove a wildcard handler) * @param {Function} [handler] Handler function to remove * @memberOf mitt */ off(type2, handler) { const handlers = all.get(type2); if (handlers) { if (handler) { handlers.splice(handlers.indexOf(handler) >>> 0, 1); } else { all.set(type2, []); } } }, /** * Invoke all handlers for the given type. * If present, `'*'` handlers are invoked after type-matched handlers. * * Note: Manually firing '*' handlers is not supported. * * @param {string|symbol} type The event type to invoke * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler * @memberOf mitt */ emit(type2, evt) { let handlers = all.get(type2); if (handlers) { [...handlers].forEach((handler) => { handler(evt); }); } handlers = all.get("*"); if (handlers) { [...handlers].forEach((handler) => { handler(type2, evt); }); } }, /** * Clear all */ clear() { this.all.clear(); } }; } const IGNORE_REQUEST_KEYS = ["baseUrl", "meta"]; class Request { constructor() { this.config = { baseUrl: "", // 请求的根域名 header: {}, // 默认的请求头 method: "POST", // 请求方式 dataType: "json", // 设置为json,返回后uni.request会对数据进行一次JSON.parse responseType: "text", // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可 timeout: 6e4, meta: { originalData: true, // 是否在拦截器中返回服务端的原始数据,见文档说明 toast: false, // 是否在请求出错时,弹出toast loading: false // 是否显示加载中 } }; this.interceptor = { request: null, response: null }; } /** * 将全局配置合并到本次请求的 options 中 * - 忽略 IGNORE_REQUEST_KEYS 中的字段(如 meta) * - 对 header 使用深合并(全局 header 为默认,options.header 优先) * - 对对象类型的字段尝试深合并,基础类型以 options 值优先 * - 处理 baseUrl:若存在全局 baseUrl 且 options.url 非完整 url(非 http 开头),则合并成完整 URL */ mergeGlobalConfigToOptions(options) { const mergedOptions = { ...options }; for (const key of Object.keys(this.config)) { if (IGNORE_REQUEST_KEYS.includes(key)) { continue; } const cfgVal = this.config[key]; const optVal = options[key]; if (cfgVal === void 0) continue; if (key === "header") { mergedOptions.header = deepMerge$1(cfgVal || {}, optVal || {}); continue; } if (typeof cfgVal === "string" || typeof cfgVal === "number" || typeof cfgVal === "boolean") { mergedOptions[key] = optVal !== void 0 ? optVal : cfgVal; continue; } if (typeof cfgVal === "object" && !Array.isArray(cfgVal)) { mergedOptions[key] = deepMerge$1(cfgVal || {}, optVal || {}); continue; } if (optVal === void 0) { mergedOptions[key] = cfgVal; } } const baseUrl = this.config.baseUrl; if (baseUrl && mergedOptions.url && typeof mergedOptions.url === "string" && mergedOptions.url.indexOf("http") !== 0) { mergedOptions.url = baseUrl + (mergedOptions.url.indexOf("/") === 0 ? mergedOptions.url : `/${mergedOptions.url}`); } if (!mergedOptions.url) { mergedOptions.url = ""; } return mergedOptions; } /** * 设置全局默认配置 * @param customConfig 自定义配置 */ setConfig(customConfig) { this.config = deepMerge$1(this.config, customConfig); } /** * 主要请求部分 * @param options 请求参数 */ request(options) { const mergedMeta = { ...this.config.meta, ...options.meta || {} }; options.meta = mergedMeta; options.url = options.url || ""; options.params = options.params || {}; options = this.mergeGlobalConfigToOptions(options); if (this.interceptor.request && typeof this.interceptor.request === "function") { const interceptorRequest = this.interceptor.request(options); if (!interceptorRequest) { return new Promise(() => { }); } this.options = interceptorRequest; } return new Promise((resolve2, reject) => { options.complete = (response) => { const meta = options.meta || this.config.meta || {}; const originalData = meta.originalData ?? false; response.config = options; if (originalData) { if (this.interceptor.response && typeof this.interceptor.response === "function") { const resInterceptors = this.interceptor.response(response); if (resInterceptors !== false) { resolve2(resInterceptors); } else { reject(response); } } else { resolve2(response); } } else { if (response.statusCode === 200) { if (this.interceptor.response && typeof this.interceptor.response === "function") { const resInterceptors = this.interceptor.response(response.data); if (resInterceptors !== false) { resolve2(resInterceptors); } else { reject(response.data); } } else { resolve2(response.data); } } else { reject(response); } } }; uni.request(options); }); } get(url2, data = {}, options = {}) { return this.request({ method: "GET", url: url2, data, header: options.header || {}, meta: options.meta }); } post(url2, data = {}, options = {}) { return this.request({ url: url2, method: "POST", data, header: options.header || {}, meta: options.meta }); } put(url2, data = {}, options = {}) { return this.request({ url: url2, method: "PUT", data, header: options.header || {}, meta: options.meta }); } delete(url2, data = {}, options = {}) { return this.request({ url: url2, method: "DELETE", data, header: options.header || {}, meta: options.meta }); } } const httpInstance = new Request(); const originalConsole = { log: console.log, info: console.info, warn: console.warn, error: console.error, debug: console.debug, trace: console.trace, table: console.table, time: console.time, timeEnd: console.timeEnd, group: console.group, groupEnd: console.groupEnd, groupCollapsed: console.groupCollapsed, assert: console.assert, clear: console.clear, count: console.count, countReset: console.countReset }; Object.keys(originalConsole).forEach((key) => { const methodKey = key; if (!originalConsole[methodKey]) { originalConsole[methodKey] = () => { }; } }); class Logger { constructor() { this.debugMode = false; this.prefix = "[uViewPro]"; this.showCallerInfo = true; } /** * 设置调试模式 * @param enabled 是否启用调试模式 */ setDebugMode(enabled) { this.debugMode = !!enabled; if (this.debugMode) { console.log("[uViewPro] Debug mode enabled"); } else { console.log("[uViewPro] Debug mode disabled"); } return this; } /** * 设置是否显示调用者信息(文件名和行号) * @param show 是否显示调用者信息 */ setShowCallerInfo(show) { this.showCallerInfo = !!show; return this; } /** * 设置日志前缀 * @param prefix 日志前缀 */ setPrefix(prefix) { if (prefix) this.prefix = prefix; return this; } /** * 获取当前调试模式状态 * @returns 当前调试模式状态 */ getDebugMode() { return this.debugMode; } /** * 从文件路径中提取纯净的文件名(去除查询参数和路径) * @param filePath 文件路径 * @returns 纯净的文件名 */ extractFileName(filePath) { if (!filePath) return ""; const withoutQuery = filePath.split("?")[0]; const parts = withoutQuery.split(/[/\\]/); const fileNameWithExt = parts.pop() || ""; return fileNameWithExt; } /** * 获取调用者信息(文件名和行号) * @returns 调用者信息字符串 */ getCallerInfo() { if (!this.showCallerInfo) return ""; try { const error = new Error(); const stack = error.stack; if (!stack) return ""; const stackLines = stack.split("\n"); for (let i = 3; i < stackLines.length; i++) { const line = stackLines[i].trim(); if (line && !line.includes("logger.ts") && !line.includes("Logger.") && !line.includes("at Object.")) { const match = line.match(/\(?(.*):(\d+):(\d+)\)?/); if (match) { const filePath = match[1]; const lineNumber = match[2]; const fileName = this.extractFileName(filePath); return `[${fileName}:${lineNumber}]`; } break; } } } catch (e) { } return ""; } /** * 通用日志输出方法 * @param level 日志级别 * @param args 日志参数 */ output(level, ...args) { if (!this.debugMode || !originalConsole[level]) return; const method2 = originalConsole[level]; const callerInfo = this.getCallerInfo(); if (this.prefix) { if (callerInfo) { method2(`${this.prefix}${callerInfo}`, ...args); } else { method2(this.prefix, ...args); } } else { if (callerInfo) { method2(callerInfo, ...args); } else { method2(...args); } } } /** * 普通日志 * @param args 日志参数 */ log(...args) { this.output("log", ...args); } /** * 信息日志 * @param args 日志参数 */ info(...args) { this.output("info", ...args); } /** * 警告日志 * @param args 日志参数 */ warn(...args) { this.output("warn", ...args); } /** * 错误日志 * @param args 日志参数 */ error(...args) { this.output("error", ...args); } /** * 调试日志 * @param args 日志参数 */ debug(...args) { if (!originalConsole.debug) return; this.output("debug", ...args); } /** * 堆栈跟踪 * @param args 日志参数 */ trace(...args) { if (!originalConsole.trace) return; this.output("trace", ...args); } /** * 表格输出 * @param data 表格数据 * @param columns 列名(可选) */ table(data, columns) { if (!this.debugMode || !originalConsole.table) return; if (this.prefix) { originalConsole.log(this.prefix); } originalConsole.table(data, columns); } /** * 开始计时 * @param label 计时器标签 */ time(label) { if (!this.debugMode || !originalConsole.time) return; const fullLabel = this.prefix ? `${this.prefix} ${label}` : label; originalConsole.time(fullLabel); } /** * 结束计时 * @param label 计时器标签 */ timeEnd(label) { if (!this.debugMode || !originalConsole.timeEnd) return; const fullLabel = this.prefix ? `${this.prefix} ${label}` : label; originalConsole.timeEnd(fullLabel); } /** * 分组日志 * @param label 分组标签 */ group(label) { if (!this.debugMode || !originalConsole.group) return; const fullLabel = this.prefix ? `${this.prefix} ${label}` : label; originalConsole.group(fullLabel); } /** * 结束分组 */ groupEnd() { if (!this.debugMode || !originalConsole.groupEnd) return; originalConsole.groupEnd(); } /** * 分组日志(默认折叠) * @param label 分组标签 */ groupCollapsed(label) { if (!this.debugMode || !originalConsole.groupCollapsed) return; const fullLabel = this.prefix ? `${this.prefix} ${label}` : label; originalConsole.groupCollapsed(fullLabel); } /** * 断言 * @param condition 条件 * @param message 错误消息 */ assert(condition, ...message) { if (!this.debugMode || !originalConsole.assert) return; if (this.prefix) { originalConsole.assert(condition, this.prefix, ...message); } else { originalConsole.assert(condition, ...message); } } /** * 清空控制台 */ clear() { if (!this.debugMode || !originalConsole.clear) return; originalConsole.clear(); } /** * 计数器 * @param label 计数器标签 */ count(label) { if (!this.debugMode || !originalConsole.count) return; const fullLabel = this.prefix && label ? `${this.prefix} ${label}` : label || this.prefix; originalConsole.count(fullLabel); } /** * 重置计数器 * @param label 计数器标签 */ countReset(label) { if (!this.debugMode || !originalConsole.countReset) return; const fullLabel = this.prefix && label ? `${this.prefix} ${label}` : label || this.prefix; originalConsole.countReset(fullLabel); } /** * 带样式的日志 * @param style CSS样式 * @param message 消息内容 */ styled(style, message) { if (!this.debugMode) return; const callerInfo = this.getCallerInfo(); const fullMessage = callerInfo ? `${message} ${callerInfo}` : message; if (this.prefix) { console.log(`%c${this.prefix} ${fullMessage}`, style); } else { console.log(`%c${fullMessage}`, style); } } } const logger = new Logger(); const PARENT_CONTEXT_SYMBOL = Symbol("parent_context"); function generateInstanceId(componentName) { return `${componentName}_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`; } function findParentInstance(name, instance) { var _a2, _b2; if (!instance) return null; let parent = instance.parent; while (parent) { const parentName = ((_a2 = parent.type) == null ? void 0 : _a2.name) || ((_b2 = parent.type) == null ? void 0 : _b2.__name); if (parentName === name) { return parent; } parent = parent.parent; } return null; } function getParentContext(name, instance) { var _a2; const parentInstance = findParentInstance(name, instance); return ((_a2 = parentInstance == null ? void 0 : parentInstance.proxy) == null ? void 0 : _a2[PARENT_CONTEXT_SYMBOL]) || null; } function findAllChildComponents(componentName, instance) { const components = []; function traverse(currentInstance) { var _a2; if (!(currentInstance == null ? void 0 : currentInstance.subTree)) return; const subTree = ((_a2 = currentInstance.subTree) == null ? void 0 : _a2.children) || []; const children = Array.isArray(subTree) ? subTree : [subTree]; children.forEach((vnode) => { var _a3, _b2; const child = vnode.component; if (!child) return; const name = ((_a3 = child.type) == null ? void 0 : _a3.name) || ((_b2 = child.type) == null ? void 0 : _b2.__name); if (name === componentName) { components.push(child); } traverse(child); }); } traverse(instance); logger.log(`Found ${components.length} ${componentName} components`); return components; } function useParent(componentName) { const instance = vue.getCurrentInstance(); if (!instance) { throw new Error("useParent must be called within setup function"); } const name = componentName || instance.type.name || instance.type.__name; if (!name) { throw new Error("Component name is required for useParent"); } const children = vue.reactive([]); const childrenMap = /* @__PURE__ */ new Map(); const broadcast = (event, data, childIds) => { const targetChildren = childIds ? (Array.isArray(childIds) ? childIds : [childIds]).map((id) => childrenMap.get(id)).filter(Boolean) : Array.from(childrenMap.values()); logger.log(`Parent ${name} broadcasting event: ${event} to ${targetChildren.length} children`); targetChildren.forEach((child) => { const exposed = child.getExposed(); if (exposed && typeof exposed[event] === "function") { try { exposed[event](data); } catch (error) { logger.warn(`Error calling child method ${event}:`, error); } } }); }; const broadcastToChildren = (componentName2, event, data) => { logger.log(`Parent ${name} broadcasting event: ${event} to all ${componentName2} components`); const childComponents = findAllChildComponents(componentName2, instance); let successCount = 0; childComponents.forEach((childComponent) => { const exposed = childComponent.exposed || childComponent.proxy; if (exposed && typeof exposed[event] === "function") { try { exposed[event](data); successCount++; } catch (error) { logger.warn(`Error calling ${componentName2} method ${event}:`, error); } } }); logger.log( `Parent ${name} successfully called ${successCount} of ${childComponents.length} ${componentName2} components` ); }; const parentContext = { name, addChild(child) { if (!childrenMap.has(child.id)) { childrenMap.set(child.id, child); children.push(child); logger.log(`Parent ${name} added child: ${child.name}`); } }, removeChild(childId) { if (childrenMap.has(childId)) { childrenMap.get(childId); childrenMap.delete(childId); const index = children.findIndex((c2) => c2.id === childId); if (index > -1) children.splice(index, 1); logger.log(`Parent ${name} removed child: ${childId}`); } }, broadcast, broadcastToChildren, getChildren: () => Array.from(childrenMap.values()), getExposed: () => instance.exposed || {}, getChildExposed(childId) { var _a2; const child = childrenMap.get(childId); return ((_a2 = child == null ? void 0 : child.getExposed) == null ? void 0 : _a2.call(child)) || {}; }, getChildrenExposed() { return Array.from(childrenMap.values()).filter((child) => child.getExposed).map((child) => ({ id: child.id, name: child.name, exposed: child.getExposed() })).filter((item) => Object.keys(item.exposed).length > 0); }, getInstance: () => instance }; if (instance.proxy) { instance.proxy[PARENT_CONTEXT_SYMBOL] = parentContext; } vue.onUnmounted(() => { childrenMap.forEach((_, childId) => parentContext.removeChild(childId)); if (instance.proxy) { delete instance.proxy[PARENT_CONTEXT_SYMBOL]; } logger.log(`Parent ${name} unmounted and cleaned up`); }); return { parentName: name, children, broadcast, broadcastToChildren, getChildren: parentContext.getChildren, getChildExposed: parentContext.getChildExposed, getChildrenExposed: parentContext.getChildrenExposed, getExposed: parentContext.getExposed, getInstance: parentContext.getInstance }; } function useChildren(componentName, parentName) { const instance = vue.getCurrentInstance(); if (!instance) { throw new Error("useChildren must be called within setup function"); } const name = componentName || instance.type.name || instance.type.__name; const instanceId = generateInstanceId(name || "anonymous"); const parentRef = vue.ref(null); const parentExposed = vue.ref({}); const createSimulatedParentContext = (parentInstance) => { var _a2, _b2; return { name: ((_a2 = parentInstance == null ? void 0 : parentInstance.type) == null ? void 0 : _a2.name) || ((_b2 = parentInstance == null ? void 0 : parentInstance.type) == null ? void 0 : _b2.__name) || "unknown", addChild: () => logger.log("Simulated parent added child"), removeChild: () => logger.log("Simulated parent removed child"), broadcast: () => logger.log("Simulated parent broadcasting"), broadcastToChildren: () => logger.log("Simulated parent broadcasting to children"), getChildren: () => [], getExposed: () => (parentInstance == null ? void 0 : parentInstance.exposed) || {}, getChildExposed: () => ({}), getChildrenExposed: () => [], getInstance: () => parentInstance }; }; const getParentExposed = () => { if (parentRef.value) { const exposed = parentRef.value.getExposed(); parentExposed.value = exposed; return exposed; } return {}; }; const getExposed = () => instance.exposed || {}; const findParent = () => { var _a2; if (parentName) { const parentContext = getParentContext(parentName, instance); if (parentContext) { if (!parentContext.getInstance) { parentContext.getInstance = () => findParentInstance(parentName, instance); } return parentContext; } const parentInstance = findParentInstance(parentName, instance); if (parentInstance) { return createSimulatedParentContext(parentInstance); } } let current = instance.parent; while (current) { const context = (_a2 = current.proxy) == null ? void 0 : _a2[PARENT_CONTEXT_SYMBOL]; if (context) { if (!context.getInstance) { context.getInstance = () => current; } return context; } current = current.parent; } return instance.parent ? createSimulatedParentContext(instance.parent) : null; }; const linkParent = () => { const parent = findParent(); if (parent) { parentRef.value = parent; if (parent.addChild && childContext) { parent.addChild(childContext); } getParentExposed(); logger.log(`Child ${name || "anonymous"} linked to parent ${parent.name}`); return true; } logger.log(`Child ${name || "anonymous"} no parent found, working in standalone mode`); return false; }; const emitToParent = (event, data) => { if (parentRef.value) { const exposed = getParentExposed(); if (exposed && typeof exposed[event] === "function") { try { exposed[event](data, instanceId, name); } catch (error) { logger.warn(`Error calling parent method ${event}:`, error); } } } }; const getChildIndex = () => { if (!parentRef.value) return -1; try { const children = parentRef.value.getChildren(); return children.findIndex((child) => child.id === instanceId); } catch (error) { return -1; } }; const childContext = { id: instanceId, name: name || "anonymous", getChildIndex, emitToParent, getParentExposed, getInstance: () => instance, getExposed }; logger.log(`Child ${name || "anonymous"} registered, looking for parent`); vue.onMounted(() => { let connected = linkParent(); vue.nextTick(() => { connected = linkParent(); if (!connected) { setTimeout(linkParent, 500); } }); }); vue.onUnmounted(() => { var _a2; if ((_a2 = parentRef.value) == null ? void 0 : _a2.removeChild) { parentRef.value.removeChild(instanceId); } logger.log(`Child ${name || "anonymous"} unmounted`); }); return { childId: instanceId, childName: name || "anonymous", childIndex: vue.computed(getChildIndex), parent: parentRef, emitToParent, getParentExposed, parentExposed: vue.computed(() => parentExposed.value), getExposed }; } const THEME_STORAGE_KEY = "uview-pro-theme"; const DARK_MODE_STORAGE_KEY = "uview-pro-dark-mode"; const themesRef = configProvider.themesRef; const currentTheme = configProvider.currentThemeRef; const darkModeRef = configProvider.darkModeRef; function saveThemeToStorage(themeName) { try { uni.setStorageSync(THEME_STORAGE_KEY, themeName); } catch (e) { console.warn("[useTheme] failed to write storage", e); } } function saveDarkModeToStorage(mode) { try { uni.setStorageSync(DARK_MODE_STORAGE_KEY, mode); } catch (e) { console.warn("[useTheme] failed to write storage", e); } } function setTheme(themeName) { configProvider.setTheme(themeName); currentTheme.value = configProvider.getCurrentTheme(); saveThemeToStorage(themeName); } function getCurrentTheme() { return currentTheme.value || configProvider.getCurrentTheme(); } function getAvailableThemes() { return configProvider.getThemes(); } function initTheme(themes, defaultConfig, isForce) { if (Array.isArray(themes) && themes.length > 0) { configProvider.initTheme(themes, defaultConfig, isForce); return; } configProvider.initTheme(defaultThemes, defaultConfig); } function initDarkMode(darkMode, isForce) { configProvider.initDarkMode(darkMode, isForce); } function getDarkMode() { return configProvider.getDarkMode(); } function setDarkMode(mode) { configProvider.setDarkMode(mode); darkModeRef.value = mode; saveDarkModeToStorage(mode); } function isInDarkMode() { return configProvider.isInDarkMode(); } function toggleDarkMode() { const current = getDarkMode(); const nextMode = current === "dark" ? "light" : "dark"; setDarkMode(nextMode); } function useTheme() { return { // 响应式引用 currentTheme, themes: themesRef, darkMode: darkModeRef, cssVars: configProvider.cssVarsRef, // 主题相关方法 initTheme, setTheme, getCurrentTheme, getAvailableThemes, // 暗黑模式相关方法 initDarkMode, getDarkMode, setDarkMode, isInDarkMode, toggleDarkMode }; } function useLocale(namespace) { const createTranslateFunction = (ns) => { return (key, replacements, localeName) => { const fullKey = ns ? `${ns}.${key}` : key; return configProvider.t(fullKey, replacements, localeName); }; }; return { // 响应式引用 currentLocale: configProvider.currentLocaleRef, locales: configProvider.localesRef, // 方法 t: createTranslateFunction(namespace), setLocale: (name) => configProvider.setLocale(name), getLocales: () => configProvider.getLocales(), getCurrentLocale: () => configProvider.getCurrentLocale(), initLocales: (locales, defaultLocaleName, isForce) => configProvider.initLocales(locales, defaultLocaleName, isForce) }; } const U_TOAST_EVENT_SHOW = "uview-pro:u-toast:show"; const U_TOAST_EVENT_HIDE = "uview-pro:u-toast:hide"; const U_TOAST_GLOBAL_EVENT_SHOW = "uview-pro:u-toast:global:show"; const U_TOAST_GLOBAL_EVENT_HIDE = "uview-pro:u-toast:global:hide"; const U_MODAL_EVENT_SHOW = "uview-pro:u-modal:show"; const U_MODAL_EVENT_HIDE = "uview-pro:u-modal:hide"; const U_MODAL_EVENT_CLEAR_LOADING = "uview-pro:u-modal:clear-loading"; const U_MODAL_GLOBAL_EVENT_SHOW = "uview-pro:u-modal:global:show"; const U_MODAL_GLOBAL_EVENT_HIDE = "uview-pro:u-modal:global:hide"; const U_MODAL_GLOBAL_EVENT_CLEAR_LOADING = "uview-pro:u-modal:global:clear-loading"; function formatPrice(number2, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") { function round(num, precision) { const factor = Math.pow(10, precision); return (Math.round(num * factor) / factor).toFixed(precision); } let numStr = String(number2).replace(/[^0-9+\-Ee.]/g, ""); const n = !isFinite(+numStr) ? 0 : +numStr; const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals); const sep = thousandsSeparator ?? ","; const dec = decimalPoint ?? "."; let s = []; s = (prec ? round(n, prec) : Math.round(n).toString()).split("."); const re = /(-?\d+)(\d{3})/; while (re.test(s[0])) { s[0] = s[0].replace(re, `$1${sep}$2`); } if ((s[1] || "").length < prec) { s[1] = s[1] || ""; s[1] += "0".repeat(prec - s[1].length); } return s.join(dec); } function formatName(name) { if (name.length === 2) { return name.charAt(0) + "*"; } else if (name.length > 2) { const masked = "*".repeat(name.length - 2); return name.charAt(0) + masked + name.charAt(name.length - 1); } else { return name; } } function addStyle(customStyle, target = "object") { if (test$1.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") { return customStyle; } if (target === "object") { const trimmedStyle = trim(customStyle); const styleArray = trimmedStyle.split(";"); const style = {}; for (let i = 0; i < styleArray.length; i++) { if (styleArray[i]) { const item = styleArray[i].split(":"); if (item.length === 2) { style[trim(item[0])] = trim(item[1]); } } } return style; } let string2 = ""; for (const i in customStyle) { if (Object.prototype.hasOwnProperty.call(customStyle, i)) { const key = i.replace(/([A-Z])/g, "-$1").toLowerCase(); string2 += `${key}:${customStyle[i]};`; } } return trim(string2); } function toStyle(...styles) { if (styles.length === 1 && Array.isArray(styles[0])) { styles = styles[0].slice(); } const map = /* @__PURE__ */ new Map(); const processString = (str) => { if (!str) return; const parts = str.split(";"); for (let part of parts) { part = part.trim(); if (!part) continue; const idx = part.indexOf(":"); if (idx === -1) continue; const key = trim(part.slice(0, idx)); const val = trim(part.slice(idx + 1)); if (key === "" || val === "") continue; const k = kebabCase(key); map.set(k, val); } }; const processObject = (obj) => { if (!obj) return; Object.keys(obj).forEach((key) => { const val = obj[key]; if (val == null || val === "") return; const k = kebabCase(key); map.set(k, val); }); }; for (const item of styles) { if (item == null || item === "") continue; if (test$1.string(item)) { processString(item); } else if (test$1.array(item)) { item.forEach((el) => { if (test$1.string(el)) processString(el); else if (test$1.object(el)) processObject(el); }); } else if (test$1.object(item)) { processObject(item); } } if (map.size === 0) return ""; const result = Array.from(map.entries()).map(([k, v]) => `${k}:${String(v)}`).join(";"); return result ? result.endsWith(";") ? result : result + ";" : ""; } function kebabCase(word) { const newWord = word.replace(/[A-Z]/g, function(match) { return "-" + match; }).toLowerCase(); return newWord; } function sleep$1(value = 30) { return new Promise((resolve2) => { setTimeout(() => { resolve2(true); }, value); }); } const $u = { queryParams, route, timeFormat, date: timeFormat, // 另名date timeFrom, colorGradient: colorGradients.colorGradient, colorToRgba: colorGradients.colorToRgba, guid, color, getColor, setColor, sys, os, type2icon, randomArray, hexToRgb: colorGradients.hexToRgb, rgbToHex: colorGradients.rgbToHex, test: test$1, random, deepClone, deepMerge: deepMerge$1, getParent: getParent$1, $parent, clipboard, addUnit: addUnit$1, trim, type: ["primary", "success", "error", "warning", "info"], http: httpInstance, toast, config: config$2, // uView配置信息相关,比如版本号 zIndex, debounce, throttle, mitt: mitt(), getRect, formatPrice, formatName, addStyle, toStyle, kebabCase, sleep: sleep$1 }; const ConfigProviderProps = { ...baseProps, /** * 主题风格,可选值: * - 'light': 强制亮色模式(默认) * - 'dark': 强制暗黑模式 * - 'auto': 自动跟随系统设置 */ darkMode: { type: String, default: () => config$2.defaultDarkMode }, /** * 当前主题名称(用于多主题切换) */ currentTheme: { type: String, default: () => { var _a2; return ((_a2 = configProvider.getCurrentTheme()) == null ? void 0 : _a2.name) ?? config$2.defaultTheme; } }, /** * 自定义主题列表 */ themes: { type: Array, default: () => configProvider.getThemes() }, /** * 国际化配置:传入 locale 列表(数组)并可指定默认语言 currentLocale */ locales: { type: Array, default: () => [] }, currentLocale: { type: String, default: () => { var _a2; return ((_a2 = configProvider.getCurrentLocale()) == null ? void 0 : _a2.name) ?? ""; } } }; const __default__$p = { name: "u-config-provider", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1x = /* @__PURE__ */ vue.defineComponent({ ...__default__$p, props: ConfigProviderProps, emits: ["theme-change", "mode-change"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const emit = __emit; const darkMode = vue.computed(() => configProvider.isInDarkMode() ? "dark" : "light"); const bootstrapTheme = () => { const existingThemes = configProvider.getThemes(); if (existingThemes.length > 0) { if (props.currentTheme) { configProvider.setTheme(props.currentTheme); } if (props.darkMode) { configProvider.setDarkMode(props.darkMode); } return; } if (props.themes && props.themes.length) { configProvider.initTheme(props.themes, props.currentTheme); } else { const { initTheme: initTheme2 } = useTheme(); initTheme2(void 0, props.currentTheme); } if (props.currentTheme) { configProvider.setTheme(props.currentTheme); } if (props.darkMode) { configProvider.setDarkMode(props.darkMode); } }; const bootstrapLocale = () => { try { const { initLocales, setLocale: setLocale2, getLocales } = useLocale(); const existingLocales = getLocales(); if (existingLocales.length > 0) { if (props.currentLocale) { setLocale2(props.currentLocale); } } else { if (props.locales && props.locales.length) { initLocales(props.locales, props.currentLocale); } else { initLocales(void 0, props.currentLocale); } } } catch (e) { console.warn("[u-config-provider] init locales failed", e); } }; vue.onMounted(() => { bootstrapTheme(); bootstrapLocale(); }); vue.watch( () => props.themes, (val) => { if (val && val.length && val !== configProvider.themesRef.value) { configProvider.initTheme(val, props.currentTheme); } }, { deep: true } ); vue.watch( () => props.currentTheme, (val) => { if (val) { configProvider.setTheme(val); } } ); vue.watch( () => props.darkMode, (val) => { if (val && val !== configProvider.getDarkMode()) { configProvider.setDarkMode(val); emit("mode-change", darkMode.value); } } ); vue.watch( () => props.locales, (val) => { if (val && val.length) { const { initLocales } = useLocale(); initLocales(val, props.currentLocale); } }, { deep: true } ); vue.watch( () => props.currentLocale, (val) => { if (val) { const { setLocale: setLocale2 } = useLocale(); setLocale2(val); } } ); vue.watch( () => configProvider.currentThemeRef.value, (val, oldVal) => { if (val && val.name !== (oldVal == null ? void 0 : oldVal.name)) { emit("theme-change", val.name); } }, { immediate: true } ); vue.watch( () => configProvider.darkModeRef.value, () => { emit("mode-change", darkMode.value); } ); const mergedThemeStyle = vue.computed(() => { return $u.toStyle(configProvider.cssVarsRef.value, props.customStyle); }); const __returned__ = { props, emit, darkMode, bootstrapTheme, bootstrapLocale, mergedThemeStyle }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-config-provider", `u-theme-${$setup.darkMode}`, _ctx.customClass]), style: vue.normalizeStyle($setup.mergedThemeStyle) }, [ vue.renderSlot(_ctx.$slots, "default") ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-config-provider/u-config-provider.vue"]]); const GapProps = { ...baseProps, /** 背景颜色 */ bgColor: { type: String, default: "transparent" }, /** 高度 */ height: { type: [String, Number], default: 30 }, /** 与上一个组件的距离 */ marginTop: { type: [String, Number], default: 0 }, /** 与下一个组件的距离 */ marginBottom: { type: [String, Number], default: 0 } }; const install = (app, options) => { var _a2, _b2, _c; try { if (options) { if (options == null ? void 0 : options.theme) { const optTheme = options.theme; if (Array.isArray(optTheme)) { initTheme(optTheme); } else if (typeof optTheme === "object" && optTheme.themes) { initTheme( optTheme.themes, { defaultTheme: optTheme.defaultTheme, defaultDarkMode: optTheme.defaultDarkMode }, optTheme.isForce ); } else { const defaultTheme = defaultThemes[0]; if (defaultTheme) { const mergedTheme = { ...defaultTheme, color: { ...defaultTheme.color, ...optTheme } }; initTheme([mergedTheme], defaultTheme.name); } } } else { initTheme(); } try { if (options == null ? void 0 : options.locale) { const optLocale = options.locale; if (typeof optLocale === "string") { configProvider.initLocales(void 0, optLocale); } else if (Array.isArray(optLocale)) { configProvider.initLocales(optLocale); } else if (optLocale && typeof optLocale === "object") { configProvider.initLocales(optLocale.locales, optLocale.defaultLocale, optLocale.isForce); } else { configProvider.initLocales(); } } else { configProvider.initLocales(); } } catch (e) { console.error("[install locales] Error:", e); } logger.setDebugMode(((_a2 = options == null ? void 0 : options.log) == null ? void 0 : _a2.debug) ?? false).setPrefix(((_b2 = options == null ? void 0 : options.log) == null ? void 0 : _b2.prefix) || "").setShowCallerInfo(((_c = options == null ? void 0 : options.log) == null ? void 0 : _c.showCallerInfo) ?? true); } else { initTheme(); configProvider.initLocales(); } } catch (error) { console.error("[install options] Error:", error); } uni.$u = $u; app.config.globalProperties.$u = $u; }; const uViewPro = { install }; const __default__$o = { name: "u-gap", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1w = /* @__PURE__ */ vue.defineComponent({ ...__default__$o, props: GapProps, setup(__props, { expose: __expose }) { __expose(); const props = __props; const gapStyle = vue.computed(() => { return { backgroundColor: props.bgColor, height: $u.addUnit(props.height), marginTop: $u.addUnit(props.marginTop), marginBottom: $u.addUnit(props.marginBottom) }; }); const __returned__ = { props, gapStyle, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-gap", style: vue.normalizeStyle($setup.$u.toStyle($setup.gapStyle, _ctx.customStyle)) }, null, 4 /* STYLE */ ); } const __unplugin_components_2$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-6c90497d"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-gap/u-gap.vue"]]); const BadgeProps = { ...baseProps, /** 使用预设的背景颜色 primary,warning,success,error,info */ type: { type: String, default: "error" }, /** Badge的尺寸,default, mini */ size: { type: String, default: "default" }, /** 是否是圆点 */ isDot: { type: Boolean, default: false }, /** 显示的数值内容 */ count: { type: [Number, String], default: void 0 }, /** 展示封顶的数字值 */ overflowCount: { type: Number, default: 99 }, /** 当数值为 0 时,是否展示 Badge */ showZero: { type: Boolean, default: false }, /** 位置偏移 [number, number] */ offset: { type: Array, default: () => [20, 20] }, /** 是否开启绝对定位,开启了offset才会起作用 */ absolute: { type: Boolean, default: true }, /** 字体大小 */ fontSize: { type: [String, Number], default: "24" }, /** 字体颜色 */ color: { type: String, default: "var(--u-white-color)" }, /** badge的背景颜色 */ bgColor: { type: String, default: "" }, /** 是否让badge组件的中心点和父组件右上角重合,配置的话,offset将会失效 */ isCenter: { type: Boolean, default: false } }; const __default__$n = { name: "u-badge", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1v = /* @__PURE__ */ vue.defineComponent({ ...__default__$n, props: BadgeProps, setup(__props, { expose: __expose }) { __expose(); const props = __props; const boxStyle = vue.computed(() => { let style = {}; if (props.isCenter) { style.top = 0; style.right = 0; style.transform = "translateY(-50%) translateX(50%)"; } else { style.top = props.offset[0] + "rpx"; style.right = props.offset[1] + "rpx"; style.transform = "translateY(0) translateX(0)"; } if (props.size === "mini") { style.transform = style.transform + " scale(0.8)"; } return style; }); const showText = vue.computed(() => { if (props.isDot) return ""; else { if (Number(props.count) > props.overflowCount) return `${props.overflowCount}+`; else return props.count; } }); const show = vue.computed(() => { if (Number(props.count) === 0 && props.showZero === false) return false; else return true; }); const __returned__ = { props, boxStyle, showText, show, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) { return $setup.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-badge", [ _ctx.isDot ? "u-badge-dot" : "", _ctx.size === "mini" ? "u-badge-mini" : "", _ctx.type ? "u-badge--bg--" + _ctx.type : "", _ctx.customClass ]]), style: vue.normalizeStyle( $setup.$u.toStyle( { top: _ctx.offset[0] + "rpx", right: _ctx.offset[1] + "rpx", fontSize: _ctx.fontSize + "rpx", position: _ctx.absolute ? "absolute" : "static", color: _ctx.color, backgroundColor: _ctx.bgColor }, $setup.boxStyle, _ctx.customStyle ) ) }, vue.toDisplayString($setup.showText), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __unplugin_components_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-8337ffeb"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-badge/u-badge.vue"]]); const IconProps = { ...baseProps, /** 图标名称,见示例图标集 */ name: { type: String, default: "" }, /** 图标颜色,可接受主题色 */ color: { type: String, default: "" }, /** 字体大小,单位rpx(默认32) */ size: { type: [Number, String], default: "inherit" }, /** 是否显示粗体 */ bold: { type: Boolean, default: false }, /** 点击图标的时候传递事件出去的index(用于区分点击了哪一个) */ index: { type: [Number, String], default: "" }, /** 触摸图标时的类名 */ hoverClass: { type: String, default: "" }, /** 自定义扩展前缀,方便用户扩展自己的图标库 */ customPrefix: { type: String, default: "uicon" }, /** 图标右边或者下面的文字 */ label: { type: [String, Number], default: "" }, /** label的位置,只能右边或者下边 */ labelPos: { type: String, default: "right" }, /** label的大小,单位rpx(默认28) */ labelSize: { type: [String, Number], default: "28" }, /** label的颜色 */ labelColor: { type: String, default: "var(--u-content-color)" }, /** label与图标的距离(横向排列),单位rpx(默认6) */ marginLeft: { type: [String, Number], default: "6" }, /** label与图标的距离(竖向排列),单位rpx(默认6) */ marginTop: { type: [String, Number], default: "6" }, /** label与图标的距离(竖向排列),单位rpx(默认6) */ marginRight: { type: [String, Number], default: "6" }, /** label与图标的距离(竖向排列),单位rpx(默认6) */ marginBottom: { type: [String, Number], default: "6" }, /** label与图标的距离,单位rpx,权重高于 margin */ space: { type: [String, Number], default: "" }, /** 图片的mode,参考uni-app image组件 */ imgMode: { type: String, default: "widthFix" }, /** 用于显示图片小图标时,图片的宽度,单位rpx */ width: { type: [String, Number], default: "" }, /** 用于显示图片小图标时,图片的高度,单位rpx */ height: { type: [String, Number], default: "" }, /** 用于解决某些情况下,让图标垂直居中的用途,单位rpx */ top: { type: [String, Number], default: 0 }, /** 是否为DecimalIcon */ showDecimalIcon: { type: Boolean, default: false }, /** 背景颜色,可接受主题色,仅Decimal时有效 */ inactiveColor: { type: String, default: "var(--u-divider-color)" }, /** 显示的百分比,仅Decimal时有效 */ percent: { type: [Number, String], default: "50" } }; const __default__$m = { name: "u-icon", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1u = /* @__PURE__ */ vue.defineComponent({ ...__default__$m, props: IconProps, emits: ["click", "touchstart"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const emit = __emit; const props = __props; const iconClass = vue.computed(() => { let classes = []; classes.push(props.customPrefix + "-" + props.name); if (props.customPrefix === "uicon") { classes.push("u-iconfont"); } else { classes.push(props.customPrefix); } if (props.showDecimalIcon && props.inactiveColor && $u.config.type.includes(props.inactiveColor)) { classes.push("u-icon__icon--" + props.inactiveColor); } else if (props.color && $u.config.type.includes(props.color)) { classes.push("u-icon__icon--" + props.color); } return classes; }); const iconStyle = vue.computed(() => { const style = { fontSize: props.size === "inherit" ? "inherit" : $u.addUnit(props.size), fontWeight: props.bold ? "bold" : "normal", // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中 top: $u.addUnit(props.top) }; if (props.showDecimalIcon && props.inactiveColor && !$u.config.type.includes(props.inactiveColor)) { style.color = props.inactiveColor; } else if (props.color && !$u.config.type.includes(props.color)) { style.color = props.color; } return style; }); const isImg = vue.computed(() => { return props.name.indexOf("/") !== -1; }); const imgStyle = vue.computed(() => { const style = { width: props.width ? $u.addUnit(props.width) : $u.addUnit(props.size), height: props.height ? $u.addUnit(props.height) : $u.addUnit(props.size) }; return style; }); const decimalIconStyle = vue.computed(() => { const style = { fontSize: props.size === "inherit" ? "inherit" : $u.addUnit(props.size), fontWeight: props.bold ? "bold" : "normal", // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中 top: $u.addUnit(props.top), width: props.percent + "%" }; if (props.color && !$u.config.type.includes(props.color)) { style.color = props.color; } return style; }); const decimalIconClass = vue.computed(() => { let classes = []; classes.push(props.customPrefix + "-" + props.name); if (props.customPrefix === "uicon") { classes.push("u-iconfont"); } else { classes.push(props.customPrefix); } if (props.color && $u.config.type.includes(props.color)) { classes.push("u-icon__icon--" + props.color); } else { classes.push("u-icon__icon--primary"); } return classes; }); const labelStyle = vue.computed(() => { return { color: props.labelColor, fontSize: $u.addUnit(props.labelSize), marginLeft: props.labelPos === "right" ? $u.addUnit(props.space || props.marginLeft) : 0, marginTop: props.labelPos === "bottom" ? $u.addUnit(props.space || props.marginTop) : 0, marginRight: props.labelPos === "left" ? $u.addUnit(props.space || props.marginRight) : 0, marginBottom: props.labelPos === "top" ? $u.addUnit(props.space || props.marginBottom) : 0 }; }); function onClick(event) { emit("click", props.index || event); } function onTouchstart(event) { emit("touchstart", props.index || event); } const __returned__ = { emit, props, iconClass, iconStyle, isImg, imgStyle, decimalIconStyle, decimalIconClass, labelStyle, onClick, onTouchstart, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { style: vue.normalizeStyle($setup.$u.toStyle(_ctx.customStyle)), class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos, _ctx.customClass]]), onClick: $setup.onClick }, [ $setup.isImg ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "u-icon__img", src: $setup.props.name, mode: _ctx.imgMode, style: vue.normalizeStyle([$setup.imgStyle]) }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: vue.normalizeClass(["u-icon__icon", $setup.iconClass]), style: vue.normalizeStyle($setup.$u.toStyle($setup.iconStyle)), "hover-class": _ctx.hoverClass, onTouchstart: $setup.onTouchstart }, [ _ctx.showDecimalIcon ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, style: vue.normalizeStyle($setup.$u.toStyle($setup.decimalIconStyle)), class: vue.normalizeClass([$setup.decimalIconClass, "u-icon__decimal"]), "hover-class": _ctx.hoverClass }, null, 14, ["hover-class"])) : vue.createCommentVNode("v-if", true) ], 46, ["hover-class"])), _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "u-icon__label", style: vue.normalizeStyle($setup.labelStyle) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-b85e76d0"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-icon/u-icon.vue"]]); const TabbarProps = { ...baseProps, /** 是否显示tabbar */ show: { type: Boolean, default: true }, /** v-model绑定当前激活项的值 */ modelValue: { type: [String, Number], default: 0 }, /** tabbar背景色 */ bgColor: { type: String, default: "var(--u-bg-white)" }, /** tabbar高度,单位任意,数值默认rpx */ height: { type: [String, Number], default: "50px" }, /** 非凸起图标的大小,单位任意,数值默认rpx */ iconSize: { type: [String, Number], default: 40 }, /** 凸起图标的大小,单位任意,数值默认rpx */ midButtonSize: { type: [String, Number], default: 100 }, /** 文本大小,单位任意,数值默认rpx */ textSize: { type: [String, Number], default: 26 }, /** 激活时的颜色 */ activeColor: { type: String, default: "var(--u-main-color)" }, /** 未激活时的颜色 */ inactiveColor: { type: String, default: "var(--u-content-color)" }, /** 是否显示中部凸起按钮 */ midButton: { type: Boolean, default: false }, /** tabbar配置项数组 */ list: { type: Array, default: () => [] }, /** 切换前回调,返回true或Promise */ beforeSwitch: { type: Function, default: null }, /** 是否显示顶部横线 */ borderTop: { type: Boolean, default: true }, /** 是否隐藏原生tabbar */ hideTabBar: { type: Boolean, default: true }, /** z-index层级 */ zIndex: { type: [String, Number], default: zIndex.tabbar }, /** icon和text的间距,单位任意,数值默认rpx */ gap: { type: [String, Number], default: 8 } }; const __default__$l = { name: "u-tabbar", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1t = /* @__PURE__ */ vue.defineComponent({ ...__default__$l, props: TabbarProps, emits: ["change", "update:modelValue"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const emit = __emit; const uZIndex = vue.computed(() => (props == null ? void 0 : props.zIndex) ?? $u.zIndex.tabbar); const midButtonLeft = vue.ref("50%"); const pageUrl = vue.ref(""); vue.onMounted(() => { if (props.hideTabBar) uni.hideTabBar(); const pages = getCurrentPages(); pageUrl.value = pages[pages.length - 1].route; if (props.midButton) getMidButtonLeft(); }); const elIconPath = vue.computed(() => { return (index) => { var _a2; const pagePath = (_a2 = props.list[index]) == null ? void 0 : _a2.pagePath; if (pagePath) { if (pagePath === pageUrl.value || pagePath === "/" + pageUrl.value) { return props.list[index].selectedIconPath; } else { return props.list[index].iconPath; } } else { return index == props.modelValue ? props.list[index].selectedIconPath : props.list[index].iconPath; } }; }); const elColor = vue.computed(() => { return (index) => { var _a2; const pagePath = (_a2 = props.list[index]) == null ? void 0 : _a2.pagePath; if (pagePath) { if (pagePath === pageUrl.value || pagePath === "/" + pageUrl.value) return props.activeColor; else return props.inactiveColor; } else { return index == props.modelValue ? props.activeColor : props.inactiveColor; } }; }); function getCustomPrefix(index) { var _a2; const customIcon = (_a2 = props.list[index]) == null ? void 0 : _a2.customIcon; if (customIcon === void 0 || customIcon === null || customIcon === "") { return "uicon"; } if (typeof customIcon === "string") { return customIcon; } if (typeof customIcon === "boolean") { return customIcon ? "custom-icon" : "uicon"; } return "uicon"; } async function clickHandler(index) { if (props.beforeSwitch && typeof props.beforeSwitch === "function") { let beforeSwitchResult = props.beforeSwitch(index); if (typeof beforeSwitchResult === "object" && beforeSwitchResult !== null && typeof beforeSwitchResult.then === "function") { await beforeSwitchResult.then(() => { switchTab(index); }).catch(() => { }); } else if (beforeSwitchResult === true) { switchTab(index); } } else { switchTab(index); } } function switchTab(index) { var _a2; emit("change", index); if ((_a2 = props.list[index]) == null ? void 0 : _a2.pagePath) { uni.switchTab({ url: props.list[index].pagePath }); } else { emit("update:modelValue", index); } } function getOffsetRight(count, isDot) { if (isDot) { return -20; } else if (count > 9) { return -40; } else { return -30; } } function getBadgeOffsetTop(count, isDot) { return -2; } function getIconSize(index) { const item = props.list[index] || {}; if (props.midButton && item.midButton) { return props.midButtonSize; } if (item.iconSize !== void 0 && item.iconSize !== null && item.iconSize !== "") { return item.iconSize; } return props.iconSize; } function getTextSize(index) { const item = props.list[index] || {}; if (item.textSize !== void 0 && item.textSize !== null && item.textSize !== "") { return item.textSize; } return props.textSize; } function getMidButtonLeft() { const windowWidth2 = $u.sys().windowWidth; midButtonLeft.value = windowWidth2 / 2 + "px"; } function containerStyle(index) { const style = {}; const item = props.list[index] || {}; if (props.midButton && item.midButton) { const iconSizeRaw = getIconSize(index); const numericSize = parseFloat(String(iconSizeRaw)) || parseFloat(String(props.midButtonSize)) || 100; style.paddingTop = $u.addUnit(numericSize / 2 + 8); style.boxSizing = "border-box"; } return $u.toStyle(style); } const __returned__ = { props, emit, uZIndex, midButtonLeft, pageUrl, elIconPath, elColor, getCustomPrefix, clickHandler, switchTab, getOffsetRight, getBadgeOffsetTop, getIconSize, getTextSize, getMidButtonLeft, containerStyle, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_badge = __unplugin_components_0$6; const _component_u_gap = __unplugin_components_2$5; return $setup.props.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-tabbar", _ctx.customClass]), style: vue.normalizeStyle($setup.$u.toStyle(_ctx.customStyle)), onTouchmove: vue.withModifiers(() => { }, ["stop", "prevent"]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-tabbar__content safe-area-inset-bottom", { "u-border-top": $setup.props.borderTop }]), style: vue.normalizeStyle({ height: $setup.$u.addUnit($setup.props.height), backgroundColor: $setup.props.bgColor, zIndex: $setup.uZIndex }) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.props.list, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-tabbar__content__item", { "u-tabbar__content__circle": $setup.props.midButton && item.midButton }]), key: index, onClick: vue.withModifiers(($event) => $setup.clickHandler(index), ["stop"]), style: vue.normalizeStyle({ backgroundColor: $setup.props.bgColor }) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-tabbar__content__item__container", { "u-tabbar__content__circle__container": $setup.props.midButton && item.midButton }]), style: vue.normalizeStyle($setup.containerStyle(index)) }, [ item.iconPath || item.selectedIconPath ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass([ $setup.props.midButton && item.midButton ? "u-tabbar__content__circle__icon" : "u-tabbar__content__item__icon" ]) }, [ vue.createVNode(_component_u_icon, { size: $setup.getIconSize(index), name: $setup.elIconPath(index), "img-mode": "scaleToFill", color: $setup.elColor(index), "custom-prefix": $setup.getCustomPrefix(index) }, null, 8, ["size", "name", "color", "custom-prefix"]), item.count || item.isDot ? (vue.openBlock(), vue.createBlock(_component_u_badge, { key: 0, count: item.count, "is-dot": item.isDot, offset: [ $setup.getBadgeOffsetTop(item.count || 0, item.isDot || false), $setup.getOffsetRight(item.count || 0, item.isDot || false) ] }, null, 8, ["count", "is-dot", "offset"])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_gap, { height: _ctx.gap }, null, 8, ["height"]), item.text ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["u-tabbar__content__item__text", { "u-tabbar__content__item__text--center": item.text && !(item.iconPath || item.selectedIconPath) }]) }, [ vue.createElementVNode( "text", { class: "u-line-1", style: vue.normalizeStyle({ color: $setup.elColor(index), fontSize: $setup.$u.addUnit($setup.getTextSize(index)) }) }, vue.toDisplayString(item.text), 5 /* TEXT, STYLE */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ) ], 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), $setup.props.midButton ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-tabbar__content__circle__border", { "u-border": $setup.props.borderTop }]), style: vue.normalizeStyle({ backgroundColor: $setup.props.bgColor, left: $setup.midButtonLeft }) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ), vue.createCommentVNode(" 这里加上一个48rpx的高度,是为了增高有凸起按钮时的防塌陷高度(也即按钮凸出来部分的高度) "), vue.createCommentVNode(" calc 计算0时单位不一致会计算失败,这里+1px "), vue.createElementVNode( "view", { class: "u-fixed-placeholder safe-area-inset-bottom", style: vue.normalizeStyle({ height: `calc(${$setup.$u.addUnit($setup.props.height)} + ${$setup.props.midButton ? "60rpx" : "1px"})` }) }, null, 4 /* STYLE */ ) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const __unplugin_components_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-bf3787de"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-tabbar/u-tabbar.vue"]]); const theme = [ { "name": "melbet", "label": "橙色", "description": "黑橙", "color": { "primary": "#f8b932", "primaryDark": "#c69428", "primaryDisabled": "#f5dba3", "primaryLight": "#fef2da", "bgColor": "#f3f4f6", "bgWhite": "#ffffff", "bgGrayLight": "#f1f1f1", "bgGrayDark": "#2f343c", "bgBlack": "#212121", "info": "#909399", "infoDark": "#82848a", "infoDisabled": "#c8c9cc", "infoLight": "#f4f4f5", "warning": "#ff9900", "warningDark": "#f29100", "warningDisabled": "#fcbd71", "warningLight": "#fdf6ec", "error": "#fa3534", "errorDark": "#dd6161", "errorDisabled": "#fab6b6", "errorLight": "#fef0f0", "success": "#19be6b", "successDark": "#18b566", "successDisabled": "#71d5a1", "successLight": "#dbf1e1", "mainColor": "#303133", "contentColor": "#606266", "tipsColor": "#909399", "lightColor": "#c0c4cc", "borderColor": "#dcdfe6", "whiteColor": "#ffffff", "blackColor": "#000000", "dividerColor": "#ebeef5", "maskColor": "rgba(0, 0, 0, 0.4)", "shadowColor": "rgba(0, 0, 0, 0.1)" }, "darkColor": {} } ]; const _sfc_main$1s = { __name: "App.ku", setup(__props, { expose: __expose }) { __expose(); const currentPath = vue.computed(() => { const pages = getCurrentPages(); if (pages && pages.length > 0) { return "/" + pages[pages.length - 1].route; } return "/"; }); const paths = vue.ref([ "/", "/pages/Tabbar/Home/index", "/pages/Tabbar/SportsBetting/index", "/pages/Tabbar/WorldCup/index", "/pages/Tabbar/Entertainment/index", "/pages/Tabbar/My/index" ]); const list2 = vue.ref([ { iconPath: "/static/images/tabbar/g1.png", selectedIconPath: "/static/images/tabbar/g.png", pagePath: "/pages/Tabbar/Home/index", text: uni.$t("首页"), customIcon: false }, { iconPath: "/static/images/tabbar/b.png", selectedIconPath: "/static/images/tabbar/b1.png", pagePath: "/pages/Tabbar/SportsBetting/index", text: uni.$t("体育博彩"), customIcon: false }, { // 中间凸起大按钮 iconPath: "/static/images/sjb.gif", selectedIconPath: "/static/images/sjb.gif", text: "", // 纯图标,不设文字 midButton: true, // 核心属性:标记为凸起按钮 customIcon: false, // 如果点击中间按钮不需要跳转特定页面(例如弹出层),不写 pagePath 即可 // 如果需要跳转,加上 pagePath: "/pages/XXX" 即可 pagePath: "/pages/Tabbar/WorldCup/index" }, { iconPath: "/static/images/tabbar/j.png", selectedIconPath: "/static/images/tabbar/j1.png", pagePath: "/pages/Tabbar/Entertainment/index", text: uni.$t("彩票"), customIcon: false }, { iconPath: "/static/images/tabbar/h1.png", selectedIconPath: "/static/images/tabbar/h.png", pagePath: "/pages/Tabbar/My/index", text: uni.$t("我的"), customIcon: false } ]); const __returned__ = { currentPath, paths, list: list2, get themes() { return theme; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabbar = __unplugin_components_0$4; const _component_u_config_provider = __unplugin_components_1$2; return vue.openBlock(), vue.createBlock(_component_u_config_provider, { "current-theme": "melbet", themes: $setup.themes }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), vue.createVNode(_component_u_tabbar, { style: vue.normalizeStyle({ display: $setup.paths.includes($setup.currentPath) ? "flex" : "none" }), list: $setup.list, "mid-button": true, "active-color": "#f8b932", "inactive-color": "#999999", "bg-color": "#FFFFFF", "icon-size": "35", "mid-button-size": "110", "text-size": "22" }, null, 8, ["style", "list"]) ]), _: 3 /* FORWARDED */ }, 8, ["themes"]); } const GlobalKuRoot = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-4c3bdea0"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/App.ku.vue"]]); const MaskProps = { ...baseProps, /** 是否显示遮罩 */ show: { type: Boolean, default: false }, /** 层级z-index */ zIndex: { type: [Number, String], default: "" }, /** 遮罩的动画样式,是否使用zoom进行scale进行缩放 */ zoom: { type: Boolean, default: true }, /** 遮罩的过渡时间,单位为ms */ duration: { type: [Number, String], default: 300 }, /** 是否可以通过点击遮罩进行关闭 */ maskClickAble: { type: Boolean, default: true } }; const __default__$k = { name: "u-mask", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1r = /* @__PURE__ */ vue.defineComponent({ ...__default__$k, props: MaskProps, emits: ["click"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const emit = __emit; const zoomStyle = vue.ref({ transform: "" }); const scale = "scale(1.2, 1.2)"; vue.watch( () => props.show, (n) => { if (n && props.zoom) { zoomStyle.value.transform = "scale(1, 1)"; } else if (!n && props.zoom) { zoomStyle.value.transform = scale; } } ); const maskStyle = vue.computed(() => { let style = {}; style.backgroundColor = "rgba(0, 0, 0, 0.6)"; if (props.show) style.zIndex = props.zIndex ? props.zIndex : $u.zIndex.mask; else style.zIndex = -1; style.transition = `all ${Number(props.duration) / 1e3}s ease-in-out`; return style; }); function click2() { if (!props.maskClickAble) return; emit("click"); } const __returned__ = { props, emit, zoomStyle, scale, maskStyle, click: click2, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-mask", [ { "u-mask-zoom": $setup.props.zoom, "u-mask-show": $setup.props.show }, _ctx.customClass ]]), "hover-stop-propagation": "", style: vue.normalizeStyle($setup.$u.toStyle($setup.maskStyle, $setup.zoomStyle, _ctx.customStyle)), onClick: $setup.click, onTouchmove: vue.withModifiers(() => { }, ["stop", "prevent"]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ ); } const __unplugin_components_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-db7121f0"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-mask/u-mask.vue"]]); const PopupProps = { ...baseProps, /** 显示状态 */ show: { type: Boolean, default: false }, /** 弹出方向,left|right|top|bottom|center */ mode: { type: String, default: "left" }, /** 是否显示遮罩 */ mask: { type: Boolean, default: true }, /** 抽屉的宽度(mode=left|right),或者高度(mode=top|bottom),单位rpx,或者"auto",或者百分比"50%",表示由内容撑开高度或者宽度 */ length: { type: [Number, String], default: "auto" }, /** 是否开启缩放动画,只在mode=center时有效 */ zoom: { type: Boolean, default: true }, /** 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距 */ safeAreaInsetBottom: { type: Boolean, default: false }, /** 是否可以通过点击遮罩进行关闭 */ maskCloseAble: { type: Boolean, default: true }, /** v-model 控制弹窗显示 */ modelValue: { type: Boolean, default: false }, /** 内部参数,解决多层调用报错不能修改props值的问题 */ popup: { type: Boolean, default: true }, /** 圆角 */ borderRadius: { type: [Number, String], default: 0 }, /** 弹窗z-index */ zIndex: { type: [Number, String], default: zIndex.popup }, /** 是否显示关闭图标 */ closeable: { type: Boolean, default: false }, /** 关闭图标的名称,只能uView的内置图标 */ closeIcon: { type: String, default: "close" }, /** 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角 */ closeIconPos: { type: String, default: "top-right" }, /** 关闭图标的颜色 */ closeIconColor: { type: String, default: "var(--u-tips-color)" }, /** 关闭图标的大小,单位rpx */ closeIconSize: { type: [String, Number], default: "30" }, /** 弹窗宽度 */ width: { type: String, default: "" }, /** 弹窗高度 */ height: { type: String, default: "" }, /** 负top定位,支持rpx/px/百分比 */ negativeTop: { type: [String, Number], default: 0 }, /** 遮罩自定义样式 */ maskCustomStyle: { type: Object, default: () => ({}) }, /** 动画时长,单位ms */ duration: { type: [String, Number], default: 250 } }; const __default__$j = { name: "u-popup", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1q = /* @__PURE__ */ vue.defineComponent({ ...__default__$j, props: PopupProps, emits: ["update:modelValue", "open", "close"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const emit = __emit; const visibleSync = vue.ref(false); const showDrawer = vue.ref(false); const timer = vue.ref(null); const closeFromInner = vue.ref(false); const style = vue.computed(() => { let style2 = {}; if (props.mode == "left" || props.mode == "right") { style2 = { width: props.width ? getUnitValue(props.width) : getUnitValue(props.length), height: "100%", transform: `translate3D(${props.mode == "left" ? "-100%" : "100%"},0px,0px)` }; } else if (props.mode == "top" || props.mode == "bottom") { style2 = { width: "100%", height: props.height ? getUnitValue(props.height) : getUnitValue(props.length), transform: `translate3D(0px,${props.mode == "top" ? "-100%" : "100%"},0px)` }; } style2.zIndex = uZIndex.value; if (props.borderRadius) { switch (props.mode) { case "left": style2.borderRadius = `0 ${props.borderRadius}rpx ${props.borderRadius}rpx 0`; break; case "top": style2.borderRadius = `0 0 ${props.borderRadius}rpx ${props.borderRadius}rpx`; break; case "right": style2.borderRadius = `${props.borderRadius}rpx 0 0 ${props.borderRadius}rpx`; break; case "bottom": style2.borderRadius = `${props.borderRadius}rpx ${props.borderRadius}rpx 0 0`; break; } style2.overflow = "hidden"; } if (props.duration) style2.transition = `all ${Number(props.duration) / 1e3}s linear`; return style2; }); const centerStyle = vue.computed(() => { let style2 = {}; style2.width = props.width ? getUnitValue(props.width) : getUnitValue(props.length); style2.height = props.height ? getUnitValue(props.height) : "auto"; style2.zIndex = uZIndex.value; style2.marginTop = `-${$u.addUnit(props.negativeTop)}`; if (props.borderRadius) { style2.borderRadius = `${props.borderRadius}rpx`; style2.overflow = "hidden"; } return style2; }); const uZIndex = vue.computed(() => props.zIndex ? props.zIndex : $u.zIndex.popup); vue.watch( () => props.modelValue, (val) => { if (val) { open2(); } else if (!closeFromInner.value) { close(); } closeFromInner.value = false; } ); vue.onMounted(() => { if (props.modelValue) open2(); }); function getUnitValue(val) { if (/(%|px|rpx|auto)$/.test(String(val))) return val; else return val + "rpx"; } function maskClick() { close(); } function close() { closeFromInner.value = true; change("showDrawer", "visibleSync", false); } function modeCenterClose(mode) { if (mode != "center" || !props.maskCloseAble) return; close(); } function open2() { change("visibleSync", "showDrawer", true); } function change(param1, param2, status) { if (props.popup === true) { emit("update:modelValue", status); } (param1 === "showDrawer" ? showDrawer : visibleSync).value = status; if (status) { vue.nextTick(() => { (param2 === "showDrawer" ? showDrawer : visibleSync).value = status; emit(status ? "open" : "close"); }); } else { timer.value = setTimeout(() => { (param2 === "showDrawer" ? showDrawer : visibleSync).value = status; emit(status ? "open" : "close"); }, Number(props.duration)); } } const __returned__ = { props, emit, visibleSync, showDrawer, timer, closeFromInner, style, centerStyle, uZIndex, getUnitValue, maskClick, close, modeCenterClose, open: open2, change, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_mask = __unplugin_components_2$4; const _component_u_icon = __unplugin_components_0$5; return $setup.visibleSync ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-drawer", _ctx.customClass]), style: vue.normalizeStyle($setup.$u.toStyle({ zIndex: Number($setup.uZIndex) - 1 }, _ctx.customStyle)), "hover-stop-propagation": "" }, [ vue.createVNode(_component_u_mask, { duration: _ctx.duration, "custom-style": _ctx.maskCustomStyle, maskClickAble: _ctx.maskCloseAble, "z-index": Number($setup.uZIndex) - 2, show: $setup.showDrawer && _ctx.mask, onClick: $setup.maskClick }, null, 8, ["duration", "custom-style", "maskClickAble", "z-index", "show"]), vue.createElementVNode( "view", { class: vue.normalizeClass(["u-drawer-content", [ _ctx.safeAreaInsetBottom ? "safe-area-inset-bottom" : "", "u-drawer-" + _ctx.mode, $setup.showDrawer ? "u-drawer-content-visible" : "", _ctx.zoom && _ctx.mode == "center" ? "u-animation-zoom" : "" ]]), onClick: _cache[2] || (_cache[2] = ($event) => $setup.modeCenterClose(_ctx.mode)), onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers(() => { }, ["stop", "prevent"])), style: vue.normalizeStyle([$setup.style]) }, [ _ctx.mode == "center" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-mode-center-box", onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => { }, ["stop", "prevent"])), onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => { }, ["stop", "prevent"])), style: vue.normalizeStyle([$setup.centerStyle]) }, [ _ctx.closeable ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, onClick: $setup.close, class: vue.normalizeClass(["u-close", ["u-close--" + _ctx.closeIconPos]]) }, [ vue.createVNode(_component_u_icon, { name: _ctx.closeIcon, color: _ctx.closeIconColor, size: _ctx.closeIconSize }, null, 8, ["name", "color", "size"]) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("scroll-view", { class: "u-drawer__scroll-view", "scroll-y": true }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]) ], 36 /* STYLE, NEED_HYDRATION */ )) : (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 1, class: "u-drawer__scroll-view", "scroll-y": true }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ])), _ctx.mode != "center" && _ctx.closeable ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, onClick: $setup.close, class: vue.normalizeClass(["u-close", ["u-close--" + _ctx.closeIconPos]]) }, [ vue.createVNode(_component_u_icon, { name: _ctx.closeIcon, color: _ctx.closeIconColor, size: _ctx.closeIconSize }, null, 8, ["name", "color", "size"]) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ ) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __unplugin_components_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-4924bdd9"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-popup/u-popup.vue"]]); const LoadingProps = { ...baseProps, /** 动画的类型 */ mode: { type: String, default: "circle" }, /** 动画的颜色 */ color: { type: String, default: "var(--u-light-color)" }, /** 加载图标的大小,单位rpx */ size: { type: [String, Number], default: "34" }, /** 是否显示动画 */ show: { type: Boolean, default: true } }; const __default__$i = { name: "u-loading", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1p = /* @__PURE__ */ vue.defineComponent({ ...__default__$i, props: LoadingProps, setup(__props, { expose: __expose }) { __expose(); const props = __props; const cricleStyle = vue.computed(() => { let style = {}; style.width = props.size + "rpx"; style.height = props.size + "rpx"; if (props.mode === "circle") { style.borderColor = `var(--u-divider-color) var(--u-divider-color) var(--u-divider-color) ${props.color ? props.color : "var(--u-light-color)"}`; } return style; }); const __returned__ = { props, cricleStyle, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-loading", [_ctx.mode === "circle" ? "u-loading-circle" : "u-loading-flower", _ctx.customClass]]), style: vue.normalizeStyle($setup.$u.toStyle($setup.cricleStyle, _ctx.customStyle)) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __unplugin_components_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-9666de9c"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-loading/u-loading.vue"]]); const { t: t$5 } = useLocale(); const ModalProps = { ...baseProps, /** 是否显示模态框 */ modelValue: { type: Boolean, default: false }, /** 层级z-index */ zIndex: { type: [Number, String], default: "" }, /** 标题 */ title: { type: String, default: () => t$5("uModal.title") }, /** 弹窗宽度 */ width: { type: [Number, String], default: 600 }, /** 弹窗内容 */ content: { type: String, default: "" }, /** 是否显示标题 */ showTitle: { type: Boolean, default: true }, /** 是否显示确认按钮 */ showConfirmButton: { type: Boolean, default: true }, /** 是否显示取消按钮 */ showCancelButton: { type: Boolean, default: false }, /** 确认文案 */ confirmText: { type: String, default: () => t$5("uModal.confirmText") }, /** 取消文案 */ cancelText: { type: String, default: () => t$5("uModal.cancelText") }, /** 确认按钮颜色 */ confirmColor: { type: String, default: () => getColor("primary") }, /** 取消文字颜色 */ cancelColor: { type: String, default: () => getColor("contentColor") }, /** 圆角值 */ borderRadius: { type: [Number, String], default: 16 }, /** 标题的样式 */ titleStyle: { type: Object, default: () => ({}) }, /** 内容的样式 */ contentStyle: { type: Object, default: () => ({}) }, /** 取消按钮的样式 */ cancelStyle: { type: Object, default: () => ({}) }, /** 确定按钮的样式 */ confirmStyle: { type: Object, default: () => ({}) }, /** 是否开启缩放效果 */ zoom: { type: Boolean, default: true }, /** 是否异步关闭,只对确定按钮有效 */ asyncClose: { type: Boolean, default: false }, /** 是否允许点击遮罩关闭modal */ maskCloseAble: { type: Boolean, default: false }, /** 给一个负的margin-top,往上偏移,避免和键盘重合的情况 */ negativeTop: { type: [String, Number], default: 0 }, /** 是否作为全局根部 modal(通常放在 App.vue 中,给 useModal() 使用) */ global: { type: Boolean, default: false }, /** 是否作为页面级 modal(通常放在页面中,给 useModal({ page: true }) 使用) */ page: { type: Boolean, default: false } }; const __default__$h = { name: "u-modal", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1o = /* @__PURE__ */ vue.defineComponent({ ...__default__$h, props: ModalProps, emits: ["update:modelValue", "confirm", "cancel"], setup(__props, { expose: __expose, emit: __emit }) { const props = __props; const emit = __emit; const slots = vue.useSlots(); const loading = vue.ref(false); const isGlobal = vue.computed(() => props.global); const isPage = vue.computed(() => props.page); const showEvent = vue.computed(() => isGlobal.value ? U_MODAL_GLOBAL_EVENT_SHOW : isPage.value ? U_MODAL_EVENT_SHOW : ""); const hideEvent = vue.computed(() => isGlobal.value ? U_MODAL_GLOBAL_EVENT_HIDE : isPage.value ? U_MODAL_EVENT_HIDE : ""); const clearLoadingEvent = vue.computed( () => isGlobal.value ? U_MODAL_GLOBAL_EVENT_CLEAR_LOADING : isPage.value ? U_MODAL_EVENT_CLEAR_LOADING : "" ); let userOnConfirm = null; let userOnCancel = null; const MERGE_PROPS_KEYS = [ "title", "content", "showTitle", "showConfirmButton", "showCancelButton", "confirmText", "cancelText", "confirmColor", "cancelColor", "confirmStyle", "cancelStyle", "titleStyle", "contentStyle", "asyncClose", "borderRadius", "width", "zoom", "maskCloseAble", "negativeTop", "zIndex", "customStyle", "customClass" ]; const tempConfig = vue.ref({}); const internalShow = vue.ref(false); const effectiveConfig = vue.computed(() => { if (Object.keys(tempConfig.value).length > 0) { const result = {}; for (const key of MERGE_PROPS_KEYS) { result[key] = tempConfig.value[key] ?? props[key]; } result.zIndex = tempConfig.value.zIndex ?? props.zIndex ?? $u.zIndex.popup; return result; } return props; }); const cancelBtnStyle = vue.computed(() => { return Object.assign({ color: effectiveConfig.value.cancelColor }, effectiveConfig.value.cancelStyle); }); const confirmBtnStyle = vue.computed(() => { return Object.assign({ color: effectiveConfig.value.confirmColor }, effectiveConfig.value.confirmStyle); }); const uZIndex = vue.computed(() => effectiveConfig.value.zIndex ?? $u.zIndex.popup); const useInternalShow = vue.computed(() => isGlobal.value || isPage.value); const finalShow = vue.computed(() => { if (useInternalShow.value) { return internalShow.value; } return props.modelValue; }); const popupValue = vue.computed({ get: () => finalShow.value, set: (val) => { if (useInternalShow.value) { internalShow.value = val; } else { emit("update:modelValue", val); } } }); vue.watch( () => popupValue.value, (n) => { if (n === true) loading.value = false; } ); function confirm() { const onConfirm = userOnConfirm; if (effectiveConfig.value.asyncClose) { loading.value = true; } else { popupValue.value = false; setTimeout(() => resetTempConfig(), 300); } emit("confirm"); onConfirm == null ? void 0 : onConfirm(); } function cancel() { const onCancel = userOnCancel; setTimeout(() => resetTempConfig(), 300); emit("cancel"); popupValue.value = false; onCancel == null ? void 0 : onCancel(); setTimeout(() => { loading.value = false; }, 300); } function popupClose() { popupValue.value = false; resetTempConfig(); } function clearLoading() { loading.value = false; } function onServiceShow(payload) { userOnConfirm = payload.onConfirm ?? null; userOnCancel = payload.onCancel ?? null; const { onConfirm, onCancel, ...rest } = payload; tempConfig.value = rest; internalShow.value = true; } function onServiceHide() { internalShow.value = false; resetTempConfig(); } function resetTempConfig() { tempConfig.value = {}; userOnConfirm = null; userOnCancel = null; } vue.onMounted(() => { if (showEvent.value) { (uni == null ? void 0 : uni.$on) && uni.$on(showEvent.value, onServiceShow); } if (hideEvent.value) { (uni == null ? void 0 : uni.$on) && uni.$on(hideEvent.value, onServiceHide); } if (clearLoadingEvent.value) { (uni == null ? void 0 : uni.$on) && uni.$on(clearLoadingEvent.value, clearLoading); } }); vue.onBeforeUnmount(() => { if (showEvent.value) { (uni == null ? void 0 : uni.$off) && uni.$off(showEvent.value, onServiceShow); } if (hideEvent.value) { (uni == null ? void 0 : uni.$off) && uni.$off(hideEvent.value, onServiceHide); } if (clearLoadingEvent.value) { (uni == null ? void 0 : uni.$off) && uni.$off(clearLoadingEvent.value, clearLoading); } }); __expose({ clearLoading }); const __returned__ = { props, emit, slots, loading, isGlobal, isPage, showEvent, hideEvent, clearLoadingEvent, get userOnConfirm() { return userOnConfirm; }, set userOnConfirm(v) { userOnConfirm = v; }, get userOnCancel() { return userOnCancel; }, set userOnCancel(v) { userOnCancel = v; }, MERGE_PROPS_KEYS, tempConfig, internalShow, effectiveConfig, cancelBtnStyle, confirmBtnStyle, uZIndex, useInternalShow, finalShow, popupValue, confirm, cancel, popupClose, clearLoading, onServiceShow, onServiceHide, resetTempConfig, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_loading = __unplugin_components_3$3; const _component_u_popup = __unplugin_components_2$3; return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createVNode(_component_u_popup, { modelValue: $setup.popupValue, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.popupValue = $event), mode: "center", zoom: $setup.effectiveConfig.zoom, popup: false, "z-index": $setup.uZIndex, length: $setup.effectiveConfig.width, "mask-close-able": $setup.effectiveConfig.maskCloseAble, "border-radius": $setup.effectiveConfig.borderRadius, "negative-top": $setup.effectiveConfig.negativeTop, "custom-class": $setup.effectiveConfig.customClass, onClose: $setup.popupClose }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "u-model", style: vue.normalizeStyle($setup.$u.toStyle($setup.effectiveConfig.customStyle)) }, [ $setup.effectiveConfig.showTitle ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-model__title u-line-1", style: vue.normalizeStyle($setup.$u.toStyle($setup.effectiveConfig.titleStyle)) }, vue.toDisplayString($setup.effectiveConfig.title), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-model__content" }, [ $setup.slots.default ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, style: vue.normalizeStyle($setup.$u.toStyle($setup.effectiveConfig.contentStyle)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "u-model__content__message", style: vue.normalizeStyle($setup.$u.toStyle($setup.effectiveConfig.contentStyle)) }, vue.toDisplayString($setup.effectiveConfig.content), 5 /* TEXT, STYLE */ )) ]), $setup.effectiveConfig.showCancelButton || $setup.effectiveConfig.showConfirmButton ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-model__footer u-border-top" }, [ $setup.effectiveConfig.showCancelButton ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, "hover-stay-time": 100, "hover-class": "u-model__btn--hover", class: "u-model__footer__button", style: vue.normalizeStyle($setup.$u.toStyle($setup.cancelBtnStyle)), onClick: $setup.cancel }, vue.toDisplayString($setup.effectiveConfig.cancelText), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), $setup.effectiveConfig.showConfirmButton || $setup.slots["confirm-button"] ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-model__footer__button hairline-left", "hover-stay-time": 100, "hover-class": $setup.effectiveConfig.asyncClose ? "none" : "u-model__btn--hover", style: vue.normalizeStyle([$setup.confirmBtnStyle]), onClick: $setup.confirm }, [ $setup.slots["confirm-button"] ? vue.renderSlot(_ctx.$slots, "confirm-button", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ $setup.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading, { key: 0, mode: "circle", color: $setup.effectiveConfig.confirmColor }, null, 8, ["color"])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createTextVNode( vue.toDisplayString($setup.effectiveConfig.confirmText), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) ], 64 /* STABLE_FRAGMENT */ )) ], 12, ["hover-class"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["modelValue", "zoom", "z-index", "length", "mask-close-able", "border-radius", "negative-top", "custom-class"]) ]); } const __unplugin_components_4$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-3477805f"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-modal/u-modal.vue"]]); const { t: t$4 } = useLocale(); const InputProps = { ...baseProps, /** 用于双向绑定输入框的值 */ modelValue: { type: [String, Number], default: "" }, /** 输入框的类型,textarea,text,number */ type: { type: String, default: "text" }, /** 输入框文字的对齐方式(默认left) */ inputAlign: { type: String, default: "left" }, /** placeholder显示值(默认 '请输入内容') */ placeholder: { type: String, default: () => t$4("uInput.placeholder") }, /** 是否禁用输入框(默认false) */ disabled: { type: Boolean, default: false }, /** 输入框的最大可输入长度(默认140) */ maxlength: { type: [Number, String], default: 140 }, // 是否显示统计字数,仅textarea有效 count: { type: Boolean, default: false }, /** placeholder的样式,字符串形式,如"color: red;"(默认 "color: var(--u-light-color);") */ placeholderStyle: { type: String, default: "color: var(--u-light-color);" }, /** 设置键盘右下角按钮的文字,仅在type为text时生效(默认done) */ confirmType: { type: String, default: "done" }, /** 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true */ fixed: { type: Boolean, default: false }, /** 是否自动获得焦点(默认false) */ focus: { type: Boolean, default: false }, /** 密码类型时,是否显示右侧的密码图标(默认true) */ passwordIcon: { type: Boolean, default: true }, /** input|textarea是否显示边框(默认false) */ border: { type: Boolean, default: false }, /** 输入框的边框颜色(默认var(--u-border-color)) */ borderColor: { type: String, default: "var(--u-border-color)" }, /** 是否自动增高输入区域,type为textarea时有效(默认true) */ autoHeight: { type: Boolean, default: true }, /** type=select时,旋转右侧的图标,标识当前处于打开还是关闭select的状态 */ selectOpen: { type: Boolean, default: false }, /** 高度,单位rpx */ height: { type: [Number, String], default: "" }, /** 是否可清空(默认true) */ clearable: { type: Boolean, default: true }, /** 指定光标与键盘的距离,单位 px(默认0) */ cursorSpacing: { type: [Number, String], default: 0 }, /** 光标起始位置,自动聚焦时有效,需与selection-end搭配使用(默认-1) */ selectionStart: { type: [Number, String], default: -1 }, /** 光标结束位置,自动聚焦时有效,需与selection-start搭配使用(默认-1) */ selectionEnd: { type: [Number, String], default: -1 }, /** 是否自动去除两端的空格(默认true) */ trim: { type: Boolean, default: true }, /** 是否显示键盘上方带有”完成“按钮那一栏(默认true) */ showConfirmbar: { type: Boolean, default: true }, /** 弹出键盘时是否自动调节高度,uni-app默认值是true */ adjustPosition: { type: Boolean, default: true }, /** 输入框的验证状态,用于错误时,边框是否改为红色 */ validateState: { type: Boolean, default: false } }; const __default__$g = { name: "u-input", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1n = /* @__PURE__ */ vue.defineComponent({ ...__default__$g, props: InputProps, emits: ["update:modelValue", "input", "blur", "focus", "confirm", "click"], setup(__props, { expose: __expose, emit: __emit }) { const props = __props; const emit = __emit; const { emitToParent } = useChildren("u-input", "u-form-item"); const inputHeight = 70; const textareaHeight = 100; const validateState = vue.ref(props.validateState); const focused = vue.ref(false); const showPassword = vue.ref(false); const lastValue = vue.ref(""); const inputValue = vue.computed(() => { if (props.modelValue === void 0 || props.modelValue === null) return ""; return String(props.modelValue); }); vue.watch( () => inputValue.value, (nVal, oVal) => { if (nVal != oVal && props.type == "select") handleInput({ detail: { value: nVal } }); } ); vue.watch( () => props.validateState, (val) => { validateState.value = val; } ); const inputMaxlength = vue.computed(() => Number(props.maxlength)); const getStyle = vue.computed(() => { let style = {}; style.minHeight = props.height ? props.height + "rpx" : props.type == "textarea" ? `${textareaHeight}rpx` : `${inputHeight}rpx`; return $u.toStyle(style, props.customStyle); }); const getCursorSpacing = vue.computed(() => Number(props.cursorSpacing)); const uSelectionStart = vue.computed(() => String(props.selectionStart)); const uSelectionEnd = vue.computed(() => String(props.selectionEnd)); function handleInput(event) { let value = event.detail.value; if (props.trim) value = $u.trim(value); emit("update:modelValue", value); emit("input", value); setTimeout(() => { emitToParent("onFormChange", value); }, 40); } function handleBlur(event) { setTimeout(() => { focused.value = false; }, 100); setTimeout(() => { let value = inputValue.value; emit("blur", value); emitToParent("onFormBlur", value); }, 40); } function onFormItemError(status) { validateState.value = status; } function onFocus(e) { focused.value = true; emit("focus", e.detail.value); } function onConfirm(e) { emit("confirm", e.detail.value); } function onClear(event) { try { event.stopPropagation(); } catch (e) { console.log(e); } handleInput({ detail: { value: "" } }); } function inputClick() { emit("click"); } __expose({ onFormItemError }); const __returned__ = { props, emit, emitToParent, inputHeight, textareaHeight, validateState, focused, showPassword, lastValue, inputValue, inputMaxlength, getStyle, getCursorSpacing, uSelectionStart, uSelectionEnd, handleInput, handleBlur, onFormItemError, onFocus, onConfirm, onClear, inputClick }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-input", [ { "u-input--border": _ctx.border, "u-input--error": $setup.validateState }, _ctx.customClass ]]), style: vue.normalizeStyle({ padding: _ctx.type === "textarea" ? _ctx.border ? "20rpx" : "0" : `0 ${_ctx.border ? 20 : 0}rpx`, borderColor: _ctx.borderColor, textAlign: _ctx.inputAlign }), onClick: vue.withModifiers($setup.inputClick, ["stop"]) }, [ _ctx.type == "textarea" ? (vue.openBlock(), vue.createElementBlock("textarea", { key: 0, class: "u-input__input u-input__textarea", style: vue.normalizeStyle($setup.getStyle), value: $setup.inputValue, placeholder: _ctx.placeholder, placeholderStyle: _ctx.placeholderStyle, disabled: _ctx.disabled, maxlength: $setup.inputMaxlength, fixed: _ctx.fixed, focus: _ctx.focus, autoHeight: _ctx.autoHeight, "selection-end": Number($setup.uSelectionEnd), "selection-start": Number($setup.uSelectionStart), "cursor-spacing": $setup.getCursorSpacing, "show-confirm-bar": _ctx.showConfirmbar, "adjust-position": _ctx.adjustPosition, onInput: $setup.handleInput, onBlur: $setup.handleBlur, onFocus: $setup.onFocus, onConfirm: $setup.onConfirm }, null, 44, ["value", "placeholder", "placeholderStyle", "disabled", "maxlength", "fixed", "focus", "autoHeight", "selection-end", "selection-start", "cursor-spacing", "show-confirm-bar", "adjust-position"])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" prettier-ignore "), vue.createElementVNode("input", { class: "u-input__input", type: _ctx.type == "password" ? "text" : _ctx.type, style: vue.normalizeStyle($setup.getStyle), value: $setup.inputValue, password: _ctx.type == "password" && !$setup.showPassword, placeholder: _ctx.placeholder, placeholderStyle: _ctx.placeholderStyle, disabled: _ctx.disabled || _ctx.type === "select", maxlength: $setup.inputMaxlength, focus: _ctx.focus, confirmType: _ctx.confirmType, "cursor-spacing": $setup.getCursorSpacing, "selection-end": Number($setup.uSelectionEnd), "selection-start": Number($setup.uSelectionStart), "show-confirm-bar": _ctx.showConfirmbar, "adjust-position": _ctx.adjustPosition, onFocus: $setup.onFocus, onBlur: $setup.handleBlur, onInput: $setup.handleInput, onConfirm: $setup.onConfirm }, null, 44, ["type", "value", "password", "placeholder", "placeholderStyle", "disabled", "maxlength", "focus", "confirmType", "cursor-spacing", "selection-end", "selection-start", "show-confirm-bar", "adjust-position"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )), _ctx.type === "select" ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "u-input__select-overlay", onClick: vue.withModifiers($setup.inputClick, ["stop"]) })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-input__right-icon u-flex" }, [ _ctx.clearable && $setup.inputValue !== "" && !_ctx.disabled ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-input__right-icon__clear u-input__right-icon__item", onClick: vue.withModifiers($setup.onClear, ["stop"]) }, [ vue.createVNode(_component_u_icon, { size: "32", name: "close-circle-fill", color: "var(--u-light-color)" }) ])) : vue.createCommentVNode("v-if", true), _ctx.passwordIcon && _ctx.type == "password" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-input__right-icon__clear u-input__right-icon__item" }, [ vue.createVNode(_component_u_icon, { size: "32", name: !$setup.showPassword ? "eye" : "eye-fill", color: "var(--u-light-color)", onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPassword = !$setup.showPassword) }, null, 8, ["name"]) ])) : vue.createCommentVNode("v-if", true), _ctx.type == "select" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: vue.normalizeClass(["u-input__right-icon--select u-input__right-icon__item", { "u-input__right-icon--select--reverse": _ctx.selectOpen }]) }, [ vue.createVNode(_component_u_icon, { name: "arrow-down-fill", size: "26", color: "var(--u-light-color)" }) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ]), $setup.props.type === "textarea" && $setup.props.count ? (vue.openBlock(), vue.createElementBlock( "text", { key: 3, class: "u-input__count", style: vue.normalizeStyle({ "background-color": $setup.props.disabled ? "transparent" : "var(--u-bg-white)" }) }, vue.toDisplayString($setup.inputValue.length) + "/" + vue.toDisplayString($setup.props.maxlength), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-d205c001"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-input/u-input.vue"]]); const TagProps = { ...baseProps, /** 类型,primary、success、info、warning、error */ type: { type: String, default: "primary" }, /** 是否禁用 */ disabled: { type: [Boolean, String], default: false }, /** 尺寸,default/mini/medium */ size: { type: String, default: "default" }, /** 形状,square为方形,circle为圆形 */ shape: { type: String, default: "square" }, /** 显示的文本内容 */ text: { type: [String, Number], default: "" }, /** 文字颜色 */ color: { type: String, default: "" }, /** 背景颜色 */ bgColor: { type: String, default: "" }, /** 边框颜色 */ borderColor: { type: String, default: "" }, /** 关闭按钮颜色 */ closeColor: { type: String, default: "" }, /** 索引值 */ index: { type: [String, Number], default: "" }, /** 模式,light/dark/plain等 */ mode: { type: String, default: "light" }, /** 是否可关闭 */ closeable: { type: Boolean, default: false }, /** 是否显示 */ show: { type: Boolean, default: true } }; const __default__$f = { name: "u-tag", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1m = /* @__PURE__ */ vue.defineComponent({ ...__default__$f, props: TagProps, emits: ["click", "close"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const emit = __emit; const props = __props; const tagStyle = vue.computed(() => { let style = {}; if (props.color) style.color = props.color; if (props.bgColor) style.backgroundColor = props.bgColor; if (props.mode === "plain" && props.color && !props.borderColor) style.borderColor = props.color; else style.borderColor = props.borderColor; return style; }); const iconStyle = vue.computed(() => { if (!props.closeable) return void 0; let style = {}; if (props.size === "mini") style.fontSize = "20rpx"; else style.fontSize = "22rpx"; if (props.mode === "plain" || props.mode === "light") style.color = props.type; else if (props.mode === "dark") style.color = "var(--u-white-color)"; if (props.closeColor) style.color = props.closeColor; return style; }); const closeIconColor = vue.computed(() => { if (props.closeColor) return props.closeColor; else if (props.color) return props.color; else if (props.mode === "dark") return "var(--u-white-color)"; else return props.type; }); function clickTag() { if (props.disabled) return; emit("click", props.index); } function close() { emit("close", props.index); } const __returned__ = { emit, props, tagStyle, iconStyle, closeIconColor, clickTag, close, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass([[ _ctx.disabled ? "u-disabled" : "", "u-size-" + _ctx.size, "u-shape-" + _ctx.shape, "u-mode-" + _ctx.mode + "-" + _ctx.type, _ctx.customClass ], "u-tag"]), style: vue.normalizeStyle($setup.$u.toStyle($setup.tagStyle, _ctx.customStyle)), onClick: $setup.clickTag }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createTextVNode( vue.toDisplayString(_ctx.text), 1 /* TEXT */ ) ], true), vue.createElementVNode("view", { class: "u-icon-wrap", onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => { }, ["stop"])) }, [ _ctx.closeable ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, onClick: $setup.close, size: "22", color: $setup.closeIconColor, name: "close", class: "u-close-icon", style: vue.normalizeStyle([$setup.iconStyle]) }, null, 8, ["color", "style"])) : vue.createCommentVNode("v-if", true) ]) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __unplugin_components_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-2ea57d76"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-tag/u-tag.vue"]]); const NavbarProps = { /** 导航栏高度,单位px,非rpx */ height: { type: [String, Number], default: "" }, /** 返回箭头的颜色 */ backIconColor: { type: String, default: "var(--u-content-color)" }, /** 左边返回的图标 */ backIconName: { type: String, default: "nav-back" }, /** 左边返回图标的大小,rpx */ backIconSize: { type: [String, Number], default: "44" }, /** 返回的文字提示 */ backText: { type: String, default: "" }, /** 返回的文字的 样式 */ backTextStyle: { type: Object, default: () => ({ color: "var(--u-content-color)" }) }, /** 导航栏标题 */ title: { type: String, default: "" }, /** 标题的宽度,单位rpx */ titleWidth: { type: [String, Number], default: "250" }, /** 标题的颜色 */ titleColor: { type: String, default: "var(--u-content-color)" }, /** 标题字体是否加粗 */ titleBold: { type: Boolean, default: false }, /** 标题的字体大小 */ titleSize: { type: [String, Number], default: 32 }, /** 是否显示导航栏左边返回图标和辅助文字 */ isBack: { type: [Boolean, String], default: true }, /** 导航栏背景设置 */ background: { type: Object, default: () => ({ background: "var(--u-bg-white)" }) }, /** 导航栏是否固定在顶部 */ isFixed: { type: Boolean, default: true }, /** 是否沉浸式,允许fixed定位后导航栏塌陷,仅fixed定位下生效 */ immersive: { type: Boolean, default: false }, /** 是否显示导航栏的下边框 */ borderBottom: { type: Boolean, default: true }, /** 固定在顶部时的z-index值 */ zIndex: { type: [String, Number], default: zIndex.navbar }, /** 自定义返回逻辑方法 */ customBack: { type: Function, default: null } }; const __default__$e = { name: "u-navbar", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({ ...__default__$e, props: NavbarProps, setup(__props, { expose: __expose }) { __expose(); const props = __props; const systemInfo2 = uni.getSystemInfoSync(); let menuButtonInfo = {}; const statusBarHeight = vue.ref(0); statusBarHeight.value = systemInfo2.statusBarHeight || 0; const navbarHeight = vue.computed(() => { return props.height ? props.height : 44; }); const navbarPlaceholderHeight = vue.computed(() => { return Number(navbarHeight.value) + Number(statusBarHeight.value); }); const navbarInnerStyle = vue.computed(() => { let style = {}; style.height = String(navbarHeight.value) + "px"; return style; }); const navbarStyle = vue.computed(() => { let style = {}; style.zIndex = props.zIndex ? props.zIndex : $u.zIndex.navbar; Object.assign(style, props.background); return style; }); const titleStyle = vue.computed(() => { let style = {}; style.left = (systemInfo2.windowWidth - uni.upx2px(Number(props.titleWidth))) / 2 + "px"; style.right = (systemInfo2.windowWidth - uni.upx2px(Number(props.titleWidth))) / 2 + "px"; style.width = uni.upx2px(Number(props.titleWidth)) + "px"; return style; }); function goBack() { if (typeof props.customBack === "function") { props.customBack(); } else { uni.navigateBack(); } } const __returned__ = { props, systemInfo: systemInfo2, get menuButtonInfo() { return menuButtonInfo; }, set menuButtonInfo(v) { menuButtonInfo = v; }, statusBarHeight, navbarHeight, navbarPlaceholderHeight, navbarInnerStyle, navbarStyle, titleStyle, goBack }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-navbar", { "u-navbar-fixed": $setup.props.isFixed, "u-border-bottom": $setup.props.borderBottom }]), style: vue.normalizeStyle($setup.navbarStyle) }, [ vue.createElementVNode( "view", { class: "u-status-bar", style: vue.normalizeStyle({ height: $setup.statusBarHeight + "px" }) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "u-navbar-inner", style: vue.normalizeStyle($setup.navbarInnerStyle) }, [ $setup.props.isBack ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-back-wrap", onClick: $setup.goBack }, [ vue.createElementVNode("view", { class: "u-icon-wrap" }, [ vue.createVNode(_component_u_icon, { name: $setup.props.backIconName, color: $setup.props.backIconColor, size: $setup.props.backIconSize }, null, 8, ["name", "color", "size"]) ]), $setup.props.backText ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-icon-wrap u-back-text u-line-1", style: vue.normalizeStyle($setup.props.backTextStyle) }, vue.toDisplayString($setup.props.backText), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-slot-left" }, [ vue.renderSlot(_ctx.$slots, "left", {}, void 0, true) ]), $setup.props.title ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "u-navbar-content-title", style: vue.normalizeStyle($setup.titleStyle) }, [ vue.createElementVNode( "view", { class: "u-title u-line-1", style: vue.normalizeStyle({ color: $setup.props.titleColor, fontSize: $setup.props.titleSize + "rpx", fontWeight: $setup.props.titleBold ? "bold" : "normal" }) }, vue.toDisplayString($setup.props.title), 5 /* TEXT, STYLE */ ) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-slot-content" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), vue.createElementVNode("view", { class: "u-slot-right" }, [ vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ]) ], 4 /* STYLE */ ) ], 6 /* CLASS, STYLE */ ), vue.createCommentVNode(" 解决fixed定位后导航栏塌陷的问题 "), $setup.props.isFixed && !$setup.props.immersive ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-navbar-placeholder", style: vue.normalizeStyle({ width: "100%", height: `${Number($setup.navbarPlaceholderHeight)}px` }) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const __unplugin_components_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-5731e8cb"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-navbar/u-navbar.vue"]]); const { t: t$3 } = useLocale(); const SelectProps = { ...baseProps, /** 列数据 */ list: { type: Array, default: () => [] }, /** 是否显示边框 */ border: { type: Boolean, default: true }, /** 通过双向绑定控制组件的弹出与收起 */ modelValue: { type: Boolean, default: false }, /** "取消"按钮的颜色 */ cancelColor: { type: String, default: () => getColor("contentColor") }, /** "确定"按钮的颜色 */ confirmColor: { type: String, default: () => getColor("primary") }, /** 弹出的z-index值 */ zIndex: { type: [String, Number], default: 0 }, /** 是否开启底部安全区适配 */ safeAreaInsetBottom: { type: Boolean, default: false }, /** 是否允许通过点击遮罩关闭Picker */ maskCloseAble: { type: Boolean, default: true }, /** 提供的默认选中的下标 */ defaultValue: { type: Array, default: () => [0] }, /** 是否保留用户上次确认的选择(true:优先使用已保存的选择;false:优先使用外部传入的 defaultValue) */ preserveSelection: { type: Boolean, default: true }, /** 模式选择,single-column-单列,mutil-column-多列,mutil-column-auto-多列联动 */ mode: { type: String, default: "single-column" }, /** 自定义value属性名 */ valueName: { type: String, default: "value" }, /** 自定义label属性名 */ labelName: { type: String, default: "label" }, /** 自定义多列联动模式的children属性名 */ childName: { type: String, default: "children" }, /** 顶部标题 */ title: { type: String, default: "" }, /** 取消按钮的文字 */ cancelText: { type: String, default: () => t$3("uSelect.cancelText") }, /** 确认按钮的文字 */ confirmText: { type: String, default: () => t$3("uSelect.confirmText") } }; const __default__$d = { name: "u-select", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({ ...__default__$d, props: SelectProps, emits: ["update:modelValue", "confirm", "cancel", "click"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const emit = __emit; const defaultSelector = vue.ref([0]); const columnData = vue.ref([]); const readyToRender = vue.ref(false); const savedSelector = vue.ref( props.defaultValue && props.defaultValue.length ? props.defaultValue.slice() : null ); const selectValue = vue.ref([]); const lastSelectIndex = vue.ref([]); const columnNum = vue.ref(0); const moving = vue.ref(false); const uZIndex = vue.computed(() => props.zIndex ? props.zIndex : $u.zIndex.popup); const popupValue = vue.computed({ get: () => props.modelValue, set: (val) => emit("update:modelValue", val) }); vue.watch( () => props.modelValue, async (val) => { if (val) { await vue.nextTick(); await new Promise((resolve2) => setTimeout(resolve2, 20)); init(); readyToRender.value = true; } else { readyToRender.value = false; } }, { immediate: true } ); function pickstart() { } function pickend() { } function init() { setColumnNum(); setDefaultSelector(); setColumnData(); selectValue.value = []; setSelectValue(); } function setDefaultSelector() { let useDefault = null; if (props.preserveSelection) { useDefault = savedSelector.value && savedSelector.value.length ? savedSelector.value : props.defaultValue; } else { useDefault = props.defaultValue && props.defaultValue.length ? props.defaultValue : savedSelector.value; } defaultSelector.value = useDefault && useDefault.length == columnNum.value ? useDefault.slice() : Array(columnNum.value).fill(0); lastSelectIndex.value = [...defaultSelector.value]; } function setColumnNum() { if (props.mode == "single-column") columnNum.value = 1; else if (props.mode == "mutil-column") columnNum.value = props.list.length; else if (props.mode == "mutil-column-auto") { let num = 1; let column = props.list; while (Array.isArray(column) && column[0] && typeof column[0] === "object" && props.childName in column[0]) { column = column[0][props.childName]; num++; } columnNum.value = num; } } function setColumnData() { let data = []; selectValue.value = []; if (props.mode == "mutil-column-auto") { let column = props.list[defaultSelector.value.length ? defaultSelector.value[0] : 0]; for (let i = 0; i < columnNum.value; i++) { if (i == 0) { data[i] = is2DList(props.list) ? props.list[i] || [] : props.list; column = column && typeof column === "object" ? column[props.childName] : []; } else { data[i] = Array.isArray(column) ? column : []; column = Array.isArray(column) && column[defaultSelector.value[i]] && typeof column[defaultSelector.value[i]] === "object" ? column[defaultSelector.value[i]][props.childName] : []; } } } else if (props.mode == "single-column") { data[0] = Array.isArray(props.list) && !is2DList(props.list) ? props.list : []; } else if (props.mode == "mutil-column") { data = is2DList(props.list) ? props.list : [props.list]; } columnData.value = data; } function setSelectValue() { for (let i = 0; i < columnNum.value; i++) { const tmp = columnData.value[i][defaultSelector.value[i]]; let data = { value: tmp ? tmp[props.valueName] : null, label: tmp ? tmp[props.labelName] : null }; if (tmp && tmp.extra !== void 0) data.extra = tmp.extra; selectValue.value.push(data); } } function columnChange(e) { let index = -1; const columnIndex = e.detail.value; selectValue.value = []; defaultSelector.value = columnIndex; if (props.mode == "mutil-column-auto") { lastSelectIndex.value.map((val, idx) => { if (val != columnIndex[idx]) index = idx; }); for (let i = index + 1; i < columnNum.value; i++) { const prevCol = columnData.value[i - 1]; const prevIdx = i - 1 == index ? columnIndex[index] : 0; columnData.value[i] = Array.isArray(prevCol) && prevCol[prevIdx] && typeof prevCol[prevIdx] === "object" ? prevCol[prevIdx][props.childName] : []; defaultSelector.value[i] = 0; } columnIndex.map((item, idx) => { let data = columnData.value[idx][columnIndex[idx]]; let tmp = { value: data ? data[props.valueName] : null, label: data ? data[props.labelName] : null }; if (data && data.extra !== void 0) tmp.extra = data.extra; selectValue.value.push(tmp); }); lastSelectIndex.value = [...columnIndex]; } else if (props.mode == "single-column") { let data = columnData.value[0][columnIndex[0]]; let tmp = { value: data ? data[props.valueName] : null, label: data ? data[props.labelName] : null }; if (data && data.extra !== void 0) tmp.extra = data.extra; selectValue.value.push(tmp); } else if (props.mode == "mutil-column") { columnIndex.map((item, idx) => { let data = columnData.value[idx][columnIndex[idx]]; let tmp = { value: data ? data[props.valueName] : null, label: data ? data[props.labelName] : null }; if (data && data.extra !== void 0) tmp.extra = data.extra; selectValue.value.push(tmp); }); } } function close() { emit("update:modelValue", false); } function getResult(event = null) { if (event) emit(event, selectValue.value); if (event === "confirm") { savedSelector.value = defaultSelector.value ? defaultSelector.value.slice() : null; } close(); } function selectHandler() { emit("click"); } function is2DList(list2) { return Array.isArray(list2) && list2.length > 0 && Array.isArray(list2[0]); } const __returned__ = { props, emit, defaultSelector, columnData, readyToRender, savedSelector, selectValue, lastSelectIndex, columnNum, moving, uZIndex, popupValue, pickstart, pickend, init, setDefaultSelector, setColumnNum, setColumnData, setSelectValue, columnChange, close, getResult, selectHandler, is2DList, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_popup = __unplugin_components_2$3; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-select", _ctx.customClass]), style: vue.normalizeStyle($setup.$u.toStyle(_ctx.customStyle)) }, [ vue.createCommentVNode(` \r \r \r \r `), vue.createVNode(_component_u_popup, { maskCloseAble: _ctx.maskCloseAble, mode: "bottom", popup: false, modelValue: $setup.popupValue, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.popupValue = $event), length: "auto", safeAreaInsetBottom: _ctx.safeAreaInsetBottom, onClose: $setup.close, "z-index": $setup.uZIndex }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-select" }, [ vue.createElementVNode( "view", { class: "u-select__header", onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, [ vue.createElementVNode( "view", { class: "u-select__header__cancel u-select__header__btn", style: vue.normalizeStyle({ color: _ctx.cancelColor }), "hover-class": "u-hover-class", "hover-stay-time": 150, onClick: _cache[0] || (_cache[0] = ($event) => $setup.getResult("cancel")) }, vue.toDisplayString(_ctx.cancelText), 5 /* TEXT, STYLE */ ), vue.createElementVNode( "view", { class: "u-select__header__title u-line-1" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "u-select__header__confirm u-select__header__btn", style: vue.normalizeStyle({ color: $setup.moving ? _ctx.cancelColor : _ctx.confirmColor }), "hover-class": "u-hover-class", "hover-stay-time": 150, onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => { }, ["stop"])), onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $setup.getResult("confirm"), ["stop"])) }, vue.toDisplayString(_ctx.confirmText), 37 /* TEXT, STYLE, NEED_HYDRATION */ ) ], 32 /* NEED_HYDRATION */ ), vue.createElementVNode("view", { class: "u-select__body" }, [ _ctx.modelValue && $setup.readyToRender ? (vue.openBlock(), vue.createElementBlock("picker-view", { key: 0, value: $setup.defaultSelector, class: "u-select__body__picker-view", "mask-class": "u-picker-view-mask", "indicator-class": "u-picker-view-indicator", onPickstart: $setup.pickstart, onPickend: $setup.pickend, onChange: $setup.columnChange }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.columnData, (item, index) => { return vue.openBlock(), vue.createElementBlock("picker-view-column", { key: index }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item, (item1, index1) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-select__body__picker-view__item", key: index1 }, [ vue.createElementVNode( "view", { class: "u-line-1" }, vue.toDisplayString(item1[_ctx.labelName]), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 40, ["value"])) : vue.createCommentVNode("v-if", true) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["maskCloseAble", "modelValue", "safeAreaInsetBottom", "z-index"]) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_5$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-2e60fab0"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-select/u-select.vue"]]); const ON_SHOW = "onShow"; const ON_HIDE = "onHide"; const ON_LAUNCH = "onLaunch"; const ON_LOAD = "onLoad"; function formatAppLog(type2, filename, ...args) { if (uni.__log__) { uni.__log__(type2, filename, ...args); } else { console[type2].apply(console, [...args, filename]); } } function resolveEasycom(component, easycom) { return typeof component === "string" ? easycom : component; } const createHook$1 = (lifecycle) => (hook, target = vue.getCurrentInstance()) => { !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target); }; const onShow = /* @__PURE__ */ createHook$1(ON_SHOW); const onHide = /* @__PURE__ */ createHook$1(ON_HIDE); const onLaunch = /* @__PURE__ */ createHook$1(ON_LAUNCH); const onLoad = /* @__PURE__ */ createHook$1(ON_LOAD); /*! * @intlify/shared v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const inBrowser = typeof window !== "undefined"; let mark; let measure; { const perf2 = inBrowser && window.performance; if (perf2 && perf2.mark && perf2.measure && perf2.clearMarks && perf2.clearMeasures) { mark = (tag) => perf2.mark(tag); measure = (name, startTag, endTag) => { perf2.measure(name, startTag, endTag); perf2.clearMarks(startTag); perf2.clearMarks(endTag); }; } } const RE_ARGS$1 = /\{([0-9a-zA-Z]+)\}/g; function format$2(message, ...args) { if (args.length === 1 && isObject$5(args[0])) { args = args[0]; } if (!args || !args.hasOwnProperty) { args = {}; } return message.replace(RE_ARGS$1, (match, identifier) => { return args.hasOwnProperty(identifier) ? args[identifier] : ""; }); } const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; const makeSymbol = (name) => hasSymbol ? Symbol(name) : name; const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source }); const friendlyJSONstringify = (json) => JSON.stringify(json).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"); const isNumber$1 = (val) => typeof val === "number" && isFinite(val); const isDate = (val) => toTypeString$1(val) === "[object Date]"; const isRegExp = (val) => toTypeString$1(val) === "[object RegExp]"; const isEmptyObject = (val) => isPlainObject$2(val) && Object.keys(val).length === 0; function warn$1(msg, err) { if (typeof console !== "undefined") { console.warn(`[intlify] ` + msg); if (err) { console.warn(err.stack); } } } const assign$2 = Object.assign; let _globalThis; const getGlobalThis = () => { return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; function escapeHtml(rawText) { return rawText.replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); } const hasOwnProperty$2 = Object.prototype.hasOwnProperty; function hasOwn$2(obj, key) { return hasOwnProperty$2.call(obj, key); } const isArray$2 = Array.isArray; const isFunction$2 = (val) => typeof val === "function"; const isString$2 = (val) => typeof val === "string"; const isBoolean = (val) => typeof val === "boolean"; const isObject$5 = (val) => ( // eslint-disable-line val !== null && typeof val === "object" ); const objectToString$1 = Object.prototype.toString; const toTypeString$1 = (value) => objectToString$1.call(value); const isPlainObject$2 = (val) => toTypeString$1(val) === "[object Object]"; const RANGE = 2; function generateCodeFrame(source, start = 0, end = source.length) { const lines = source.split(/\r?\n/); let count = 0; const res = []; for (let i = 0; i < lines.length; i++) { count += lines[i].length + 1; if (count >= start) { for (let j = i - RANGE; j <= i + RANGE || end > count; j++) { if (j < 0 || j >= lines.length) continue; const line = j + 1; res.push(`${line}${" ".repeat(3 - String(line).length)}| ${lines[j]}`); const lineLength = lines[j].length; if (j === i) { const pad = start - (count - lineLength) + 1; const length = Math.max(1, end > count ? lineLength - pad : end - start); res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); } else if (j > i) { if (end > count) { const length = Math.max(Math.min(end - count, lineLength), 1); res.push(` | ` + "^".repeat(length)); } count += lineLength + 1; } } break; } } return res.join("\n"); } function createEmitter() { const events = /* @__PURE__ */ new Map(); const emitter = { events, on(event, handler) { const handlers = events.get(event); const added = handlers && handlers.push(handler); if (!added) { events.set(event, [handler]); } }, off(event, handler) { const handlers = events.get(event); if (handlers) { handlers.splice(handlers.indexOf(handler) >>> 0, 1); } }, emit(event, payload) { (events.get(event) || []).slice().map((handler) => handler(payload)); (events.get("*") || []).slice().map((handler) => handler(event, payload)); } }; return emitter; } /*! * @intlify/message-resolver v9.1.10 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */ const hasOwnProperty$1 = Object.prototype.hasOwnProperty; function hasOwn$1(obj, key) { return hasOwnProperty$1.call(obj, key); } const isObject$4 = (val) => ( // eslint-disable-line val !== null && typeof val === "object" ); const pathStateMachine = []; pathStateMachine[ 0 /* BEFORE_PATH */ ] = { [ "w" /* WORKSPACE */ ]: [ 0 /* BEFORE_PATH */ ], [ "i" /* IDENT */ ]: [ 3, 0 /* APPEND */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4 /* IN_SUB_PATH */ ], [ "o" /* END_OF_FAIL */ ]: [ 7 /* AFTER_PATH */ ] }; pathStateMachine[ 1 /* IN_PATH */ ] = { [ "w" /* WORKSPACE */ ]: [ 1 /* IN_PATH */ ], [ "." /* DOT */ ]: [ 2 /* BEFORE_IDENT */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4 /* IN_SUB_PATH */ ], [ "o" /* END_OF_FAIL */ ]: [ 7 /* AFTER_PATH */ ] }; pathStateMachine[ 2 /* BEFORE_IDENT */ ] = { [ "w" /* WORKSPACE */ ]: [ 2 /* BEFORE_IDENT */ ], [ "i" /* IDENT */ ]: [ 3, 0 /* APPEND */ ], [ "0" /* ZERO */ ]: [ 3, 0 /* APPEND */ ] }; pathStateMachine[ 3 /* IN_IDENT */ ] = { [ "i" /* IDENT */ ]: [ 3, 0 /* APPEND */ ], [ "0" /* ZERO */ ]: [ 3, 0 /* APPEND */ ], [ "w" /* WORKSPACE */ ]: [ 1, 1 /* PUSH */ ], [ "." /* DOT */ ]: [ 2, 1 /* PUSH */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4, 1 /* PUSH */ ], [ "o" /* END_OF_FAIL */ ]: [ 7, 1 /* PUSH */ ] }; pathStateMachine[ 4 /* IN_SUB_PATH */ ] = { [ "'" /* SINGLE_QUOTE */ ]: [ 5, 0 /* APPEND */ ], [ '"' /* DOUBLE_QUOTE */ ]: [ 6, 0 /* APPEND */ ], [ "[" /* LEFT_BRACKET */ ]: [ 4, 2 /* INC_SUB_PATH_DEPTH */ ], [ "]" /* RIGHT_BRACKET */ ]: [ 1, 3 /* PUSH_SUB_PATH */ ], [ "o" /* END_OF_FAIL */ ]: 8, [ "l" /* ELSE */ ]: [ 4, 0 /* APPEND */ ] }; pathStateMachine[ 5 /* IN_SINGLE_QUOTE */ ] = { [ "'" /* SINGLE_QUOTE */ ]: [ 4, 0 /* APPEND */ ], [ "o" /* END_OF_FAIL */ ]: 8, [ "l" /* ELSE */ ]: [ 5, 0 /* APPEND */ ] }; pathStateMachine[ 6 /* IN_DOUBLE_QUOTE */ ] = { [ '"' /* DOUBLE_QUOTE */ ]: [ 4, 0 /* APPEND */ ], [ "o" /* END_OF_FAIL */ ]: 8, [ "l" /* ELSE */ ]: [ 6, 0 /* APPEND */ ] }; const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/; function isLiteral(exp) { return literalValueRE.test(exp); } function stripQuotes(str) { const a = str.charCodeAt(0); const b = str.charCodeAt(str.length - 1); return a === b && (a === 34 || a === 39) ? str.slice(1, -1) : str; } function getPathCharType(ch) { if (ch === void 0 || ch === null) { return "o"; } const code2 = ch.charCodeAt(0); switch (code2) { case 91: case 93: case 46: case 34: case 39: return ch; case 95: case 36: case 45: return "i"; case 9: case 10: case 13: case 160: case 65279: case 8232: case 8233: return "w"; } return "i"; } function formatSubPath(path) { const trimmed = path.trim(); if (path.charAt(0) === "0" && isNaN(parseInt(path))) { return false; } return isLiteral(trimmed) ? stripQuotes(trimmed) : "*" + trimmed; } function parse$1(path) { const keys = []; let index = -1; let mode = 0; let subPathDepth = 0; let c2; let key; let newChar; let type2; let transition; let action; let typeMap; const actions = []; actions[ 0 /* APPEND */ ] = () => { if (key === void 0) { key = newChar; } else { key += newChar; } }; actions[ 1 /* PUSH */ ] = () => { if (key !== void 0) { keys.push(key); key = void 0; } }; actions[ 2 /* INC_SUB_PATH_DEPTH */ ] = () => { actions[ 0 /* APPEND */ ](); subPathDepth++; }; actions[ 3 /* PUSH_SUB_PATH */ ] = () => { if (subPathDepth > 0) { subPathDepth--; mode = 4; actions[ 0 /* APPEND */ ](); } else { subPathDepth = 0; if (key === void 0) { return false; } key = formatSubPath(key); if (key === false) { return false; } else { actions[ 1 /* PUSH */ ](); } } }; function maybeUnescapeQuote() { const nextChar = path[index + 1]; if (mode === 5 && nextChar === "'" || mode === 6 && nextChar === '"') { index++; newChar = "\\" + nextChar; actions[ 0 /* APPEND */ ](); return true; } } while (mode !== null) { index++; c2 = path[index]; if (c2 === "\\" && maybeUnescapeQuote()) { continue; } type2 = getPathCharType(c2); typeMap = pathStateMachine[mode]; transition = typeMap[type2] || typeMap[ "l" /* ELSE */ ] || 8; if (transition === 8) { return; } mode = transition[0]; if (transition[1] !== void 0) { action = actions[transition[1]]; if (action) { newChar = c2; if (action() === false) { return; } } } if (mode === 7) { return keys; } } } const cache = /* @__PURE__ */ new Map(); function resolveValue(obj, path) { if (!isObject$4(obj)) { return null; } let hit = cache.get(path); if (!hit) { hit = parse$1(path); if (hit) { cache.set(path, hit); } } if (!hit) { return null; } const len = hit.length; let last = obj; let i = 0; while (i < len) { const val = last[hit[i]]; if (val === void 0) { return null; } last = val; i++; } return last; } function handleFlatJson(obj) { if (!isObject$4(obj)) { return obj; } for (const key in obj) { if (!hasOwn$1(obj, key)) { continue; } if (!key.includes( "." /* DOT */ )) { if (isObject$4(obj[key])) { handleFlatJson(obj[key]); } } else { const subKeys = key.split( "." /* DOT */ ); const lastIndex = subKeys.length - 1; let currentObj = obj; for (let i = 0; i < lastIndex; i++) { if (!(subKeys[i] in currentObj)) { currentObj[subKeys[i]] = {}; } currentObj = currentObj[subKeys[i]]; } currentObj[subKeys[lastIndex]] = obj[key]; delete obj[key]; if (isObject$4(currentObj[subKeys[lastIndex]])) { handleFlatJson(currentObj[subKeys[lastIndex]]); } } } return obj; } /*! * @intlify/shared v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g; function format$1(message, ...args) { if (args.length === 1 && isObject$3(args[0])) { args = args[0]; } if (!args || !args.hasOwnProperty) { args = {}; } return message.replace(RE_ARGS, (match, identifier) => { return args.hasOwnProperty(identifier) ? args[identifier] : ""; }); } const isNumber = (val) => typeof val === "number" && isFinite(val); const isArray$1 = Array.isArray; const isFunction$1 = (val) => typeof val === "function"; const isString$1 = (val) => typeof val === "string"; const isObject$3 = (val) => ( // eslint-disable-line val !== null && typeof val === "object" ); const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const isPlainObject$1 = (val) => toTypeString(val) === "[object Object]"; const toDisplayString = (val) => { return val == null ? "" : isArray$1(val) || isPlainObject$1(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val); }; /*! * @intlify/runtime v9.1.10 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */ const DEFAULT_MODIFIER = (str) => str; const DEFAULT_MESSAGE = (ctx) => ""; const DEFAULT_MESSAGE_DATA_TYPE = "text"; const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : values.join(""); const DEFAULT_INTERPOLATE = toDisplayString; function pluralDefault(choice, choicesLength) { choice = Math.abs(choice); if (choicesLength === 2) { return choice ? choice > 1 ? 1 : 0 : 1; } return choice ? Math.min(choice, 2) : 0; } function getPluralIndex(options) { const index = isNumber(options.pluralIndex) ? options.pluralIndex : -1; return options.named && (isNumber(options.named.count) || isNumber(options.named.n)) ? isNumber(options.named.count) ? options.named.count : isNumber(options.named.n) ? options.named.n : index : index; } function normalizeNamed(pluralIndex, props) { if (!props.count) { props.count = pluralIndex; } if (!props.n) { props.n = pluralIndex; } } function createMessageContext(options = {}) { const locale = options.locale; const pluralIndex = getPluralIndex(options); const pluralRule = isObject$3(options.pluralRules) && isString$1(locale) && isFunction$1(options.pluralRules[locale]) ? options.pluralRules[locale] : pluralDefault; const orgPluralRule = isObject$3(options.pluralRules) && isString$1(locale) && isFunction$1(options.pluralRules[locale]) ? pluralDefault : void 0; const plural = (messages2) => messages2[pluralRule(pluralIndex, messages2.length, orgPluralRule)]; const _list = options.list || []; const list2 = (index) => _list[index]; const _named = options.named || {}; isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named); const named = (key) => _named[key]; function message(key) { const msg = isFunction$1(options.messages) ? options.messages(key) : isObject$3(options.messages) ? options.messages[key] : false; return !msg ? options.parent ? options.parent.message(key) : DEFAULT_MESSAGE : msg; } const _modifier = (name) => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER; const normalize = isPlainObject$1(options.processor) && isFunction$1(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE; const interpolate = isPlainObject$1(options.processor) && isFunction$1(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE; const type2 = isPlainObject$1(options.processor) && isString$1(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE; const ctx = { [ "list" /* LIST */ ]: list2, [ "named" /* NAMED */ ]: named, [ "plural" /* PLURAL */ ]: plural, [ "linked" /* LINKED */ ]: (key, modifier) => { const msg = message(key)(ctx); return isString$1(modifier) ? _modifier(modifier)(msg) : msg; }, [ "message" /* MESSAGE */ ]: message, [ "type" /* TYPE */ ]: type2, [ "interpolate" /* INTERPOLATE */ ]: interpolate, [ "normalize" /* NORMALIZE */ ]: normalize }; return ctx; } /*! * @intlify/message-compiler v9.1.10 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */ const errorMessages$2 = { // tokenizer error messages [ 0 /* EXPECTED_TOKEN */ ]: `Expected token: '{0}'`, [ 1 /* INVALID_TOKEN_IN_PLACEHOLDER */ ]: `Invalid token in placeholder: '{0}'`, [ 2 /* UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER */ ]: `Unterminated single quote in placeholder`, [ 3 /* UNKNOWN_ESCAPE_SEQUENCE */ ]: `Unknown escape sequence: \\{0}`, [ 4 /* INVALID_UNICODE_ESCAPE_SEQUENCE */ ]: `Invalid unicode escape sequence: {0}`, [ 5 /* UNBALANCED_CLOSING_BRACE */ ]: `Unbalanced closing brace`, [ 6 /* UNTERMINATED_CLOSING_BRACE */ ]: `Unterminated closing brace`, [ 7 /* EMPTY_PLACEHOLDER */ ]: `Empty placeholder`, [ 8 /* NOT_ALLOW_NEST_PLACEHOLDER */ ]: `Not allowed nest placeholder`, [ 9 /* INVALID_LINKED_FORMAT */ ]: `Invalid linked format`, // parser error messages [ 10 /* MUST_HAVE_MESSAGES_IN_PLURAL */ ]: `Plural must have messages`, [ 11 /* UNEXPECTED_EMPTY_LINKED_MODIFIER */ ]: `Unexpected empty linked modifier`, [ 12 /* UNEXPECTED_EMPTY_LINKED_KEY */ ]: `Unexpected empty linked key`, [ 13 /* UNEXPECTED_LEXICAL_ANALYSIS */ ]: `Unexpected lexical analysis in token: '{0}'` }; function createCompileError(code2, loc, options = {}) { const { domain, messages: messages2, args } = options; const msg = format$1((messages2 || errorMessages$2)[code2] || "", ...args || []); const error = new SyntaxError(String(msg)); error.code = code2; error.domain = domain; return error; } /*! * @intlify/devtools-if v9.1.10 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */ const IntlifyDevToolsHooks = { I18nInit: "i18n:init", FunctionTranslate: "function:translate" }; /*! * @intlify/core-base v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ let devtools = null; function setDevToolsHook(hook) { devtools = hook; } function initI18nDevTools(i18n2, version2, meta) { devtools && devtools.emit(IntlifyDevToolsHooks.I18nInit, { timestamp: Date.now(), i18n: i18n2, version: version2, meta }); } const translateDevTools = /* @__PURE__ */ createDevToolsHook(IntlifyDevToolsHooks.FunctionTranslate); function createDevToolsHook(hook) { return (payloads) => devtools && devtools.emit(hook, payloads); } const warnMessages$1 = { [ 0 /* NOT_FOUND_KEY */ ]: `Not found '{key}' key in '{locale}' locale messages.`, [ 1 /* FALLBACK_TO_TRANSLATE */ ]: `Fall back to translate '{key}' key with '{target}' locale.`, [ 2 /* CANNOT_FORMAT_NUMBER */ ]: `Cannot format a number value due to not supported Intl.NumberFormat.`, [ 3 /* FALLBACK_TO_NUMBER_FORMAT */ ]: `Fall back to number format '{key}' key with '{target}' locale.`, [ 4 /* CANNOT_FORMAT_DATE */ ]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`, [ 5 /* FALLBACK_TO_DATE_FORMAT */ ]: `Fall back to datetime format '{key}' key with '{target}' locale.` }; function getWarnMessage$1(code2, ...args) { return format$2(warnMessages$1[code2], ...args); } const VERSION$1 = "9.1.9"; const NOT_REOSLVED = -1; const MISSING_RESOLVE_VALUE = ""; function getDefaultLinkedModifiers() { return { upper: (val) => isString$2(val) ? val.toUpperCase() : val, lower: (val) => isString$2(val) ? val.toLowerCase() : val, // prettier-ignore capitalize: (val) => isString$2(val) ? `${val.charAt(0).toLocaleUpperCase()}${val.substr(1)}` : val }; } let _compiler; let _additionalMeta = null; const setAdditionalMeta = (meta) => { _additionalMeta = meta; }; const getAdditionalMeta = () => _additionalMeta; let _cid = 0; function createCoreContext(options = {}) { const version2 = isString$2(options.version) ? options.version : VERSION$1; const locale = isString$2(options.locale) ? options.locale : "en-US"; const fallbackLocale = isArray$2(options.fallbackLocale) || isPlainObject$2(options.fallbackLocale) || isString$2(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale; const messages2 = isPlainObject$2(options.messages) ? options.messages : { [locale]: {} }; const datetimeFormats = isPlainObject$2(options.datetimeFormats) ? options.datetimeFormats : { [locale]: {} }; const numberFormats = isPlainObject$2(options.numberFormats) ? options.numberFormats : { [locale]: {} }; const modifiers = assign$2({}, options.modifiers || {}, getDefaultLinkedModifiers()); const pluralRules = options.pluralRules || {}; const missing = isFunction$2(options.missing) ? options.missing : null; const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true; const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true; const fallbackFormat = !!options.fallbackFormat; const unresolving = !!options.unresolving; const postTranslation = isFunction$2(options.postTranslation) ? options.postTranslation : null; const processor = isPlainObject$2(options.processor) ? options.processor : null; const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true; const escapeParameter = !!options.escapeParameter; const messageCompiler = isFunction$2(options.messageCompiler) ? options.messageCompiler : _compiler; const onWarn = isFunction$2(options.onWarn) ? options.onWarn : warn$1; const internalOptions = options; const __datetimeFormatters = isObject$5(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map(); const __numberFormatters = isObject$5(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map(); const __meta = isObject$5(internalOptions.__meta) ? internalOptions.__meta : {}; _cid++; const context = { version: version2, cid: _cid, locale, fallbackLocale, messages: messages2, datetimeFormats, numberFormats, modifiers, pluralRules, missing, missingWarn, fallbackWarn, fallbackFormat, unresolving, postTranslation, processor, warnHtmlMessage, escapeParameter, messageCompiler, onWarn, __datetimeFormatters, __numberFormatters, __meta }; { context.__v_emitter = internalOptions.__v_emitter != null ? internalOptions.__v_emitter : void 0; } { initI18nDevTools(context, version2, __meta); } return context; } function isTranslateFallbackWarn(fallback, key) { return fallback instanceof RegExp ? fallback.test(key) : fallback; } function isTranslateMissingWarn(missing, key) { return missing instanceof RegExp ? missing.test(key) : missing; } function handleMissing(context, key, locale, missingWarn, type2) { const { missing, onWarn } = context; { const emitter = context.__v_emitter; if (emitter) { emitter.emit("missing", { locale, key, type: type2, groupId: `${type2}:${key}` }); } } if (missing !== null) { const ret = missing(context, locale, key, type2); return isString$2(ret) ? ret : key; } else { if (isTranslateMissingWarn(missingWarn, key)) { onWarn(getWarnMessage$1(0, { key, locale })); } return key; } } function getLocaleChain(ctx, fallback, start) { const context = ctx; if (!context.__localeChainCache) { context.__localeChainCache = /* @__PURE__ */ new Map(); } let chain = context.__localeChainCache.get(start); if (!chain) { chain = []; let block = [start]; while (isArray$2(block)) { block = appendBlockToChain(chain, block, fallback); } const defaults = isArray$2(fallback) ? fallback : isPlainObject$2(fallback) ? fallback["default"] ? fallback["default"] : null : fallback; block = isString$2(defaults) ? [defaults] : defaults; if (isArray$2(block)) { appendBlockToChain(chain, block, false); } context.__localeChainCache.set(start, chain); } return chain; } function appendBlockToChain(chain, block, blocks) { let follow = true; for (let i = 0; i < block.length && isBoolean(follow); i++) { const locale = block[i]; if (isString$2(locale)) { follow = appendLocaleToChain(chain, block[i], blocks); } } return follow; } function appendLocaleToChain(chain, locale, blocks) { let follow; const tokens = locale.split("-"); do { const target = tokens.join("-"); follow = appendItemToChain(chain, target, blocks); tokens.splice(-1, 1); } while (tokens.length && follow === true); return follow; } function appendItemToChain(chain, target, blocks) { let follow = false; if (!chain.includes(target)) { follow = true; if (target) { follow = target[target.length - 1] !== "!"; const locale = target.replace(/!/g, ""); chain.push(locale); if ((isArray$2(blocks) || isPlainObject$2(blocks)) && blocks[locale]) { follow = blocks[locale]; } } } return follow; } function updateFallbackLocale(ctx, locale, fallback) { const context = ctx; context.__localeChainCache = /* @__PURE__ */ new Map(); getLocaleChain(ctx, fallback, locale); } function createCoreError(code2) { return createCompileError(code2, null, { messages: errorMessages$1 }); } const errorMessages$1 = { [ 14 /* INVALID_ARGUMENT */ ]: "Invalid arguments", [ 15 /* INVALID_DATE_ARGUMENT */ ]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.", [ 16 /* INVALID_ISO_DATE_ARGUMENT */ ]: "The argument provided is not a valid ISO date string" }; const NOOP_MESSAGE_FUNCTION = () => ""; const isMessageFunction = (val) => isFunction$2(val); function translate(context, ...args) { const { fallbackFormat, postTranslation, unresolving, fallbackLocale, messages: messages2 } = context; const [key, options] = parseTranslateArgs(...args); const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; const escapeParameter = isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter; const resolvedMessage = !!options.resolvedMessage; const defaultMsgOrKey = isString$2(options.default) || isBoolean(options.default) ? !isBoolean(options.default) ? options.default : key : fallbackFormat ? key : ""; const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== ""; const locale = isString$2(options.locale) ? options.locale : context.locale; escapeParameter && escapeParams(options); let [format2, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) : [ key, locale, messages2[locale] || {} ]; let cacheBaseKey = key; if (!resolvedMessage && !(isString$2(format2) || isMessageFunction(format2))) { if (enableDefaultMsg) { format2 = defaultMsgOrKey; cacheBaseKey = format2; } } if (!resolvedMessage && (!(isString$2(format2) || isMessageFunction(format2)) || !isString$2(targetLocale))) { return unresolving ? NOT_REOSLVED : key; } if (isString$2(format2) && context.messageCompiler == null) { warn$1(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${key}'.`); return key; } let occurred = false; const errorDetector = () => { occurred = true; }; const msg = !isMessageFunction(format2) ? compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) : format2; if (occurred) { return format2; } const ctxOptions = getMessageContextOptions(context, targetLocale, message, options); const msgContext = createMessageContext(ctxOptions); const messaged = evaluateMessage(context, msg, msgContext); const ret = postTranslation ? postTranslation(messaged) : messaged; { const payloads = { timestamp: Date.now(), key: isString$2(key) ? key : isMessageFunction(format2) ? format2.key : "", locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""), format: isString$2(format2) ? format2 : isMessageFunction(format2) ? format2.source : "", message: ret }; payloads.meta = assign$2({}, context.__meta, getAdditionalMeta() || {}); translateDevTools(payloads); } return ret; } function escapeParams(options) { if (isArray$2(options.list)) { options.list = options.list.map((item) => isString$2(item) ? escapeHtml(item) : item); } else if (isObject$5(options.named)) { Object.keys(options.named).forEach((key) => { if (isString$2(options.named[key])) { options.named[key] = escapeHtml(options.named[key]); } }); } } function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) { const { messages: messages2, onWarn } = context; const locales = getLocaleChain(context, fallbackLocale, locale); let message = {}; let targetLocale; let format2 = null; let from = locale; let to = null; const type2 = "translate"; for (let i = 0; i < locales.length; i++) { targetLocale = to = locales[i]; if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) { onWarn(getWarnMessage$1(1, { key, target: targetLocale })); } if (locale !== targetLocale) { const emitter = context.__v_emitter; if (emitter) { emitter.emit("fallback", { type: type2, key, from, to, groupId: `${type2}:${key}` }); } } message = messages2[targetLocale] || {}; let start = null; let startTag; let endTag; if (inBrowser) { start = window.performance.now(); startTag = "intlify-message-resolve-start"; endTag = "intlify-message-resolve-end"; mark && mark(startTag); } if ((format2 = resolveValue(message, key)) === null) { format2 = message[key]; } if (inBrowser) { const end = window.performance.now(); const emitter = context.__v_emitter; if (emitter && start && format2) { emitter.emit("message-resolve", { type: "message-resolve", key, message: format2, time: end - start, groupId: `${type2}:${key}` }); } if (startTag && endTag && mark && measure) { mark(endTag); measure("intlify message resolve", startTag, endTag); } } if (isString$2(format2) || isFunction$2(format2)) break; const missingRet = handleMissing(context, key, targetLocale, missingWarn, type2); if (missingRet !== key) { format2 = missingRet; } from = to; } return [format2, targetLocale, message]; } function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) { const { messageCompiler, warnHtmlMessage } = context; if (isMessageFunction(format2)) { const msg2 = format2; msg2.locale = msg2.locale || targetLocale; msg2.key = msg2.key || key; return msg2; } let start = null; let startTag; let endTag; if (inBrowser) { start = window.performance.now(); startTag = "intlify-message-compilation-start"; endTag = "intlify-message-compilation-end"; mark && mark(startTag); } const msg = messageCompiler(format2, getCompileOptions(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, errorDetector)); if (inBrowser) { const end = window.performance.now(); const emitter = context.__v_emitter; if (emitter && start) { emitter.emit("message-compilation", { type: "message-compilation", message: format2, time: end - start, groupId: `${"translate"}:${key}` }); } if (startTag && endTag && mark && measure) { mark(endTag); measure("intlify message compilation", startTag, endTag); } } msg.locale = targetLocale; msg.key = key; msg.source = format2; return msg; } function evaluateMessage(context, msg, msgCtx) { let start = null; let startTag; let endTag; if (inBrowser) { start = window.performance.now(); startTag = "intlify-message-evaluation-start"; endTag = "intlify-message-evaluation-end"; mark && mark(startTag); } const messaged = msg(msgCtx); if (inBrowser) { const end = window.performance.now(); const emitter = context.__v_emitter; if (emitter && start) { emitter.emit("message-evaluation", { type: "message-evaluation", value: messaged, time: end - start, groupId: `${"translate"}:${msg.key}` }); } if (startTag && endTag && mark && measure) { mark(endTag); measure("intlify message evaluation", startTag, endTag); } } return messaged; } function parseTranslateArgs(...args) { const [arg1, arg2, arg3] = args; const options = {}; if (!isString$2(arg1) && !isNumber$1(arg1) && !isMessageFunction(arg1)) { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } const key = isNumber$1(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1; if (isNumber$1(arg2)) { options.plural = arg2; } else if (isString$2(arg2)) { options.default = arg2; } else if (isPlainObject$2(arg2) && !isEmptyObject(arg2)) { options.named = arg2; } else if (isArray$2(arg2)) { options.list = arg2; } if (isNumber$1(arg3)) { options.plural = arg3; } else if (isString$2(arg3)) { options.default = arg3; } else if (isPlainObject$2(arg3)) { assign$2(options, arg3); } return [key, options]; } function getCompileOptions(context, locale, key, source, warnHtmlMessage, errorDetector) { return { warnHtmlMessage, onError: (err) => { errorDetector && errorDetector(err); { const message = `Message compilation error: ${err.message}`; const codeFrame = err.location && generateCodeFrame(source, err.location.start.offset, err.location.end.offset); const emitter = context.__v_emitter; if (emitter) { emitter.emit("compile-error", { message: source, error: err.message, start: err.location && err.location.start.offset, end: err.location && err.location.end.offset, groupId: `${"translate"}:${key}` }); } console.error(codeFrame ? `${message} ${codeFrame}` : message); } }, onCacheKey: (source2) => generateFormatCacheKey(locale, key, source2) }; } function getMessageContextOptions(context, locale, message, options) { const { modifiers, pluralRules } = context; const resolveMessage = (key) => { const val = resolveValue(message, key); if (isString$2(val)) { let occurred = false; const errorDetector = () => { occurred = true; }; const msg = compileMessageFormat(context, key, locale, val, key, errorDetector); return !occurred ? msg : NOOP_MESSAGE_FUNCTION; } else if (isMessageFunction(val)) { return val; } else { return NOOP_MESSAGE_FUNCTION; } }; const ctxOptions = { locale, modifiers, pluralRules, messages: resolveMessage }; if (context.processor) { ctxOptions.processor = context.processor; } if (options.list) { ctxOptions.list = options.list; } if (options.named) { ctxOptions.named = options.named; } if (isNumber$1(options.plural)) { ctxOptions.pluralIndex = options.plural; } return ctxOptions; } const intlDefined = typeof Intl !== "undefined"; const Availabilities = { dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== "undefined", numberFormat: intlDefined && typeof Intl.NumberFormat !== "undefined" }; function datetime(context, ...args) { const { datetimeFormats, unresolving, fallbackLocale, onWarn } = context; const { __datetimeFormatters } = context; if (!Availabilities.dateTimeFormat) { onWarn(getWarnMessage$1( 4 /* CANNOT_FORMAT_DATE */ )); return MISSING_RESOLVE_VALUE; } const [key, value, options, overrides] = parseDateTimeArgs(...args); const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; const part = !!options.part; const locale = isString$2(options.locale) ? options.locale : context.locale; const locales = getLocaleChain(context, fallbackLocale, locale); if (!isString$2(key) || key === "") { return new Intl.DateTimeFormat(locale).format(value); } let datetimeFormat = {}; let targetLocale; let format2 = null; let from = locale; let to = null; const type2 = "datetime format"; for (let i = 0; i < locales.length; i++) { targetLocale = to = locales[i]; if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) { onWarn(getWarnMessage$1(5, { key, target: targetLocale })); } if (locale !== targetLocale) { const emitter = context.__v_emitter; if (emitter) { emitter.emit("fallback", { type: type2, key, from, to, groupId: `${type2}:${key}` }); } } datetimeFormat = datetimeFormats[targetLocale] || {}; format2 = datetimeFormat[key]; if (isPlainObject$2(format2)) break; handleMissing(context, key, targetLocale, missingWarn, type2); from = to; } if (!isPlainObject$2(format2) || !isString$2(targetLocale)) { return unresolving ? NOT_REOSLVED : key; } let id = `${targetLocale}__${key}`; if (!isEmptyObject(overrides)) { id = `${id}__${JSON.stringify(overrides)}`; } let formatter = __datetimeFormatters.get(id); if (!formatter) { formatter = new Intl.DateTimeFormat(targetLocale, assign$2({}, format2, overrides)); __datetimeFormatters.set(id, formatter); } return !part ? formatter.format(value) : formatter.formatToParts(value); } function parseDateTimeArgs(...args) { const [arg1, arg2, arg3, arg4] = args; let options = {}; let overrides = {}; let value; if (isString$2(arg1)) { if (!/\d{4}-\d{2}-\d{2}(T.*)?/.test(arg1)) { throw createCoreError( 16 /* INVALID_ISO_DATE_ARGUMENT */ ); } value = new Date(arg1); try { value.toISOString(); } catch (e) { throw createCoreError( 16 /* INVALID_ISO_DATE_ARGUMENT */ ); } } else if (isDate(arg1)) { if (isNaN(arg1.getTime())) { throw createCoreError( 15 /* INVALID_DATE_ARGUMENT */ ); } value = arg1; } else if (isNumber$1(arg1)) { value = arg1; } else { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } if (isString$2(arg2)) { options.key = arg2; } else if (isPlainObject$2(arg2)) { options = arg2; } if (isString$2(arg3)) { options.locale = arg3; } else if (isPlainObject$2(arg3)) { overrides = arg3; } if (isPlainObject$2(arg4)) { overrides = arg4; } return [options.key || "", value, options, overrides]; } function clearDateTimeFormat(ctx, locale, format2) { const context = ctx; for (const key in format2) { const id = `${locale}__${key}`; if (!context.__datetimeFormatters.has(id)) { continue; } context.__datetimeFormatters.delete(id); } } function number$1(context, ...args) { const { numberFormats, unresolving, fallbackLocale, onWarn } = context; const { __numberFormatters } = context; if (!Availabilities.numberFormat) { onWarn(getWarnMessage$1( 2 /* CANNOT_FORMAT_NUMBER */ )); return MISSING_RESOLVE_VALUE; } const [key, value, options, overrides] = parseNumberArgs(...args); const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; const part = !!options.part; const locale = isString$2(options.locale) ? options.locale : context.locale; const locales = getLocaleChain(context, fallbackLocale, locale); if (!isString$2(key) || key === "") { return new Intl.NumberFormat(locale).format(value); } let numberFormat = {}; let targetLocale; let format2 = null; let from = locale; let to = null; const type2 = "number format"; for (let i = 0; i < locales.length; i++) { targetLocale = to = locales[i]; if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) { onWarn(getWarnMessage$1(3, { key, target: targetLocale })); } if (locale !== targetLocale) { const emitter = context.__v_emitter; if (emitter) { emitter.emit("fallback", { type: type2, key, from, to, groupId: `${type2}:${key}` }); } } numberFormat = numberFormats[targetLocale] || {}; format2 = numberFormat[key]; if (isPlainObject$2(format2)) break; handleMissing(context, key, targetLocale, missingWarn, type2); from = to; } if (!isPlainObject$2(format2) || !isString$2(targetLocale)) { return unresolving ? NOT_REOSLVED : key; } let id = `${targetLocale}__${key}`; if (!isEmptyObject(overrides)) { id = `${id}__${JSON.stringify(overrides)}`; } let formatter = __numberFormatters.get(id); if (!formatter) { formatter = new Intl.NumberFormat(targetLocale, assign$2({}, format2, overrides)); __numberFormatters.set(id, formatter); } return !part ? formatter.format(value) : formatter.formatToParts(value); } function parseNumberArgs(...args) { const [arg1, arg2, arg3, arg4] = args; let options = {}; let overrides = {}; if (!isNumber$1(arg1)) { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } const value = arg1; if (isString$2(arg2)) { options.key = arg2; } else if (isPlainObject$2(arg2)) { options = arg2; } if (isString$2(arg3)) { options.locale = arg3; } else if (isPlainObject$2(arg3)) { overrides = arg3; } if (isPlainObject$2(arg4)) { overrides = arg4; } return [options.key || "", value, options, overrides]; } function clearNumberFormat(ctx, locale, format2) { const context = ctx; for (const key in format2) { const id = `${locale}__${key}`; if (!context.__numberFormatters.has(id)) { continue; } context.__numberFormatters.delete(id); } } function getDevtoolsGlobalHook$1() { return getTarget$1().__VUE_DEVTOOLS_GLOBAL_HOOK__; } function getTarget$1() { return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : {}; } const isProxyAvailable$1 = typeof Proxy === "function"; const HOOK_SETUP$1 = "devtools-plugin:setup"; const HOOK_PLUGIN_SETTINGS_SET$1 = "plugin:settings:set"; let supported$1; let perf$1; function isPerformanceSupported$1() { var _a2; if (supported$1 !== void 0) { return supported$1; } if (typeof window !== "undefined" && window.performance) { supported$1 = true; perf$1 = window.performance; } else if (typeof globalThis !== "undefined" && ((_a2 = globalThis.perf_hooks) === null || _a2 === void 0 ? void 0 : _a2.performance)) { supported$1 = true; perf$1 = globalThis.perf_hooks.performance; } else { supported$1 = false; } return supported$1; } function now$1() { return isPerformanceSupported$1() ? perf$1.now() : Date.now(); } let ApiProxy$1 = class ApiProxy { constructor(plugin, hook) { this.target = null; this.targetQueue = []; this.onQueue = []; this.plugin = plugin; this.hook = hook; const defaultSettings = {}; if (plugin.settings) { for (const id in plugin.settings) { const item = plugin.settings[id]; defaultSettings[id] = item.defaultValue; } } const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`; let currentSettings = Object.assign({}, defaultSettings); try { const raw = localStorage.getItem(localSettingsSaveId); const data = JSON.parse(raw); Object.assign(currentSettings, data); } catch (e) { } this.fallbacks = { getSettings() { return currentSettings; }, setSettings(value) { try { localStorage.setItem(localSettingsSaveId, JSON.stringify(value)); } catch (e) { } currentSettings = value; }, now() { return now$1(); } }; if (hook) { hook.on(HOOK_PLUGIN_SETTINGS_SET$1, (pluginId, value) => { if (pluginId === this.plugin.id) { this.fallbacks.setSettings(value); } }); } this.proxiedOn = new Proxy({}, { get: (_target, prop) => { if (this.target) { return this.target.on[prop]; } else { return (...args) => { this.onQueue.push({ method: prop, args }); }; } } }); this.proxiedTarget = new Proxy({}, { get: (_target, prop) => { if (this.target) { return this.target[prop]; } else if (prop === "on") { return this.proxiedOn; } else if (Object.keys(this.fallbacks).includes(prop)) { return (...args) => { this.targetQueue.push({ method: prop, args, resolve: () => { } }); return this.fallbacks[prop](...args); }; } else { return (...args) => { return new Promise((resolve2) => { this.targetQueue.push({ method: prop, args, resolve: resolve2 }); }); }; } } }); } async setRealTarget(target) { this.target = target; for (const item of this.onQueue) { this.target.on[item.method](...item.args); } for (const item of this.targetQueue) { item.resolve(await this.target[item.method](...item.args)); } } }; function setupDevtoolsPlugin$1(pluginDescriptor, setupFn) { const descriptor = pluginDescriptor; const target = getTarget$1(); const hook = getDevtoolsGlobalHook$1(); const enableProxy = isProxyAvailable$1 && descriptor.enableEarlyProxy; if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { hook.emit(HOOK_SETUP$1, pluginDescriptor, setupFn); } else { const proxy = enableProxy ? new ApiProxy$1(descriptor, hook) : null; const list2 = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; list2.push({ pluginDescriptor: descriptor, setupFn, proxy }); if (proxy) { setupFn(proxy.proxiedTarget); } } } /*! * @intlify/vue-devtools v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const VueDevToolsLabels = { [ "vue-devtools-plugin-vue-i18n" /* PLUGIN */ ]: "Vue I18n devtools", [ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ]: "I18n Resources", [ "vue-i18n-timeline" /* TIMELINE */ ]: "Vue I18n" }; const VueDevToolsPlaceholders = { [ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ]: "Search for scopes ..." }; const VueDevToolsTimelineColors = { [ "vue-i18n-timeline" /* TIMELINE */ ]: 16764185 }; /*! * vue-i18n v9.1.9 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */ const VERSION = "9.1.9"; function initFeatureFlags() { let needWarn = false; { needWarn = true; } if (needWarn) { console.warn(`You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.`); } } const warnMessages = { [ 6 /* FALLBACK_TO_ROOT */ ]: `Fall back to {type} '{key}' with root locale.`, [ 7 /* NOT_SUPPORTED_PRESERVE */ ]: `Not supported 'preserve'.`, [ 8 /* NOT_SUPPORTED_FORMATTER */ ]: `Not supported 'formatter'.`, [ 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ ]: `Not supported 'preserveDirectiveContent'.`, [ 10 /* NOT_SUPPORTED_GET_CHOICE_INDEX */ ]: `Not supported 'getChoiceIndex'.`, [ 11 /* COMPONENT_NAME_LEGACY_COMPATIBLE */ ]: `Component name legacy compatible: '{name}' -> 'i18n'`, [ 12 /* NOT_FOUND_PARENT_SCOPE */ ]: `Not found parent scope. use the global scope.` }; function getWarnMessage(code2, ...args) { return format$2(warnMessages[code2], ...args); } function createI18nError(code2, ...args) { return createCompileError(code2, null, { messages: errorMessages, args }); } const errorMessages = { [ 14 /* UNEXPECTED_RETURN_TYPE */ ]: "Unexpected return type in composer", [ 15 /* INVALID_ARGUMENT */ ]: "Invalid argument", [ 16 /* MUST_BE_CALL_SETUP_TOP */ ]: "Must be called at the top of a `setup` function", [ 17 /* NOT_INSLALLED */ ]: "Need to install with `app.use` function", [ 22 /* UNEXPECTED_ERROR */ ]: "Unexpected error", [ 18 /* NOT_AVAILABLE_IN_LEGACY_MODE */ ]: "Not available in legacy mode", [ 19 /* REQUIRED_VALUE */ ]: `Required in value: {0}`, [ 20 /* INVALID_VALUE */ ]: `Invalid value`, [ 21 /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */ ]: `Cannot setup vue-devtools plugin` }; const DEVTOOLS_META = "__INTLIFY_META__"; const TransrateVNodeSymbol = makeSymbol("__transrateVNode"); const DatetimePartsSymbol = makeSymbol("__datetimeParts"); const NumberPartsSymbol = makeSymbol("__numberParts"); const EnableEmitter = makeSymbol("__enableEmitter"); const DisableEmitter = makeSymbol("__disableEmitter"); const SetPluralRulesSymbol = makeSymbol("__setPluralRules"); const InejctWithOption = makeSymbol("__injectWithOption"); let composerID = 0; function defineCoreMissingHandler(missing) { return (ctx, locale, key, type2) => { return missing(locale, key, vue.getCurrentInstance() || void 0, type2); }; } function getLocaleMessages(locale, options) { const { messages: messages2, __i18n } = options; const ret = isPlainObject$2(messages2) ? messages2 : isArray$2(__i18n) ? {} : { [locale]: {} }; if (isArray$2(__i18n)) { __i18n.forEach(({ locale: locale2, resource }) => { if (locale2) { ret[locale2] = ret[locale2] || {}; deepCopy$1(resource, ret[locale2]); } else { deepCopy$1(resource, ret); } }); } if (options.flatJson) { for (const key in ret) { if (hasOwn$2(ret, key)) { handleFlatJson(ret[key]); } } } return ret; } const isNotObjectOrIsArray = (val) => !isObject$5(val) || isArray$2(val); function deepCopy$1(src, des) { if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) { throw createI18nError( 20 /* INVALID_VALUE */ ); } for (const key in src) { if (hasOwn$2(src, key)) { if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) { des[key] = src[key]; } else { deepCopy$1(src[key], des[key]); } } } } const getMetaInfo = () => { const instance = vue.getCurrentInstance(); return instance && instance.type[DEVTOOLS_META] ? { [DEVTOOLS_META]: instance.type[DEVTOOLS_META] } : null; }; function createComposer(options = {}) { const { __root } = options; const _isGlobal = __root === void 0; let _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true; const _locale = vue.ref( // prettier-ignore __root && _inheritLocale ? __root.locale.value : isString$2(options.locale) ? options.locale : "en-US" ); const _fallbackLocale = vue.ref( // prettier-ignore __root && _inheritLocale ? __root.fallbackLocale.value : isString$2(options.fallbackLocale) || isArray$2(options.fallbackLocale) || isPlainObject$2(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value ); const _messages = vue.ref(getLocaleMessages(_locale.value, options)); const _datetimeFormats = vue.ref(isPlainObject$2(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} }); const _numberFormats = vue.ref(isPlainObject$2(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} }); let _missingWarn = __root ? __root.missingWarn : isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true; let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true; let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean(options.fallbackRoot) ? options.fallbackRoot : true; let _fallbackFormat = !!options.fallbackFormat; let _missing = isFunction$2(options.missing) ? options.missing : null; let _runtimeMissing = isFunction$2(options.missing) ? defineCoreMissingHandler(options.missing) : null; let _postTranslation = isFunction$2(options.postTranslation) ? options.postTranslation : null; let _warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true; let _escapeParameter = !!options.escapeParameter; const _modifiers = __root ? __root.modifiers : isPlainObject$2(options.modifiers) ? options.modifiers : {}; let _pluralRules = options.pluralRules || __root && __root.pluralRules; let _context; function getCoreContext() { return createCoreContext({ version: VERSION, locale: _locale.value, fallbackLocale: _fallbackLocale.value, messages: _messages.value, messageCompiler: function compileToFunction(source) { return (ctx) => { return ctx.normalize([source]); }; }, datetimeFormats: _datetimeFormats.value, numberFormats: _numberFormats.value, modifiers: _modifiers, pluralRules: _pluralRules, missing: _runtimeMissing === null ? void 0 : _runtimeMissing, missingWarn: _missingWarn, fallbackWarn: _fallbackWarn, fallbackFormat: _fallbackFormat, unresolving: true, postTranslation: _postTranslation === null ? void 0 : _postTranslation, warnHtmlMessage: _warnHtmlMessage, escapeParameter: _escapeParameter, __datetimeFormatters: isPlainObject$2(_context) ? _context.__datetimeFormatters : void 0, __numberFormatters: isPlainObject$2(_context) ? _context.__numberFormatters : void 0, __v_emitter: isPlainObject$2(_context) ? _context.__v_emitter : void 0, __meta: { framework: "vue" } }); } _context = getCoreContext(); updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); function trackReactivityValues() { return [ _locale.value, _fallbackLocale.value, _messages.value, _datetimeFormats.value, _numberFormats.value ]; } const locale = vue.computed({ get: () => _locale.value, set: (val) => { _locale.value = val; _context.locale = _locale.value; } }); const fallbackLocale = vue.computed({ get: () => _fallbackLocale.value, set: (val) => { _fallbackLocale.value = val; _context.fallbackLocale = _fallbackLocale.value; updateFallbackLocale(_context, _locale.value, val); } }); const messages2 = vue.computed(() => _messages.value); const datetimeFormats = vue.computed(() => _datetimeFormats.value); const numberFormats = vue.computed(() => _numberFormats.value); function getPostTranslationHandler() { return isFunction$2(_postTranslation) ? _postTranslation : null; } function setPostTranslationHandler(handler) { _postTranslation = handler; _context.postTranslation = handler; } function getMissingHandler() { return _missing; } function setMissingHandler(handler) { if (handler !== null) { _runtimeMissing = defineCoreMissingHandler(handler); } _missing = handler; _context.missing = _runtimeMissing; } function isResolvedTranslateMessage(type2, arg) { return type2 !== "translate" || !!arg.resolvedMessage === false; } function wrapWithDeps(fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) { trackReactivityValues(); let ret; { try { setAdditionalMeta(getMetaInfo()); ret = fn(_context); } finally { setAdditionalMeta(null); } } if (isNumber$1(ret) && ret === NOT_REOSLVED) { const [key, arg2] = argumentParser(); if (__root && isString$2(key) && isResolvedTranslateMessage(warnType, arg2)) { if (_fallbackRoot && (isTranslateFallbackWarn(_fallbackWarn, key) || isTranslateMissingWarn(_missingWarn, key))) { warn$1(getWarnMessage(6, { key, type: warnType })); } { const { __v_emitter: emitter } = _context; if (emitter && _fallbackRoot) { emitter.emit("fallback", { type: warnType, key, to: "global", groupId: `${warnType}:${key}` }); } } } return __root && _fallbackRoot ? fallbackSuccess(__root) : fallbackFail(key); } else if (successCondition(ret)) { return ret; } else { throw createI18nError( 14 /* UNEXPECTED_RETURN_TYPE */ ); } } function t2(...args) { return wrapWithDeps((context) => translate(context, ...args), () => parseTranslateArgs(...args), "translate", (root) => root.t(...args), (key) => key, (val) => isString$2(val)); } function rt(...args) { const [arg1, arg2, arg3] = args; if (arg3 && !isObject$5(arg3)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } return t2(...[arg1, arg2, assign$2({ resolvedMessage: true }, arg3 || {})]); } function d(...args) { return wrapWithDeps((context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", (root) => root.d(...args), () => MISSING_RESOLVE_VALUE, (val) => isString$2(val)); } function n(...args) { return wrapWithDeps((context) => number$1(context, ...args), () => parseNumberArgs(...args), "number format", (root) => root.n(...args), () => MISSING_RESOLVE_VALUE, (val) => isString$2(val)); } function normalize(values) { return values.map((val) => isString$2(val) ? vue.createVNode(vue.Text, null, val, 0) : val); } const interpolate = (val) => val; const processor = { normalize, interpolate, type: "vnode" }; function transrateVNode(...args) { return wrapWithDeps( (context) => { let ret; const _context2 = context; try { _context2.processor = processor; ret = translate(_context2, ...args); } finally { _context2.processor = null; } return ret; }, () => parseTranslateArgs(...args), "translate", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[TransrateVNodeSymbol](...args), (key) => [vue.createVNode(vue.Text, null, key, 0)], (val) => isArray$2(val) ); } function numberParts(...args) { return wrapWithDeps( (context) => number$1(context, ...args), () => parseNumberArgs(...args), "number format", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[NumberPartsSymbol](...args), () => [], (val) => isString$2(val) || isArray$2(val) ); } function datetimeParts(...args) { return wrapWithDeps( (context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[DatetimePartsSymbol](...args), () => [], (val) => isString$2(val) || isArray$2(val) ); } function setPluralRules(rules2) { _pluralRules = rules2; _context.pluralRules = _pluralRules; } function te(key, locale2) { const targetLocale = isString$2(locale2) ? locale2 : _locale.value; const message = getLocaleMessage(targetLocale); return resolveValue(message, key) !== null; } function resolveMessages(key) { let messages22 = null; const locales = getLocaleChain(_context, _fallbackLocale.value, _locale.value); for (let i = 0; i < locales.length; i++) { const targetLocaleMessages = _messages.value[locales[i]] || {}; const messageValue = resolveValue(targetLocaleMessages, key); if (messageValue != null) { messages22 = messageValue; break; } } return messages22; } function tm(key) { const messages22 = resolveMessages(key); return messages22 != null ? messages22 : __root ? __root.tm(key) || {} : {}; } function getLocaleMessage(locale2) { return _messages.value[locale2] || {}; } function setLocaleMessage(locale2, message) { _messages.value[locale2] = message; _context.messages = _messages.value; } function mergeLocaleMessage(locale2, message) { _messages.value[locale2] = _messages.value[locale2] || {}; deepCopy$1(message, _messages.value[locale2]); _context.messages = _messages.value; } function getDateTimeFormat(locale2) { return _datetimeFormats.value[locale2] || {}; } function setDateTimeFormat(locale2, format2) { _datetimeFormats.value[locale2] = format2; _context.datetimeFormats = _datetimeFormats.value; clearDateTimeFormat(_context, locale2, format2); } function mergeDateTimeFormat(locale2, format2) { _datetimeFormats.value[locale2] = assign$2(_datetimeFormats.value[locale2] || {}, format2); _context.datetimeFormats = _datetimeFormats.value; clearDateTimeFormat(_context, locale2, format2); } function getNumberFormat(locale2) { return _numberFormats.value[locale2] || {}; } function setNumberFormat(locale2, format2) { _numberFormats.value[locale2] = format2; _context.numberFormats = _numberFormats.value; clearNumberFormat(_context, locale2, format2); } function mergeNumberFormat(locale2, format2) { _numberFormats.value[locale2] = assign$2(_numberFormats.value[locale2] || {}, format2); _context.numberFormats = _numberFormats.value; clearNumberFormat(_context, locale2, format2); } composerID++; if (__root) { vue.watch(__root.locale, (val) => { if (_inheritLocale) { _locale.value = val; _context.locale = val; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }); vue.watch(__root.fallbackLocale, (val) => { if (_inheritLocale) { _fallbackLocale.value = val; _context.fallbackLocale = val; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }); } const composer = { id: composerID, locale, fallbackLocale, get inheritLocale() { return _inheritLocale; }, set inheritLocale(val) { _inheritLocale = val; if (val && __root) { _locale.value = __root.locale.value; _fallbackLocale.value = __root.fallbackLocale.value; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }, get availableLocales() { return Object.keys(_messages.value).sort(); }, messages: messages2, datetimeFormats, numberFormats, get modifiers() { return _modifiers; }, get pluralRules() { return _pluralRules || {}; }, get isGlobal() { return _isGlobal; }, get missingWarn() { return _missingWarn; }, set missingWarn(val) { _missingWarn = val; _context.missingWarn = _missingWarn; }, get fallbackWarn() { return _fallbackWarn; }, set fallbackWarn(val) { _fallbackWarn = val; _context.fallbackWarn = _fallbackWarn; }, get fallbackRoot() { return _fallbackRoot; }, set fallbackRoot(val) { _fallbackRoot = val; }, get fallbackFormat() { return _fallbackFormat; }, set fallbackFormat(val) { _fallbackFormat = val; _context.fallbackFormat = _fallbackFormat; }, get warnHtmlMessage() { return _warnHtmlMessage; }, set warnHtmlMessage(val) { _warnHtmlMessage = val; _context.warnHtmlMessage = val; }, get escapeParameter() { return _escapeParameter; }, set escapeParameter(val) { _escapeParameter = val; _context.escapeParameter = val; }, t: t2, rt, d, n, te, tm, getLocaleMessage, setLocaleMessage, mergeLocaleMessage, getDateTimeFormat, setDateTimeFormat, mergeDateTimeFormat, getNumberFormat, setNumberFormat, mergeNumberFormat, getPostTranslationHandler, setPostTranslationHandler, getMissingHandler, setMissingHandler, [TransrateVNodeSymbol]: transrateVNode, [NumberPartsSymbol]: numberParts, [DatetimePartsSymbol]: datetimeParts, [SetPluralRulesSymbol]: setPluralRules, [InejctWithOption]: options.__injectWithOption // eslint-disable-line @typescript-eslint/no-explicit-any }; { composer[EnableEmitter] = (emitter) => { _context.__v_emitter = emitter; }; composer[DisableEmitter] = () => { _context.__v_emitter = void 0; }; } return composer; } function convertComposerOptions(options) { const locale = isString$2(options.locale) ? options.locale : "en-US"; const fallbackLocale = isString$2(options.fallbackLocale) || isArray$2(options.fallbackLocale) || isPlainObject$2(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale; const missing = isFunction$2(options.missing) ? options.missing : void 0; const missingWarn = isBoolean(options.silentTranslationWarn) || isRegExp(options.silentTranslationWarn) ? !options.silentTranslationWarn : true; const fallbackWarn = isBoolean(options.silentFallbackWarn) || isRegExp(options.silentFallbackWarn) ? !options.silentFallbackWarn : true; const fallbackRoot = isBoolean(options.fallbackRoot) ? options.fallbackRoot : true; const fallbackFormat = !!options.formatFallbackMessages; const modifiers = isPlainObject$2(options.modifiers) ? options.modifiers : {}; const pluralizationRules = options.pluralizationRules; const postTranslation = isFunction$2(options.postTranslation) ? options.postTranslation : void 0; const warnHtmlMessage = isString$2(options.warnHtmlInMessage) ? options.warnHtmlInMessage !== "off" : true; const escapeParameter = !!options.escapeParameterHtml; const inheritLocale = isBoolean(options.sync) ? options.sync : true; if (options.formatter) { warn$1(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); } if (options.preserveDirectiveContent) { warn$1(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); } let messages2 = options.messages; if (isPlainObject$2(options.sharedMessages)) { const sharedMessages = options.sharedMessages; const locales = Object.keys(sharedMessages); messages2 = locales.reduce((messages22, locale2) => { const message = messages22[locale2] || (messages22[locale2] = {}); assign$2(message, sharedMessages[locale2]); return messages22; }, messages2 || {}); } const { __i18n, __root, __injectWithOption } = options; const datetimeFormats = options.datetimeFormats; const numberFormats = options.numberFormats; const flatJson = options.flatJson; return { locale, fallbackLocale, messages: messages2, flatJson, datetimeFormats, numberFormats, missing, missingWarn, fallbackWarn, fallbackRoot, fallbackFormat, modifiers, pluralRules: pluralizationRules, postTranslation, warnHtmlMessage, escapeParameter, inheritLocale, __i18n, __root, __injectWithOption }; } function createVueI18n(options = {}) { const composer = createComposer(convertComposerOptions(options)); const vueI18n = { // id id: composer.id, // locale get locale() { return composer.locale.value; }, set locale(val) { composer.locale.value = val; }, // fallbackLocale get fallbackLocale() { return composer.fallbackLocale.value; }, set fallbackLocale(val) { composer.fallbackLocale.value = val; }, // messages get messages() { return composer.messages.value; }, // datetimeFormats get datetimeFormats() { return composer.datetimeFormats.value; }, // numberFormats get numberFormats() { return composer.numberFormats.value; }, // availableLocales get availableLocales() { return composer.availableLocales; }, // formatter get formatter() { warn$1(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); return { interpolate() { return []; } }; }, set formatter(val) { warn$1(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); }, // missing get missing() { return composer.getMissingHandler(); }, set missing(handler) { composer.setMissingHandler(handler); }, // silentTranslationWarn get silentTranslationWarn() { return isBoolean(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn; }, set silentTranslationWarn(val) { composer.missingWarn = isBoolean(val) ? !val : val; }, // silentFallbackWarn get silentFallbackWarn() { return isBoolean(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn; }, set silentFallbackWarn(val) { composer.fallbackWarn = isBoolean(val) ? !val : val; }, // modifiers get modifiers() { return composer.modifiers; }, // formatFallbackMessages get formatFallbackMessages() { return composer.fallbackFormat; }, set formatFallbackMessages(val) { composer.fallbackFormat = val; }, // postTranslation get postTranslation() { return composer.getPostTranslationHandler(); }, set postTranslation(handler) { composer.setPostTranslationHandler(handler); }, // sync get sync() { return composer.inheritLocale; }, set sync(val) { composer.inheritLocale = val; }, // warnInHtmlMessage get warnHtmlInMessage() { return composer.warnHtmlMessage ? "warn" : "off"; }, set warnHtmlInMessage(val) { composer.warnHtmlMessage = val !== "off"; }, // escapeParameterHtml get escapeParameterHtml() { return composer.escapeParameter; }, set escapeParameterHtml(val) { composer.escapeParameter = val; }, // preserveDirectiveContent get preserveDirectiveContent() { warn$1(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); return true; }, set preserveDirectiveContent(val) { warn$1(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); }, // pluralizationRules get pluralizationRules() { return composer.pluralRules || {}; }, // for internal __composer: composer, // t t(...args) { const [arg1, arg2, arg3] = args; const options2 = {}; let list2 = null; let named = null; if (!isString$2(arg1)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } const key = arg1; if (isString$2(arg2)) { options2.locale = arg2; } else if (isArray$2(arg2)) { list2 = arg2; } else if (isPlainObject$2(arg2)) { named = arg2; } if (isArray$2(arg3)) { list2 = arg3; } else if (isPlainObject$2(arg3)) { named = arg3; } return composer.t(key, list2 || named || {}, options2); }, rt(...args) { return composer.rt(...args); }, // tc tc(...args) { const [arg1, arg2, arg3] = args; const options2 = { plural: 1 }; let list2 = null; let named = null; if (!isString$2(arg1)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } const key = arg1; if (isString$2(arg2)) { options2.locale = arg2; } else if (isNumber$1(arg2)) { options2.plural = arg2; } else if (isArray$2(arg2)) { list2 = arg2; } else if (isPlainObject$2(arg2)) { named = arg2; } if (isString$2(arg3)) { options2.locale = arg3; } else if (isArray$2(arg3)) { list2 = arg3; } else if (isPlainObject$2(arg3)) { named = arg3; } return composer.t(key, list2 || named || {}, options2); }, // te te(key, locale) { return composer.te(key, locale); }, // tm tm(key) { return composer.tm(key); }, // getLocaleMessage getLocaleMessage(locale) { return composer.getLocaleMessage(locale); }, // setLocaleMessage setLocaleMessage(locale, message) { composer.setLocaleMessage(locale, message); }, // mergeLocaleMessage mergeLocaleMessage(locale, message) { composer.mergeLocaleMessage(locale, message); }, // d d(...args) { return composer.d(...args); }, // getDateTimeFormat getDateTimeFormat(locale) { return composer.getDateTimeFormat(locale); }, // setDateTimeFormat setDateTimeFormat(locale, format2) { composer.setDateTimeFormat(locale, format2); }, // mergeDateTimeFormat mergeDateTimeFormat(locale, format2) { composer.mergeDateTimeFormat(locale, format2); }, // n n(...args) { return composer.n(...args); }, // getNumberFormat getNumberFormat(locale) { return composer.getNumberFormat(locale); }, // setNumberFormat setNumberFormat(locale, format2) { composer.setNumberFormat(locale, format2); }, // mergeNumberFormat mergeNumberFormat(locale, format2) { composer.mergeNumberFormat(locale, format2); }, // getChoiceIndex // eslint-disable-next-line @typescript-eslint/no-unused-vars getChoiceIndex(choice, choicesLength) { warn$1(getWarnMessage( 10 /* NOT_SUPPORTED_GET_CHOICE_INDEX */ )); return -1; }, // for internal __onComponentInstanceCreated(target) { const { componentInstanceCreatedListener } = options; if (componentInstanceCreatedListener) { componentInstanceCreatedListener(target, vueI18n); } } }; { vueI18n.__enableEmitter = (emitter) => { const __composer = composer; __composer[EnableEmitter] && __composer[EnableEmitter](emitter); }; vueI18n.__disableEmitter = () => { const __composer = composer; __composer[DisableEmitter] && __composer[DisableEmitter](); }; } return vueI18n; } const baseFormatProps = { tag: { type: [String, Object] }, locale: { type: String }, scope: { type: String, validator: (val) => val === "parent" || val === "global", default: "parent" }, i18n: { type: Object } }; const Translation = { /* eslint-disable */ name: "i18n-t", props: assign$2({ keypath: { type: String, required: true }, plural: { type: [Number, String], // eslint-disable-next-line @typescript-eslint/no-explicit-any validator: (val) => isNumber$1(val) || !isNaN(val) } }, baseFormatProps), /* eslint-enable */ setup(props, context) { const { slots, attrs } = context; const i18n2 = props.i18n || useI18n({ useScope: props.scope, __useComponent: true }); const keys = Object.keys(slots).filter((key) => key !== "_"); return () => { const options = {}; if (props.locale) { options.locale = props.locale; } if (props.plural !== void 0) { options.plural = isString$2(props.plural) ? +props.plural : props.plural; } const arg = getInterpolateArg(context, keys); const children = i18n2[TransrateVNodeSymbol](props.keypath, arg, options); const assignedAttrs = assign$2({}, attrs); return isString$2(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$5(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children); }; } }; function getInterpolateArg({ slots }, keys) { if (keys.length === 1 && keys[0] === "default") { return slots.default ? slots.default() : []; } else { return keys.reduce((arg, key) => { const slot = slots[key]; if (slot) { arg[key] = slot(); } return arg; }, {}); } } function renderFormatter(props, context, slotKeys, partFormatter) { const { slots, attrs } = context; return () => { const options = { part: true }; let overrides = {}; if (props.locale) { options.locale = props.locale; } if (isString$2(props.format)) { options.key = props.format; } else if (isObject$5(props.format)) { if (isString$2(props.format.key)) { options.key = props.format.key; } overrides = Object.keys(props.format).reduce((options2, prop) => { return slotKeys.includes(prop) ? assign$2({}, options2, { [prop]: props.format[prop] }) : options2; }, {}); } const parts = partFormatter(...[props.value, options, overrides]); let children = [options.key]; if (isArray$2(parts)) { children = parts.map((part, index) => { const slot = slots[part.type]; return slot ? slot({ [part.type]: part.value, index, parts }) : [part.value]; }); } else if (isString$2(parts)) { children = [parts]; } const assignedAttrs = assign$2({}, attrs); return isString$2(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$5(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children); }; } const NUMBER_FORMAT_KEYS = [ "localeMatcher", "style", "unit", "unitDisplay", "currency", "currencyDisplay", "useGrouping", "numberingSystem", "minimumIntegerDigits", "minimumFractionDigits", "maximumFractionDigits", "minimumSignificantDigits", "maximumSignificantDigits", "notation", "formatMatcher" ]; const NumberFormat = { /* eslint-disable */ name: "i18n-n", props: assign$2({ value: { type: Number, required: true }, format: { type: [String, Object] } }, baseFormatProps), /* eslint-enable */ setup(props, context) { const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true }); return renderFormatter(props, context, NUMBER_FORMAT_KEYS, (...args) => ( // eslint-disable-next-line @typescript-eslint/no-explicit-any i18n2[NumberPartsSymbol](...args) )); } }; const DATETIME_FORMAT_KEYS = [ "dateStyle", "timeStyle", "fractionalSecondDigits", "calendar", "dayPeriod", "numberingSystem", "localeMatcher", "timeZone", "hour12", "hourCycle", "formatMatcher", "weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName" ]; const DatetimeFormat = { /* eslint-disable */ name: "i18n-d", props: assign$2({ value: { type: [Number, Date], required: true }, format: { type: [String, Object] } }, baseFormatProps), /* eslint-enable */ setup(props, context) { const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true }); return renderFormatter(props, context, DATETIME_FORMAT_KEYS, (...args) => ( // eslint-disable-next-line @typescript-eslint/no-explicit-any i18n2[DatetimePartsSymbol](...args) )); } }; function getComposer$2(i18n2, instance) { const i18nInternal = i18n2; if (i18n2.mode === "composition") { return i18nInternal.__getInstance(instance) || i18n2.global; } else { const vueI18n = i18nInternal.__getInstance(instance); return vueI18n != null ? vueI18n.__composer : i18n2.global.__composer; } } function vTDirective(i18n2) { const bind = (el, { instance, value, modifiers }) => { if (!instance || !instance.$) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const composer = getComposer$2(i18n2, instance.$); if (modifiers.preserve) { warn$1(getWarnMessage( 7 /* NOT_SUPPORTED_PRESERVE */ )); } const parsedValue = parseValue(value); el.textContent = composer.t(...makeParams(parsedValue)); }; return { beforeMount: bind, beforeUpdate: bind }; } function parseValue(value) { if (isString$2(value)) { return { path: value }; } else if (isPlainObject$2(value)) { if (!("path" in value)) { throw createI18nError(19, "path"); } return value; } else { throw createI18nError( 20 /* INVALID_VALUE */ ); } } function makeParams(value) { const { path, locale, args, choice, plural } = value; const options = {}; const named = args || {}; if (isString$2(locale)) { options.locale = locale; } if (isNumber$1(choice)) { options.plural = choice; } if (isNumber$1(plural)) { options.plural = plural; } return [path, named, options]; } function apply(app, i18n2, ...options) { const pluginOptions = isPlainObject$2(options[0]) ? options[0] : {}; const useI18nComponentName = !!pluginOptions.useI18nComponentName; const globalInstall = isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true; if (globalInstall && useI18nComponentName) { warn$1(getWarnMessage(11, { name: Translation.name })); } if (globalInstall) { app.component(!useI18nComponentName ? Translation.name : "i18n", Translation); app.component(NumberFormat.name, NumberFormat); app.component(DatetimeFormat.name, DatetimeFormat); } app.directive("t", vTDirective(i18n2)); } const VUE_I18N_COMPONENT_TYPES = "vue-i18n: composer properties"; let devtoolsApi; async function enableDevTools(app, i18n2) { return new Promise((resolve2, reject) => { try { setupDevtoolsPlugin$1({ id: "vue-devtools-plugin-vue-i18n", label: VueDevToolsLabels[ "vue-devtools-plugin-vue-i18n" /* PLUGIN */ ], packageName: "vue-i18n", homepage: "https://vue-i18n.intlify.dev", logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png", componentStateTypes: [VUE_I18N_COMPONENT_TYPES], app }, (api) => { devtoolsApi = api; api.on.visitComponentTree(({ componentInstance, treeNode }) => { updateComponentTreeTags(componentInstance, treeNode, i18n2); }); api.on.inspectComponent(({ componentInstance, instanceData }) => { if (componentInstance.vnode.el.__VUE_I18N__ && instanceData) { if (i18n2.mode === "legacy") { if (componentInstance.vnode.el.__VUE_I18N__ !== i18n2.global.__composer) { inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__); } } else { inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__); } } }); api.addInspector({ id: "vue-i18n-resource-inspector", label: VueDevToolsLabels[ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ], icon: "language", treeFilterPlaceholder: VueDevToolsPlaceholders[ "vue-i18n-resource-inspector" /* CUSTOM_INSPECTOR */ ] }); api.on.getInspectorTree((payload) => { if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") { registerScope(payload, i18n2); } }); api.on.getInspectorState((payload) => { if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") { inspectScope(payload, i18n2); } }); api.on.editInspectorState((payload) => { if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") { editScope(payload, i18n2); } }); api.addTimelineLayer({ id: "vue-i18n-timeline", label: VueDevToolsLabels[ "vue-i18n-timeline" /* TIMELINE */ ], color: VueDevToolsTimelineColors[ "vue-i18n-timeline" /* TIMELINE */ ] }); resolve2(true); }); } catch (e) { console.error(e); reject(false); } }); } function updateComponentTreeTags(instance, treeNode, i18n2) { const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; if (instance && instance.vnode.el.__VUE_I18N__) { if (instance.vnode.el.__VUE_I18N__ !== global2) { const label = instance.type.name || instance.type.displayName || instance.type.__file; const tag = { label: `i18n (${label} Scope)`, textColor: 0, backgroundColor: 16764185 }; treeNode.tags.push(tag); } } } function inspectComposer(instanceData, composer) { const type2 = VUE_I18N_COMPONENT_TYPES; instanceData.state.push({ type: type2, key: "locale", editable: true, value: composer.locale.value }); instanceData.state.push({ type: type2, key: "availableLocales", editable: false, value: composer.availableLocales }); instanceData.state.push({ type: type2, key: "fallbackLocale", editable: true, value: composer.fallbackLocale.value }); instanceData.state.push({ type: type2, key: "inheritLocale", editable: true, value: composer.inheritLocale }); instanceData.state.push({ type: type2, key: "messages", editable: false, value: getLocaleMessageValue(composer.messages.value) }); instanceData.state.push({ type: type2, key: "datetimeFormats", editable: false, value: composer.datetimeFormats.value }); instanceData.state.push({ type: type2, key: "numberFormats", editable: false, value: composer.numberFormats.value }); } function getLocaleMessageValue(messages2) { const value = {}; Object.keys(messages2).forEach((key) => { const v = messages2[key]; if (isFunction$2(v) && "source" in v) { value[key] = getMessageFunctionDetails(v); } else if (isObject$5(v)) { value[key] = getLocaleMessageValue(v); } else { value[key] = v; } }); return value; } const ESC = { "<": "<", ">": ">", '"': """, "&": "&" }; function escape(s) { return s.replace(/[<>"&]/g, escapeChar); } function escapeChar(a) { return ESC[a] || a; } function getMessageFunctionDetails(func2) { const argString = func2.source ? `("${escape(func2.source)}")` : `(?)`; return { _custom: { type: "function", display: `ƒ ${argString}` } }; } function registerScope(payload, i18n2) { payload.rootNodes.push({ id: "global", label: "Global Scope" }); const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; for (const [keyInstance, instance] of i18n2.__instances) { const composer = i18n2.mode === "composition" ? instance : instance.__composer; if (global2 === composer) { continue; } const label = keyInstance.type.name || keyInstance.type.displayName || keyInstance.type.__file; payload.rootNodes.push({ id: composer.id.toString(), label: `${label} Scope` }); } } function getComposer$1(nodeId, i18n2) { if (nodeId === "global") { return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; } else { const instance = Array.from(i18n2.__instances.values()).find((item) => item.id.toString() === nodeId); if (instance) { return i18n2.mode === "composition" ? instance : instance.__composer; } else { return null; } } } function inspectScope(payload, i18n2) { const composer = getComposer$1(payload.nodeId, i18n2); if (composer) { payload.state = makeScopeInspectState(composer); } } function makeScopeInspectState(composer) { const state = {}; const localeType = "Locale related info"; const localeStates = [ { type: localeType, key: "locale", editable: true, value: composer.locale.value }, { type: localeType, key: "fallbackLocale", editable: true, value: composer.fallbackLocale.value }, { type: localeType, key: "availableLocales", editable: false, value: composer.availableLocales }, { type: localeType, key: "inheritLocale", editable: true, value: composer.inheritLocale } ]; state[localeType] = localeStates; const localeMessagesType = "Locale messages info"; const localeMessagesStates = [ { type: localeMessagesType, key: "messages", editable: false, value: getLocaleMessageValue(composer.messages.value) } ]; state[localeMessagesType] = localeMessagesStates; const datetimeFormatsType = "Datetime formats info"; const datetimeFormatsStates = [ { type: datetimeFormatsType, key: "datetimeFormats", editable: false, value: composer.datetimeFormats.value } ]; state[datetimeFormatsType] = datetimeFormatsStates; const numberFormatsType = "Datetime formats info"; const numberFormatsStates = [ { type: numberFormatsType, key: "numberFormats", editable: false, value: composer.numberFormats.value } ]; state[numberFormatsType] = numberFormatsStates; return state; } function addTimelineEvent(event, payload) { if (devtoolsApi) { let groupId; if (payload && "groupId" in payload) { groupId = payload.groupId; delete payload.groupId; } devtoolsApi.addTimelineEvent({ layerId: "vue-i18n-timeline", event: { title: event, groupId, time: Date.now(), meta: {}, data: payload || {}, logType: event === "compile-error" ? "error" : event === "fallback" || event === "missing" ? "warning" : "default" } }); } } function editScope(payload, i18n2) { const composer = getComposer$1(payload.nodeId, i18n2); if (composer) { const [field] = payload.path; if (field === "locale" && isString$2(payload.state.value)) { composer.locale.value = payload.state.value; } else if (field === "fallbackLocale" && (isString$2(payload.state.value) || isArray$2(payload.state.value) || isObject$5(payload.state.value))) { composer.fallbackLocale.value = payload.state.value; } else if (field === "inheritLocale" && isBoolean(payload.state.value)) { composer.inheritLocale = payload.state.value; } } } function defineMixin(vuei18n, composer, i18n2) { return { beforeCreate() { const instance = vue.getCurrentInstance(); if (!instance) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const options = this.$options; if (options.i18n) { const optionsI18n = options.i18n; if (options.__i18n) { optionsI18n.__i18n = options.__i18n; } optionsI18n.__root = composer; if (this === this.$root) { this.$i18n = mergeToRoot(vuei18n, optionsI18n); } else { optionsI18n.__injectWithOption = true; this.$i18n = createVueI18n(optionsI18n); } } else if (options.__i18n) { if (this === this.$root) { this.$i18n = mergeToRoot(vuei18n, options); } else { this.$i18n = createVueI18n({ __i18n: options.__i18n, __injectWithOption: true, __root: composer }); } } else { this.$i18n = vuei18n; } vuei18n.__onComponentInstanceCreated(this.$i18n); i18n2.__setInstance(instance, this.$i18n); this.$t = (...args) => this.$i18n.t(...args); this.$rt = (...args) => this.$i18n.rt(...args); this.$tc = (...args) => this.$i18n.tc(...args); this.$te = (key, locale) => this.$i18n.te(key, locale); this.$d = (...args) => this.$i18n.d(...args); this.$n = (...args) => this.$i18n.n(...args); this.$tm = (key) => this.$i18n.tm(key); }, mounted() { { this.$el.__VUE_I18N__ = this.$i18n.__composer; const emitter = this.__v_emitter = createEmitter(); const _vueI18n = this.$i18n; _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter); emitter.on("*", addTimelineEvent); } }, beforeUnmount() { const instance = vue.getCurrentInstance(); if (!instance) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } { if (this.__v_emitter) { this.__v_emitter.off("*", addTimelineEvent); delete this.__v_emitter; } const _vueI18n = this.$i18n; _vueI18n.__disableEmitter && _vueI18n.__disableEmitter(); delete this.$el.__VUE_I18N__; } delete this.$t; delete this.$rt; delete this.$tc; delete this.$te; delete this.$d; delete this.$n; delete this.$tm; i18n2.__deleteInstance(instance); delete this.$i18n; } }; } function mergeToRoot(root, options) { root.locale = options.locale || root.locale; root.fallbackLocale = options.fallbackLocale || root.fallbackLocale; root.missing = options.missing || root.missing; root.silentTranslationWarn = options.silentTranslationWarn || root.silentFallbackWarn; root.silentFallbackWarn = options.silentFallbackWarn || root.silentFallbackWarn; root.formatFallbackMessages = options.formatFallbackMessages || root.formatFallbackMessages; root.postTranslation = options.postTranslation || root.postTranslation; root.warnHtmlInMessage = options.warnHtmlInMessage || root.warnHtmlInMessage; root.escapeParameterHtml = options.escapeParameterHtml || root.escapeParameterHtml; root.sync = options.sync || root.sync; root.__composer[SetPluralRulesSymbol](options.pluralizationRules || root.pluralizationRules); const messages2 = getLocaleMessages(root.locale, { messages: options.messages, __i18n: options.__i18n }); Object.keys(messages2).forEach((locale) => root.mergeLocaleMessage(locale, messages2[locale])); if (options.datetimeFormats) { Object.keys(options.datetimeFormats).forEach((locale) => root.mergeDateTimeFormat(locale, options.datetimeFormats[locale])); } if (options.numberFormats) { Object.keys(options.numberFormats).forEach((locale) => root.mergeNumberFormat(locale, options.numberFormats[locale])); } return root; } function createI18n(options = {}) { const __legacyMode = isBoolean(options.legacy) ? options.legacy : true; const __globalInjection = !!options.globalInjection; const __instances = /* @__PURE__ */ new Map(); const __global = __legacyMode ? createVueI18n(options) : createComposer(options); const symbol = makeSymbol("vue-i18n"); const i18n2 = { // mode get mode() { return __legacyMode ? "legacy" : "composition"; }, // install plugin async install(app, ...options2) { { app.__VUE_I18N__ = i18n2; } app.__VUE_I18N_SYMBOL__ = symbol; app.provide(app.__VUE_I18N_SYMBOL__, i18n2); if (!__legacyMode && __globalInjection) { injectGlobalFields(app, i18n2.global); } { apply(app, i18n2, ...options2); } if (__legacyMode) { app.mixin(defineMixin(__global, __global.__composer, i18n2)); } { const ret = await enableDevTools(app, i18n2); if (!ret) { throw createI18nError( 21 /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */ ); } const emitter = createEmitter(); if (__legacyMode) { const _vueI18n = __global; _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter); } else { const _composer = __global; _composer[EnableEmitter] && _composer[EnableEmitter](emitter); } emitter.on("*", addTimelineEvent); } }, // global accessor get global() { return __global; }, // @internal __instances, // @internal __getInstance(component) { return __instances.get(component) || null; }, // @internal __setInstance(component, instance) { __instances.set(component, instance); }, // @internal __deleteInstance(component) { __instances.delete(component); } }; return i18n2; } function useI18n(options = {}) { const instance = vue.getCurrentInstance(); if (instance == null) { throw createI18nError( 16 /* MUST_BE_CALL_SETUP_TOP */ ); } if (!instance.appContext.app.__VUE_I18N_SYMBOL__) { throw createI18nError( 17 /* NOT_INSLALLED */ ); } const i18n2 = vue.inject(instance.appContext.app.__VUE_I18N_SYMBOL__); if (!i18n2) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer; const scope = isEmptyObject(options) ? "__i18n" in instance.type ? "local" : "global" : !options.useScope ? "local" : options.useScope; if (scope === "global") { let messages2 = isObject$5(options.messages) ? options.messages : {}; if ("__i18nGlobal" in instance.type) { messages2 = getLocaleMessages(global2.locale.value, { messages: messages2, __i18n: instance.type.__i18nGlobal }); } const locales = Object.keys(messages2); if (locales.length) { locales.forEach((locale) => { global2.mergeLocaleMessage(locale, messages2[locale]); }); } if (isObject$5(options.datetimeFormats)) { const locales2 = Object.keys(options.datetimeFormats); if (locales2.length) { locales2.forEach((locale) => { global2.mergeDateTimeFormat(locale, options.datetimeFormats[locale]); }); } } if (isObject$5(options.numberFormats)) { const locales2 = Object.keys(options.numberFormats); if (locales2.length) { locales2.forEach((locale) => { global2.mergeNumberFormat(locale, options.numberFormats[locale]); }); } } return global2; } if (scope === "parent") { let composer2 = getComposer(i18n2, instance, options.__useComponent); if (composer2 == null) { { warn$1(getWarnMessage( 12 /* NOT_FOUND_PARENT_SCOPE */ )); } composer2 = global2; } return composer2; } if (i18n2.mode === "legacy") { throw createI18nError( 18 /* NOT_AVAILABLE_IN_LEGACY_MODE */ ); } const i18nInternal = i18n2; let composer = i18nInternal.__getInstance(instance); if (composer == null) { const type2 = instance.type; const composerOptions = assign$2({}, options); if (type2.__i18n) { composerOptions.__i18n = type2.__i18n; } if (global2) { composerOptions.__root = global2; } composer = createComposer(composerOptions); setupLifeCycle(i18nInternal, instance, composer); i18nInternal.__setInstance(instance, composer); } return composer; } function getComposer(i18n2, target, useComponent = false) { let composer = null; const root = target.root; let current = target.parent; while (current != null) { const i18nInternal = i18n2; if (i18n2.mode === "composition") { composer = i18nInternal.__getInstance(current); } else { const vueI18n = i18nInternal.__getInstance(current); if (vueI18n != null) { composer = vueI18n.__composer; } if (useComponent && composer && !composer[InejctWithOption]) { composer = null; } } if (composer != null) { break; } if (root === current) { break; } current = current.parent; } return composer; } function setupLifeCycle(i18n2, target, composer) { let emitter = null; vue.onMounted(() => { if (target.vnode.el) { target.vnode.el.__VUE_I18N__ = composer; emitter = createEmitter(); const _composer = composer; _composer[EnableEmitter] && _composer[EnableEmitter](emitter); emitter.on("*", addTimelineEvent); } }, target); vue.onUnmounted(() => { if (target.vnode.el && target.vnode.el.__VUE_I18N__) { emitter && emitter.off("*", addTimelineEvent); const _composer = composer; _composer[DisableEmitter] && _composer[DisableEmitter](); delete target.vnode.el.__VUE_I18N__; } i18n2.__deleteInstance(target); }, target); } const globalExportProps = [ "locale", "fallbackLocale", "availableLocales" ]; const globalExportMethods = ["t", "rt", "d", "n", "tm"]; function injectGlobalFields(app, composer) { const i18n2 = /* @__PURE__ */ Object.create(null); globalExportProps.forEach((prop) => { const desc = Object.getOwnPropertyDescriptor(composer, prop); if (!desc) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const wrap = vue.isRef(desc.value) ? { get() { return desc.value.value; }, // eslint-disable-next-line @typescript-eslint/no-explicit-any set(val) { desc.value.value = val; } } : { get() { return desc.get && desc.get(); } }; Object.defineProperty(i18n2, prop, wrap); }); app.config.globalProperties.$i18n = i18n2; globalExportMethods.forEach((method2) => { const desc = Object.getOwnPropertyDescriptor(composer, method2); if (!desc || !desc.value) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } Object.defineProperty(app.config.globalProperties, `$${method2}`, desc); }); } { initFeatureFlags(); } { const target = getGlobalThis(); target.__INTLIFY__ = true; setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__); } const zh = { "加载中": "加载中", "操作失败": "操作失败", "请求失败,请稍后重试": "请求失败,请稍后重试", "登录已过期,请重新登录": "登录已过期,请重新登录", "手机号": "手机号", "邮箱": "邮箱", "密码": "密码", "忘记密码": "忘记密码", "注册账号": "注册账号", "请输入": "请输入", "记住密码": "记住密码", "登录": "登录", "验证码": "验证码", "请输入6位验证码": "请输入6位验证码", "请输入密码": "请输入密码", "确认密码": "确认密码", "请再次输入密码": "请再次输入密码", "已有账号": "已有账号", "前往登录": "前往登录", "获取验证码": "获取验证码", "注册": "注册", "过滤": "过滤", "滚球": "滚球", "体育博彩": "体育博彩", "投注历史": "投注历史", "我的": "我的", "首页": "首页", "安全": "安全", "注册并登录": "注册并登录", "请输入有效的充值数量": "请输入有效的充值数量", "请上传支付凭证截图": "请上传支付凭证截图", "充值": "充值", "暂无二维码": "暂无二维码", "选择币种": "选择币种", "选择区块链网络": "选择区块链网络", "充值地址": "充值地址", "请确认充值地址正确无误,错误地址将导致资产丢失且无法找回": "请确认充值地址正确无误,错误地址将导致资产丢失且无法找回", "充值数量": "充值数量", "请输入充值数量": "请输入充值数量", "预计到账": "预计到账", "当前汇率": "当前汇率", "上传支付凭证": "上传支付凭证", "点击上传": "点击上传", "确认充值": "确认充值", "保存头像": "保存头像", "退出登录": "退出登录", "提现方式": "提现方式", "提现币种": "提现币种", "提现网络": "提现网络", "提现地址": "提现地址", "提现金额": "提现金额", "手续费": "手续费", "请选择提现方式": "请选择提现方式", "银行卡": "银行卡", "加密货币": "加密货币", "请选择提现币种": "请选择提现币种", "请选择提现网络": "请选择提现网络", "请输入提现地址": "请输入提现地址", "提款范围": "提款范围", "钱包余额": "钱包余额", "手续费比例": "手续费比例", "预计到账金额": "预计到账金额", "提交": "提交", "提现": "提现", "收款名字": "收款名字", "银行名称": "银行名称", "银行账号": "银行账号", "银行地址": "银行地址", "国际代码": "国际代码", "其他": "其他", "请输入收款名字": "请输入收款名字", "请输入银行名称": "请输入银行名称", "请输入银行账号": "请输入银行账号", "请输入银行地址": "请输入银行地址", "请输入国际代码": "请输入国际代码", "其他信息": "其他信息", "请先选择币种": "请先选择币种", "提现金额不能小于": "提现金额不能小于", "查询": "查询", "重置": "重置", "暂无资金记录": "暂无资金记录", "流水号": "流水号", "交易金额": "交易金额", "变更后余额": "变更后余额", "资金记录": "资金记录", "交易类型": "交易类型", "日期区间": "日期区间", "请选择日期区间": "请选择日期区间", "记录": "记录", "充值记录": "充值记录", "提现记录": "提现记录", "更多滚球": "更多滚球", "主队赢": "主队赢", "平局": "平局", "客队赢": "客队赢", "进行中": "进行中", "已完场": "已完场", "投注单": "投注单", "还没有账号": "还没有账号", "邮箱登录": "邮箱登录", "手机号登录": "手机号登录", "请输入登录邮箱": "请输入登录邮箱", "请输入登录密码": "请输入登录密码", "我已阅读并同意": "我已阅读并同意", "去注册": "去注册", "版本": "版本", "产品服务协议": "产品服务协议", "请输入手机号": "请输入手机号", "取消": "取消", "确认": "确认", "选择区号": "选择区号", "请输入验证码": "请输入验证码", "请先同意服务协议!": "请先同意服务协议!", "请先同意服务协议": "请先同意服务协议", "邮箱注册": "邮箱注册", "手机注册": "手机注册", "请输入注册邮箱": "请输入注册邮箱", "请设置登录密码": "请设置登录密码", "请确认登录密码": "请确认登录密码", "立即注册": "立即注册", "去登录": "去登录", "上传图片": "上传图片", "未设置用户名": "未设置用户名", "暂无": "暂无", "账户余额": "账户余额", "冻结金额": "冻结金额", "账户安全": "账户安全", "更换头像": "更换头像", "保存": "保存", "请先选择头像": "请先选择头像", "提示": "提示", "确定要退出登录吗?": "确定要退出登录吗?", "个人资料": "个人资料", "账户": "账户", "账户号码": "账户号码", "您的密码": "您的密码", "注册日期": "注册日期", "联系方式": "联系方式", "电话": "电话", "未提供": "未提供", "电子邮箱": "电子邮箱", "个人信息": "个人信息", "姓氏": "姓氏", "名字": "名字", "出生日期": "出生日期", "出生地": "出生地", "文件类型": "文件类型", "身份证": "身份证", "文件号码": "文件号码", "证件签发日期": "证件签发日期", "国家": "国家", "新加坡": "新加坡", "地区": "地区", "城市": "城市", "常住地址": "常住地址", "编辑": "编辑", "未设置": "未设置", "修改联系方式": "修改联系方式", "请输入电话号码": "请输入电话号码", "请输入电子邮箱": "请输入电子邮箱", "未开始": "未开始", "延期": "延期", "网络类型": "网络类型", "订单状态": "订单状态", "处理中": "处理中", "成功": "成功", "失败": "失败", "首次充值": "首次充值", "是": "是", "创建时间": "创建时间", "订单号": "订单号", "充值金额": "充值金额", "实际到账": "实际到账", "请选择记录查询区间": "请选择记录查询区间", "开始": "开始", "结束": "结束", "条件筛选": "条件筛选", "重置全部": "重置全部", "立即查询": "立即查询", "更新数据中...": "更新数据中...", "银行信息": "银行信息", "申请时间": "申请时间", "提现成功": "提现成功", "已驳回": "已驳回", "网络/地址": "网络/地址", "投注额超过您的余额": "投注额超过您的余额", "潜在赢利": "潜在赢利", "存款": "存款", "前往投注单": "前往投注单", "总赔率": "总赔率", "投注": "投注", "注单号": "注单号", "赔率": "赔率", "待结算": "待结算", "投注金额": "投注金额", "盈亏/派彩": "盈亏/派彩", "请选择查询区间": "请选择查询区间", "日期筛选": "日期筛选", "加载最新记录...": "加载最新记录...", "请选择查询日期": "请选择查询日期", "全场": "全场", "独赢": "独赢", "半场独赢": "半场独赢", "让球": "让球", "半场让球": "半场让球", "大小球": "大小球", "半场大小球": "半场大小球", "半场": "半场", "大": "大", "小": "小", "赛事详情": "赛事详情", "主胜": "主胜", "客胜": "客胜", "正在更新赛事...": "正在更新赛事...", "确认提现": "确认提现", "安全验证": "安全验证", "请输入资金密码": "请输入资金密码", "为保障您的资金安全,请输入资金密码": "为保障您的资金安全,请输入资金密码", "pc28": "pc28", "pc28分分彩": "pc28分分彩", "获取最新数据...": "获取最新数据...", "最新": "最新", "咪牌": "咪牌", "下一期": "下一期", "pc28开奖详情": "pc28开奖详情", "pc28开奖规则": "pc28开奖规则", "确定投注": "确定投注", "正在更新内容...": "正在更新内容...", "有效": "有效", "盘口已失效或关闭": "盘口已失效或关闭", "全部类型": "全部类型", "下注": "下注", "资金冻结": "资金冻结", "退款": "退款", "未知类型": "未知类型", "投注内容": "投注内容", "投注本金": "投注本金", "期号": "期号", "待开奖": "待开奖", "已中奖": "已中奖", "未中奖": "未中奖", "已撤单": "已撤单", "投注记录": "投注记录", "中奖": "中奖", "已结算": "已结算", "和局": "和局", "平手半": "平手半", "未结算": "未结算", "已取消": "已取消", "彩票": "彩票", "体育": "体育", "是否中奖": "是否中奖", "结算状态": "结算状态", "主客队赢": "主客队赢", "进球大小": "进球大小", "半场大小": "半场大小", "半全场": "半全场", "两队都进球": "两队都进球", "让球结果": "让球结果", "准确比分": "准确比分", "客队": "客队", "否": "否", "单": "单", "双": "双", "上半场": "上半场", "下半场": "下半场", "主队": "主队", "PC28分分彩": "PC28分分彩", "彩票玩法": "彩票玩法", "盈亏": "盈亏", "PC28": "PC28", "未开奖": "未开奖", "六合彩": "六合彩", "合局": "合局", "澳门六合彩": "澳门六合彩", "状态": "状态", "赛事列表": "赛事列表", "暂无投注项": "暂无投注项", "玩法": "玩法", "更多体育博彩": "更多体育博彩", "去投注": "去投注", "总赔率 (有效)": "总赔率 (有效)", "开奖详情": "开奖详情", "往期历史": "往期历史", "开奖规则": "开奖规则", "暂无玩法数据": "暂无玩法数据", "点击展开": "点击展开", "暂无赛事数据": "暂无赛事数据", "注单详情": "注单详情", "加载中...": "加载中...", "盈亏金额": "盈亏金额", "开奖信息": "开奖信息", "期": "期", "投注项": "投注项", "下注金额": "下注金额", "下注时间": "下注时间", "收起详情": "收起详情", "限额": "限额", "总投注金额": "总投注金额", "立即投注": "立即投注", "开奖截图": "开奖截图", "请选择币种": "请选择币种", "请选择网络": "请选择网络", "最大": "最大", "汇率": "汇率", "待处理": "待处理", "加密货币提现": "加密货币提现", "失败原因": "失败原因", "来源地址": "来源地址", "支付凭证": "支付凭证", "变动后余额": "变动后余额", "变动前余额": "变动前余额", "查看凭证": "查看凭证", "是否注销账户,注销账户后,系统将删除清空账户": "是否注销账户,注销账户后,系统将删除清空账户", "修改密码": "修改密码", "修改资金密码": "修改资金密码", "注销账号": "注销账号", "旧密码": "旧密码", "新密码": "新密码", "确认新密码": "确认新密码", "请输入旧密码": "请输入旧密码", "请输入新密码(至少6位)": "请输入新密码(至少6位)", "请再次输入新密码": "请再次输入新密码", "确认修改": "确认修改", "旧资金密码": "旧资金密码", "新资金密码": "新资金密码", "确认新资金密码": "确认新资金密码", "请输入旧密码(第一次设置资金密码可以为空)": "请输入旧密码(第一次设置资金密码可以为空)", "请输入新资金密码(至少6位)": "请输入新资金密码(至少6位)", "请输入新资金密码": "请输入新资金密码", "请再次输入新资金密码": "请再次输入新资金密码", "名称": "名称", "性别": "性别", "女": "女", "未知": "未知", "游客模式": "游客模式", "正在加载": "正在加载", "没有更多了": "没有更多了", "点击加载更多": "点击加载更多", "第": "第", "期开奖": "期开奖", "近期开奖": "近期开奖", "购彩记录": "购彩记录", "清空": "清空", "距": "距", "期截止": "期截止", "已选注单": "已选注单", "机选": "机选", "取消原因": "取消原因", "订单已取消": "订单已取消", "红": "红", "红波": "红波", "蓝波": "蓝波", "绿波": "绿波", "蓝": "蓝", "绿": "绿", "特码": "特码", "正码": "正码", "正码特": "正码特", "确定": "确定", "当前比分": "当前比分", "秒": "秒", "分": "分", "前": "前", "中": "中", "尾": "尾", "已上传支付凭证": "已上传支付凭证", "下注成功": "下注成功", "下注中": "下注中", "关闭": "关闭", "购物车": "购物车", "今天": "今天", "周一": "周一", "周二": "周二", "周三": "周三", "周四": "周四", "周五": "周五", "周六": "周六", "周日": "周日", "请选择投注单": "请选择投注单", "暂无投注记录": "暂无投注记录", "近期开奖记录": "近期开奖记录", "本金": "本金", "总金额": "总金额", "温馨提示": "温馨提示", "同意": "同意", "单号": "单号", "取": "取", "投注成功": "投注成功", "不可重新提交": "不可重新提交", "投注时间": "投注时间", "等待开奖中": "等待开奖中", "注单单号": "注单单号", "赛事信息": "赛事信息", "选项": "选项", "赔率玩法": "赔率玩法", "盘口": "盘口", "订单编号": "订单编号", "复制成功": "复制成功", "输入本金": "输入本金", "请输入新密码": "请输入新密码", "请再次输入确认密码": "请再次输入确认密码", "两次输入的新密码不一致": "两次输入的新密码不一致", "新密码不能与旧密码相同": "新密码不能与旧密码相同", "新密码长度不能少于": "新密码长度不能少于", "暂无相关资金记录": "暂无相关资金记录", "余额不足": "余额不足", "余额不足,去存款": "余额不足,去存款", "验证码长度为": "验证码长度为", "验证码已发送": "验证码已发送", "两次输入的密码不一致": "两次输入的密码不一致", "提现金额不能大于余额": "提现金额不能大于余额", "个字符之间": "个字符之间", "密码长度需在": "密码长度需在", "位": "位", "已选注单明细": "已选注单明细", "已达最低投注": "已达最低投注", "已达最高投注": "已达最高投注", "暂无有效投注项,请移除锁定盘口或重新选择": "暂无有效投注项,请移除锁定盘口或重新选择", "请补全下注金额": "请补全下注金额", "期号 / 玩法": "期号 / 玩法", "正在加载注单详情...": "正在加载注单详情...", "为了保障您的权益,请先阅读并同意": "为了保障您的权益,请先阅读并同意", "以下注单提交失败,是否重新提交?": "以下注单提交失败,是否重新提交?", "正码1-6": "正码1-6", "未知的赔率": "未知的赔率", "盘口已更新": "盘口已更新", "赔率已更新": "赔率已更新", "赛事已结束": "赛事已结束", "赛事已下架": "赛事已下架", "赛事不存在": "赛事不存在", "已锁盘": "已锁盘", "下注失败原因": "下注失败原因", "此注已停售": "此注已停售", "缺少盘口数据": "缺少盘口数据", "香港六合彩": "香港六合彩", "主": "主", "客": "客", "派彩金额": "派彩金额", "Time To Be Defined": "时间待定", "Not Started": "未开赛", "First Half": "上半场", "First Half, Kick Off": "上半场,开球", "Halftime": "中场休息", "Second Half": "下半场", "Second Half, 2nd Half Started": "下半场,已开球", "Extra Time": "加时赛", "Break Time": "休息时间", "Penalty In Progress": "点球大战进行中", "Match Suspended": "比赛暂停", "Match Interrupted": "比赛中断", "Match Finished": "比赛结束", "Match Postponed": "比赛延期", "Match Cancelled": "比赛取消", "Match Abandoned": "比赛腰斩(废弃)", "Technical Loss": "技术性判负", "WalkOver": "弃权/退赛(对手直接晋级)", "In Progress": "进行中", "请先选择投注项": "请先选择投注项", "结算时间": "结算时间", "邀请码": "邀请码", "请输入邀请码": "请输入邀请码", "结算待发放": "结算待发放", "优惠活动": "优惠活动", "搜索赛事关键字": "搜索赛事关键字", "选择支付方式": "选择支付方式", "USDT充值": "USDT充值", "当前汇率 (USDT/RMB)": "当前汇率 (USDT/RMB)", "Withdraw": "Withdraw", "选择提现方式": "选择提现方式", "加载提现渠道中...": "加载提现渠道中...", "请输入提现金额": "请输入提现金额", "请输入 USDT 提现地址": "请输入 USDT 提现地址", "资金密码": "资金密码", "全部玩法": "全部玩法", "展开": "展开", "迈凯伦": "迈凯伦", "帮助中心": "帮助中心", "博彩责任": "博彩责任", "隐私政策": "隐私政策", "条款与协议": "条款与协议", "快速链接": "快速链接", "体育赛事": "体育赛事", "滚球投注": "滚球投注", "彩票娱乐": "彩票娱乐", "社交平台": "社交平台", "关于我们": "关于我们", "官方合作伙伴": "官方合作伙伴", "账号注册": "账号注册", "请输入账号": "请输入账号", "游客登陆": "游客登陆", "在线客服": "在线客服", "F1bet 是亚洲值得信赖的在线赌博网站,自从正式投入服务至今最完整和最新的在线赌博游戏。 F1bet有一个简单的使命和愿景是提供诚实和信任的服务。在近期与Mclaren、Teddy Sheringham达成赞助伙伴协议,进一步加深了“F1bet”的国际知名度,让平台的名声遍布全球。": "F1bet 是亚洲值得信赖的在线赌博网站,自从正式投入服务至今最完整和最新的在线赌博游戏。 F1bet有一个简单的使命和愿景是提供诚实和信任的服务。在近期与Mclaren、Teddy Sheringham达成赞助伙伴协议,进一步加深了“F1bet”的国际知名度,让平台的名声遍布全球。", "为了提升用户体验,使用本网站后,我们可能使用Cookies技术从服务器中收集客户信息。如果您在F1bet注册或者继续使用网站,则您将被视为同意我们使用Cookies。": "为了提升用户体验,使用本网站后,我们可能使用Cookies技术从服务器中收集客户信息。如果您在F1bet注册或者继续使用网站,则您将被视为同意我们使用Cookies。", "如果删除我们的Cookies或禁用我们之后的Cookies,将导致您无法使用平台的某些区域或特色功能。": "如果删除我们的Cookies或禁用我们之后的Cookies,将导致您无法使用平台的某些区域或特色功能。", "© 2015 - 2026 版权所有并受法律保护。": "© 2015 - 2026 版权所有并受法律保护。", "热门": "热门", "立即进入": "立即进入", "品牌大使": "品牌大使", "塞巴斯蒂安·维特尔": "塞巴斯蒂安·维特尔", "本平台仅向18岁以上成人提供娱乐服务,请理性投注,谨防沉迷。": "本平台仅向18岁以上成人提供娱乐服务,请理性投注,谨防沉迷。", "体验更流畅,娱乐更安全。": "体验更流畅,娱乐更安全。", "立即下载": "立即下载", "联赛": "联赛", "搜索": "搜索", "余额宝": "余额宝", "钱包管理": "钱包管理", "优惠活动详情": "优惠活动详情", "账号登录": "账号登录", "已阅读并同意": "已阅读并同意", "返回": "返回", "下注金额不在范围内": "下注金额不在范围内", "下注金额超过最高限额": "下注金额超过最高限额", "为了保障您的权益,请先阅读并同意相关条款": "为了保障您的权益,请先阅读并同意相关条款", "帮助": "帮助", "客服": "客服", "玩法规则": "玩法规则", "规则条款": "规则条款", "责任与权誉": "责任与权誉", "收款账户": "收款账户", "请选择收款账户": "请选择收款账户", "距升级": "距升级", "还需": "还需", "成长值": "成长值", "加拿大": "加拿大", "极速": "极速", "请输入金额": "请输入金额", "单注限额": "单注限额", "自动接受更好的赔率": "自动接受更好的赔率", "批量设置金额": "批量设置金额", "选择收款账户": "选择收款账户", "暂无可用账户": "暂无可用账户", "去添加账户": "去添加账户", "添加账户": "添加账户", "暂无账户记录": "暂无账户记录", "添加账户": "添加账户", "请输入银行名称或平台名": "请输入银行名称或平台名", "银行名称/平台": "银行名称/平台", "请输入收款账号或银行卡号": "请输入收款账号或银行卡号", "收款账号(卡号)": "收款账号(卡号)", "请输入收款人真实姓名": "请输入收款人真实姓名", "真实姓名": "真实姓名", "如:我的建行卡": "如:我的建行卡", "别名(可选)": "别名(可选)", "请填写所有带 * 的必填项": "请填写所有带 * 的必填项", "添加账户": "添加账户", "请输入银行名称或平台名": "请输入银行名称或平台名", "银行名称/平台": "银行名称/平台", "请输入收款账号或银行卡号": "请输入收款账号或银行卡号", "收款账号(卡号)": "收款账号(卡号)", "请输入收款人真实姓名": "请输入收款人真实姓名", "真实姓名": "真实姓名", "如:我的建行卡": "如:我的建行卡", "别名(可选)": "别名(可选)", "例如:支付宝": "例如:支付宝", "请输入准确的 USDT 地址": "请输入准确的 USDT 地址", "USDT 提现地址": "USDT 提现地址", "如:波场TRC20钱包": "如:波场TRC20钱包", "地址别名 (可选)": "地址别名 (可选)", "明细": "明细", "灵活存取,稳健收益": "灵活存取,稳健收益", "余额宝总额(元)": "余额宝总额(元)", "累计收益(元)": "累计收益(元)", "转入": "转入", "转出": "转出", "全部": "全部", "持仓中": "持仓中", "已取出": "已取出", "开始日期": "开始日期", "结束日期": "结束日期", "暂无持仓记录": "暂无持仓记录", "转出余额宝": "转出余额宝", "转出金额": "转出金额", "请输入转出金额": "请输入转出金额", "确认转出": "确认转出", "转入余额宝": "转入余额宝", "转入金额": "转入金额", "请输入转入金额,最小为 1": "请输入转入金额,最小为 1", "确认转入": "确认转入", "请输入有效金额": "请输入有效金额", "暂无持仓记录": "暂无持仓记录", "暂无明细记录": "暂无明细记录", "别名 (可选)": "别名 (可选)", "全部资金": "全部资金", "可用余额": "可用余额", "没有发现相关记录": "没有发现相关记录", "RMB提现": "RMB提现", "天": "天", "所有选项已全选": "所有选项已全选", "确认提交吗?": "确认提交吗?", "单注最高限制为": "单注最高限制为", "总投注金额超过可用余额": "总投注金额超过可用余额", "单注最高": "单注最高", "单注最低限制为": "单注最低限制为", "开奖结果": "开奖结果", "开奖时间": "开奖时间", "可赢金额": "可赢金额", "查看订单详情": "查看订单详情", "查看赛事详情": "查看赛事详情", "即时比分": "即时比分", "足球": "足球", "类型": "类型", "已退款": "已退款", "世界杯": "世界杯", "暂无盘口数据": "暂无盘口数据", "收起": "收起", "确认提交吗?": "确认提交吗?", "可赢金额": "可赢金额", "查看订单详情": "查看订单详情", "查看赛事详情": "查看赛事详情", "即时比分": "即时比分", "足球": "足球", "类型": "类型", "已退款": "已退款", "世界杯": "世界杯", "暂无盘口数据": "暂无盘口数据", "封盘中": "封盘中", "加拿大28": "加拿大28", "剩余本金": "剩余本金", "日利率": "日利率", "没有更多记录了": "没有更多记录了", "正在加载...": "正在加载...", "持仓时间": "持仓时间", "小时": "小时", "获取中...": "获取中...", "复制": "复制", "提交中...": "提交中...", "刷新中...": "刷新中...", "确认要删除这条账户记录吗?": "确认要删除这条账户记录吗?", "删除中...": "删除中...", "新资金密码长度不能少于6位": "新资金密码长度不能少于6位", "两次输入的新资金密码不一致": "两次输入的新资金密码不一致", "永久网址": "永久网址", "请输入或选择充值金额": "请输入或选择充值金额", "资金类型": "资金类型", "删除成功": "删除成功", "账户余额不足": "账户余额不足", "请输入有效的提现金额": "请输入有效的提现金额", "退款审核中": "退款审核中", "退款被驳回": "退款被驳回", "金额不能小于等于0": "金额不能小于等于0", "退款时间": "退款时间", "请输入大于0的有效金额": "请输入大于0的有效金额", "请检查下注金额、限额及余额": "请检查下注金额、限额及余额", "编辑账户": "编辑账户", "极速28": "极速28", "余额宝明细": "余额宝明细", "资金类型": "资金类型", "Match List": "Match List", "赛事详情": "赛事详情" }; const en$1 = { "加载中": "Loading", "操作失败": "Operation failed", "请求失败,请稍后重试": "Request failed, please try again later", "登录已过期,请重新登录": "Login expired, please login again", "手机号": "Phone Number", "邮箱": "Email", "密码": "Password", "忘记密码": "Forgot Password", "注册账号": "Register Account", "请输入": "Please enter", "记住密码": "Remember Password", "登录": "Login", "验证码": "Verification Code", "请输入6位验证码": "Please enter 6-digit verification code", "请输入密码": "Please enter password", "确认密码": "Confirm Password", "请再次输入密码": "Please enter password again", "已有账号": "Already have an account", "前往登录": "Go to login", "获取验证码": "Get Code", "注册": "Register", "过滤": "Filter", "滚球": "In-Play", "体育博彩": "Sports Betting", "投注历史": "Betting History", "我的": "Mine", "首页": "Home", "安全": "Security", "注册并登录": "Register and Login", "请输入有效的充值数量": "Please enter a valid deposit amount", "请上传支付凭证截图": "Please upload a screenshot of the payment voucher", "充值": "Deposit", "暂无二维码": "No QR code available", "选择币种": "Select Currency", "选择区块链网络": "Select Blockchain Network", "充值地址": "Deposit Address", "请确认充值地址正确无误,错误地址将导致资产丢失且无法找回": "Please ensure the deposit address is correct; an incorrect address will result in irreversible loss of assets", "充值数量": "Deposit Amount", "请输入充值数量": "Please enter deposit amount", "预计到账": "Expected Arrival", "当前汇率": "Current Exchange Rate", "上传支付凭证": "Upload Payment Voucher", "点击上传": "Click to Upload", "确认充值": "Confirm Deposit", "保存头像": "Save Avatar", "退出登录": "Logout", "提现方式": "Withdrawal Method", "提现币种": "Withdrawal Currency", "提现网络": "Withdrawal Network", "提现地址": "Withdrawal Address", "提现金额": "Withdrawal Amount", "手续费": "Handling Fee", "请选择提现方式": "Please select withdrawal method", "银行卡": "Bank Card", "加密货币": "Cryptocurrency", "请选择提现币种": "Please select withdrawal currency", "请选择提现网络": "Please select withdrawal network", "请输入提现地址": "Please enter withdrawal address", "提款范围": "Withdrawal Range", "钱包余额": "Wallet Balance", "手续费比例": "Fee Rate", "预计到账金额": "Expected Arrival Amount", "提交": "Submit", "提现": "Withdraw", "收款名字": "Payee Name", "银行名称": "Bank Name", "银行账号": "Bank Account", "银行地址": "Bank Address", "国际代码": "Swift Code", "其他": "Other", "请输入收款名字": "Please enter payee name", "请输入银行名称": "Please enter bank name", "请输入银行账号": "Please enter bank account", "请输入银行地址": "Please enter bank address", "请输入国际代码": "Please enter Swift Code", "其他信息": "Other Information", "请先选择币种": "Please select currency first", "提现金额不能小于": "Withdrawal amount cannot be less than", "查询": "Query", "重置": "Reset", "暂无资金记录": "No fund records", "流水号": "Serial Number", "交易金额": "Transaction Amount", "变更后余额": "Balance After Change", "资金记录": "Fund Records", "交易类型": "Transaction Type", "日期区间": "Date Range", "请选择日期区间": "Please select date range", "记录": "Records", "充值记录": "Deposit Records", "提现记录": "Withdrawal Records", "更多滚球": "More In-Play", "主队赢": "Home Win", "平局": "Draw", "客队赢": "Away Win", "进行中": "In Progress", "已完场": "Finished", "投注单": "Bet Slip", "还没有账号": "Don't have an account", "邮箱登录": "Email Login", "手机号登录": "Phone Login", "请输入登录邮箱": "Please enter login email", "请输入登录密码": "Please enter login password", "我已阅读并同意": "I have read and agree to", "去注册": "Go to Register", "版本": "Version", "产品服务协议": "Product Terms of Service", "请输入手机号": "Please enter phone number", "取消": "Cancel", "确认": "Confirm", "选择区号": "Select Area Code", "请输入验证码": "Please enter verification code", "请先同意服务协议!": "Please agree to the Terms of Service first!", "请先同意服务协议": "Please agree to the Terms of Service first", "邮箱注册": "Email Registration", "手机注册": "Phone Registration", "请输入注册邮箱": "Please enter registration email", "请设置登录密码": "Please set login password", "请确认登录密码": "Please confirm login password", "立即注册": "Register Now", "去登录": "Go to Login", "上传图片": "Upload Image", "未设置用户名": "Username not set", "暂无": "None", "账户余额": "Account Balance", "冻结金额": "Frozen Amount", "账户安全": "Account Security", "更换头像": "Change Avatar", "保存": "Save", "请先选择头像": "Please select an avatar first", "提示": "Tip", "确定要退出登录吗?": "Are you sure you want to log out?", "个人资料": "Personal Profile", "账户": "Account", "账户号码": "Account Number", "您的密码": "Your Password", "注册日期": "Registration Date", "联系方式": "Contact Info", "电话": "Phone", "未提供": "Not Provided", "电子邮箱": "Email", "个人信息": "Personal Info", "姓氏": "Last Name", "名字": "First Name", "出生日期": "Date of Birth", "出生地": "Place of Birth", "文件类型": "Document Type", "身份证": "ID Card", "文件号码": "Document Number", "证件签发日期": "Date of Issue", "国家": "Country", "新加坡": "Singapore", "地区": "Region", "城市": "City", "常住地址": "Permanent Address", "编辑": "Edit", "未设置": "Not Set", "修改联系方式": "Modify Contact Info", "请输入电话号码": "Please enter phone number", "请输入电子邮箱": "Please enter email address", "未开始": "Not Started", "延期": "Postponed", "网络类型": "Network Type", "订单状态": "Order Status", "处理中": "Processing", "成功": "Success", "失败": "Failed", "首次充值": "First Deposit", "是": "Yes", "创建时间": "Creation Time", "订单号": "Order Number", "充值金额": "Deposit Amount", "实际到账": "Actual Arrival", "请选择记录查询区间": "Please select record query range", "开始": "Start", "结束": "End", "条件筛选": "Condition Filter", "重置全部": "Reset All", "立即查询": "Query Now", "更新数据中...": "Updating Data...", "银行信息": "Bank Info", "申请时间": "Application Time", "提现成功": "Withdrawal Successful", "已驳回": "Rejected", "网络/地址": "Network/Address", "投注额超过您的余额": "Bet amount exceeds your balance", "潜在赢利": "Potential Winnings", "存款": "Deposit", "前往投注单": "Go to Bet Slip", "总赔率": "Total Odds", "投注": "Bet", "注单号": "Bet Slip Number", "赔率": "Odds", "待结算": "Pending Settlement", "投注金额": "Bet Amount", "盈亏/派彩": "P&L/Payout", "请选择查询区间": "Please select query range", "日期筛选": "Date Filter", "加载最新记录...": "Loading latest records...", "请选择查询日期": "Please select query date", "全场": "Full Time", "独赢": "1X2", "半场独赢": "Half Time 1X2", "让球": "Handicap", "半场让球": "Half Time Handicap", "大小球": "Over/Under", "半场大小球": "Half Time Over/Under", "半场": "Half Time", "大": "Over", "小": "Under", "赛事详情": "Match Details", "主胜": "Home Win", "客胜": "Away Win", "正在更新赛事...": "Updating Match...", "确认提现": "Confirm Withdrawal", "安全验证": "Security Verification", "请输入资金密码": "Please enter fund password", "为保障您的资金安全,请输入资金密码": "To protect your funds, please enter fund password", "pc28": "PC28", "pc28分分彩": "PC28 FF", "获取最新数据...": "Getting latest data...", "最新": "Latest", "咪牌": "Squeeze", "下一期": "Next Draw", "pc28开奖详情": "PC28 Draw Details", "pc28开奖规则": "PC28 Draw Rules", "确定投注": "Confirm Bet", "正在更新内容...": "Updating content...", "有效": "Valid", "盘口已失效或关闭": "Market is invalid or closed", "全部类型": "All Types", "下注": "Place Bet", "资金冻结": "Funds Frozen", "退款": "Refund", "未知类型": "Unknown Type", "投注内容": "Bet Details", "投注本金": "Bet Principal", "期号": "Draw Number", "待开奖": "Waiting for Draw", "已中奖": "Won", "未中奖": "Not Won", "已撤单": "Cancelled", "投注记录": "Bet Records", "中奖": "Won", "已结算": "Settled", "和局": "Tie", "平手半": "Level Half", "未结算": "Unsettled", "已取消": "Cancelled", "彩票": "Lottery", "体育": "Sports", "是否中奖": "Is Winning", "结算状态": "Settlement Status", "主客队赢": "Home/Away Win", "进球大小": "Goals Over/Under", "半场大小": "Half Time Over/Under", "半全场": "Half Time/Full Time", "两队都进球": "Both Teams to Score", "让球结果": "Handicap Result", "准确比分": "Correct Score", "客队": "Away Team", "否": "No", "单": "Odd", "双": "Even", "上半场": "First Half", "下半场": "Second Half", "主队": "Home Team", "PC28分分彩": "PC28 FF", "彩票玩法": "Lottery Rules", "盈亏": "P&L", "PC28": "PC28", "未开奖": "Not Drawn", "六合彩": "Mark Six", "合局": "Tie", "澳门六合彩": "Macau Mark Six", "状态": "Status", "赛事列表": "Match List", "暂无投注项": "No betting options", "玩法": "Rules", "更多体育博彩": "More Sports Betting", "去投注": "Go to Bet", "总赔率 (有效)": "Total Odds (Valid)", "开奖详情": "Draw Details", "往期历史": "Past History", "开奖规则": "Draw Rules", "暂无玩法数据": "No rule data", "点击展开": "Click to expand", "暂无赛事数据": "No match data", "注单详情": "Bet Slip Details", "加载中...": "Loading...", "盈亏金额": "P&L Amount", "开奖信息": "Draw Info", "期": "Draw", "投注项": "Bet Option", "下注金额": "Bet Amount", "下注时间": "Bet Time", "收起详情": "Collapse Details", "限额": "Limit", "总投注金额": "Total Bet Amount", "立即投注": "Bet Now", "开奖截图": "Draw Screenshot", "请选择币种": "Please select currency", "请选择网络": "Please select network", "最大": "Max", "汇率": "Exchange Rate", "待处理": "Pending", "加密货币提现": "Crypto Withdrawal", "失败原因": "Failure Reason", "来源地址": "Source Address", "支付凭证": "Payment Voucher", "变动后余额": "Balance After Change", "变动前余额": "Balance Before Change", "查看凭证": "View Voucher", "是否注销账户,注销账户后,系统将删除清空账户": "Do you want to delete the account? After deletion, the system will clear the account.", "修改密码": "Change Password", "修改资金密码": "Change Fund Password", "注销账号": "Delete Account", "旧密码": "Old Password", "新密码": "New Password", "确认新密码": "Confirm New Password", "请输入旧密码": "Please enter old password", "请输入新密码(至少6位)": "Please enter new password (at least 6 characters)", "请再次输入新密码": "Please enter new password again", "确认修改": "Confirm Modification", "旧资金密码": "Old Fund Password", "新资金密码": "New Fund Password", "确认新资金密码": "Confirm New Fund Password", "请输入旧密码(第一次设置资金密码可以为空)": "Please enter old password (can be empty for first time setting)", "请输入新资金密码(至少6位)": "Please enter new fund password (at least 6 characters)", "请输入新资金密码": "Please enter new fund password", "请再次输入新资金密码": "Please enter new fund password again", "名称": "Name", "性别": "Gender", "女": "Female", "未知": "Unknown", "游客模式": "Guest Mode", "正在加载": "Loading", "没有更多了": "No more", "点击加载更多": "Click to load more", "第": "No.", "期开奖": "Draw", "近期开奖": "Recent Draws", "购彩记录": "Lottery Records", "清空": "Clear", "距": "Until", "期截止": "Draw Closes", "已选注单": "Selected Bet Slips", "机选": "Quick Pick", "取消原因": "Cancel Reason", "订单已取消": "Order Cancelled", "红": "Red", "红波": "Red Wave", "蓝波": "Blue Wave", "绿波": "Green Wave", "蓝": "Blue", "绿": "Green", "特码": "Special Number", "正码": "Normal Number", "正码特": "Normal Special", "确定": "Confirm", "当前比分": "Current Score", "秒": "Sec", "分": "Min", "前": "Front", "中": "Middle", "尾": "Tail", "已上传支付凭证": "Payment voucher uploaded", "下注成功": "Bet Successful", "下注中": "Betting in progress", "关闭": "Close", "购物车": "Cart", "今天": "Today", "周一": "Monday", "周二": "Tuesday", "周三": "Wednesday", "周四": "Thursday", "周五": "Friday", "周六": "Saturday", "周日": "Sunday", "请选择投注单": "Please select bet slip", "暂无投注记录": "No bet records", "近期开奖记录": "Recent Draw Records", "本金": "Principal", "总金额": "Total Amount", "温馨提示": "Warm Reminder", "同意": "Agree", "单号": "Order Number", "取": "Cancel", "投注成功": "Bet Successful", "不可重新提交": "Cannot resubmit", "投注时间": "Bet Time", "等待开奖中": "Waiting for draw", "注单单号": "Bet Slip Number", "赛事信息": "Match Info", "选项": "Options", "赔率玩法": "Odds Rules", "盘口": "Market", "订单编号": "Order Number", "复制成功": "Copied Successfully", "输入本金": "Enter Principal", "请输入新密码": "Please enter new password", "请再次输入确认密码": "Please enter confirm password again", "两次输入的新密码不一致": "The two new passwords entered do not match", "新密码不能与旧密码相同": "New password cannot be the same as old password", "新密码长度不能少于": "New password length cannot be less than", "暂无相关资金记录": "No relevant fund records", "余额不足": "Insufficient Balance", "余额不足,去存款": "Insufficient balance, go to deposit", "验证码长度为": "Verification code length is", "验证码已发送": "Verification code sent", "两次输入的密码不一致": "The two passwords entered do not match", "提现金额不能大于余额": "Withdrawal amount cannot be greater than balance", "个字符之间": "characters", "密码长度需在": "Password length must be between", "位": "digits", "已选注单明细": "Selected Bet Slip Details", "已达最低投注": "Minimum bet reached", "已达最高投注": "Maximum bet reached", "暂无有效投注项,请移除锁定盘口或重新选择": "No valid bet options, please remove locked markets or reselect", "请补全下注金额": "Please complete bet amount", "期号 / 玩法": "Draw Number / Rules", "正在加载注单详情...": "Loading bet slip details...", "为了保障您的权益,请先阅读并同意": "To protect your rights, please read and agree to", "以下注单提交失败,是否重新提交?": "The following bet slips failed to submit, resubmit?", "正码1-6": "Normal Number 1-6", "未知的赔率": "Unknown Odds", "盘口已更新": "Market Updated", "赔率已更新": "Odds Updated", "赛事已结束": "Match Ended", "赛事已下架": "Match Removed", "赛事不存在": "Match Does Not Exist", "已锁盘": "Market Locked", "下注失败原因": "Reason for bet failure", "此注已停售": "This bet is suspended", "缺少盘口数据": "Missing market data", "香港六合彩": "Hong Kong Mark Six", "主": "Home", "客": "Away", "派彩金额": "Payout Amount", "Time To Be Defined": "Time To Be Defined", "Not Started": "Not Started", "First Half": "First Half", "First Half, Kick Off": "First Half, Kick Off", "Halftime": "Halftime", "Second Half": "Second Half", "Second Half, 2nd Half Started": "Second Half, 2nd Half Started", "Extra Time": "Extra Time", "Break Time": "Break Time", "Penalty In Progress": "Penalty In Progress", "Match Suspended": "Match Suspended", "Match Interrupted": "Match Interrupted", "Match Finished": "Match Finished", "Match Postponed": "Match Postponed", "Match Cancelled": "Match Cancelled", "Match Abandoned": "Match Abandoned", "Technical Loss": "Technical Loss", "WalkOver": "WalkOver", "In Progress": "In Progress", "请先选择投注项": "Please select a bet option first", "结算时间": "Settlement Time", "邀请码": "Invitation Code", "请输入邀请码": "Please enter invitation code", "结算待发放": "Settlement Pending", "优惠活动": "Promotions", "搜索赛事关键字": "Search match keywords", "选择支付方式": "Select Payment Method", "USDT充值": "USDT Deposit", "当前汇率 (USDT/RMB)": "Current Exchange Rate (USDT/RMB)", "Withdraw": "Withdraw", "选择提现方式": "Select Withdrawal Method", "加载提现渠道中...": "Loading withdrawal channels...", "请输入提现金额": "Please enter withdrawal amount", "请输入 USDT 提现地址": "Please enter USDT withdrawal address", "资金密码": "Fund Password", "全部玩法": "All Rules", "展开": "Expand", "迈凯伦": "McLaren", "帮助中心": "Help Center", "博彩责任": "Responsible Gaming", "隐私政策": "Privacy Policy", "条款与协议": "Terms and Conditions", "快速链接": "Quick Links", "体育赛事": "Sports Events", "滚球投注": "In-Play Betting", "彩票娱乐": "Lottery Entertainment", "社交平台": "Social Platforms", "关于我们": "About Us", "官方合作伙伴": "Official Partners", "账号注册": "Account Registration", "请输入账号": "Please enter account", "游客登陆": "Guest Login", "在线客服": "Online Customer Service", "F1bet 是亚洲值得信赖的在线赌博网站,自从正式投入服务至今最完整和最新的在线赌博游戏。 F1bet有一个简单的使命和愿景是提供诚实和信任的服务。在近期与Mclaren、Teddy Sheringham达成赞助伙伴协议,进一步加深了“F1bet”的国际知名度,让平台的名声遍布全球。": "F1bet is Asia's trusted online gambling website. Since its official launch, it has offered the most complete and latest online gambling games. F1bet has a simple mission and vision: to provide honest and trustworthy services. The recent sponsorship agreements with McLaren and Teddy Sheringham have further deepened the international popularity of 'F1bet', making the platform's reputation spread worldwide.", "为了提升用户体验,使用本网站后,我们可能使用Cookies技术从服务器中收集客户信息。如果您在F1bet注册或者继续使用网站,则您将被视为同意我们使用Cookies。": "To improve user experience, we may use Cookies technology to collect customer information from the server after you use this website. If you register or continue to use the website at F1bet, you will be deemed to have consented to our use of Cookies.", "如果删除我们的Cookies或禁用我们之后的Cookies,将导致您无法使用平台的某些区域或特色功能。": "If you delete our Cookies or disable our future Cookies, you will not be able to use certain areas or special features of the platform.", "© 2015 - 2026 版权所有并受法律保护。": "© 2015 - 2026 All rights reserved and protected by law.", "热门": "Hot", "立即进入": "Enter Now", "品牌大使": "Brand Ambassador", "塞巴斯蒂安·维特尔": "Sebastian Vettel", "本平台仅向18岁以上成人提供娱乐服务,请理性投注,谨防沉迷。": "This platform only provides entertainment services to adults over 18 years old. Please bet rationally and avoid addiction.", "体验更流畅,娱乐更安全。": "Smoother experience, safer entertainment.", "立即下载": "Download Now", "联赛": "League", "搜索": "Search", "余额宝": "Yu'e Bao", "钱包管理": "Wallet Management", "优惠活动详情": "Promotion Details", "账号登录": "Account Login", "已阅读并同意": "Have read and agreed", "返回": "Return", "下注金额不在范围内": "Bet amount is out of range", "下注金额超过最高限额": "Bet amount exceeds maximum limit", "为了保障您的权益,请先阅读并同意相关条款": "To protect your rights, please read and agree to the relevant terms first", "帮助": "Help", "客服": "Customer Service", "玩法规则": "Rules", "规则条款": "Terms and Conditions", "责任与权誉": "Responsibility and Reputation", "收款账户": "Receiving Account", "请选择收款账户": "Please select receiving account", "距升级": "To upgrade", "还需": "still need", "成长值": "Growth Value", "加拿大": "Canada", "极速": "Speed", "请输入金额": "Please enter amount", "单注限额": "Single Bet Limit", "自动接受更好的赔率": "Auto accept better odds", "批量设置金额": "Batch set amount", "选择收款账户": "Select receiving account", "暂无可用账户": "No available account", "去添加账户": "Go to add account", "添加账户": "Add Account", "暂无账户记录": "No account records", "添加账户": "Add Account", "请输入银行名称或平台名": "Please enter bank or platform name", "银行名称/平台": "Bank Name/Platform", "请输入收款账号或银行卡号": "Please enter receiving account or bank card number", "收款账号(卡号)": "Receiving Account (Card No.)", "请输入收款人真实姓名": "Please enter payee's real name", "真实姓名": "Real Name", "如:我的建行卡": "e.g., My CCB Card", "别名(可选)": "Alias (Optional)", "请填写所有带 * 的必填项": "Please fill in all mandatory fields marked with *", "添加账户": "Add Account", "请输入银行名称或平台名": "Please enter bank or platform name", "银行名称/平台": "Bank Name/Platform", "请输入收款账号或银行卡号": "Please enter receiving account or bank card number", "收款账号(卡号)": "Receiving Account (Card No.)", "请输入收款人真实姓名": "Please enter payee's real name", "真实姓名": "Real Name", "如:我的建行卡": "e.g., My CCB Card", "别名(可选)": "Alias (Optional)", "例如:支付宝": "e.g., Alipay", "请输入准确的 USDT 地址": "Please enter accurate USDT address", "USDT 提现地址": "USDT Withdrawal Address", "如:波场TRC20钱包": "e.g., Tron TRC20 Wallet", "地址别名 (可选)": "Address Alias (Optional)", "明细": "Details", "灵活存取,稳健收益": "Flexible deposit and withdrawal, steady returns", "余额宝总额(元)": "Total Savings Amount (Yuan)", "累计收益(元)": "Cumulative Yield (Yuan)", "转入": "Transfer In", "转出": "Transfer Out", "全部": "All", "持仓中": "Holding", "已取出": "Withdrawn", "开始日期": "Start Date", "结束日期": "End Date", "暂无持仓记录": "No holding records", "转出余额宝": "Transfer out of Savings", "转出金额": "Transfer Out Amount", "请输入转出金额": "Please enter transfer out amount", "确认转出": "Confirm Transfer Out", "转入余额宝": "Transfer into Savings", "转入金额": "Transfer In Amount", "请输入转入金额,最小为 1": "Please enter transfer in amount, minimum is 1", "确认转入": "Confirm Transfer In", "请输入有效金额": "Please enter valid amount", "暂无持仓记录": "No holding records", "暂无明细记录": "No detail records", "别名 (可选)": "Alias (Optional)", "全部资金": "Total Funds", "可用余额": "Available Balance", "没有发现相关记录": "No relevant records found", "RMB提现": "RMB Withdrawal", "天": "Day", "所有选项已全选": "All options selected", "确认提交吗?": "Confirm submission?", "单注最高限制为": "Max single bet limit is", "总投注金额超过可用余额": "Total bet amount exceeds available balance", "单注最高": "Single Bet Max", "单注最低限制为": "Min single bet limit is", "开奖结果": "Draw Result", "开奖时间": "Draw Time", "可赢金额": "Win Amount", "查看订单详情": "View Order Details", "查看赛事详情": "View Match Details", "即时比分": "Live Score", "足球": "Football", "类型": "Type", "已退款": "Refunded", "世界杯": "World Cup", "暂无盘口数据": "No market data", "收起": "Collapse", "确认提交吗?": "Confirm submission?", "可赢金额": "Win Amount", "查看订单详情": "View Order Details", "查看赛事详情": "View Match Details", "即时比分": "Live Score", "足球": "Football", "类型": "Type", "已退款": "Refunded", "世界杯": "World Cup", "暂无盘口数据": "No market data", "封盘中": "Market Closed", "加拿大28": "Canada 28", "剩余本金": "Remaining Principal", "日利率": "Daily Interest Rate", "没有更多记录了": "No more records", "正在加载...": "Loading...", "持仓时间": "Holding Time", "小时": "Hour(s)", "获取中...": "Fetching...", "复制": "Copy", "提交中...": "Submitting...", "刷新中...": "Refreshing...", "确认要删除这条账户记录吗?": "Are you sure you want to delete this account record?", "删除中...": "Deleting...", "新资金密码长度不能少于6位": "New fund password cannot be less than 6 characters", "两次输入的新资金密码不一致": "The two new fund passwords entered do not match", "请输入或选择充值金额": "Please enter or select a deposit amount", "永久网址": "Permanent URL", "请输入或选择充值金额": "Please enter or select a deposit amount", "资金类型": "Fund Type", "删除成功": "Deleted successfully", "账户余额不足": "Insufficient account balance", "请输入有效的提现金额": "Please enter a valid withdrawal amount", "退款审核中": "Refund under review", "退款被驳回": "Refund rejected", "金额不能小于等于0": "Amount must be greater than 0", "退款时间": "Refund Time", "请输入大于0的有效金额": "Please enter a valid amount greater than 0", "请检查下注金额、限额及余额": "Please check your bet amount, limit, and balance", "编辑账户": "Edit Account", "极速28": "Turbo 28", "余额宝明细": "Savings Vault Details", "资金类型": "Fund Type", "Match Details": "Match Details", "Match List": "Match List" }; const vi = { "加载中": "Đang tải", "操作失败": "Thao tác thất bại", "请求失败,请稍后重试": "Yêu cầu thất bại, vui lòng thử lại sau", "登录已过期,请重新登录": "Phiên đăng nhập đã hết hạn, vui lòng đăng nhập lại", "手机号": "Số điện thoại", "邮箱": "Email", "密码": "Mật khẩu", "忘记密码": "Quên mật khẩu", "注册账号": "Đăng ký tài khoản", "请输入": "Vui lòng nhập", "记住密码": "Nhớ mật khẩu", "登录": "Đăng nhập", "验证码": "Mã xác minh", "请输入6位验证码": "Vui lòng nhập mã xác minh 6 chữ số", "请输入密码": "Vui lòng nhập mật khẩu", "确认密码": "Xác nhận mật khẩu", "请再次输入密码": "Vui lòng nhập lại mật khẩu", "已有账号": "Đã có tài khoản", "前往登录": "Đi đến đăng nhập", "获取验证码": "Lấy mã xác minh", "注册": "Đăng ký", "过滤": "Lọc", "滚球": "Cược rung", "体育博彩": "Cá cược thể thao", "投注历史": "Lịch sử cược", "我的": "Của tôi", "首页": "Trang chủ", "安全": "Bảo mật", "注册并登录": "Đăng ký và đăng nhập", "请输入有效的充值数量": "Vui lòng nhập số tiền nạp hợp lệ", "请上传支付凭证截图": "Vui lòng tải lên ảnh chụp biên lai thanh toán", "充值": "Nạp tiền", "暂无二维码": "Chưa có mã QR", "选择币种": "Chọn loại tiền", "选择区块链网络": "Chọn mạng blockchain", "充值地址": "Địa chỉ nạp tiền", "请确认充值地址正确无误,错误地址将导致资产丢失且无法找回": "Vui lòng xác nhận địa chỉ nạp tiền chính xác, địa chỉ sai sẽ dẫn đến mất tài sản và không thể khôi phục", "充值数量": "Số tiền nạp", "请输入充值数量": "Vui lòng nhập số tiền nạp", "预计到账": "Dự kiến nhận được", "当前汇率": "Tỷ giá hiện tại", "上传支付凭证": "Tải lên biên lai thanh toán", "点击上传": "Nhấp để tải lên", "确认充值": "Xác nhận nạp tiền", "保存头像": "Lưu ảnh đại diện", "退出登录": "Đăng xuất", "提现方式": "Phương thức rút tiền", "提现币种": "Loại tiền rút", "提现网络": "Mạng rút tiền", "提现地址": "Địa chỉ rút tiền", "提现金额": "Số tiền rút", "手续费": "Phí giao dịch", "请选择提现方式": "Vui lòng chọn phương thức rút tiền", "银行卡": "Thẻ ngân hàng", "加密货币": "Tiền điện tử", "请选择提现币种": "Vui lòng chọn loại tiền rút", "请选择提现网络": "Vui lòng chọn mạng rút tiền", "请输入提现地址": "Vui lòng nhập địa chỉ rút tiền", "提款范围": "Phạm vi rút tiền", "钱包余额": "Số dư ví", "手续费比例": "Tỷ lệ phí", "预计到账金额": "Số tiền dự kiến nhận", "提交": "Gửi đi", "提现": "Rút tiền", "收款名字": "Tên người nhận", "银行名称": "Tên ngân hàng", "银行账号": "Số tài khoản ngân hàng", "银行地址": "Địa chỉ ngân hàng", "国际代码": "Mã quốc tế (Swift)", "其他": "Khác", "请输入收款名字": "Vui lòng nhập tên người nhận", "请输入银行名称": "Vui lòng nhập tên ngân hàng", "请输入银行账号": "Vui lòng nhập số tài khoản ngân hàng", "请输入银行地址": "Vui lòng nhập địa chỉ ngân hàng", "请输入国际代码": "Vui lòng nhập mã quốc tế", "其他信息": "Thông tin khác", "请先选择币种": "Vui lòng chọn loại tiền trước", "提现金额不能小于": "Số tiền rút không được nhỏ hơn", "查询": "Tra cứu", "重置": "Đặt lại", "暂无资金记录": "Chưa có lịch sử giao dịch", "流水号": "Mã giao dịch", "交易金额": "Số tiền giao dịch", "变更后余额": "Số dư sau thay đổi", "资金记录": "Lịch sử quỹ", "交易类型": "Loại giao dịch", "日期区间": "Khoảng thời gian", "请选择日期区间": "Vui lòng chọn khoảng thời gian", "记录": "Lịch sử", "充值记录": "Lịch sử nạp tiền", "提现记录": "Lịch sử rút tiền", "更多滚球": "Thêm cược rung", "主队赢": "Đội nhà thắng", "平局": "Hòa", "客队赢": "Đội khách thắng", "进行中": "Đang diễn ra", "已完场": "Đã kết thúc", "投注单": "Phiếu cược", "还没有账号": "Chưa có tài khoản", "邮箱登录": "Đăng nhập bằng Email", "手机号登录": "Đăng nhập bằng số điện thoại", "请输入登录邮箱": "Vui lòng nhập email đăng nhập", "请输入登录密码": "Vui lòng nhập mật khẩu đăng nhập", "我已阅读并同意": "Tôi đã đọc và đồng ý", "去注册": "Đi đăng ký", "版本": "Phiên bản", "产品服务协议": "Thỏa thuận dịch vụ", "请输入手机号": "Vui lòng nhập số điện thoại", "取消": "Hủy bỏ", "确认": "Xác nhận", "选择区号": "Chọn mã vùng", "请输入验证码": "Vui lòng nhập mã xác minh", "请先同意服务协议!": "Vui lòng đồng ý với thỏa thuận dịch vụ trước!", "请先同意服务协议": "Vui lòng đồng ý với thỏa thuận dịch vụ trước", "邮箱注册": "Đăng ký bằng email", "手机注册": "Đăng ký bằng số điện thoại", "请输入注册邮箱": "Vui lòng nhập email đăng ký", "请设置登录密码": "Vui lòng thiết lập mật khẩu đăng nhập", "请确认登录密码": "Vui lòng xác nhận mật khẩu đăng nhập", "立即注册": "Đăng ký ngay", "去登录": "Đi đăng nhập", "上传图片": "Tải ảnh lên", "未设置用户名": "Chưa thiết lập tên người dùng", "暂无": "Không có", "账户余额": "Số dư tài khoản", "冻结金额": "Số tiền đóng băng", "账户安全": "Bảo mật tài khoản", "更换头像": "Đổi ảnh đại diện", "保存": "Lưu", "请先选择头像": "Vui lòng chọn ảnh đại diện trước", "提示": "Nhắc nhở", "确定要退出登录吗?": "Bạn có chắc chắn muốn đăng xuất không?", "个人资料": "Hồ sơ cá nhân", "账户": "Tài khoản", "账户号码": "Số tài khoản", "您的密码": "Mật khẩu của bạn", "注册日期": "Ngày đăng ký", "联系方式": "Thông tin liên hệ", "电话": "Điện thoại", "未提供": "Chưa cung cấp", "电子邮箱": "Địa chỉ Email", "个人信息": "Thông tin cá nhân", "姓氏": "Họ", "名字": "Tên", "出生日期": "Ngày sinh", "出生地": "Nơi sinh", "文件类型": "Loại giấy tờ", "身份证": "CMND/CCCD", "文件号码": "Số giấy tờ", "证件签发日期": "Ngày cấp giấy tờ", "国家": "Quốc gia", "新加坡": "Singapore", "地区": "Khu vực", "城市": "Thành phố", "常住地址": "Địa chỉ thường trú", "编辑": "Chỉnh sửa", "未设置": "Chưa thiết lập", "修改联系方式": "Sửa thông tin liên hệ", "请输入电话号码": "Vui lòng nhập số điện thoại", "请输入电子邮箱": "Vui lòng nhập email", "未开始": "Chưa bắt đầu", "延期": "Hoãn lại", "网络类型": "Loại mạng", "订单状态": "Trạng thái đơn hàng", "处理中": "Đang xử lý", "成功": "Thành công", "失败": "Thất bại", "首次充值": "Nạp lần đầu", "是": "Có", "创建时间": "Thời gian tạo", "订单号": "Mã đơn hàng", "充值金额": "Số tiền nạp", "实际到账": "Thực nhận", "请选择记录查询区间": "Vui lòng chọn khoảng thời gian tra cứu", "开始": "Bắt đầu", "结束": "Kết thúc", "条件筛选": "Lọc điều kiện", "重置全部": "Đặt lại tất cả", "立即查询": "Tra cứu ngay", "更新数据中...": "Đang cập nhật dữ liệu...", "银行信息": "Thông tin ngân hàng", "申请时间": "Thời gian đăng ký", "提现成功": "Rút tiền thành công", "已驳回": "Đã từ chối", "网络/地址": "Mạng/Địa chỉ", "投注额超过您的余额": "Tiền cược vượt quá số dư của bạn", "潜在赢利": "Tiền thắng tiềm năng", "存款": "Gửi tiền", "前往投注单": "Đến phiếu cược", "总赔率": "Tổng tỷ lệ cược", "投注": "Đặt cược", "注单号": "Mã phiếu cược", "赔率": "Tỷ lệ cược", "待结算": "Chờ kết toán", "投注金额": "Tiền cược", "盈亏/派彩": "Thắng thua / Trả thưởng", "请选择查询区间": "Vui lòng chọn khoảng thời gian", "日期筛选": "Lọc ngày", "加载最新记录...": "Đang tải bản ghi mới nhất...", "请选择查询日期": "Vui lòng chọn ngày tra cứu", "全场": "Toàn trận", "独赢": "1X2", "半场独赢": "1X2 Hiệp 1", "让球": "Cược chấp", "半场让球": "Cược chấp Hiệp 1", "大小球": "Tài/Xỉu", "半场大小球": "Tài/Xỉu Hiệp 1", "半场": "Hiệp 1", "大": "Tài", "小": "Xỉu", "赛事详情": "Chi tiết trận đấu", "主胜": "Đội nhà thắng", "客胜": "Đội khách thắng", "正在更新赛事...": "Đang cập nhật trận đấu...", "确认提现": "Xác nhận rút tiền", "安全验证": "Xác minh bảo mật", "请输入资金密码": "Vui lòng nhập mật khẩu giao dịch", "为保障您的资金安全,请输入资金密码": "Để đảm bảo an toàn, vui lòng nhập mật khẩu giao dịch", "pc28": "PC28", "pc28分分彩": "Xổ số PC28", "获取最新数据...": "Đang lấy dữ liệu mới nhất...", "最新": "Mới nhất", "咪牌": "Nặn bài", "下一期": "Kỳ tiếp theo", "pc28开奖详情": "Chi tiết mở thưởng PC28", "pc28开奖规则": "Quy tắc mở thưởng PC28", "确定投注": "Xác nhận cược", "正在更新内容...": "Đang cập nhật nội dung...", "有效": "Hợp lệ", "盘口已失效或关闭": "Kèo đã vô hiệu hoặc đóng", "全部类型": "Tất cả loại", "下注": "Đặt cược", "资金冻结": "Đóng băng tiền", "退款": "Hoàn tiền", "未知类型": "Loại không xác định", "投注内容": "Nội dung cược", "投注本金": "Tiền gốc cược", "期号": "Kỳ số", "待开奖": "Chờ mở thưởng", "已中奖": "Đã trúng thưởng", "未中奖": "Không trúng thưởng", "已撤单": "Đã hủy đơn", "投注记录": "Lịch sử cược", "中奖": "Trúng thưởng", "已结算": "Đã kết toán", "和局": "Hòa", "平手半": "Đồng banh nửa trái", "未结算": "Chưa kết toán", "已取消": "Đã hủy", "彩票": "Giải trí", "体育": "Thể thao", "是否中奖": "Có trúng thưởng không", "结算状态": "Trạng thái kết toán", "主客队赢": "Đội nhà/khách thắng", "进球大小": "Tổng số bàn thắng Tài/Xỉu", "半场大小": "Tài/Xỉu Hiệp 1", "半全场": "Hiệp 1/Toàn trận", "两队都进球": "Hai đội đều ghi bàn", "让球结果": "Kết quả cược chấp", "准确比分": "Tỷ số chính xác", "客队": "Đội khách", "否": "Không", "单": "Lẻ", "双": "Chẵn", "上半场": "Hiệp 1", "下半场": "Hiệp 2", "主队": "Đội nhà", "PC28分分彩": "Xổ số PC28", "彩票玩法": "Cách chơi giải trí", "盈亏": "Thắng thua", "PC28": "PC28", "未开奖": "Chưa mở thưởng", "六合彩": "Mark Six", "合局": "Hòa", "澳门六合彩": "Macau Mark Six", "状态": "Trạng thái", "赛事列表": "Danh sách trận đấu", "暂无投注项": "Chưa có mục cược", "玩法": "Cách chơi", "更多体育博彩": "Thêm cá cược thể thao", "去投注": "Đi cược", "总赔率 (有效)": "Tổng tỷ lệ (Hợp lệ)", "开奖详情": "Chi tiết mở thưởng", "往期历史": "Lịch sử kỳ trước", "开奖规则": "Quy tắc mở thưởng", "暂无玩法数据": "Chưa có dữ liệu cách chơi", "点击展开": "Nhấp để mở rộng", "暂无赛事数据": "Chưa có dữ liệu trận đấu", "注单详情": "Chi tiết phiếu cược", "加载中...": "Đang tải...", "盈亏金额": "Số tiền thắng thua", "开奖信息": "Thông tin mở thưởng", "期": "Kỳ", "投注项": "Mục cược", "下注金额": "Tiền đặt cược", "下注时间": "Thời gian cược", "收起详情": "Thu gọn chi tiết", "限额": "Hạn mức", "总投注金额": "Tổng tiền cược", "立即投注": "Cược ngay", "开奖截图": "Ảnh chụp mở thưởng", "请选择币种": "Vui lòng chọn loại tiền", "请选择网络": "Vui lòng chọn mạng", "最大": "Tối đa", "汇率": "Tỷ giá", "待处理": "Đang chờ xử lý", "加密货币提现": "Rút tiền điện tử", "失败原因": "Lý do thất bại", "来源地址": "Địa chỉ nguồn", "支付凭证": "Biên lai thanh toán", "变动后余额": "Số dư sau biến động", "变动前余额": "Số dư trước biến động", "查看凭证": "Xem biên lai", "是否注销账户,注销账户后,系统将删除清空账户": "Xác nhận xóa tài khoản? Sau khi xóa, hệ thống sẽ xóa sạch dữ liệu tài khoản", "修改密码": "Đổi mật khẩu", "修改资金密码": "Đổi mật khẩu giao dịch", "注销账号": "Xóa tài khoản", "旧密码": "Mật khẩu cũ", "新密码": "Mật khẩu mới", "确认新密码": "Xác nhận mật khẩu mới", "请输入旧密码": "Vui lòng nhập mật khẩu cũ", "请输入新密码(至少6位)": "Vui lòng nhập mật khẩu mới (ít nhất 6 ký tự)", "请再次输入新密码": "Vui lòng nhập lại mật khẩu mới", "确认修改": "Xác nhận thay đổi", "旧资金密码": "Mật khẩu giao dịch cũ", "新资金密码": "Mật khẩu giao dịch mới", "确认新资金密码": "Xác nhận mật khẩu GD mới", "请输入旧密码(第一次设置资金密码可以为空)": "Nhập mật khẩu cũ (có thể để trống cho lần đầu)", "请输入新资金密码(至少6位)": "Vui lòng nhập mật khẩu GD mới (ít nhất 6 ký tự)", "请输入新资金密码": "Vui lòng nhập mật khẩu GD mới", "请再次输入新资金密码": "Vui lòng nhập lại mật khẩu GD mới", "名称": "Tên", "性别": "Giới tính", "女": "Nữ", "未知": "Không xác định", "游客模式": "Chế độ khách", "正在加载": "Đang tải", "没有更多了": "Không còn nữa", "点击加载更多": "Nhấp để tải thêm", "第": "Thứ", "期开奖": "Mở thưởng kỳ", "近期开奖": "Mở thưởng gần đây", "购彩记录": "Lịch sử mua xổ số", "清空": "Làm trống", "距": "Cách", "期截止": "đóng kỳ", "已选注单": "Phiếu cược đã chọn", "机选": "Chọn ngẫu nhiên", "取消原因": "Lý do hủy", "订单已取消": "Đơn hàng đã bị hủy", "红": "Đỏ", "红波": "Sóng đỏ", "蓝波": "Sóng xanh dương", "绿波": "Sóng xanh lá", "蓝": "Xanh dương", "绿": "Xanh lá", "特码": "Số đặc biệt", "正码": "Số thường", "正码特": "Số thường đặc biệt", "确定": "Xác nhận", "当前比分": "Tỷ số hiện tại", "秒": "Giây", "分": "Phút", "前": "Trước", "中": "Giữa", "尾": "Cuối", "已上传支付凭证": "Đã tải lên biên lai thanh toán", "下注成功": "Đặt cược thành công", "下注中": "Đang đặt cược", "关闭": "Đóng", "购物车": "Giỏ hàng", "今天": "Hôm nay", "周一": "Thứ Hai", "周二": "Thứ Ba", "周三": "Thứ Tư", "周四": "Thứ Năm", "周五": "Thứ Sáu", "周六": "Thứ Bảy", "周日": "Chủ Nhật", "请选择投注单": "Vui lòng chọn phiếu cược", "暂无投注记录": "Chưa có lịch sử cược", "近期开奖记录": "Lịch sử mở thưởng gần đây", "本金": "Tiền gốc", "总金额": "Tổng số tiền", "温馨提示": "Nhắc nhở nhẹ", "同意": "Đồng ý", "单号": "Mã số", "取": "Lấy", "投注成功": "Cược thành công", "不可重新提交": "Không thể gửi lại", "投注时间": "Thời gian cược", "等待开奖中": "Đang chờ mở thưởng", "注单单号": "Mã phiếu cược", "赛事信息": "Thông tin trận đấu", "选项": "Tùy chọn", "赔率玩法": "Cách chơi tỷ lệ", "盘口": "Kèo", "订单编号": "Mã đơn hàng", "复制成功": "Sao chép thành công", "输入本金": "Nhập tiền gốc", "请输入新密码": "Vui lòng nhập mật khẩu mới", "请再次输入确认密码": "Vui lòng nhập lại mật khẩu xác nhận", "两次输入的新密码不一致": "Mật khẩu mới nhập hai lần không khớp", "新密码不能与旧密码相同": "Mật khẩu mới không được trùng với mật khẩu cũ", "新密码长度不能少于": "Độ dài mật khẩu mới không được ít hơn", "暂无相关资金记录": "Chưa có lịch sử giao dịch liên quan", "余额不足": "Số dư không đủ", "余额不足,去存款": "Số dư không đủ, đi gửi tiền.", "验证码长度为": "Độ dài mã xác minh là", "验证码已发送": "Đã gửi mã xác minh", "两次输入的密码不一致": "Mật khẩu nhập hai lần không khớp", "提现金额不能大于余额": "Số tiền rút không được lớn hơn số dư", "个字符之间": "ký tự", "密码长度需在": "Độ dài mật khẩu phải từ", "位": "ký tự", "已选注单明细": "Chi tiết phiếu cược đã chọn", "已达最低投注": "Đã đạt mức cược tối thiểu", "已达最高投注": "Đã đạt mức cược tối đa", "暂无有效投注项,请移除锁定盘口或重新选择": "Chưa có mục cược hợp lệ, vui lòng xóa kèo bị khóa hoặc chọn lại", "请补全下注金额": "Vui lòng điền đủ số tiền cược", "期号 / 玩法": "Kỳ số / Cách chơi", "正在加载注单详情...": "Đang tải chi tiết phiếu cược...", "为了保障您的权益,请先阅读并同意": "Để bảo vệ quyền lợi của bạn, vui lòng đọc và đồng ý trước", "以下注单提交失败,是否重新提交?": "Các phiếu cược sau gửi thất bại, có muốn gửi lại không?", "正码1-6": "Số thường 1-6", "未知的赔率": "Tỷ lệ cược không xác định", "盘口已更新": "Kèo đã được cập nhật", "赔率已更新": "Tỷ lệ cược đã được cập nhật", "赛事已结束": "Trận đấu đã kết thúc", "赛事已下架": "Trận đấu đã bị gỡ xuống", "赛事不存在": "Trận đấu không tồn tại", "已锁盘": "Đã khóa kèo", "下注失败原因": "Lý do cược thất bại", "此注已停售": "Mã cược này đã ngừng bán", "缺少盘口数据": "Thiếu dữ liệu kèo", "主": "Nhà", "客": "Khách", "Time To Be Defined": "Thời gian chưa xác định", "Not Started": "Chưa bắt đầu", "First Half": "Hiệp 1", "First Half, Kick Off": "Hiệp 1, Bắt đầu", "Halftime": "Nghỉ giải lao", "Second Half": "Hiệp 2", "Second Half, 2nd Half Started": "Hiệp 2, Đã bắt đầu", "Extra Time": "Hiệp phụ", "Break Time": "Thời gian nghỉ", "Penalty In Progress": "Đang đá luân lưu", "Match Suspended": "Trận đấu bị đình chỉ", "Match Interrupted": "Trận đấu bị gián đoạn", "Match Finished": "Trận đấu kết thúc", "Match Postponed": "Trận đấu bị hoãn", "Match Cancelled": "Trận đấu bị hủy", "Match Abandoned": "Trận đấu bị bỏ dở", "Technical Loss": "Thua kỹ thuật", "WalkOver": "Bỏ cuộc", "In Progress": "Đang diễn ra", "派彩金额": "Số lượng Paid", "香港六合彩": "Xổ số Hồng Kông", "请先选择投注项": "Vui lòng chọn mục đặt cược trước", "结算时间": "Thời gian thanh toán" }; const { setLocale } = useLocale(); const defaultLang = "zh"; uni.getStorageSync("locale") || defaultLang; const messages$2 = { zh, en: en$1, vi }; const getLocale = () => { const localLang = uni.getStorageSync("locale") || defaultLang; if (Object.keys(messages$2).includes(localLang)) { return localLang; } }; const i18n = createI18n({ legacy: false, // 必须设置为 false,适配 Vue3 的组合式 API locale: getLocale(), // 当前语言 fallbackLocale: defaultLang, // 回退语言(当当前语言无对应翻译时) messages: messages$2 // 多语言数据 }); const changeLanguage = (lang) => { const uViewLangs = { en: "en-US", zh: "zh-CN", vi: "vi" }; if (!Object.keys(messages$2).includes(lang)) { formatAppLog("warn", "at lang/index.js:54", `语言标识 ${lang} 不存在,默认使用中文 ${defaultLang}`); lang = defaultLang; } i18n.global.locale.value = lang; setLocale(uViewLangs[lang]); uni.setStorageSync("locale", lang); uni.setTabBarItem({ index: 0, // tab 的索引,从 0 开始 text: uni.$t("首页"), success: function() { } }); uni.setTabBarItem({ index: 1, // tab 的索引,从 0 开始 text: uni.$t("体育博彩"), success: function() { } }); uni.setTabBarItem({ index: 2, // tab 的索引,从 0 开始 text: uni.$t("彩票"), success: function() { } }); uni.setTabBarItem({ index: 3, // tab 的索引,从 0 开始 text: uni.$t("我的"), success: function() { } }); plus.runtime.restart(); }; const _imports_0$7 = "/static/icon/lang1.png"; const _imports_1$3 = "/static/icon/lang.png"; const _sfc_main$1j = { __name: "index", props: ["isBall"], setup(__props, { expose: __expose }) { __expose(); const props = __props; const currentIndex = vue.ref(0); const langMapping = vue.ref({ zh: "中文简体", vi: "Vietnamese", en: "English" }); const list2 = vue.ref(Object.keys(messages$2).map((item, index) => { if (item === getLocale()) { currentIndex.value = index; } return { label: langMapping.value[item], // value: messages[item], value: item }; })); const show = vue.ref(false); function confirm(e) { changeLanguage(e[0].value); } const __returned__ = { props, currentIndex, langMapping, list: list2, show, confirm, get changeLanguage() { return changeLanguage; }, get messages() { return messages$2; }, get getLocale() { return getLocale; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_select = __unplugin_components_5$1; return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createElementVNode("view", { onClick: _cache[0] || (_cache[0] = ($event) => $setup.show = true) }, [ $props.isBall ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _imports_0$7, class: "h-7 w-7", style: { "width": "22px", "height": "22px", "display": "flex", "align-items": "center" } })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_1$3, class: "h-7 w-7" })) ]), vue.createVNode(_component_u_select, { modelValue: $setup.show, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.show = $event), list: $setup.list, "default-value": [$setup.currentIndex], onConfirm: $setup.confirm, "confirm-text": _ctx.$t("确认"), "cancel-text": _ctx.$t("取消") }, null, 8, ["modelValue", "list", "default-value", "confirm-text", "cancel-text"]) ], 64 /* STABLE_FRAGMENT */ ); } const selectLang = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/components/selectLang/index.vue"]]); const ButtonProps = { ...baseProps, /** 是否细边框 */ hairLine: { type: Boolean, default: true }, /** 按钮的预置样式,default,primary,error,warning,success */ type: { type: String, default: "default" }, /** 按钮尺寸,default,medium,mini */ size: { type: String, default: "default" }, /** 按钮形状,circle(两边为半圆),square(带圆角) */ shape: { type: String, default: "square" }, /** 按钮是否镂空 */ plain: { type: Boolean, default: false }, /** 是否禁止状态 */ disabled: { type: Boolean, default: false }, /** 是否加载中 */ loading: { type: Boolean, default: false }, /** 支付宝小程序,当 open-type 为 getAuthorize 时有效 */ scope: { type: String, default: "" }, /** 开放能力,具体请看uniapp稳定关于button组件部分说明 */ openType: { type: String, default: "" }, /** 用于
组件,点击分别会触发 组件的 submit/reset 事件 */ formType: { type: String, default: "" }, /** 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 */ appParameter: { type: String, default: "" }, /** 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效 */ hoverStopPropagation: { type: Boolean, default: false }, /** 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效 */ lang: { type: String, default: "en" }, /** 会话来源,open-type="contact"时有效。只微信小程序有效 */ sessionFrom: { type: String, default: "" }, /** 会话内消息卡片标题,open-type="contact"时有效 */ sendMessageTitle: { type: String, default: "" }, /** 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 */ sendMessagePath: { type: String, default: "" }, /** 会话内消息卡片图片,open-type="contact"时有效 */ sendMessageImg: { type: String, default: "" }, /** 是否显示会话内消息卡片,open-type="contact"时有效 */ showMessageCard: { type: Boolean, default: false }, /** 手指按(触摸)按钮时按钮时的背景颜色 */ hoverBgColor: { type: String, default: "" }, /** 水波纹的背景颜色 */ rippleBgColor: { type: String, default: "" }, /** 是否开启水波纹效果 */ ripple: { type: Boolean, default: false }, /** 按下的类名 */ hoverClass: { type: String, default: "" }, /** 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取 */ dataName: { type: String, default: "" }, /** 节流,一定时间内只能触发一次 */ throttleTime: { type: [String, Number], default: 0 }, /** 按住后多久出现点击态,单位毫秒 */ hoverStartTime: { type: [String, Number], default: 20 }, /** 手指松开后点击态保留时间,单位毫秒 */ hoverStayTime: { type: [String, Number], default: 150 } }; const __default__$c = { name: "u-button", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({ ...__default__$c, props: ButtonProps, emits: [ "click", "getuserinfo", "contact", "getphonenumber", "error", "launchapp", "opensetting", "chooseavatar", "agreeprivacyauthorization" ], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const emit = __emit; const props = __props; const rippleTop = vue.ref(0); const rippleLeft = vue.ref(0); const fields = vue.ref({}); const waveActive = vue.ref(false); const getHoverClass = vue.computed(() => { if (props.loading || props.disabled || props.ripple) return ""; if (props.hoverClass) return props.hoverClass; let hoverClass = ""; hoverClass = props.plain ? "u-" + props.type + "-plain-hover" : "u-" + props.type + "-hover"; return hoverClass; }); const showHairLineBorder = vue.computed(() => { if (["primary", "success", "error", "warning"].indexOf(props.type) >= 0 && !props.plain) { return ""; } else { return "u-hairline-border"; } }); function click2(e) { if (Number(props.throttleTime)) { $u.throttle(() => { clickAction(e); }, Number(props.throttleTime)); } else { clickAction(e); } } function clickAction(e) { if (props.loading === true || props.disabled === true) return; if (props.ripple) { waveActive.value = false; vue.nextTick(() => { getWaveQuery(e); }); } emit("click", e); } function getWaveQuery(e) { getElQuery().then((res) => { let data = res[0]; if (!data.width || !data.width) return; data.targetWidth = data.height > data.width ? data.height : data.width; if (!data.targetWidth) return; fields.value = data; let touchesX = "", touchesY = ""; touchesX = e.touches[0].clientX; touchesY = e.touches[0].clientY; rippleTop.value = Number(touchesY) - data.top - data.targetWidth / 2; rippleLeft.value = Number(touchesX) - data.left - data.targetWidth / 2; vue.nextTick(() => { waveActive.value = true; }); }); } function getElQuery() { return new Promise((resolve2) => { let queryInfo = ""; queryInfo = uni.createSelectorQuery().in(null); queryInfo.select(".u-btn").boundingClientRect(); queryInfo.exec((data) => { resolve2(data); }); }); } function getphonenumber(event) { emit("getphonenumber", event); } function getuserinfo(event) { emit("getuserinfo", event); } function error(event) { emit("error", event); } function opensetting(event) { emit("opensetting", event); } function launchapp(event) { emit("launchapp", event); } function getAuthorize(event) { if (props.scope === "phoneNumber") { getphonenumber(event); } else if (props.scope === "userInfo") { getuserinfo(event); } } function contact(event) { emit("contact", event); } function chooseavatar(event) { emit("chooseavatar", event); } function agreeprivacyauthorization(event) { emit("agreeprivacyauthorization", event); } const __returned__ = { emit, props, rippleTop, rippleLeft, fields, waveActive, getHoverClass, showHairLineBorder, click: click2, clickAction, getWaveQuery, getElQuery, getphonenumber, getuserinfo, error, opensetting, launchapp, getAuthorize, contact, chooseavatar, agreeprivacyauthorization, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" prettier-ignore "), vue.createElementVNode("button", { id: "u-wave-btn", class: vue.normalizeClass(["u-btn u-line-1 u-fix-ios-appearance", [ "u-size-" + _ctx.size, _ctx.plain ? "u-btn--" + _ctx.type + "--plain" : "", _ctx.loading ? "u-loading" : "", _ctx.shape === "circle" ? "u-round-circle" : "", _ctx.hairLine ? $setup.showHairLineBorder : "u-btn--bold-border", "u-btn--" + _ctx.type, _ctx.disabled ? `u-btn--${_ctx.type}--disabled` : "", _ctx.customClass ]]), "hover-start-time": Number(_ctx.hoverStartTime), "hover-stay-time": Number(_ctx.hoverStayTime), disabled: _ctx.disabled, "form-type": _ctx.formType, "open-type": _ctx.disabled || _ctx.loading ? void 0 : _ctx.openType, "app-parameter": _ctx.appParameter, "hover-stop-propagation": _ctx.hoverStopPropagation, "send-message-title": _ctx.sendMessageTitle, "send-message-path": _ctx.sendMessagePath, lang: _ctx.lang, "data-name": _ctx.dataName, "session-from": _ctx.sessionFrom, "send-message-img": _ctx.sendMessageImg, "show-message-card": _ctx.showMessageCard, "on:getAuthorize": $setup.getAuthorize, onGetuserinfo: $setup.getuserinfo, onContact: $setup.contact, onGetphonenumber: $setup.getphonenumber, onError: $setup.error, onLaunchapp: $setup.launchapp, onOpensetting: $setup.opensetting, onChooseavatar: $setup.chooseavatar, onAgreeprivacyauthorization: $setup.agreeprivacyauthorization, style: vue.normalizeStyle( $setup.$u.toStyle( { overflow: _ctx.ripple ? "hidden" : "visible" }, _ctx.customStyle ) ), onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $setup.click($event), ["stop"])), "hover-class": $setup.getHoverClass, loading: _ctx.loading }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), _ctx.ripple ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-wave-ripple", [$setup.waveActive ? "u-wave-active" : ""]]), style: vue.normalizeStyle({ top: $setup.rippleTop + "px", left: $setup.rippleLeft + "px", width: $setup.fields.targetWidth + "px", height: $setup.fields.targetWidth + "px", "background-color": _ctx.rippleBgColor || "rgba(0, 0, 0, 0.15)" }) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 46, ["hover-start-time", "hover-stay-time", "disabled", "form-type", "open-type", "app-parameter", "hover-stop-propagation", "send-message-title", "send-message-path", "lang", "data-name", "session-from", "send-message-img", "show-message-card", "hover-class", "loading"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const __unplugin_components_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-6df07486"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-button/u-button.vue"]]); function set$1(target, key, val) { if (Array.isArray(target)) { target.length = Math.max(target.length, key); target.splice(key, 1, val); return val; } target[key] = val; return val; } function del(target, key) { if (Array.isArray(target)) { target.splice(key, 1); return; } delete target[key]; } function getDevtoolsGlobalHook() { return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__; } function getTarget() { return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : {}; } const isProxyAvailable = typeof Proxy === "function"; const HOOK_SETUP = "devtools-plugin:setup"; const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set"; let supported; let perf; function isPerformanceSupported() { var _a2; if (supported !== void 0) { return supported; } if (typeof window !== "undefined" && window.performance) { supported = true; perf = window.performance; } else if (typeof globalThis !== "undefined" && ((_a2 = globalThis.perf_hooks) === null || _a2 === void 0 ? void 0 : _a2.performance)) { supported = true; perf = globalThis.perf_hooks.performance; } else { supported = false; } return supported; } function now() { return isPerformanceSupported() ? perf.now() : Date.now(); } class ApiProxy { constructor(plugin, hook) { this.target = null; this.targetQueue = []; this.onQueue = []; this.plugin = plugin; this.hook = hook; const defaultSettings = {}; if (plugin.settings) { for (const id in plugin.settings) { const item = plugin.settings[id]; defaultSettings[id] = item.defaultValue; } } const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`; let currentSettings = Object.assign({}, defaultSettings); try { const raw = localStorage.getItem(localSettingsSaveId); const data = JSON.parse(raw); Object.assign(currentSettings, data); } catch (e) { } this.fallbacks = { getSettings() { return currentSettings; }, setSettings(value) { try { localStorage.setItem(localSettingsSaveId, JSON.stringify(value)); } catch (e) { } currentSettings = value; }, now() { return now(); } }; if (hook) { hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => { if (pluginId === this.plugin.id) { this.fallbacks.setSettings(value); } }); } this.proxiedOn = new Proxy({}, { get: (_target, prop) => { if (this.target) { return this.target.on[prop]; } else { return (...args) => { this.onQueue.push({ method: prop, args }); }; } } }); this.proxiedTarget = new Proxy({}, { get: (_target, prop) => { if (this.target) { return this.target[prop]; } else if (prop === "on") { return this.proxiedOn; } else if (Object.keys(this.fallbacks).includes(prop)) { return (...args) => { this.targetQueue.push({ method: prop, args, resolve: () => { } }); return this.fallbacks[prop](...args); }; } else { return (...args) => { return new Promise((resolve2) => { this.targetQueue.push({ method: prop, args, resolve: resolve2 }); }); }; } } }); } async setRealTarget(target) { this.target = target; for (const item of this.onQueue) { this.target.on[item.method](...item.args); } for (const item of this.targetQueue) { item.resolve(await this.target[item.method](...item.args)); } } } function setupDevtoolsPlugin(pluginDescriptor, setupFn) { const descriptor = pluginDescriptor; const target = getTarget(); const hook = getDevtoolsGlobalHook(); const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy; if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { hook.emit(HOOK_SETUP, pluginDescriptor, setupFn); } else { const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null; const list2 = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; list2.push({ pluginDescriptor: descriptor, setupFn, proxy }); if (proxy) { setupFn(proxy.proxiedTarget); } } } /*! * pinia v2.0.36 * (c) 2023 Eduardo San Martin Morote * @license MIT */ let activePinia; const setActivePinia = (pinia) => activePinia = pinia; const piniaSymbol = Symbol("pinia"); function isPlainObject(o) { return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function"; } var MutationType; (function(MutationType2) { MutationType2["direct"] = "direct"; MutationType2["patchObject"] = "patch object"; MutationType2["patchFunction"] = "patch function"; })(MutationType || (MutationType = {})); const IS_CLIENT = typeof window !== "undefined"; const USE_DEVTOOLS = IS_CLIENT; const _global = /* @__PURE__ */ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })(); function bom(blob, { autoBom = false } = {}) { if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { return new Blob([String.fromCharCode(65279), blob], { type: blob.type }); } return blob; } function download(url2, name, opts) { const xhr = new XMLHttpRequest(); xhr.open("GET", url2); xhr.responseType = "blob"; xhr.onload = function() { saveAs(xhr.response, name, opts); }; xhr.onerror = function() { console.error("could not download file"); }; xhr.send(); } function corsEnabled(url2) { const xhr = new XMLHttpRequest(); xhr.open("HEAD", url2, false); try { xhr.send(); } catch (e) { } return xhr.status >= 200 && xhr.status <= 299; } function click(node2) { try { node2.dispatchEvent(new MouseEvent("click")); } catch (e) { const evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null); node2.dispatchEvent(evt); } } const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" }; const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))(); const saveAs = !IS_CLIENT ? () => { } : ( // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : ( // Use msSaveOrOpenBlob as a second approach "msSaveOrOpenBlob" in _navigator ? msSaveAs : ( // Fallback to using FileReader and a popup fileSaverSaveAs ) ) ); function downloadSaveAs(blob, name = "download", opts) { const a = document.createElement("a"); a.download = name; a.rel = "noopener"; if (typeof blob === "string") { a.href = blob; if (a.origin !== location.origin) { if (corsEnabled(a.href)) { download(blob, name, opts); } else { a.target = "_blank"; click(a); } } else { click(a); } } else { a.href = URL.createObjectURL(blob); setTimeout(function() { URL.revokeObjectURL(a.href); }, 4e4); setTimeout(function() { click(a); }, 0); } } function msSaveAs(blob, name = "download", opts) { if (typeof blob === "string") { if (corsEnabled(blob)) { download(blob, name, opts); } else { const a = document.createElement("a"); a.href = blob; a.target = "_blank"; setTimeout(function() { click(a); }); } } else { navigator.msSaveOrOpenBlob(bom(blob, opts), name); } } function fileSaverSaveAs(blob, name, opts, popup) { popup = popup || open("", "_blank"); if (popup) { popup.document.title = popup.document.body.innerText = "downloading..."; } if (typeof blob === "string") return download(blob, name, opts); const force = blob.type === "application/octet-stream"; const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global; const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent); if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") { const reader = new FileReader(); reader.onloadend = function() { let url2 = reader.result; if (typeof url2 !== "string") { popup = null; throw new Error("Wrong reader.result type"); } url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;"); if (popup) { popup.location.href = url2; } else { location.assign(url2); } popup = null; }; reader.readAsDataURL(blob); } else { const url2 = URL.createObjectURL(blob); if (popup) popup.location.assign(url2); else location.href = url2; popup = null; setTimeout(function() { URL.revokeObjectURL(url2); }, 4e4); } } function toastMessage(message, type2) { const piniaMessage = "🍍 " + message; if (typeof __VUE_DEVTOOLS_TOAST__ === "function") { __VUE_DEVTOOLS_TOAST__(piniaMessage, type2); } else if (type2 === "error") { console.error(piniaMessage); } else if (type2 === "warn") { console.warn(piniaMessage); } else { console.log(piniaMessage); } } function isPinia(o) { return "_a" in o && "install" in o; } function checkClipboardAccess() { if (!("clipboard" in navigator)) { toastMessage(`Your browser doesn't support the Clipboard API`, "error"); return true; } } function checkNotFocusedError(error) { if (error instanceof Error && error.message.toLowerCase().includes("document is not focused")) { toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"); return true; } return false; } async function actionGlobalCopyState(pinia) { if (checkClipboardAccess()) return; try { await navigator.clipboard.writeText(JSON.stringify(pinia.state.value)); toastMessage("Global state copied to clipboard."); } catch (error) { if (checkNotFocusedError(error)) return; toastMessage(`Failed to serialize the state. Check the console for more details.`, "error"); console.error(error); } } async function actionGlobalPasteState(pinia) { if (checkClipboardAccess()) return; try { pinia.state.value = JSON.parse(await navigator.clipboard.readText()); toastMessage("Global state pasted from clipboard."); } catch (error) { if (checkNotFocusedError(error)) return; toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error"); console.error(error); } } async function actionGlobalSaveState(pinia) { try { saveAs(new Blob([JSON.stringify(pinia.state.value)], { type: "text/plain;charset=utf-8" }), "pinia-state.json"); } catch (error) { toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error"); console.error(error); } } let fileInput; function getFileOpener() { if (!fileInput) { fileInput = document.createElement("input"); fileInput.type = "file"; fileInput.accept = ".json"; } function openFile() { return new Promise((resolve2, reject) => { fileInput.onchange = async () => { const files = fileInput.files; if (!files) return resolve2(null); const file = files.item(0); if (!file) return resolve2(null); return resolve2({ text: await file.text(), file }); }; fileInput.oncancel = () => resolve2(null); fileInput.onerror = reject; fileInput.click(); }); } return openFile; } async function actionGlobalOpenStateFile(pinia) { try { const open2 = await getFileOpener(); const result = await open2(); if (!result) return; const { text, file } = result; pinia.state.value = JSON.parse(text); toastMessage(`Global state imported from "${file.name}".`); } catch (error) { toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error"); console.error(error); } } function formatDisplay(display) { return { _custom: { display } }; } const PINIA_ROOT_LABEL = "🍍 Pinia (root)"; const PINIA_ROOT_ID = "_root"; function formatStoreForInspectorTree(store2) { return isPinia(store2) ? { id: PINIA_ROOT_ID, label: PINIA_ROOT_LABEL } : { id: store2.$id, label: store2.$id }; } function formatStoreForInspectorState(store2) { if (isPinia(store2)) { const storeNames = Array.from(store2._s.keys()); const storeMap = store2._s; const state2 = { state: storeNames.map((storeId) => ({ editable: true, key: storeId, value: store2.state.value[storeId] })), getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => { const store22 = storeMap.get(id); return { editable: false, key: id, value: store22._getters.reduce((getters, key) => { getters[key] = store22[key]; return getters; }, {}) }; }) }; return state2; } const state = { state: Object.keys(store2.$state).map((key) => ({ editable: true, key, value: store2.$state[key] })) }; if (store2._getters && store2._getters.length) { state.getters = store2._getters.map((getterName) => ({ editable: false, key: getterName, value: store2[getterName] })); } if (store2._customProperties.size) { state.customProperties = Array.from(store2._customProperties).map((key) => ({ editable: true, key, value: store2[key] })); } return state; } function formatEventData(events) { if (!events) return {}; if (Array.isArray(events)) { return events.reduce((data, event) => { data.keys.push(event.key); data.operations.push(event.type); data.oldValue[event.key] = event.oldValue; data.newValue[event.key] = event.newValue; return data; }, { oldValue: {}, keys: [], operations: [], newValue: {} }); } else { return { operation: formatDisplay(events.type), key: formatDisplay(events.key), oldValue: events.oldValue, newValue: events.newValue }; } } function formatMutationType(type2) { switch (type2) { case MutationType.direct: return "mutation"; case MutationType.patchFunction: return "$patch"; case MutationType.patchObject: return "$patch"; default: return "unknown"; } } let isTimelineActive = true; const componentStateTypes = []; const MUTATIONS_LAYER_ID = "pinia:mutations"; const INSPECTOR_ID = "pinia"; const { assign: assign$1 } = Object; const getStoreType = (id) => "🍍 " + id; function registerPiniaDevtools(app, pinia) { setupDevtoolsPlugin({ id: "dev.esm.pinia", label: "Pinia 🍍", logo: "https://pinia.vuejs.org/logo.svg", packageName: "pinia", homepage: "https://pinia.vuejs.org", componentStateTypes, app }, (api) => { if (typeof api.now !== "function") { toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."); } api.addTimelineLayer({ id: MUTATIONS_LAYER_ID, label: `Pinia 🍍`, color: 15064968 }); api.addInspector({ id: INSPECTOR_ID, label: "Pinia 🍍", icon: "storage", treeFilterPlaceholder: "Search stores", actions: [ { icon: "content_copy", action: () => { actionGlobalCopyState(pinia); }, tooltip: "Serialize and copy the state" }, { icon: "content_paste", action: async () => { await actionGlobalPasteState(pinia); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); }, tooltip: "Replace the state with the content of your clipboard" }, { icon: "save", action: () => { actionGlobalSaveState(pinia); }, tooltip: "Save the state as a JSON file" }, { icon: "folder_open", action: async () => { await actionGlobalOpenStateFile(pinia); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); }, tooltip: "Import the state from a JSON file" } ], nodeActions: [ { icon: "restore", tooltip: "Reset the state (option store only)", action: (nodeId) => { const store2 = pinia._s.get(nodeId); if (!store2) { toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn"); } else if (!store2._isOptionsAPI) { toastMessage(`Cannot reset "${nodeId}" store because it's a setup store.`, "warn"); } else { store2.$reset(); toastMessage(`Store "${nodeId}" reset.`); } } } ] }); api.on.inspectComponent((payload, ctx) => { const proxy = payload.componentInstance && payload.componentInstance.proxy; if (proxy && proxy._pStores) { const piniaStores = payload.componentInstance.proxy._pStores; Object.values(piniaStores).forEach((store2) => { payload.instanceData.state.push({ type: getStoreType(store2.$id), key: "state", editable: true, value: store2._isOptionsAPI ? { _custom: { value: vue.toRaw(store2.$state), actions: [ { icon: "restore", tooltip: "Reset the state of this store", action: () => store2.$reset() } ] } } : ( // NOTE: workaround to unwrap transferred refs Object.keys(store2.$state).reduce((state, key) => { state[key] = store2.$state[key]; return state; }, {}) ) }); if (store2._getters && store2._getters.length) { payload.instanceData.state.push({ type: getStoreType(store2.$id), key: "getters", editable: false, value: store2._getters.reduce((getters, key) => { try { getters[key] = store2[key]; } catch (error) { getters[key] = error; } return getters; }, {}) }); } }); } }); api.on.getInspectorTree((payload) => { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { let stores = [pinia]; stores = stores.concat(Array.from(pinia._s.values())); payload.rootNodes = (payload.filter ? stores.filter((store2) => "$id" in store2 ? store2.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree); } }); api.on.getInspectorState((payload) => { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId); if (!inspectedStore) { return; } if (inspectedStore) { payload.state = formatStoreForInspectorState(inspectedStore); } } }); api.on.editInspectorState((payload, ctx) => { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId); if (!inspectedStore) { return toastMessage(`store "${payload.nodeId}" not found`, "error"); } const { path } = payload; if (!isPinia(inspectedStore)) { if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) { path.unshift("$state"); } } else { path.unshift("state"); } isTimelineActive = false; payload.set(inspectedStore, path, payload.state.value); isTimelineActive = true; } }); api.on.editComponentState((payload) => { if (payload.type.startsWith("🍍")) { const storeId = payload.type.replace(/^🍍\s*/, ""); const store2 = pinia._s.get(storeId); if (!store2) { return toastMessage(`store "${storeId}" not found`, "error"); } const { path } = payload; if (path[0] !== "state") { return toastMessage(`Invalid path for store "${storeId}": ${path} Only state can be modified.`); } path[0] = "$state"; isTimelineActive = false; payload.set(store2, path, payload.state.value); isTimelineActive = true; } }); }); } function addStoreToDevtools(app, store2) { if (!componentStateTypes.includes(getStoreType(store2.$id))) { componentStateTypes.push(getStoreType(store2.$id)); } setupDevtoolsPlugin({ id: "dev.esm.pinia", label: "Pinia 🍍", logo: "https://pinia.vuejs.org/logo.svg", packageName: "pinia", homepage: "https://pinia.vuejs.org", componentStateTypes, app, settings: { logStoreChanges: { label: "Notify about new/deleted stores", type: "boolean", defaultValue: true } // useEmojis: { // label: 'Use emojis in messages ⚡️', // type: 'boolean', // defaultValue: true, // }, } }, (api) => { const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now; store2.$onAction(({ after, onError, name, args }) => { const groupId = runningActionId++; api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🛫 " + name, subtitle: "start", data: { store: formatDisplay(store2.$id), action: formatDisplay(name), args }, groupId } }); after((result) => { activeAction = void 0; api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🛬 " + name, subtitle: "end", data: { store: formatDisplay(store2.$id), action: formatDisplay(name), args, result }, groupId } }); }); onError((error) => { activeAction = void 0; api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), logType: "error", title: "💥 " + name, subtitle: "end", data: { store: formatDisplay(store2.$id), action: formatDisplay(name), args, error }, groupId } }); }); }, true); store2._customProperties.forEach((name) => { vue.watch(() => vue.unref(store2[name]), (newValue, oldValue) => { api.notifyComponentUpdate(); api.sendInspectorState(INSPECTOR_ID); if (isTimelineActive) { api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "Change", subtitle: name, data: { newValue, oldValue }, groupId: activeAction } }); } }, { deep: true }); }); store2.$subscribe(({ events, type: type2 }, state) => { api.notifyComponentUpdate(); api.sendInspectorState(INSPECTOR_ID); if (!isTimelineActive) return; const eventData = { time: now2(), title: formatMutationType(type2), data: assign$1({ store: formatDisplay(store2.$id) }, formatEventData(events)), groupId: activeAction }; activeAction = void 0; if (type2 === MutationType.patchFunction) { eventData.subtitle = "⤵️"; } else if (type2 === MutationType.patchObject) { eventData.subtitle = "🧩"; } else if (events && !Array.isArray(events)) { eventData.subtitle = events.type; } if (events) { eventData.data["rawEvent(s)"] = { _custom: { display: "DebuggerEvent", type: "object", tooltip: "raw DebuggerEvent[]", value: events } }; } api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: eventData }); }, { detached: true, flush: "sync" }); const hotUpdate = store2._hotUpdate; store2._hotUpdate = vue.markRaw((newStore) => { hotUpdate(newStore); api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🔥 " + store2.$id, subtitle: "HMR update", data: { store: formatDisplay(store2.$id), info: formatDisplay(`HMR update`) } } }); api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); }); const { $dispose } = store2; store2.$dispose = () => { $dispose(); api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); api.getSettings().logStoreChanges && toastMessage(`Disposed "${store2.$id}" store 🗑`); }; api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); api.getSettings().logStoreChanges && toastMessage(`"${store2.$id}" store installed 🆕`); }); } let runningActionId = 0; let activeAction; function patchActionForGrouping(store2, actionNames) { const actions = actionNames.reduce((storeActions, actionName) => { storeActions[actionName] = vue.toRaw(store2)[actionName]; return storeActions; }, {}); for (const actionName in actions) { store2[actionName] = function() { const _actionId = runningActionId; const trackedStore = new Proxy(store2, { get(...args) { activeAction = _actionId; return Reflect.get(...args); }, set(...args) { activeAction = _actionId; return Reflect.set(...args); } }); return actions[actionName].apply(trackedStore, arguments); }; } } function devtoolsPlugin({ app, store: store2, options }) { if (store2.$id.startsWith("__hot:")) { return; } if (options.state) { store2._isOptionsAPI = true; } if (typeof options.state === "function") { patchActionForGrouping( // @ts-expect-error: can cast the store... store2, Object.keys(options.actions) ); const originalHotUpdate = store2._hotUpdate; vue.toRaw(store2)._hotUpdate = function(newStore) { originalHotUpdate.apply(this, arguments); patchActionForGrouping(store2, Object.keys(newStore._hmrPayload.actions)); }; } addStoreToDevtools( app, // FIXME: is there a way to allow the assignment from Store to StoreGeneric? store2 ); } function createPinia() { const scope = vue.effectScope(true); const state = scope.run(() => vue.ref({})); let _p = []; let toBeInstalled = []; const pinia = vue.markRaw({ install(app) { setActivePinia(pinia); { pinia._a = app; app.provide(piniaSymbol, pinia); app.config.globalProperties.$pinia = pinia; if (USE_DEVTOOLS) { registerPiniaDevtools(app, pinia); } toBeInstalled.forEach((plugin) => _p.push(plugin)); toBeInstalled = []; } }, use(plugin) { if (!this._a && true) { toBeInstalled.push(plugin); } else { _p.push(plugin); } return this; }, _p, // it's actually undefined here // @ts-expect-error _a: null, _e: scope, _s: /* @__PURE__ */ new Map(), state }); if (USE_DEVTOOLS && typeof Proxy !== "undefined") { pinia.use(devtoolsPlugin); } return pinia; } function patchObject(newState, oldState) { for (const key in oldState) { const subPatch = oldState[key]; if (!(key in newState)) { continue; } const targetValue = newState[key]; if (isPlainObject(targetValue) && isPlainObject(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) { newState[key] = patchObject(targetValue, subPatch); } else { { newState[key] = subPatch; } } } return newState; } const noop = () => { }; function addSubscription(subscriptions, callback, detached, onCleanup = noop) { subscriptions.push(callback); const removeSubscription = () => { const idx = subscriptions.indexOf(callback); if (idx > -1) { subscriptions.splice(idx, 1); onCleanup(); } }; if (!detached && vue.getCurrentScope()) { vue.onScopeDispose(removeSubscription); } return removeSubscription; } function triggerSubscriptions(subscriptions, ...args) { subscriptions.slice().forEach((callback) => { callback(...args); }); } function mergeReactiveObjects(target, patchToApply) { if (target instanceof Map && patchToApply instanceof Map) { patchToApply.forEach((value, key) => target.set(key, value)); } if (target instanceof Set && patchToApply instanceof Set) { patchToApply.forEach(target.add, target); } for (const key in patchToApply) { if (!patchToApply.hasOwnProperty(key)) continue; const subPatch = patchToApply[key]; const targetValue = target[key]; if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) { target[key] = mergeReactiveObjects(targetValue, subPatch); } else { target[key] = subPatch; } } return target; } const skipHydrateSymbol = Symbol("pinia:skipHydration"); function shouldHydrate(obj) { return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol); } const { assign } = Object; function isComputed(o) { return !!(vue.isRef(o) && o.effect); } function createOptionsStore(id, options, pinia, hot) { const { state, actions, getters } = options; const initialState = pinia.state.value[id]; let store2; function setup() { if (!initialState && !hot) { { pinia.state.value[id] = state ? state() : {}; } } const localState = hot ? ( // use ref() to unwrap refs inside state TODO: check if this is still necessary vue.toRefs(vue.ref(state ? state() : {}).value) ) : vue.toRefs(pinia.state.value[id]); return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => { if (name in localState) { console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`); } computedGetters[name] = vue.markRaw(vue.computed(() => { setActivePinia(pinia); const store22 = pinia._s.get(id); return getters[name].call(store22, store22); })); return computedGetters; }, {})); } store2 = createSetupStore(id, setup, options, pinia, hot, true); return store2; } function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) { let scope; const optionsForPlugin = assign({ actions: {} }, options); if (!pinia._e.active) { throw new Error("Pinia destroyed"); } const $subscribeOptions = { deep: true // flush: 'post', }; { $subscribeOptions.onTrigger = (event) => { if (isListening) { debuggerEvents = event; } else if (isListening == false && !store2._hotUpdating) { if (Array.isArray(debuggerEvents)) { debuggerEvents.push(event); } else { console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."); } } }; } let isListening; let isSyncListening; let subscriptions = vue.markRaw([]); let actionSubscriptions = vue.markRaw([]); let debuggerEvents; const initialState = pinia.state.value[$id]; if (!isOptionsStore && !initialState && !hot) { { pinia.state.value[$id] = {}; } } const hotState = vue.ref({}); let activeListener; function $patch(partialStateOrMutator) { let subscriptionMutation; isListening = isSyncListening = false; { debuggerEvents = []; } if (typeof partialStateOrMutator === "function") { partialStateOrMutator(pinia.state.value[$id]); subscriptionMutation = { type: MutationType.patchFunction, storeId: $id, events: debuggerEvents }; } else { mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator); subscriptionMutation = { type: MutationType.patchObject, payload: partialStateOrMutator, storeId: $id, events: debuggerEvents }; } const myListenerId = activeListener = Symbol(); vue.nextTick().then(() => { if (activeListener === myListenerId) { isListening = true; } }); isSyncListening = true; triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]); } const $reset = isOptionsStore ? function $reset2() { const { state } = options; const newState = state ? state() : {}; this.$patch(($state) => { assign($state, newState); }); } : ( /* istanbul ignore next */ () => { throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`); } ); function $dispose() { scope.stop(); subscriptions = []; actionSubscriptions = []; pinia._s.delete($id); } function wrapAction(name, action) { return function() { setActivePinia(pinia); const args = Array.from(arguments); const afterCallbackList = []; const onErrorCallbackList = []; function after(callback) { afterCallbackList.push(callback); } function onError(callback) { onErrorCallbackList.push(callback); } triggerSubscriptions(actionSubscriptions, { args, name, store: store2, after, onError }); let ret; try { ret = action.apply(this && this.$id === $id ? this : store2, args); } catch (error) { triggerSubscriptions(onErrorCallbackList, error); throw error; } if (ret instanceof Promise) { return ret.then((value) => { triggerSubscriptions(afterCallbackList, value); return value; }).catch((error) => { triggerSubscriptions(onErrorCallbackList, error); return Promise.reject(error); }); } triggerSubscriptions(afterCallbackList, ret); return ret; }; } const _hmrPayload = /* @__PURE__ */ vue.markRaw({ actions: {}, getters: {}, state: [], hotState }); const partialStore = { _p: pinia, // _s: scope, $id, $onAction: addSubscription.bind(null, actionSubscriptions), $patch, $reset, $subscribe(callback, options2 = {}) { const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher()); const stopWatcher = scope.run(() => vue.watch(() => pinia.state.value[$id], (state) => { if (options2.flush === "sync" ? isSyncListening : isListening) { callback({ storeId: $id, type: MutationType.direct, events: debuggerEvents }, state); } }, assign({}, $subscribeOptions, options2))); return removeSubscription; }, $dispose }; const store2 = vue.reactive(assign( { _hmrPayload, _customProperties: vue.markRaw(/* @__PURE__ */ new Set()) // devtools custom properties }, partialStore // must be added later // setupStore )); pinia._s.set($id, store2); const setupStore = pinia._e.run(() => { scope = vue.effectScope(); return scope.run(() => setup()); }); for (const key in setupStore) { const prop = setupStore[key]; if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) { if (hot) { set$1(hotState.value, key, vue.toRef(setupStore, key)); } else if (!isOptionsStore) { if (initialState && shouldHydrate(prop)) { if (vue.isRef(prop)) { prop.value = initialState[key]; } else { mergeReactiveObjects(prop, initialState[key]); } } { pinia.state.value[$id][key] = prop; } } { _hmrPayload.state.push(key); } } else if (typeof prop === "function") { const actionValue = hot ? prop : wrapAction(key, prop); { setupStore[key] = actionValue; } { _hmrPayload.actions[key] = prop; } optionsForPlugin.actions[key] = prop; } else { if (isComputed(prop)) { _hmrPayload.getters[key] = isOptionsStore ? ( // @ts-expect-error options.getters[key] ) : prop; if (IS_CLIENT) { const getters = setupStore._getters || // @ts-expect-error: same (setupStore._getters = vue.markRaw([])); getters.push(key); } } } } { assign(store2, setupStore); assign(vue.toRaw(store2), setupStore); } Object.defineProperty(store2, "$state", { get: () => hot ? hotState.value : pinia.state.value[$id], set: (state) => { if (hot) { throw new Error("cannot set hotState"); } $patch(($state) => { assign($state, state); }); } }); { store2._hotUpdate = vue.markRaw((newStore) => { store2._hotUpdating = true; newStore._hmrPayload.state.forEach((stateKey) => { if (stateKey in store2.$state) { const newStateTarget = newStore.$state[stateKey]; const oldStateSource = store2.$state[stateKey]; if (typeof newStateTarget === "object" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) { patchObject(newStateTarget, oldStateSource); } else { newStore.$state[stateKey] = oldStateSource; } } set$1(store2, stateKey, vue.toRef(newStore.$state, stateKey)); }); Object.keys(store2.$state).forEach((stateKey) => { if (!(stateKey in newStore.$state)) { del(store2, stateKey); } }); isListening = false; isSyncListening = false; pinia.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState"); isSyncListening = true; vue.nextTick().then(() => { isListening = true; }); for (const actionName in newStore._hmrPayload.actions) { const action = newStore[actionName]; set$1(store2, actionName, wrapAction(actionName, action)); } for (const getterName in newStore._hmrPayload.getters) { const getter = newStore._hmrPayload.getters[getterName]; const getterValue = isOptionsStore ? ( // special handling of options api vue.computed(() => { setActivePinia(pinia); return getter.call(store2, store2); }) ) : getter; set$1(store2, getterName, getterValue); } Object.keys(store2._hmrPayload.getters).forEach((key) => { if (!(key in newStore._hmrPayload.getters)) { del(store2, key); } }); Object.keys(store2._hmrPayload.actions).forEach((key) => { if (!(key in newStore._hmrPayload.actions)) { del(store2, key); } }); store2._hmrPayload = newStore._hmrPayload; store2._getters = newStore._getters; store2._hotUpdating = false; }); } if (USE_DEVTOOLS) { const nonEnumerable = { writable: true, configurable: true, // avoid warning on devtools trying to display this property enumerable: false }; ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => { Object.defineProperty(store2, p, assign({ value: store2[p] }, nonEnumerable)); }); } pinia._p.forEach((extender) => { if (USE_DEVTOOLS) { const extensions = scope.run(() => extender({ store: store2, app: pinia._a, pinia, options: optionsForPlugin })); Object.keys(extensions || {}).forEach((key) => store2._customProperties.add(key)); assign(store2, extensions); } else { assign(store2, scope.run(() => extender({ store: store2, app: pinia._a, pinia, options: optionsForPlugin }))); } }); if (store2.$state && typeof store2.$state === "object" && typeof store2.$state.constructor === "function" && !store2.$state.constructor.toString().includes("[native code]")) { console.warn(`[🍍]: The "state" must be a plain object. It cannot be state: () => new MyClass() Found in store "${store2.$id}".`); } if (initialState && isOptionsStore && options.hydrate) { options.hydrate(store2.$state, initialState); } isListening = true; isSyncListening = true; return store2; } function defineStore(idOrOptions, setup, setupOptions) { let id; let options; const isSetupStore = typeof setup === "function"; if (typeof idOrOptions === "string") { id = idOrOptions; options = isSetupStore ? setupOptions : setup; } else { options = idOrOptions; id = idOrOptions.id; if (typeof id !== "string") { throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`); } } function useStore(pinia, hot) { const currentInstance = vue.getCurrentInstance(); pinia = // in test mode, ignore the argument provided as we can always retrieve a // pinia instance with getActivePinia() pinia || currentInstance && vue.inject(piniaSymbol, null); if (pinia) setActivePinia(pinia); if (!activePinia) { throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Did you forget to install pinia? const pinia = createPinia() app.use(pinia) This will fail in production.`); } pinia = activePinia; if (!pinia._s.has(id)) { if (isSetupStore) { createSetupStore(id, setup, options, pinia); } else { createOptionsStore(id, options, pinia); } { useStore._pinia = pinia; } } const store2 = pinia._s.get(id); if (hot) { const hotId = "__hot:" + id; const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia, true) : createOptionsStore(hotId, assign({}, options), pinia, true); hot._hotUpdate(newStore); delete pinia.state.value[hotId]; pinia._s.delete(hotId); } if (IS_CLIENT && currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement !hot) { const vm = currentInstance.proxy; const cache2 = "_pStores" in vm ? vm._pStores : vm._pStores = {}; cache2[id] = store2; } return store2; } useStore.$id = id; return useStore; } const STORAGE_KEY = "BETTING_CART_LIST"; const useOrderStore = defineStore("order", { state: () => ({ selectOrders: uni.getStorageSync(STORAGE_KEY) || [], isOpen: false }), getters: { selectedCount: (state) => state.selectOrders.length, totalStake: (state) => { return state.selectOrders.reduce((sum, item) => sum + (Number(item.stake) || 0), 0); }, totalPotentialWin: (state) => { return state.selectOrders.reduce((sum, item) => { const stake = Number(item.stake) || 0; return sum + stake * Number(item.odds || 0); }, 0); } }, actions: { toggleSheet() { this.isOpen = !this.isOpen; }, setSheetOpen(status) { this.isOpen = status; }, addOrderItem(item) { const index = this.selectOrders.findIndex((o) => o.uniqueKey === item.uniqueKey); if (index === -1) { const newItem = { ...item, stake: item.mininum || 20 }; this.selectOrders.push(newItem); } else { this.selectOrders[index].odds = item.odds; if (this.selectOrders[index].errorMsg) { this.selectOrders[index].errorMsg = ""; } } this.saveToStorage(); }, removeOrderItem(itemOrKey) { const targetKey = typeof itemOrKey === "object" ? itemOrKey.uniqueKey : itemOrKey; this.selectOrders = this.selectOrders.filter((o) => o.uniqueKey !== targetKey); if (this.selectOrders.length === 0) { this.isOpen = false; } this.saveToStorage(); }, // 兼容页面中调用的 removeOrderItemByKey removeOrderItemByKey(key) { this.removeOrderItem(key); }, updateStake(uniqueKey, amount2) { const item = this.selectOrders.find((o) => o.uniqueKey === uniqueKey); if (item) { item.stake = amount2; this.saveToStorage(); } }, updateMatchStatus(data_id, newMatchData) { let changed = false; this.selectOrders.forEach((order) => { if (order.data_id === data_id) { if (newMatchData.state !== void 0) order.state = newMatchData.state; if (newMatchData.status !== void 0) order.status = newMatchData.status; if (newMatchData.is_locked !== void 0) order.is_locked = newMatchData.is_locked; if (newMatchData.score !== void 0) order.score = newMatchData.score; changed = true; } }); if (changed) this.saveToStorage(); }, // ========================================== // 1. 处理 HTTP 接口的同步部分失败 // ========================================== handleSubmitResult(submittedKeys, failures) { const failedKeys = failures.map((f) => { const hdp = f.handicap !== null && f.handicap !== void 0 && f.handicap !== "" ? `_${f.handicap}` : ""; return `${f.data_id}_${f.id}_${f.value}${hdp}`; }); this.selectOrders = this.selectOrders.filter((order) => { const isSubmitted = submittedKeys.includes(order.uniqueKey); const isFailed = failedKeys.includes(order.uniqueKey); if (isSubmitted && !isFailed) { return false; } if (isFailed) { const failData = failures.find((f) => { const hdp = f.handicap !== null && f.handicap !== void 0 && f.handicap !== "" ? `_${f.handicap}` : ""; return `${f.data_id}_${f.id}_${f.value}${hdp}` === order.uniqueKey; }); if (failData) order.errorMsg = failData.msg; } return true; }); this.saveToStorage(); }, // ========================================== // 2. 处理 WebSocket 推送的异步退单 // ========================================== handleAsyncFailure(failData) { const hdp = failData.handicap !== null && failData.handicap !== void 0 && failData.handicap !== "" ? `_${failData.handicap}` : ""; const uniqueKey = `${failData.data_id}_${failData.id}_${failData.value}${hdp}`; const existIndex = this.selectOrders.findIndex((item) => item.uniqueKey === uniqueKey); const sportInfo = failData.sport_info || {}; const fallbackOrder = { matchId: sportInfo.id || "", data_id: sportInfo.data_id || failData.data_id, league: sportInfo.league || "已被退回的赛事", homeTeam: sportInfo.home_team || "-", guestTeam: sportInfo.guest_team || "-", betType: "已退单选项", // 为了醒目提示,可直接显示为退单选项 betTypeName: failData.value, handicap: failData.handicap, odds: failData.odd, score: sportInfo.score || "-", state: sportInfo.state || 1, status: sportInfo.status || 1, is_roll: sportInfo.is_roll || 0, is_locked: sportInfo.is_locked || 0, uniqueKey, optionValue: failData.value, marketId: failData.id, stake: failData.amount, // 保留用户之前的下注金额 errorMsg: failData.msg // 挂载退单原因 }; if (existIndex > -1) { this.selectOrders[existIndex] = fallbackOrder; } else { this.selectOrders.unshift(fallbackOrder); } this.saveToStorage(); }, clearAllOrders() { this.selectOrders = []; this.isOpen = false; this.saveToStorage(); }, saveToStorage() { uni.setStorageSync(STORAGE_KEY, this.selectOrders); } } }); var globalBaseURL = "https://sportapi.sp2509.cc/api"; var apiUrl = "https://bot28api.sp2509.cc/api/"; const service = (config2) => { const { url: url2, method: method2 = "GET", data = {}, params = {}, hideLoading = false, // 是否隐藏loading showSuccessTip = true, // 是否显示成功提示 showFailTip = true, // 是否显示失败提示 timeout: timeout2 = 1e4 // 请求超时时间 } = config2; formatAppLog("log", "at request/index.js:33", config2, 31); return new Promise((resolve2, reject) => { let loadingShowed = false; if (!hideLoading) { uni.showLoading({ title: i18n.global.t("加载中") + "...", mask: true, // 禁止点击背景(对应原 forbidClick) success: () => { loadingShowed = true; } }); } const token = uni.getStorageSync("token"); const localLang = uni.getStorageSync("locale"); const header = { "Content-Type": "application/json;charset=utf-8", "Lang": localLang ? localLang : defaultLang, "Authorization": token }; if (token) { header.Authorization = token; } uni.request({ url: globalBaseURL + url2, // 拼接基础地址和接口路径 // url: 'https://sportapi.sp2509.cc/api' + url, // 拼接基础地址和接口路径 // url: 'https://sportapi.sp2509.cc/api' + url, // 拼接基础地址和接口路径 // url: 'http://192.168.110.106:8084/api' + url, // 拼接基础地址和接口路径 method: method2.toUpperCase(), // 确保请求方法为大写 data, // POST/PUT 等请求的参数 header, timeout: timeout2, // 5. 请求成功回调 success: (response) => { const res = response.data; if (loadingShowed) { uni.hideLoading(); } if (res.code === 1) { if (showSuccessTip && res.msg) { uni.showToast({ title: res.msg, icon: "success", duration: 2e3, position: "middle" }); } resolve2(res); } else if (res.code === 0) { if (showFailTip && res.msg) { uni.showToast({ title: res.msg, icon: "none", duration: 2e3, position: "middle" }); } reject(new Error(res.msg || i18n.global.t("操作失败"))); } else if (res.code === 401) { uni.showToast({ title: res.msg || i18n.global.t("登录已过期,请重新登录"), icon: "none", duration: 2e3, mask: true }); uni.removeStorageSync("token"); let timer = setTimeout(() => { clearTimeout(timer); uni.navigateTo({ url: "/pages/login/index" // 注意路径要符合uni-app规范 }); }, 1500); reject(new Error("登录已过期")); } else if (res.code === 10011) { let modalTimer = setTimeout(() => { clearTimeout(modalTimer); uni.showModal({ title: i18n.global.t("提示"), content: i18n.global.t("您还未设置资金密码,是否前往设置?"), success: (modalRes) => { if (modalRes.confirm) { uni.navigateTo({ url: "/pages/WorkModule/my/changeFundPassword/index" }); } } }); }, 300); reject(new Error(res.msg || "未设置资金密码")); } else if (res.code === 10012) { uni.$emit("show-system-notice-modal", res.data || res.msg); reject(new Error(res.msg || "系统重要通知")); } else { if (showFailTip) { uni.showToast({ title: res.msg || i18n.global.t("请求失败,请稍后重试"), icon: "none", duration: 2e3 }); } reject(new Error(res.msg || "请求失败")); } }, // 6. 请求失败回调(网络错误、超时等) fail: (error) => { formatAppLog("log", "at request/index.js:163", error, 119); if (loadingShowed) { uni.hideLoading(); } uni.showToast({ // title: error.errMsg || i18n.global.t('网络异常,请检查网络后重试'), title: i18n.global.t("网络异常,请检查网络后重试"), icon: "none", duration: 2e3 }); reject(error); }, // 7. 请求完成(无论成功失败) complete: () => { if (loadingShowed) { uni.hideLoading(); } } }); }); }; service.get = (url2, config2 = {}) => { return service({ url: url2, method: "GET", data: config2.params, hideLoading: config2.hideLoading, showSuccessTip: config2.showSuccessTip, showFailTip: config2.showFailTip }); }; service.post = (url2, data = {}, config2 = {}) => { return service({ url: url2, method: "POST", data, hideLoading: config2.hideLoading, showSuccessTip: config2.showSuccessTip, showFailTip: config2.showFailTip }); }; const postUserRegister = (data) => { return service.post("/user/register", data, { showSuccessTip: false }); }; const setAccount = (data) => { return service.post("/user/setAccount", data, { showSuccessTip: false }); }; const getCaptcha = (data) => { return service.post("/user/captcha", data); }; const postUserLogin = (data) => { return service.post("/user/login", data); }; const logout = () => { return service.get("/user/logout"); }; const getUserInfo = () => { return service.get("/user/info"); }; const updateUserInfo = (data) => { return service.post("/user/update", data); }; const deleteAccount = () => { return service.get("/user/delete"); }; const resetPassword = (data) => { return service.post("/user/resetPassword", data); }; const getBanner = (params) => { return service.get("/index/banner", { params }); }; const getActivity = (params) => { return service.get("/index/activity", { params }); }; const getActivityDetail = (params) => { return service.get("/index/activityInfo", { params }); }; const getSportSchedule = (params) => { return service.get("/index/sport", { params, hideLoading: true }); }; const getWorldCupSport = (params) => { return service.get("/index/worldCupSport", { params, hideLoading: true }); }; const getSportInfo = (params) => { return service.get("/index/sportInfo", { params }); }; const recharge = (data) => { return service.post("/wallet/recharge", data); }; const getRecharge = (params) => { return service.get("/wallet/rechargeHistory", { params }); }; const getWithdrawHistory = (params) => { return service.get("/wallet/withdrawHistory", { params }); }; const getBalance = () => { return service.get("/wallet/getUsdt", { hideLoading: true, showSuccessTip: false }); }; const getMoneyLog = (params) => { return service.get("/wallet/moneyLog", { params }); }; const getOrderList = (params) => { return service.get("/order/list", { params }); }; const getOrderInfo = (params) => { return service.get("/order/info", { params }); }; const betInfo = (params) => { return service.get("/game/betInfo", { params }); }; const submitOrder = (data) => { return service.post("/order/submit", data); }; const applyRefund = (data) => service.post("/order/refund", data); const modifySafeWord = (data) => service.post("/user/safeWord", data); const getGameRuleList = (params) => service.get("/game/rule", { params }); const submitGameBet = (data) => service.post("/game/bet", data); const getGameBetList = (params) => service.get("/game/betList", { params }); const getHowPlay = (params) => service.get("/lhcGame/index", { params, hideLoading: true }); const getLHCInfo = (params) => service.get("/lhc/info", { params, hideLoading: true }); const getPlayInfo = (params) => service.get("/lhcNumber/index", { params, hideLoading: true }); const submitBetCart = (data) => service.post("/lhcOrder/submit", data); const getDigitalOrderList = (params) => service.get("/lhcOrder/list", { params }); const getDigitalOrderInfo = (params) => service.get("/lhcOrder/info", { params }); const getConfigIndex = () => { return service.get("/index/config"); }; const addYuebao = (data) => { return service.post("/yuebao/add", data); }; const withdrawYuebao = (data) => { return service.post("/yuebao/out", data); }; const getYuebaoItemList = (params) => { return service.get("/yuebao/itemList", { params }); }; const getYuebaoLogList = (params) => { return service.get("/yuebao/logList", { params }); }; const getLeagueList = (params) => { return service.get("/index/leagueList", { params }); }; const gameLotteryStatus = (params) => { return service.get("/game/lotteryStatus", { params }); }; const userGuestRegister = (params) => { return service.get("/user/guestRegister", { params }); }; const useWebsocketDataStore = defineStore("WebsocketData", { state: () => ({ data: {}, globalData: {} }), getters: { // getWebsocketData: (state) => state.data, }, actions: { setWebsocketData(data) { this.data = data; }, setWebsocketGlobalData(data) { this.globalData = data; } } }); const _sfc_main$1h = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { __expose(); const visible = vue.ref(false); const msgData = vue.ref(); vue.onMounted(() => { uni.$on("show-system-notice-modal", (data) => { visible.value = true; msgData.value = data; }); }); vue.onUnmounted(() => { uni.$off("show-system-notice-modal"); }); const handleConfirm = () => { visible.value = false; }; const __returned__ = { visible, msgData, handleConfirm }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) { return $setup.visible ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "notice-mask", onTouchmove: vue.withModifiers(() => { }, ["stop", "prevent"]) }, [ vue.createElementVNode("view", { class: "notice-box" }, [ vue.createCommentVNode(" 头部警告文字 "), vue.createElementVNode( "view", { class: "notice-header" }, vue.toDisplayString(_ctx.$t("温馨提示:平台不会主动加好友上分,请谨防被骗,已咨询客服人员为准")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "notice-body" }, [ vue.createCommentVNode(' \r\n '), vue.createElementVNode("view", { class: "content-wrapper" }, [ vue.createElementVNode( "view", { class: "paragraph center" }, vue.toDisplayString(_ctx.$t("尊敬的用户")) + ":", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "paragraph center mb-10" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("每日")) + "(", 1 /* TEXT */ ), vue.createElementVNode( "span", { style: { "color": "red" } }, vue.toDisplayString($setup.msgData.time), 1 /* TEXT */ ), vue.createTextVNode( ")" + vue.toDisplayString(_ctx.$t("为系统维护时间段")) + "。", 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "paragraph center" }, vue.toDisplayString(_ctx.$t("维护期间将暂停此交易服务,请您合理安排操作时间,敬请谅解!")), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 底部按钮 "), vue.createElementVNode("view", { class: "notice-footer" }, [ vue.createElementVNode( "button", { class: "confirm-btn", onClick: $setup.handleConfirm }, vue.toDisplayString(_ctx.$t("确认")), 1 /* TEXT */ ) ]) ]) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const SystemNoticeModal = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-b5e4ee78"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/common/SystemNoticeModal/index.vue"]]); var UPLOAD_API = `${globalBaseURL}/upload/image`; const _sfc_main$1g = { name: "ImageUploader", props: { maxCount: { type: Number, default: 6 }, defaultList: { type: Array, default: () => [] }, width: { type: [String, Number], default: "" }, height: { type: [String, Number], default: "" }, gap: { type: [String, Number], default: "20rpx" }, containerPadding: { type: [String, Number], default: "20rpx" }, isPreview: { type: Boolean, default: false }, imgCenter: { // 只有一张图片的时候是否在中间显示 type: Boolean, default: true } }, data() { return { imageList: [...this.defaultList], uploading: false, systemInfo: {} }; }, created() { this.systemInfo = uni.getSystemInfoSync(); }, computed: { itemWidth() { if (this.width) { return typeof this.width === "number" ? `${this.width}px` : this.width; } const screenWidth = this.systemInfo.screenWidth || this.systemInfo.windowWidth; const gapValue = this.getPixelValue(this.gap); const containerPaddingValue = this.getPixelValue(this.containerPadding); const availableWidth = screenWidth - containerPaddingValue * 2; const width = (availableWidth - gapValue * 2) / 3; return `${width}px`; }, itemHeight() { if (this.height) { return typeof this.height === "number" ? `${this.height}px` : this.height; } return this.itemWidth; }, showUploadBtn() { return this.imageList.length < this.maxCount && !this.uploading; } }, watch: { defaultList(newVal) { this.imageList = [...newVal]; }, imageList(newVal) { this.$emit("change", [...newVal]); } }, methods: { getPixelValue(value) { if (typeof value === "number") return value; if (value.includes("rpx")) { const num = parseFloat(value); return num / (750 / this.systemInfo.windowWidth); } return parseFloat(value); }, lastInRow(index) { return (index + 1) % 3 === 0; }, chooseImage() { if (this.uploading) return; if (this.imageList.length >= this.maxCount) { uni.showToast({ title: `最多只能上传${this.maxCount}张图片`, icon: "none" }); return; } const count = this.maxCount - this.imageList.length; uni.chooseImage({ count, sizeType: ["compressed"], sourceType: ["album", "camera"], success: async (res) => { uni.showLoading(); this.uploading = true; formatAppLog("log", "at components/CUploadImage/index.vue:163", res, "选择图片成功"); if (res.tempFiles && res.tempFiles.length > 0) { try { const uploadTasks = res.tempFilePaths.map((filePath) => this.uploadFile(filePath)); const results = await Promise.all(uploadTasks); formatAppLog("log", "at components/CUploadImage/index.vue:170", results, "上传结果"); const successResults = results.filter((item) => item && item.success); this.imageList = [...this.imageList, ...successResults.map((item) => item.data)]; } catch (error) { formatAppLog("log", "at components/CUploadImage/index.vue:175", "图片上传失败:", error); uni.showToast({ title: "图片上传失败", icon: "none" }); } finally { uni.hideLoading(); this.uploading = false; } } else { this.uploading = false; } }, fail: (error) => { formatAppLog("log", "at components/CUploadImage/index.vue:189", "选择图片失败:", error); this.uploading = false; }, complete: () => { this.uploading = false; } }); }, uploadFile(filePath) { return new Promise((resolve2) => { uni.uploadFile({ url: UPLOAD_API, filePath, name: "file", header: { Authorization: uni.getStorageSync("token") }, success: (res) => { formatAppLog("log", "at components/CUploadImage/index.vue:211", "uploadFile上传成功", res); try { const data = JSON.parse(res.data); if (data.code === 1) { resolve2({ success: true, data: data.data.url }); } else { resolve2({ success: false, error: data.msg || "上传失败" }); } } catch (e) { resolve2({ success: false, error: "解析响应失败" }); } }, fail: (error) => { formatAppLog("log", "at components/CUploadImage/index.vue:233", "uploadFile上传失败", error); resolve2({ success: false, error }); } }); }); }, handleDelete(index) { this.imageList.splice(index, 1); }, previewImage(index) { if (!this.isPreview) return; const urls = this.imageList.map((item) => item.url || item); uni.previewImage({ current: urls[index], urls }); }, getImages() { return [...this.imageList]; }, clear() { this.imageList = []; }, setImages(list2) { this.imageList = [...list2]; } } }; function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return vue.openBlock(), vue.createElementBlock("view", { class: "image-uploader-container" }, [ vue.createElementVNode( "view", { class: "image-uploader", style: vue.normalizeStyle({ display: $props.maxCount === 1 && $props.imgCenter ? "flex" : "" }) }, [ vue.createCommentVNode(" 图片列表 "), vue.createElementVNode("view", { class: "image-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.imageList, (item, index) => { return vue.openBlock(), vue.createElementBlock( "view", { key: index, class: "image-item", style: vue.normalizeStyle({ width: $options.itemWidth, height: $options.itemHeight, marginRight: $options.lastInRow(index) ? 0 : $props.gap }) }, [ vue.createElementVNode("image", { src: item.url || item, mode: "aspectFill", class: "image-content", onClick: ($event) => $options.previewImage(index) }, null, 8, ["src", "onClick"]), vue.createElementVNode("view", { class: "delete-btn", onClick: vue.withModifiers(($event) => $options.handleDelete(index), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "trash-fill", size: "26", color: "#fff" }) ], 8, ["onClick"]) ], 4 /* STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(" 上传按钮 "), $options.showUploadBtn ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "upload-btn", style: vue.normalizeStyle({ width: $options.itemWidth, height: $options.itemHeight }), onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseImage && $options.chooseImage(...args)) }, [ vue.createVNode(_component_u_icon, { name: "plus", size: "50", color: "#999" }), vue.createElementVNode( "text", { class: "upload-text" }, vue.toDisplayString(_ctx.$t("上传图片")), 1 /* TEXT */ ) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]) ], 4 /* STYLE */ ) ]); } const CUploadImage = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-785d6534"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/components/CUploadImage/index.vue"]]); const useRechargeStore = defineStore("recharge", { state: () => ({ visible: false, item: {} }), getters: {}, actions: { showModal(itemData) { this.item = itemData || {}; this.visible = true; }, hideModal() { this.visible = false; this.item = {}; } } }); const _sfc_main$1f = { __name: "index", emits: ["recharge-confirm"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const { t: t2, locale } = useI18n(); const rechargeStore = useRechargeStore(); const emit = __emit; const CUploadImageRef = vue.ref(); const dataRef = vue.ref({}); const dataParams = vue.reactive({ id: "", image: "" }); const payment_type_text = vue.ref(["微信", "支付宝", "银行卡"]); vue.watch(() => rechargeStore.visible, (newVal) => { if (newVal && rechargeStore.item && rechargeStore.item.pay_data) { dataParams.id = rechargeStore.item.id; dataRef.value = JSON.parse(rechargeStore.item.pay_data); } }); const handleConfirm = () => { uni.request({ url: apiUrl + "wallet/submitImage", method: "POST", data: dataParams, header: { Authorization: uni.getStorageSync("token"), lang: locale.value }, success: (res) => { uni.hideLoading(); if (res.data.code === 0) { uni.showToast({ title: res.data.msg || t2("提交成功"), icon: "success" }); dataParams.id = ""; dataParams.image = ""; CUploadImageRef.value.clear(); emit("recharge-confirm"); } else { uni.showToast({ title: res.data.msg || t2("提交失败"), icon: "none" }); } }, fail: (err) => { uni.hideLoading(); uni.showToast({ title: t2("网络错误"), icon: "none" }); } }); rechargeStore.hideModal(); }; const handleCancel = () => { rechargeStore.hideModal(); }; const changeImg = (e) => { dataParams.image = Array.isArray(e) ? e[0] : e; }; const __returned__ = { t: t2, locale, rechargeStore, emit, CUploadImageRef, dataRef, dataParams, payment_type_text, handleConfirm, handleCancel, changeImg, ref: vue.ref, reactive: vue.reactive, watch: vue.watch, get apiUrl() { return apiUrl; }, get useI18n() { return useI18n; }, CUploadImage, get useRechargeStore() { return useRechargeStore; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_button = __unplugin_components_2$1; return $setup.rechargeStore.visible ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "recharge-modal", onTouchmove: vue.withModifiers(() => { }, ["stop", "prevent"]) }, [ vue.createElementVNode("view", { class: "recharge-box" }, [ vue.createElementVNode( "view", { class: "modal-header" }, vue.toDisplayString(_ctx.$t("充值确认")), 1 /* TEXT */ ), $setup.dataRef ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "info-container" }, [ vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("充值类型")), 1 /* TEXT */ ), $setup.rechargeStore.item && $setup.rechargeStore.item.payment_type ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "value" }, vue.toDisplayString($setup.payment_type_text[Number($setup.rechargeStore.item.payment_type) - 1]), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("收款人姓名")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "value" }, vue.toDisplayString($setup.dataRef.payName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("收款账号")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "value" }, vue.toDisplayString($setup.dataRef.payAccount), 1 /* TEXT */ ) ]), $setup.rechargeStore.item.payment_type == "3" && $setup.dataRef.bankName ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("开户行")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "value" }, vue.toDisplayString($setup.dataRef.bankName), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $setup.rechargeStore.item.payment_type != "3" && $setup.dataRef.payQrCode ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "qr-wrapper" }, [ vue.createElementVNode("image", { class: "qr-code", src: $setup.dataRef.payQrCode, mode: "aspectFit" }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "qr-tip" }, vue.toDisplayString(_ctx.$t("收款码")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "qr-wrapper" }, [ vue.createVNode( $setup["CUploadImage"], { onChange: $setup.changeImg, maxCount: 1, ref: "CUploadImageRef" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode( "text", { class: "qr-tip" }, vue.toDisplayString(_ctx.$t("上传支付凭证")), 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "action-btns" }, [ vue.createVNode(_component_u_button, { type: "error", onClick: $setup.handleCancel, class: "btn" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("取消")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_button, { type: "primary", onClick: $setup.handleConfirm, class: "btn" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("提交")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const RechargeModal$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-6f4bef05"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/common/rechargeModal/index.vue"]]); const _sfc_main$1e = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { const show = vue.ref(false); const checkIsIosSafari = () => { return false; }; vue.onMounted(() => { }); const openPop = () => { }; const handleClose = () => { show.value = false; }; __expose({ show, openPop }); const __returned__ = { show, checkIsIosSafari, openPop, handleClose }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_popup = __unplugin_components_2$3; return vue.openBlock(), vue.createElementBlock("view", { class: "guide-container" }, [ vue.createVNode(_component_u_popup, { modelValue: $setup.show, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.show = $event), mode: "bottom", "mask-close-able": true, "safe-area-inset-bottom": true, onClose: $setup.handleClose }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "guide-content" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]) ]), _: 3 /* FORWARDED */ }, 8, ["modelValue"]) ]); } const AddDesktopGuide = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-58ed82b7"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/components/AddDesktopGuide/index.vue"]]); const _imports_0$6 = "/static/images/layout/applogo.png"; const _imports_1$2 = "/static/images/yindao.png"; const _sfc_main$1d = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const showAppBanner = vue.ref(uni.getStorageSync("hide_global_app_banner") !== true); const AddDesktopGuideRef = vue.ref(); const handleCloseBanner = () => { showAppBanner.value = false; uni.setStorageSync("hide_global_app_banner", true); if (typeof window !== "undefined") { window.isAppBannerClosed = true; } }; const handleDownload = () => { formatAppLog("log", "at components/AppDownloadBanner/index.vue:46", "执行下载逻辑"); AddDesktopGuideRef.value.openPop(); }; function isAddedToHomeScreen2() { return true; } vue.onMounted(() => { if (typeof window !== "undefined" && window.isAppBannerClosed) { showAppBanner.value = false; } }); const __returned__ = { t: t2, showAppBanner, AddDesktopGuideRef, handleCloseBanner, handleDownload, isAddedToHomeScreen: isAddedToHomeScreen2, ref: vue.ref, onMounted: vue.onMounted, get useI18n() { return useI18n; }, AddDesktopGuide }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return $setup.showAppBanner ? vue.withDirectives((vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "global-app-banner" }, [ vue.createElementVNode("view", { class: "banner-content" }, [ vue.createElementVNode("view", { class: "left-section" }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#666", size: "28", class: "close-btn", onClick: vue.withModifiers($setup.handleCloseBanner, ["stop"]) }), vue.createElementVNode("image", { src: _imports_0$6, class: "app-icon", mode: "aspectFill" }), vue.createElementVNode("view", { class: "app-info" }, [ vue.createElementVNode("text", { class: "app-name" }, "F1BET  APP"), vue.createElementVNode( "text", { class: "app-tips" }, vue.toDisplayString($setup.t("体验更流畅,娱乐更安全。")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "view", { class: "download-btn", onClick: $setup.handleDownload }, vue.toDisplayString($setup.t("立即下载")), 1 /* TEXT */ ) ]), vue.createVNode( $setup["AddDesktopGuide"], { ref: "AddDesktopGuideRef" }, { default: vue.withCtx(() => [ vue.createElementVNode("image", { src: _imports_1$2, mode: "widthFix" }) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ], 512 /* NEED_PATCH */ )), [ [vue.vShow, !$setup.isAddedToHomeScreen()] ]) : vue.createCommentVNode("v-if", true); } const AppDownloadBanner = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-2d50370a"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/components/AppDownloadBanner/index.vue"]]); function useCallbacks() { let handlers = []; function add(handler) { handlers.push(handler); return () => { const i = handlers.indexOf(handler); if (i > -1) handlers.splice(i, 1); }; } function reset() { handlers = []; } return { add, list: () => handlers, reset }; } const HASH_RE = /#/g; const AMPERSAND_RE = /&/g; const PLUS_RE = /\+/g; const ENC_BRACKET_OPEN_RE = /%5B/g; const ENC_BRACKET_CLOSE_RE = /%5D/g; const ENC_CARET_RE = /%5E/g; const ENC_BACKTICK_RE = /%60/g; const ENC_CURLY_OPEN_RE = /%7B/g; const ENC_PIPE_RE = /%7C/g; const ENC_CURLY_CLOSE_RE = /%7D/g; const ENC_SPACE_RE = /%20/g; function commonEncode(text) { return encodeURI(`${text}`).replace(ENC_PIPE_RE, "|").replace(ENC_BRACKET_OPEN_RE, "[").replace(ENC_BRACKET_CLOSE_RE, "]"); } function encodeQueryValue(text) { return commonEncode(text).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^"); } function decode(text) { try { return decodeURIComponent(`${text}`); } catch (err) { warn(`Error decoding "${text}". Using original value`); } return `${text}`; } function warn(msg, debug = false, ...args) { debug && console.warn(`[uni-router warn]: ${msg}`, ...args); } const NavigationFailureSymbol = Symbol("navigation failure"); const ErrorTypeMessages = { [ 1 /* NavigationErrorTypes.MATCHER_NOT_FOUND */ ]({ location: location2 }) { return `Navigation ${typeof location2 === "string" ? location2 : JSON.stringify(location2)} is not found`; }, [ 2 /* NavigationErrorTypes.NAVIGATION_GUARD_REDIRECT */ ]({ from, to }) { return `Redirected from "${JSON.stringify(from)}" to "${JSON.stringify(to)}" via a navigation guard.`; }, [ 4 /* NavigationErrorTypes.NAVIGATION_ABORTED */ ]({ from, to }) { return `Navigation aborted from "${JSON.stringify(from)}" to "${JSON.stringify(to)}" via a navigation guard.`; }, [ 8 /* NavigationErrorTypes.NAVIGATION_CANCELLED */ ]({ from, to }) { return `Navigation cancelled from "${JSON.stringify(from)}" to "${JSON.stringify(to)}" with a new navigation.`; }, [ 16 /* NavigationErrorTypes.NAVIGATION_DUPLICATED */ ]({ from, to }) { return `Avoided redundant navigation to current location: "${JSON.stringify(from)}".`; } }; function isNavigationFailure(error, type2) { return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2)); } function createRouterError(type2, params) { return Object.assign(new Error(ErrorTypeMessages[type2](params)), { type: type2, [NavigationFailureSymbol]: true }, params); } const isArray = Array.isArray; const isFunction = (val) => typeof val === "function"; const isString = (val) => typeof val === "string"; const isObject$2 = (val) => val != null && typeof val === "object"; const mpPlatformReg = /(^mp-weixin$)|(^mp-baidu$)|(^mp-alipay$)|(^mp-toutiao$)|(^mp-qq$)|(^mp-360$)/g; const uniRouterApiName = [ "navigateTo", "redirectTo", "reLaunch", "switchTab", "navigateBack" ]; var NavigationTypesEnums; (function(NavigationTypesEnums2) { NavigationTypesEnums2["navigate"] = "navigateTo"; NavigationTypesEnums2["redirect"] = "redirectTo"; NavigationTypesEnums2["reLaunch"] = "reLaunch"; NavigationTypesEnums2["switchTab"] = "switchTab"; NavigationTypesEnums2["navigateBack"] = "navigateBack"; })(NavigationTypesEnums || (NavigationTypesEnums = {})); const START_LOCATION_NORMALIZED = { path: "/", name: "", query: {}, fullPath: "/", meta: {} }; const WILDCARD = "*"; const routerKey = Symbol(); const routeLocationKey = Symbol(); function useRouter$1() { return vue.inject(routerKey); } function useRoute() { return vue.inject(routeLocationKey); } const uniRouterApi = { navigateTo: uni.navigateTo, redirectTo: uni.redirectTo, reLaunch: uni.reLaunch, switchTab: uni.switchTab, navigateBack: uni.navigateBack }; function rewriteUniRouterApi(router2) { uniRouterApiName.forEach((apiName) => { uni[apiName] = function(options) { return router2[apiName](options); }; }); } function parseQuery(search) { const query = {}; if (search === "" || search === "?") return query; const hasLeadingIM = search[0] === "?"; const searchParams = (hasLeadingIM ? search.slice(1) : search).split("&"); for (let i = 0; i < searchParams.length; ++i) { const searchParam = searchParams[i].replace("+", " "); const eqPos = searchParam.indexOf("="); const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos)); const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1)); query[key] = value; } return query; } function decodeQuery(query) { for (const key in query) { const value = query[key]; if (value != null) { query[key] = decode(value); } } return query; } function stringifyQuery(query) { let search = ""; for (let key in query) { const value = query[key]; key = encodeQueryValue(key); if (value == null) { if (value !== void 0) { search += (search.length ? "&" : "") + key; } continue; } if (value !== void 0) { search += (search.length ? "&" : "") + key; if (value != null) search += `=${encodeQueryValue(value)}`; } } return search; } function parseURL(parseQuery2, location2, currentLocation = "/") { if (location2 === WILDCARD) { return { path: location2, query: {} }; } let path, query = {}, searchString = ""; const searchPos = location2.indexOf("?"); if (searchPos > -1) { path = location2.slice(0, searchPos); searchString = location2.slice(searchPos + 1); query = parseQuery2(searchString); } else { path = location2; } path = resolveRelativePath(path != null ? path : location2, currentLocation); return { path, query }; } function stringifyURL(stringifyQuery2, location2) { const query = location2.query ? stringifyQuery2(location2.query) : ""; return location2.path + (query && "?") + query; } function getEnterRoute(router2) { const options = uni.getLaunchOptionsSync(); return { path: `/${options.path}`, query: options.query || {} }; } function resolveRelativePath(to, from) { if (to.startsWith("/")) return to; if (!from.startsWith("/")) { return to; } if (!to) return from; const fromSegments = from.split("/"); const toSegments = to.split("/"); const lastToSegment = toSegments[toSegments.length - 1]; if (lastToSegment === ".." || lastToSegment === ".") { toSegments.push(""); } let position = fromSegments.length - 1; let toPosition; let segment; for (toPosition = 0; toPosition < toSegments.length; toPosition++) { segment = toSegments[toPosition]; if (segment === ".") continue; if (segment === "..") { if (position > 1) position--; } else break; } return `${fromSegments.slice(0, position).join("/")}/${toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join("/")}`; } function createRouteMatcher(options) { const aliasPathToRouteMap = /* @__PURE__ */ new Map(); const pathToRouteMap = /* @__PURE__ */ new Map(); const nameToRouteMap = /* @__PURE__ */ new Map(); function createRouteRecord(route2) { let { path, aliasPath, name } = route2; const routeStr = JSON.stringify(route2); if (path == null || path === void 0) { warn(`当前路由对象route:${routeStr}不规范,必须含有\`path\``, options.debug); } if (path.indexOf("/") !== 0 && path !== "*") { warn(`当前路由对象route:${routeStr} \`path\`缺少前缀 ‘/’`, options.debug); } aliasPath = aliasPath || path; pathToRouteMap.set(path, route2); aliasPathToRouteMap.set(aliasPath, route2); if (name) { if (nameToRouteMap.has(name)) { warn(`当前路由对象route:${routeStr} 的\`name\`已存在路由表中,将会覆盖旧值`, options.debug); } nameToRouteMap.set(name, route2); } } options.routes.forEach((route2) => createRouteRecord(route2)); function getRouteByAliasPath(aliasPath) { return aliasPathToRouteMap.get(aliasPath); } function getRouteByPath(path) { return pathToRouteMap.get(path); } function getRouteByName(name) { return nameToRouteMap.get(name); } return { getRouteByAliasPath, getRouteByPath, getRouteByName }; } function routeLocationNormalized(router2, routeLocation) { var _a2; let { fullPath, path, name, query, meta } = routeLocation; const { getRouteByAliasPath, getRouteByPath } = router2.routeMatcher; const locationNormalized = Object.assign({}, START_LOCATION_NORMALIZED); if (router2.options.platform === "h5") { const route2 = path === "/" ? getRouteByAliasPath(path) : getRouteByPath(path); query = routeLocation.query = decodeQuery((_a2 = parseURL(router2.parseQuery, fullPath)) === null || _a2 === void 0 ? void 0 : _a2.query); fullPath = stringifyURL(router2.stringifyQuery, routeLocation); meta = Object.assign({}, route2 === null || route2 === void 0 ? void 0 : route2.meta, meta); name = route2 === null || route2 === void 0 ? void 0 : route2.name; } locationNormalized.fullPath = fullPath; locationNormalized.meta = meta; locationNormalized.path = path; locationNormalized.name = name; locationNormalized.query = query; return locationNormalized; } function isRouteLocation(route2) { return typeof route2 === "string" || route2 && typeof route2 === "object"; } function isSameRouteLocation(a, b) { if (a.fullPath || b.fullPath) { return a.fullPath === b.fullPath; } else { return false; } } function createRoute404(router2, to) { const route2 = router2.resolve(WILDCARD); if (!route2 || typeof route2.redirect === "undefined") { warn("未匹配到*通配符路径,或者*通配符必须配合 redirect 使用。redirect: string | Location", router2.options.debug); throw createRouterError(1, { location: to }); } let redirect; if (isFunction(route2.redirect)) { redirect = route2.redirect(to); } else { redirect = route2.redirect; } const targetLocation = router2.resolve(redirect); if (targetLocation === void 0) { warn(`无法解析解析出redirect:${JSON.stringify(redirect)}中的内容,`, router2.options.debug); throw createRouterError(1, { location: to }); } return createRouterError(2, { to: redirect, from: to }); } function runGuardQueue(guards) { return guards.reduce((promise2, guard) => promise2.then(() => guard()), Promise.resolve()); } function guardToPromiseFn(guard, to, from) { return () => new Promise((resolve2, reject) => { const next = (valid) => { if (valid === false) { reject(createRouterError(4, { to, from })); } else if (valid instanceof Error) { reject(valid); } else if (isRouteLocation(valid)) { reject(createRouterError(2, { to: valid, from: to })); } else { resolve2(); } }; const guardReturn = guard(to, from, next); let guardCall = Promise.resolve(guardReturn); if (typeof guardReturn === "object" && "then" in guardReturn) { guardCall = guardCall.then(next); } else if (guardReturn !== void 0) { next(guardReturn); } guardCall.catch((err) => reject(err)); }); } function getRouteByVueVm(vueVm, router2) { let path = vueVm.$scope.route; path = path.startsWith("/") ? path : `/${path}`; const query = vueVm.$scope.options || {}; return { path, query }; } var __async$3 = (__this, __arguments, generator) => { return new Promise((resolve2, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; function createHook(originHook, proxyHook, vm, router2) { return (...args) => { proxyHook.call(vm, args, (options) => { originHook.apply(vm, options); }, router2); }; } function proxyPageHook(vm, router2) { console.log(vm); if (!proxyHooksConfig$1) return; if (!vm.$scope) return; for (const proxyHookKey in proxyHooksConfig$1) { const proxyHook = proxyHooksConfig$1[proxyHookKey]; const originHook = vm.$scope[proxyHookKey]; if (originHook) { vm.$scope[proxyHookKey] = createHook(originHook, proxyHook, vm, router2); } } } const proxyHooksConfig$1 = { //修改onLoad拿到的参数 onLoad([options], originHook, router2) { originHook([decodeQuery(options)]); }, onShow(options, originHook, router2) { console.log(options); const pages = getCurrentPages(); const pagesLen = pages.length; let toNormalized; let fromNormalized; if (router2.fromRoute) { toNormalized = router2.currentRoute.value; fromNormalized = router2.fromRoute; router2.fromRoute = void 0; } else { const to = getRouteByVueVm(this); toNormalized = routeLocationNormalized(router2, router2.resolve(to)); fromNormalized = router2.currentRoute.value; if (isSameRouteLocation(toNormalized, fromNormalized)) { return originHook(options); } router2.currentRoute.value = toNormalized; } const afterGuards = []; for (const guard of router2.guards.afterGuards.list()) { afterGuards.push(() => __async$3(this, null, function* () { guard(toNormalized, fromNormalized); })); } runGuardQueue(afterGuards); router2.level = pagesLen; originHook(options); } }; function getRouteByPages(pagesVm, router2) { const path = pagesVm.$page.path; const query = pagesVm.$page.options || {}; return { path, query }; } var __async$2 = (__this, __arguments, generator) => { return new Promise((resolve2, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; function proxyPageHookApp(vm, router2) { if (!proxyHooksConfig) return; if (!vm.$) return; for (const proxyHookKey in proxyHooksConfig) { const proxyHook = proxyHooksConfig[proxyHookKey]; const originHook = vm.$[proxyHookKey]; if (isArray(originHook)) { originHook.unshift(proxyHook.bind(vm, router2)); } else { vm.$[proxyHookKey] = [proxyHook.bind(vm, router2)]; } } } const proxyHooksConfig = { onShow(router2) { const pages = getCurrentPages(); const pagesLen = pages.length; let toNormalized; let fromNormalized; if (router2.fromRoute) { toNormalized = router2.currentRoute.value; fromNormalized = router2.fromRoute; router2.fromRoute = void 0; } else { const to = getRouteByPages(this); toNormalized = routeLocationNormalized(router2, router2.resolve(to)); fromNormalized = router2.currentRoute.value; if (isSameRouteLocation(toNormalized, fromNormalized)) { return; } router2.currentRoute.value = toNormalized; } const afterGuards = []; for (const guard of router2.guards.afterGuards.list()) { afterGuards.push(() => __async$2(this, null, function* () { guard(toNormalized, fromNormalized); })); } runGuardQueue(afterGuards); router2.level = pagesLen; } }; function initMixins(app, router2) { const mixin = getMixinByPlatform(router2); app.mixin(mixin); } function getMixinByPlatform(router2) { let platform = router2.options.platform; if (mpPlatformReg.test(platform)) { platform = "applets"; } const mixinsMap = { app: { beforeCreate() { if (this.$mpType === "page") { proxyPageHookApp(this, router2); } } }, h5: {}, applets: { beforeCreate() { if (this.$mpType === "page") { proxyPageHook(this, router2); } } } }; return mixinsMap[platform] || {}; } function mountVueRouter(app, router2) { const { h5: config2 } = router2.options; const vueRouter = app.config.globalProperties.$router; const scrollBehavior = vueRouter.options.scrollBehavior; Object.assign(vueRouter.options, config2); vueRouter.options.scrollBehavior = function(to, from, savedPosition) { if (config2 === null || config2 === void 0 ? void 0 : config2.scrollBehavior) { return config2 === null || config2 === void 0 ? void 0 : config2.scrollBehavior(to, from, savedPosition); } return scrollBehavior(to, from, savedPosition); }; router2.vueRouter = vueRouter; for (const [guardName, guard] of Object.entries(router2.guards)) { guard.list().forEach((fn) => { registerVueRooterGuards(router2, guardName, fn); }); } vueRouter.afterEach((to) => { router2.currentRoute.value = routeLocationNormalized(router2, to); }); } function registerVueRooterGuards(router2, guardName, userGuard) { var _a2; const guardHandler = { beforeGuards: () => { var _a22; (_a22 = router2.vueRouter) === null || _a22 === void 0 ? void 0 : _a22.beforeEach((to, from, next) => { const toRoute = router2.resolve(to); const toNormalized = routeLocationNormalized(router2, to); const fromNormalized = routeLocationNormalized(router2, from); let failure; if (toRoute === void 0) { failure = createRoute404(router2, toNormalized); } const proxyNext = (valid) => { if (isRouteLocation(valid) && !(valid instanceof Error)) { if (isString(valid) || !valid.navType) { const redirect = router2.resolve(valid); if (redirect) { next({ path: redirect.path, query: redirect.query }); } } else { const navType = valid.navType; router2.navigate(valid, navType); } } else { next(valid); } }; if (isNavigationFailure( failure, 2 /* NavigationErrorTypes.NAVIGATION_GUARD_REDIRECT */ )) { router2.redirectTo(failure === null || failure === void 0 ? void 0 : failure.to); return; } const guardReturn = userGuard(toNormalized, fromNormalized, proxyNext); if (typeof guardReturn === "object" && "then" in guardReturn) { guardReturn.then(proxyNext).catch(() => { proxyNext(false); }); } else if (guardReturn !== void 0) { proxyNext(guardReturn); } }); }, afterGuards: () => { var _a22; (_a22 = router2.vueRouter) === null || _a22 === void 0 ? void 0 : _a22.afterEach((to, from) => { const toNormalized = routeLocationNormalized(router2, to); const fromNormalized = routeLocationNormalized(router2, from); userGuard(toNormalized, fromNormalized); }); } }; (_a2 = guardHandler[guardName]) === null || _a2 === void 0 ? void 0 : _a2.call(guardHandler); } var __defProp$1 = Object.defineProperty; var __defProps$1 = Object.defineProperties; var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols; var __hasOwnProp$1 = Object.prototype.hasOwnProperty; var __propIsEnum$1 = Object.prototype.propertyIsEnumerable; var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues$1 = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp$1.call(b, prop)) __defNormalProp$1(a, prop, b[prop]); if (__getOwnPropSymbols$1) for (var prop of __getOwnPropSymbols$1(b)) { if (__propIsEnum$1.call(b, prop)) __defNormalProp$1(a, prop, b[prop]); } return a; }; var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)); var __async$1 = (__this, __arguments, generator) => { return new Promise((resolve2, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; function resolve$1(router2, rawLocation, navType = "navigateTo") { const { getRouteByName, getRouteByPath, getRouteByAliasPath } = router2.routeMatcher; if (isString(rawLocation)) { rawLocation = { path: rawLocation }; } if (Reflect.has(rawLocation, "delta") && navType === "navigateBack" || rawLocation.from === "backbutton") { return rawLocation; } if (Reflect.has(rawLocation, "url")) { rawLocation = __spreadProps$1(__spreadValues$1({}, rawLocation), { path: rawLocation.url }); } const currentPath = router2.currentRoute.value.path; const currentLocation = currentPath === "/" ? getRouteByAliasPath(currentPath) : getRouteByPath(currentPath); if (Reflect.has(rawLocation, "path")) { const location2 = parseURL(router2.parseQuery, rawLocation.path, currentLocation === null || currentLocation === void 0 ? void 0 : currentLocation.path); let toRouteRecord = getRouteByPath(location2.path); if (toRouteRecord === void 0) { toRouteRecord = getRouteByAliasPath(location2.path); } if (toRouteRecord === void 0) { return; } const query = Object.assign({}, location2.query, rawLocation === null || rawLocation === void 0 ? void 0 : rawLocation.query); const fullPath = stringifyURL(router2.stringifyQuery, { path: toRouteRecord.path, query }); return __spreadProps$1(__spreadValues$1({}, rawLocation), { path: toRouteRecord.path, meta: toRouteRecord.meta || {}, name: toRouteRecord.name, redirect: toRouteRecord.redirect, fullPath, query }); } else if (Reflect.has(rawLocation, "name")) { let toRouteRecord = getRouteByName(rawLocation.name); if (toRouteRecord === void 0) { toRouteRecord = getRouteByPath(WILDCARD); return; } const query = Object.assign({}, rawLocation.query); const fullPath = stringifyURL(router2.stringifyQuery, { path: toRouteRecord.path, query }); return __spreadProps$1(__spreadValues$1({}, rawLocation), { path: toRouteRecord.path, meta: toRouteRecord.meta || {}, name: toRouteRecord.name, redirect: toRouteRecord.redirect, fullPath, query }); } } function mount$1(app, router2) { mountVueRouter(app, router2); } function navigate$1(router2, to, navType = "navigateTo", redirectedFrom) { let targetLocation = router2.resolve(to, navType); let failure; if (targetLocation === void 0) { failure = createRoute404(router2, to); } const from = router2.currentRoute.value; const pages = getCurrentPages(); if (navType === "navigateBack" && targetLocation.delta >= pages.length) { targetLocation = router2.resolve("/", "reLaunch"); navType = "reLaunch"; } return (failure ? Promise.resolve(failure) : router2.jump(targetLocation, navType)).catch((error) => { return isNavigationFailure( error, 2 /* NavigationErrorTypes.NAVIGATION_GUARD_REDIRECT */ ) ? error : Promise.reject(error); }).then((failure2) => { if (failure2) { if (isNavigationFailure( failure2, 2 /* NavigationErrorTypes.NAVIGATION_GUARD_REDIRECT */ )) { const failureTo = router2.resolve(failure2 === null || failure2 === void 0 ? void 0 : failure2.to); if (targetLocation && isSameRouteLocation(targetLocation, failureTo) && redirectedFrom && (redirectedFrom._count = redirectedFrom._count ? redirectedFrom._count + 1 : 1) > 30) { vue.warn(`检测到从“${from.fullPath}”到“${targetLocation.fullPath}”时导航守卫中可能存在无限重定向。中止以避免堆栈溢出。 是否总是在导航防护中返回新位置?这将导致此错误。仅在重定向或中止时返回,这应该可以解决此问题。如果未修复,这可能会在生产中中断`, router2.options.debug); return Promise.reject(new Error("Infinite redirect in navigation guard")); } else { return router2.navigate(failureTo, failureTo.navType, redirectedFrom || targetLocation); } } else { return Promise.resolve(failure2); } } }); } function jump$1(router2, toLocation, navType) { return new Promise((resolve2, reject) => { uniRouterApi[navType](__spreadProps$1(__spreadValues$1({}, toLocation), { url: toLocation.fullPath, success(res) { var _a2; resolve2(res); (_a2 = toLocation.success) === null || _a2 === void 0 ? void 0 : _a2.call(toLocation, res); }, fail(res) { var _a2; reject(res); (_a2 = toLocation.fail) === null || _a2 === void 0 ? void 0 : _a2.call(toLocation, res); }, complete(res) { var _a2; (_a2 = toLocation.complete) === null || _a2 === void 0 ? void 0 : _a2.call(toLocation, res); } })); }); } function forceGuardEach$1(router2) { return __async$1(this, null, function* () { throw new Error(`在h5端上使用:forceGuardEach 是无意义的,目前 forceGuardEach 仅支持在非h5端上使用`); }); } var h5Api = { resolve: resolve$1, mount: mount$1, navigate: navigate$1, jump: jump$1, forceGuardEach: forceGuardEach$1 }; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __async = (__this, __arguments, generator) => { return new Promise((resolve2, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; function resolve(router2, rawLocation, navType = "navigateTo") { const { getRouteByName, getRouteByPath, getRouteByAliasPath } = router2.routeMatcher; if (isString(rawLocation)) { rawLocation = { path: rawLocation }; } if (Reflect.has(rawLocation, "delta") && navType === "navigateBack" || rawLocation.from === "backbutton") { rawLocation.delta = rawLocation.delta || 1; const pages = getCurrentPages(); let backIndex = 0; if (pages.length > rawLocation.delta) { backIndex = pages.length - 1 - rawLocation.delta; } let toRoute; if (router2.options.platform === "app") { toRoute = getRouteByPages(pages[backIndex]); } else { toRoute = getRouteByVueVm(pages[backIndex].$vm); } rawLocation = __spreadProps(__spreadValues(__spreadValues({}, toRoute), rawLocation), { force: rawLocation.from === "backbutton" }); } if (Reflect.has(rawLocation, "url")) { rawLocation = __spreadProps(__spreadValues({}, rawLocation), { path: rawLocation.url }); } const currentPath = router2.currentRoute.value.path; const currentLocation = currentPath === "/" ? getRouteByAliasPath(currentPath) : getRouteByPath(currentPath); if (Reflect.has(rawLocation, "path")) { const location2 = parseURL(router2.parseQuery, rawLocation.path, currentLocation === null || currentLocation === void 0 ? void 0 : currentLocation.path); let toRouteRecord = getRouteByPath(location2.path); if (toRouteRecord === void 0) { toRouteRecord = getRouteByAliasPath(location2.path); } if (toRouteRecord === void 0) { return; } const query = Object.assign({}, location2.query, rawLocation === null || rawLocation === void 0 ? void 0 : rawLocation.query); const fullPath = stringifyURL(router2.stringifyQuery, { path: toRouteRecord.path, query }); return __spreadProps(__spreadValues({}, rawLocation), { path: toRouteRecord.path, meta: toRouteRecord.meta || {}, name: toRouteRecord.name, redirect: toRouteRecord.redirect, fullPath, query }); } else if (Reflect.has(rawLocation, "name")) { const toRouteRecord = getRouteByName(rawLocation.name); if (toRouteRecord === void 0) { return; } const query = Object.assign({}, rawLocation.query); const fullPath = stringifyURL(router2.stringifyQuery, { path: toRouteRecord.path, query }); return __spreadProps(__spreadValues({}, rawLocation), { path: toRouteRecord.path, meta: toRouteRecord.meta || {}, name: toRouteRecord.name, redirect: toRouteRecord.redirect, fullPath, query }); } } function mount(app, router2) { router2.forceGuardEach(); } function navigate(router2, to, navType = "navigateTo", redirectedFrom) { try { const targetLocation = router2.resolve(to, navType); const force = targetLocation === null || targetLocation === void 0 ? void 0 : targetLocation.force; if (router2.lock && !force) return Promise.resolve(); router2.lock = true; const from = router2.currentRoute.value; let failure; if (targetLocation === void 0) { failure = createRoute404(router2, to); } else if (!force && isSameRouteLocation(targetLocation, from)) { const toNormalized = routeLocationNormalized(router2, targetLocation); failure = createRouterError(16, { to: toNormalized, from }); } return (failure ? Promise.resolve(failure) : router2.jump(targetLocation, navType)).catch((error) => { return isNavigationFailure( error, 2 /* NavigationErrorTypes.NAVIGATION_GUARD_REDIRECT */ ) ? error : Promise.reject(error); }).then((failure2) => { if (failure2) { if (isNavigationFailure( failure2, 2 /* NavigationErrorTypes.NAVIGATION_GUARD_REDIRECT */ )) { const failureTo = router2.resolve(failure2 === null || failure2 === void 0 ? void 0 : failure2.to); if (targetLocation && isSameRouteLocation(targetLocation, failureTo) && redirectedFrom && (redirectedFrom._count = redirectedFrom._count ? redirectedFrom._count + 1 : 1) > 30) { warn(`检测到从“${from.fullPath}”到“${targetLocation.fullPath}”时导航守卫中可能存在无限重定向。中止以避免堆栈溢出。 是否总是在导航防护中返回新位置?这将导致此错误。仅在重定向或中止时返回,这应该可以解决此问题。如果未修复,这可能会在生产中中断`, router2.options.debug); return Promise.reject(new Error("Infinite redirect in navigation guard")); } else { router2.lock = false; return router2.navigate(failureTo, failureTo.navType, redirectedFrom || targetLocation); } } else { return Promise.resolve(failure2); } } }).finally(() => { router2.lock = false; }); } catch (error) { router2.lock = false; return Promise.reject(error); } } function jump(router2, toLocation, navType) { return new Promise((resolve2, reject) => { const toNormalized = routeLocationNormalized(router2, toLocation); Promise.resolve().then(() => { const beforeGuards = []; for (const guard of router2.guards.beforeGuards.list()) { beforeGuards.push(guardToPromiseFn(guard, toNormalized, router2.currentRoute.value)); } return runGuardQueue(beforeGuards); }).then(() => { router2.fromRoute = router2.currentRoute.value; router2.currentRoute.value = toNormalized; uniRouterApi[navType](__spreadProps(__spreadValues({}, toLocation), { url: toLocation.fullPath, success(res) { var _a2; (_a2 = toLocation.success) === null || _a2 === void 0 ? void 0 : _a2.call(toLocation, res); resolve2(res); }, fail(res) { var _a2; (_a2 = toLocation.fail) === null || _a2 === void 0 ? void 0 : _a2.call(toLocation, res); reject(res); }, complete(res) { var _a2; (_a2 = toLocation.complete) === null || _a2 === void 0 ? void 0 : _a2.call(toLocation, res); } })); }).catch(reject); }); } function forceGuardEach(router2) { return __async(this, null, function* () { const to = getEnterRoute(); const targetLocation = router2.resolve(to); let failure; if (targetLocation === void 0) { failure = createRoute404(router2, to); } else { const toNormalized = routeLocationNormalized(router2, targetLocation); const beforeGuards = []; for (const guard of router2.guards.beforeGuards.list()) { beforeGuards.push(guardToPromiseFn(guard, toNormalized, START_LOCATION_NORMALIZED)); } try { yield runGuardQueue(beforeGuards); router2.currentRoute.value = toNormalized; const afterGuards = []; for (const guard of router2.guards.afterGuards.list()) { afterGuards.push(() => __async(this, null, function* () { guard(toNormalized, START_LOCATION_NORMALIZED); })); } yield runGuardQueue(afterGuards); } catch (error) { failure = error; } } if (isNavigationFailure( failure, 2 /* NavigationErrorTypes.NAVIGATION_GUARD_REDIRECT */ )) { return router2.reLaunch(failure === null || failure === void 0 ? void 0 : failure.to); } }); } var publicApi = { resolve, mount, navigate, jump, forceGuardEach }; function createApi(platform) { switch (platform) { case "h5": return h5Api; default: return publicApi; } } function createRouter$1(options) { const guards = { beforeGuards: useCallbacks(), afterGuards: useCallbacks() }; const currentRoute = vue.shallowRef(START_LOCATION_NORMALIZED); const routeMatcher = createRouteMatcher(options); const API = createApi(options.platform); function resolve2(rawLocation, navType = "navigateTo") { return API.resolve(router2, rawLocation, navType); } function jump2(toLocation, navType) { return new Promise((resolve22, reject) => { API.jump(router2, toLocation, navType).then(resolve22).catch(reject); }); } function navigate2(to, navType = "navigateTo", redirectedFrom) { return new Promise((resolve22, reject) => { let options2 = {}; if (isObject$2(to)) { options2 = to; } API.navigate(router2, to, navType, redirectedFrom).then((res) => { resolve22(res); }).catch((error) => { var _a2, _b2; (_a2 = options2.fail) === null || _a2 === void 0 ? void 0 : _a2.call(options2, error); (_b2 = options2.complete) === null || _b2 === void 0 ? void 0 : _b2.call(options2, error); reject(error); }); }); } function forceGuardEach2() { return new Promise((resolve22, reject) => { API.forceGuardEach(router2).then(resolve22).catch(reject); }); } const router2 = { level: 0, lock: false, currentRoute, guards, options, vueRouter: null, routeMatcher, parseQuery: options.parseQuery || parseQuery, stringifyQuery: options.stringifyQuery || stringifyQuery, jump: jump2, navigateTo(to) { return navigate2(to, "navigateTo"); }, switchTab(to) { return navigate2(to, "switchTab"); }, redirectTo(to) { return navigate2(to, "redirectTo"); }, reLaunch(to) { return navigate2(to, "reLaunch"); }, navigateBack(to = { delta: 1 }) { return navigate2(to, "navigateBack"); }, navigate: navigate2, resolve: resolve2, forceGuardEach: forceGuardEach2, beforeEach(userGuard) { guards.beforeGuards.add(userGuard); }, afterEach(userGuard) { guards.afterGuards.add(userGuard); }, install(app) { const reactiveRoute = {}; for (const key in START_LOCATION_NORMALIZED) { reactiveRoute[key] = vue.computed(() => currentRoute.value[key]); } app.config.globalProperties.$uniRouter = router2; Object.defineProperty(app.config.globalProperties, "$uniRoute", { enumerable: true, get: () => vue.unref(currentRoute) }); app.provide(routerKey, router2); app.provide(routeLocationKey, vue.reactive(reactiveRoute)); const mountApp = app.mount; app.mount = function(...args) { rewriteUniRouterApi(router2); API.mount(app, router2); initMixins(app, router2); console.log(`%c uni-router %c v${"1.2.7"} `, "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;", "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;"); return mountApp(...args); }; } }; return router2; } function addRouterMethodAlias(router2) { Object.assign(router2, { push: (...args) => router2.navigate(...args), pushTab: (...args) => router2.switchTab(...args), replace: (...args) => router2.redirect(...args), replaceAll: (...args) => router2.reLaunch(...args), back: (options) => { router2.navigateBack({ ...options || {}, delta: (options == null ? void 0 : options.delta) || options }); } }); } function createRouter(options) { const router2 = createRouter$1({ platform: "app", ...options || {} }); addRouterMethodAlias(router2); const rawInstall = router2.install; router2.install = (app) => { rawInstall(app); app.config.globalProperties.$Router = router2; Object.defineProperty(app.config.globalProperties, "$Route", { enumerable: true, get() { return router2.currentRoute.value; } }); }; return router2; } function useRouter() { const router2 = useRouter$1(); addRouterMethodAlias(router2); return router2; } function defineMiddleware(name, handler, options) { const { router: router2 } = options || {}; router2.beforeEach((to, from, next) => { const middleware = to.meta.middleware || []; if (!middleware.includes(name)) { next(); } else { handler({ ...router2, beforeEach: (callback) => callback(to, from, next) }); } }); router2.afterEach((to, from) => { const middleware = to.meta.middleware || []; if (middleware.includes(name)) { handler({ ...router2, afterEach: (callback) => callback(to, from) }); } }); } const _imports_0$5 = "/static/images/logo.png"; const _sfc_main$1c = { __name: "index", props: { navLeftText: { type: String, default: "" }, navTitle: { type: String, default: "" }, navLeftArrow: { type: Boolean, default: true }, showNavBar: { type: Boolean, default: true } }, setup(__props, { expose: __expose }) { const { t: t2, locale } = useI18n(); const router2 = useRouter(); const orderStore = useOrderStore(); const rechargeStore = useRechargeStore(); const WebsocketData = useWebsocketDataStore(); const token = vue.ref(null); let contentPaddingBottom = vue.ref("50px"); contentPaddingBottom.value = "50px"; const props = __props; const userMoney = vue.ref(0); const formatMoney = (val) => { const num = Number(val); if (isNaN(num)) return "0.00"; if (num >= 1e5) { return (num / 1e4).toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 }) + t2("万"); } return num.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 }); }; const isShowTabbarRoute = vue.ref(false); const safeModalRef = vue.ref(null); const showSafeModal = vue.ref(false); const safeWord = vue.ref(""); const retryModalRef = vue.ref(null); const showRetryModal = vue.ref(false); const retryFailures = vue.ref([]); const isAutoAccept = vue.ref(uni.getStorageSync("autoAcceptOdds") !== false && uni.getStorageSync("autoAcceptOdds") !== "false"); const toggleAutoAccept = () => { isAutoAccept.value = !isAutoAccept.value; uni.setStorageSync("autoAcceptOdds", isAutoAccept.value); }; const slots = vue.useSlots(); const hasLeftSlot = !!slots.left; const hasTitleSlot = !!slots.title; const hasRightSlot = !!slots.right; const hassubNavRightSlot = !!slots.navBarRight; const background = vue.reactive({ backgroundColor: "#212121" }); vue.watch(() => WebsocketData.data, cartSocketHandler); vue.watch(() => WebsocketData.globalData, SocketHandler); const checkIsLocked = (item) => { if (!item) return true; if (Number(item.is_locked) === 1) return true; if (item.status !== void 0 && Number(item.status) !== 1) return true; if (!item.odds || item.odds === "-" || Number(item.odds) === 0) return true; if (item.state !== void 0) { const state = Number(item.state); if (state !== 0 && state !== 1) return true; } return false; }; const validOrders = vue.computed(() => { return orderStore.selectOrders.filter((item) => !checkIsLocked(item)); }); const validTotalOdds = vue.computed(() => { if (validOrders.value.length === 0) return 0; return validOrders.value.reduce((sum, item) => sum + (Number(item.odds) || 0), 0); }); const validTotalAmount = vue.computed(() => { if (validOrders.value.length === 0) return 0; return validOrders.value.reduce((sum, item) => sum + (Number(item.stake) || 0), 0); }); const validTotalStake = vue.computed(() => { return validOrders.value.reduce((sum, item) => sum + (Number(item.stake) || 0), 0); }); const batchStakeValue = vue.ref(uni.getStorageSync("batchStakeCache") || ""); const applyBatchStake = () => { let val = batchStakeValue.value; uni.setStorageSync("batchStakeCache", val); if (val === "") { validOrders.value.forEach((item) => { orderStore.updateStake(item.uniqueKey, ""); item.errorMsg = ""; }); return; } let numVal = Number(val); if (isNaN(numVal) || numVal <= 0) { return uni.showToast({ title: t2("请输入大于0的有效金额"), icon: "none" }); } validOrders.value.forEach((item) => { let itemVal = numVal; if (item.mininum !== void 0 && itemVal < Number(item.mininum)) { itemVal = Number(item.mininum); } if (item.maxinum !== void 0 && itemVal > Number(item.maxinum)) { itemVal = Number(item.maxinum); } orderStore.updateStake(item.uniqueKey, itemVal); item.errorMsg = ""; }); }; const openSheet = () => { orderStore.setSheetOpen(true); }; const closeSheet = () => { orderStore.setSheetOpen(false); }; const changeStake = (item, delta) => { if (checkIsLocked(item)) return; let val = Number(item.stake) || 0; val += delta; if (val < 0) val = 0; if (item.maxinum !== void 0 && val > Number(item.maxinum)) { val = Number(item.maxinum); } orderStore.updateStake(item.uniqueKey, val); item.errorMsg = ""; }; const onInputStake = (e, item) => { if (checkIsLocked(item)) return; orderStore.updateStake(item.uniqueKey, e.detail.value); item.errorMsg = ""; }; const topUp = () => { if (!uni.getStorageSync("token")) { uni.showModal({ title: t2("提示"), content: t2("您还未登录,是否前往登录?"), success: (res) => { if (res.confirm) { router2.push({ name: "login" }); } } }); return; } router2.push({ name: "topUp" }); }; const submitBet = () => { if (orderStore.selectOrders.length === 0) { return uni.$u.toast(t2("请选择投注单")); } if (validOrders.value.length === 0) { return uni.$u.toast(t2("暂无有效投注项,请移除锁定盘口或重新选择")); } for (let i = 0; i < validOrders.value.length; i++) { const item = validOrders.value[i]; const stake = Number(item.stake); if (!stake || stake <= 0) { return uni.showToast({ title: t2("请输入大于0的有效投注金额"), icon: "none" }); } if (item.mininum !== void 0 && stake < Number(item.mininum)) { return uni.showToast({ title: `${t2("最低投注限额为")} ${item.mininum}`, icon: "none" }); } if (item.maxinum !== void 0 && stake > Number(item.maxinum)) { return uni.showToast({ title: `${t2("最高投注限额为")} ${item.maxinum}`, icon: "none" }); } } if (validTotalStake.value > userMoney.value) { return uni.showToast({ title: t2("余额不足"), icon: "none" }); } safeWord.value = ""; confirmSubmitBet(); }; const executeSubmit = (ordersData, submittedKeys, isRetry = false) => { submitOrder({ data: ordersData, safe_word: safeWord.value, is_auto: isAutoAccept.value ? 1 : 0 }).then((res) => { var _a2, _b2, _c; if (res.code === 1) { const failures = ((_a2 = res.data) == null ? void 0 : _a2.failure) || []; const newOrders = []; orderStore.selectOrders.forEach((order) => { const isSubmitted = submittedKeys.includes(order.uniqueKey); if (isSubmitted) { const failInfo = failures.find( (f) => String(f.data_id) === String(order.data_id) && String(f.id) === String(order.marketId) && String(f.value) === String(order.optionValue) && String(f.handicap || "") === String(order.handicap || "") ); if (failInfo) { order.errorMsg = failInfo.msg || t2("投注失败"); if (failInfo.odd) order.odds = failInfo.odd; newOrders.push(order); } } else { newOrders.push(order); } }); orderStore.selectOrders = newOrders; orderStore.saveToStorage(); if (isRetry) { showRetryModal.value = false; } else { showSafeModal.value = false; } if (failures.length === 0) { uni.showToast({ title: t2("投注成功"), icon: "success" }); if (orderStore.selectOrders.length === 0) closeSheet(); } else { const successCount = ordersData.length - failures.length; if (successCount > 0) { uni.showToast({ title: `成功 ${successCount}单,失败 ${failures.length}单`, icon: "none", duration: 2500 }); } orderStore.setSheetOpen(true); retryFailures.value = failures; setTimeout(() => { showRetryModal.value = true; }, 500); } getData(); } else { uni.showToast({ title: res.msg || t2("投注失败"), icon: "none" }); if (isRetry) { (_b2 = retryModalRef.value) == null ? void 0 : _b2.clearLoading(); } else { (_c = safeModalRef.value) == null ? void 0 : _c.clearLoading(); } } }).catch((err) => { var _a2, _b2; if (isRetry) { (_a2 = retryModalRef.value) == null ? void 0 : _a2.clearLoading(); } else { (_b2 = safeModalRef.value) == null ? void 0 : _b2.clearLoading(); } }); }; const confirmSubmitBet = () => { uni.showModal({ title: t2("提示"), content: t2("确认提交吗?"), success: (res) => { if (res.confirm) { const submittedKeys = []; const ordersData = validOrders.value.map((item) => { submittedKeys.push(item.uniqueKey); const payload = { data_id: item.data_id, amount: item.stake, id: item.marketId, value: item.selection.submit_value, value_text: item.selection.value_text, odd: item.odds }; if (item.handicap !== null && item.handicap !== void 0 && item.handicap !== "") { payload.handicap = String(item.handicap); } return payload; }); executeSubmit(ordersData, submittedKeys, false); } } }); }; const confirmRetryBet = () => { var _a2; const submittedKeys = []; const validRetries = retryFailures.value.filter((f) => f.is_submit === 1); if (validRetries.length === 0) { showRetryModal.value = false; (_a2 = retryModalRef.value) == null ? void 0 : _a2.clearLoading(); return; } const ordersData = validRetries.map((f) => { let hdp = f.handicap !== null && f.handicap !== void 0 && f.handicap !== "" ? `_${f.handicap}` : ""; submittedKeys.push(`${f.data_id}_${f.id}_${f.value}${hdp}`); const payload = { data_id: f.data_id, amount: f.amount, id: f.id, value: f.value, value_text: f.value_text, odd: f.odd }; if (f.handicap !== null && f.handicap !== void 0 && f.handicap !== "") { payload.handicap = String(f.handicap); } return payload; }); executeSubmit(ordersData, submittedKeys, true); }; const onClickLeft = () => { if (!hasLeftSlot && !isShowTabbarRoute.value) { uni.navigateBack({ delta: 1 }); } }; function goTopUp() { router2.push({ name: "topUp" }); } function goToHome() { router2.pushTab({ name: "index" }); } function getData() { getBalance().then((res) => { userMoney.value = res.data.money; }).catch((err) => { }); } function SocketHandler(data) { var _a2; const res = typeof data === "string" ? JSON.parse(data) : data; if (res.type === "order_failure") { const failData = (_a2 = res.message) == null ? void 0 : _a2.data; if (!failData) return; let contentStr = t2(failData.msg); if (failData.sport_info) { const home = locale.value === "zh" ? failData.sport_info.home_team || failData.sport_info.home_team_en : failData.sport_info.home_team_en; const guest = locale.value === "zh" ? failData.sport_info.guest_team || failData.sport_info.home_team_en : failData.sport_info.guest_team_en; const handicapStr = failData.handicap ? ` [${failData.handicap}]` : ""; contentStr = `${home} vs ${guest} ${locale.value === "zh" ? failData.value_text || failData.value : failData.value}${handicapStr} @${failData.odd} ${t2("原因")}: ${t2(failData.msg)}`; } uni.showModal({ title: t2("注单被拒"), content: contentStr, showCancel: false, confirmText: t2("确定"), confirmColor: "#f8b932" }); let hdp = failData.handicap !== null && failData.handicap !== void 0 && failData.handicap !== "" ? `_${failData.handicap}` : ""; const uniqueKey = `${failData.data_id}_${failData.id}_${failData.value}${hdp}`; const existingIndex = orderStore.selectOrders.findIndex((item) => item.uniqueKey === uniqueKey); if (existingIndex > -1) { orderStore.selectOrders[existingIndex].errorMsg = failData.msg; orderStore.selectOrders[existingIndex].odds = failData.odd; if (failData.amount) { orderStore.selectOrders[existingIndex].stake = failData.amount; } } else { const sportInfo = failData.sport_info || {}; let betType = failData.id; let betTypeEn = failData.id; let betTypeName = failData.value_text || failData.value; let betTypeNameEn = failData.value; if (sportInfo.odds && Array.isArray(sportInfo.odds)) { const market = sportInfo.odds.find((m) => String(m.id) === String(failData.id)); if (market) { betType = market.name; betTypeEn = market.name; const option = market.values.find((v) => String(v.value) === String(failData.value)); if (option) { betTypeName = option.value_text || option.value; betTypeNameEn = option.value; } } } const newItem = { uniqueKey, data_id: failData.data_id, marketId: failData.id, optionValue: failData.value, handicap: failData.handicap, handicap_text: failData.handicap, odds: failData.odd, stake: failData.amount, errorMsg: failData.msg, homeTeam: sportInfo.home_team, home_team_en: sportInfo.home_team_en, guestTeam: sportInfo.guest_team, guest_team_en: sportInfo.guest_team_en, league: sportInfo.league, league_en: sportInfo.league_en, score: sportInfo.score, is_locked: sportInfo.is_locked || 0, state: sportInfo.state, status: sportInfo.status, betType, betTypeEn, betTypeName, betTypeNameEn, selection: { submit_value: failData.value } }; orderStore.selectOrders.push(newItem); } if (orderStore.saveToStorage) { orderStore.saveToStorage(); } orderStore.setSheetOpen(true); } if (res.type === "rgcz") { rechargeStore.showModal(res.message); } } function cartSocketHandler(data) { try { const res = typeof data === "string" ? JSON.parse(data) : data; if (res.type === "sport_list" && Array.isArray(res.message)) { if (orderStore.selectOrders.length === 0) return; res.message.forEach((newMatch) => { orderStore.selectOrders.forEach((cartItem) => { if (String(cartItem.data_id) === String(newMatch.data_id)) { cartItem.score = newMatch.score; cartItem.state = newMatch.state; cartItem.status = newMatch.status; cartItem.is_roll = newMatch.is_roll; cartItem.is_locked = newMatch.is_locked; let parsedOdds = newMatch.odds; if (typeof parsedOdds === "string") { try { parsedOdds = JSON.parse(parsedOdds); } catch (e) { parsedOdds = []; } } if (parsedOdds && Array.isArray(parsedOdds) && parsedOdds.length > 0) { const targetMarket = parsedOdds.find((m) => String(m.id) === String(cartItem.marketId)); if (targetMarket && targetMarket.values) { const targetOption = targetMarket.values.find((opt) => { const isValueMatch = String(opt.value) === String(cartItem.optionValue); const isHandicapMatch = cartItem.handicap !== null && cartItem.handicap !== void 0 && cartItem.handicap !== "" ? String(opt.handicap) === String(cartItem.handicap) : true; return isValueMatch && isHandicapMatch; }); if (targetOption) { cartItem.odds = targetOption.odd; if (targetOption.suspended || !targetOption.odd || targetOption.odd === "-" || Number(targetOption.odd) === 0) { cartItem.is_locked = 1; } } else { cartItem.is_locked = 1; } } else { cartItem.is_locked = 1; } } } }); }); } } catch (error) { formatAppLog("error", "at components/PageContainer/index.vue:806", "Cart WS Sync Error:", error); } } vue.onMounted(() => { const pages = getCurrentPages(); if (pages.length > 0) { const currentPage = pages[pages.length - 1]; const pageRoute = currentPage.route || ""; const showTabbarRoutes = [ "pages/Tabbar/Home/index", "pages/Tabbar/RollingBall/index", "pages/Tabbar/SportsBetting/index", "pages/Tabbar/Entertainment/index", "pages/Tabbar/WorldCup/index", "pages/Tabbar/My/index", "pages/Tabbar/BettingHistory/index" ]; isShowTabbarRoute.value = showTabbarRoutes.some((route2) => pageRoute.includes(route2)); } }); onShow(() => { token.value = uni.getStorageSync("token"); batchStakeValue.value = uni.getStorageSync("batchStakeCache") || ""; isAutoAccept.value = uni.getStorageSync("autoAcceptOdds") !== false && uni.getStorageSync("autoAcceptOdds") !== "false"; if (token.value) { getData(); } }); __expose({ getData }); const __returned__ = { t: t2, locale, router: router2, orderStore, rechargeStore, WebsocketData, token, get contentPaddingBottom() { return contentPaddingBottom; }, set contentPaddingBottom(v) { contentPaddingBottom = v; }, props, userMoney, formatMoney, isShowTabbarRoute, safeModalRef, showSafeModal, safeWord, retryModalRef, showRetryModal, retryFailures, isAutoAccept, toggleAutoAccept, slots, hasLeftSlot, hasTitleSlot, hasRightSlot, hassubNavRightSlot, background, checkIsLocked, validOrders, validTotalOdds, validTotalAmount, validTotalStake, batchStakeValue, applyBatchStake, openSheet, closeSheet, changeStake, onInputStake, topUp, submitBet, executeSubmit, confirmSubmitBet, confirmRetryBet, onClickLeft, goTopUp, goToHome, getData, SocketHandler, cartSocketHandler, ref: vue.ref, useSlots: vue.useSlots, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, reactive: vue.reactive, computed: vue.computed, watch: vue.watch, get useI18n() { return useI18n; }, get onShow() { return onShow; }, get useOrderStore() { return useOrderStore; }, get getBalance() { return getBalance; }, get submitOrder() { return submitOrder; }, get useWebsocketDataStore() { return useWebsocketDataStore; }, SystemNoticeModal, RechargeModal: RechargeModal$1, AppDownloadBanner, get useRechargeStore() { return useRechargeStore; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_button = __unplugin_components_2$1; const _component_selectLang = selectLang; const _component_u_icon = __unplugin_components_0$5; const _component_u_navbar = __unplugin_components_3$1; const _component_u_tag = __unplugin_components_2$2; const _component_u_popup = __unplugin_components_2$3; const _component_u_input = __unplugin_components_3$2; const _component_u_modal = __unplugin_components_4$3; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["global-page-container", [$setup.isShowTabbarRoute ? "global-page-container-tabbar" : "global-page-container-children"]]) }, [ $props.showNavBar ? (vue.openBlock(), vue.createBlock(_component_u_navbar, { key: 0, background: $setup.background, "border-bottom": false, "custom-back": $setup.onClickLeft, "back-icon-name": "", "back-text": "", title: "", onTouchmove: _cache[4] || (_cache[4] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, vue.createSlots({ left: vue.withCtx(() => [ vue.createElementVNode("view", { class: "logo-container", onClick: vue.withModifiers($setup.goToHome, ["stop"]) }, [ vue.createElementVNode("image", { src: _imports_0$5, mode: "widthFix", style: { "width": "100%", "height": "auto" } }) ]) ]), right: vue.withCtx(() => [ $setup.token ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "navbar-right" }, [ vue.createVNode(_component_u_button, { customStyle: { height: "32px", padding: "0 4px", marginRight: "10px", fontSize: "14px" }, size: "small", type: "primary", onClick: $setup.goTopUp }, { default: vue.withCtx(() => [ vue.createElementVNode( "text", { style: { "color": "#000", "margin": "0 4px", "font-weight": "bold" } }, vue.toDisplayString($setup.formatMoney($setup.userMoney)) + " " + vue.toDisplayString(_ctx.$currency), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createElementVNode("view", { class: "nav-btn" }, [ vue.createVNode(_component_selectLang, { isBall: true }) ]), vue.createElementVNode("view", { class: "nav-btn ml-2", onClick: _cache[0] || (_cache[0] = ($event) => $setup.router.pushTab({ name: "My" })) }, [ vue.createVNode(_component_u_icon, { color: "#fff", name: "account-fill" }) ]), vue.createElementVNode("view", { class: "nav-btn ml-2", onClick: _cache[1] || (_cache[1] = ($event) => $setup.router.push({ name: "customerService" })) }, [ vue.createVNode(_component_u_icon, { color: "#fff", name: "kefu-ermai" }) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, style: { "display": "flex", "align-items": "center", "gap": "10px" } }, [ vue.createElementVNode("view", { class: "nav-btn" }, [ vue.createVNode(_component_selectLang, { isBall: true }) ]), vue.createElementVNode( "view", { style: { "color": "#ccc", "text-decoration": "underline", "margin-right": "6px" }, onClick: _cache[2] || (_cache[2] = ($event) => $setup.router.push({ name: "register" })) }, vue.toDisplayString($setup.t("注册")), 1 /* TEXT */ ), vue.createElementVNode( "view", { style: { "color": "#ccc", "text-decoration": "underline", "margin-right": "16px" }, onClick: _cache[3] || (_cache[3] = ($event) => $setup.router.push({ name: "login" })) }, vue.toDisplayString($setup.t("登录")), 1 /* TEXT */ ) ])) ]), _: 2 /* DYNAMIC */ }, [ $setup.hasLeftSlot ? { name: "left", fn: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "left", {}, void 0, true) ]), key: "0" } : void 0, $setup.hasTitleSlot ? { name: "center", fn: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "title", {}, void 0, true) ]), key: "1" } : void 0, $setup.hasRightSlot ? { name: "right", fn: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ]), key: "2" } : void 0 ]), 1032, ["background"])) : vue.createCommentVNode("v-if", true), $setup.isShowTabbarRoute ? (vue.openBlock(), vue.createBlock($setup["AppDownloadBanner"], { key: 1 })) : vue.createCommentVNode("v-if", true), $props.showNavBar && !$setup.isShowTabbarRoute ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "sub-navbar", onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, [ vue.createElementVNode("view", { class: "sub-navbar-left" }, [ vue.createElementVNode("view", { class: "sub-navbar-arrow-left nav-btn", onClick: $setup.onClickLeft }, [ vue.createVNode(_component_u_icon, { color: "#f1f1f1", name: "arrow-left", size: "36" }) ]), vue.createElementVNode( "span", null, vue.toDisplayString($props.navTitle ? _ctx.$t($props.navTitle) : ""), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "sub-navbar-right" }, [ vue.renderSlot(_ctx.$slots, "navBarRight", {}, void 0, true) ]) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true), !$setup.isShowTabbarRoute ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, style: { "height": "50px" }, onTouchmove: _cache[6] || (_cache[6] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, null, 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass([[$setup.isShowTabbarRoute ? "tabbar-content-box" : ""], "content-box"]), style: vue.normalizeStyle({ paddingBottom: $setup.isShowTabbarRoute ? $setup.contentPaddingBottom : "" }) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ), $setup.isShowTabbarRoute && _ctx.$Route.path !== "/pages/Tabbar/Entertainment/index" && _ctx.$Route.path !== "/pages/Tabbar/My/index" || _ctx.$Route.path === "/pages/common/sportDetail/index" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4, onTouchmove: _cache[12] || (_cache[12] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, [ !$setup.orderStore.isOpen ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["sticky-header-bar", [_ctx.$Route.path === "/pages/common/sportDetail/index" ? "sportDetail-cart-bar" : ""]]), onClick: $setup.openSheet }, [ vue.createElementVNode("view", { class: "betting-sheet-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.orderStore.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.orderStore.selectedCount), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("投注单")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { color: "#666", name: "arrow-up" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right" }, [ vue.createElementVNode("view", { class: "settings-btn" }, [ vue.createVNode(_component_u_button, { size: "mini", type: "primary", onClick: $setup.openSheet }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("投注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_popup, { mask: true, "mask-close-able": true, modelValue: $setup.orderStore.isOpen, "safe-area-inset-bottom": true, "z-index": 990, "border-radius": "24", height: "70%", mode: "bottom", onClose: $setup.closeSheet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-betting-sheet-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header border-bottom", onClick: $setup.closeSheet }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.orderStore.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.orderStore.selectedCount), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("投注单")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { color: "#666", name: "arrow-down" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right" }, [ vue.createElementVNode("view", { class: "settings-btn" }, [ vue.createElementVNode( "text", { class: "tmc", style: { "font-size": "12px", "margin-right": "16px" }, onClick: _cache[7] || (_cache[7] = vue.withModifiers((...args) => $setup.orderStore.clearAllOrders && $setup.orderStore.clearAllOrders(...args), ["stop"])) }, vue.toDisplayString($setup.t("清空")), 1 /* TEXT */ ) ]) ]) ]), $setup.orderStore.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "batch-stake-box" }, [ vue.createElementVNode( "text", { class: "batch-label" }, vue.toDisplayString($setup.t("批量设置金额")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "batch-input-wrapper" }, [ vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.batchStakeValue = $event), class: "batch-input", placeholder: $setup.t("请输入金额"), type: "number" }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.batchStakeValue] ]) ]), vue.createVNode(_component_u_button, { size: "mini", type: "primary", style: { "margin-left": "10px" }, onClick: $setup.applyBatchStake }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("确定")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : vue.createCommentVNode("v-if", true) ]), $setup.orderStore.selectedCount === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "empty-sheet" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("暂无投注项")), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "bet-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.orderStore.selectOrders, (item, index) => { return vue.openBlock(), vue.createElementBlock( "view", { key: index, class: vue.normalizeClass([{ "is-locked": $setup.checkIsLocked(item) }, "bet-item"]) }, [ $setup.checkIsLocked(item) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "lock-overlay" }, [ vue.createVNode(_component_u_icon, { color: "#fff", name: "lock-fill", size: "32" }), vue.createElementVNode( "text", { class: "lock-text" }, vue.toDisplayString($setup.t("盘口已失效或关闭")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), item.errorMsg ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "fail-msg-box" }, [ vue.createVNode(_component_u_icon, { color: "#fa3534", name: "info-circle-fill", size: "28" }), vue.createElementVNode( "text", { class: "fail-text" }, vue.toDisplayString($setup.t(item.errorMsg)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "item-header" }, [ vue.createElementVNode("view", { class: "team-names", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u_tag, { size: "mini", type: "success", style: { "margin-right": "4px" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("主")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? item.homeTeam : item.home_team_en) + " - " + vue.toDisplayString($setup.locale === "zh" ? item.guestTeam : item.guest_team_en), 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "error", style: { "margin-left": "4px" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("客")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), $setup.checkIsLocked(item) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "close-btn", onClick: vue.withModifiers(($event) => $setup.orderStore.removeOrderItem(item.uniqueKey), ["stop"]) }, [ vue.createVNode(_component_u_icon, { color: "#666", name: "close", size: "16" }) ], 8, ["onClick"])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, style: { "margin-right": "8px" }, onClick: vue.withModifiers(($event) => $setup.orderStore.removeOrderItem(item.uniqueKey), ["stop"]) }, [ vue.createVNode(_component_u_icon, { color: "#666", name: "close", size: "16" }) ], 8, ["onClick"])) ]), vue.createElementVNode("view", { class: "item-info" }, [ vue.createElementVNode("view", { class: "bet-type" }, [ vue.createElementVNode("text", { class: "type-name" }, [ vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? item.betType : item.betTypeEn) + ": " + vue.toDisplayString($setup.locale === "zh" ? item.betTypeName : item.betTypeNameEn) + " ", 1 /* TEXT */ ), item.handicap_text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "margin-left": "4px", "color": "#f8b932" } }, "[" + vue.toDisplayString(item.handicap_text) + "]", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "odds-box" }, [ vue.createElementVNode( "text", { class: "odds-val" }, vue.toDisplayString(item.odds), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "league-info" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.locale === "zh" ? item.league : item.league_en), 1 /* TEXT */ ), item.score && item.score !== "-" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "live-score" }, vue.toDisplayString($setup.t("当前比分")) + ": " + vue.toDisplayString(item.score), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: vue.normalizeClass([{ "error-border": item.errorMsg || !$setup.checkIsLocked(item) && item.stake !== "" && item.stake !== void 0 && Number(item.stake) <= 0 || !$setup.checkIsLocked(item) && Number(item.stake) > Number($setup.userMoney) || !$setup.checkIsLocked(item) && item.mininum !== void 0 && item.stake !== "" && item.stake !== void 0 && Number(item.stake) < Number(item.mininum) || !$setup.checkIsLocked(item) && item.maxinum !== void 0 && Number(item.stake) > Number(item.maxinum) }, "stake-input-box"]) }, [ vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeStake(item, -10), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "minus", size: "24" }) ], 8, ["onClick"]), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": ($event) => item.stake = $event, disabled: $setup.checkIsLocked(item), class: "stake-input", placeholder: $setup.t("本金"), type: "number", onInput: (e) => $setup.onInputStake(e, item) }, null, 40, ["onUpdate:modelValue", "disabled", "placeholder", "onInput"]), [ [vue.vModelText, item.stake] ]), vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeStake(item, 10), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "plus", size: "24" }) ], 8, ["onClick"]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "item-footer" }, [ item.mininum !== void 0 && item.maxinum !== void 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "font-size": "12px", "color": "#999" } }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("单注限额")), 1 /* TEXT */ ), vue.createElementVNode( "text", null, vue.toDisplayString(item.mininum) + " ~ " + vue.toDisplayString(item.maxinum), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), !$setup.checkIsLocked(item) && item.stake !== "" && item.stake !== void 0 && Number(item.stake) <= 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "err-msg" }, vue.toDisplayString($setup.t("金额不能小于等于0")), 1 /* TEXT */ )) : !$setup.checkIsLocked(item) && item.mininum !== void 0 && item.stake !== "" && item.stake !== void 0 && Number(item.stake) < Number(item.mininum) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "err-msg" }, vue.toDisplayString($setup.t("单注最低限制为")) + " " + vue.toDisplayString(item.mininum), 1 /* TEXT */ )) : !$setup.checkIsLocked(item) && item.maxinum !== void 0 && Number(item.stake) > Number(item.maxinum) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "err-msg" }, vue.toDisplayString($setup.t("单注最高限制为")) + " " + vue.toDisplayString(item.maxinum), 1 /* TEXT */ )) : !$setup.checkIsLocked(item) && Number(item.stake) > Number($setup.userMoney) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4, class: "err-msg" }, vue.toDisplayString($setup.t("投注额超过您的余额")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "potential-win" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("潜在赢利")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "win-amount" }, vue.toDisplayString((Number(item.stake) * Number(item.odds)).toFixed(2)) + " " + vue.toDisplayString(_ctx.$currency), 1 /* TEXT */ ) ])) ]) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ])), vue.createElementVNode( "view", { class: vue.normalizeClass(["sheet-action-bar", [_ctx.$Route.path === "/pages/common/sportDetail/index" ? "isDetail" : ""]]) }, [ $setup.orderStore.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "total-odds-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("总金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString($setup.validTotalAmount.toFixed(2)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "auto-accept-box", onClick: $setup.toggleAutoAccept }, [ vue.createVNode(_component_u_icon, { name: $setup.isAutoAccept ? "checkmark-circle-fill" : "checkmark-circle", color: $setup.isAutoAccept ? "#ffbc00" : "#c0c4cc", size: "36" }, null, 8, ["name", "color"]), vue.createElementVNode( "text", { class: "auto-accept-text" }, vue.toDisplayString($setup.t("自动接受更好的赔率")), 1 /* TEXT */ ) ]), $setup.validTotalStake > $setup.userMoney ? (vue.openBlock(), vue.createBlock(_component_u_button, { key: 1, type: "primary", onClick: $setup.topUp }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("存款")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ })) : (vue.openBlock(), vue.createBlock(_component_u_button, { key: 2, type: "primary", onClick: $setup.submitBet }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("投注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ })) ], 2 /* CLASS */ ), vue.createElementVNode("view", { style: { "height": "120px" } }) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_u_modal, { ref: "safeModalRef", modelValue: $setup.showSafeModal, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.showSafeModal = $event), "async-close": true, "cancel-text": $setup.t("取消"), "confirm-text": $setup.t("确定投注"), "show-cancel-button": true, title: $setup.t("安全验证"), "confirm-color": "#f8b932", onConfirm: $setup.confirmSubmitBet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "safe-modal-content" }, [ vue.createElementVNode( "text", { class: "safe-tips" }, vue.toDisplayString($setup.t("为保障您的资金安全,请输入资金密码")), 1 /* TEXT */ ), vue.createVNode(_component_u_input, { modelValue: $setup.safeWord, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.safeWord = $event), border: true, clearable: true, placeholder: $setup.t("请输入资金密码"), "border-color": "#e4e7ed", type: "password" }, null, 8, ["modelValue", "placeholder"]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "cancel-text", "confirm-text", "title"]), vue.createVNode(_component_u_modal, { ref: "retryModalRef", modelValue: $setup.showRetryModal, "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $setup.showRetryModal = $event), "async-close": true, title: $setup.t("提示"), "show-cancel-button": true, "confirm-text": $setup.t("确定"), "cancel-text": $setup.t("取消"), "confirm-color": "#f8b932", onConfirm: $setup.confirmRetryBet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "retry-modal-content" }, [ vue.createElementVNode( "text", { class: "retry-tips" }, vue.toDisplayString($setup.t("以下注单提交失败,是否重新提交?")), 1 /* TEXT */ ), vue.createElementVNode("scroll-view", { "scroll-y": "", class: "retry-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.retryFailures, (err, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "retry-item", key: idx }, [ err.is_submit !== 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "retry-lock-overlay" }, [ vue.createElementVNode( "text", { class: "retry-lock-text" }, vue.toDisplayString($setup.t("不可重新提交")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("text", { class: "err-val" }, [ vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? err.value_text : err.value) + " ", 1 /* TEXT */ ), err.handicap ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, "[" + vue.toDisplayString(err.handicap) + "]", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " @" + vue.toDisplayString(err.odd), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "err-msg" }, vue.toDisplayString($setup.t(err.msg)), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "title", "confirm-text", "cancel-text"]) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true), vue.createVNode($setup["RechargeModal"]), vue.createVNode($setup["SystemNoticeModal"]) ], 2 /* CLASS */ ); } const PageContainer = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-633a219d"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/components/PageContainer/index.vue"]]); const ImageProps = { ...baseProps, /** 图片地址 */ src: { type: String, default: "" }, /** 裁剪模式 */ mode: { type: String, default: "aspectFill" }, /** 宽度,单位任意,如果为数值,则为rpx单位(默认100%) */ width: { type: [String, Number], default: "100%" }, /** 高度,单位任意,如果为数值,则为rpx单位(默认 auto) */ height: { type: [String, Number], default: "auto" }, /** 图片形状,circle-圆形,square-方形(默认square) */ shape: { type: String, default: "square" }, /** 圆角值,单位任意,如果为数值,则为rpx单位(默认 0) */ borderRadius: { type: [String, Number], default: 0 }, /** 是否懒加载,仅微信小程序、App、百度小程序、字节跳动小程序有效(默认 true) */ lazyLoad: { type: Boolean, default: true }, /** 是否开启长按图片显示识别小程序码菜单,仅微信小程序有效(默认 true) */ showMenuByLongpress: { type: Boolean, default: true }, /** 加载中的图标,或者小图片(默认 photo) */ loadingIcon: { type: String, default: "photo" }, /** 加载失败的图标,或者小图片(默认 error-circle) */ errorIcon: { type: String, default: "error-circle" }, /** 是否显示加载中的图标或者自定义的slot(默认 true) */ showLoading: { type: Boolean, default: true }, /** 是否显示加载错误的图标或者自定义的slot(默认 true) */ showError: { type: Boolean, default: true }, /** 是否需要淡入效果(默认 true) */ fade: { type: Boolean, default: true }, /** 只支持网络资源,只对微信小程序有效(默认 false) */ webp: { type: Boolean, default: false }, /** 搭配fade参数的过渡时间,单位ms(默认 500) */ duration: { type: [String, Number], default: 500 }, /** 背景颜色,用于深色页面加载图片时,为了和背景色融合(默认 var(--u-bg-color)) */ bgColor: { type: String, default: "var(--u-bg-color)" }, /** 使用插槽名称对象,用于自定义插槽,默认 undefined,当动态切换slot隐藏时,需要使用useSlots使用,兼容头条小程序 */ useSlots: { type: Object, default: void 0 } }; const __default__$b = { name: "u-image", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({ ...__default__$b, props: ImageProps, emits: ["click", "error", "load"], setup(__props, { expose: __expose, emit: __emit }) { const emit = __emit; const props = __props; const isError = vue.ref(false); const loading = vue.ref(true); const opacity = vue.ref(1); const durationTime = vue.ref(props.duration); const backgroundStyle = vue.ref({}); vue.watch( () => props.src, (n) => { if (!n) { isError.value = true; loading.value = false; } else { isError.value = false; loading.value = true; } }, { immediate: true } ); const wrapStyle = vue.computed(() => { let style = {}; style.width = $u.addUnit(props.width); style.height = $u.addUnit(props.height); style.borderRadius = props.shape === "circle" ? "50%" : $u.addUnit(props.borderRadius); style.overflow = Number(props.borderRadius) > 0 ? "hidden" : "visible"; if (props.fade) { style.opacity = opacity.value; style.transition = `opacity ${Number(durationTime.value) / 1e3}s ease-in-out`; } return style; }); function onClick() { emit("click"); } function onErrorHandler(err) { loading.value = false; isError.value = true; emit("error", err); } function onLoadHandler() { loading.value = false; isError.value = false; emit("load"); if (!props.fade) return removeBgColor(); opacity.value = 0; durationTime.value = 0; setTimeout(() => { durationTime.value = props.duration; opacity.value = 1; setTimeout(() => { removeBgColor(); }, Number(durationTime.value)); }, 50); } function removeBgColor() { backgroundStyle.value = { backgroundColor: "transparent" }; } function changeStatus(status) { if (status === "loading") { loading.value = true; isError.value = false; } else if (status === "error") { loading.value = false; isError.value = true; } else { loading.value = false; isError.value = false; } } const $slots = vue.useSlots(); function hasSlot(name) { return props.useSlots ? !!$slots[name] && props.useSlots[name] : !!$slots[name]; } __expose({ changeStatus }); const __returned__ = { emit, props, isError, loading, opacity, durationTime, backgroundStyle, wrapStyle, onClick, onErrorHandler, onLoadHandler, removeBgColor, changeStatus, $slots, hasSlot, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-image", _ctx.customClass]), onClick: $setup.onClick, style: vue.normalizeStyle($setup.$u.toStyle($setup.wrapStyle, $setup.backgroundStyle, _ctx.customStyle)) }, [ !$setup.isError ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _ctx.src, mode: _ctx.mode, onError: $setup.onErrorHandler, onLoad: $setup.onLoadHandler, "lazy-load": _ctx.lazyLoad, class: "u-image__image", "show-menu-by-longpress": _ctx.showMenuByLongpress, style: vue.normalizeStyle({ borderRadius: _ctx.shape === "circle" ? "50%" : $setup.$u.addUnit(_ctx.borderRadius) }) }, null, 44, ["src", "mode", "lazy-load", "show-menu-by-longpress"])) : vue.createCommentVNode("v-if", true), _ctx.showLoading && $setup.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "u-image__loading", style: vue.normalizeStyle({ borderRadius: _ctx.shape === "circle" ? "50%" : $setup.$u.addUnit(_ctx.borderRadius), backgroundColor: _ctx.bgColor }) }, [ $setup.hasSlot("loading") ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 1, name: _ctx.loadingIcon, width: _ctx.width, height: _ctx.height }, null, 8, ["name", "width", "height"])) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.showError && $setup.isError && !$setup.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "u-image__error", style: vue.normalizeStyle({ borderRadius: _ctx.shape === "circle" ? "50%" : $setup.$u.addUnit(_ctx.borderRadius) }) }, [ $setup.hasSlot("error") ? vue.renderSlot(_ctx.$slots, "error", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 1, name: _ctx.errorIcon, width: _ctx.width, height: _ctx.height }, null, 8, ["name", "width", "height"])) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-cb47dfc7"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-image/u-image.vue"]]); const skeleton = { loading: true, animate: true, rows: 0, rowsWidth: "100%", rowsHeight: 18, title: true, titleWidth: "50%", titleHeight: 18, avatar: false, avatarSize: 32, avatarShape: "circle" }; const SkeletonProps = { ...baseProps, // 是否展示骨架组件 loading: { type: Boolean, default: skeleton.loading }, // 是否开启动画效果 animate: { type: Boolean, default: skeleton.animate }, // 段落占位图行数 rows: { type: [String, Number], default: skeleton.rows }, // 段落占位图的宽度 rowsWidth: { type: [String, Number, Array], default: skeleton.rowsWidth }, // 段落占位图的高度 rowsHeight: { type: [String, Number, Array], default: skeleton.rowsHeight }, // 是否展示标题占位图 title: { type: Boolean, default: skeleton.title }, // 段落标题的宽度 titleWidth: { type: [String, Number], default: skeleton.titleWidth }, // 段落标题的高度 titleHeight: { type: [String, Number], default: skeleton.titleHeight }, // 是否展示头像占位图 avatar: { type: Boolean, default: skeleton.avatar }, // 头像占位图大小 avatarSize: { type: [String, Number], default: skeleton.avatarSize }, // 头像占位图的形状,circle-圆形,square-方形 avatarShape: { type: String, default: skeleton.avatarShape } }; const _sfc_main$1a = /* @__PURE__ */ vue.defineComponent({ __name: "u-skeleton", props: SkeletonProps, setup(__props, { expose: __expose }) { __expose(); const props = __props; const instance = vue.getCurrentInstance(); const width = vue.ref(0); const skeletonRef = vue.ref(null); const contentRef = vue.ref(null); vue.watch( () => [props.loading], () => { getComponentWidth(); } ); const rowsArray = vue.computed(() => { if (/%$/.test(props.rowsHeight)) { console.error("rowsHeight参数不支持百分比单位"); } const resultRows = []; const rowsCount = Number(props.rows) || 0; for (let i = 0; i < rowsCount; i++) { let item = {}; const rowWidth = $u.test.array(props.rowsWidth) ? props.rowsWidth[i] || (i === rowsCount - 1 ? "70%" : "100%") : i === rowsCount - 1 ? "70%" : props.rowsWidth; const rowHeight = $u.test.array(props.rowsHeight) ? props.rowsHeight[i] || "18px" : props.rowsHeight; item.marginTop = !props.title && i === 0 ? 0 : props.title && i === 0 ? "20px" : "12px"; if (/%$/.test(rowWidth)) { item.width = $u.addUnit(width.value * parseInt(String(rowWidth)) / 100, "px"); } else { item.width = $u.addUnit(rowWidth, "px"); } item.height = $u.addUnit(rowHeight, "px"); resultRows.push(item); } return resultRows; }); const uTitleWidth = vue.computed(() => { let tWidth = 0; if (/%$/.test(props.titleWidth)) { tWidth = $u.addUnit(width.value * parseInt(String(props.titleWidth)) / 100, "px"); } else { tWidth = $u.addUnit(props.titleWidth, "px"); } return $u.addUnit(tWidth, "px"); }); function init() { getComponentWidth(); } async function setNvueAnimation() { } async function getComponentWidth() { await $u.sleep(20); $u.getRect(".u-skeleton__wrapper__content", instance).then((res) => { width.value = res.width; }); } vue.onMounted(() => { init(); }); const __returned__ = { props, instance, width, skeletonRef, contentRef, rowsArray, uTitleWidth, init, setNvueAnimation, getComponentWidth, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-skeleton", _ctx.customClass]), style: vue.normalizeStyle($setup.$u.toStyle(_ctx.customStyle)) }, [ _ctx.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-skeleton__wrapper", ref: "skeletonRef", style: { "display": "flex", "flex-direction": "row" } }, [ _ctx.avatar ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-skeleton__wrapper__avatar", [`u-skeleton__wrapper__avatar--${_ctx.avatarShape}`, _ctx.animate && "animate"]]), style: vue.normalizeStyle({ height: $setup.$u.addUnit(_ctx.avatarSize, "px"), width: $setup.$u.addUnit(_ctx.avatarSize, "px") }) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-skeleton__wrapper__content", ref: "contentRef", style: { "flex": "1" } }, [ _ctx.title ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-skeleton__wrapper__content__title", [_ctx.animate && "animate"]]), style: vue.normalizeStyle({ width: $setup.uTitleWidth, height: $setup.$u.addUnit(_ctx.titleHeight, "px") }) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.rowsArray, (item, index) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-skeleton__wrapper__content__rows", [_ctx.animate && "animate"]]), key: index, style: vue.normalizeStyle({ width: item.width, height: item.height, marginTop: item.marginTop }) }, null, 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ) ], 512 /* NEED_PATCH */ )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-31db018b"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-skeleton/u-skeleton.vue"]]); const zStatic = { base64Arrow: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAD1BMVEVHcExRUVFMTExRUVFRUVE9CdWsAAAABHRSTlMAjjrY9ZnUjwAAAQFJREFUWMPt2MsNgzAMgGEEE1B1gKJmAIRYoCH7z9RCXrabh33iYktcIv35EEg5ZBh07pvxJU6MFSPOSRnjnBUjUsaciRUjMsb4xIoRCWNiYsUInzE5sWKEyxiYWDbyefqHx1zIeiYTk7mQYziTYecxHvEJjwmIT3hMQELCYSISEg4TkZj0mYTEpM8kJCU9JiMp6TEZyUmbAUhO2gxAQNJiIAKSFgMRmNQZhMCkziAEJTUGIyipMRjBSZkhCE7KDEFIUmTeGCHJxWz0zXaE0GTCG8ZFtEaS347r/1fe11YyHYVfubxayfjoHmc0YYwmmmiiiSaaaKLJ7ckyz5ve+dw3Xw2emdwm9xSbAAAAAElFTkSuQmCC", base64ArrowWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEVHcEz///////////////////+IGTx/AAAABnRSTlMA/dAkXZOhASU/AAABYElEQVRYw+2YwXLCIBCGsdAHWGbyAKZ4zxi9O017rxLf/1UaWFAgA1m8dcpedNSPf/l/Vh0Ya/Wn6hN0JcGvoCqRM4C8VBFiDwBqqNuJKV0rAnCgy3AUqZE57x0iqTL8Br4U3WBf/YWaIlTKfAcELU/h9w72CSVPa3C3OCDvhpHbRp/s2vq4fHhCeiCl2A3m4Qd71DQR257mFBlMcTlbFnFWzNtHxewYEfSiaLS4el8d8nyhmKJd1CF4eOS0keLMAuSxubLBIeIGQW8YHCFFo7EH9+YDcQt9FMZEswTheaNxTHwHT8SZorJjMrEVwo4Zo0U8HSEyZvJMOg4RjnmmRr8nDYeIz3OMkbfE/QhBo+U9RnZJxjGCRh/WKmHEMWLNkfPKsGh/CWJk1JjG0kcuJggTt34VDP8aWAFhp4nybVb5+9qQhjSkIQ1pSEMa8k+Q5U9rV3dF8MpFBK+/7miVq1/HZ2qmo9D+pAAAAABJRU5ErkJggg==", base64Flower: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAKlBMVEVHcEzDw8Ovr6+pqamUlJTCwsKenp61tbWxsbGysrLNzc2bm5u5ubmjo6MpovhuAAAACnRSTlMA/P79/sHDhiZS0DxZowAABBBJREFUWMPtl89rE0EUx7ctTXatB3MI1SWnDbUKPUgXqh4ED8Uf7KUVSm3ooVSpSii0Fn/gD4j4o+APiEoVmos9FO2celiqZVgwgaKHPQiCCkv+F99kM7Ozm5kxq1dfD91k9pPve9/3ZjbRNHHok/mKli4eIPNgSuRObuN9SqSEzM20iGnm0yIbqCuV7NSSSIV7uyPM6JMBYdeTOanh/QihJYZsUCSby+VkMj2AvOt0rAeQAwqE3lfKMZVlQCZk1QOCKkkVPadITCfIRNKxfoJI5+0OIFtJx14CMSg1mRSDko7VAfksRQzEbGYqxOJcVTWMCH2I1/IACNW0PWU2M8cmAVHtnH5mM1VRWtwKZjOd5JbF6s1IbaYqaotjNlPHgDAnlAizubTR6ovMYn052g/U5qcmOpi0WL8xTS/3IfSet5m8MEr5ajjF5le6dq/OJpobrdY0t3i9QgefWrxW9/1BLhk0E9m8FeUMhhXal499iD0eQRfDF+ts/tttORRerfp+oV7f4xJj82iUYm1Yzod+ZQEAlS/8mMBwKebVmCVp1f0JLS6zKd17+iwRKTARVg2SHtz3iEbBH+Q+U28zW2Jiza8Tjb1YFoYZMsJyjDqp3M9XBQdSdPLFdxEpvOB37JrHcmR/y9+LgoTlCFGZEa2sc6d4PGlweEa2JSVPoVm+IfGG3ZL037iV9oH+P+Jxc4HGVflNq1M0pivao/EopO4b/ojVCP9GjmiXOeS0DOn1o/iiccT4ORnyvBGF3yUywkQajW4Ti0SGuiy/wVSg/L8w+X/8Q+hvUx8Xd90z4oV5a1i88MbFWHz0WZZ1UrTwBGPX3Rat9AFiXRMRjoMdIdJLEOt2h7jrYOzgOamKZSWSNspOS0X8SAqRYmxRL7sg4eLzYmNehcxh3uoyud/BH2Udux4ywxFTc1xC7Mgf4vMhc5S+kSH3Y7yj+qpwIWSoPTVCOOPVthGx9FbGqrwFw6wSFxJr+17zeKcztt3u+2roAEVgUjDd+AHGuxHy2rZHaa8JMkTHEeyi85ANPO9j9BVuBRD2FY5LDMo/Sz/2hReqGIs/KiFin+CsPsYO/yvM3jL2vE8EbX7/Bf8ejtr2GLN65bioAdgLd8Bis/mD5GmP2qeqyo2ZwQEOtAjRIDH7mBKpUcMoApbZJ5UIxkEwxyMZyMxW/uKFvHCFR3SSmerHyDNQ2dF4JG6zIMpBgLfjSF9x1D6smFcYnGApjmSLICO3ecCDWrQ48geba9DI3STy2i7ax6WIB62fSyIZIiO3GFQqSURp8wCo7GhJBGwuSovJBNjb7kT6FPVnIa9qJ2Ko+l9mefGIdinaMp0yC1URYiwsdfNE45EuA5Cx9EhalfvN5s+UyItm81vaB3p4joniN+SCP7Qc1hblAAAAAElFTkSuQmCC", base64FlowerWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEX///9HcEz///////////////84chYNAAAABnRSTlP/AGzCOYZj5g1nAAACfklEQVRYw+2YTVPDIBCGtza9Jw25a0bvcax30o73OOr//yvma2F3YWlpPTijXNpAHrK8LLALVPFium2vNIFSbwGKTGQA2GUiHcD29yDNy3sMIdUBQl7r2H8mOEVqAHgPkYZUS6Qc2zYhQqtjyDZEximCZwWZLIBeIgYShs2NzxKpSUehYpMJhURGb+O+w5BpMCAREKPnCDHbIY20SzhM5yxziAXpOiBXydrekT9i5XDEq4NIIHHgyU5mRGqviII4mREJJA4QJzMiILwlRJzpKxJKvCBm8OsBBbLux0tsPl4RKYm5aPu6jw1U4mGxEUR9g8M1PcqBEp/WJliNgYOXueBzS4jZSIcgY5lCtevgDSgyzE+rAfuOTQMq0yzvoGH18qju27Mayzs4fPyMziCx81NJa5RNfW7vPYK9KOfDiVkBxFHG8hAj9txuoBuSWORsFfkpBf7xKFLSeaOefEojh5jz22DJEqMP8fUyaKdQx+RnG+yXMpe8Aars8ueR1pVH/bW3FyyvPRw90upLDHwpgBDtg4aUBNkxRLXMAi03IhcZtr1m+FeI/O/JNyDmmL1djLOauSlNflBpW18RQ2bPqXI22MXXEk75KRHTnkPkYbESbdKP2ZFk0r5sIwffAjy1lx+vx7NLjB6/E7Jfv5ERKhzpN0w8IDE8IGFDv5dhz10s7GFiXRZcUeLCEG5P5nDq9k4PFDcoMpE3GY4OuxuCXhmuyNB6k0RsLIAvqp9NE5r8ZCSS8gxnUp7ODdYhZTqxuiJ9uyJJtPmpqJ7wVj+XVieS903iViHziqAhchLEJAyb7jWU647EpUofQ0ziUuXXXhDddtlllSwjgSQu7r4BRWhQqfDPMVwAAAAASUVORK5CYII=", base64Success: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEVRUVFHcExTU1NRUVFRUVFRUVFOSlSUAAAABnRSTlP/AI6+VySB3ZENAAACcElEQVRYw+2YyYKCMAyGI8hdpdxdZu7gcpdZ7jL6/s8yYheSNi0aPdqbwOffpGmaFOYPD3gj4bisN7vddv17N/JVgxn5x12IWgIaWTuO/IE3PseQbwjGPo2cgRmHFLJwdm/X643zwiqOKPPJ1nj3sjEP2iiifZWj5bhopSyGaEO2HX5fbQJzwJ+W7x/jw5ZFjsEU0PMph9xE8i5EqprKALW95eJQURkgzw98uJ/JvwGecR7bIjWWsUgVrrIfFZ2HlLy3sKETD1mmRLRMRhGVssRa0xJkdn3SpJBymBkM8+pSSDXMDNyDaToVHd2fgpNt0sjwiUZO19+jGQ+gQEg9Oq+bufmAVGihomNmjQG7UG3020vrlm7lkFnKFGU3kZ0KGAdmKe821pipQ+qEKcrZeTL2g5FsUks4cStjEZWwXg0b0n4GxmEpkWwIs5VBynjgK7xZaz1/0D7OxkVuLpsY5BQNFyLS84VBjjbg0iL2r2EQHBOxBhikuUOkdxODVF1cxHoWtPPsiyXO455Iv34hssCO8EV4ZIYTjS8SR4qYSHRiTiYQ4ZFbHi0iIhhBTi6dTCgSWRcnw4h4yGTuyTAiOGBIWGoZTgSHJQl+LcOJ4OCnW6yX2bMnJ9pidCOXtkTkTrIGpYuOynAiOF14SamMiOCk5Ke+mq8BcOrrvym8d0zKIQnWT+M1WwOQNO4fFiWb18hhERxJPx2fblbPHHyC41VyiAtKBUFBIih7JMWVoIQTFIr3lKPN80WvoLSWFPC653ioTZA0I0FrQ7qU6asaK0H7JmkSJa2ooOGVtNUsc3j9FYHkIkJy3SG6VHnfXKXGP9t4N9Q4Ye98AAAAAElFTkSuQmCC", base64SuccessWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAGFBMVEVHcEz///////////////////////////8dS1W+AAAAB3RSTlMAiVYk6KvDHLfaegAAAo1JREFUWMPtWEtzmzAQNhCTq910ytXpiyvxTNOr60zrayepx9d02gnX4sTm7xcEiJX2gdnkGJ1A4tOnfWqXyeR1vMRYzrcPD9v5h5MBl3/Ldvx4cxIg/FWC8X0xjLjalM54uhhCfCrRuJURX0pi3EmIqZV7O59vrRZmguStHL9b7S7ftfLwOtiZDw7AHMtmquAQ12b5Wwbnordm8g9zLLO49qc/m2n6aKnhwPOGZ08hAiNHhheiHae1lOUPGZpQkPKa3q0mOUjaRzSRaGUjpy/mmWSwySSpllcEteBKAT52KEnSbblA51pJEPxBQoiH1FP4E3s5+FJv07h6/ylD6ui7B+9fq/ehrFB98ghec9EoVtyjK8pqCHLmCBOwMWSCeWFNN4MbPAk55NhsvoFHSSVR0k5TCTTEzlUGcqV/nVp7n9oIVkmtaqbAEqEgfdgHJPwsEAyZ9r4VAZXFjpEwyaw3+H2v42KYxKhs1XvY/gSSGv+IHyUSuHXCeZhLAgVI3EjgSGo1Fb3xO0tGGU9S2/KAIbtjxpJASG73qox6w5LUq0cEOa+iIONIWIilQSQ0pPa2jgaRQAgQP7c0mITRWGxpMAmEQFN2NAQJNCV0mI6GIIEO47hlQ0ORQLd0nL+hoUjg1m6I1TRr8uYEAriBHLcVFQ5UEMiBe3XkTBEG04WXlGKGxPnMS305XQPA1Ocn2JiuAZwE66fxnKwBnDTuXxZTMq85lwW6kt5ndLqZPefiU1yvmktcUSooChJF2aMprhQlnKJQ5FxRKkcVRa+itNYU8Io2oVkY14w0NMWYlqft91Bj9VHq+ca3b43BxjWJmla0sfKohlfTVpPN+93L/yLQ/IjQ/O5Q/VR5HdL4D7mlxmjwVdELAAAAAElFTkSuQmCC", base64Empty: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAALeGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDg4LCAyMDIwLzA3LzEwLTIyOjA2OjUzICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIiB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDI0LTAxLTEzVDE5OjA5OjQwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wMS0xM1QxOTowOTo0MCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ZWQwMWYzNWQtOWRjOC00MDBiLWEyMmQtNjM5OGZiNzVhNGRiIiB4bXBNTTpEb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6ZDhlMzQ3ZmEtMDY2My1jYTRiLTgzNTctNTk4YjBkNGIzOTU2IiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHRpZmY6T3JpZW50YXRpb249IjEiIHRpZmY6WFJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6WVJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIGV4aWY6Q29sb3JTcGFjZT0iMSIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjMwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjMwMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBzdEV2dDp3aGVuPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQwNjg2NzJkLWY5NDMtOTU0Mi1iMDBiLTVlMDExNmE1NmIzZSIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxMDoyNjoxNiswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDphYmJkZmUyZC0xY2Q2LTJiNDgtYjUyNS05YzlhZjdlNjA4NDMiIHN0RXZ0OndoZW49IjIwMjQtMDEtMTNUMTE6MjM6NDArMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY29udmVydGVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJmcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJkZXJpdmVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJjb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YTQ5MjM5MDAtNDhiZC03YTQ1LWI4NGItYmVlZTVjOWUxYTM1IiBzdEV2dDp3aGVuPSIyMDI0LTAxLTEzVDExOjIzOjQwKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmVkMDFmMzVkLTlkYzgtNDAwYi1hMjJkLTYzOThmYjc1YTRkYiIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxOTowOTo0MCswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmFiYmRmZTJkLTFjZDYtMmI0OC1iNTI1LTljOWFmN2U2MDg0MyIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjM2ZGQ4NTQxLWQ0MWEtYmY0Yy1iZjA3LWNmNjZhNjZhMDg2MSIgc3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmQwODAyODAyLTM1MmEtODU0YS05MWI3LTZkZTZkNTJlYjNkMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pm30U/gAAAAJcEhZcwAALiMAAC4jAXilP3YAAAA/UExURUdwTODg4O3t7e7u7unp6d7e3uTk5M/Pz8nJyePj4+jo6Pj4+MrKyszMzO7u7unp6fb29vLy8vr6+v7+/sHBweag3xAAAAAOdFJOUwAxia5pF0n+/vzX3KbULQ2DYQAACG1JREFUeNrtm4l2o7gShi20IWFrAd7/WUc7EosDWKZ976Hc7WTmdMKXv0qlqpLyeNx222233Xbbbbfddtv/mOHn8xexSNsiRH5PrbFtW4p+DetpsF4v8Gs+HA3WEwOAfwzriYxaLTVsP8X1QK0z+vqQCzewYogi60aL9SEX5oyxphYVCFTGjfSJCTmN1jBruN5KTGCUS8bhySQGHRaohmW4glwtldbOeYJYKlgvbyUuA8aFFEKc++aIM4hrRnyiMnIZKq1PrihcM3GNKboMF1Naa9X9+8T1KrxIlVbGjv3cAEHOYYMqqgUsVuJqqehV3+sjDwB+DTJp0lYtMCyZpxqjF4e+74+sRcQSFZO8UonUSEFzuUY+DKo59A2kZDatGCjzCauy/2AmhSyCq0WHEj0KTNJDmVeNhErMt1Q8W4xti4/FwMJ4jaxl05TKFiNtD3kBGrHnhiph9V0eXQc6DkyE2xX830AlKshFTErXeuCZXK/9m41wFsGSfZ4lcGeyZ98PrylJ7MWCojQZ3qSukL2QslgdngqJnTEPdTJhXvbNBoR/+7wabIxWduN/Ja5dWEivm4XSZ2uQckNzmRlHrn2lc6eiafvS4V2Hd12tesau8toZW0CtWoZYb9t+OqxdCYKYjVPF16pVbILIy/gR7MVaWMHYPCoa2VkzkX4Iry2rirXbumGyAjGC1h62YLw6ApsNKZph3fpIWHt08JovRWD62sejpXhTrhWrPpl6zZ6PW2oTG5ltlvgtF6weNYCWKeJJSfg4W6PNJlj3sVZgOXV4lc8n4RlkMTLEBDVoYc3nI09kpyzzfgWsjyzBZSNDKF2/wjh+sxYvn8Y1scxlfLF9T1RBO3wVHsnq8Fk4oGkEh/0KJPSa8T2CeWE5X9BPmgLsaRIGeNL2kshCsWoLBmdPJW5Wbz1ndAKUXjPwxXYAUpSV3fy5BJg1aa1tyVXHHMgVH31ewDVrleHr9XqC684SUF4mecR3+wW5SC2QNvxUizRv98mLDhPgYiMDb+v8g0OADxqxcnf9w01mZYJF0fUVP5LcdswbsMmy1DVs5PlE5NpNiTR8M8qAWZkOy6aN13VcoOF2/s3xn3Mes8Xza05tgR/BuNz69nlNzMR0fH45p+G4R9oxh2mKt9MF4J7K/lvWUojwF5nCgCpuRUptnZMQ3au0nSo2UsHgV3xpmeLYzGml3ZFBBzYGPCpOQRwXs1/GG1J74dlZc6JKUOtjBAz9XjVxucGWHbZVJDPJQGYDRl1Qmf1ovk2Sbghb6MQlnF7mBzM1bgOqJAPpoOQaVe+4Skcit3uqHMyG/Sh1rHNN0gAfM0nnPrmulfLVBSm20TSZSdWa0LJl2ukVyE4vTYCgP3uQkwv1TKtQWgxDzBSg80OQjCs4klKvuUzHLCfIbDKIE/S5VIGqD1iD2819pkAqTWdmeina+oZABi7X5B1MGoTJqJSchuk6JNHcgUPAcsVFk0+N0oDN68Vo7FQSmCXjx46OEtUk1lpY2ZFQGr/AcpqVato4wPUD+RhfAeyQI5sJ6l2sDwnKqNFSJvpiyJbFl3kTOjZ2ievwCR7hkUoWeV2vOLAXvB39AJoyqYa81A5cvaAidXYTFTycKDBcalVK5f3XS89kzLVl9txfL+K+p6NUnitz5KkKm7D3DrRPNq4bk7l20aFRppNilmuQI+uzTtj9wPBkTsVwM7HbJ5pwGgujyRyZDzQLNoiRFluRtQ+GzEguqRxUL+ZMFqulMzIfaP3ARj2k/txB8c+2HyjmDizCaVWtNoE5MvMlKs/4VQ7HUJZCrU6qCKcNJ2aSWUZhJZu4VI0LB4CHFdj77DRuGi28WKAxoRyZyzGVrmc0jmk1nP5QaxZo1puqq1YIAqgZb8e/rABZJWNCNxV7DSTpOO7Aail9J9nYHtua/4ouE/aS0X1qtXQzwGx+rnbi2vhF/TfZG52oc6DPo1WCi3RTDnRk7TEntoEp38gg+DjYs2opkR3JW5EpL9rU0XSK5/6LOTAVS+72x7pm60zSf5HMdldjhzJqw1FRcxXdS3ZNZp0s92FiyluUvBPoD9ynZNkBiu2NF11ofnlnQbZgKqvusj9R/f6DOzgVsahbNlXxlsxU8y7qrbTupitRyxFBKG6H3aEPUqj7YrzAymq41FXlZLlO4WLbvG2Kg4vYB+wPfWS2B5Rq8TW9ROpAZbiF6MmCTsx1NLLsx7NOoOiZup2CNbZ36xc96ErcxzuILGrmmFhimjtwKo/yTm7feTVwB61IzbnW4967Kt3cDDotGt8JKrTiUyO3Uy2PZZt9tapXEfXhWmTgcoB+JchFWsiCKvYnhmn/tKuJDbgly897FnFfkE1rQLKy810OU7xW3bEJHCD5gERtuTGuxoJqA6qI9TNMa6MbvZomsiubbPYx78YXDaaRqqsyqfSaLZdjYGHLu65rDgydXCWm1P5EvcQ828f9pcBapTILSMv1nZCAc0WzFIFsGfUi/kmAxc6cFqDSYuPSMIbs1OVrwITTQM9HVRFJ5JL56qcoFzzT1uVcd2v9jFw8BHlcWtmEI86hp5Dy/zOlK8cUp/rVseRUBqawz6kmAcPLM9l5m8h4V53Iz/2mFJaTCvF8JbsMvPjU/7crbUXart0v4WyE0LnDPcAX95Knj4VUE8HCdNdUP8BDcOXKdPl4uSWbh4LfOV0HDdfipOmu+eIRrDsNPkIT7np/8ZAzVdOd1u8wHIqeXt8VqtgiO50ePeNaGG+uO9rHiKdL71pnIun8jxEKXv2r2HYBzO/mz96vFKoMM5WLk7tQXS9U5kwCu5lk7n6++kdCFWRaTUzm0/5fClWGWTrM/AGhCrJO/ZBQhTPFLwmV7ebgcdttt91222233Xbbbf+H9h+2WEtdHVinLAAAAABJRU5ErkJggg==", base64Error: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAALeGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDg4LCAyMDIwLzA3LzEwLTIyOjA2OjUzICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIiB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDI0LTAxLTEzVDE5OjEwOjEwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wMS0xM1QxOToxMDoxMCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTQ3NTExNjAtZDY5MC00ZTkzLWFhNGUtNGMwYTViNGU1ZGFjIiB4bXBNTTpEb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzRiNzlkYWMtZTJmYS1iNzQ0LWIxM2ItOWU1N2VjMDhhM2YwIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHRpZmY6T3JpZW50YXRpb249IjEiIHRpZmY6WFJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6WVJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIGV4aWY6Q29sb3JTcGFjZT0iMSIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjMwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjMwMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBzdEV2dDp3aGVuPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQwNjg2NzJkLWY5NDMtOTU0Mi1iMDBiLTVlMDExNmE1NmIzZSIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxMDoyNjoxNiswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpjZjk1NTE1OC04MjFiLTA4NDUtYWJmNS05YTE1NGM1ZTY4NjEiIHN0RXZ0OndoZW49IjIwMjQtMDEtMTNUMTE6MDQ6MDQrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY29udmVydGVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJmcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJkZXJpdmVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJjb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZGM1Y2IyNWItZDZlNC0yZjQ2LTgyODQtZmUwOTNlY2M2ZTkxIiBzdEV2dDp3aGVuPSIyMDI0LTAxLTEzVDExOjA0OjA0KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjE0NzUxMTYwLWQ2OTAtNGU5My1hYTRlLTRjMGE1YjRlNWRhYyIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxOToxMDoxMCswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmNmOTU1MTU4LTgyMWItMDg0NS1hYmY1LTlhMTU0YzVlNjg2MSIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjM2ZGQ4NTQxLWQ0MWEtYmY0Yy1iZjA3LWNmNjZhNjZhMDg2MSIgc3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmQwODAyODAyLTM1MmEtODU0YS05MWI3LTZkZTZkNTJlYjNkMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ph2LDQsAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA5UExURUdwTNra2s7Ozq2tre3t7dPT087OzuPj4+3t7dbW1u/v79bW1vz8/MrKytDQ0Nzc3MPDw/X19bi4uMZQDnEAAAAKdFJOUwBqEPywotz+wzqApqiTAAAHW0lEQVR42u1b25akIAwcbx2UFoj//7HLTQVBRcSZfTDnbM/uTl/KSlEkwf75eeONN95444033njjjTduR9/0/yOsbqoevObL7101tYX1HFs9QFtfZalRP+rpQVgdAFx990ZnT8L6eZItUl99jeGpf1DxdV/VP9fV1f/PFlF1bYHoVFSRC60IyVjrFRnuB8IoxpExSrstsErKHpJw1eqybNLbAQvAYkKjUrjoBgKRqAaeIjG5+qaps6hKcMWmcdSwqAJWBbAgCZZaIYbsqggqqlHNbFFa5yVR4jKvrKEErOEjNCqNSwHrfE8lpLsod/u+cOPPMPBJ+Gz5dM0cXNgclre+pSxhYI1WW5Tf9ENSMIdLCiWs6q9hwQprBVYKFqyPlx4WtoSvrT9lC/wkGt8qlkQooC3hi6sgW3Bb8gtdpSV/za/mn49pC0oYhONbfyd5hzDLFivKFpTS1gKM0we0tQCEncfgQn7Rt+DC/299i1MSRJcBC0r7VviG5KZvwV5WIUobxHyrJKy8VRjXVgFYsPu5kOtbxdhycCDuihziXVLoW7xwEiUmDgd544B46luWLW+nugMLB2BimmC3cxTNxCDg8xFtuUSNqoFsDKzY8psa+XtBNWXr74N6qxwsS5T6VL5robKl10+ZRu5S9qBvUYuJwVHzjwjrE3G33qKh+WXBgmkmCvHYquTvZ8oo7rLFA4PJgYW0MdePIRQIGUPNbSMw5lubJMKtJI6+Wk6cVFMmACO+VVryeL7ZgI8MhwS2fnNPPK0geHBRd11eJSiyL4KjrL2umm1XIpRii1MKB/mU/iCZwF+pt5z3UJ7UiF3nQqadAXC3T3xEW2IyuDBe3yDTe0+A64it2WTyYSGVHymUI/EduvSWKJ80Dtv2NbYSoQxbMkVC7yzNGIWFvDF7gRD79RYrWW/BDGti4wwLtgvO7gWKUZ8Mt94qX8vLJE70+xVNwzDm9ghNM+FX7p/jlZUId2HJD+Tf79hMe3WNrAK/30E+C8/6xOCqbqxE5JNMYrNbnaLUvJAewfCg8zF0Ba/tbviWLvPYfsGFA1PVD8ZdnjlVc/DS/o7LK4NHjOjKKbfCTSCo5XmwKbaZM4jlc9NGEYd9Ijd0QS5ZGaOR2O+DPlGyRb2nXZzgnI1GdFWF+0gh3ifyTRqvzpXI2eElk58FeHziCF5hY+hSMV9Ge/mohUTGuQ4vzHYe8bW5sNdFQ58St22Vcf5zzJbtcGT4iYQ7iz8dFuxoWRYMjAM7KCnypHOTLSqdUwYIFpndOD/6B2FBzNQxYmW/zxYE4j8yLHga1s2Rbm/O5PXtGcuNDIW1dTj5hpjGsO+7z2Kk9NP1JWDlnWKAM4H6zCUNM05KyVPHBclYzUbgjE3N3tP2JWHBmbqD4GLeCs2jhMT13lMVljwcEbetwZgtHUxVQ21ho3fE7inf2s8vzMWq0EWpfOBg5hcDSGwaF2+LaysRIzNFqRgBv2sMhi/Ix0WiW8rBKNBv4ExBI7eorx9ANazsPCb5FkSNH+Reacos+AYxaFzX76KMH65c8ytzZ40YvpFAqtgC/otn1eCmMI5K8yVRQVVwq3aVtU+jJktwjyP7x+BKv8vtoH098vXYSJcrWGJcAW11r8WVRxe5vgcuFbXqwnaEZejS6mrLwYKUg1ch2RJswTFYgMOwoau+AQsSp/FuDhVZi7J402ifgGla/GJIzGLYG5H4rnKMCUydL9wcsmZSuPikR2QmjQbWqaV2ob2RdMvaLEvFlRiXpYeTwqVOtMZF+qi0dS4uEjJKMvWuYK3S0jHZwaq7BylYp/O2uu3q04lNqudLWEJQd/3paTBz12IaLIPtzE5P1AUuW9TB8NVzaG9/TIfV+eXsWeezz6HWlptEbo4SIAeWur/Y/RZC/gmZTiLzUY2j5ct6fjKsFvxqgyQxE9sbmfYtnJMIciEKo6+FL0wziJmtkzspIcUl0PgWrL7VCKP7hl61U4WLeN+7Ieli2vZhmq0VgjDOgIyhJ62sSpDkWNZa1wiB8WoLlxzy29XpGVPgn1ut5VYcGyRLK7OCiJaDYMrAneJUkZWdw0yDgNm5nDowqLc0Kp581FO7QS4pC9S/YRW9xkVdNOj0ZHCp9anEZw3VEK/fopiDrkMObkcdJtT1g6+uzQ60bIdUPztdWZWy53m+v/zFYPOGHO4AZsalmtJNkyHrCAx1RXX7mt5g1L1pDezpkXv8wJwpVRSSaf2c26Y0rrXXxyWBptu/ovdak+VhkqjGBZUdvKygqANKA/MqZ/36kcGwFn90RnWp66ksKuHgitLFY8BU+F2ZvqpxpMY9qR3YwOUJ12fc0KUHVKdswcKXuwetErCnwvMKuXxfc/3RVJ2yFc+iosQd3X+WGSVz1UiuN2J156FyVyHbsOUp3krezaPUT/VxXqdfwvknb/Zgp+idTxTbrkLqYuKreRnhy65Gf4W0NsDoYiqf6uZsvr8V9eo6XWc5+3TVf/3N1TfeeOONN95444033njjjTfeSI1/IeOYOeO4fGAAAAAASUVORK5CYII=", base64BackToTop: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAAElBMVEVRUVH+/v5HcEyZmZlRUVFRUVGm1ByOAAAABnRSTlPMzADMTZAJBBGsAAAEnElEQVR42t2cS27jMAyGf7/2U+QCQeDsbeQCgZDujaC5/1UmkzaJn+JDFGcw3LdfflKibJkkDnxrL7dbg7sNt6+L4O8OYBM+B0ys+QrGkHZG+OEEQ8g6go8Bx1GIGMdpNOQyIG6XdMgnSPtKhLQDGEZFBgYMkhKFtGBb0EIEjDgFRowoBVaMGAWpMedEfxMiZtwpUsgZCqtlkCNUdpVAWigtCCCDFtLwIWeoreZCWiRYYEKGFEjDg+yRZCUH0iLRAgNyToXUNCRZyMqWhGnUN2IPm3wSlwJ7IUspyCBkIQUZhCykIIeQuRTkEDKXAuM9srrtYbrZN7Y98giZSoFd+t1OxmMITG0dcrSFXFchZ1tIvQZpYWxhBbK3hpQrkMEa0iwh5t4a+QvZvDXyF7J5a+Qv5PPW21/I5623v5DPW29/IaO3Xv5Clrw1y1/Ikrdm+Qs5svw83yNnSJ5BQb4F/F7EIEJSnThGBAXxkFQfLOviQUE8JAUPsosHBfGQfDAtHhREQ1JxIV00KIgmrnRI84S0yAd5BAXxxJUck0f6Qnwr9qmr6xF5xLMjcwn/iudIEAdWnyjkEXlQKZiRVzoqRyLbgeUKKR8Q4alY7cSnoxzSf2ggsqehKr6YVpcXpOd7H93f60cKhOd7Re2LteUF4eLqiVS1mr0ge4io6C2+soaFkJ7MuuuQs1yITEp9hwwKISIpzR2iESKSIoT0rLNwuVHQqoSIpAQJpGce60vIUSdEIuUqgPTsJ5QFZK8UIpBS8iG94GFrDjlrhfCl8CG96Llxmle4kEr6vKWBPIVo9kqDQSRk9/3cWoikcCFPAd33v4dIChPyEvLzBA6RlEYWke4JEUnhKXkLeUEKxRHJFfKCQHGucIW8IdZSRkLeEGMpYyEjiK2UsZARxFTKRMgYYillImQMMZQyFTKB2EmZCplAuFLIHT8TMoWwpQwiIVMIUwqpZP5bp5CCvCTiQKr5f5lCQN+tPCBn2ZvVDFJwIDUP0m1BYAfZYRNSsCB7BqTbhoARePIxtZ9tgwWkoJcwCalmv3MBAemtO4R6dah2HaKQqj8Zvp9sQDjvJ21+SPCBHPJDDk6QITekEV7gqCC19CpKAym9IMfckKv4olMBCeIrWwVEfvkshzQekO9r9P1/ALk+IG1eSPCDiCJfyG+FyU+A6ZCa/piZDinpz7LpkCv5gdkAEshP5emQhv7onw6pGeULyZCSUYiRDAmMkpJkCKs4JhFSq8p8hJBSVbAkhARV6ZUQoisik0FqXTmcDHLVFfbJIEFXoiiCNMpiSxGkVJaNiiBBWQArgTTaUl4JpNQWJUsgQVteXQg+AKkLxQWFGKW+5J2+eVp4S168X3CF1CltCKdTJ8lb84YK2bUBO+wZW0Pqv9nk4tKu49N45NJC5dMM5tLW5tOg59Jq6NM06dL+abFXwr/RkuvTXJwae1abtE/Dt0/ruksTvs84AZ/BCC4jHnyGVfiM3VBQFANEXEah+Ax18RlP4zNox2dkkM/wI58xTn8yDCXGYCDV3W5RGSajtXyGhG1jbpbjzpwGt/0MJft8jqC7iUbQ/QZaxdnKqcIftwAAAABJRU5ErkJggg==" }; const _sfc_main$19 = { name: "z-paging-empty-view", data() { return {}; }, props: { // 空数据描述文字 emptyViewText: { type: String, default: "没有数据哦~" }, // 空数据图片 emptyViewImg: { type: String, default: "" }, // 是否显示空数据图重新加载按钮 showEmptyViewReload: { type: Boolean, default: false }, // 空数据点击重新加载文字 emptyViewReloadText: { type: String, default: "重新加载" }, // 是否是加载失败 isLoadFailed: { type: Boolean, default: false }, // 空数据图样式 emptyViewStyle: { type: Object, default: function() { return {}; } }, // 空数据图img样式 emptyViewImgStyle: { type: Object, default: function() { return {}; } }, // 空数据图描述文字样式 emptyViewTitleStyle: { type: Object, default: function() { return {}; } }, // 空数据图重新加载按钮样式 emptyViewReloadStyle: { type: Object, default: function() { return {}; } }, // 空数据图z-index emptyViewZIndex: { type: Number, default: 9 }, // 空数据图片是否使用fixed布局并铺满z-paging emptyViewFixed: { type: Boolean, default: true }, // 空数据图中布局的单位,默认为rpx unit: { type: String, default: "rpx" } }, computed: { emptyImg() { return this.isLoadFailed ? zStatic.base64Error : zStatic.base64Empty; }, finalEmptyViewStyle() { this.emptyViewStyle["z-index"] = this.emptyViewZIndex; return this.emptyViewStyle; } }, methods: { // 点击了reload按钮 reloadClick() { this.$emit("reload"); }, // 点击了空数据view emptyViewClick() { this.$emit("viewClick"); } } }; function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "zp-container": true, "zp-container-fixed": $props.emptyViewFixed }), style: vue.normalizeStyle([$options.finalEmptyViewStyle]), onClick: _cache[1] || (_cache[1] = (...args) => $options.emptyViewClick && $options.emptyViewClick(...args)) }, [ vue.createElementVNode("view", { class: "zp-main" }, [ !$props.emptyViewImg.length ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: vue.normalizeClass({ "zp-main-image-rpx": $props.unit === "rpx", "zp-main-image-px": $props.unit === "px" }), style: vue.normalizeStyle([$props.emptyViewImgStyle]), src: $options.emptyImg }, null, 14, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: vue.normalizeClass({ "zp-main-image-rpx": $props.unit === "rpx", "zp-main-image-px": $props.unit === "px" }), mode: "aspectFit", style: vue.normalizeStyle([$props.emptyViewImgStyle]), src: $props.emptyViewImg }, null, 14, ["src"])), vue.createElementVNode( "text", { class: vue.normalizeClass(["zp-main-title", { "zp-main-title-rpx": $props.unit === "rpx", "zp-main-title-px": $props.unit === "px" }]), style: vue.normalizeStyle([$props.emptyViewTitleStyle]) }, vue.toDisplayString($props.emptyViewText), 7 /* TEXT, CLASS, STYLE */ ), $props.showEmptyViewReload ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: vue.normalizeClass({ "zp-main-error-btn": true, "zp-main-error-btn-rpx": $props.unit === "rpx", "zp-main-error-btn-px": $props.unit === "px" }), style: vue.normalizeStyle([$props.emptyViewReloadStyle]), onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.reloadClick && $options.reloadClick(...args), ["stop"])) }, vue.toDisplayString($props.emptyViewReloadText), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ]) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-b55bdf15"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.vue"]]); const c = { // 当前版本号 version: "2.8.6", // 延迟操作的通用时间 delayTime: 100, // 请求失败时候全局emit使用的key errorUpdateKey: "z-paging-error-emit", // 全局emit complete的key completeUpdateKey: "z-paging-complete-emit", // z-paging缓存的前缀key cachePrefixKey: "z-paging-cache", // 虚拟列表中列表index的key listCellIndexKey: "zp_index", // 虚拟列表中列表的唯一key listCellIndexUniqueKey: "zp_unique_index" }; const zLocalConfig = {}; const storageKey = "Z-PAGING-REFRESHER-TIME-STORAGE-KEY"; let config$1 = null; let configLoaded = false; let cachedSystemInfo = null; const timeoutMap = {}; function gc(key, defaultValue) { return () => { _handleDefaultConfig(); if (!config$1) return defaultValue; const value = config$1[key]; return value === void 0 ? defaultValue : value; }; } function getTouch(e) { let touch = null; if (e.touches && e.touches.length) { touch = e.touches[0]; } else if (e.changedTouches && e.changedTouches.length) { touch = e.changedTouches[0]; } else if (e.datail && e.datail != {}) { touch = e.datail; } else { return { touchX: 0, touchY: 0 }; } return { touchX: touch.clientX, touchY: touch.clientY }; } function getTouchFromZPaging(target) { if (target && target.tagName && target.tagName !== "BODY" && target.tagName !== "UNI-PAGE-BODY") { const classList = target.classList; if (classList && classList.contains("z-paging-content")) { return { isFromZp: true, isPageScroll: classList.contains("z-paging-content-page"), isReachedTop: classList.contains("z-paging-reached-top"), isUseChatRecordMode: classList.contains("z-paging-use-chat-record-mode") }; } else { return getTouchFromZPaging(target.parentNode); } } else { return { isFromZp: false }; } } function getParent(parent) { if (!parent) return null; if (parent.$refs.paging) return parent; return getParent(parent.$parent); } function consoleErr(err) { console.error(`[z-paging]${err}`); } function delay(callback, ms = c.delayTime, key) { const timeout2 = setTimeout(callback, ms); if (!!key) { timeoutMap[key] && clearTimeout(timeoutMap[key]); timeoutMap[key] = timeout2; } return timeout2; } function setRefesrherTime(time, key) { const datas = getRefesrherTime() || {}; datas[key] = time; uni.setStorageSync(storageKey, datas); } function getRefesrherTime() { return uni.getStorageSync(storageKey); } function getRefesrherTimeByKey(key) { const datas = getRefesrherTime(); return datas && datas[key] ? datas[key] : null; } function getRefesrherFormatTimeByKey(key, textMap) { const time = getRefesrherTimeByKey(key); const timeText = time ? _timeFormat(time, textMap) : textMap.none; return `${textMap.title}${timeText}`; } function convertToPx(text) { const dataType = Object.prototype.toString.call(text); if (dataType === "[object Number]") return text; let isRpx = false; if (text.indexOf("rpx") !== -1 || text.indexOf("upx") !== -1) { text = text.replace("rpx", "").replace("upx", ""); isRpx = true; } else if (text.indexOf("px") !== -1) { text = text.replace("px", ""); } if (!isNaN(text)) { if (isRpx) return Number(rpx2px(text)); return Number(text); } return 0; } function rpx2px(rpx) { return uni.upx2px(rpx); } function getSystemInfoSync(useCache = false) { if (useCache && cachedSystemInfo) { return cachedSystemInfo; } const infoTypes = ["DeviceInfo", "AppBaseInfo", "WindowInfo"]; const { deviceInfo, appBaseInfo, windowInfo } = infoTypes.reduce((acc, key) => { const method2 = `get${key}`; if (uni[method2] && uni.canIUse(method2)) { acc[key.charAt(0).toLowerCase() + key.slice(1)] = uni[method2](); } return acc; }, {}); if (deviceInfo && appBaseInfo && windowInfo) { cachedSystemInfo = { ...deviceInfo, ...appBaseInfo, ...windowInfo }; } else { cachedSystemInfo = uni.getSystemInfoSync(); } return cachedSystemInfo; } function getTime() { return (/* @__PURE__ */ new Date()).getTime(); } function getInstanceId() { const s = []; const hexDigits = "0123456789abcdef"; for (let i = 0; i < 10; i++) { s[i] = hexDigits.substr(Math.floor(Math.random() * 16), 1); } return s.join("") + getTime(); } function wait(ms) { return new Promise((resolve2) => { setTimeout(resolve2, ms); }); } function isPromise(func2) { return Object.prototype.toString.call(func2) === "[object Promise]"; } function addUnit(value, unit) { if (Object.prototype.toString.call(value) === "[object String]") { let tempValue = value; tempValue = tempValue.replace("rpx", "").replace("upx", "").replace("px", ""); if (value.indexOf("rpx") === -1 && value.indexOf("upx") === -1 && value.indexOf("px") !== -1) { tempValue = parseFloat(tempValue) * 2; } value = tempValue; } return unit === "rpx" ? value + "rpx" : value / 2 + "px"; } function deepCopy(obj) { if (typeof obj !== "object" || obj === null) return obj; let newObj = Array.isArray(obj) ? [] : {}; for (let key in obj) { if (obj.hasOwnProperty(key)) { newObj[key] = deepCopy(obj[key]); } } return newObj; } function _handleDefaultConfig() { if (configLoaded) return; if (zLocalConfig && Object.keys(zLocalConfig).length) { config$1 = zLocalConfig; } if (!config$1 && uni.$zp) { config$1 = uni.$zp.config; } config$1 = config$1 ? Object.keys(config$1).reduce((result, key) => { result[_toCamelCase(key)] = config$1[key]; return result; }, {}) : null; configLoaded = true; } function _timeFormat(time, textMap) { const date2 = new Date(time); const currentDate = /* @__PURE__ */ new Date(); const dateDay = new Date(time).setHours(0, 0, 0, 0); const currentDateDay = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0); const disTime = dateDay - currentDateDay; let dayStr = ""; const timeStr = _dateTimeFormat(date2); if (disTime === 0) { dayStr = textMap.today; } else if (disTime === -864e5) { dayStr = textMap.yesterday; } else { dayStr = _dateDayFormat(date2, date2.getFullYear() !== currentDate.getFullYear()); } return `${dayStr} ${timeStr}`; } function _dateDayFormat(date2, showYear = true) { const year = date2.getFullYear(); const month = date2.getMonth() + 1; const day = date2.getDate(); return showYear ? `${year}-${_fullZeroToTwo(month)}-${_fullZeroToTwo(day)}` : `${_fullZeroToTwo(month)}-${_fullZeroToTwo(day)}`; } function _dateTimeFormat(date2) { const hour = date2.getHours(); const minute = date2.getMinutes(); return `${_fullZeroToTwo(hour)}:${_fullZeroToTwo(minute)}`; } function _fullZeroToTwo(str) { str = str.toString(); return str.length === 1 ? "0" + str : str; } function _toCamelCase(value) { return value.replace(/-([a-z])/g, (_, group1) => group1.toUpperCase()); } const u = { gc, setRefesrherTime, getRefesrherFormatTimeByKey, getTouch, getTouchFromZPaging, getParent, convertToPx, getTime, getInstanceId, consoleErr, delay, wait, isPromise, addUnit, deepCopy, rpx2px, getSystemInfoSync }; const Enum = { // 当前加载类型 refresher:下拉刷新 load-more:上拉加载更多 LoadingType: { Refresher: "refresher", LoadMore: "load-more" }, // 下拉刷新状态 default:默认状态 release-to-refresh:松手立即刷新 loading:刷新中 complete:刷新结束 go-f2:松手进入二楼 Refresher: { Default: "default", ReleaseToRefresh: "release-to-refresh", Loading: "loading", Complete: "complete", GoF2: "go-f2" }, // 底部加载更多状态 default:默认状态 loading:加载中 no-more:没有更多数据 fail:加载失败 More: { Default: "default", Loading: "loading", NoMore: "no-more", Fail: "fail" }, // @query触发来源 user-pull-down:用户主动下拉刷新 reload:通过reload触发 refresh:通过refresh触发 load-more:通过滚动到底部加载更多或点击底部加载更多触发 QueryFrom: { UserPullDown: "user-pull-down", Reload: "reload", Refresh: "refresh", LoadMore: "load-more" }, // 虚拟列表cell高度模式 CellHeightMode: { // 固定高度 Fixed: "fixed", // 动态高度 Dynamic: "dynamic" }, // 列表缓存模式 CacheMode: { // 默认模式,只会缓存一次 Default: "default", // 总是缓存,每次列表刷新(下拉刷新、调用reload等)都会更新缓存 Always: "always" } }; const _sfc_main$18 = { name: "z-paging-refresh", data() { return { R: Enum.Refresher, refresherTimeText: "", zTheme: { title: { white: "#efefef", black: "#555555" }, arrow: { white: zStatic.base64ArrowWhite, black: zStatic.base64Arrow }, flower: { white: zStatic.base64FlowerWhite, black: zStatic.base64Flower }, success: { white: zStatic.base64SuccessWhite, black: zStatic.base64Success }, indicator: { white: "#eeeeee", black: "#777777" } } }; }, props: [ "status", "defaultThemeStyle", "defaultText", "pullingText", "refreshingText", "completeText", "goF2Text", "defaultImg", "pullingImg", "refreshingImg", "completeImg", "refreshingAnimated", "showUpdateTime", "updateTimeKey", "imgStyle", "titleStyle", "updateTimeStyle", "updateTimeTextMap", "unit", "isIos" ], computed: { ts() { return this.defaultThemeStyle; }, // 当前状态Map statusTextMap() { this.updateTime(); const { R, defaultText, pullingText, refreshingText, completeText, goF2Text } = this; return { [R.Default]: defaultText, [R.ReleaseToRefresh]: pullingText, [R.Loading]: refreshingText, [R.Complete]: completeText, [R.GoF2]: goF2Text }; }, // 当前状态文字 currentTitle() { return this.statusTextMap[this.status] || this.defaultText; }, // 左侧图片class leftImageClass() { const preSizeClass = `zp-r-left-image-pre-size-${this.unit}`; if (this.status === this.R.Complete) return preSizeClass; return `zp-r-left-image ${preSizeClass} ${this.status === this.R.Default ? "zp-r-arrow-down" : "zp-r-arrow-top"}`; }, // 左侧图片style leftImageStyle() { const showUpdateTime = this.showUpdateTime; const size = showUpdateTime ? u.addUnit(36, this.unit) : u.addUnit(34, this.unit); return { width: size, height: size, "margin-right": showUpdateTime ? u.addUnit(20, this.unit) : u.addUnit(9, this.unit) }; }, // 左侧图片src leftImageSrc() { const R = this.R; const status = this.status; if (status === R.Default) { if (!!this.defaultImg) return this.defaultImg; return this.zTheme.arrow[this.ts]; } else if (status === R.ReleaseToRefresh) { if (!!this.pullingImg) return this.pullingImg; if (!!this.defaultImg) return this.defaultImg; return this.zTheme.arrow[this.ts]; } else if (status === R.Loading) { if (!!this.refreshingImg) return this.refreshingImg; return this.zTheme.flower[this.ts]; } else if (status === R.Complete) { if (!!this.completeImg) return this.completeImg; return this.zTheme.success[this.ts]; } else if (status === R.GoF2) { return this.zTheme.arrow[this.ts]; } return ""; }, // 右侧文字style rightTextStyle() { let stl = {}; stl["color"] = this.zTheme.title[this.ts]; stl["font-size"] = u.addUnit(30, this.unit); return stl; } }, methods: { // 添加单位 addUnit(value, unit) { return u.addUnit(value, unit); }, // 更新下拉刷新时间 updateTime() { if (this.showUpdateTime) { this.refresherTimeText = u.getRefesrherFormatTimeByKey(this.updateTimeKey, this.updateTimeTextMap); } } } }; function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { style: { "height": "100%" } }, [ vue.createElementVNode( "view", { class: vue.normalizeClass($props.showUpdateTime ? "zp-r-container zp-r-container-padding" : "zp-r-container") }, [ vue.createElementVNode("view", { class: "zp-r-left" }, [ vue.createCommentVNode(" 非加载中(继续下拉刷新、松手立即刷新状态图片) "), $props.status !== $data.R.Loading ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: vue.normalizeClass($options.leftImageClass), style: vue.normalizeStyle([$options.leftImageStyle, $props.imgStyle]), src: $options.leftImageSrc }, null, 14, ["src"])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 加载状态图片 "), vue.createElementVNode("image", { class: vue.normalizeClass({ "zp-line-loading-image": $props.refreshingAnimated, "zp-r-left-image": true, "zp-r-left-image-pre-size-rpx": $props.unit === "rpx", "zp-r-left-image-pre-size-px": $props.unit === "px" }), style: vue.normalizeStyle([$options.leftImageStyle, $props.imgStyle]), src: $options.leftImageSrc }, null, 14, ["src"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )), vue.createCommentVNode(" 在nvue中,加载状态loading使用系统loading ") ]), vue.createCommentVNode(" 右侧文字内容 "), vue.createElementVNode("view", { class: "zp-r-right" }, [ vue.createCommentVNode(" 右侧下拉刷新状态文字 "), vue.createElementVNode( "text", { class: "zp-r-right-text", style: vue.normalizeStyle([$options.rightTextStyle, $props.titleStyle]) }, vue.toDisplayString($options.currentTitle), 5 /* TEXT, STYLE */ ), vue.createCommentVNode(" 右侧下拉刷新时间文字 "), $props.showUpdateTime && $data.refresherTimeText.length ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["zp-r-right-text", { "zp-r-right-time-text-rpx": $props.unit === "rpx", "zp-r-right-time-text-px": $props.unit === "px" }]), style: vue.normalizeStyle([{ color: $data.zTheme.title[$options.ts] }, $props.updateTimeStyle]) }, vue.toDisplayString($data.refresherTimeText), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ]) ], 2 /* CLASS */ ) ]); } const zPagingRefresh = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-fff6d205"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/z-paging/components/z-paging/components/z-paging-refresh.vue"]]); const _sfc_main$17 = { name: "z-paging-load-more", data() { return { M: Enum.More, zTheme: { title: { white: "#efefef", black: "#a4a4a4" }, line: { white: "#efefef", black: "#eeeeee" }, circleBorder: { white: "#aaaaaa", black: "#c8c8c8" }, circleBorderTop: { white: "#ffffff", black: "#444444" }, flower: { white: zStatic.base64FlowerWhite, black: zStatic.base64Flower }, indicator: { white: "#eeeeee", black: "#777777" } } }; }, props: ["zConfig"], computed: { ts() { return this.c.defaultThemeStyle; }, // 底部加载更多配置 c() { return this.zConfig || {}; }, // 底部加载更多文字 ownLoadingMoreText() { return { [this.M.Default]: this.c.defaultText, [this.M.Loading]: this.c.loadingText, [this.M.NoMore]: this.c.noMoreText, [this.M.Fail]: this.c.failText }[this.finalStatus]; }, // 底部加载更多状态 finalStatus() { if (this.c.defaultAsLoading && this.c.status === this.M.Default) return this.M.Loading; return this.c.status; }, // 加载更多icon类型 finalLoadingIconType() { return this.c.loadingIconType; } }, methods: { // 点击了加载更多 doClick() { this.$emit("doClick"); } } }; function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["zp-l-container", { "zp-l-container-rpx": $options.c.unit === "rpx", "zp-l-container-px": $options.c.unit === "px" }]), style: vue.normalizeStyle([$options.c.customStyle]), onClick: _cache[0] || (_cache[0] = (...args) => $options.doClick && $options.doClick(...args)) }, [ !$options.c.hideContent ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createCommentVNode(" 底部加载更多没有更多数据分割线 "), $options.c.showNoMoreLine && $options.finalStatus === $data.M.NoMore ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass({ "zp-l-line-rpx": $options.c.unit === "rpx", "zp-l-line-px": $options.c.unit === "px" }), style: vue.normalizeStyle([{ backgroundColor: $data.zTheme.line[$options.ts] }, $options.c.noMoreLineCustomStyle]) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 底部加载更多loading "), $options.finalStatus === $data.M.Loading && !!$options.c.loadingIconCustomImage ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: $options.c.loadingIconCustomImage, style: vue.normalizeStyle([$options.c.iconCustomStyle]), class: vue.normalizeClass({ "zp-l-line-loading-custom-image": true, "zp-l-line-loading-custom-image-animated": $options.c.loadingAnimated, "zp-l-line-loading-custom-image-rpx": $options.c.unit === "rpx", "zp-l-line-loading-custom-image-px": $options.c.unit === "px" }) }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true), $options.finalStatus === $data.M.Loading && $options.finalLoadingIconType === "flower" && !$options.c.loadingIconCustomImage.length ? (vue.openBlock(), vue.createElementBlock("image", { key: 2, class: vue.normalizeClass({ "zp-line-loading-image": true, "zp-line-loading-image-rpx": $options.c.unit === "rpx", "zp-line-loading-image-px": $options.c.unit === "px" }), style: vue.normalizeStyle([$options.c.iconCustomStyle]), src: $data.zTheme.flower[$options.ts] }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 底部加载更多文字 "), $options.finalStatus === $data.M.Loading && $options.finalLoadingIconType === "circle" && !$options.c.loadingIconCustomImage.length ? (vue.openBlock(), vue.createElementBlock( "text", { key: 3, class: vue.normalizeClass(["zp-l-circle-loading-view", { "zp-l-circle-loading-view-rpx": $options.c.unit === "rpx", "zp-l-circle-loading-view-px": $options.c.unit === "px" }]), style: vue.normalizeStyle([{ borderColor: $data.zTheme.circleBorder[$options.ts], borderTopColor: $data.zTheme.circleBorderTop[$options.ts] }, $options.c.iconCustomStyle]) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), !$options.c.isChat || !$options.c.chatDefaultAsLoading && $options.finalStatus === $data.M.Default || $options.finalStatus === $data.M.Fail ? (vue.openBlock(), vue.createElementBlock( "text", { key: 4, class: vue.normalizeClass({ "zp-l-text-rpx": $options.c.unit === "rpx", "zp-l-text-px": $options.c.unit === "px" }), style: vue.normalizeStyle([{ color: $data.zTheme.title[$options.ts] }, $options.c.titleCustomStyle]) }, vue.toDisplayString($options.ownLoadingMoreText), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 底部加载更多没有更多数据分割线 "), $options.c.showNoMoreLine && $options.finalStatus === $data.M.NoMore ? (vue.openBlock(), vue.createElementBlock( "text", { key: 5, class: vue.normalizeClass({ "zp-l-line-rpx": $options.c.unit === "rpx", "zp-l-line-px": $options.c.unit === "px" }), style: vue.normalizeStyle([{ backgroundColor: $data.zTheme.line[$options.ts] }, $options.c.noMoreLineCustomStyle]) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const zPagingLoadMore = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-0a5fd7d6"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/z-paging/components/z-paging/components/z-paging-load-more.vue"]]); const commonLayoutModule = { data() { return { systemInfo: null, cssSafeAreaInsetBottom: -1, isReadyDestroy: false }; }, computed: { // 顶部可用距离 windowTop() { if (!this.systemInfo) return 0; return this.systemInfo.windowTop || 0; }, // 底部安全区域高度 safeAreaBottom() { if (!this.systemInfo) return 0; let safeAreaBottom = 0; safeAreaBottom = this.systemInfo.safeAreaInsets.bottom || 0; return safeAreaBottom; }, // 是否是比较老的webview,在一些老的webview中,需要进行一些特殊处理 isOldWebView() { try { const systemInfos = u.getSystemInfoSync(true).system.split(" "); const deviceType = systemInfos[0]; const version2 = parseInt(systemInfos[1]); if (deviceType === "iOS" && version2 <= 10 || deviceType === "Android" && version2 <= 6) { return true; } } catch (e) { return false; } return false; }, // 当前组件的$slots,兼容不同平台 zSlots() { return this.$slots; } }, beforeDestroy() { this.isReadyDestroy = true; }, unmounted() { this.isReadyDestroy = true; }, methods: { // 更新fixed模式下z-paging的布局 updateFixedLayout() { this.fixed && this.$nextTick(() => { this.systemInfo = u.getSystemInfoSync(); }); }, // 获取节点尺寸 _getNodeClientRect(select, inDom = true, scrollOffset = false) { if (this.isReadyDestroy) { return Promise.resolve(false); } let res = !!inDom ? uni.createSelectorQuery().in(inDom === true ? this : inDom) : uni.createSelectorQuery(); scrollOffset ? res.select(select).scrollOffset() : res.select(select).boundingClientRect(); return new Promise((resolve2, reject) => { res.exec((data) => { resolve2(data && data != "" && data != void 0 && data.length ? data : false); }); }); }, // 获取slot="left"和slot="right"宽度并且更新布局 _updateLeftAndRightWidth(targetStyle, parentNodePrefix) { this.$nextTick(() => { let delayTime = 0; setTimeout(() => { ["left", "right"].map((position) => { this._getNodeClientRect(`.${parentNodePrefix}-${position}`).then((res) => { this.$set(targetStyle, position, res ? res[0].width + "px" : "0px"); }); }); }, delayTime); }); }, // 通过获取css设置的底部安全区域占位view高度设置bottom距离(直接通过systemInfo在部分平台上无法获取到底部安全区域) _getCssSafeAreaInsetBottom(success) { this._getNodeClientRect(".zp-safe-area-inset-bottom").then((res) => { this.cssSafeAreaInsetBottom = res ? res[0].height : -1; res && success && success(); }); }, // 同步获取系统信息,兼容不同平台(供z-paging-swiper使用) _getSystemInfoSync(useCache = false) { return u.getSystemInfoSync(useCache); } } }; const queryKey = "Query"; const fetchParamsKey = "FetchParams"; const fetchResultKey = "FetchResult"; const language2LocalKey = "Language2Local"; function handleQuery(callback) { _addHandleByKey(queryKey, callback); return this; } function _handleQuery(pageNo, pageSize, from, lastItem) { const callback = _getHandleByKey(queryKey); return callback ? callback(pageNo, pageSize, from, lastItem) : [pageNo, pageSize, from]; } function handleFetchParams(callback) { _addHandleByKey(fetchParamsKey, callback); return this; } function _handleFetchParams(parmas, extraParams) { const callback = _getHandleByKey(fetchParamsKey); return callback ? callback(parmas, extraParams || {}) : { pageNo: parmas.pageNo, pageSize: parmas.pageSize, ...extraParams || {} }; } function handleFetchResult(callback) { _addHandleByKey(fetchResultKey, callback); return this; } function _handleFetchResult(result, paging, params) { const callback = _getHandleByKey(fetchResultKey); callback && callback(result, paging, params); return callback ? true : false; } function handleLanguage2Local(callback) { _addHandleByKey(language2LocalKey, callback); return this; } function _handleLanguage2Local(language, local) { const callback = _getHandleByKey(language2LocalKey); return callback ? callback(language, local) : local; } function _getApp() { return getApp(); } function _hasGlobalData() { return _getApp() && _getApp().globalData; } function _addHandleByKey(key, callback) { try { setTimeout(function() { if (_hasGlobalData()) { _getApp().globalData[`zp_handle${key}Callback`] = callback; } }, 1); } catch (_) { } } function _getHandleByKey(key) { return _hasGlobalData() ? _getApp().globalData[`zp_handle${key}Callback`] : null; } const interceptor = { handleQuery, _handleQuery, handleFetchParams, _handleFetchParams, handleFetchResult, _handleFetchResult, handleLanguage2Local, _handleLanguage2Local }; const dataHandleModule = { props: { // 自定义初始的pageNo,默认为1 defaultPageNo: { type: Number, default: u.gc("defaultPageNo", 1), observer: function(newVal) { this.pageNo = newVal; } }, // 自定义pageSize,默认为10 defaultPageSize: { type: Number, default: u.gc("defaultPageSize", 10), validator: (value) => { if (value <= 0) u.consoleErr("default-page-size必须大于0!"); return value > 0; } }, // 为保证数据一致,设置当前tab切换时的标识key,并在complete中传递相同key,若二者不一致,则complete将不会生效 dataKey: { type: [Number, String, Object], default: u.gc("dataKey", null) }, // 使用缓存,若开启将自动缓存第一页的数据,默认为否。请注意,因考虑到切换tab时不同tab数据不同的情况,默认仅会缓存组件首次加载时第一次请求到的数据,后续的下拉刷新操作不会更新缓存。 useCache: { type: Boolean, default: u.gc("useCache", false) }, // 使用缓存时缓存的key,用于区分不同列表的缓存数据,useCache为true时必须设置,否则缓存无效 cacheKey: { type: String, default: u.gc("cacheKey", null) }, // 缓存模式,默认仅会缓存组件首次加载时第一次请求到的数据,可设置为always,即代表总是缓存,每次列表刷新(下拉刷新、调用reload等)都会更新缓存 cacheMode: { type: String, default: u.gc("cacheMode", Enum.CacheMode.Default) }, // 自动注入的list名,可自动修改父view(包含ref="paging")中对应name的list值 autowireListName: { type: String, default: u.gc("autowireListName", "") }, // 自动注入的query名,可自动调用父view(包含ref="paging")中的query方法 autowireQueryName: { type: String, default: u.gc("autowireQueryName", "") }, // 获取分页数据Function,功能与@query类似。若设置了fetch则@query将不再触发 fetch: { type: Function, default: null }, // fetch的附加参数,fetch配置后有效 fetchParams: { type: Object, default: u.gc("fetchParams", null) }, // z-paging mounted后自动调用reload方法(mounted后自动调用接口),默认为是 auto: { type: Boolean, default: u.gc("auto", true) }, // 用户下拉刷新时是否触发reload方法,默认为是 reloadWhenRefresh: { type: Boolean, default: u.gc("reloadWhenRefresh", true) }, // reload时自动滚动到顶部,默认为是 autoScrollToTopWhenReload: { type: Boolean, default: u.gc("autoScrollToTopWhenReload", true) }, // reload时立即自动清空原list,默认为是,若立即自动清空,则在reload之后、请求回调之前页面是空白的 autoCleanListWhenReload: { type: Boolean, default: u.gc("autoCleanListWhenReload", true) }, // 列表刷新时自动显示下拉刷新view,默认为否 showRefresherWhenReload: { type: Boolean, default: u.gc("showRefresherWhenReload", false) }, // 列表刷新时自动显示加载更多view,且为加载中状态,默认为否 showLoadingMoreWhenReload: { type: Boolean, default: u.gc("showLoadingMoreWhenReload", false) }, // 组件created时立即触发reload(可解决一些情况下先看到页面再看到loading的问题),auto为true时有效。为否时将在mounted+nextTick后触发reload,默认为否 createdReload: { type: Boolean, default: u.gc("createdReload", false) }, // 本地分页时上拉加载更多延迟时间,单位为毫秒,默认200毫秒 localPagingLoadingTime: { type: [Number, String], default: u.gc("localPagingLoadingTime", 200) }, // 自动拼接complete中传过来的数组(使用聊天记录模式时无效) concat: { type: Boolean, default: u.gc("concat", true) }, // 请求失败是否触发reject,默认为是 callNetworkReject: { type: Boolean, default: u.gc("callNetworkReject", true) }, // 父组件v-model所绑定的list的值 value: { type: Array, default: function() { return []; } }, modelValue: { type: Array, default: function() { return []; } } }, data() { return { currentData: [], totalData: [], realTotalData: [], totalLocalPagingList: [], dataPromiseResultMap: { reload: null, complete: null, localPaging: null }, isSettingCacheList: false, pageNo: 1, currentRefreshPageSize: 0, isLocalPaging: false, isAddedData: false, isTotalChangeFromAddData: false, privateConcat: true, myParentQuery: -1, firstPageLoaded: false, pagingLoaded: false, loaded: false, isUserReload: true, fromEmptyViewReload: false, queryFrom: "", listRendering: false, isHandlingRefreshToPage: false, isFirstPageAndNoMore: false, totalDataChangeThrow: true }; }, computed: { pageSize() { return this.defaultPageSize; }, finalConcat() { return this.concat && this.privateConcat; }, finalUseCache() { if (this.useCache && !this.cacheKey) { u.consoleErr("use-cache为true时,必须设置cache-key,否则缓存无效!"); } return this.useCache && !!this.cacheKey; }, finalCacheKey() { return this.cacheKey ? `${c.cachePrefixKey}-${this.cacheKey}` : null; }, isFirstPage() { return this.pageNo === this.defaultPageNo; } }, watch: { totalData(newVal, oldVal) { this._totalDataChange(newVal, oldVal, this.totalDataChangeThrow); this.totalDataChangeThrow = true; }, currentData(newVal, oldVal) { this._currentDataChange(newVal, oldVal); }, useChatRecordMode(newVal, oldVal) { if (newVal) { this.nLoadingMoreFixedHeight = false; } }, value: { handler(newVal) { if (newVal !== this.totalData) { this.totalDataChangeThrow = false; this.totalData = newVal; } }, immediate: true }, modelValue: { handler(newVal) { if (newVal !== this.totalData) { this.totalDataChangeThrow = false; this.totalData = newVal; } }, immediate: true } }, methods: { // 请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为是否成功(默认为是) complete(data, success = true) { this.customNoMore = -1; return this.addData(data, success); }, //【保证数据一致】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为dataKey,需与:data-key绑定的一致,第三个参数为是否成功(默认为是) completeByKey(data, dataKey = null, success = true) { if (dataKey !== null && this.dataKey !== null && dataKey !== this.dataKey) { this.isFirstPage && this.endRefresh(); return new Promise((resolve2) => resolve2()); } this.customNoMore = -1; return this.addData(data, success); }, //【通过total判断是否有更多数据】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为total(列表总数),第三个参数为是否成功(默认为是) completeByTotal(data, total, success = true) { if (total == "undefined") { this.customNoMore = -1; } else { const dataTypeRes = this._checkDataType(data, success, false); data = dataTypeRes.data; success = dataTypeRes.success; if (total >= 0 && success) { return new Promise((resolve2, reject) => { this.$nextTick(() => { let nomore = false; const realTotalDataCount = this.pageNo == this.defaultPageNo ? 0 : this.realTotalData.length; const dataLength = this.privateConcat ? data.length : 0; let exceedCount = realTotalDataCount + dataLength - total; if (exceedCount >= 0) { nomore = true; exceedCount = this.defaultPageSize - exceedCount; if (this.privateConcat && exceedCount > 0 && exceedCount < data.length) { data = data.splice(0, exceedCount); } } this.completeByNoMore(data, nomore, success).then((res) => resolve2(res)).catch(() => reject()); }); }); } } return this.addData(data, success); }, //【自行判断是否有更多数据】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为是否没有更多数据,第三个参数为是否成功(默认是是) completeByNoMore(data, nomore, success = true) { if (nomore != "undefined") { this.customNoMore = nomore == true ? 1 : 0; } return this.addData(data, success); }, // 请求结束且请求失败时调用,支持传入请求失败原因 completeByError(errorMsg) { this.customerEmptyViewErrorText = errorMsg; return this.complete(false); }, // 与上方complete方法功能一致,新版本中设置服务端回调数组请使用complete方法 addData(data, success = true) { if (!this.fromCompleteEmit) { this.disabledCompleteEmit = true; this.fromCompleteEmit = false; } const currentTimeStamp = u.getTime(); const disTime = currentTimeStamp - this.requestTimeStamp; let minDelay = this.minDelay; if (this.isFirstPage && this.finalShowRefresherWhenReload) { minDelay = Math.max(400, minDelay); } const addDataDalay = this.requestTimeStamp > 0 && disTime < minDelay ? minDelay - disTime : 0; this.$nextTick(() => { u.delay(() => { this._addData(data, success, false); }, this.delay > 0 ? this.delay : addDataDalay); }); return new Promise((resolve2, reject) => { this.dataPromiseResultMap.complete = { resolve: resolve2, reject }; }); }, // 从顶部添加数据,不会影响分页的pageNo和pageSize addDataFromTop(data, toTop = true, toTopWithAnimate = true) { let addFromTop = !this.isChatRecordModeAndNotInversion; data = Object.prototype.toString.call(data) !== "[object Array]" ? [data] : addFromTop ? data.reverse() : data; this.finalUseVirtualList && this._setCellIndex(data, "top"); this.totalData = addFromTop ? [...data, ...this.totalData] : [...this.totalData, ...data]; if (toTop) { u.delay(() => this.useChatRecordMode ? this.scrollToBottom(toTopWithAnimate) : this.scrollToTop(toTopWithAnimate)); } }, // 重新设置列表数据,调用此方法不会影响pageNo和pageSize,也不会触发请求。适用场景:当需要删除列表中某一项时,将删除对应项后的数组通过此方法传递给z-paging。(当出现类似的需要修改列表数组的场景时,请使用此方法,请勿直接修改page中:list.sync绑定的数组) resetTotalData(data) { this.isTotalChangeFromAddData = true; data = Object.prototype.toString.call(data) !== "[object Array]" ? [data] : data; this.totalData = data; }, // 设置本地分页数据,请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging作分页处理(若调用了此方法,则上拉加载更多时内部会自动分页,不会触发@query所绑定的事件) setLocalPaging(data, success = true) { this.isLocalPaging = true; this.$nextTick(() => { this._addData(data, success, true); }); return new Promise((resolve2, reject) => { this.dataPromiseResultMap.localPaging = { resolve: resolve2, reject }; }); }, // 重新加载分页数据,pageNo会恢复为默认值,相当于下拉刷新的效果(animate为true时会展示下拉刷新动画,默认为false) reload(animate = this.showRefresherWhenReload) { if (animate) { this.privateShowRefresherWhenReload = animate; this.isUserPullDown = true; } if (!this.showLoadingMoreWhenReload) { this.listRendering = true; } this.$nextTick(() => { this._preReload(animate, false); }); return new Promise((resolve2, reject) => { this.dataPromiseResultMap.reload = { resolve: resolve2, reject }; }); }, // 刷新列表数据,pageNo和pageSize不会重置,列表数据会重新从服务端获取。必须保证@query绑定的方法中的pageNo和pageSize和传给服务端的一致 refresh() { return this._handleRefreshWithDisPageNo(this.pageNo - this.defaultPageNo + 1); }, // 刷新列表数据至指定页,例如pageNo=5时则代表刷新列表至第5页,此时pageNo会变为5,列表会展示前5页的数据。必须保证@query绑定的方法中的pageNo和pageSize和传给服务端的一致 refreshToPage(pageNo) { this.isHandlingRefreshToPage = true; return this._handleRefreshWithDisPageNo(pageNo + this.defaultPageNo - 1); }, // 手动更新列表缓存数据,将自动截取v-model绑定的list中的前pageSize条覆盖缓存,请确保在list数据更新到预期结果后再调用此方法 updateCache() { if (this.finalUseCache && this.totalData.length) { this._saveLocalCache(this.totalData.slice(0, Math.min(this.totalData.length, this.pageSize))); } }, // 清空分页数据 clean() { this._reload(true); this._addData([], true, false); }, // 清空分页数据 clear() { this.clean(); }, // reload之前的一些处理 _preReload(animate = this.showRefresherWhenReload, isFromMounted = true, retryCount = 0) { const showRefresher = this.finalRefresherEnabled && this.useCustomRefresher; if (this.customRefresherHeight === -1 && showRefresher) { u.delay(() => { retryCount++; if (retryCount % 10 === 0) { this._updateCustomRefresherHeight(); } this._preReload(animate, isFromMounted, retryCount); }, c.delayTime / 2); return; } this.isUserReload = true; this.loadingType = Enum.LoadingType.Refresher; if (animate) { this.privateShowRefresherWhenReload = animate; if (this.useCustomRefresher) { this._doRefresherRefreshAnimate(); } else { this.refresherTriggered = true; } } else { this._refresherEnd(false, false, false, false); } this._reload(false, isFromMounted); }, // 重新加载分页数据 _reload(isClean = false, isFromMounted = false, isUserPullDown = false) { this.isAddedData = false; this.insideOfPaging = -1; this.cacheScrollNodeHeight = -1; this.pageNo = this.defaultPageNo; this._cleanRefresherEndTimeout(); !this.privateShowRefresherWhenReload && !isClean && this._startLoading(true); this.firstPageLoaded = true; this.isTotalChangeFromAddData = false; if (!this.isSettingCacheList) { this.totalData = []; } if (!isClean) { this._emitQuery(this.pageNo, this.defaultPageSize, isUserPullDown ? Enum.QueryFrom.UserPullDown : Enum.QueryFrom.Reload); let delay2 = 0; u.delay(this._callMyParentQuery, delay2); if (!isFromMounted && this.autoScrollToTopWhenReload) { this._scrollToTop(false); } } }, // 处理服务端返回的数组 _addData(data, success, isLocal) { this.isAddedData = true; this.fromEmptyViewReload = false; this.isTotalChangeFromAddData = true; this.refresherTriggered = false; this._endSystemLoadingAndRefresh(); const tempIsUserPullDown = this.isUserPullDown; if (this.showRefresherUpdateTime && this.isFirstPage) { u.setRefesrherTime(u.getTime(), this.refresherUpdateTimeKey); this.$refs.refresh && this.$refs.refresh.updateTime(); } if (!isLocal && tempIsUserPullDown && this.isFirstPage) { this.isUserPullDown = false; } this.listRendering = true; this.$nextTick(() => { u.delay(() => this.listRendering = false); }); let dataTypeRes = this._checkDataType(data, success, isLocal); data = dataTypeRes.data; success = dataTypeRes.success; let delayTime = c.delayTime; if (this.useChatRecordMode) delayTime = 0; this.loadingForNow = false; u.delay(() => { this.pagingLoaded = true; this.$nextTick(() => { !isLocal && this._refresherEnd(delayTime > 0, true, tempIsUserPullDown); }); }); if (this.isFirstPage) { this.isLoadFailed = !success; this.$emit("isLoadFailedChange", this.isLoadFailed); if (this.finalUseCache && success && (this.cacheMode === Enum.CacheMode.Always ? true : this.isSettingCacheList)) { this._saveLocalCache(data); } } this.isSettingCacheList = false; if (success) { if (!(this.privateConcat === false && !this.isHandlingRefreshToPage && this.loadingStatus === Enum.More.NoMore)) { this.loadingStatus = Enum.More.Default; } if (isLocal) { this.totalLocalPagingList = data; const localPageNo = this.defaultPageNo; const localPageSize = this.queryFrom !== Enum.QueryFrom.Refresh ? this.defaultPageSize : this.currentRefreshPageSize; this._localPagingQueryList(localPageNo, localPageSize, 0, (res) => { u.delay(() => { this.completeByTotal(res, this.totalLocalPagingList.length); }, 0); }); } else { let dataChangeDelayTime = 0; u.delay(() => { this._currentDataChange(data, this.currentData); this._callDataPromise(true, this.totalData); }, dataChangeDelayTime); } if (this.isHandlingRefreshToPage) { this.isHandlingRefreshToPage = false; this.pageNo = this.defaultPageNo + Math.ceil(data.length / this.pageSize) - 1; if (data.length % this.pageSize !== 0) { this.customNoMore = 1; } } } else { this._currentDataChange(data, this.currentData); this._callDataPromise(false); this.loadingStatus = Enum.More.Fail; this.isHandlingRefreshToPage = false; if (this.loadingType === Enum.LoadingType.LoadMore) { this.pageNo--; } } }, // 所有数据改变时调用 _totalDataChange(newVal, oldVal, eventThrow = true) { if ((!this.isUserReload || !this.autoCleanListWhenReload) && this.firstPageLoaded && !newVal.length && oldVal.length) { return; } this._doCheckScrollViewShouldFullHeight(newVal); if (!this.realTotalData.length && !newVal.length) { eventThrow = false; } this.realTotalData = newVal; if (eventThrow) { this.$emit("input", newVal); this.$emit("update:modelValue", newVal); this.$emit("update:list", newVal); this.$emit("listChange", newVal); this._callMyParentList(newVal); } this.firstPageLoaded = false; this.isTotalChangeFromAddData = false; this.$nextTick(() => { u.delay(() => { this._getNodeClientRect(".zp-paging-container-content").then((res) => { res && this.$emit("contentHeightChanged", res[0].height); }); }, c.delayTime * (this.isIos ? 1 : 3)); }); }, // 当前数据改变时调用 _currentDataChange(newVal, oldVal) { newVal = [...newVal]; this.finalUseVirtualList && this._setCellIndex(newVal, "bottom"); if (this.isFirstPage && this.finalConcat) { this.totalData = []; } if (this.customNoMore !== -1) { if (this.customNoMore === 1 || this.customNoMore !== 0 && !newVal.length) { this.loadingStatus = Enum.More.NoMore; } } else { if (!newVal.length || newVal.length && newVal.length < this.defaultPageSize) { this.loadingStatus = Enum.More.NoMore; } } if (!this.totalData.length) { this.totalData = newVal; } else { if (this.finalConcat) { this.oldScrollTop; this.totalData = [...this.totalData, ...newVal]; } else { this.totalData = newVal; } } this.privateConcat = true; }, // 根据pageNo处理refresh操作 _handleRefreshWithDisPageNo(pageNo) { if (!this.isHandlingRefreshToPage && !this.realTotalData.length) return this.reload(); if (pageNo >= 1) { this.loading = true; this.privateConcat = false; const totalPageSize = pageNo * this.pageSize; this.currentRefreshPageSize = totalPageSize; if (this.isLocalPaging && this.isHandlingRefreshToPage) { this._localPagingQueryList(this.defaultPageNo, totalPageSize, 0, (res) => { this.complete(res); }); } else { this._emitQuery(this.defaultPageNo, totalPageSize, Enum.QueryFrom.Refresh); this._callMyParentQuery(this.defaultPageNo, totalPageSize); } } return new Promise((resolve2, reject) => { this.dataPromiseResultMap.reload = { resolve: resolve2, reject }; }); }, // 本地分页请求 _localPagingQueryList(pageNo, pageSize, localPagingLoadingTime, callback) { pageNo = Math.max(1, pageNo); pageSize = Math.max(1, pageSize); const totalPagingList = [...this.totalLocalPagingList]; const pageNoIndex = (pageNo - 1) * pageSize; const finalPageNoIndex = Math.min(totalPagingList.length, pageNoIndex + pageSize); const resultPagingList = totalPagingList.splice(pageNoIndex, finalPageNoIndex - pageNoIndex); u.delay(() => callback(resultPagingList), localPagingLoadingTime); }, // 存储列表缓存数据 _saveLocalCache(data) { uni.setStorageSync(this.finalCacheKey, data); }, // 通过缓存数据填充列表数据 _setListByLocalCache() { this.totalData = uni.getStorageSync(this.finalCacheKey) || []; this.isSettingCacheList = true; }, // 修改父view的list _callMyParentList(newVal) { if (this.autowireListName.length) { const myParent = u.getParent(this.$parent); if (myParent && myParent[this.autowireListName]) { myParent[this.autowireListName] = newVal; } } }, // 调用父view的query _callMyParentQuery(customPageNo = 0, customPageSize = 0) { if (this.autowireQueryName) { if (this.myParentQuery === -1) { const myParent = u.getParent(this.$parent); if (myParent && myParent[this.autowireQueryName]) { this.myParentQuery = myParent[this.autowireQueryName]; } } if (this.myParentQuery !== -1) { customPageSize > 0 ? this.myParentQuery(customPageNo, customPageSize) : this.myParentQuery(this.pageNo, this.defaultPageSize); } } }, // emit query事件 _emitQuery(pageNo, pageSize, from) { this.queryFrom = from; this.requestTimeStamp = u.getTime(); const [lastItem] = this.realTotalData.slice(-1); if (this.fetch) { const fetchParams = interceptor._handleFetchParams({ pageNo, pageSize, from, lastItem: lastItem || null }, this.fetchParams); const fetchResult = this.fetch(fetchParams); if (!interceptor._handleFetchResult(fetchResult, this, fetchParams)) { u.isPromise(fetchResult) ? fetchResult.then((res) => { this.complete(res); }).catch((err) => { this.complete(false); }) : this.complete(fetchResult); } } else { this.$emit("query", ...interceptor._handleQuery(pageNo, pageSize, from, lastItem || null)); } }, // 触发数据改变promise _callDataPromise(success, totalList) { for (const key in this.dataPromiseResultMap) { const obj = this.dataPromiseResultMap[key]; if (!obj) continue; success ? obj.resolve({ totalList, noMore: this.loadingStatus === Enum.More.NoMore }) : this.callNetworkReject && obj.reject(`z-paging-${key}-error`); } }, // 检查complete data的类型 _checkDataType(data, success, isLocal) { const dataType = Object.prototype.toString.call(data); if (dataType === "[object Boolean]") { success = data; data = []; } else if (dataType !== "[object Array]") { data = []; if (dataType !== "[object Undefined]" && dataType !== "[object Null]") { u.consoleErr(`${isLocal ? "setLocalPaging" : "complete"}参数类型不正确,第一个参数类型必须为Array!`); } } return { data, success }; } } }; const isObject$1 = (val) => val !== null && typeof val === "object"; const defaultDelimiters = ["{", "}"]; class BaseFormatter { constructor() { this._caches = /* @__PURE__ */ Object.create(null); } interpolate(message, values, delimiters = defaultDelimiters) { if (!values) { return [message]; } let tokens = this._caches[message]; if (!tokens) { tokens = parse(message, delimiters); this._caches[message] = tokens; } return compile(tokens, values); } } const RE_TOKEN_LIST_VALUE = /^(?:\d)+/; const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/; function parse(format2, [startDelimiter, endDelimiter]) { const tokens = []; let position = 0; let text = ""; while (position < format2.length) { let char = format2[position++]; if (char === startDelimiter) { if (text) { tokens.push({ type: "text", value: text }); } text = ""; let sub = ""; char = format2[position++]; while (char !== void 0 && char !== endDelimiter) { sub += char; char = format2[position++]; } const isClosed = char === endDelimiter; const type2 = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown"; tokens.push({ value: sub, type: type2 }); } else { text += char; } } text && tokens.push({ type: "text", value: text }); return tokens; } function compile(tokens, values) { const compiled = []; let index = 0; const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown"; if (mode === "unknown") { return compiled; } while (index < tokens.length) { const token = tokens[index]; switch (token.type) { case "text": compiled.push(token.value); break; case "list": compiled.push(values[parseInt(token.value, 10)]); break; case "named": if (mode === "named") { compiled.push(values[token.value]); } else { { console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`); } } break; case "unknown": { console.warn(`Detect 'unknown' type of token!`); } break; } index++; } return compiled; } const LOCALE_ZH_HANS = "zh-Hans"; const LOCALE_ZH_HANT = "zh-Hant"; const LOCALE_EN = "en"; const LOCALE_FR = "fr"; const LOCALE_ES = "es"; const hasOwnProperty = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty.call(val, key); const defaultFormatter = new BaseFormatter(); function include(str, parts) { return !!parts.find((part) => str.indexOf(part) !== -1); } function startsWith(str, parts) { return parts.find((part) => str.indexOf(part) === 0); } function normalizeLocale(locale, messages2) { if (!locale) { return; } locale = locale.trim().replace(/_/g, "-"); if (messages2 && messages2[locale]) { return locale; } locale = locale.toLowerCase(); if (locale === "chinese") { return LOCALE_ZH_HANS; } if (locale.indexOf("zh") === 0) { if (locale.indexOf("-hans") > -1) { return LOCALE_ZH_HANS; } if (locale.indexOf("-hant") > -1) { return LOCALE_ZH_HANT; } if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) { return LOCALE_ZH_HANT; } return LOCALE_ZH_HANS; } let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES]; if (messages2 && Object.keys(messages2).length > 0) { locales = Object.keys(messages2); } const lang = startsWith(locale, locales); if (lang) { return lang; } } class I18n { constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) { this.locale = LOCALE_EN; this.fallbackLocale = LOCALE_EN; this.message = {}; this.messages = {}; this.watchers = []; if (fallbackLocale) { this.fallbackLocale = fallbackLocale; } this.formater = formater2 || defaultFormatter; this.messages = messages2 || {}; this.setLocale(locale || LOCALE_EN); if (watcher) { this.watchLocale(watcher); } } setLocale(locale) { const oldLocale = this.locale; this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale; if (!this.messages[this.locale]) { this.messages[this.locale] = {}; } this.message = this.messages[this.locale]; if (oldLocale !== this.locale) { this.watchers.forEach((watcher) => { watcher(this.locale, oldLocale); }); } } getLocale() { return this.locale; } watchLocale(fn) { const index = this.watchers.push(fn) - 1; return () => { this.watchers.splice(index, 1); }; } add(locale, message, override = true) { const curMessages = this.messages[locale]; if (curMessages) { if (override) { Object.assign(curMessages, message); } else { Object.keys(message).forEach((key) => { if (!hasOwn(curMessages, key)) { curMessages[key] = message[key]; } }); } } else { this.messages[locale] = message; } } f(message, values, delimiters) { return this.formater.interpolate(message, values, delimiters).join(""); } t(key, locale, values) { let message = this.message; if (typeof locale === "string") { locale = normalizeLocale(locale, this.messages); locale && (message = this.messages[locale]); } else { values = locale; } if (!hasOwn(message, key)) { console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`); return key; } return this.formater.interpolate(message[key], values).join(""); } } function watchAppLocale(appVm, i18n2) { if (appVm.$watchLocale) { appVm.$watchLocale((newLocale) => { i18n2.setLocale(newLocale); }); } else { appVm.$watch(() => appVm.$locale, (newLocale) => { i18n2.setLocale(newLocale); }); } } function getDefaultLocale() { if (typeof uni !== "undefined" && uni.getLocale) { return uni.getLocale(); } if (typeof global !== "undefined" && global.getLocale) { return global.getLocale(); } return LOCALE_EN; } function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) { if (typeof locale !== "string") { const options = [ messages2, locale ]; locale = options[0]; messages2 = options[1]; } if (typeof locale !== "string") { locale = getDefaultLocale(); } if (typeof fallbackLocale !== "string") { fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN; } const i18n2 = new I18n({ locale, fallbackLocale, messages: messages2, watcher }); let t2 = (key, values) => { if (typeof getApp !== "function") { t2 = function(key2, values2) { return i18n2.t(key2, values2); }; } else { let isWatchedAppLocale = false; t2 = function(key2, values2) { const appVm = getApp().$vm; if (appVm) { appVm.$locale; if (!isWatchedAppLocale) { isWatchedAppLocale = true; watchAppLocale(appVm, i18n2); } } return i18n2.t(key2, values2); }; } return t2(key, values); }; return { i18n: i18n2, f(message, values, delimiters) { return i18n2.f(message, values, delimiters); }, t(key, values) { return t2(key, values); }, add(locale2, message, override = true) { return i18n2.add(locale2, message, override); }, watch(fn) { return i18n2.watchLocale(fn); }, getLocale() { return i18n2.getLocale(); }, setLocale(newLocale) { return i18n2.setLocale(newLocale); } }; } const en = { "zp.refresher.default": "Pull down to refresh", "zp.refresher.pulling": "Release to refresh", "zp.refresher.refreshing": "Refreshing...", "zp.refresher.complete": "Refresh succeeded", "zp.refresher.f2": "Refresh to enter 2f", "zp.loadingMore.default": "Click to load more", "zp.loadingMore.loading": "Loading...", "zp.loadingMore.noMore": "No more data", "zp.loadingMore.fail": "Load failed,click to reload", "zp.emptyView.title": "No data", "zp.emptyView.reload": "Reload", "zp.emptyView.error": "Sorry,load failed", "zp.refresherUpdateTime.title": "Last update: ", "zp.refresherUpdateTime.none": "None", "zp.refresherUpdateTime.today": "Today", "zp.refresherUpdateTime.yesterday": "Yesterday", "zp.systemLoading.title": "Loading..." }; const zhHans = { "zp.refresher.default": "继续下拉刷新", "zp.refresher.pulling": "松开立即刷新", "zp.refresher.refreshing": "正在刷新...", "zp.refresher.complete": "刷新成功", "zp.refresher.f2": "松手进入二楼", "zp.loadingMore.default": "点击加载更多", "zp.loadingMore.loading": "正在加载...", "zp.loadingMore.noMore": "没有更多了", "zp.loadingMore.fail": "加载失败,点击重新加载", "zp.emptyView.title": "没有数据哦~", "zp.emptyView.reload": "重新加载", "zp.emptyView.error": "很抱歉,加载失败", "zp.refresherUpdateTime.title": "最后更新:", "zp.refresherUpdateTime.none": "无", "zp.refresherUpdateTime.today": "今天", "zp.refresherUpdateTime.yesterday": "昨天", "zp.systemLoading.title": "加载中..." }; const zhHant = { "zp.refresher.default": "繼續下拉重繪", "zp.refresher.pulling": "鬆開立即重繪", "zp.refresher.refreshing": "正在重繪...", "zp.refresher.complete": "重繪成功", "zp.refresher.f2": "鬆手進入二樓", "zp.loadingMore.default": "點擊加載更多", "zp.loadingMore.loading": "正在加載...", "zp.loadingMore.noMore": "沒有更多了", "zp.loadingMore.fail": "加載失敗,點擊重新加載", "zp.emptyView.title": "沒有數據哦~", "zp.emptyView.reload": "重新加載", "zp.emptyView.error": "很抱歉,加載失敗", "zp.refresherUpdateTime.title": "最後更新:", "zp.refresherUpdateTime.none": "無", "zp.refresherUpdateTime.today": "今天", "zp.refresherUpdateTime.yesterday": "昨天", "zp.systemLoading.title": "加載中..." }; const messages$1 = { en, "zh-Hans": zhHans, "zh-Hant": zhHant }; const { t: t$2 } = initVueI18n(messages$1); const i18nModule = { computed: { finalLanguage() { try { const local = uni.getLocale(); const language = this.systemInfo.appLanguage; return local === "auto" ? interceptor._handleLanguage2Local(language, this._language2Local(language)) : local; } catch (e) { return "zh-Hans"; } }, // 最终的下拉刷新默认状态的文字 finalRefresherDefaultText() { return this._getI18nText("zp.refresher.default", this.refresherDefaultText); }, // 最终的下拉刷新下拉中的文字 finalRefresherPullingText() { return this._getI18nText("zp.refresher.pulling", this.refresherPullingText); }, // 最终的下拉刷新中文字 finalRefresherRefreshingText() { return this._getI18nText("zp.refresher.refreshing", this.refresherRefreshingText); }, // 最终的下拉刷新完成文字 finalRefresherCompleteText() { return this._getI18nText("zp.refresher.complete", this.refresherCompleteText); }, // 最终的下拉刷新上次更新时间文字 finalRefresherUpdateTimeTextMap() { return { title: t$2("zp.refresherUpdateTime.title"), none: t$2("zp.refresherUpdateTime.none"), today: t$2("zp.refresherUpdateTime.today"), yesterday: t$2("zp.refresherUpdateTime.yesterday") }; }, // 最终的继续下拉进入二楼文字 finalRefresherGoF2Text() { return this._getI18nText("zp.refresher.f2", this.refresherGoF2Text); }, // 最终的底部加载更多默认状态文字 finalLoadingMoreDefaultText() { return this._getI18nText("zp.loadingMore.default", this.loadingMoreDefaultText); }, // 最终的底部加载更多加载中文字 finalLoadingMoreLoadingText() { return this._getI18nText("zp.loadingMore.loading", this.loadingMoreLoadingText); }, // 最终的底部加载更多没有更多数据文字 finalLoadingMoreNoMoreText() { return this._getI18nText("zp.loadingMore.noMore", this.loadingMoreNoMoreText); }, // 最终的底部加载更多加载失败文字 finalLoadingMoreFailText() { return this._getI18nText("zp.loadingMore.fail", this.loadingMoreFailText); }, // 最终的空数据图title finalEmptyViewText() { return this.isLoadFailed ? this.finalEmptyViewErrorText : this._getI18nText("zp.emptyView.title", this.emptyViewText); }, // 最终的空数据图reload title finalEmptyViewReloadText() { return this._getI18nText("zp.emptyView.reload", this.emptyViewReloadText); }, // 最终的空数据图加载失败文字 finalEmptyViewErrorText() { return this.customerEmptyViewErrorText || this._getI18nText("zp.emptyView.error", this.emptyViewErrorText); }, // 最终的系统loading title finalSystemLoadingText() { return this._getI18nText("zp.systemLoading.title", this.systemLoadingText); } }, methods: { // 获取当前z-paging的语言 getLanguage() { return this.finalLanguage; }, // 获取国际化转换后的文本 _getI18nText(key, value) { const dataType = Object.prototype.toString.call(value); if (dataType === "[object Object]") { const nextValue = value[this.finalLanguage]; if (nextValue) return nextValue; } else if (dataType === "[object String]") { return value; } return t$2(key); }, // 系统language转i18n local _language2Local(language) { const formatedLanguage = language.toLowerCase().replace(new RegExp("_", ""), "-"); if (formatedLanguage.indexOf("zh") !== -1) { if (formatedLanguage === "zh" || formatedLanguage === "zh-cn" || formatedLanguage.indexOf("zh-hans") !== -1) { return "zh-Hans"; } return "zh-Hant"; } if (formatedLanguage.indexOf("en") !== -1) return "en"; return language; } } }; const nvueModule = { props: {}, data() { return { nRefresherLoading: false, nListIsDragging: false, nShowBottom: true, nFixFreezing: false, nShowRefresherReveal: false, nLoadingMoreFixedHeight: false, nShowRefresherRevealHeight: 0, nOldShowRefresherRevealHeight: -1, nRefresherWidth: u.rpx2px(750), nF2Opacity: 0 }; }, computed: {}, mounted() { }, methods: {} }; const emptyModule = { props: { // 是否强制隐藏空数据图,默认为否 hideEmptyView: { type: Boolean, default: u.gc("hideEmptyView", false) }, // 空数据图描述文字,默认为“没有数据哦~” emptyViewText: { type: [String, Object], default: u.gc("emptyViewText", null) }, // 是否显示空数据图重新加载按钮(无数据时),默认为否 showEmptyViewReload: { type: Boolean, default: u.gc("showEmptyViewReload", false) }, // 加载失败时是否显示空数据图重新加载按钮,默认为是 showEmptyViewReloadWhenError: { type: Boolean, default: u.gc("showEmptyViewReloadWhenError", true) }, // 空数据图点击重新加载文字,默认为“重新加载” emptyViewReloadText: { type: [String, Object], default: u.gc("emptyViewReloadText", null) }, // 空数据图图片,默认使用z-paging内置的图片 emptyViewImg: { type: String, default: u.gc("emptyViewImg", "") }, // 空数据图“加载失败”描述文字,默认为“很抱歉,加载失败” emptyViewErrorText: { type: [String, Object], default: u.gc("emptyViewErrorText", null) }, // 空数据图“加载失败”图片,默认使用z-paging内置的图片 emptyViewErrorImg: { type: String, default: u.gc("emptyViewErrorImg", "") }, // 空数据图样式 emptyViewStyle: { type: Object, default: u.gc("emptyViewStyle", {}) }, // 空数据图容器样式 emptyViewSuperStyle: { type: Object, default: u.gc("emptyViewSuperStyle", {}) }, // 空数据图img样式 emptyViewImgStyle: { type: Object, default: u.gc("emptyViewImgStyle", {}) }, // 空数据图描述文字样式 emptyViewTitleStyle: { type: Object, default: u.gc("emptyViewTitleStyle", {}) }, // 空数据图重新加载按钮样式 emptyViewReloadStyle: { type: Object, default: u.gc("emptyViewReloadStyle", {}) }, // 空数据图片是否铺满z-paging,默认为否,即填充满z-paging内列表(滚动区域)部分。若设置为否,则为填铺满整个z-paging emptyViewFixed: { type: Boolean, default: u.gc("emptyViewFixed", false) }, // 空数据图片是否垂直居中,默认为是,若设置为否即为从空数据容器顶部开始显示。emptyViewFixed为false时有效 emptyViewCenter: { type: Boolean, default: u.gc("emptyViewCenter", true) }, // 加载中时是否自动隐藏空数据图,默认为是 autoHideEmptyViewWhenLoading: { type: Boolean, default: u.gc("autoHideEmptyViewWhenLoading", true) }, // 用户下拉列表触发下拉刷新加载中时是否自动隐藏空数据图,默认为是 autoHideEmptyViewWhenPull: { type: Boolean, default: u.gc("autoHideEmptyViewWhenPull", true) }, // 空数据view的z-index,默认为9 emptyViewZIndex: { type: Number, default: u.gc("emptyViewZIndex", 9) } }, data() { return { customerEmptyViewErrorText: "" }; }, computed: { finalEmptyViewImg() { return this.isLoadFailed ? this.emptyViewErrorImg : this.emptyViewImg; }, finalShowEmptyViewReload() { return this.isLoadFailed ? this.showEmptyViewReloadWhenError : this.showEmptyViewReload; }, // 是否展示空数据图 showEmpty() { if (this.refresherOnly || this.hideEmptyView || this.realTotalData.length) return false; if (this.autoHideEmptyViewWhenLoading) { if (this.isAddedData && !this.firstPageLoaded && !this.loading) return true; } else { return true; } return !this.autoHideEmptyViewWhenPull && !this.isUserReload; } }, methods: { // 点击了空数据view重新加载按钮 _emptyViewReload() { let callbacked = false; this.$emit("emptyViewReload", (reload) => { if (reload === void 0 || reload === true) { this.fromEmptyViewReload = true; this.reload().catch(() => { }); } callbacked = true; }); this.$nextTick(() => { if (!callbacked) { this.fromEmptyViewReload = true; this.reload().catch(() => { }); } }); }, // 点击了空数据view _emptyViewClick() { this.$emit("emptyViewClick"); } } }; const refresherModule = { props: { // 下拉刷新的主题样式,支持black,white,默认black refresherThemeStyle: { type: String, default: u.gc("refresherThemeStyle", "") }, // 自定义下拉刷新中左侧图标的样式 refresherImgStyle: { type: Object, default: u.gc("refresherImgStyle", {}) }, // 自定义下拉刷新中右侧状态描述文字的样式 refresherTitleStyle: { type: Object, default: u.gc("refresherTitleStyle", {}) }, // 自定义下拉刷新中右侧最后更新时间文字的样式(show-refresher-update-time为true时有效) refresherUpdateTimeStyle: { type: Object, default: u.gc("refresherUpdateTimeStyle", {}) }, // 在微信小程序和QQ小程序中,是否实时监听下拉刷新中进度,默认为否 watchRefresherTouchmove: { type: Boolean, default: u.gc("watchRefresherTouchmove", false) }, // 底部加载更多的主题样式,支持black,white,默认black loadingMoreThemeStyle: { type: String, default: u.gc("loadingMoreThemeStyle", "") }, // 是否只使用下拉刷新,设置为true后将关闭mounted自动请求数据、关闭滚动到底部加载更多,强制隐藏空数据图。默认为否 refresherOnly: { type: Boolean, default: u.gc("refresherOnly", false) }, // 自定义下拉刷新默认状态下回弹动画时间,单位为毫秒,默认为100毫秒,nvue无效 refresherDefaultDuration: { type: [Number, String], default: u.gc("refresherDefaultDuration", 100) }, // 自定义下拉刷新结束以后延迟回弹的时间,单位为毫秒,默认为0 refresherCompleteDelay: { type: [Number, String], default: u.gc("refresherCompleteDelay", 0) }, // 自定义下拉刷新结束回弹动画时间,单位为毫秒,默认为300毫秒(refresherEndBounceEnabled为false时,refresherCompleteDuration为设定值的1/3),nvue无效 refresherCompleteDuration: { type: [Number, String], default: u.gc("refresherCompleteDuration", 300) }, // 自定义下拉刷新中是否允许列表滚动,默认为是 refresherRefreshingScrollable: { type: Boolean, default: u.gc("refresherRefreshingScrollable", true) }, // 自定义下拉刷新结束状态下是否允许列表滚动,默认为否 refresherCompleteScrollable: { type: Boolean, default: u.gc("refresherCompleteScrollable", false) }, // 是否使用自定义的下拉刷新,默认为是,即使用z-paging的下拉刷新。设置为false即代表使用uni scroll-view自带的下拉刷新,h5、App、微信小程序以外的平台不支持uni scroll-view自带的下拉刷新 useCustomRefresher: { type: Boolean, default: u.gc("useCustomRefresher", true) }, // 自定义下拉刷新下拉帧率,默认为40,过高可能会出现抖动问题 refresherFps: { type: [Number, String], default: u.gc("refresherFps", 40) }, // 自定义下拉刷新允许触发的最大下拉角度,默认为40度,当下拉角度小于设定值时,自定义下拉刷新动画不会被触发 refresherMaxAngle: { type: [Number, String], default: u.gc("refresherMaxAngle", 40) }, // 自定义下拉刷新的角度由未达到最大角度变到达到最大角度时,是否继续下拉刷新手势,默认为否 refresherAngleEnableChangeContinued: { type: Boolean, default: u.gc("refresherAngleEnableChangeContinued", false) }, // 自定义下拉刷新默认状态下的文字 refresherDefaultText: { type: [String, Object], default: u.gc("refresherDefaultText", null) }, // 自定义下拉刷新松手立即刷新状态下的文字 refresherPullingText: { type: [String, Object], default: u.gc("refresherPullingText", null) }, // 自定义下拉刷新刷新中状态下的文字 refresherRefreshingText: { type: [String, Object], default: u.gc("refresherRefreshingText", null) }, // 自定义下拉刷新刷新结束状态下的文字 refresherCompleteText: { type: [String, Object], default: u.gc("refresherCompleteText", null) }, // 自定义继续下拉进入二楼文字 refresherGoF2Text: { type: [String, Object], default: u.gc("refresherGoF2Text", null) }, // 自定义下拉刷新默认状态下的图片 refresherDefaultImg: { type: String, default: u.gc("refresherDefaultImg", null) }, // 自定义下拉刷新松手立即刷新状态下的图片,默认与refresherDefaultImg一致 refresherPullingImg: { type: String, default: u.gc("refresherPullingImg", null) }, // 自定义下拉刷新刷新中状态下的图片 refresherRefreshingImg: { type: String, default: u.gc("refresherRefreshingImg", null) }, // 自定义下拉刷新刷新结束状态下的图片 refresherCompleteImg: { type: String, default: u.gc("refresherCompleteImg", null) }, // 自定义下拉刷新刷新中状态下是否展示旋转动画 refresherRefreshingAnimated: { type: Boolean, default: u.gc("refresherRefreshingAnimated", true) }, // 是否开启自定义下拉刷新刷新结束回弹效果,默认为是 refresherEndBounceEnabled: { type: Boolean, default: u.gc("refresherEndBounceEnabled", true) }, // 是否开启自定义下拉刷新,默认为是 refresherEnabled: { type: Boolean, default: u.gc("refresherEnabled", true) }, // 设置自定义下拉刷新阈值,默认为80rpx refresherThreshold: { type: [Number, String], default: u.gc("refresherThreshold", "80rpx") }, // 设置系统下拉刷新默认样式,支持设置 black,white,none,none 表示不使用默认样式,默认为black refresherDefaultStyle: { type: String, default: u.gc("refresherDefaultStyle", "black") }, // 设置自定义下拉刷新区域背景 refresherBackground: { type: String, default: u.gc("refresherBackground", "transparent") }, // 设置固定的自定义下拉刷新区域背景 refresherFixedBackground: { type: String, default: u.gc("refresherFixedBackground", "transparent") }, // 设置固定的自定义下拉刷新区域高度,默认为0 refresherFixedBacHeight: { type: [Number, String], default: u.gc("refresherFixedBacHeight", 0) }, // 设置自定义下拉刷新下拉超出阈值后继续下拉位移衰减的比例,范围0-1,值越大代表衰减越多。默认为0.65(nvue无效) refresherOutRate: { type: Number, default: u.gc("refresherOutRate", 0.65) }, // 是否开启下拉进入二楼功能,默认为否 refresherF2Enabled: { type: Boolean, default: u.gc("refresherF2Enabled", false) }, // 下拉进入二楼阈值,默认为200rpx refresherF2Threshold: { type: [Number, String], default: u.gc("refresherF2Threshold", "200rpx") }, // 下拉进入二楼动画时间,单位为毫秒,默认为200毫秒 refresherF2Duration: { type: [Number, String], default: u.gc("refresherF2Duration", 200) }, // 下拉进入二楼状态松手后是否弹出二楼,默认为是 showRefresherF2: { type: Boolean, default: u.gc("showRefresherF2", true) }, // 设置自定义下拉刷新下拉时实际下拉位移与用户下拉距离的比值,默认为0.75,即代表若用户下拉10px,则实际位移为7.5px(nvue无效) refresherPullRate: { type: Number, default: u.gc("refresherPullRate", 0.75) }, // 是否显示最后更新时间,默认为否 showRefresherUpdateTime: { type: Boolean, default: u.gc("showRefresherUpdateTime", false) }, // 如果需要区别不同页面的最后更新时间,请为不同页面的z-paging的`refresher-update-time-key`设置不同的字符串 refresherUpdateTimeKey: { type: String, default: u.gc("refresherUpdateTimeKey", "default") }, // 下拉刷新时下拉到“松手立即刷新”或“松手进入二楼”状态时是否使手机短振动,默认为否(h5无效) refresherVibrate: { type: Boolean, default: u.gc("refresherVibrate", false) }, // 下拉刷新时是否禁止下拉刷新view跟随用户触摸竖直移动,默认为否。注意此属性只是禁止下拉刷新view移动,其他下拉刷新逻辑依然会正常触发 refresherNoTransform: { type: Boolean, default: u.gc("refresherNoTransform", false) }, // 是否开启下拉刷新状态栏占位,适用于隐藏导航栏时,下拉刷新需要避开状态栏高度的情况,默认为否 useRefresherStatusBarPlaceholder: { type: Boolean, default: u.gc("useRefresherStatusBarPlaceholder", false) } }, data() { return { R: Enum.Refresher, //下拉刷新状态 refresherStatus: Enum.Refresher.Default, refresherTouchstartY: 0, lastRefresherTouchmove: null, refresherReachMaxAngle: true, refresherTransform: "translateY(0px)", refresherTransition: "", finalRefresherDefaultStyle: "black", refresherRevealStackCount: 0, refresherCompleteTimeout: null, refresherCompleteSubTimeout: null, refresherEndTimeout: null, isTouchmovingTimeout: null, refresherTriggered: false, isTouchmoving: false, isTouchEnded: false, isUserPullDown: false, privateRefresherEnabled: -1, privateShowRefresherWhenReload: false, customRefresherHeight: -1, showCustomRefresher: false, doRefreshAnimateAfter: false, isRefresherInComplete: false, showF2: false, f2Transform: "", pullDownTimeStamp: 0, moveDis: 0, oldMoveDis: 0, currentDis: 0, oldCurrentMoveDis: 0, oldRefresherTouchmoveY: 0, oldTouchDirection: "", oldEmitedTouchDirection: "", oldPullingDistance: -1, refresherThresholdUpdateTag: 0 }; }, watch: { refresherDefaultStyle: { handler(newVal) { if (newVal.length) { this.finalRefresherDefaultStyle = newVal; } }, immediate: true }, refresherStatus(newVal) { newVal === Enum.Refresher.Loading && this._cleanRefresherEndTimeout(); this.refresherVibrate && (newVal === Enum.Refresher.ReleaseToRefresh || newVal === Enum.Refresher.GoF2) && this._doVibrateShort(); this.$emit("refresherStatusChange", newVal); this.$emit("update:refresherStatus", newVal); }, // 监听当前下拉刷新启用/禁用状态 refresherEnabled(newVal) { !newVal && this.endRefresh(); } }, computed: { pullDownDisTimeStamp() { return 1e3 / this.refresherFps; }, refresherThresholdUnitConverted() { return u.addUnit(this.refresherThreshold, this.unit); }, finalRefresherEnabled() { if (this.useChatRecordMode) return false; if (this.privateRefresherEnabled === -1) return this.refresherEnabled; return this.privateRefresherEnabled === 1; }, finalRefresherThreshold() { let refresherThreshold = this.refresherThresholdUnitConverted; let idDefault = false; if (refresherThreshold === u.addUnit(80, this.unit)) { idDefault = true; if (this.showRefresherUpdateTime) { refresherThreshold = u.addUnit(120, this.unit); } } if (idDefault && this.customRefresherHeight > 0) return this.customRefresherHeight + this.finalRefresherThresholdPlaceholder; return u.convertToPx(refresherThreshold) + this.finalRefresherThresholdPlaceholder; }, finalRefresherF2Threshold() { return u.convertToPx(u.addUnit(this.refresherF2Threshold, this.unit)); }, finalRefresherThresholdPlaceholder() { return this.useRefresherStatusBarPlaceholder ? this.statusBarHeight : 0; }, finalRefresherFixedBacHeight() { return u.convertToPx(this.refresherFixedBacHeight); }, finalRefresherThemeStyle() { return this.refresherThemeStyle.length ? this.refresherThemeStyle : this.defaultThemeStyle; }, finalRefresherOutRate() { let rate = this.refresherOutRate; rate = Math.max(0, rate); rate = Math.min(1, rate); return rate; }, finalRefresherPullRate() { let rate = this.refresherPullRate; rate = Math.max(0, rate); return rate; }, finalRefresherTransform() { if (this.refresherNoTransform || this.refresherTransform === "translateY(0px)") return "none"; return this.refresherTransform; }, finalShowRefresherWhenReload() { return this.showRefresherWhenReload || this.privateShowRefresherWhenReload; }, finalRefresherTriggered() { if (!(this.finalRefresherEnabled && !this.useCustomRefresher)) return false; return this.refresherTriggered; }, showRefresher() { const showRefresher = this.finalRefresherEnabled || this.useCustomRefresher && !this.useChatRecordMode; this.active && this.customRefresherHeight === -1 && showRefresher && this.updateCustomRefresherHeight(); return showRefresher; }, hasTouchmove() { return this.watchRefresherTouchmove; } }, methods: { // 终止下拉刷新状态 endRefresh() { this.totalData = this.realTotalData; this._refresherEnd(); this._endSystemLoadingAndRefresh(); this._handleScrollViewBounce({ bounce: true }); this.$nextTick(() => { this.refresherTriggered = false; }); }, // 手动更新自定义下拉刷新view高度 updateCustomRefresherHeight() { u.delay(() => this.$nextTick(this._updateCustomRefresherHeight)); }, // 关闭二楼 closeF2() { this._handleCloseF2(); }, // 自定义下拉刷新被触发 _onRefresh(fromScrollView = false, isUserPullDown = true) { if (fromScrollView && !(this.finalRefresherEnabled && !this.useCustomRefresher)) return; this.$emit("onRefresh"); this.$emit("Refresh"); if (this.loading || this.isRefresherInComplete) return; this.loadingType = Enum.LoadingType.Refresher; if (this.nShowRefresherReveal) return; this.isUserPullDown = isUserPullDown; this.isUserReload = !isUserPullDown; this._startLoading(true); this.refresherTriggered = true; if (this.reloadWhenRefresh && isUserPullDown) { this.useChatRecordMode ? this._onLoadingMore("click") : this._reload(false, false, isUserPullDown); } }, // 自定义下拉刷新被复位 _onRestore() { this.refresherTriggered = "restore"; this.$emit("onRestore"); this.$emit("Restore"); }, // 进一步处理touch开始结果 _handleRefresherTouchstart(touch) { if (!this.loading && this.isTouchEnded) { this.isTouchmoving = false; } this.loadingType = Enum.LoadingType.Refresher; this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); this.isTouchEnded = false; this.refresherTransition = ""; this.refresherTouchstartY = touch.touchY; this.$emit("refresherTouchstart", this.refresherTouchstartY); this.lastRefresherTouchmove = touch; this._cleanRefresherCompleteTimeout(); this._cleanRefresherEndTimeout(); }, // 非app-vue或微信小程序或QQ小程序或h5平台,使用js控制下拉刷新 // 进一步处理touch中结果 _handleRefresherTouchmove(moveDis, touch) { this.refresherReachMaxAngle = true; this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); this.isTouchmoving = true; this.isTouchEnded = false; if (moveDis >= this.finalRefresherThreshold) { this.refresherStatus = this.refresherF2Enabled && moveDis >= this.finalRefresherF2Threshold ? Enum.Refresher.GoF2 : Enum.Refresher.ReleaseToRefresh; } else { this.refresherStatus = Enum.Refresher.Default; } this.moveDis = moveDis; }, // 进一步处理touch结束结果 _handleRefresherTouchend(moveDis) { this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); this.refresherReachMaxAngle = true; this.isTouchEnded = true; const refresherThreshold = this.finalRefresherThreshold; if (moveDis >= refresherThreshold && (this.refresherStatus === Enum.Refresher.ReleaseToRefresh || this.refresherStatus === Enum.Refresher.GoF2)) { if (this.refresherStatus === Enum.Refresher.GoF2) { this._handleGoF2(); this._refresherEnd(); } else { u.delay(() => { this._emitTouchmove({ pullingDistance: refresherThreshold, dy: this.moveDis - refresherThreshold }); }, 0.1); this.moveDis = refresherThreshold; this.refresherStatus = Enum.Refresher.Loading; this._doRefresherLoad(); } } else { this._refresherEnd(); this.isTouchmovingTimeout = u.delay(() => { this.isTouchmoving = false; }, this.refresherDefaultDuration); } this.scrollEnable = true; this.$emit("refresherTouchend", moveDis); }, // 处理列表触摸开始事件 _handleListTouchstart() { if (this.useChatRecordMode && this.autoHideKeyboardWhenChat) { uni.hideKeyboard(); this.$emit("hidedKeyboard"); } }, // 处理scroll-view bounce是否生效 _handleScrollViewBounce({ bounce }) { if (!this.usePageScroll && !this.scrollToTopBounceEnabled) { if (this.wxsScrollTop <= 5) { this.refresherTransition = ""; this.scrollEnable = bounce; } else if (bounce) { this.scrollEnable = bounce; } } }, // wxs正在下拉状态改变处理 _handleWxsPullingDownStatusChange(onPullingDown) { this.wxsOnPullingDown = onPullingDown; if (onPullingDown && !this.useChatRecordMode) { this.renderPropScrollTop = 0; } }, // wxs正在下拉处理 _handleWxsPullingDown({ moveDis, diffDis }) { this._emitTouchmove({ pullingDistance: moveDis, dy: diffDis }); }, // wxs触摸方向改变 _handleTouchDirectionChange({ direction }) { this.$emit("touchDirectionChange", direction); }, // wxs通知更新其props _handlePropUpdate() { this.wxsPropType = u.getTime().toString(); }, // 下拉刷新结束 _refresherEnd(shouldEndLoadingDelay = true, fromAddData = false, isUserPullDown = false, setLoading = true) { if (this.loadingType === Enum.LoadingType.Refresher) { const refresherCompleteDelay = fromAddData && (isUserPullDown || this.showRefresherWhenReload) ? this.refresherCompleteDelay : 0; const refresherStatus = refresherCompleteDelay > 0 ? Enum.Refresher.Complete : Enum.Refresher.Default; if (this.finalShowRefresherWhenReload) { const stackCount = this.refresherRevealStackCount; this.refresherRevealStackCount--; if (stackCount > 1) return; } this._cleanRefresherEndTimeout(); this.refresherEndTimeout = u.delay(() => { this.refresherStatus = refresherStatus; if (refresherStatus !== Enum.Refresher.Complete) { this.isRefresherInComplete = false; } }, this.refresherStatus !== Enum.Refresher.Default && refresherStatus === Enum.Refresher.Default ? this.refresherCompleteDuration : 0); if (refresherCompleteDelay > 0) { this.isRefresherInComplete = true; } this._cleanRefresherCompleteTimeout(); this.refresherCompleteTimeout = u.delay(() => { let animateDuration = 1; const animateType = this.refresherEndBounceEnabled && fromAddData ? "cubic-bezier(0.19,1.64,0.42,0.72)" : "linear"; if (fromAddData) { animateDuration = this.refresherEndBounceEnabled ? this.refresherCompleteDuration / 1e3 : this.refresherCompleteDuration / 3e3; } this.refresherTransition = `transform ${fromAddData ? animateDuration : this.refresherDefaultDuration / 1e3}s ${animateType}`; this.wxsPropType = this.refresherTransition + "end" + u.getTime(); this.moveDis = 0; if (refresherStatus === Enum.Refresher.Complete) { if (this.refresherCompleteSubTimeout) { clearTimeout(this.refresherCompleteSubTimeout); this.refresherCompleteSubTimeout = null; } this.refresherCompleteSubTimeout = u.delay(() => { this.$nextTick(() => { this.refresherStatus = Enum.Refresher.Default; this.isRefresherInComplete = false; }); }, animateDuration * 800); } this._emitTouchmove({ pullingDistance: 0, dy: this.moveDis }); }, refresherCompleteDelay); } if (setLoading) { u.delay(() => this.loading = false, shouldEndLoadingDelay ? 10 : 0); isUserPullDown && this._onRestore(); } }, // 处理进入二楼 _handleGoF2() { if (this.showF2 || !this.refresherF2Enabled) return; this.$emit("refresherF2Change", "go"); if (!this.showRefresherF2) return; this.f2Transform = `translateY(${-this.superContentHeight}px)`; this.showF2 = true; u.delay(() => { this.f2Transform = "translateY(0px)"; }, 100, "f2ShowDelay"); }, // 处理退出二楼 _handleCloseF2() { if (!this.showF2 || !this.refresherF2Enabled) return; this.$emit("refresherF2Change", "close"); if (!this.showRefresherF2) return; this.f2Transform = `translateY(${-this.superContentHeight}px)`; u.delay(() => { this.showF2 = false; this.nF2Opacity = 0; }, this.refresherF2Duration, "f2CloseDelay"); }, // 模拟用户手动触发下拉刷新 _doRefresherRefreshAnimate() { this._cleanRefresherCompleteTimeout(); const doRefreshAnimateAfter = !this.doRefreshAnimateAfter && this.finalShowRefresherWhenReload && this.customRefresherHeight === -1 && this.refresherThreshold === u.addUnit(80, this.unit); if (doRefreshAnimateAfter) { this.doRefreshAnimateAfter = true; return; } this.refresherRevealStackCount++; this.wxsPropType = "begin" + u.getTime(); this.moveDis = this.finalRefresherThreshold; this.refresherStatus = Enum.Refresher.Loading; this.isTouchmoving = true; this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); this._doRefresherLoad(false); }, // 触发下拉刷新 _doRefresherLoad(isUserPullDown = true) { this._onRefresh(false, isUserPullDown); this.loading = true; }, // 更新自定义下拉刷新view高度 _updateCustomRefresherHeight() { this._getNodeClientRect(".zp-custom-refresher-slot-view").then((res) => { this.customRefresherHeight = res ? res[0].height : 0; this.showCustomRefresher = this.customRefresherHeight > 0; if (this.doRefreshAnimateAfter) { this.doRefreshAnimateAfter = false; this._doRefresherRefreshAnimate(); } }); }, // emit pullingDown事件 _emitTouchmove(e) { e.viewHeight = this.finalRefresherThreshold; e.rate = e.viewHeight > 0 ? e.pullingDistance / e.viewHeight : 0; this.hasTouchmove && this.oldPullingDistance !== e.pullingDistance && this.$emit("refresherTouchmove", e); this.oldPullingDistance = e.pullingDistance; }, // 清除refresherCompleteTimeout _cleanRefresherCompleteTimeout() { this.refresherCompleteTimeout = this._cleanTimeout(this.refresherCompleteTimeout); }, // 清除refresherEndTimeout _cleanRefresherEndTimeout() { this.refresherEndTimeout = this._cleanTimeout(this.refresherEndTimeout); } } }; const loadMoreModule = { props: { // 自定义底部加载更多样式 loadingMoreCustomStyle: { type: Object, default: u.gc("loadingMoreCustomStyle", {}) }, // 自定义底部加载更多文字样式 loadingMoreTitleCustomStyle: { type: Object, default: u.gc("loadingMoreTitleCustomStyle", {}) }, // 自定义底部加载更多加载中动画样式 loadingMoreLoadingIconCustomStyle: { type: Object, default: u.gc("loadingMoreLoadingIconCustomStyle", {}) }, // 自定义底部加载更多加载中动画图标类型,可选flower或circle,默认为flower loadingMoreLoadingIconType: { type: String, default: u.gc("loadingMoreLoadingIconType", "flower") }, // 自定义底部加载更多加载中动画图标图片 loadingMoreLoadingIconCustomImage: { type: String, default: u.gc("loadingMoreLoadingIconCustomImage", "") }, // 底部加载更多加载中view是否展示旋转动画,默认为是 loadingMoreLoadingAnimated: { type: Boolean, default: u.gc("loadingMoreLoadingAnimated", true) }, // 是否启用加载更多数据(含滑动到底部加载更多数据和点击加载更多数据),默认为是 loadingMoreEnabled: { type: Boolean, default: u.gc("loadingMoreEnabled", true) }, // 是否启用滑动到底部加载更多数据,默认为是 toBottomLoadingMoreEnabled: { type: Boolean, default: u.gc("toBottomLoadingMoreEnabled", true) }, // 滑动到底部状态为默认状态时,以加载中的状态展示,默认为否。若设置为是,可避免滚动到底部看到默认状态然后立刻变为加载中状态的问题,但分页数量未超过一屏时,不会显示【点击加载更多】 loadingMoreDefaultAsLoading: { type: Boolean, default: u.gc("loadingMoreDefaultAsLoading", false) }, // 滑动到底部"默认"文字,默认为【点击加载更多】 loadingMoreDefaultText: { type: [String, Object], default: u.gc("loadingMoreDefaultText", null) }, // 滑动到底部"加载中"文字,默认为【正在加载...】 loadingMoreLoadingText: { type: [String, Object], default: u.gc("loadingMoreLoadingText", null) }, // 滑动到底部"没有更多"文字,默认为【没有更多了】 loadingMoreNoMoreText: { type: [String, Object], default: u.gc("loadingMoreNoMoreText", null) }, // 滑动到底部"加载失败"文字,默认为【加载失败,点击重新加载】 loadingMoreFailText: { type: [String, Object], default: u.gc("loadingMoreFailText", null) }, // 当没有更多数据且分页内容未超出z-paging时是否隐藏没有更多数据的view,默认为否 hideNoMoreInside: { type: Boolean, default: u.gc("hideNoMoreInside", false) }, // 当没有更多数据且分页数组长度少于这个值时,隐藏没有更多数据的view,默认为0,代表不限制。 hideNoMoreByLimit: { type: Number, default: u.gc("hideNoMoreByLimit", 0) }, // 是否显示默认的加载更多text,默认为是 showDefaultLoadingMoreText: { type: Boolean, default: u.gc("showDefaultLoadingMoreText", true) }, // 是否显示没有更多数据的view showLoadingMoreNoMoreView: { type: Boolean, default: u.gc("showLoadingMoreNoMoreView", true) }, // 是否显示没有更多数据的分割线,默认为是 showLoadingMoreNoMoreLine: { type: Boolean, default: u.gc("showLoadingMoreNoMoreLine", true) }, // 自定义底部没有更多数据的分割线样式 loadingMoreNoMoreLineCustomStyle: { type: Object, default: u.gc("loadingMoreNoMoreLineCustomStyle", {}) }, // 当分页未满一屏时,是否自动加载更多,默认为否(nvue无效) insideMore: { type: Boolean, default: u.gc("insideMore", false) }, // 距底部/右边多远时(单位px),触发 scrolltolower 事件,默认为100rpx lowerThreshold: { type: [Number, String], default: u.gc("lowerThreshold", "100rpx") } }, data() { return { M: Enum.More, // 底部加载更多状态 loadingStatus: Enum.More.Default, // 在渲染之后的底部加载更多状态 loadingStatusAfterRender: Enum.More.Default, // 底部加载更多时间戳 loadingMoreTimeStamp: 0, // 底部加载更多slot loadingMoreDefaultSlot: null, // 是否展示底部加载更多 showLoadingMore: false, // 是否是开发者自定义的加载更多,-1代表交由z-paging自行判断;1代表没有更多了;0代表还有更多数据 customNoMore: -1 }; }, computed: { // 底部加载更多配置 zLoadMoreConfig() { return { status: this.loadingStatusAfterRender, defaultAsLoading: this.loadingMoreDefaultAsLoading || this.useChatRecordMode && this.chatLoadingMoreDefaultAsLoading, defaultThemeStyle: this.finalLoadingMoreThemeStyle, customStyle: this.loadingMoreCustomStyle, titleCustomStyle: this.loadingMoreTitleCustomStyle, iconCustomStyle: this.loadingMoreLoadingIconCustomStyle, loadingIconType: this.loadingMoreLoadingIconType, loadingIconCustomImage: this.loadingMoreLoadingIconCustomImage, loadingAnimated: this.loadingMoreLoadingAnimated, showNoMoreLine: this.showLoadingMoreNoMoreLine, noMoreLineCustomStyle: this.loadingMoreNoMoreLineCustomStyle, defaultText: this.finalLoadingMoreDefaultText, loadingText: this.finalLoadingMoreLoadingText, noMoreText: this.finalLoadingMoreNoMoreText, failText: this.finalLoadingMoreFailText, hideContent: !this.loadingMoreDefaultAsLoading && this.listRendering, unit: this.unit, isChat: this.useChatRecordMode, chatDefaultAsLoading: this.chatLoadingMoreDefaultAsLoading }; }, // 最终的底部加载更多主题 finalLoadingMoreThemeStyle() { return this.loadingMoreThemeStyle.length ? this.loadingMoreThemeStyle : this.defaultThemeStyle; }, // 最终的底部加载更多触发阈值 finalLowerThreshold() { return u.convertToPx(this.lowerThreshold); }, // 是否显示默认状态下的底部加载更多 showLoadingMoreDefault() { return this._showLoadingMore("Default"); }, // 是否显示加载中状态下的底部加载更多 showLoadingMoreLoading() { return this._showLoadingMore("Loading"); }, // 是否显示没有更多了状态下的底部加载更多 showLoadingMoreNoMore() { return this._showLoadingMore("NoMore"); }, // 是否显示加载失败状态下的底部加载更多 showLoadingMoreFail() { return this._showLoadingMore("Fail"); }, // 是否显示自定义状态下的底部加载更多 showLoadingMoreCustom() { return this._showLoadingMore("Custom"); }, // 底部加载更多固定高度 loadingMoreFixedHeight() { return u.addUnit("80rpx", this.unit); } }, methods: { // 页面滚动到底部时通知z-paging进行进一步处理 pageReachBottom() { !this.useChatRecordMode && this.toBottomLoadingMoreEnabled && this._onLoadingMore("toBottom"); }, // 手动触发上拉加载更多(非必须,可依据具体需求使用) doLoadMore(type2) { this._onLoadingMore(type2); }, // 通过@scroll事件检测是否滚动到了底部(顺带检测下是否滚动到了顶部) _checkScrolledToBottom(scrollDiff, checked = false) { if (this.cacheScrollNodeHeight === -1) { this._getNodeClientRect(".zp-scroll-view").then((res) => { if (res) { const scrollNodeHeight = res[0].height; this.cacheScrollNodeHeight = scrollNodeHeight; if (scrollDiff - scrollNodeHeight <= this.finalLowerThreshold) { this._onLoadingMore("toBottom"); } } }); } else { if (scrollDiff - this.cacheScrollNodeHeight <= this.finalLowerThreshold) { this._onLoadingMore("toBottom"); } else if (scrollDiff - this.cacheScrollNodeHeight <= 500 && !checked) { u.delay(() => { this._getNodeClientRect(".zp-scroll-view", true, true).then((res) => { if (res) { this.oldScrollTop = res[0].scrollTop; const newScrollDiff = res[0].scrollHeight - this.oldScrollTop; this._checkScrolledToBottom(newScrollDiff, true); } }); }, 150, "checkScrolledToBottomDelay"); } if (this.oldScrollTop <= 150 && this.oldScrollTop !== 0) { u.delay(() => { if (this.oldScrollTop !== 0) { this._getNodeClientRect(".zp-scroll-view", true, true).then((res) => { if (res && res[0].scrollTop === 0 && this.oldScrollTop !== 0) { this._onScrollToUpper(); } }); } }, 150, "checkScrolledToTopDelay"); } } }, // 触发加载更多时调用,from:toBottom-滑动到底部触发;click-点击加载更多触发 _onLoadingMore(from = "click") { if (this.isIos && from === "toBottom" && !this.scrollToBottomBounceEnabled && this.scrollEnable) { this.scrollEnable = false; this.$nextTick(() => { this.scrollEnable = true; }); } this._emitScrollEvent("scrolltolower"); if (this.refresherOnly || !this.loadingMoreEnabled || !(this.loadingStatus === Enum.More.Default || this.loadingStatus === Enum.More.Fail) || this.loading || this.showEmpty) return; this._doLoadingMore(); }, // 处理开始加载更多 _doLoadingMore() { if (this.pageNo >= this.defaultPageNo && this.loadingStatus !== Enum.More.NoMore) { this.pageNo++; this._startLoading(false); if (this.isLocalPaging) { this._localPagingQueryList(this.pageNo, this.defaultPageSize, this.localPagingLoadingTime, (res) => { this.completeByTotal(res, this.totalLocalPagingList.length); this.queryFrom = Enum.QueryFrom.LoadMore; }); } else { this._emitQuery(this.pageNo, this.defaultPageSize, Enum.QueryFrom.LoadMore); this._callMyParentQuery(); } this.loadingType = Enum.LoadingType.LoadMore; } }, // (预处理)判断当没有更多数据且分页内容未超出z-paging时是否显示没有更多数据的view _preCheckShowNoMoreInside(newVal, scrollViewNode, pagingContainerNode) { if (this.loadingStatus === Enum.More.NoMore && this.hideNoMoreByLimit > 0 && newVal.length) { this.showLoadingMore = newVal.length > this.hideNoMoreByLimit; } else if (this.loadingStatus === Enum.More.NoMore && this.hideNoMoreInside && newVal.length || this.insideMore && this.insideOfPaging !== false && newVal.length) { this.$nextTick(() => { this._checkShowNoMoreInside(newVal, scrollViewNode, pagingContainerNode); }); if (this.insideMore && this.insideOfPaging !== false && newVal.length) { this.showLoadingMore = newVal.length; } } else { this.showLoadingMore = newVal.length; } }, // 判断当没有更多数据且分页内容未超出z-paging时是否显示没有更多数据的view async _checkShowNoMoreInside(totalData, oldScrollViewNode, oldPagingContainerNode) { try { const scrollViewNode = oldScrollViewNode || await this._getNodeClientRect(".zp-scroll-view"); if (this.usePageScroll) { if (scrollViewNode) { const scrollViewTotalH = scrollViewNode[0].top + scrollViewNode[0].height; this.insideOfPaging = scrollViewTotalH < this.windowHeight; if (this.hideNoMoreInside) { this.showLoadingMore = !this.insideOfPaging; } this._updateInsideOfPaging(); } } else { const pagingContainerNode = oldPagingContainerNode || await this._getNodeClientRect(".zp-paging-container-content"); const pagingContainerH = pagingContainerNode ? pagingContainerNode[0].height : 0; const scrollViewH = scrollViewNode ? scrollViewNode[0].height : 0; this.insideOfPaging = pagingContainerH < scrollViewH; if (this.hideNoMoreInside) { this.showLoadingMore = !this.insideOfPaging; } this._updateInsideOfPaging(); } } catch (e) { this.insideOfPaging = !totalData.length; if (this.hideNoMoreInside) { this.showLoadingMore = !this.insideOfPaging; } this._updateInsideOfPaging(); } }, // 是否要展示上拉加载更多view _showLoadingMore(type2) { if (!this.showLoadingMoreWhenReload && (!(this.loadingStatus === Enum.More.Default ? this.nShowBottom : true) || !this.realTotalData.length)) return false; if ((!this.showLoadingMoreWhenReload || this.isUserPullDown || this.loadingStatus !== Enum.More.Loading) && !this.showLoadingMore || !this.loadingMoreEnabled && (!this.showLoadingMoreWhenReload || this.isUserPullDown || this.loadingStatus !== Enum.More.Loading) || this.refresherOnly) { return false; } if (this.useChatRecordMode && type2 !== "Loading") return false; if (!this.zSlots) return false; if (type2 === "Custom") { return this.showDefaultLoadingMoreText && !(this.loadingStatus === Enum.More.NoMore && !this.showLoadingMoreNoMoreView); } const res = this.loadingStatus === Enum.More[type2] && this.zSlots[`loadingMore${type2}`] && (type2 === "NoMore" ? this.showLoadingMoreNoMoreView : true); return res; } } }; const loadingModule = { props: { // 第一次加载后自动隐藏loading slot,默认为是 autoHideLoadingAfterFirstLoaded: { type: Boolean, default: u.gc("autoHideLoadingAfterFirstLoaded", true) }, // loading slot是否铺满屏幕并固定,默认为否 loadingFullFixed: { type: Boolean, default: u.gc("loadingFullFixed", false) }, // 是否自动显示系统Loading:即uni.showLoading,若开启则将在刷新列表时(调用reload、refresh时)显示,下拉刷新和滚动到底部加载更多不会显示,默认为false。 autoShowSystemLoading: { type: Boolean, default: u.gc("autoShowSystemLoading", false) }, // 显示系统Loading时是否显示透明蒙层,防止触摸穿透,默认为是(H5、App、微信小程序、百度小程序有效) systemLoadingMask: { type: Boolean, default: u.gc("systemLoadingMask", true) }, // 显示系统Loading时显示的文字,默认为"加载中" systemLoadingText: { type: [String, Object], default: u.gc("systemLoadingText", null) } }, data() { return { loading: false, loadingForNow: false }; }, watch: { // loading状态 loadingStatus(newVal) { this.$emit("loadingStatusChange", newVal); this.$nextTick(() => { this.loadingStatusAfterRender = newVal; }); if (this.useChatRecordMode) { if (this.isFirstPage && (newVal === Enum.More.NoMore || newVal === Enum.More.Fail)) { this.isFirstPageAndNoMore = true; return; } } this.isFirstPageAndNoMore = false; }, loading(newVal) { if (newVal) { this.loadingForNow = newVal; } } }, computed: { // 是否显示loading showLoading() { if (this.firstPageLoaded || !this.loading || !this.loadingForNow) return false; if (this.finalShowSystemLoading) { uni.showLoading({ title: this.finalSystemLoadingText, mask: this.systemLoadingMask }); } return this.autoHideLoadingAfterFirstLoaded ? this.fromEmptyViewReload ? true : !this.pagingLoaded : this.loadingType === Enum.LoadingType.Refresher; }, // 最终的是否显示系统loading finalShowSystemLoading() { return this.autoShowSystemLoading && this.loadingType === Enum.LoadingType.Refresher; } }, methods: { // 处理开始加载更多状态 _startLoading(isReload = false) { if (this.showLoadingMoreWhenReload && !this.isUserPullDown || !isReload) { this.loadingStatus = Enum.More.Loading; } this.loading = true; }, // 停止系统loading和refresh _endSystemLoadingAndRefresh() { this.finalShowSystemLoading && uni.hideLoading(); !this.useCustomRefresher && uni.stopPullDownRefresh(); } } }; const chatRecordModerModule = { props: { // 使用聊天记录模式,默认为否 useChatRecordMode: { type: Boolean, default: u.gc("useChatRecordMode", false) }, // 使用聊天记录模式时滚动到顶部后,列表垂直移动偏移距离。默认0rpx。单位px(暂时无效) chatRecordMoreOffset: { type: [Number, String], default: u.gc("chatRecordMoreOffset", "0rpx") }, // 使用聊天记录模式时是否自动隐藏键盘:在用户触摸列表时候自动隐藏键盘,默认为是 autoHideKeyboardWhenChat: { type: Boolean, default: u.gc("autoHideKeyboardWhenChat", true) }, // 使用聊天记录模式中键盘弹出时是否自动调整slot="bottom"高度,默认为是 autoAdjustPositionWhenChat: { type: Boolean, default: u.gc("autoAdjustPositionWhenChat", true) }, // 使用聊天记录模式中键盘弹出时占位高度偏移距离。默认0rpx。单位px chatAdjustPositionOffset: { type: [Number, String], default: u.gc("chatAdjustPositionOffset", "0rpx") }, // 使用聊天记录模式中键盘弹出时是否自动滚动到底部,默认为否 autoToBottomWhenChat: { type: Boolean, default: u.gc("autoToBottomWhenChat", false) }, // 使用聊天记录模式中reload时是否显示chatLoading,默认为否 showChatLoadingWhenReload: { type: Boolean, default: u.gc("showChatLoadingWhenReload", false) }, // 在聊天记录模式中滑动到顶部状态为默认状态时,以加载中的状态展示,默认为是。若设置为否,则默认会显示【点击加载更多】,然后才会显示loading chatLoadingMoreDefaultAsLoading: { type: Boolean, default: u.gc("chatLoadingMoreDefaultAsLoading", true) } }, data() { return { // 键盘高度 keyboardHeight: 0, // 键盘高度是否未改变,此时占位高度变化不需要动画效果 isKeyboardHeightChanged: false }; }, computed: { finalChatRecordMoreOffset() { return u.convertToPx(this.chatRecordMoreOffset); }, finalChatAdjustPositionOffset() { return u.convertToPx(this.chatAdjustPositionOffset); }, // 聊天记录模式旋转180度style chatRecordRotateStyle() { let cellStyle; cellStyle = this.useChatRecordMode ? { transform: "scaleY(-1)" } : {}; this.$emit("update:cellStyle", cellStyle); this.$emit("cellStyleChange", cellStyle); this.$nextTick(() => { if (this.isFirstPage && this.isChatRecordModeAndNotInversion) { this.$nextTick(() => { this._scrollToBottom(false); u.delay(() => { this._scrollToBottom(false); u.delay(() => { this._scrollToBottom(false); }, 50); }, 50); }); } }); return cellStyle; }, // 是否是聊天记录列表并且有配置transform isChatRecordModeHasTransform() { return this.useChatRecordMode && this.chatRecordRotateStyle && this.chatRecordRotateStyle.transform; }, // 是否是聊天记录列表并且列表未倒置 isChatRecordModeAndNotInversion() { return this.isChatRecordModeHasTransform && this.chatRecordRotateStyle.transform === "scaleY(1)"; }, // 是否是聊天记录列表并且列表倒置 isChatRecordModeAndInversion() { return this.isChatRecordModeHasTransform && this.chatRecordRotateStyle.transform === "scaleY(-1)"; }, // 最终的聊天记录模式中底部安全区域的高度,如果开启了底部安全区域并且键盘未弹出,则添加底部区域高度 chatRecordModeSafeAreaBottom() { return this.safeAreaInsetBottom && !this.keyboardHeight ? this.safeAreaBottom : 0; } }, mounted() { if (this.useChatRecordMode) { uni.onKeyboardHeightChange(this._handleKeyboardHeightChange); } }, methods: { // 添加聊天记录 addChatRecordData(data, toBottom = true, toBottomWithAnimate = true) { if (!this.useChatRecordMode) return; this.isTotalChangeFromAddData = true; this.addDataFromTop(data, toBottom, toBottomWithAnimate); }, // 手动触发滚动到顶部加载更多,聊天记录模式时有效 doChatRecordLoadMore() { this.useChatRecordMode && this._onLoadingMore("click"); }, // 处理键盘高度变化 _handleKeyboardHeightChange(res) { this.$emit("keyboardHeightChange", res); if (this.autoAdjustPositionWhenChat) { this.isKeyboardHeightChanged = true; this.keyboardHeight = res.height > 0 ? res.height + this.finalChatAdjustPositionOffset : res.height; } if (this.autoToBottomWhenChat && this.keyboardHeight > 0) { u.delay(() => { this.scrollToBottom(false); u.delay(() => { this.scrollToBottom(false); }); }); } } } }; const scrollerModule = { props: { // 使用页面滚动,默认为否,当设置为是时则使用页面的滚动而非此组件内部的scroll-view的滚动,使用页面滚动时z-paging无需设置确定的高度且对于长列表展示性能更高,但配置会略微繁琐 usePageScroll: { type: Boolean, default: u.gc("usePageScroll", false) }, // 是否可以滚动,使用内置scroll-view和nvue时有效,默认为是 scrollable: { type: Boolean, default: u.gc("scrollable", true) }, // 控制是否出现滚动条,默认为是 showScrollbar: { type: Boolean, default: u.gc("showScrollbar", true) }, // 是否允许横向滚动,默认为否 scrollX: { type: Boolean, default: u.gc("scrollX", false) }, // iOS设备上滚动到顶部时是否允许回弹效果,默认为否。关闭回弹效果后可使滚动到顶部与下拉刷新更连贯,但是有吸顶view时滚动到顶部时可能出现抖动。 scrollToTopBounceEnabled: { type: Boolean, default: u.gc("scrollToTopBounceEnabled", false) }, // iOS设备上滚动到底部时是否允许回弹效果,默认为是。 scrollToBottomBounceEnabled: { type: Boolean, default: u.gc("scrollToBottomBounceEnabled", true) }, // 在设置滚动条位置时使用动画过渡,默认为否 scrollWithAnimation: { type: Boolean, default: u.gc("scrollWithAnimation", false) }, // 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素 scrollIntoView: { type: String, default: u.gc("scrollIntoView", "") } }, data() { return { scrollTop: 0, oldScrollTop: 0, scrollLeft: 0, oldScrollLeft: 0, scrollViewStyle: {}, scrollViewContainerStyle: {}, scrollViewInStyle: {}, pageScrollTop: -1, scrollEnable: true, privateScrollWithAnimation: -1, cacheScrollNodeHeight: -1, superContentHeight: 0 }; }, watch: { oldScrollTop(newVal) { !this.usePageScroll && this._scrollTopChange(newVal, false); }, pageScrollTop(newVal) { this.usePageScroll && this._scrollTopChange(newVal, true); }, usePageScroll: { handler(newVal) { this.loaded && this.autoHeight && this._setAutoHeight(!newVal); }, immediate: true }, finalScrollTop(newVal) { this.renderPropScrollTop = newVal < 6 ? 0 : 10; } }, computed: { finalScrollWithAnimation() { if (this.privateScrollWithAnimation !== -1) { return this.privateScrollWithAnimation === 1; } return this.scrollWithAnimation; }, finalScrollViewStyle() { if (this.superContentZIndex != 1) { this.scrollViewStyle["z-index"] = this.superContentZIndex; this.scrollViewStyle["position"] = "relative"; } return this.scrollViewStyle; }, finalScrollTop() { return this.usePageScroll ? this.pageScrollTop : this.oldScrollTop; }, // 当前是否是旧版webview finalIsOldWebView() { return this.isOldWebView && !this.usePageScroll; }, // 当前scroll-view/list-view是否允许滚动 finalScrollable() { return this.scrollable && !this.usePageScroll && this.scrollEnable && (this.refresherCompleteScrollable ? true : this.refresherStatus !== Enum.Refresher.Complete) && (this.refresherRefreshingScrollable ? true : this.refresherStatus !== Enum.Refresher.Loading); } }, methods: { // 滚动到顶部,animate为是否展示滚动动画,默认为是 scrollToTop(animate, checkReverse = true) { if (this.useChatRecordMode && checkReverse && !this.isChatRecordModeAndNotInversion) { this.scrollToBottom(animate, false); return; } this.$nextTick(() => { this._scrollToTop(animate, false); }); }, // 滚动到底部,animate为是否展示滚动动画,默认为是 scrollToBottom(animate, checkReverse = true) { if (this.useChatRecordMode && checkReverse && !this.isChatRecordModeAndNotInversion) { this.scrollToTop(animate, false); return; } this.$nextTick(() => { this._scrollToBottom(animate); }); }, // 滚动到指定view(vue中有效)。sel为需要滚动的view的id值,不包含"#";offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollIntoViewById(sel, offset, animate) { this._scrollIntoView(sel, offset, animate); }, // 滚动到指定view(vue中有效)。nodeTop为需要滚动的view的top值(通过uni.createSelectorQuery()获取);offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollIntoViewByNodeTop(nodeTop, offset, animate) { this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this._scrollIntoViewByNodeTop(nodeTop, offset, animate); }); }, // y轴滚动到指定位置(vue中有效)。y为与顶部的距离,单位为px;offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollToY(y, offset, animate) { this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this._scrollToY(y, offset, animate); }); }, // x轴滚动到指定位置(非页面滚动且在vue中有效)。x为与左侧的距离,单位为px;offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollToX(x, offset, animate) { this.scrollLeft = this.oldScrollLeft; this.$nextTick(() => { this._scrollToX(x, offset, animate); }); }, // 滚动到指定view(nvue中和虚拟列表中有效)。index为需要滚动的view的index(第几个,从0开始);offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollIntoViewByIndex(index, offset, animate) { if (index >= this.realTotalData.length) { u.consoleErr("当前滚动的index超出已渲染列表长度,请先通过refreshToPage加载到对应index页并等待渲染成功后再调用此方法!"); return; } this.$nextTick(() => { if (this.finalUseVirtualList) { const isCellFixed = this.cellHeightMode === Enum.CellHeightMode.Fixed; u.delay(() => { if (this.finalUseVirtualList) { const scrollTop = isCellFixed ? this.virtualCellHeight * index : this.virtualHeightCacheList[index].lastTotalHeight; this.scrollToY(scrollTop, offset, animate); } }, isCellFixed ? 0 : 100); } }); }, // 滚动到指定view(nvue中有效)。view为需要滚动的view(通过`this.$refs.xxx`获取),不包含"#";offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollIntoViewByView(view, offset, animate) { this._scrollIntoView(view, offset, animate); }, // 当使用页面滚动并且自定义下拉刷新时,请在页面的onPageScroll中调用此方法,告知z-paging当前的pageScrollTop,否则会导致在任意位置都可以下拉刷新 updatePageScrollTop(value) { this.pageScrollTop = value; }, // 当使用页面滚动并且设置了slot="top"时,默认初次加载会自动获取其高度,并使内部容器下移,当slot="top"的view高度动态改变时,在其高度需要更新时调用此方法 updatePageScrollTopHeight() { this._updatePageScrollTopOrBottomHeight("top"); }, // 当使用页面滚动并且设置了slot="bottom"时,默认初次加载会自动获取其高度,并使内部容器下移,当slot="bottom"的view高度动态改变时,在其高度需要更新时调用此方法 updatePageScrollBottomHeight() { this._updatePageScrollTopOrBottomHeight("bottom"); }, // 更新slot="left"和slot="right"宽度,当slot="left"或slot="right"宽度动态改变时调用 updateLeftAndRightWidth() { if (!this.finalIsOldWebView) return; this.$nextTick(() => this._updateLeftAndRightWidth(this.scrollViewContainerStyle, "zp-page")); }, // 更新z-paging内置scroll-view的scrollTop updateScrollViewScrollTop(scrollTop, animate = true) { this._updatePrivateScrollWithAnimation(animate); this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this.scrollTop = scrollTop; this.oldScrollTop = this.scrollTop; }); }, // 当滚动到顶部时 _onScrollToUpper() { this._emitScrollEvent("scrolltoupper"); this.$emit("scrollTopChange", 0); this.$nextTick(() => { this.oldScrollTop = 0; }); }, // 当滚动到底部时 _onScrollToLower(e) { (!e.detail || !e.detail.direction || e.detail.direction === "bottom") && this.toBottomLoadingMoreEnabled && this._onLoadingMore(this.useChatRecordMode ? "click" : "toBottom"); }, // 滚动到顶部 _scrollToTop(animate = true, isPrivate = true) { if (this.usePageScroll) { this.$nextTick(() => { uni.pageScrollTo({ scrollTop: 0, duration: animate ? 100 : 0 }); }); return; } this._updatePrivateScrollWithAnimation(animate); this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this.scrollTop = 0; this.oldScrollTop = this.scrollTop; }); }, // 滚动到底部 async _scrollToBottom(animate = true) { if (this.usePageScroll) { this.$nextTick(() => { uni.pageScrollTo({ scrollTop: Number.MAX_VALUE, duration: animate ? 100 : 0 }); }); return; } try { this._updatePrivateScrollWithAnimation(animate); const pagingContainerNode = await this._getNodeClientRect(".zp-paging-container"); const scrollViewNode = await this._getNodeClientRect(".zp-scroll-view"); const pagingContainerH = pagingContainerNode ? pagingContainerNode[0].height : 0; const scrollViewH = scrollViewNode ? scrollViewNode[0].height : 0; if (pagingContainerH > scrollViewH) { this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this.scrollTop = pagingContainerH - scrollViewH + this.virtualPlaceholderTopHeight; this.oldScrollTop = this.scrollTop; }); } } catch (e) { } }, // 滚动到指定view _scrollIntoView(sel, offset = 0, animate = false, finishCallback) { try { this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this._getNodeClientRect("#" + sel.replace("#", ""), this.$parent).then((node2) => { if (node2) { let nodeTop = node2[0].top; this._scrollIntoViewByNodeTop(nodeTop, offset, animate); finishCallback && finishCallback(); } }); }); } catch (e) { } }, // 通过nodeTop滚动到指定view _scrollIntoViewByNodeTop(nodeTop, offset = 0, animate = false) { if (this.isChatRecordModeAndInversion) { this._getNodeClientRect(".zp-scroll-view").then((sNode) => { if (sNode) { this._scrollToY(sNode[0].height - nodeTop, offset, animate, true); } }); } else { this._scrollToY(nodeTop, offset, animate, true); } }, // y轴滚动到指定位置 _scrollToY(y, offset = 0, animate = false, addScrollTop = false) { this._updatePrivateScrollWithAnimation(animate); u.delay(() => { if (this.usePageScroll) { if (addScrollTop && this.pageScrollTop !== -1) { y += this.pageScrollTop; } const scrollTop = y - offset; uni.pageScrollTo({ scrollTop, duration: animate ? 100 : 0 }); } else { if (addScrollTop) { y += this.oldScrollTop; } this.scrollTop = y - offset; } }, 10); }, // x轴滚动到指定位置 _scrollToX(x, offset = 0, animate = false) { this._updatePrivateScrollWithAnimation(animate); u.delay(() => { if (!this.usePageScroll) { this.scrollLeft = x - offset; } else { u.consoleErr("使用页面滚动时不支持scrollToX"); } }, 10); }, // scroll-view滚动中 _scroll(e) { this.$emit("scroll", e); const { scrollTop, scrollLeft } = e.detail; this.finalUseVirtualList && this._updateVirtualScroll(scrollTop, this.oldScrollTop - scrollTop); this.oldScrollTop = scrollTop; this.oldScrollLeft = scrollLeft; const scrollDiff = e.detail.scrollHeight - this.oldScrollTop; !this.isIos && this._checkScrolledToBottom(scrollDiff); }, // emit scrolltolower/scrolltoupper事件 _emitScrollEvent(type2) { const reversedType = type2 === "scrolltolower" ? "scrolltoupper" : "scrolltolower"; const eventType = this.useChatRecordMode && !this.isChatRecordModeAndNotInversion ? reversedType : type2; this.$emit(eventType); }, // 更新内置的scroll-view是否启用滚动动画 _updatePrivateScrollWithAnimation(animate) { this.privateScrollWithAnimation = animate ? 1 : 0; u.delay(() => this.$nextTick(() => { this.privateScrollWithAnimation = -1; }), 100, "updateScrollWithAnimationDelay"); }, // 检测scrollView是否要铺满屏幕 _doCheckScrollViewShouldFullHeight(totalData) { if (this.autoFullHeight && this.usePageScroll && this.isTotalChangeFromAddData) { this.$nextTick(() => { this._checkScrollViewShouldFullHeight((scrollViewNode, pagingContainerNode) => { this._preCheckShowNoMoreInside(totalData, scrollViewNode, pagingContainerNode); }); }); } else { this._preCheckShowNoMoreInside(totalData); } }, // 检测z-paging是否要全屏覆盖(当使用页面滚动并且不满全屏时,默认z-paging需要铺满全屏,避免数据过少时内部的empty-view无法正确展示) async _checkScrollViewShouldFullHeight(callback) { try { const scrollViewNode = await this._getNodeClientRect(".zp-scroll-view"); const pagingContainerNode = await this._getNodeClientRect(".zp-paging-container-content"); if (!scrollViewNode || !pagingContainerNode) return; const scrollViewHeight = pagingContainerNode[0].height; const scrollViewTop = scrollViewNode[0].top; if (this.isAddedData && scrollViewHeight + scrollViewTop <= this.windowHeight) { this._setAutoHeight(true, scrollViewNode); callback(scrollViewNode, pagingContainerNode); } else { this._setAutoHeight(false); callback(null, null); } } catch (e) { callback(null, null); } }, // 更新缓存中z-paging整个内容容器高度 async _updateCachedSuperContentHeight() { const superContentNode = await this._getNodeClientRect(".z-paging-content"); if (superContentNode) { this.superContentHeight = superContentNode[0].height; } }, // scrollTop改变时触发 _scrollTopChange(newVal, isPageScrollTop) { this.$emit("scrollTopChange", newVal); this.$emit("update:scrollTop", newVal); this._checkShouldShowBackToTop(newVal); const scrollTop = newVal > 5 ? 6 : 0; if (isPageScrollTop && this.wxsPageScrollTop !== scrollTop) { this.wxsPageScrollTop = scrollTop; } else if (!isPageScrollTop && this.wxsScrollTop !== scrollTop) { this.wxsScrollTop = scrollTop; if (scrollTop > 6) { this.scrollEnable = true; } } }, // 更新使用页面滚动时slot="top"或"bottom"插入view的高度 _updatePageScrollTopOrBottomHeight(type2) { if (!this.usePageScroll) return; this._doCheckScrollViewShouldFullHeight(this.realTotalData); const node2 = `.zp-page-${type2}`; const marginText = `margin${type2.slice(0, 1).toUpperCase() + type2.slice(1)}`; let safeAreaInsetBottomAdd = this.safeAreaInsetBottom; this.$nextTick(() => { let delayTime = 0; u.delay(() => { this._getNodeClientRect(node2).then((res) => { if (res) { let pageScrollNodeHeight = res[0].height; if (type2 === "bottom") { if (safeAreaInsetBottomAdd) { pageScrollNodeHeight += this.safeAreaBottom; } } else { this.cacheTopHeight = pageScrollNodeHeight; } this.$set(this.scrollViewStyle, marginText, `${pageScrollNodeHeight}px`); } else if (safeAreaInsetBottomAdd) { this.$set(this.scrollViewStyle, marginText, `${this.safeAreaBottom}px`); } }); }, delayTime); }); } } }; const backToTopModule = { props: { // 自动显示点击返回顶部按钮,默认为否 autoShowBackToTop: { type: Boolean, default: u.gc("autoShowBackToTop", false) }, // 点击返回顶部按钮显示/隐藏的阈值(滚动距离),单位为px,默认为400rpx backToTopThreshold: { type: [Number, String], default: u.gc("backToTopThreshold", "400rpx") }, // 点击返回顶部按钮的自定义图片地址,默认使用z-paging内置的图片 backToTopImg: { type: String, default: u.gc("backToTopImg", "") }, // 点击返回顶部按钮返回到顶部时是否展示过渡动画,默认为是 backToTopWithAnimate: { type: Boolean, default: u.gc("backToTopWithAnimate", true) }, // 点击返回顶部按钮与底部的距离,注意添加单位px或rpx,默认为160rpx backToTopBottom: { type: [Number, String], default: u.gc("backToTopBottom", "160rpx") }, // 点击返回顶部按钮的自定义样式 backToTopStyle: { type: Object, default: u.gc("backToTopStyle", {}) }, // iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向,默认为是 enableBackToTop: { type: Boolean, default: u.gc("enableBackToTop", true) } }, data() { return { // 点击返回顶部的class backToTopClass: "zp-back-to-top zp-back-to-top-hide", // 上次点击返回顶部的时间 lastBackToTopShowTime: 0, // 点击返回顶部显示的class是否在展示中,使得按钮展示/隐藏过度效果更自然 showBackToTopClass: false }; }, computed: { backToTopThresholdUnitConverted() { return u.addUnit(this.backToTopThreshold, this.unit); }, backToTopBottomUnitConverted() { return u.addUnit(this.backToTopBottom, this.unit); }, finalEnableBackToTop() { return this.usePageScroll ? false : this.enableBackToTop; }, finalBackToTopThreshold() { return u.convertToPx(this.backToTopThresholdUnitConverted); }, finalBackToTopStyle() { const backToTopStyle = this.backToTopStyle; if (!backToTopStyle.bottom) { backToTopStyle.bottom = this.windowBottom + u.convertToPx(this.backToTopBottomUnitConverted) + "px"; } if (!backToTopStyle.position) { backToTopStyle.position = this.usePageScroll ? "fixed" : "absolute"; } return backToTopStyle; }, finalBackToTopClass() { return `${this.backToTopClass} zp-back-to-top-${this.unit}`; } }, methods: { // 点击了返回顶部 _backToTopClick() { let callbacked = false; this.$emit("backToTopClick", (toTop) => { (toTop === void 0 || toTop === true) && this._handleToTop(); callbacked = true; }); this.$nextTick(() => { !callbacked && this._handleToTop(); }); }, // 处理滚动到顶部(聊天记录模式中为滚动到底部) _handleToTop() { !this.backToTopWithAnimate && this._checkShouldShowBackToTop(0); !this.useChatRecordMode ? this.scrollToTop(this.backToTopWithAnimate) : this.scrollToBottom(this.backToTopWithAnimate); }, // 判断是否要显示返回顶部按钮 _checkShouldShowBackToTop(scrollTop) { if (!this.autoShowBackToTop) { this.showBackToTopClass = false; return; } if (scrollTop > this.finalBackToTopThreshold) { if (!this.showBackToTopClass) { this.showBackToTopClass = true; this.lastBackToTopShowTime = (/* @__PURE__ */ new Date()).getTime(); u.delay(() => { this.backToTopClass = "zp-back-to-top zp-back-to-top-show"; }, 300); } } else { if (this.showBackToTopClass) { this.backToTopClass = "zp-back-to-top zp-back-to-top-hide"; u.delay(() => { this.showBackToTopClass = false; }, (/* @__PURE__ */ new Date()).getTime() - this.lastBackToTopShowTime < 500 ? 0 : 300); } } } } }; const virtualListModule = { props: { // 是否使用虚拟列表,默认为否 useVirtualList: { type: Boolean, default: u.gc("useVirtualList", false) }, // 在使用虚拟列表时,是否使用兼容模式,默认为否 useCompatibilityMode: { type: Boolean, default: u.gc("useCompatibilityMode", false) }, // 使用兼容模式时传递的附加数据 extraData: { type: Object, default: u.gc("extraData", {}) }, // 是否在z-paging内部循环渲染列表(内置列表),默认为否。若use-virtual-list为true,则此项恒为true useInnerList: { type: Boolean, default: u.gc("useInnerList", false) }, // 强制关闭inner-list,默认为false,如果为true将强制关闭innerList,适用于开启了虚拟列表后需要强制关闭inner-list的情况 forceCloseInnerList: { type: Boolean, default: u.gc("forceCloseInnerList", false) }, // 内置列表cell的key名称,仅nvue有效,在nvue中开启use-inner-list时必须填此项 cellKeyName: { type: String, default: u.gc("cellKeyName", "") }, // innerList样式 innerListStyle: { type: Object, default: u.gc("innerListStyle", {}) }, // innerCell样式 innerCellStyle: { type: Object, default: u.gc("innerCellStyle", {}) }, // 预加载的列表可视范围(列表高度)页数,默认为12,即预加载当前页及上下各12页的cell。此数值越大,则虚拟列表中加载的dom越多,内存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题 preloadPage: { type: [Number, String], default: u.gc("preloadPage", 12), validator: (value) => { if (value <= 0) u.consoleErr("preload-page必须大于0!"); return value > 0; } }, // 虚拟列表cell高度模式,默认为fixed,也就是每个cell高度完全相同,将以第一个cell高度为准进行计算。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】。 cellHeightMode: { type: String, default: u.gc("cellHeightMode", Enum.CellHeightMode.Fixed) }, // 固定的cell高度,cellHeightMode=fixed才有效,若设置了值,则不计算第一个cell高度而使用设置的cell高度 fixedCellHeight: { type: [Number, String], default: u.gc("fixedCellHeight", 0) }, // 虚拟列表列数,默认为1。常用于每行有多列的情况,例如每行有2列数据,需要将此值设置为2 virtualListCol: { type: [Number, String], default: u.gc("virtualListCol", 1) }, // 虚拟列表scroll取样帧率,默认为80,过低容易出现白屏问题,过高容易出现卡顿问题 virtualScrollFps: { type: [Number, String], default: u.gc("virtualScrollFps", 80) }, // 虚拟列表cell id的前缀,适用于一个页面有多个虚拟列表的情况,用以区分不同虚拟列表cell的id,注意:请勿传数字或以数字开头的字符串。如设置为list1,则cell的id应为:list1-zp-id-${item.zp_index} virtualCellIdPrefix: { type: String, default: u.gc("virtualCellIdPrefix", "") }, // 虚拟列表是否使用swiper-item包裹,默认为否,此属性为了解决vue3+(微信小程序或QQ小程序)中,使用非内置列表写法时,若z-paging在swiper-item内存在无法获取slot插入的cell高度进而导致虚拟列表失败的问题 // 仅vue3+(微信小程序或QQ小程序)+非内置列表写法虚拟列表有效,其他情况此属性设置任何值都无效,所以如果您在swiper-item内使用z-paging的非内置虚拟列表写法,将此属性设置为true即可 virtualInSwiperSlot: { type: Boolean, default: false } }, data() { return { virtualListKey: u.getInstanceId(), virtualPageHeight: 0, virtualCellHeight: 0, virtualScrollTimeStamp: 0, virtualList: [], virtualPlaceholderTopHeight: 0, virtualPlaceholderBottomHeight: 0, virtualTopRangeIndex: 0, virtualBottomRangeIndex: 0, lastVirtualTopRangeIndex: 0, lastVirtualBottomRangeIndex: 0, virtualItemInsertedCount: 0, virtualHeightCacheList: [], getCellHeightRetryCount: { fixed: 0, dynamic: 0 }, pagingOrgTop: -1, updateVirtualListFromDataChange: false }; }, watch: { // 监听总数据的改变,刷新虚拟列表布局 realTotalData() { this.updateVirtualListRender(); }, // 监听虚拟列表渲染数组的改变并emit virtualList(newVal) { this.$emit("update:virtualList", newVal); this.$emit("virtualListChange", newVal); }, // 监听虚拟列表顶部占位高度改变并emit virtualPlaceholderTopHeight(newVal) { this.$emit("virtualTopHeightChange", newVal); } }, computed: { virtualCellIndexKey() { return c.listCellIndexKey; }, finalUseVirtualList() { if (this.useVirtualList && this.usePageScroll) { u.consoleErr("使用页面滚动时,开启虚拟列表无效!"); } return this.useVirtualList && !this.usePageScroll; }, finalUseInnerList() { return this.useInnerList || this.finalUseVirtualList && !this.forceCloseInnerList; }, finalCellKeyName() { return this.cellKeyName; }, finalVirtualPageHeight() { return this.virtualPageHeight > 0 ? this.virtualPageHeight : this.windowHeight; }, finalFixedCellHeight() { return u.convertToPx(this.fixedCellHeight); }, fianlVirtualCellIdPrefix() { const prefix = this.virtualCellIdPrefix ? this.virtualCellIdPrefix + "-" : ""; return prefix + "zp-id"; }, finalPlaceholderTopHeightStyle() { return {}; }, virtualRangePageHeight() { return this.finalVirtualPageHeight * this.preloadPage; }, virtualScrollDisTimeStamp() { return 1e3 / this.virtualScrollFps; } }, methods: { // 在使用动态高度虚拟列表时,若在列表数组中需要插入某个item,需要调用此方法;item:需要插入的item,index:插入的cell位置,若index为2,则插入的item在原list的index=1之后,index从0开始 doInsertVirtualListItem(item, index) { if (this.cellHeightMode !== Enum.CellHeightMode.Dynamic) return; this.realTotalData.splice(index, 0, item); this.realTotalData = [...this.realTotalData]; this.virtualItemInsertedCount++; if (!item || Object.prototype.toString.call(item) !== "[object Object]") { item = { item }; } const cellIndexKey = this.virtualCellIndexKey; item[cellIndexKey] = `custom-${this.virtualItemInsertedCount}`; item[c.listCellIndexUniqueKey] = `${this.virtualListKey}-${item[cellIndexKey]}`; this.$nextTick(async () => { let retryCount = 0; while (retryCount <= 10) { await u.wait(c.delayTime); const cellNode = await this._getVirtualCellNodeByIndex(item[cellIndexKey]); if (!cellNode) { retryCount++; continue; } const currentHeight = cellNode ? cellNode[0].height : 0; const lastHeightCache = this.virtualHeightCacheList[index - 1]; const lastTotalHeight = lastHeightCache ? lastHeightCache.totalHeight : 0; this.virtualHeightCacheList.splice(index, 0, { height: currentHeight, lastTotalHeight, totalHeight: lastTotalHeight + currentHeight }); for (let i = index + 1; i < this.virtualHeightCacheList.length; i++) { const thisNode = this.virtualHeightCacheList[i]; thisNode.lastTotalHeight += currentHeight; thisNode.totalHeight += currentHeight; } this._updateVirtualScroll(this.oldScrollTop); break; } }); }, // 在使用动态高度虚拟列表时,手动更新指定cell的缓存高度(当cell高度在初始化之后再次改变后调用);index:需要更新的cell在列表中的位置,从0开始 didUpdateVirtualListCell(index) { if (this.cellHeightMode !== Enum.CellHeightMode.Dynamic) return; const currentNode = this.virtualHeightCacheList[index]; this.$nextTick(() => { this._getVirtualCellNodeByIndex(index).then((cellNode) => { const cellNodeHeight = cellNode ? cellNode[0].height : 0; const heightDis = cellNodeHeight - currentNode.height; currentNode.height = cellNodeHeight; currentNode.totalHeight = currentNode.lastTotalHeight + cellNodeHeight; for (let i = index + 1; i < this.virtualHeightCacheList.length; i++) { const thisNode = this.virtualHeightCacheList[i]; thisNode.totalHeight += heightDis; thisNode.lastTotalHeight += heightDis; } }); }); }, // 在使用动态高度虚拟列表时,若删除了列表数组中的某个item,需要调用此方法以更新高度缓存数组;index:删除的cell在列表中的位置,从0开始 didDeleteVirtualListCell(index) { if (this.cellHeightMode !== Enum.CellHeightMode.Dynamic) return; const currentNode = this.virtualHeightCacheList[index]; for (let i = index + 1; i < this.virtualHeightCacheList.length; i++) { const thisNode = this.virtualHeightCacheList[i]; thisNode.totalHeight -= currentNode.height; thisNode.lastTotalHeight -= currentNode.height; } this.virtualHeightCacheList.splice(index, 1); }, // 手动触发虚拟列表渲染更新,可用于解决例如修改了虚拟列表数组中元素,但展示未更新的情况 updateVirtualListRender() { if (this.finalUseVirtualList) { this.updateVirtualListFromDataChange = true; this.$nextTick(() => { this.getCellHeightRetryCount.fixed = 0; if (this.realTotalData.length) { this.cellHeightMode === Enum.CellHeightMode.Fixed && this.isFirstPage && this._updateFixedCellHeight(); } else { this._resetDynamicListState(!this.isUserPullDown); } this._updateVirtualScroll(this.oldScrollTop); }); } }, // 初始化虚拟列表 _virtualListInit() { this.$nextTick(() => { u.delay(() => { this._getNodeClientRect(".zp-scroll-view").then((node2) => { if (node2) { this.pagingOrgTop = node2[0].top; this.virtualPageHeight = node2[0].height; } }); }); }); }, // cellHeightMode为fixed时获取第一个cell高度 _updateFixedCellHeight() { if (!this.finalFixedCellHeight) { this.$nextTick(() => { u.delay(() => { this._getVirtualCellNodeByIndex(0).then((cellNode) => { if (!cellNode) { if (this.getCellHeightRetryCount.fixed > 10) return; this.getCellHeightRetryCount.fixed++; this._updateFixedCellHeight(); } else { this.virtualCellHeight = cellNode[0].height; this._updateVirtualScroll(this.oldScrollTop); } }); }, c.delayTime, "updateFixedCellHeightDelay"); }); } else { this.virtualCellHeight = this.finalFixedCellHeight; } }, // cellHeightMode为dynamic时获取每个cell高度 _updateDynamicCellHeight(list2, dataFrom = "bottom") { const dataFromTop = dataFrom === "top"; const heightCacheList = this.virtualHeightCacheList; const currentCacheList = dataFromTop ? [] : heightCacheList; let listTotalHeight = 0; this.$nextTick(() => { u.delay(async () => { for (let i = 0; i < list2.length; i++) { const cellNode = await this._getVirtualCellNodeByIndex(list2[i][this.virtualCellIndexKey]); const currentHeight = cellNode ? cellNode[0].height : 0; if (!cellNode) { if (this.getCellHeightRetryCount.dynamic <= 10) { heightCacheList.splice(heightCacheList.length - i, i); this.getCellHeightRetryCount.dynamic++; this._updateDynamicCellHeight(list2, dataFrom); } return; } const lastHeightCache = currentCacheList.length ? currentCacheList.slice(-1)[0] : null; const lastTotalHeight = lastHeightCache ? lastHeightCache.totalHeight : 0; currentCacheList.push({ height: currentHeight, lastTotalHeight, totalHeight: lastTotalHeight + currentHeight }); if (dataFromTop) { listTotalHeight += currentHeight; } } if (dataFromTop && list2.length) { for (let i = 0; i < heightCacheList.length; i++) { const heightCacheItem = heightCacheList[i]; heightCacheItem.lastTotalHeight += listTotalHeight; heightCacheItem.totalHeight += listTotalHeight; } this.virtualHeightCacheList = currentCacheList.concat(heightCacheList); } this._updateVirtualScroll(this.oldScrollTop); }, c.delayTime, "updateDynamicCellHeightDelay"); }); }, // 设置cellItem的index _setCellIndex(list2, dataFrom = "bottom") { let currentItemIndex = 0; const cellIndexKey = this.virtualCellIndexKey; dataFrom === "bottom" && [Enum.QueryFrom.Refresh, Enum.QueryFrom.Reload].indexOf(this.queryFrom) >= 0 && this._resetDynamicListState(); if (this.totalData.length && this.queryFrom !== Enum.QueryFrom.Refresh) { if (dataFrom === "bottom") { currentItemIndex = this.realTotalData.length; const lastItem = this.realTotalData.length ? this.realTotalData.slice(-1)[0] : null; if (lastItem && lastItem[cellIndexKey] !== void 0) { currentItemIndex = lastItem[cellIndexKey] + 1; } } else if (dataFrom === "top") { const firstItem = this.realTotalData.length ? this.realTotalData[0] : null; if (firstItem && firstItem[cellIndexKey] !== void 0) { currentItemIndex = firstItem[cellIndexKey] - list2.length; } } } else { this._resetDynamicListState(); } for (let i = 0; i < list2.length; i++) { let item = list2[i]; if (!item || Object.prototype.toString.call(item) !== "[object Object]") { item = { item }; } if (item[c.listCellIndexUniqueKey]) { item = u.deepCopy(item); } item[cellIndexKey] = currentItemIndex + i; item[c.listCellIndexUniqueKey] = `${this.virtualListKey}-${item[cellIndexKey]}`; list2[i] = item; } this.getCellHeightRetryCount.dynamic = 0; this.cellHeightMode === Enum.CellHeightMode.Dynamic && this._updateDynamicCellHeight(list2, dataFrom); }, // 更新scroll滚动(虚拟列表滚动时触发) _updateVirtualScroll(scrollTop, scrollDiff = 0) { const currentTimeStamp = u.getTime(); scrollTop === 0 && this._resetTopRange(); if (scrollTop !== 0 && this.virtualScrollTimeStamp && currentTimeStamp - this.virtualScrollTimeStamp <= this.virtualScrollDisTimeStamp) { return; } this.virtualScrollTimeStamp = currentTimeStamp; let scrollIndex = 0; const cellHeightMode = this.cellHeightMode; if (cellHeightMode === Enum.CellHeightMode.Fixed) { scrollIndex = parseInt(scrollTop / this.virtualCellHeight) || 0; this._updateFixedTopRangeIndex(scrollIndex); this._updateFixedBottomRangeIndex(scrollIndex); } else if (cellHeightMode === Enum.CellHeightMode.Dynamic) { const scrollDirection = scrollDiff > 0 ? "top" : "bottom"; const rangePageHeight = this.virtualRangePageHeight; const topRangePageOffset = scrollTop - rangePageHeight; const bottomRangePageOffset = scrollTop + this.finalVirtualPageHeight + rangePageHeight; let virtualBottomRangeIndex = 0; let virtualPlaceholderBottomHeight = 0; let reachedLimitBottom = false; const heightCacheList = this.virtualHeightCacheList; const lastHeightCache = !!heightCacheList ? heightCacheList.slice(-1)[0] : null; let startTopRangeIndex = this.virtualTopRangeIndex; if (scrollDirection === "bottom") { for (let i = startTopRangeIndex; i < heightCacheList.length; i++) { const heightCacheItem = heightCacheList[i]; if (heightCacheItem && heightCacheItem.totalHeight > topRangePageOffset) { this.virtualTopRangeIndex = i; this.virtualPlaceholderTopHeight = heightCacheItem.lastTotalHeight; break; } } } else { let topRangeMatched = false; for (let i = startTopRangeIndex; i >= 0; i--) { const heightCacheItem = heightCacheList[i]; if (heightCacheItem && heightCacheItem.totalHeight < topRangePageOffset) { this.virtualTopRangeIndex = i; this.virtualPlaceholderTopHeight = heightCacheItem.lastTotalHeight; topRangeMatched = true; break; } } !topRangeMatched && this._resetTopRange(); } for (let i = this.virtualTopRangeIndex; i < heightCacheList.length; i++) { const heightCacheItem = heightCacheList[i]; if (heightCacheItem && heightCacheItem.totalHeight > bottomRangePageOffset) { virtualBottomRangeIndex = i; virtualPlaceholderBottomHeight = lastHeightCache.totalHeight - heightCacheItem.totalHeight; reachedLimitBottom = true; break; } } if (!reachedLimitBottom || this.virtualBottomRangeIndex === 0) { this.virtualBottomRangeIndex = this.realTotalData.length ? this.realTotalData.length - 1 : this.pageSize; this.virtualPlaceholderBottomHeight = 0; } else { this.virtualBottomRangeIndex = virtualBottomRangeIndex; this.virtualPlaceholderBottomHeight = virtualPlaceholderBottomHeight; } this._updateVirtualList(); } }, // 更新fixedCell模式下topRangeIndex&placeholderTopHeight _updateFixedTopRangeIndex(scrollIndex) { let virtualTopRangeIndex = this.virtualCellHeight === 0 ? 0 : scrollIndex - (parseInt(this.finalVirtualPageHeight / this.virtualCellHeight) || 1) * this.preloadPage; virtualTopRangeIndex *= this.virtualListCol; virtualTopRangeIndex = Math.max(0, virtualTopRangeIndex); this.virtualTopRangeIndex = virtualTopRangeIndex; this.virtualPlaceholderTopHeight = virtualTopRangeIndex / this.virtualListCol * this.virtualCellHeight; }, // 更新fixedCell模式下bottomRangeIndex&placeholderBottomHeight _updateFixedBottomRangeIndex(scrollIndex) { let virtualBottomRangeIndex = this.virtualCellHeight === 0 ? this.pageSize : scrollIndex + (parseInt(this.finalVirtualPageHeight / this.virtualCellHeight) || 1) * (this.preloadPage + 1); virtualBottomRangeIndex *= this.virtualListCol; virtualBottomRangeIndex = Math.min(this.realTotalData.length, virtualBottomRangeIndex); this.virtualBottomRangeIndex = virtualBottomRangeIndex; this.virtualPlaceholderBottomHeight = (this.realTotalData.length - virtualBottomRangeIndex) * this.virtualCellHeight / this.virtualListCol; this._updateVirtualList(); }, // 更新virtualList _updateVirtualList() { const shouldUpdateList = this.updateVirtualListFromDataChange || (this.lastVirtualTopRangeIndex !== this.virtualTopRangeIndex || this.lastVirtualBottomRangeIndex !== this.virtualBottomRangeIndex); if (shouldUpdateList) { this.updateVirtualListFromDataChange = false; this.lastVirtualTopRangeIndex = this.virtualTopRangeIndex; this.lastVirtualBottomRangeIndex = this.virtualBottomRangeIndex; this.virtualList = this.realTotalData.slice(this.virtualTopRangeIndex, this.virtualBottomRangeIndex + 1); } }, // 重置动态cell模式下的高度缓存数据、虚拟列表和滚动状态 _resetDynamicListState(resetVirtualList = false) { this.virtualHeightCacheList = []; if (resetVirtualList) { this.virtualList = []; } this.virtualTopRangeIndex = 0; this.virtualPlaceholderTopHeight = 0; }, // 重置topRangeIndex和placeholderTopHeight _resetTopRange() { this.virtualTopRangeIndex = 0; this.virtualPlaceholderTopHeight = 0; this._updateVirtualList(); }, // 检测虚拟列表当前滚动位置,如发现滚动位置不正确则重新计算虚拟列表相关参数(为解决在App中可能出现的长时间进入后台后打开App白屏的问题) _checkVirtualListScroll() { if (this.finalUseVirtualList) { this.$nextTick(() => { this._getNodeClientRect(".zp-paging-touch-view").then((node2) => { const currentTop = node2 ? node2[0].top : 0; if (!node2 || currentTop === this.pagingOrgTop && this.virtualPlaceholderTopHeight !== 0) { this._updateVirtualScroll(0); } }); }); } }, // 获取对应index的虚拟列表cell节点信息 _getVirtualCellNodeByIndex(index) { let inDom = this.finalUseInnerList; return this._getNodeClientRect(`#${this.fianlVirtualCellIdPrefix}-${index}`, inDom); }, // 处理使用内置列表时点击了cell事件 _innerCellClick(item, index) { this.$emit("innerCellClick", item, index); } } }; const systemInfo = u.getSystemInfoSync(); const _sfc_main$16 = { name: "z-paging", components: { zPagingRefresh, zPagingLoadMore, zPagingEmptyView: __easycom_0$2 }, mixins: [ commonLayoutModule, dataHandleModule, i18nModule, nvueModule, emptyModule, refresherModule, loadMoreModule, loadingModule, chatRecordModerModule, scrollerModule, backToTopModule, virtualListModule ], data() { return { // --------------静态资源--------------- base64BackToTop: zStatic.base64BackToTop, // -------------全局数据相关-------------- // 当前加载类型 loadingType: Enum.LoadingType.Refresher, requestTimeStamp: 0, wxsPropType: "", renderPropScrollTop: -1, checkScrolledToBottomTimeOut: null, cacheTopHeight: -1, statusBarHeight: systemInfo.statusBarHeight, // --------------状态&判断--------------- insideOfPaging: -1, isLoadFailed: false, isIos: systemInfo.platform === "ios", disabledBounce: false, fromCompleteEmit: false, disabledCompleteEmit: false, pageLaunched: false, active: false, // ---------------wxs相关--------------- wxsIsScrollTopInTopRange: true, wxsScrollTop: 0, wxsPageScrollTop: 0, wxsOnPullingDown: false }; }, props: { // 调用complete后延迟处理的时间,单位为毫秒,默认0毫秒,优先级高于minDelay delay: { type: [Number, String], default: u.gc("delay", 0) }, // 触发@query后最小延迟处理的时间,单位为毫秒,默认0毫秒,优先级低于delay(假设设置为300毫秒,若分页请求时间小于300毫秒,则在调用complete后延迟[300毫秒-请求时长];若请求时长大于300毫秒,则不延迟),当show-refresher-when-reload为true或reload(true)时,其最小值为400 minDelay: { type: [Number, String], default: u.gc("minDelay", 0) }, // 设置z-paging的style,部分平台(如微信小程序)无法直接修改组件的style,可使用此属性代替 pagingStyle: { type: Object, default: u.gc("pagingStyle", {}) }, // z-paging的高度,优先级低于pagingStyle中设置的height;传字符串,如100px、100rpx、100% height: { type: String, default: u.gc("height", "") }, // z-paging的宽度,优先级低于pagingStyle中设置的width;传字符串,如100px、100rpx、100% width: { type: String, default: u.gc("width", "") }, // z-paging的最大宽度,优先级低于pagingStyle中设置的max-width;传字符串,如100px、100rpx、100%。默认为空,也就是铺满窗口宽度,若设置了特定值则会自动添加margin: 0 auto maxWidth: { type: String, default: u.gc("maxWidth", "") }, // z-paging的背景色,优先级低于pagingStyle中设置的background。传字符串,如"#ffffff" bgColor: { type: String, default: u.gc("bgColor", "") }, // 设置z-paging的容器(插槽的父view)的style pagingContentStyle: { type: Object, default: u.gc("pagingContentStyle", {}) }, // z-paging是否自动高度,若自动高度则会自动铺满屏幕 autoHeight: { type: Boolean, default: u.gc("autoHeight", false) }, // z-paging是否自动高度时,附加的高度,注意添加单位px或rpx,若需要减少高度,则传负数 autoHeightAddition: { type: [Number, String], default: u.gc("autoHeightAddition", "0px") }, // loading(下拉刷新、上拉加载更多)的主题样式,支持black,white,默认black defaultThemeStyle: { type: String, default: u.gc("defaultThemeStyle", "black") }, // z-paging是否使用fixed布局,若使用fixed布局,则z-paging的父view无需固定高度,z-paging高度默认为100%,默认为是(当使用内置scroll-view滚动时有效) fixed: { type: Boolean, default: u.gc("fixed", true) }, // 是否开启底部安全区域适配 safeAreaInsetBottom: { type: Boolean, default: u.gc("safeAreaInsetBottom", false) }, // 开启底部安全区域适配后,是否使用placeholder形式实现,默认为否。为否时滚动区域会自动避开底部安全区域,也就是所有滚动内容都不会挡住底部安全区域,若设置为是,则滚动时滚动内容会挡住底部安全区域,但是当滚动到底部时才会避开底部安全区域 useSafeAreaPlaceholder: { type: Boolean, default: u.gc("useSafeAreaPlaceholder", false) }, // z-paging bottom的背景色,默认透明,传字符串,如"#ffffff" bottomBgColor: { type: String, default: u.gc("bottomBgColor", "") }, // slot="top"的view的z-index,默认为99,仅使用页面滚动时有效 topZIndex: { type: Number, default: u.gc("topZIndex", 99) }, // z-paging内容容器父view的z-index,默认为1 superContentZIndex: { type: Number, default: u.gc("superContentZIndex", 1) }, // z-paging内容容器部分的z-index,默认为1 contentZIndex: { type: Number, default: u.gc("contentZIndex", 1) }, // z-paging二楼的z-index,默认为100 f2ZIndex: { type: Number, default: u.gc("f2ZIndex", 100) }, // 使用页面滚动时,是否在不满屏时自动填充满屏幕,默认为是 autoFullHeight: { type: Boolean, default: u.gc("autoFullHeight", true) }, // 是否监听列表触摸方向改变,默认为否 watchTouchDirectionChange: { type: Boolean, default: u.gc("watchTouchDirectionChange", false) }, // z-paging中布局的单位,默认为rpx unit: { type: String, default: u.gc("unit", "rpx") } }, created() { if (this.createdReload && !this.refresherOnly && this.auto) { this._startLoading(); this.$nextTick(this._preReload); } }, mounted() { this.active = true; this.wxsPropType = u.getTime().toString(); this.renderJsIgnore; if (!this.createdReload && !this.refresherOnly && this.auto) { u.delay(() => this.$nextTick(this._preReload), 0); } this.finalUseCache && this._setListByLocalCache(); this.$nextTick(() => { this.systemInfo = u.getSystemInfoSync(); !this.usePageScroll && this.autoHeight && this._setAutoHeight(); this.loaded = true; u.delay(() => { this.updateFixedLayout(); this._updateCachedSuperContentHeight(); }); }); this.updatePageScrollTopHeight(); this.updatePageScrollBottomHeight(); this.updateLeftAndRightWidth(); if (this.finalRefresherEnabled && this.useCustomRefresher) { this.$nextTick(() => { this.isTouchmoving = true; }); } this._onEmit(); this.finalUseVirtualList && this._virtualListInit(); }, destroyed() { this._handleUnmounted(); }, unmounted() { this._handleUnmounted(); }, watch: { defaultThemeStyle: { handler(newVal) { if (newVal.length) { this.finalRefresherDefaultStyle = newVal; } }, immediate: true }, autoHeight(newVal) { this.loaded && !this.usePageScroll && this._setAutoHeight(newVal); }, autoHeightAddition(newVal) { this.loaded && !this.usePageScroll && this.autoHeight && this._setAutoHeight(newVal); } }, computed: { // 当前z-paging的内置样式 finalPagingStyle() { const pagingStyle = { ...this.pagingStyle }; if (!this.systemInfo) return pagingStyle; const { windowTop, windowBottom } = this; if (!this.usePageScroll && this.fixed) { if (windowTop && !pagingStyle.top) { pagingStyle.top = windowTop + "px"; } if (windowBottom && !pagingStyle.bottom) { pagingStyle.bottom = windowBottom + "px"; } } if (this.bgColor.length && !pagingStyle["background"]) { pagingStyle["background"] = this.bgColor; } if (this.height.length && !pagingStyle["height"]) { pagingStyle["height"] = this.height; } if (this.width.length && !pagingStyle["width"]) { pagingStyle["width"] = this.width; } if (this.maxWidth.length && !pagingStyle["max-width"]) { pagingStyle["max-width"] = this.maxWidth; pagingStyle["margin"] = "0 auto"; } return pagingStyle; }, // 当前z-paging内容的样式 finalPagingContentStyle() { if (this.contentZIndex != 1) { this.pagingContentStyle["z-index"] = this.contentZIndex; this.pagingContentStyle["position"] = "relative"; } return this.pagingContentStyle; }, renderJsIgnore() { if (this.usePageScroll && this.useChatRecordMode || !this.refresherEnabled && this.scrollable || !this.useCustomRefresher) { this.$nextTick(() => { this.renderPropScrollTop = 10; }); } return 0; }, windowHeight() { if (!this.systemInfo) return 0; return this.systemInfo.windowHeight || 0; }, windowBottom() { if (!this.systemInfo) return 0; let windowBottom = this.systemInfo.windowBottom || 0; if (this.safeAreaInsetBottom && !this.useSafeAreaPlaceholder && !this.useChatRecordMode) { windowBottom += this.safeAreaBottom; } return windowBottom; }, isIosAndH5() { return false; } }, methods: { // 当前版本号 getVersion() { return `z-paging v${c.version}`; }, // 设置nvue List的specialEffects setSpecialEffects(args) { this.setListSpecialEffects(args); }, // 与setSpecialEffects等效,兼容旧版本 setListSpecialEffects(args) { this.nFixFreezing = args && Object.keys(args).length; if (this.isIos) { this.privateRefresherEnabled = 0; } !this.usePageScroll && this.$refs["zp-n-list"].setSpecialEffects(args); }, // 当app长时间进入后台后进入前台,因系统内存管理导致app重新加载时,进行一些适配处理 _handlePageLaunch() { if (this.pageLaunched) { this.refresherThresholdUpdateTag = 1; this.$nextTick(() => { this.refresherThresholdUpdateTag = 0; }); this._checkVirtualListScroll(); } this.pageLaunched = true; }, // 使手机发生较短时间的振动(15ms) _doVibrateShort() { if (this.isIos) { const UISelectionFeedbackGenerator = plus.ios.importClass("UISelectionFeedbackGenerator"); const feedbackGenerator = new UISelectionFeedbackGenerator(); feedbackGenerator.init(); setTimeout(() => { feedbackGenerator.selectionChanged(); }, 0); } else { plus.device.vibrate(15); } }, // 设置z-paging高度 async _setAutoHeight(shouldFullHeight = true, scrollViewNode = null) { const heightKey = "min-height"; try { if (shouldFullHeight) { let finalScrollViewNode = scrollViewNode || await this._getNodeClientRect(".zp-scroll-view"); let finalScrollBottomNode = await this._getNodeClientRect(".zp-page-bottom"); if (finalScrollViewNode) { const scrollViewTop = finalScrollViewNode[0].top; let scrollViewHeight = this.windowHeight - scrollViewTop; scrollViewHeight -= finalScrollBottomNode ? finalScrollBottomNode[0].height : 0; const additionHeight = u.convertToPx(this.autoHeightAddition); let importantSuffix = " !important"; const finalHeight = scrollViewHeight + additionHeight - (this.insideMore ? 1 : 0) + "px" + importantSuffix; this.$set(this.scrollViewStyle, heightKey, finalHeight); this.$set(this.scrollViewInStyle, heightKey, finalHeight); } } else { this.$delete(this.scrollViewStyle, heightKey); this.$delete(this.scrollViewInStyle, heightKey); } } catch (e) { } }, // 组件销毁后续处理 _handleUnmounted() { this.active = false; this._offEmit(); this.useChatRecordMode && uni.offKeyboardHeightChange(this._handleKeyboardHeightChange); }, // 触发更新是否超出页面状态 _updateInsideOfPaging() { this.insideMore && this.insideOfPaging === true && setTimeout(this.doLoadMore, 200); }, // 清除timeout _cleanTimeout(timeout2) { if (timeout2) { clearTimeout(timeout2); timeout2 = null; } return timeout2; }, // 添加全局emit监听 _onEmit() { uni.$on(c.errorUpdateKey, (errorMsg) => { if (this.loading) { if (!!errorMsg) { this.customerEmptyViewErrorText = errorMsg; } this.complete(false).catch(() => { }); } }); uni.$on(c.completeUpdateKey, (data) => { setTimeout(() => { if (this.loading) { if (!this.disabledCompleteEmit) { const type2 = data.type || "normal"; const list2 = data.list || data; const rule = data.rule; this.fromCompleteEmit = true; switch (type2) { case "normal": this.complete(list2); break; case "total": this.completeByTotal(list2, rule); break; case "nomore": this.completeByNoMore(list2, rule); break; case "key": this.completeByKey(list2, rule); break; } } else { this.disabledCompleteEmit = false; } } }, 1); }); }, // 销毁全局emit和listener监听 _offEmit() { uni.$off(c.errorUpdateKey); uni.$off(c.completeUpdateKey); } } }; const block0$2 = (Comp) => { (Comp.$renderjs || (Comp.$renderjs = [])).push("pagingRenderjs"); (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["pagingRenderjs"] = "68423204"; }; const block1 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("pagingWxs"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["pagingWxs"] = "e0a9e146"; }; function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) { const _component_z_paging_refresh = vue.resolveComponent("z-paging-refresh"); const _component_z_paging_load_more = vue.resolveComponent("z-paging-load-more"); const _component_z_paging_empty_view = resolveEasycom(vue.resolveDynamicComponent("z-paging-empty-view"), __easycom_0$2); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "z-paging-content": true, "z-paging-content-full": !_ctx.usePageScroll, "z-paging-content-fixed": !_ctx.usePageScroll && _ctx.fixed, "z-paging-content-page": _ctx.usePageScroll, "z-paging-reached-top": _ctx.renderPropScrollTop < 1, "z-paging-use-chat-record-mode": _ctx.useChatRecordMode }), style: vue.normalizeStyle([_ctx.finalPagingStyle]) }, [ vue.createCommentVNode(" 二楼view "), _ctx.showF2 && _ctx.showRefresherF2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => { }, ["stop", "prevent"])), class: "zp-f2-content", style: vue.normalizeStyle([{ "transform": _ctx.f2Transform, "transition": `transform .2s linear`, "height": _ctx.superContentHeight + "px", "z-index": _ctx.f2ZIndex }]) }, [ vue.renderSlot(_ctx.$slots, "f2", {}, void 0, true) ], 36 /* STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 顶部固定的slot "), !_ctx.usePageScroll && _ctx.zSlots.top ? vue.renderSlot(_ctx.$slots, "top", { key: 1 }, void 0, true) : _ctx.usePageScroll && _ctx.zSlots.top ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "zp-page-top", onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => { }, ["stop", "prevent"])), style: vue.normalizeStyle([{ "top": `${_ctx.windowTop}px`, "z-index": _ctx.topZIndex }]) }, [ vue.renderSlot(_ctx.$slots, "top", {}, void 0, true) ], 36 /* STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass({ "zp-view-super": true, "zp-scroll-view-super": !_ctx.usePageScroll }), style: vue.normalizeStyle([_ctx.finalScrollViewStyle]) }, [ _ctx.zSlots.left ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass({ "zp-page-left": true, "zp-absoulte": _ctx.finalIsOldWebView }) }, [ vue.renderSlot(_ctx.$slots, "left", {}, void 0, true) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass({ "zp-scroll-view-container": true, "zp-absoulte": _ctx.finalIsOldWebView }), style: vue.normalizeStyle([_ctx.scrollViewContainerStyle]) }, [ vue.createElementVNode("scroll-view", { ref: "zp-scroll-view", class: vue.normalizeClass({ "zp-scroll-view": true, "zp-scroll-view-absolute": !_ctx.usePageScroll, "zp-scroll-view-hide-scrollbar": !_ctx.showScrollbar }), style: vue.normalizeStyle([_ctx.chatRecordRotateStyle]), "scroll-top": _ctx.scrollTop, "scroll-left": _ctx.scrollLeft, "scroll-x": _ctx.scrollX, "scroll-y": _ctx.finalScrollable, "enable-back-to-top": _ctx.finalEnableBackToTop, "show-scrollbar": _ctx.showScrollbar, "scroll-with-animation": _ctx.finalScrollWithAnimation, "scroll-into-view": _ctx.scrollIntoView, "lower-threshold": _ctx.finalLowerThreshold, "upper-threshold": 5, "refresher-enabled": _ctx.finalRefresherEnabled && !_ctx.useCustomRefresher, "refresher-threshold": _ctx.finalRefresherThreshold, "refresher-default-style": _ctx.finalRefresherDefaultStyle, "refresher-background": _ctx.refresherBackground, "refresher-triggered": _ctx.finalRefresherTriggered, onScroll: _cache[12] || (_cache[12] = (...args) => _ctx._scroll && _ctx._scroll(...args)), onScrolltolower: _cache[13] || (_cache[13] = (...args) => _ctx._onScrollToLower && _ctx._onScrollToLower(...args)), onScrolltoupper: _cache[14] || (_cache[14] = (...args) => _ctx._onScrollToUpper && _ctx._onScrollToUpper(...args)), onRefresherrestore: _cache[15] || (_cache[15] = (...args) => _ctx._onRestore && _ctx._onRestore(...args)), onRefresherrefresh: _cache[16] || (_cache[16] = ($event) => _ctx._onRefresh(true)) }, [ vue.createElementVNode( "view", { class: "zp-paging-touch-view", onTouchstart: _cache[4] || (_cache[4] = (...args) => _ctx.pagingWxs.touchstart && _ctx.pagingWxs.touchstart(...args)), onTouchmove: _cache[5] || (_cache[5] = (...args) => _ctx.pagingWxs.touchmove && _ctx.pagingWxs.touchmove(...args)), onTouchend: _cache[6] || (_cache[6] = (...args) => _ctx.pagingWxs.touchend && _ctx.pagingWxs.touchend(...args)), onTouchcancel: _cache[7] || (_cache[7] = (...args) => _ctx.pagingWxs.touchend && _ctx.pagingWxs.touchend(...args)), onMousedown: _cache[8] || (_cache[8] = (...args) => _ctx.pagingWxs.mousedown && _ctx.pagingWxs.mousedown(...args)), onMousemove: _cache[9] || (_cache[9] = (...args) => _ctx.pagingWxs.mousemove && _ctx.pagingWxs.mousemove(...args)), onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.pagingWxs.mouseup && _ctx.pagingWxs.mouseup(...args)), onMouseleave: _cache[11] || (_cache[11] = (...args) => _ctx.pagingWxs.mouseleave && _ctx.pagingWxs.mouseleave(...args)) }, [ _ctx.finalRefresherFixedBacHeight > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "zp-fixed-bac-view", style: vue.normalizeStyle([{ "background": _ctx.refresherFixedBackground, "height": `${_ctx.finalRefresherFixedBacHeight}px` }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "zp-paging-main", style: vue.normalizeStyle([_ctx.scrollViewInStyle, { "transform": _ctx.finalRefresherTransform, "transition": _ctx.refresherTransition }]), "change:prop": _ctx.pagingWxs.propObserver, prop: vue.wp(_ctx.wxsPropType), "data-refresherThreshold": _ctx.finalRefresherThreshold, "data-refresherF2Enabled": _ctx.refresherF2Enabled, "data-refresherF2Threshold": _ctx.finalRefresherF2Threshold, "data-isIos": _ctx.isIos, "data-loading": _ctx.loading || _ctx.isRefresherInComplete, "data-useChatRecordMode": _ctx.useChatRecordMode, "data-refresherEnabled": _ctx.refresherEnabled, "data-useCustomRefresher": _ctx.useCustomRefresher, "data-pageScrollTop": _ctx.wxsPageScrollTop, "data-scrollTop": _ctx.wxsScrollTop, "data-refresherMaxAngle": _ctx.refresherMaxAngle, "data-refresherNoTransform": _ctx.refresherNoTransform, "data-refresherAecc": _ctx.refresherAngleEnableChangeContinued, "data-usePageScroll": _ctx.usePageScroll, "data-watchTouchDirectionChange": _ctx.watchTouchDirectionChange, "data-oldIsTouchmoving": _ctx.isTouchmoving, "data-refresherOutRate": _ctx.finalRefresherOutRate, "data-refresherPullRate": _ctx.finalRefresherPullRate, "data-hasTouchmove": _ctx.hasTouchmove, "change:renderPropIsIosAndH5": _ctx.pagingRenderjs.renderPropIsIosAndH5Change, renderPropIsIosAndH5: vue.wp(_ctx.isIosAndH5) }, [ _ctx.showRefresher ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "zp-custom-refresher-view", style: vue.normalizeStyle([{ "margin-top": `-${_ctx.finalRefresherThreshold + _ctx.refresherThresholdUpdateTag}px`, "background": _ctx.refresherBackground, "opacity": _ctx.isTouchmoving ? 1 : 0 }]) }, [ vue.createElementVNode( "view", { class: "zp-custom-refresher-container", style: vue.normalizeStyle([{ "height": `${_ctx.finalRefresherThreshold}px`, "background": _ctx.refresherBackground }]) }, [ _ctx.useRefresherStatusBarPlaceholder ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "zp-custom-refresher-status-bar-placeholder", style: vue.normalizeStyle([{ "height": `${_ctx.statusBarHeight}px` }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 下拉刷新view "), vue.createElementVNode("view", { class: "zp-custom-refresher-slot-view" }, [ !(_ctx.zSlots.refresherComplete && _ctx.refresherStatus === _ctx.R.Complete) && !(_ctx.zSlots.refresherF2 && _ctx.refresherStatus === _ctx.R.GoF2) ? vue.renderSlot(_ctx.$slots, "refresher", { key: 0, refresherStatus: _ctx.refresherStatus }, void 0, true) : vue.createCommentVNode("v-if", true) ]), _ctx.zSlots.refresherComplete && _ctx.refresherStatus === _ctx.R.Complete ? vue.renderSlot(_ctx.$slots, "refresherComplete", { key: 1 }, void 0, true) : _ctx.zSlots.refresherF2 && _ctx.refresherStatus === _ctx.R.GoF2 ? vue.renderSlot(_ctx.$slots, "refresherF2", { key: 2 }, void 0, true) : !_ctx.showCustomRefresher ? (vue.openBlock(), vue.createBlock(_component_z_paging_refresh, { key: 3, ref: "refresh", class: "zp-custom-refresher-refresh", style: vue.normalizeStyle([{ "height": `${_ctx.finalRefresherThreshold - _ctx.finalRefresherThresholdPlaceholder}px` }]), status: _ctx.refresherStatus, defaultThemeStyle: _ctx.finalRefresherThemeStyle, defaultText: _ctx.finalRefresherDefaultText, isIos: _ctx.isIos, pullingText: _ctx.finalRefresherPullingText, refreshingText: _ctx.finalRefresherRefreshingText, completeText: _ctx.finalRefresherCompleteText, goF2Text: _ctx.finalRefresherGoF2Text, defaultImg: _ctx.refresherDefaultImg, pullingImg: _ctx.refresherPullingImg, refreshingImg: _ctx.refresherRefreshingImg, completeImg: _ctx.refresherCompleteImg, refreshingAnimated: _ctx.refresherRefreshingAnimated, showUpdateTime: _ctx.showRefresherUpdateTime, updateTimeKey: _ctx.refresherUpdateTimeKey, updateTimeTextMap: _ctx.finalRefresherUpdateTimeTextMap, imgStyle: _ctx.refresherImgStyle, titleStyle: _ctx.refresherTitleStyle, updateTimeStyle: _ctx.refresherUpdateTimeStyle, unit: _ctx.unit }, null, 8, ["style", "status", "defaultThemeStyle", "defaultText", "isIos", "pullingText", "refreshingText", "completeText", "goF2Text", "defaultImg", "pullingImg", "refreshingImg", "completeImg", "refreshingAnimated", "showUpdateTime", "updateTimeKey", "updateTimeTextMap", "imgStyle", "titleStyle", "updateTimeStyle", "unit"])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "zp-paging-container", style: vue.normalizeStyle([{ justifyContent: _ctx.useChatRecordMode ? "flex-end" : "flex-start" }]) }, [ vue.createCommentVNode(" 全屏Loading "), _ctx.showLoading && _ctx.zSlots.loading && !_ctx.loadingFullFixed ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }, void 0, true) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 主体内容 "), vue.createElementVNode( "view", { class: "zp-paging-container-content", style: vue.normalizeStyle([_ctx.finalPlaceholderTopHeightStyle, _ctx.finalPagingContentStyle]) }, [ vue.createCommentVNode(" 虚拟列表顶部占位view "), _ctx.useVirtualList ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "zp-virtual-placeholder", style: vue.normalizeStyle([{ height: _ctx.virtualPlaceholderTopHeight + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), vue.createCommentVNode(" 内置列表&虚拟列表 "), _ctx.finalUseInnerList ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.renderSlot(_ctx.$slots, "header", {}, void 0, true), vue.createElementVNode( "view", { class: "zp-list-container", style: vue.normalizeStyle([_ctx.innerListStyle]) }, [ _ctx.finalUseVirtualList ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(_ctx.virtualList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "zp-list-cell", style: vue.normalizeStyle([_ctx.innerCellStyle]), id: `${_ctx.fianlVirtualCellIdPrefix}-${item[_ctx.virtualCellIndexKey]}`, key: item["zp_unique_index"], onClick: ($event) => _ctx._innerCellClick(item, _ctx.virtualTopRangeIndex + index) }, [ _ctx.useCompatibilityMode ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, "使用兼容模式请在组件源码z-paging.vue第103行中注释这一行,并打开下面一行注释")) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(' '), vue.renderSlot(_ctx.$slots, "cell", { item, index: _ctx.virtualTopRangeIndex + index }, void 0, true) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) ], 12, ["id", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(_ctx.realTotalData, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "zp-list-cell", key: index, onClick: ($event) => _ctx._innerCellClick(item, index) }, [ vue.renderSlot(_ctx.$slots, "cell", { item, index }, void 0, true) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ ), vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 聊天记录模式加载更多loading "), _ctx.useChatRecordMode && _ctx.realTotalData.length >= _ctx.defaultPageSize && (_ctx.loadingStatus !== _ctx.M.NoMore || _ctx.zSlots.chatNoMore) && (_ctx.realTotalData.length || _ctx.showChatLoadingWhenReload && _ctx.showLoading) && !_ctx.isFirstPageAndNoMore ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, style: vue.normalizeStyle([_ctx.chatRecordRotateStyle]) }, [ _ctx.loadingStatus === _ctx.M.NoMore && _ctx.zSlots.chatNoMore ? vue.renderSlot(_ctx.$slots, "chatNoMore", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ _ctx.zSlots.chatLoading ? vue.renderSlot(_ctx.$slots, "chatLoading", { key: 0, loadingMoreStatus: _ctx.loadingStatus }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_z_paging_load_more, { key: 1, onDoClick: _cache[2] || (_cache[2] = ($event) => _ctx._onLoadingMore("click")), zConfig: _ctx.zLoadMoreConfig }, null, 8, ["zConfig"])) ], 64 /* STABLE_FRAGMENT */ )) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 虚拟列表底部占位view "), _ctx.useVirtualList ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "zp-virtual-placeholder", style: vue.normalizeStyle([{ height: _ctx.virtualPlaceholderBottomHeight + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 上拉加载更多view "), _ctx.showLoadingMoreDefault ? vue.renderSlot(_ctx.$slots, "loadingMoreDefault", { key: 4 }, void 0, true) : _ctx.showLoadingMoreLoading ? vue.renderSlot(_ctx.$slots, "loadingMoreLoading", { key: 5 }, void 0, true) : _ctx.showLoadingMoreNoMore ? vue.renderSlot(_ctx.$slots, "loadingMoreNoMore", { key: 6 }, void 0, true) : _ctx.showLoadingMoreFail ? vue.renderSlot(_ctx.$slots, "loadingMoreFail", { key: 7 }, void 0, true) : _ctx.showLoadingMoreCustom ? (vue.openBlock(), vue.createBlock(_component_z_paging_load_more, { key: 8, onDoClick: _cache[3] || (_cache[3] = ($event) => _ctx._onLoadingMore("click")), zConfig: _ctx.zLoadMoreConfig }, null, 8, ["zConfig"])) : vue.createCommentVNode("v-if", true), _ctx.safeAreaInsetBottom && _ctx.useSafeAreaPlaceholder && !_ctx.useChatRecordMode ? (vue.openBlock(), vue.createElementBlock( "view", { key: 9, class: "zp-safe-area-placeholder", style: vue.normalizeStyle([{ height: _ctx.safeAreaBottom + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createCommentVNode(" 空数据图 "), _ctx.showEmpty ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass({ "zp-empty-view": true, "zp-empty-view-center": _ctx.emptyViewCenter }), style: vue.normalizeStyle([_ctx.emptyViewSuperStyle, _ctx.chatRecordRotateStyle]) }, [ _ctx.zSlots.empty ? vue.renderSlot(_ctx.$slots, "empty", { key: 0, isLoadFailed: _ctx.isLoadFailed }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_z_paging_empty_view, { key: 1, emptyViewImg: _ctx.finalEmptyViewImg, emptyViewText: _ctx.finalEmptyViewText, showEmptyViewReload: _ctx.finalShowEmptyViewReload, emptyViewReloadText: _ctx.finalEmptyViewReloadText, isLoadFailed: _ctx.isLoadFailed, emptyViewStyle: _ctx.emptyViewStyle, emptyViewTitleStyle: _ctx.emptyViewTitleStyle, emptyViewImgStyle: _ctx.emptyViewImgStyle, emptyViewReloadStyle: _ctx.emptyViewReloadStyle, emptyViewZIndex: _ctx.emptyViewZIndex, emptyViewFixed: _ctx.emptyViewFixed, unit: _ctx.unit, onReload: _ctx._emptyViewReload, onViewClick: _ctx._emptyViewClick }, null, 8, ["emptyViewImg", "emptyViewText", "showEmptyViewReload", "emptyViewReloadText", "isLoadFailed", "emptyViewStyle", "emptyViewTitleStyle", "emptyViewImgStyle", "emptyViewReloadStyle", "emptyViewZIndex", "emptyViewFixed", "unit", "onReload", "onViewClick"])) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 12, ["change:prop", "prop", "data-refresherThreshold", "data-refresherF2Enabled", "data-refresherF2Threshold", "data-isIos", "data-loading", "data-useChatRecordMode", "data-refresherEnabled", "data-useCustomRefresher", "data-pageScrollTop", "data-scrollTop", "data-refresherMaxAngle", "data-refresherNoTransform", "data-refresherAecc", "data-usePageScroll", "data-watchTouchDirectionChange", "data-oldIsTouchmoving", "data-refresherOutRate", "data-refresherPullRate", "data-hasTouchmove", "change:renderPropIsIosAndH5", "renderPropIsIosAndH5"]) ], 32 /* NEED_HYDRATION */ ) ], 46, ["scroll-top", "scroll-left", "scroll-x", "scroll-y", "enable-back-to-top", "show-scrollbar", "scroll-with-animation", "scroll-into-view", "lower-threshold", "refresher-enabled", "refresher-threshold", "refresher-default-style", "refresher-background", "refresher-triggered"]) ], 6 /* CLASS, STYLE */ ), _ctx.zSlots.right ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass({ "zp-page-right": true, "zp-absoulte zp-right": _ctx.finalIsOldWebView }) }, [ vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ), vue.createCommentVNode(" 底部固定的slot "), vue.createElementVNode( "view", { class: "zp-page-bottom-container", style: vue.normalizeStyle({ "background": _ctx.bottomBgColor }) }, [ !_ctx.usePageScroll && _ctx.zSlots.bottom ? vue.renderSlot(_ctx.$slots, "bottom", { key: 0 }, void 0, true) : _ctx.usePageScroll && _ctx.zSlots.bottom ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "zp-page-bottom", onTouchmove: _cache[17] || (_cache[17] = vue.withModifiers(() => { }, ["stop", "prevent"])), style: vue.normalizeStyle([{ "bottom": `${_ctx.windowBottom}px` }]) }, [ vue.renderSlot(_ctx.$slots, "bottom", {}, void 0, true) ], 36 /* STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 聊天记录模式底部占位 "), _ctx.useChatRecordMode && _ctx.autoAdjustPositionWhenChat ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ vue.createElementVNode( "view", { style: vue.normalizeStyle([{ height: _ctx.chatRecordModeSafeAreaBottom + "px" }]) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "zp-page-bottom-keyboard-placeholder-animate", style: vue.normalizeStyle([{ height: _ctx.keyboardHeight + "px" }]) }, null, 4 /* STYLE */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createCommentVNode(" 点击返回顶部view "), _ctx.showBackToTopClass ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: vue.normalizeClass(_ctx.finalBackToTopClass), style: vue.normalizeStyle([_ctx.finalBackToTopStyle]), onClick: _cache[18] || (_cache[18] = vue.withModifiers((...args) => _ctx._backToTopClick && _ctx._backToTopClick(...args), ["stop"])) }, [ _ctx.zSlots.backToTop ? vue.renderSlot(_ctx.$slots, "backToTop", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: vue.normalizeClass(["zp-back-to-top-img", { "zp-back-to-top-img-inversion": _ctx.useChatRecordMode && !_ctx.backToTopImg.length }]), src: _ctx.backToTopImg.length ? _ctx.backToTopImg : _ctx.base64BackToTop }, null, 10, ["src"])) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 全屏Loading(铺满z-paging并固定) "), _ctx.showLoading && _ctx.zSlots.loading && _ctx.loadingFullFixed ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "zp-loading-fixed" }, [ vue.renderSlot(_ctx.$slots, "loading", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } if (typeof block0$2 === "function") block0$2(_sfc_main$16); if (typeof block1 === "function") block1(_sfc_main$16); const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-fb5441fe"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/z-paging/components/z-paging/z-paging.vue"]]); function sleep(time = 500) { return new Promise((resolve2) => { setTimeout(() => resolve2(true), time); }); } function utf8ArrayToString(array2) { let out, i, len, c2; let char2, char3; out = ""; len = array2.length; i = 0; while (i < len) { c2 = array2[i++]; switch (c2 >> 4) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: out += String.fromCharCode(c2); break; case 12: case 13: char2 = array2[i++]; out += String.fromCharCode((c2 & 31) << 6 | char2 & 63); break; case 14: char2 = array2[i++]; char3 = array2[i++]; out += String.fromCharCode((c2 & 15) << 12 | (char2 & 63) << 6 | (char3 & 63) << 0); break; } } return out; } function formatRange(input) { const str = String(input); return str.replace(/(\d+)(\.25|\.75)/g, (match, integer2, decimal) => { const num = parseInt(integer2); if (decimal === ".25") { return `${num}/${num + 0.5}`; } else if (decimal === ".75") { return `${num + 0.5}/${num + 1}`; } return match; }); } const GameRulesHTML = `


足球

最后更新日期: 10/02/2026

一般规则

  • 除非另有注明,所有足球投注的结算皆以球赛所规定的完场时间90分钟为准。

  • 完场时间90分钟包括球员伤停补时。加时赛、淘汰赛、点球,以及赛事后如果裁判或相关管理机构更改任何赛果则不计算在内。

  • 除非在个别玩法规则另有注明,所有滚球投注的结算将以90分钟的赛果为准。

  • 当该规则与友谊赛相关的时候会有例外。在这种情况下,无论是否进行了整整 90 分钟,所有赛事盘口都根据赛事结束时的实际结果(不包括任何加时赛)进行结算。

  • 完场时间45分钟是指赛事上半场,其中包含伤停补时。加时赛、淘汰赛、点球,以及赛事后如果裁判或相关管理机构更改任何赛果则不计算在内。

  • 部分足球赛事可能有不同的赛程。 在这种情况下,以下内容适用于:

    • 预定赛事时间 90 分钟(3 x 30 分钟)。全场投注仍被视为有效。半场投注被视为无效。

    • 预定赛事时间 80 分钟(2 x 40 分钟)。所有投注仍被视为有效。

    • 若赛事时间与上述不同,则所有投注均无效。

  • 如果赛事中断或延迟,并且没有在5小时内重新开始,所有该场赛事的全场投注即被视为无效且取消,如遇已有确认赛果之注单仍会进行结算,除非在个别投注类型规则里另有指定注明。

  • 如果赛事确认取消,所有该场赛事的全场投注即被视为无效且取消,如遇已有确认赛果之注单仍会进行结算,除非在个别投注类型规则里另有指定注明。如果赛事是在上半场中断,所有上半场的注单将被取消。如果赛事是在下半场中断所有上半场的投注保持有效,但所有下半场的注单将被取消,除非在个别玩法规则另有注明。

  • 除非在个别玩法规则另有注明,乌龙球将予以计算在内。

  • 如果比赛场地有变更(主客队调换),所有此注单将被取消。

  • 对于国际赛事,只要变更的场地仍在同一个国家内,所有注单将保持有效。

  • 对于国际赛事,只要变更的场地仍在联赛原定举办的国家内,所有注单将保持有效。

  • 本公司保留权利取消任何因更换场地而可能对赛事结果有影响的注单。

  • 若赛事的确切开赛时间不明(比如,由于电视直播时间安排的问题),要是在原本开赛时间的72小时之内,本平台保留调整该开赛时间的权利。

主要市场

让球盘

一般规则

  • 预测哪一支球队在盘口指定的让球数在全场/半场/赛事某个时节赢得比赛。

  • “让球盘”则定义为在比赛正式开始前,一方球队已得到另一方让的虚拟分数,以领先的情况下开始比赛。

  • 所有注单将按盘口开出的让球数在玩法的时节结束后结算。

  • 让球队(优势球队)将给出让球,让球数将显示在赔率的左侧,让球队在盘面上也会以粗型字体显示

  • 让球盘的玩法分为以下几种:

    • 整数让球也或称为让‘一球’(如:-1,-2,-3,等)

    • 非整数让球也或称为‘半球’(如:-0.5,-1.5,-2.5,等)

    • 混合以上让‘半球/一球’的方式(如:-0/0.5,-0.5/1,-1/1.5,等)

让球

  • 根据盘口让球信息预测最终获得胜利的球队。

  • 投注的结算皆以球赛所规定的完场时间90分钟为准。

  • 如果赛事在90分钟结束前取消或中断,所有注单将会被视为无效。

让球 - 上半场

  • 所有上半场的投注将以上半场45分钟其中包含伤停补时后的赛果结算。

  • 如果赛事在上半场时节因任何理由取消或中断,所有上半场注单将被取消。

  • 如果赛事在下半场或加时赛因任何理由取消或中断,所有上半场注单保持有效。

欧洲让分盘

  • 透过给定的让分盘,预测最终比分。让分盘适用于最终比分,而非针对滚球或赛前赛事投注时的比分。

  • 投注的结算皆以球赛所规定的完场时间90分钟为准。

  • 如果赛事在90分钟结束前取消或中断,所有注单将会被视为无效。

滚球让球

  • 所有注单将按照盘口开出让球信息,在相应投注类型结束后结算。

  • 结算是以投注时到比赛/时节结束后的赛果做裁决。即是以赛事完场比分减去投注当时的比分。上半场的滚球让球投注将以上半场结束后的赛果结算。

加时赛 - 让球

  • 所有注单将按照盘口开出让球信息,在30分钟加时赛结束后计算,包含补时。

  • 如果赛事在加时赛结束前取消或中断,所有注单将会被视为无效。

加时赛 - 让球-上半场

  • 所有注单将按照盘口开出让球信息,在15分钟加时赛结束后计算,包含补时。

  • 加时赛中如果赛事在上半场取消或中断,所有上半场注单将会被视为无效。

  • 加时赛中如果赛事在下半场或补时阶段取消或中断,所有上半场注单将会被视为有效。

15 分钟进球数 (含伤停补时)(让球)

  • 根据盘口让球信息预测最终获得15分钟内比赛胜利的球队。

  • 在每个15分钟开始,所有球队在开始此时段比赛都是0-0,之前的得分点是没有影响的

  • 所有的投注将以开始下个时节前的赛果结算。

  • 如果赛事中断,所有当前15分钟时段的投注以及将要进行的下一个15分钟时段投注将视为无效,任何15分钟时段投注,如果该时段完整结束,注单将被视为有效。

15分钟-时段1

00分00秒-14分59秒

15分钟-时段2

15分00秒-29分59秒

15分钟-时段3

30分00秒-45分00秒 (含伤停补时)

15分钟-时段4

45分00秒-59分59秒

15分钟-时段5

60分00秒-74分59秒

15分钟-时段6

75分00秒-90分00秒 (含伤停补时)




首个X分钟 - 让球

  • 根据盘口让球信息预测赛事開始到指定分钟内比赛胜利的球队。

  • 时段如下:

    • 00分00秒-04分59秒

    • 00分00秒-09分59秒

    • 00分00秒-14分59秒

    • 00分00秒-19分59秒

    • 00分00秒-24分59秒

    • 00分00秒-29分59秒

    • 00分00秒-34分59秒

    • 00分00秒-39分59秒

    • 00分00秒-49分59秒

    • 00分00秒-54分59秒

    • 00分00秒-59分59秒

    • 00分00秒-64分59秒

    • 00分00秒-69分59秒

    • 00分00秒-74分59秒

    • 00分00秒-79分59秒

    • 00分00秒-84分59秒


大小盘

一般规则

  • 预测赛事总入球数将大于或小于在盘口指定的大/小盘球数。

  • 如果赛事的总入球数多于盘口的大/小盘球数,则为大盘。如果少于盘口的大/小盘球数,则为小盘。

  • 所有注单将按盘口开出的大/小盘球数在玩法的时节结束后结算。

  • 大/小盘的玩法分为以下几种:

    • 大/小于‘一球’(如:2,3,4,等)

    • 大/小于‘半球’(如:1.5,2.5,3.5,等)

    • 混合以上‘半球/一球’的方式(如:1.5/2,2.5/3,3.5/4,等)

  • 如果赛事中断前已有明确结果并且之后没有任何显着会影响赛事结果的情况,大/小盘注单才会被结算。若遇到任何其他情况,注单将一律被取消。请参考以上范例:

    • 范例1:会员投注大于2.5球:

      • 赛事在比分2-1时中断。

      • 尽管赛事中断,但因结果已经明确并且若之后有任何潜在进球将对盘口结算裁决没有影响,所有此会员注单结算为赢。

    • 范例2:会员投注小于2.5球:

      • 赛事在比分2-1时中断。

      • 尽管赛事中断,但因结果已经明确并且若之后有任何潜在进球将对盘口结算裁决没有影响,所有此会员注单结算为输。

    • 范例3:会员投注大于3.5球:

      • 赛事在比分2-1时中断。

      • 由于赛事在未有明确的结果能裁决会员的注单前中断,此会员的注单将被取消。

进球: 大 / 小

  • 所有的投注将以全场90分钟的赛果结算。

  • 如果比赛停止,取消或中断,所有投注将被视为无效,除非在赛事取消或中断前,结果已经明确。

进球: 大 / 小 - 上半场

  • 所有上半场的投注将以上半场45分钟的赛果结算。

  • 如果赛事在上半场时节因任何理由取消或中断,所有上半场注单将被取消。除非在赛事取消或中断前,结果已经明确。

  • 如果赛事在下半场或加时时段因任何理由取消或中断,所有上半场注单保持有效。

欧洲大小盘

  • 预测两支队伍于赛事常规时间内(包括伤停补时)的总进球得分数。

  • 若该赛事作废,除非该投注的结果已经确定,否则所有投注无效。

欧洲大小盘-上半场

  • 预测两支队伍于赛事上半场(包括伤停补时)的总进球得分数。

  • 若该赛事作废,除非该投注的结果已经确定,否则所有投注无效。

滚球大小盘

  • 结算是以双方球队在90分钟内的总进球数为依据。

加时赛 - 进球: 大 / 小

  • 两支球队开始加时赛的比分为0-0,之前赛果属于常规时间内入球不会计算在内。

  • 所有的投注将以30分钟加时赛后结果结算,包括补时。

  • 在加时赛结束前如果比赛停止,取消或中断,所有投注将被视为无效,除非在赛事取消或中断前,结果已经明确。

加时赛 - 进球: 大 / 小 - 上半场

  • 所有投注将会按照15分钟赛事结束后赛果为准,包含补时。

  • 如果比赛在上半场停止,取消或者中断,所有上半场注单将被视为无效。

  • 如果比赛在下半场或补时期间停止,取消或者中断,所有上半场注单将被视为有效。

加时赛:欧洲大小盘

  • 两支球队开始加时赛的比分为0-0,之前赛果属于常规时间内入球不会计算在内。

  • 预测两支队伍于赛事30分钟加时赛內(包括伤停补时)的总进球得分数。

  • 若该赛事作废,除非该投注的结果已经确定,否则所有投注无效。

球队进球: 大 / 小

  • 预测在特定的比赛有关期间内,其中一支球队的总入球数将大于或小于在盘口指定的大/小盘球数。

  • 如果赛事的总入球数多于盘口的大/小盘球数,则为大盘。如果少于盘口的大/小盘球数,则为小盘。

  • 如果赛事中断前已有明确结果并且之后没有任何显着会影响赛事结果的情况,注单才会被结算。若遇到任何其他情况,注单将一律被取消。

加时赛 : 球队进球: 大 / 小

  • 预测在特定的比赛加时赛期间内,其中一支球队的总入球数将大于或小于在盘口指定的大/小盘球数。

  • 如果赛事的总入球数多于盘口的大/小盘球数,则为大盘。如果少于盘口的大/小盘球数,则为小盘。

  • 如果赛事中断前已有明确结果并且之后没有任何显着会影响赛事结果的情况,注单才会被结算。若遇到任何其他情况,注单将一律被取消。

15 分钟进球数 (含伤停补时)(大 / 小)

  • 预测赛事总入球数将大于或小于在盘口指定的大/小盘球数。

  • 如果总进球数多于盘口的大/小盘牌数,则为大盘。如果少于盘口的大/小盘牌数,则为小盘。

  • 在每个15分钟时开始,所有球队在开始此时节比赛都是0-0,之前的得分是没有影响的。

  • 如果比赛被中断,所有将要进行的15分钟时段投注将被视为无效。任何15分钟时段投注,如果该时段中赛事进行完整,此注单将被视为有效。在15分钟时段中,如果赛事已有明确结果并且之后对赛事没有任何影响,总进球数大/小盘注单才会被结算。任何其他的情况,投注将被视为无效。

15分钟-时段1

00分00秒-14分59秒

15分钟-时段2

15分00秒-29分59秒

15分钟-时段3

30分00秒-45分00秒 (含伤停补时)

15分钟-时段4

45分00秒-59分59秒

15分钟-时段5

60分00秒-74分59秒

15分钟-时段6

75分00秒-90分00秒 (含伤停补时)


10 分钟进球数 (含伤停补时)(大 / 小)

  • 预测赛事总入球数将大于或小于在盘口指定的大/小盘球数。

  • 如果总进球数多于盘口的大/小盘牌数,则为大盘。如果少于盘口的大/小盘牌数,则为小盘。

  • 在每个10分钟时开始,所有球队在开始此时节比赛都是0-0,之前的得分是没有影响的。

  • 如果比赛被中断,所有将要进行的10分钟时段投注将被视为无效。任何10分钟时段投注,如果该时段中赛事进行完整,此注单将被视为有效。在10分钟时段中,如果赛事已有明确结果并且之后对赛事没有任何影响,总进球数大/小盘注单才会被结算。任何其他的情况,投注将被视为无效。

10分钟-时段1

00分00秒-09分59秒

10分钟-时段2

10分00秒-19分59秒

10分钟-时段3

20分00秒-29分59秒

10分钟-时段4

30分00秒-39分59秒

10分钟-时段5

40分00秒-49分59秒 (含伤停补时)

10分钟-时段6

50分00秒-59分59秒

10分钟-时段7

60分00秒-69分59秒

10分钟-时段8

70分00秒-79分59秒

10分钟-时段9

80分00秒-90分00秒 (含伤停补时)


5 分钟进球数 (含伤停补时)(大 / 小)

  • 预测赛事总入球数将大于或小于在盘口指定的大/小盘球数。

  • 如果总进球数多于盘口的大/小盘牌数,则为大盘。如果少于盘口的大/小盘牌数,则为小盘。

  • 在每个5分钟时开始,所有球队在开始此时节比赛都是0-0,之前的得分是没有影响的。

  • 如果比赛被中断,所有将要进行的5分钟时段投注将被视为无效。任何5分钟时段投注,如果该时段中赛事进行完整,此注单将被视为有效。在5分钟时段中,如果赛事已有明确结果并且之后对赛事没有任何影响,总进球数大/小盘注单才会被结算。任何其他的情况,投注将被视为无效。

5分钟-时段1

00分00秒-04分59秒

5分钟-时段2

05分00秒-09分59秒

5分钟-时段3

10分00秒-14分59秒

5分钟-时段4

15分00秒-19分59秒

5分钟-时段5

20分00秒-24分59秒

5分钟-时段6

25分00秒-29分59秒

5分钟-时段7

30分00秒-34分59秒

5分钟-时段8

35分00秒-39分59秒

5分钟-时段9

40分00秒-45分00秒 (含伤停补时)

5分钟-时段10

45分00秒-49分59秒

5分钟-时段11

50分00秒-54分59秒

5分钟-时段12

55分00秒-59分59秒

5分钟-时段13

60分00秒-64分59秒

5分钟-时段14

65分00秒-69分59秒

5分钟-时段15

70分00秒-74分59秒

5分钟-时段16

75分00秒-79分59秒

5分钟-时段17

80分00秒-84分59秒

5分钟-时段18

85分00秒-90分00秒 (含伤停补时)


首个X分钟 - 大 / 小

  • 预测赛事開始到指定分钟内总入球数将大于或小于在盘口指定的大/小盘球数。

  • 如果总进球数多于盘口的大/小盘牌数,则为大盘。如果少于盘口的大/小盘牌数,则为小盘。

  • 时段如下:

    • 00分00秒-04分59秒

    • 00分00秒-09分59秒

    • 00分00秒-14分59秒

    • 00分00秒-19分59秒

    • 00分00秒-24分59秒

    • 00分00秒-29分59秒

    • 00分00秒-34分59秒

    • 00分00秒-39分59秒

    • 00分00秒-49分59秒

    • 00分00秒-54分59秒

    • 00分00秒-59分59秒

    • 00分00秒-64分59秒

    • 00分00秒-69分59秒

    • 00分00秒-74分59秒

    • 00分00秒-79分59秒

    • 00分00秒-84分59秒



加时赛 - 5 分钟进球数 (大 / 小)

  • 预测赛事总入球数将大于或小于在盘口指定的大/小盘球数。

  • 如果总进球数多于盘口的大/小盘牌数,则为大盘。如果少于盘口的大/小盘牌数,则为小盘。

  • 在每个5分钟时开始,所有球队在开始此时节比赛都是0-0,之前的得分是没有影响的。

  • 如果比赛被中断,所有将要进行的5分钟时段投注将被视为无效。任何5分钟时段投注,如果该时段中赛事进行完整,此注单将被视为有效。在5分钟时段中,如果赛事已有明确结果并且之后对赛事没有任何影响,总进球数大/小盘注单才会被结算。任何其他的情况,投注将被视为无效。

5分钟-时段1

上半场开始-04分59秒

5分钟-时段2

05分钟-09分59秒

5分钟-时段3

10分钟-半场

5分钟-时段4

下半场开始-19分59秒

5分钟-时段5

20分钟-24分59秒

5分钟-时段6

25分钟-全场


1 X 2(独赢盘)

一般规则

  • 预测哪一支球队将在比赛胜出。盘口提供两支球队和平局为投注选项。

  • 投注将以0-0的比分作为计算基础(让球并不计算在内)。

独赢

  • 预测哪一支球队将在90分钟比赛胜出或赛事和局。

独赢 - 上半场

  • 所有上半场的投注将以上半场45分钟赛果结算。

滚球独赢

  • 预测滚球时,哪一支球队胜出。

  • 投注的结算将以90分钟完场赛果为准。

  • 以下为滚球独赢盘范例。


目前得分

赔率

阿森纳(主)

1

1.61

曼联

0

6.0

和局

 

3.8

  • 范例1:在赛事比分为阿森纳1-0曼联时,会员投注滚球独赢盘 – 阿森纳赢:

    • 完场赛果为阿森纳2-1曼联。

    • 因阿森纳在完场时胜出,所有投注阿森纳的注单结算为赢。

    • 所有在比分1-0时投注曼联或平局的注单将结算为输。

  • 范例2:在赛事比分为阿森纳1-0曼联时,会员投注滚球独赢盘 –曼联赢:

    • 完场赛果为阿森纳1-1曼联。

    • 因完场赛果为平局,所有投注曼联以及阿森纳的注单将结算为输。

    • 所有投注平局的注单将结算为赢。

  • 加时赛则视为一场新的赛事并且会开出加时赛盘口。投注将按加时赛时节的结果做结算。

加时赛 - 独赢

  • 预测哪一支球队将会在30分钟内胜出,或赛事平局,包含补时。

  • 如果比赛在加时赛结束前暂停,取消或中止,所有投注将被视为无效。

加时赛 - 独赢 - 上半场

  • 预测哪一支球队将会在15分钟内胜出,或赛事平局,包含补时。

  • 如果赛事在加时赛上半场取消或中断,所有上半场注单将会被取消。

  • 如果赛事在加时赛下半场取消或中断,所有上半场注单将被会视为有效。


15 分钟进球数 (含伤停补时)(独赢)

  • 预测在规定时段内哪一支球队将会获胜,赛事盘口将会提供两支球队,以及和局。

  • 所有两支球队在每时段开始时比分将按照0-0计算,之前比分不计算在内。

  • 如果赛事中断,所有当前15分钟时段的投注以及将要进行的下一个15分钟时段投注将视为无效,任何15分钟时段投注,如果该时段完整结束,注单将被视为有效。

15分钟-时段1

00分00秒-14分59秒

15分钟-时段2

15分00秒-29分59秒

15分钟-时段3

30分00秒-45分00秒 (含伤停补时)

15分钟-时段4

45分00秒-59分59秒

15分钟-时段5

60分00秒-74分59秒

15分钟-时段6

75分00秒-90分00秒 (含伤停补时)



10 分钟进球数 (含伤停补时)(独赢)

  • 预测在规定时段内哪一支球队将会获胜,赛事盘口将会提供两支球队,以及和局。

  • 所有两支球队在每时段开始时比分将按照0-0计算,之前比分不计算在内。

  • 如果赛事中断,所有当前10分钟时段的投注以及将要进行的下一个10分钟时段投注将视为无效,任何10分钟时段投注,如果该时段完整结束,注单将被视为有效。

10分钟-时段1

00分00秒-09分59秒

10分钟-时段2

10分00秒-19分59秒

10分钟-时段3

20分00秒-29分59秒

10分钟-时段4

30分00秒-39分59秒

10分钟-时段5

40分00秒-49分59秒 (含伤停补时)

10分钟-时段6

50分00秒-59分59秒

10分钟-时段7

60分00秒-69分59秒

10分钟-时段8

70分00秒-79分59秒

10分钟-时段9

80分00秒-90分00秒 (含伤停补时)



5 分钟进球数 (含伤停补时)(独赢)

  • 预测在规定时段内哪一支球队将会获胜,赛事盘口将会提供两支球队,以及和局。

  • 所有两支球队在每时段开始时比分将按照0-0计算,之前比分不计算在内。

  • 如果赛事中断,所有当前5分钟时段的投注以及将要进行的下一个5分钟时段投注将视为无效,任何5分钟时段投注,如果该时段完整结束,注单将被视为有效。

5分钟-时段1

00分00秒-04分59秒

5分钟-时段2

05分00秒-09分59秒

5分钟-时段3

10分00秒-14分59秒

5分钟-时段4

15分00秒-19分59秒

5分钟-时段5

20分00秒-24分59秒

5分钟-时段6

25分00秒-29分59秒

5分钟-时段7

30分00秒-34分59秒

5分钟-时段8

35分00秒-39分59秒

5分钟-时段9

40分00秒-45分00秒 (含伤停补时)

5分钟-时段10

45分00秒-49分59秒

5分钟-时段11

50分00秒-54分59秒

5分钟-时段12

55分00秒-59分59秒

5分钟-时段13

60分00秒-64分59秒

5分钟-时段14

65分00秒-69分59秒

5分钟-时段15

70分00秒-74分59秒

5分钟-时段16

75分00秒-79分59秒

5分钟-时段17

80分00秒-84分59秒

5分钟-时段18

85分00秒-90分00秒 (含伤停补时)



首个X分钟 - 独赢

  • 预测在规定时段内哪一支球队将会获胜,赛事盘口将会提供两支球队,以及和局。

  • 时段如下:

    • 00分00秒-04分59秒

    • 00分00秒-09分59秒

    • 00分00秒-14分59秒

    • 00分00秒-19分59秒

    • 00分00秒-24分59秒

    • 00分00秒-29分59秒

    • 00分00秒-34分59秒

    • 00分00秒-39分59秒

    • 00分00秒-49分59秒

    • 00分00秒-54分59秒

    • 00分00秒-59分59秒

    • 00分00秒-64分59秒

    • 00分00秒-69分59秒

    • 00分00秒-74分59秒

    • 00分00秒-79分59秒

    • 00分00秒-84分59秒


30分钟进球数: 00:00-29:59 分钟-独赢

  • 所有投注将根据第 30 分钟结束时 (29:59) 的分数结算。

  • 若赛事在第 30 分钟之前作废,除了已经确定的大小盘投注外,其他投注无效。

  • 若赛事在第 30 分钟后作废,则所有投注均有效。

70分钟进球数: 00:00-69:59 分钟-独赢

  • 所有投注将根据第 70 分钟结束时(69:59) 的分数结算。

  • 若赛事在第 70 分钟之前作废,除了已经确定的大小盘投注外,其他投注无效。

  • 若赛事在第 70 分钟后作废,则所有投注均有效。

进球数: 单 / 双

  • 预测90分钟内,赛事总入球对单或双。

  • 若最终比分为:0-0,将会按照“双”来计算。

进球数: 单 / 双 - 上半场

  • 预测45分钟赛事的总入球数是单数或双数。

  • 若最终比分为:0-0,将会按照“双”来计算。

球队进球数: 单 / 双

  • 预测90分钟内,赛事的下注队伍入球数是单数或双数。

  • 若最终比分为0,将会按照“双”来计算。


球队进球数: 单 / 双 - 上半场

  • 预测上半场45分钟赛事的下注队伍入球数是单数或双数。

  • 若最终比分为0,将会按照“双”来计算。


球队进球数: 单 / 双 - 下半场

  • 预测下半场45分钟赛事的下注队伍入球数是单数或双数。

  • 若最终比分为0,将会按照“双”来计算。


加时赛 - 进球数: 单 / 双

  • 预测加时30分钟赛事的总入球数是单数或双数,包含补时。

  • 若最终比分为:0-0,将会按照“双”来计算。

加时赛 - 进球数: 单 / 双 -上半场

  • 预测加时赛15分钟内的总进球数是单数或双数,包括补时。

  • 若最终比分为:0-0,将会按照“双”来计算。

15 分钟进球数 (单 / 双)

  • 预测在规定时间内进球数是单或双。

  • 所有两支球队在每时段开始时比分将按照0-0计算,之前比分不计算在内。

  • 如果赛事中断,所有当前15分钟时段的投注以及将要进行的下一个15分钟时段投注将视为无效,任何15分钟时段投注,如果该时段完整结束,注单将被视为有效。

15分钟-时段1

上半场开始-14分59秒

15分钟-时段2

15分钟-29分59秒

15分钟-时段3

30分钟-半场

15分钟-时段4

下半场开始-59分59秒

15分钟-时段5

60分钟-74分59秒

15分钟-时段6

75分钟-全场

波胆

  • 预测一场特定赛事中相关时间段的准确比分。

  • "任何其他比分"是指任何的比分,而不是一个市场选项列表类型。

波胆
  • 预测一场特定赛事的全场准确比分。

  • 全场波胆投注的结算根据90分钟完场比分做出裁决。

  • 如果赛事取消,全场波胆投注在“其它比分”为仅有可能获胜的选项,投注将被视为有效;所有其他的投注则被视为无效,此是由于赛事无条件决定后面的进球不会影响赛事的结果。

波胆 - 上半场
  • 预测一场特定赛事半场的准确比分。

  • 投注的结算根据上半场“45分钟”结束后的比分做出裁决。

  • 如果赛事在上半场取消,所有半场波胆投注在“其它比分”为仅有可能获胜的选项,投注将被视为有效;所有其他的投注则被视为无效,此是由于赛事无条件决定后面的进球不会影响赛事的结果。

  • 如果赛事在下半场取消,所有半场波胆的投注被视为有效

波胆 - 下半场
  • 预测一场特定赛事下半场的准确比分。

  • 投注的结算根据下半场“45分钟”结束后的比分做出裁决。

  • 如果赛事在下半场取消,投注在“其它比分”为仅有可能获胜的选项,投注将被视为有效;所有其他的投注则被视为无效,此是由于赛事无条件决定后面的进球不会影响赛事的结果。

半场/全场波胆
  • 预测一场特定赛事上半场與全场的准确比分。

  • 投注的结算根据上半场45分钟结束与90分钟完场比分做出裁决。

  • 如果赛事取消,所有投注被视为无效。

加时赛 : 波胆
  • 预测一场特定赛事的全场准确比分。

  • 投注的结算根据加时赛30分钟完场比分做出裁决。

  • 如果赛事取消,投注在“其它比分”为仅有可能获胜的选项,投注将被视为有效;所有其他的投注则被视为无效,此是由于赛事无条件决定后面的进球不会影响赛事的结果。

加时赛:波胆-上半场
  • 预测一场特定赛事半场的准确比分。

  • 投注的结算根据加时赛上半场“15分钟”结束后的比分做出裁决。

  • 如果赛事在加时赛上半场取消,投注在“其它比分”为仅有可能获胜的选项,投注将被视为有效;所有其他的投注则被视为无效,此是由于赛事无条件决定后面的进球不会影响赛事的结果。

  • 如果赛事在加时赛下半场取消,投注被视为有效。

半场/全场

  • 预测赛事的半/全场结果。


净胜球数

  • 预测完场比赛结束后的净胜球数。

  • 投注的结算根据90分钟完场赛事比分的差别做裁决。

  • 比赛结束为平局将根据比分战平结算。

净胜球数 - 上半场

  • 预测上半场比赛结束后的净胜球数。

  • 投注的结算根据45分钟完场赛事比分的差别做裁决。

  • 上半场比赛结束为平局将根据比分战平结算。

净胜球数 (含无进球)

  • 预测完场比赛结束后的净胜球数。

  • 投注的结算根据90分钟完场赛事比分的差别做裁决。

  • 若双方球队皆无进球,则投注「无进球」判赢,「进球和局」判输;若双方球队有进球且比分相同,则投注「无进球」判输,「进球和局」判赢。

净胜球数 - 上半场 (含无进球)

  • 预测上半场比赛结束后的净胜球数。

  • 投注的结算根据45分钟完场赛事比分的差别做裁决。

  • 若双方球队皆无进球,则投注「无进球」判赢,「进球和局」判输;若双方球队有进球且比分相同,则投注「无进球」判输,「进球和局」判赢。

加时赛 - 净胜球数

  • 预测加时赛结束后的净胜球数。

  • 所有的投注将以30分钟加时赛后结果结算,包括补时。

  • 比赛结束为平局将根据比分战平结算。

双重机会

  • 所有投注将以全场90分钟其中包含伤停补时后的赛果结算。

  • 在三种可能出现的赛果中选择两种进行投注; 主场赢或打平(1和X), 客场赢或打平(2和X)或主场或客场赢(1和2)。

  • 共有三种选择: 1 X, X 2, 1 2:

    1. "1" 代表: 主场赢。

    2. "X" 代表: 平手。

    3. "2" 代表: 客场赢。

双重机会-上半场

  • 所有投注将以上半场45分钟其中包含伤停补时后的赛果结算。

  • 在三种可能出现的赛果中选择两种进行投注; 主场赢或打平(1和X), 客场赢或打平(2和X)或主场或客场赢(1和2)。

  • 共有三种选择: 1 X, X 2, 1 2:

    1. "1" 代表: 主场赢。

    2. "X" 代表: 平手。

    3. "2" 代表: 客场赢。

双重机会-下半场

  • 所有投注将以下半场45分钟其中包含伤停补时后的赛果结算。

  • 在三种可能出现的赛果中选择两种进行投注; 主场赢或打平(1和X), 客场赢或打平(2和X)或主场或客场赢(1和2)。

  • 共有三种选择: 1 X, X 2, 1 2:

    1. "1" 代表: 主场赢。

    2. "X" 代表: 平手。

    3. "2" 代表: 客场赢。

加时赛:双重机会

  • 所有投注将以加时赛30分钟其中包含伤停补时后的赛果结算。

  • 在三种可能出现的赛果中选择两种进行投注; 主场赢或打平(1和X), 客场赢或打平(2和X)或主场或客场赢(1和2)。

  • 共有三种选择: 1 X, X 2, 1 2:

    1. "1" 代表: 主场赢。

    2. "X" 代表: 平手。

    3. "2" 代表: 客场赢。

加时赛:双重机会-上半场

  • 所有投注将以加时赛上半场15分钟其中包含伤停补时后的赛果结算。

  • 在三种可能出现的赛果中选择两种进行投注; 主场赢或打平(1和X), 客场赢或打平(2和X)或主场或客场赢(1和2)。

  • 共有三种选择: 1 X, X 2, 1 2:

    1. "1" 代表: 主场赢。

    2. "X" 代表: 平手。

    3. "2" 代表: 客场赢。

让球+独赢

  • 根据盘口开出信息预测全场90分钟的最终获胜球队,包括和局以及第三个可能出现的结果。

  • 结算将会根据选择的球队包括和局,并最终在比赛中获得有利的结果。

  • 让分将依据最终比分计算,而非投注当下比分进行计算。

  • 和局将会显示的主场让球盘, 用于区分作用。

  • 以下范例:

    • 主[-1]=如果你所投注的队伍以2个或更多的进球于赛事中获胜,你将获胜。

    • 和[-1]=如果你所投注的队伍以确切1球的分差于赛事中获胜,你将获胜。

    • 客[+1]=如果你所投注的队伍获胜或和局,你将获胜。

    • 主[+2]=如果你所投注的队伍以1个进球差落败,和局或获胜,你将获胜。

    • 和[+2]=如果你所投注的队伍以确切2球的分差于赛事中落败,你将获胜。

    • 客[-2]=如果你所投注的队伍以3个或更多的进球于赛事中获胜,你将获胜。

让球+独赢-上半场

  • 根据盘口开出信息预测上半场45分钟的最终获胜球队,包括和局以及第三个可能出现的结果。

  • 结算将会根据选择的球队包括和局,并最终在比赛中获得有利的结果。

  • 让分将依据最终比分计算,而非投注当下比分进行计算。

  • 和局将会显示的主场让球盘, 用于区分作用

让球+独赢-下半场

  • 根据盘口开出信息预测下半场45分钟的最终获胜球队,包括和局以及第三个可能出现的结果。

  • 结算将会根据选择的球队包括和局,并最终在比赛中获得有利的结果。

  • 让分将依据最终比分计算,而非投注当下比分进行计算。

  • 和局将会显示的主场让球盘, 用于区分作用

加时赛:让球+独赢

  • 根据盘口开出信息预测加时赛30分钟的最终获胜球队,包括和局以及第三个可能出现的结果。

  • 结算将会根据选择的球队包括和局,并最终在比赛中获得有利的结果。

  • 让分将依据最终比分计算,而非投注当下比分进行计算。

  • 和局将会显示的主场让球盘, 用于区分作用

加时赛:让球+独赢-上半场

  • 根据盘口开出信息预测加时赛上半场15分钟的最终获胜球队,包括和局以及第三个可能出现的结果。

  • 结算将会根据选择的球队包括和局,并最终在比赛中获得有利的结果。

  • 让分将依据最终比分计算,而非投注当下比分进行计算。

  • 和局将会显示的主场让球盘, 用于区分作用

落后反超获胜

  • 预测哪一支球队在比赛的任何时间里都为输,然而却在最后“90分钟”反超为赢。

  • 选择的球队必须在比赛的任何时间里都为输,但是在接下来的最后“90分钟”却获胜为赢。

  • 如果比赛被中断,所有的投注均视为无效。

平局退款

  • 预测全场90分钟后哪一支球队将在比赛胜出。但若比赛结果为平局,所有投注将被取消。

平局退款-上半场

  • 预测上半场45分钟后哪一支球队将在比赛胜出。但若比赛结果为平局,所有投注将被取消。


平局退款-下半场

  • 预测下半场45分钟后哪一支球队将在比赛胜出。但若比赛结果为平局,所有投注将被取消。

加时赛:平局退款

  • 预测加时赛30分钟后哪一支球队将在比赛胜出。但若比赛结果为平局,所有投注将被取消。

加时赛:平局退款-上半场

  • 预测加时赛上半场15分钟后哪一支球队将在比赛胜出。但若比赛结果为平局,所有投注将被取消。

主队获胜退款

  • 预测全场90分钟是客队获胜或者平局。但若比赛结果为主队获胜,所有投注将被取消。

客队获胜退款

  • 预测全场90分钟是主队获胜或者平局。但若比赛结果为客队获胜,所有投注将被取消。

任一队胜出

  • 预测全场90分钟是否主队或客队其中一队胜出。

球队正规赛获胜

  • 预测全场90分钟指定队伍是否獲勝

  • 若全场90分钟结束仍未分出胜负,投注「否」获胜

进球集锦

总进球数

  • 预测一个特定赛事相关时间段两队的总入球数。

总进球数
  • 预测全场两队的总入球数。

  • 全场总入球数注单结算是根据全场“90分钟”为准。

  • 如果赛事中断,总入球数投注将仅结算当赛事进球”X个或更多”,这是由于任何后面的进球不会影响赛事结果。任何其他的情况,投注将被视为无效。

总进球数 - 上半场
  • 预测半场两队的总入球数。

  • 半场总入球数注单仅限于上半场。注单结算是根据上半场“45分钟”为准。

  • 如果赛事中断,总入球数投注将仅结算当赛事进球”X个或更多”,这是由于任何后面的进球不会影响赛事结果。任何其他的情况,投注将被视为无效。


总进球数 - 下半场
  • 预测下半场两队的总入球数。

  • 注单仅限于下半场。注单结算是根据下半场“45分钟”为准。

  • 如果赛事中断,总入球数投注将仅结算当赛事进球”X个或更多”,这是由于任何后面的进球不会影响赛事结果。任何其他的情况,投注将被视为无效。


精准进球数
  • 预测两支队伍在赛事全场90分钟的准确进球数量。

  • 如果赛事在上半场时节因任何理由取消或中断,所有注单将被取消。

精准进球数-上半场
  • 预测两支队伍在赛事上半场45分钟的准确进球数量。

  • 如果赛事在上半场时节因任何理由取消或中断,所有上半场注单将被取消。

  • 如果赛事在下半场或加时赛因任何理由取消或中断,所有上半场注单保持有效。


精准进球数-下半场
  • 预测两支队伍在赛事下半场45分钟的准确进球数量。

  • 如果赛事在下半场时节因任何理由取消或中断,所有下半场注单将被取消。

  • 如果赛事在加时赛因任何理由取消或中断,所有下半场注单保持有效。


加时赛:精准进球数
  • 预测两支队伍在赛事加时赛30分钟的准确进球数量。

  • 如果赛事在上半场时节因任何理由取消或中断,所有注单将被取消。

加时赛:精准进球数-上半场
  • 预测两支队伍在赛事加时赛上半场15分钟的准确进球数量。

  • 如果赛事在上半场时节因任何理由取消或中断,所有上半场注单将被取消。

  • 如果赛事在下半场或加时赛因任何理由取消或中断,所有上半场注单保持有效。


球队进球数

  • 预测一个特定赛事相关时间段指定队伍的精准入球数。

球队进球数
  • 预测全场指定队伍的精准入球数。

  • 全场队伍入球数注单结算是根据全场“90分钟”为准。

  • 乌龙球将计算在得分队伍中。

  • 如果赛事在上半场完成后才作废,投注将被视为无效。

球队进球数 - 上半场
  • 预测上半场指定队伍的精准入球数。

  • 上半场队伍入球数注单结算是根根据上半场“45分钟”为准。

  • 乌龙球将计算在得分队伍中

  • 如果赛事在上半场完成后才作废,投注仍被视为有效。


球队进球数 - 下半场
  • 预测下半场指定队伍的精准入球数。

  • 下半场队伍入球数注单结算是根根据下半场“45分钟”为准。

  • 乌龙球将计算在得分队伍中。

  • 如果赛事在上半场完成后才作废,投注将被视为无效。


加时赛:球队进球数
  • 预测加时赛指定队伍的入球数。

  • 全场队伍入球数注单结算是根据加时“30分钟”为准。

  • 乌龙球将计算在得分队伍中。


最先/最后进球球队

  • 在法定比赛90分钟内,预测最先或最后进球的球队。

  • 乌龙球将予以计算为得分那方入球。比如: A队VS B队,B 队踢进一个乌龙球造成比分1-0,此球计为A队先进球。

  • 如果赛事在有进球后中断,所有最先进球球队注单保持有效。

  • 如果赛事中断,所有最后进球球队注单将被取消。


滚球-下一支进球

  • 预测在比赛进行时,哪一支球队会进下一个球。

  • 加时赛则视为一场新的赛事并且会开出加时赛盘口。

  • 请注意,乌龙球也属于进球范围内。

  • 如果赛事断,那么所有投注此注单将被视为有效,除非赛事已有明确结果并且之后对赛事没有任何影响。

第1个进球/第2个进球/第3个进球/第4个进球……/最后一个进球

  • 预测哪支队伍将于全场90分钟获得第 1 /第 2 /第 3 /第 4/…… /最后一球的进球。乌龙球计算在得分队伍的进球中。如果赛事作废,则投注无效,除非这些投注结果已经确定。

    • 1 - 主队

    • 2 - 客队

    • X - 没有队伍进球

第1个进球-上半场/第2个进球-上半场/……/第10个进球-上半场

  • 预测哪支队伍将在上半场45分钟获得第 1 /第 2 /第 3 /第 4/…… /第 10的进球。乌龙球计算在得分队伍的进球中。

    • 1 - 主队进球

    • 2 - 客队进球

    • X - 上半场中没有队伍进球

第1个进球-下半场/第2个进球-下半场/……/第10个进球-下半场

  • 预测哪支队伍将在下半场45分钟获得第 1 /第 2 /第 3 /第 4/…… /第 10的进球。乌龙球计算在得分队伍的进球中。

    • 1 - 主队进球

    • 2 - 客队进球

    • X - 下半场中没有队伍进球

分钟阶段进球数 (含伤停补时)(第X个进球)

  • 预测哪支队伍将在指定的时间阶段內获得第 1 /第 2 /第 3 /第 4/…… /第 X的进球。乌龙球计算在得分队伍的进球中。

    • 1 - 主队进球

    • 2 - 客队进球

    • X - 指定的时间阶段內沒有队伍进球


  • 15分钟時段可参考如下表:

15分钟-时段1

00分00秒-14分59秒

15分钟-时段2

15分00秒-29分59秒

15分钟-时段3

30分00秒-45分00秒 (含伤停补时)

15分钟-时段4

45分00秒-59分59秒

15分钟-时段5

60分00秒-74分59秒

15分钟-时段6

75分00秒-90分00秒 (含伤停补时)


  • 10分钟时段可参考下表:

10分钟-时段1

00分00秒-09分59秒

10分钟-时段2

10分00秒-19分59秒

10分钟-时段3

20分00秒-29分59秒

10分钟-时段4

30分00秒-39分59秒

10分钟-时段5

40分00秒-49分59秒 (含伤停补时)

10分钟-时段6

50分00秒-59分59秒

10分钟-时段7

60分00秒-69分59秒

10分钟-时段8

70分00秒-79分59秒

10分钟-时段9

80分00秒-90分00秒 (含伤停补时)


  • 5分钟时段可参考下表:

5分钟-时段1

00分00秒-04分59秒

5分钟-时段2

05分00秒-09分59秒

5分钟-时段3

10分00秒-14分59秒

5分钟-时段4

15分00秒-19分59秒

5分钟-时段5

20分00秒-24分59秒

5分钟-时段6

25分00秒-29分59秒

5分钟-时段7

30分00秒-34分59秒

5分钟-时段8

35分00秒-39分59秒

5分钟-时段9

40分00秒-45分00秒 (含伤停补时)

5分钟-时段10

45分00秒-49分59秒

5分钟-时段11

50分00秒-54分59秒

5分钟-时段12

55分00秒-59分59秒

5分钟-时段13

60分00秒-64分59秒

5分钟-时段14

65分00秒-69分59秒

5分钟-时段15

70分00秒-74分59秒

5分钟-时段16

75分00秒-79分59秒

5分钟-时段17

80分00秒-84分59秒

5分钟-时段18

85分00秒-90分00秒 (含伤停补时)

加时赛:第1个进球/加时赛:第2个进球/……/加时赛:第10个进球

  • 预测哪支队伍将在加时赛30分钟获得第 1 /第 2 /第 3 /第 4/…… /第 10的进球。乌龙球计算在得分队伍的进球中。

    • 1 - 主队进球

    • 2 - 客队进球

    • X - 加时赛中没有队伍进球

加时赛:最后进球

  • 预测哪支队伍将于加时赛期间获得最后一球的进球。乌龙球计算在进球队伍的进球中。如果赛事作废,则投注无效,除非这些投注结果已经确定。

    • 1 - 主队

    • 2 - 客队

    • X - 没有队伍进球

第1个罚球进球/第2个罚球进球……/第10个罚球进球

  • 预测全场90分钟第 1 /第 2 /…… /第 10 的罚球最后是否进球。如果赛事作废,则投注无效,除非这些投注结果已经确定。


双方球队进球

  • 预测双方球队在90分钟完场时间内是否进球。

  • 如果赛事在常规时间内双方球队都有进球后中断,所有注单保持有效。

  • 如果赛事在常规时间内双方球队没有进球前中断或延迟,所有注单将被取消。

  • 乌龙球将予以计算为得分那方入球。


双方球队进球- 上半场

  • 预测双方球队在第一个45分钟时间内是否进球。

  • 如果赛事在上半场双方球队都有进球后中断,所有注单保持有效。

  • 如果赛事在上半场双方球队没有进球前中断或延迟,所有注单将被取消。

  • 乌龙球将予以计算为得分那方入球。

双方球队进球- 下半场

  • 预测双方球队在第二个45分钟时间内是否进球。

  • 如果赛事在下半场双方球队都有进球后中断,所有注单保持有效。

  • 如果赛事在下半场双方球队没有进球前中断或延迟,所有注单将被取消。

  • 乌龙球将予以计算为得分那方入球。

加时赛:双方球队进球

  • 预测双方球队在加时30分钟内是否进球。

  • 如果赛事在加时时间内双方球队都有进球后中断,所有注单保持有效。

  • 如果赛事在加时时间内双方球队没有进球前中断或延迟,所有注单将被取消。

  • 乌龙球将予以计算为得分那方入球。

加时赛:双方球队进球- 上半场

  • 预测双方球队在加时上半场15分钟内是否进球。

  • 如果赛事在加时时间内双方球队都有进球后中断,所有注单保持有效。

  • 如果赛事在加时时间内双方球队没有进球前中断或延迟,所有注单将被取消。

  • 乌龙球将予以计算为得分那方入球。

主队获胜或双方球队进球

  • 预测在90分钟完场时间内,主队是否获胜或双方球队是否进球。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 主队获胜

    • 兩队皆有入球得分

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 主队没有获胜

    • 其中一队没有入球

  • 乌龙球将予以计算为得分那方入球。

和局或双方球队进球

  • 预测在90分钟完场时间内,双方球队是否进球或者和局。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 和局

    • 兩队皆有入球得分

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 任意一队获胜

    • 其中一队没有入球

  • 乌龙球将予以计算为得分那方入球。

客队获胜或双方球队进球

  • 预测在90分钟完场时间内,客队是否获胜或双方球队是否进球。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 客队获胜

    • 兩队皆有入球得分

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 客队没有获胜

    • 其中一队没有入球

  • 乌龙球将予以计算为得分那方入球。

零失球

  • 预测某个球队在90分钟的比赛中,没有任何失球。

  • 选择投注球队不需要赢得比赛,例如:赛果 0-0,注单为赢。

零失球-上半场

  • 预测某个球队在上半场45分钟完场时间内,没有任何失球。

  • 选择投注球队不需要赢得比赛,例如:赛果 0-0,注单为赢。

零失球-下半场

  • 预测某个球队在下半场45分钟完场时间内,没有任何失球。

  • 选择投注球队不需要赢得比赛,例如:赛果 0-0,注单为赢。

零失球获胜

  • 预测您投注的球队在90分钟完场时间内没让敌方攻入任何一球且取得胜利。

  • *零*失球是指球队在赛事中没让敌方攻入任何一球,争取完美防守。

球队零失球获胜

  • 预测指定球队在90分钟完场时间内,是否没让敌方攻入任何一球且取得胜利。

  • *零*失球是指球队在赛事中没让敌方攻入任何一球,争取完美防守。

球队零失球获胜-上半场

  • 预测指定球队在上半场45分钟完场时间内,是否没让敌方攻入任何一球且取得胜利。

  • *零*失球是指球队在赛事中没让敌方攻入任何一球,争取完美防守。

主队获胜或任何一方零失球

  • 预测在90分钟完场时间内,主队是否获胜或任何一支球队零失球。

  • *零*失球是指球队在赛事中没让敌方攻入任何一球,争取完美防守。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 主队获胜

    • 其中一队没有入球

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 主队没有获胜

    • 兩队皆有入球得分

  • 乌龙球将予以计算为得分那方入球。

和局或任何一方零失球

  • 预测在90分钟完场时间内,最终是否和局或任何一支球队零失球。

  • *零*失球是指球队在赛事中没让敌方攻入任何一球,争取完美防守。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 和局

    • 其中一队没有入球

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 任意一队获胜

    • 兩队皆有入球得分

  • 乌龙球将予以计算为得分那方入球。


客队获胜或任何一方零失球

  • 预测在90分钟完场时间内,客队是否获胜或任何一支球队零失球。

  • *零*失球是指球队在赛事中没让敌方攻入任何一球,争取完美防守。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 客队获胜

    • 其中一队没有入球

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 客队没有获胜

    • 兩队皆有入球得分

  • 乌龙球将予以计算为得分那方入球。

先进2球/3球的一方

  • 预测在90分钟完场时间内哪个球队先进2/3球。

  • 如果赛事在一方球队已经进2/3球后中断,所有注单将保持有效。

最多进球的半场

  • 在赛事90分钟结束后,猜测哪个“45分钟”半场入球最多。

  • 盘口提供两种投注选择,如上下半场入球数一样,注单将被视为无效。

  • 选项可列为:

    • 上半场

    • 下半场

最多进球的半场 - 独赢

  • 预测在90分钟完场时间内哪个半场将会进最多球。

  • 盘口提供三种投注选择,如上下半场入球数一样,投注“和”将会为赢。

  • 选项可列为:

    • 上半场

    • 下半场

    • 平局

球队进球最多的半场

  • 预测在90分钟完场时间内,指定隊伍哪个半场将会进最多球。

  • 盘口提供三种投注选择,如上下半场入球数一样,投注“和局”将会为赢。

  • 选项可列为:

    • 上半场

    • 下半场

    • 平局

双半场进球

  • 预测主队/客队在90分钟完场时间内是否在上下半场都至少进一球。

  • 如果投注球队只有在一个半场有入球,或未入球,注单为输。

  • 乌龙球将只会被计算在得分球队一方。

  • 如果赛事在所投注的球队已在两个半场都进球后中断,所有投注此球队的注单将结算为赢。

  • 如果赛事在下半场中断,并且所投注的球队并未在上半场进球,所有投注此球队的注单将结算为输。

  • 如果上半场进球球队已经确认,而赛事在下半场中断,那么所有投注该球队注单将被视为有效。

第1个进球方式/第2个进球方式……/第10个进球方式

  • 预测指定比分的进球方式。

  • 如果赛事在指定进球后中断,除非下注的结果已获确定,否则所有投注无效。

  • 选项可列为:

    • 自由球:球必须是直接踢进的方式。间接行的任意球如果最后是罚球者本人踢进则计算在内。

    • 点球:球必须是由罚球者本人直接踢进的方式。若遇到补射的情况,即使是罚球者本人踢进也将不计算在内。

    • 乌龙球:球必须授予为乌龙球。

    • 头球:进球者必须明确的用头进球。

    • 射门:所有其他的进球方式。除了以上所列出的方式,所有其他进球的方式都包含在此方式。

    • 无:赛事没有进球。

第1个进球时间 (30分钟)

  • 预测指定进球会于全场90分钟内的哪个时段踢进。

  • 如果赛事在指定进球后中断,除非下注的结果已获确定,否则所有投注无效。

  • 如果指定时间内无进球,则投注无效,所有注单将被取消。

  • 时段以30分钟作为区间,选项如下:


00:00-29:59

00分00秒-29分59秒

30:00-59:59

30分00秒-59分59秒

60:00-90:00 (含伤停补时)

60分00秒-90分00秒 (含伤停补时)


第1个进球时间/第2个进球时间……/第10个进球时间 (15分钟)

  • 预测指定进球会于全场90分钟内的哪个时段踢进。

  • 如果赛事在指定进球后中断,除非下注的结果已获确定,否则所有投注无效。

  • 时段以15分钟作为区间,选项如下:


00:00-14:59

00分00秒-14分59秒

15:00-29:59

15分00秒-29分59秒

30:00-45:00

30分00秒-45分00秒 (含伤停补时)

45:00-59:59

45分00秒-59分59秒

60:00-74:59

60分00秒-74分59秒

75:00-90:00

75分00秒-90分00秒 (含伤停补时)

无进球

指定时间内没有进球


第1个进球时间/第2个进球时间……/第10个进球时间 (10分钟)

  • 预测指定进球会于全场90分钟内的哪个时段踢进。

  • 如果赛事在指定进球后中断,除非下注的结果已获确定,否则所有投注无效。

  • 时段以10分钟作为区间,选项如下:


00:00-09:59

00分00秒-09分59秒

10:00-19:59

10分00秒-19分59秒

20:00-29:59

20分00秒-29分59秒

30:00-39:59

30分00秒-39分59秒

40:00-49:59

40分00秒-49分59秒 (含伤停补时)

50:00-59:59

50分00秒-59分59秒

60:00-69:59

60分00秒-69分59秒

70:00-79:59

70分00秒-79分59秒

80:00-90:00

80分00秒-90分00秒 (含伤停补时)

无进球

指定时间内没有进球


首个进球时间-3项

  • 预测在90分钟完场时间内首个进球时间,盘口提供无进球投注选项。

  • 选项可列为:

选项1

小于等于26分钟

选项 2

大于或等于27分钟

选项 3

没有进球

  • 出于结算的用意,赛事的第一分钟是从1秒计算到59秒。第二分钟则是从1分钟计算到1分59秒,以此类推。

  • 范例:如果投注首个进球时间的选项是‘赛事的第26分钟或之前’,而确实进球的时间为26分钟49秒,进球的范围属于‘第27分钟后’,因此投注将结算为输。

  • 如果赛事在首个进球后中断,所有首个进球时间的注单将保持有效。

  • 如果赛事在没有进球前中断,所有首个进球时间的注单将被取消。

  • 乌龙球将予以计算在内。裁判判定无效的进球是将不予以计算在内。


首个进球时间

  • 预测在90分钟完场时间内首个进球时间。

  • 选项可列为:

15分钟-时段1

上半场开始-14分59秒

15分钟-时段2

15分钟-29分59秒

15分钟-时段3

30分钟-半场

15分钟-时段4

下半场开始-59分59秒

15分钟-时段5

60分钟-74分59秒

15分钟-时段6

75分钟-全场

  • 出于结算的用意,赛事的第一分钟是从1秒计算到59秒。第二分钟则是从1分钟计算到1分59秒,以此类推。

  • 如果赛事在首个进球后中断,所有首个进球时间的注单将保持有效。

  • 如果赛事在没有进球前中断,所有首个进球时间的注单将被取消。

  • 乌龙球将予以计算在内。裁判判定无效的进球是将不予以计算在内。

乌龙球

  • 预测一场比赛中是否会有乌龙球。

  • 根据双方球队上场球员是否踢进乌龙球,来进行结算。

  • 如果比赛在有乌龙球之前中断,所有该盘口的投注将被视为无效

剩余时间哪一队获胜

  • 预测在投注当下开始计算,到全场90分钟赛事结束的比分为止,哪一支球队能够获得较多的进球。

  • 如果赛事作废,所有投注无效。

  • 以下皆以投注当下为1:0作范例:

    • 全场结束时比分为1:0,则投注主队输;投注和局赢;投注客队输。

    • 全场结束时比分为1:1,则投注主队输;投注和局输;投注客队赢。

    • 全场结束时比分为2:0,则投注主队赢;投注和局输;投注客队输。

剩余时间哪一队获胜-上半场

  • 预测在投注当下开始计算,到上半场45分钟赛事结束的比分为止,哪一支球队能够获得较多的进球。

  • 如果赛事作废,所有投注无效。

  • 以下皆以投注当下为1:0作范例:

    • 上半场结束时比分为1:0,则投注主队输;投注和局赢;投注客队输。

    • 上半场结束时比分为1:1,则投注主队输;投注和局输;投注客队赢。

    • 上半场结束时比分为2:0,则投注主队赢;投注和局输;投注客队输。

加时赛:剩余时间哪一队获胜

  • 预测在投注当下开始计算,到加时赛30分钟赛事结束的比分为止,哪一支球队能够获得较多的进球。

  • 如果赛事作废,所有投注无效。

  • 以下皆以投注当下加时赛比分为1:0作范例:

    • 加时赛结束时加时赛比分为1:0,则投注主队输;投注和局赢;投注客队输。

    • 加时赛结束时加时赛比分为1:1,则投注主队输;投注和局输;投注客队赢。

    • 加时赛结束时加时赛比分为2:0,则投注主队赢;投注和局输;投注客队输。

进球球队

  • 所有投注将以全场90分钟其中包含伤停补时后的赛果结算。

  • 有2种选择:主, 客,选择说明如下:

    • 主:主队进球得分,投注此选项便获胜。

    • 客:客队进球得分,投注此选项便获胜。

没有进球球队

  • 所有投注将以全场90分钟其中包含伤停补时后的赛果结算。

  • 有2种选择:主, 客,选择说明如下:

    • 主:主队未进球得分,投注此选项便获胜。

    • 客:客队未进球得分,投注此选项便获胜。

球队是否进球

  • 所有投注将以全场90分钟其中包含伤停补时后的赛果结算。

  • 预测指定队伍是否入球。

球队是否进球-上半场

  • 所有投注将以上半场45分钟其中包含伤停补时后的赛果结算。

  • 预测指定队伍在上半场是否入球。

球队是否进球-下半场

  • 所有投注将以下半场45分钟其中包含伤停补时后的赛果结算。

  • 预测指定队伍在下半场是否入球。

上下半场都大于 / 上下半场都小于

  • 预测上半场与下半场(皆含伤停补时),是否都大于或小于指定比分。

  • 如果比赛停止,取消或中断,所有投注将被视为无效,除非在赛事取消或中断前,结果已经明确。

主队获胜或总进球大于

  • 预测主队在90分钟完场时间内是否获胜,或两队的总进球数大于指定比分。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 主队获胜

    • 两队的总进球数大于指定比分

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 主队没有获胜

    • 两队的总进球数没有大于指定比分

  • 如果比赛停止,取消或中断,所有投注将被视为无效,除非在赛事取消或中断前,结果已经明确。

主队获胜或总进球小于

  • 预测主队在90分钟完场时间内是否获胜,或两队的总进球数是否小于指定比分。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 主队获胜

    • 两队的总进球数小于指定比分

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 主队没有获胜

    • 两队的总进球数没有小于指定比分

  • 如果比赛停止,取消或中断,所有投注将被视为无效,除非在赛事取消或中断前,结果已经明确。

和局或总进球大于

  • 预测在90分钟完场时间内是否和局,或两队的总进球数是否大于指定比分。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 和局

    • 两队的总进球数大于指定比分

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 任意一队获胜

    • 两队的总进球数没有大于指定比分

  • 如果比赛停止,取消或中断,所有投注将被视为无效,除非在赛事取消或中断前,结果已经明确。

和局或总进球小于

  • 预测在90分钟完场时间内是否和局,或两队的总进球数是否小于指定比分。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 和局

    • 两队的总进球数小于指定比分

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 任意一队获胜

    • 两队的总进球数没有小于指定比分

  • 如果比赛停止,取消或中断,所有投注将被视为无效,除非在赛事取消或中断前,结果已经明确。

客队获胜或总进球大于

  • 预测客队在90分钟完场时间内是否获胜,或两队的总进球数是否大于指定比分。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 客队获胜

    • 两队的总进球数大于指定比分

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 客队没有获胜

    • 两队的总进球数没有大于指定比分

  • 如果比赛停止,取消或中断,所有投注将被视为无效,除非在赛事取消或中断前,结果已经明确

客队获胜或总进球小于

  • 预测客队在90分钟完场时间内是否获胜,或两队的总进球数是否小于指定比分。

  • 投注「是」的状况下,仅需达成下列任一条件即判为赢,若都没有达成则判定为输。

    • 客队获胜

    • 两队的总进球数小于指定比分

  • 投注「不是」的状况下,需下列条件皆达成才判为赢,若任一项未达成则判定为输。

    • 客队没有获胜

    • 两队的总进球数没有小于指定比分

  • 如果比赛停止,取消或中断,所有投注将被视为无效,除非在赛事取消或中断前,结果已经明确。

球员

一般规则(第一/最后/任何时间进球得分)

  • “其他”选项是指在官方“90分钟”比赛内没有标注的进球数(不包括乌龙球)

  • '没有进球'的选项是指两队在官方“90分钟”内(即全场0-0)打入0球。

最先进球球员

  • 按盘口提供的球员出场名单中,预测在90分钟完场时间内最先入球的球员。

  • 乌龙球不计于最先进的球。如果出现乌龙球,下一个或之前的进球才被视为有效。

  • 如果投注的最先进球球员没有参与该场赛事或在第一个进球后才进场,注单将被取消。

  • 如果投注的最先进球球员在没有射入第一个球就被罚下场或被其他球员替代,注单将结算为输。

  • 如果赛事在射入第一个球后中断,所有投注最先进球球员的注单将保持有效。

  • 如果赛事在没有进球前中断,所有投注最先进球球员的注单将被取消。

  • 乌龙球、加时赛进球和点球大战进球都不计于此玩法。

  • 如果整场比赛在 90 分钟完场时间内无任何球员(不含乌龙球)进球,则投注最先进球球员的注单将结算为输,「无进球」选项者视为赢。

最后进球球员

  • 按盘口提供的球员出场名单中,预测在90分钟完场时间内最后入球的球员。

  • 乌龙球将不会被视为最后进球。如果出现乌龙球,下一个或之前的进球才被视为有效。

  • 如果投注的最后进球球员在没有射入最后一个进球就被罚下场或被其他球员替代,注单将结算为输

  • 任何参赛并且上场的球员都可能是最后进球球员。

  • 如果赛事在没有进球前中断,所有投注最后进球球员的注单将被取消。

  • 乌龙球、加时赛进球和点球大战进球都不计于此玩法。

  • 如果整场比赛在 90 分钟完场时间内无任何球员(不含乌龙球)进球,则投注最后进球球员的注单将结算为输,「无进球」选项者视为赢。

任何时间进球球员

  • 按盘口提供的球员出场名单中,预测在90分钟完场时间内哪位球员会进球。

  • 如果投注的球员没有参与该场赛事,注单将被取消。

  • 只要球员在比赛的90分钟完场时间内有上场参与比赛,注单则视为有效。

  • 如果赛事在已有球员进球后中断,所有投注进球球员的注单将保持有效。

  • 如果比赛被取消,所有投注在提名的球员的进球均视作无效。然而,如果提名的球员在比赛取消前被红卡罚下,那么所有与该球员相关的投注注单将视作输来结算。

  • 乌龙球,加时赛进球和点球大战进球都不计于此玩法。

  • 如果整场比赛在 90 分钟完场时间内无任何球员(不含乌龙球)进球,则投注任何时间进球球员的注单将结算为输,「无进球」选项者视为赢。

球员是否有得分(含加时)

  • 按盘口提供的球员出场名单中,预测在90分钟完场时间及加时赛30分钟内,指定球员是否进球。

  • 如果投注的球员没有参与该场赛事,注单将被取消。

  • 只要球员在比赛的90分钟完场时间及加时赛30分钟内有上场参与比赛,注单则视为有效。

  • 如果赛事在没有进球前中断,所有投注的注单将被取消。

  • 乌龙球和点球大战进球都不计于此玩法。

得分2分以上(含)球员 / 得分3分以上(含)球员

  • 按盘口提供的球员出场名单中,预测在90分钟完场时间内哪位球员会踢进2球/3球以上。

  • 如果投注的球员没有参与该场赛事,注单将被取消。

  • 只要球员在比赛的90分钟完场时间内有上场参与比赛,注单则视为有效。

  • 如果赛事在已有球员进球后中断,所有投注进球球员的注单将保持有效。

  • 乌龙球,加时赛进球和点球大战进球都不计于此玩法。

主队第1位进球球员 / 主队第2位进球球员 / … / 主队第10位进球球员

  • 按盘口提供的球员出场名单中,预测在90分钟完场时间内哪位球员会踢进主队的第1/第2/…/第10个进球。

  • 如果投注的球员没有参与该场赛事,注单将被取消。

  • 只要球员在比赛的90分钟完场时间内有上场参与比赛,注单则视为有效。

  • 如果赛事在已有球员进球后中断,所有投注进球球员的注单将保持有效。

  • 若有乌龙球发生,不会计算在主队或客队的进球数量内。

客队第1位进球球员 / 客队第2位进球球员 / … / 客队第10位进球球员

  • 按盘口提供的球员出场名单中,预测在90分钟完场时间内哪位球员会踢进客队的第1/第2/…/第10个进球。

  • 如果投注的球员没有参与该场赛事,注单将被取消。

  • 只要球员在比赛的90分钟完场时间内有上场参与比赛,注单则视为有效。

  • 如果赛事在已有球员进球后中断,所有投注进球球员的注单将保持有效。

  • 若有乌龙球发生,不会计算在主队或客队的进球数量内。

球员特殊投注(进球数)

一般规则

  • 上半场投注在45分钟进行。

  • 全场投注在90分钟结算。

  • 双方球员都必须是比赛先发的11名球员当中注单才视为有效。

  • 提供的盘口仅限于球员将参与的指定比赛以及比赛日期。

  • 乌龙球将不计算在内。

让球

  • 根据盘口开出信息预测哪一个球员入球最多。

  • 如果赛事中断或推迟,所有注单将会被取消,除非赛事已有明确结果并且之后入球对赛事没有任何影响。除非赛事已有明确结果并且之后入球对赛事没有任何影响。

大 / 小

  • 预测赛事中不同球员总进球数将大于或小于在盘口指定的大/小盘数。

  • 如果赛事中断或推迟,所有注单将会被取消,除非赛事已有明确结果并且之后入球对赛事没有任何影响。

独赢

  • 预测哪一个球员将在比赛中入球最多,盘口同样提供选择“平局/和”。

  • 如果赛事中断或推迟,所有注单将会被取消,除非赛事已有明确结果并且之后入球对赛事没有任何影响。

单 / 双

  • 预测赛事中球员的总进球数是单数或双数。

  • 如果赛事中断或推迟,所有注单将会被取消,除非赛事已有明确结果并且之后入球对赛事没有任何影响。

  • 若比赛没有球员进球,赛果为0,投注‘双’注单为赢。

特别

开球球队

  • 预测在比赛先开球的球队。

  • 如果赛事在开踢后中断,所有投注先开球球队的注单将保持有效。


进球队伍

  • 所有投注将以全场90分钟其中包含伤停补时后的赛果结算。

  • 有4种选择:无进球, 主, 客, 两队皆进球,选择说明如下:

    • 无进球:主客两队皆无进球得分。

    • 主:只有主队进球得分。

    • 客:只有客队进球得分。

    • 两队皆进球:主客两队皆有进球得分。

获胜方式

  • 预测哪一支球队能在球赛中指定的时段内赢得比赛。

  • 根据指定的球队能否在指定的时段内赢得比赛,来进行结算。时段可分为:正规时间,加时赛或点球PK。

  • 若赛事为两回合赛制,则以最终哪个时段判断出哪一支队伍晋级。

晋级方法

  • 预测哪一支球队能在球赛中指定的时段内赢得比赛,从而晋级到联赛的下一阶段。

  • 根据指定的球队能否在指定的时段内赢得比赛,来进行结算。时段可以选择:“90分钟”,加时赛或点球大战。

  • 一场比赛的两个回合的总比分(包括客场进球规则)将计入“90分钟”结束的结算。

赢得所有半场

  • 预测选择的球队在90分钟完场时间内(不包括加时赛及点球赛)是否在上半场和下半场的进球数多于对手。

  • 如果赛事中断,所有注单将被取消。

  • 如果任何一个半场或上/下半场的结果是平局或没有进球,所有注单将结算为输。

赢得任一半场

  • 预测选择的球队在90分钟完场时间内(不包括加时赛及点球赛)是否在上/下半场的其中一个半场进球数多于对手。

  • 如果赛事在下半场中断,但在上半场其中一方球队已经获胜,注单将保持有效。如果两支球队在上半场平局,注单将被取消。

  • 如果赛事出现平局或上下半场均无进球,所有注单将视为输。如双方球队各赢半场,则投注两个球队注单为赢。

射正次数

  • 预测在90分钟完场时间内两个球队标射正次数。

  • 注单的结算将根据官方赛果或赛事权威机构判定的结果为准。

上半场–第一个行动

  • 预测在45分钟完场时间内完成一系列的第一个行动。

  • 选项有分为:任意球,球门球,界外球,越位,进球,罚牌和等等。

  • 如果赛事在上半场中断,所有注单将被视为无效,除了第一个行动注单已有结果。如果赛事在下半场中断,所有上半场投注将会被视为有效。

  • 全部的单子会依据赛事的官方数据结算。

下半场–第一个行动

  • 预测在第二段的45分钟完场时间内完成一系列的第一个行动。

  • 选项有分为:任意球,球门球,界外球,越位,进球,罚牌和等等。

  • 如果赛事在下半场中断,所有注单将被视为无效,除了第一个行动注单已有结果。

  • 全部的单子会依据赛事的官方数据结算。

半场伤停补时时间预测

  • 预测半场结束伤停补时具体时间。

  • 所有注单结算将会按照半场结束后第四裁判举牌补时的时间为准。

  • 预测伤停补时时间,只计算在官方正常90分钟赛事内的补时,加时赛将不包含在内。

上半场伤停补时大/小

  • 预测上半场官方时间45分钟后的伤停补时时间。

  • 如果补时总时间,多于盘口的大/小盘时间,则为大盘。如果少于盘口的大/小盘时间,则为小盘。

  • 所有注单结算将会按照第四裁判举牌补时时间为准,在赛事正常45分钟结束后确定的补时时间。

  • 如果赛事在官方时间45分钟之内中断,所有投注上半场伤停补时注单将会取消。

  • 如果赛事是在上半场比赛确认结束后中断,所有投注上半场伤停补时将会被视为有效的。

下半场伤停补时大/小

  • 预测下半场的伤停补时时间。

  • 如果补时总时间,多于盘口的大/小盘时间,则为大盘。如果少于盘口的大/小盘时间,则为小盘。

  • 所有注单结算将会按照第四裁判举牌补时时间为准,在赛事正常90分钟结束后确定的补时时间。

  • 如果赛事在官方时间90分钟之内中断,所有投注下半场伤停补时注单将会取消。

双半场总伤停补时—大/小

  • 预测上半场和下半场的伤停补时时间。

  • 一旦赛事在官方时间90分钟完成,总伤停补时将会以上半场和下半场伤停补时之和为结果。

  • 如果伤停补时时间多于盘口的大/小盘时间,则为大盘;如果少于盘口的大/小盘时间,则为小盘。

  • 如果赛事在官方时间90分钟之内中断,所有投注双半场总伤停补时的注单将会取消。

多重波胆

  • 预测全场90分钟内赛事的最终比分,若选项内有任一比分与最终比分相符则获胜。

  • 举例:若投注选项为1-2, 1-3, 1-4。

    • 最终比分为1:3,符合选项中的1-3,故判定赢。

    • 最终比分为1:0,不符合选项中的任一项比分,故判定输。

  • 比分以外的其他选项:

    • 其他主队胜出:若最终比分为选项外的比分,并且主队胜出,投注此选项者赢。

    • 其他客队胜出:若最终比分为选项外的比分,并且客队胜出,投注此选项者赢。

    • 和局:最终比分主客队得分相同,投注此选项者赢。

总进球数范围

  • 预测全场90分钟内赛事的总进球数,若数量符合选项内的进球范围即获胜。

  • 若两队皆未进球,则投注「无进球」选项者判定为赢。

  • 举例:若投注选项为1-3。

    • 最终比分为2:1,总进球数量为3球,符合选项内的数量,故判定赢。

    • 最终比分为2:2,总进球数量为4球,不符合选项内的数量,故判定输。

总进球数范围-上半场

  • 预测上半场45分钟完场时间内赛事的总进球数,若数量符合选项内的进球范围即获胜。

  • 若两队皆未进球,则投注「无进球」选项者判定为赢。

总进球数范围-下半场

  • 预测下半场45分钟完场时间内赛事的总进球数,若数量符合选项内的进球范围即获胜。

  • 若两队皆未进球,则投注「无进球」选项者判定为赢。

球队总进球数范围

  • 预测全场90分钟内赛事指定队伍的总进球数,若数量符合选项内的进球范围即获胜。

  • 若指定队伍未进球,则投注「无进球」选项者判定为赢。

  • 举例:若投注选项为1-3。

    • 指定队伍最终总进球数量为3球,符合选项内的数量,故判定赢。

    • 指定队伍最终总进球数量为4球,不符合选项内的数量,故判定输。

上半场获胜者或全场获胜者

  • 预测全场90分钟内,赛事的上半场或全场,是否有任一方获胜

  • 有3种选择:

    • 主:若主队在上半场或全场的比分领先于客队,则投注此选项者赢。

    • 客:若客队在上半场或全场的比分领先于主队,则投注此选项者赢。

    • 和:若两队在上半场或全场的比分相同,则投注此选项者赢。

角球

角球:一般规则

  • 被裁定但并未实际执行的角球将不予以计算在内。

  • 注单的结算将根据官方赛果或赛事权威机构判定的结果为准。

  • 如果角球需重新进行(例如,在禁区内犯规),重新进行的角球仍计为同一个角球。

角球: 让球

  • 预测在全场90分钟完场时间内哪一支球队在盘口指定的让球数获得最多角球。

  • 所有注单将按盘口开出的让球数在玩法的时节结束后结算。

角球: 让球 - 上半场

  • 预测在上半场45分钟完场时间内哪一支球队在盘口指定的让球数获得最多角球。

  • 所有注单将按盘口开出的让球数在玩法的时节结束后结算。

角球: 让球 - 下半场

  • 预测在下半场45分钟完场时间内哪一支球队在盘口指定的让球数获得最多角球。

  • 所有注单将按盘口开出的让球数在玩法的时节结束后结算。

角球:让球+独赢

  • 预测在全场90分钟完场时间内哪一支球队在盘口指定的让球数获得最多或是数量相等的角球

  • 结算将会根据选择的球队包括和局,并最终在比赛中获得有利的结果。

  • 让分将依据最终角球数计算,而非投注当下角球数进行计算。

  • 和局将会显示的主场让球盘, 用于区分作用

角球:让球+独赢 - 上半场

  • 预测在上半场45分钟完场时间内哪一支球队在盘口指定的让球数获得最多或是数量相等的角球

  • 结算将会根据选择的球队包括和局,并最终在比赛中获得有利的结果。

  • 让分将依据最终角球数计算,而非投注当下角球数进行计算。

  • 和局将会显示的主场让球盘, 用于区分作用。

角球: 大/小

  • 预测在全场90分钟后完场时间内总获得的角球将大于或小于在盘口指定的大/小盘球数。

  • 如果赛事获得的总角球数多于盘口的大/小盘球数,则为大盘。如果少于盘口的大/小盘球数,则为小盘。

  • 如果赛事中断前已有明确结果并且之后没有任何显着会影响投注结果的情况,角球的大/小盘注单才会被结算。若遇到任何其他情况,注单将一律被取消。

角球: 大 / 小 - 上半场

  • 预测在上半场45分钟后完场时间内总获得的角球将大于或小于在盘口指定的大/小盘球数。

  • 如果赛事获得的总角球数多于盘口的大/小盘球数,则为大盘。如果少于盘口的大/小盘球数,则为小盘。

  • 如果赛事中断前已有明确结果并且之后角球对赛事没有任何影响,注单仍会被结算。若遇到任何其他情况,注单将一律被取消。

角球: 大 / 小 - 下半场

  • 预测在下半场45分钟后完场时间内总获得的角球将大于或小于在盘口指定的大/小盘球数。

  • 如果赛事获得的总角球数多于盘口的大/小盘球数,则为大盘。如果少于盘口的大/小盘球数,则为小盘。

  • 如果赛事中断前已有明确结果并且之后角球对赛事没有任何影响,注单仍会被结算。若遇到任何其他情况,注单将一律被取消。

角球:大/正/小

  • 预测在全场90分钟后完场时间内(包括伤停补时)总获得的角球将大于、正好或小于在盘口指定的大/小盘球数。

  • 如果赛事中断前已有明确结果并且之后角球对赛事没有任何影响,注单仍会被结算。若遇到任何其他情况,注单将一律被取消。

角球: 独赢

  • 预测哪一支球队将在全场90分钟比赛内获得更多角球数,盘口提供两支球队和平局为投注选项。

  • 如果赛事中断前已有明确结果并且之后角球对赛事没有任何影响,总角球数独赢盘注单将会被结算。若遇到任何其他情况,注单将一律被取消。

角球: 独赢 - 上半场

  • 预测哪一支球队将在上半场45分钟比赛内获得更多角球数,盘口提供两支球队和平局为投注选项。

  • 如果赛事中断前已有明确结果并且之后角球对赛事没有任何影响,注单仍会被结算。若遇到任何其他情况,注单将一律被取消。

角球: 独赢 - 下半场

  • 预测哪一支球队将在下半场45分钟比赛内获得更多角球数,盘口提供两支球队和平局为投注选项。

  • 如果赛事中断前已有明确结果并且之后角球对赛事没有任何影响,注单仍会被结算。若遇到任何其他情况,注单将一律被取消。

角球: 单 / 双

  • 预测全场90分钟内赛事的总角球数是单数或双数。

  • 若比赛没有角球,结果为0,投注‘双’注单将会盈利。

  • 如果赛事在上半场中断,所有注单将被视为无效,除非赛事已有明确结果并且之后角球对赛事没有任何影响。

角球: 单 / 双 - 上半场

  • 预测上半场45分钟内赛事的总角球数是单数或双数。

  • 如果赛事中断前已有明确结果并且之后角球对赛事没有任何影响,注单仍会被结算。若遇到任何其他情况,注单将一律被取消。

角球: 单 / 双 - 下半场

  • 预测下半场45分钟内赛事的总角球数是单数或双数。

  • 如果赛事中断前已有明确结果并且之后角球对赛事没有任何影响,注单仍会被结算。若遇到任何其他情况,注单将一律被取消。

球队角球: 单 / 双

  • 预测全场90分钟内赛事的下注队伍角球数是单数或双数。

  • 如果赛事中断前已有明确结果并且之后角球对赛事没有任何影响,注单仍会被结算。若遇到任何其他情况,注单将一律被取消。

第 1 个角球/第 2 个角球/第 3 个角球/第 4 个角球....../第 40 个角球(三項)

  • 预测哪个队伍将在全场90分钟开出指定的角球,或赛事中是否不会出现该指定的角球(无角球)。

  • 获判但未开出的角球(获判角球但在开出前裁判判定上半场或全场比赛结束)不列入结算。

  • 若赛事中没有该指定的角球(如指定的第 3 个角球从未开出),则「无角球」选项为正确结果。

  • 若赛事作废,除非下注的结果已获确定,否则所有投注无效。例如,在第 8 个角球后赛事作废,所有在第 8 个角球后的投注无效(第 9 个、第 10 个…等)。

第一个角球/第 2 个角球/第 3 个角球/第 4 个角球....../最后一个角球(兩項)

  • 预测哪个队伍将在全场90分钟开出指定的角球。

  • 获判但未开出的角球(获判角球但在开出前裁判判定上半场或全场比赛结束)不列入结算。

  • 若赛事中没有该指定的角球,则投注无效。

  • 若赛事作废,除非下注的结果已获确定,否则所有投注无效。例如,在第 8 个角球后赛事作废,所有在第 8 个角球后的投注无效(第 9 个、第 10 个…等)。

最后角球队伍

  • 预测哪个队伍将在全场90分钟内开出最后一个角球。

  • 获判但未开出的角球(获判角球但在开出前裁判判定上半场或全场比赛结束)不列入结算。

  • 若某个角球以任何理由需要重新开出,会被算作 1 个角球。

  • 若赛事作废,除非下注的结果已获确定,否则所有投注无效。

  • 选项可列为:

    • 主:代表主场开出最后一个角球

    • 和:代表盘口开启后到比赛结束未有角球事件发生

    • 客:代表客场开出最后一个角球

最后角球队伍 - 上半场

  • 预测哪个队伍将在上半场45分钟内开出最后一个角球。

  • 获判但未开出的角球(获判角球但在开出前裁判判定上半场或全场比赛结束)不列入结算。

  • 若某个角球以任何理由需要重新开出,会被算作 1 个角球。

  • 若赛事作废,除非下注的结果已获确定,否则所有投注无效。

  • 选项可列为:

    • 主:代表主场开出最后一个角球

    • 和:代表盘口开启后到上半场结束未有角球事件发生

    • 客:代表客场开出最后一个角球

先到1个角球的一方/先到2个角球的一方……/先到40个角球的一方

  • 预测哪个队伍将在全场90分钟达到指定的角球数量。

  • 没有队伍能在时间内达到指定的角球数量,则投注「无角球」选项者判定为赢。

  • 若赛事作废,除非下注的结果已获确定,否则所有投注无效。

最多角球的半场

  • 预测在90分钟完场时间内哪个半场将会获得最多角球。

  • 如果赛事中断前已有明确结果并且之后没有任何显着会影响赛事结果的情况,注单才会被结算。若遇到任何其他情况,注单将一律被取消。

角球:欧洲大小盘

  • 预测赛事在90分钟后完成时间内(包括伤停补时)中(两支队伍)获得的总角球数是否大于或小于给定的数量。

  • 获判但未开出的角球(获判角球但在开出前裁判判定上半场或全场比赛结束)不列入结算。同时,若某个角球以任何理由需要重新开出,会被算作 1 个角球。

  • 若赛事作废,除非所下注的投注结果已经被确定,否则所有投注均无效。

角球:波胆/角球:波胆-上半场/角球:波胆-下半场

  • 通过选择给定的结果预测赛事中或盤口中提及的特定时间內(上半場或下半場)角球的波胆。倘若在给定的时间内未完赛,投注皆无效。

总角球数/总角球数-上半场/总角球数-下半场

  • 投注根据两支队伍在赛事中进的角球总数来确定。

  • 玩家须从给定的范围内预测赛事中或盤口中提及的特定时间內(上半場或下半場)总角球数。

  • 倘若在给定的时间内未完赛,则该盘口的投注无效。

球队总角球数/球队总角球数-上半场/球队总角球数-下半场

  • 投注根据指定队伍在赛事中进的角球总数来确定。

  • 玩家须从给定的范围内预测赛事中或盤口中提及的特定时间內(上半場或下半場)总角球数。

  • 倘若在给定的时间内未完赛,则该盘口的投注无效。

球队角球数/球队角球数-上半场/球队角球数-下半场

  • 投注根据指定队伍在赛事中进的角球总数来确定。

  • 玩家须从给定的選項内预测赛事中或盤口中提及的特定时间內(全场、上半場或下半場)指定角球数。

  • 倘若在给定的时间内未完赛,则该盘口的投注无效。

首个角球时间

  • 预测获得首个角球的时间。

  • 选项可列为:

    • 赛事的第8分钟或之前。

    • 第9分钟后。

  • 出于结算的用意,赛事的第一分钟是从1秒计算到59秒。第二分钟则是从1分钟计算到1分59秒,以此类推。

  • 范例:如果投注首个角球时间的选项是‘赛事的第8分钟或之前’,而确实踢角球的时间为8分钟49秒,踢角球时间的范围属于‘第9分钟后’,因此投注将结算为输。

  • 如果赛事在获得第一个角球后中断,所有首个角球时间的注单将保持有效。

  • 如果赛事在没有获得角球前中断,所有首个角球时间的注单将被取消。

  • 如果在90分钟完场时间内并未获得角球,所有首个角球时间的注单将被取消。

  • 如果首个角球需重新进行,那首个角球时间将以重新进行的角球时间为准。+


指定分钟角球数 (含伤停补时)

一般規則

  • 所有两支球队在每时段开始时比分将按照0-0计算,之前比分不计算在内。

  • 如果赛事中断,所有当前时段的投注以及将要进行的下一个时段投注将视为无效,任何时段投注,如果该时段完整结束,注单将被视为有效。

  • 15分钟時段可参考如下表:

15分钟-时段1

00分00秒-14分59秒

15分钟-时段2

15分00秒-29分59秒

15分钟-时段3

30分00秒-45分00秒 (含伤停补时)

15分钟-时段4

45分00秒-59分59秒

15分钟-时段5

60分00秒-74分59秒

15分钟-时段6

75分00秒-90分00秒 (含伤停补时)

  • 10分钟时段可参考下表:

10分钟-时段1

00分00秒-09分59秒

10分钟-时段2

10分00秒-19分59秒

10分钟-时段3

20分00秒-29分59秒

10分钟-时段4

30分00秒-39分59秒

10分钟-时段5

40分00秒-49分59秒 (含伤停补时)

10分钟-时段6

50分00秒-59分59秒

10分钟-时段7

60分00秒-69分59秒

10分钟-时段8

70分00秒-79分59秒

10分钟-时段9

80分00秒-90分00秒 (含伤停补时)

  • 5分钟时段可参考下表:

5分钟-时段1

00分00秒-04分59秒

5分钟-时段2

05分00秒-09分59秒

5分钟-时段3

10分00秒-14分59秒

5分钟-时段4

15分00秒-19分59秒

5分钟-时段5

20分00秒-24分59秒

5分钟-时段6

25分00秒-29分59秒

5分钟-时段7

30分00秒-34分59秒

5分钟-时段8

35分00秒-39分59秒

5分钟-时段9

40分00秒-45分00秒 (含伤停补时)

5分钟-时段10

45分00秒-49分59秒

5分钟-时段11

50分00秒-54分59秒

5分钟-时段12

55分00秒-59分59秒

5分钟-时段13

60分00秒-64分59秒

5分钟-时段14

65分00秒-69分59秒

5分钟-时段15

70分00秒-74分59秒

5分钟-时段16

75分00秒-79分59秒

5分钟-时段17

80分00秒-84分59秒

5分钟-时段18

85分00秒-90分00秒 (含伤停补时)


让球

  • 根据盘口让球信息预测最终获得15分钟内较多角球数的球队。

  • 所有的投注将以开始下个时节前的赛果结算。

大 / 小

  • 预测在规定时段内的总角球数将大于或小于在盘口指定的大/小盘球数。

  • 如果总角球数多于盘口的大/小盘牌数,则为大盘。如果少于盘口的大/小盘牌数,则为小盘。

独赢

  • 预测在规定时段内哪一支球队将会踢出较多角球数,赛事盘口将会提供两支球队,以及和局。

单 / 双

  • 预测在规定时间内角球数是单或双。

第 1 个角球/第 2 个角球/第 3 个角球....../第 Χ 个角球(三項)

  • 预测哪个队伍将在规定时段內开出指定的角球,或是否不会出现该指定的角球(无角球)。

  • 获判但未开出的角球(获判角球但在开出前裁判判定规定时段结束)不列入结算。

  • 若赛事中没有该指定的角球(如指定的第 3 个角球从未开出),则「无角球」选项为正确结果。

角球 - 双重机会

  • 在三种可能出现的赛果中选择两种进行投注; 主场赢或打平(1和X),客场赢或打平(2和X)或主场或客场赢(1和2)。

  • 共有三种选择: 1 X, X 2, 1 2:

    1. "1" 代表: 主场赢。

    2. "X" 代表: 平手。

    3. "2" 代表: 客场赢。

牌/卡

罚牌:一般规则

  • 针对非球员(例如:教练,没有比赛中替补出场的替补球员,管理人员等等)出示的任何罚牌将不计算在内。

  • 黄卡将占1分,红卡占2分。如果球员获发两张黄卡,此球员所获发的总罚牌数将计算为黄卡占1分以及红卡占2分,总分三分。(单场赛事每个球员最高可计3分)

  • 注单的结算将根据官方赛果或赛事权威机构判定的结果为准。

罚牌数: 让球

  • 预测在90分钟完场时间内哪一支球队根据盘口让牌信息获发最多罚牌。

  • 所有注单将按盘口开出让牌信息,在相应投注类型结束后结算。

罚牌数: 让球 - 上半场

  • 预测在45分钟完场时间内哪一支球队在盘口指定的让球数获发最多罚牌。

  • 所有注单将按盘口开出的让球数在玩法的时节结束后结算。

罚牌数: 大 / 小

  • 预测在90分钟比赛结束后总出示的罚牌数将大于或小于在盘口指定的大/小盘牌数。

  • 如果出示的总罚牌数多于盘口的大/小盘牌数,则为大盘。如果少于盘口的大/小盘牌数,则为小盘。

  • 如果赛事中断前已有明确结果并且之后没有任何显着会影响投注结果的情况,总罚牌的大/小盘注单才会被结算。若遇到任何其他情况,注单将一律被取消。

罚牌数: 大 / 小 - 上半场

  • 预测在半场“45分钟”比赛结束后总出示的罚牌将大于或小于在盘口指定的大/小盘牌数。

  • 如果出示的总罚牌数多于盘口的大/小盘牌数,则为大盘。如果少于盘口的大/小盘牌数,则为小盘。

  • 如果赛事在上半场中断,所有注单将会被取消,除非赛事已有明确结果并且之后罚牌对赛事没有任何影响。

  • 如果赛事在下半场中断,那么所有投注上半场注单均视为有效。

罚牌数: 独赢

  • 预测哪一支球队将在90分钟比赛内获得最多罚牌,盘口提供两支球队和平局为投注选项。

  • 如果赛事中断,所有注单将会被取消,除非赛事已有明确结果并且之后罚牌对赛事没有任何影响。

罚牌数: 独赢 - 上半场

  • 预测哪一支球队将在45分钟比赛内获得最多罚牌,盘口提供两支球队和平局为投注选项。

  • 如果赛事在上半场中断,所有注单将会被取消,除非赛事已有明确结果并且之后罚牌对赛事没有任何影响。

  • 如果赛事在下半场中断,那么所有投注上半场注单均视为有效。

罚牌数: 单 / 双

  • 预测90分钟内赛事的总罚牌数是单数或双数。

  • 如果赛事中断,所有注单将会被取消,除非赛事已有明确结果并且之后罚牌对赛事没有任何影响。

  • 如无红、黄牌出现,即“0”,此局可视为偶数赢。

罚牌数: 单 / 双 - 上半场

  • 预测45分钟内赛事的总罚牌数是单数或双数。

  • 如果赛事在上半场中断,所有注单将会被取消,除非赛事已有明确结果并且之后罚牌对赛事没有任何影响。

  • 如果赛事在下半场中断,那么所有投注上半场注单均视为有效。

  • 如无红、黄牌出现,即“0”,此局可视为偶数赢。

罚牌数

  • 预测两支队伍在赛事全场90分钟的准确罚牌数量。

  • 如果赛事中断,所有注单将会被取消,除非赛事已有明确结果并且之后罚牌对赛事没有任何影响。

罚牌数 - 上半场

  • 预测两支队伍在赛事上半场45分钟的准确罚牌数量。

  • 如果赛事中断,所有注单将会被取消,除非赛事已有明确结果并且之后罚牌对赛事没有任何影响。

球队罚牌数

  • 预测指定队伍在赛事全场90分钟的准确罚牌数量。

  • 如果赛事中断,所有注单将会被取消,除非赛事已有明确结果并且之后罚牌对赛事没有任何影响。

球队罚牌数 - 上半场

  • 预测指定队伍在赛事上半场45分钟的准确罚牌数量。

  • 如果赛事中断,所有注单将会被取消,除非赛事已有明确结果并且之后罚牌对赛事没有任何影响。

第1个罚牌/第2个罚牌/第3个罚牌/第4个罚牌……/第10个罚牌

  • 预测在90分钟完场时间内哪支球队将被判罚指定的罚牌。

  • 无论黄卡或红卡皆被视为一个独立罚牌。

  • 如果时间内并未出示指定罚牌,則投注「无」选项者判定为赢。

  • 如果在指定的罚牌被记录之前比赛中断,该张罚牌的投注将被视为无效。所有比赛中断之前记录的罚牌将视为有效。


第1个罚牌-上半场/第2个罚牌-上半场/第3个罚牌-上半场……/第10个罚牌-上半场

  • 预测在45分钟完场时间内哪支球队将被判罚指定的罚牌。

  • 无论黄卡或红卡皆被视为一个独立罚牌。

  • 如果时间内并未出示指定罚牌,則投注「无」选项者判定为赢。

  • 如果在指定的罚牌被记录之前比赛中断,该张罚牌的投注将被视为无效。所有比赛中断之前记录的罚牌将视为有效。


罚牌最多的球队

  • 预测哪一支球队将由获收的罚牌累积最多分数。

  • 注单将按照90分钟完场赛事时间内所获收的黄卡和红卡累积最高分数的球队做结算。

  • 选项可列为:

    • 球队A

    • 球队B

    • 平局

第一张罚牌时间

  • 预测出示首个罚牌的时间。

  • 选项可列为:

    • 赛事的第8分钟或之前。

    • 第9分钟后。

  • 出于结算的用意,赛事的第一分钟是从1秒计算到59秒。第二分钟则是从1分钟计算到1分59秒,以此类推。

  • 范例:如果投注第一张罚牌时间的选项是‘赛事的第8分钟或之前’,而确实出示罚牌的时间为8分钟49秒,罚牌出示时间的范围属于‘第9分钟后’,因此投注将结算为输。

  • 针对非球员(例如:教练,没有比赛中替补出场的替补球员,管理人员等等)出示的任何罚牌将不计算在内。

  • 如果赛事在出示首个罚牌后中断,所有第一张罚牌时间的注单将保持有效。

  • 如果赛事在没有出示任何罚牌前中断,所有第一张罚牌时间的注单将被取消。

  • 如果在90分钟完场时间内并未出示任何罚牌,所有第一张罚牌时间的注单将被取消。

红卡(球员)

  • 预测在90分钟完场时间内是否会出示红卡。

  • 针对非球员(例如:教练,没有比赛中替补出场的替补球员,管理人员等等)出示的任何罚牌将不计算在内。

  • 如果赛事在出示一个红卡后中断, 所有是否出示红卡的注单将保持有效。

  • 如果赛事在没有红卡出示前中断, 所有是否出示红卡的注单将被取消。

15分钟罚牌数

  • 依照以上主要市场陈列的15分钟规则,预测哪队将在让球,独赢,大小或单双盘口取得胜利。

罚牌 - 双重机会

  • 在三种可能出现的赛果中选择两种进行投注; 主场赢或打平(1和X), 客场赢或打平(2和X)或主场或客场赢(1和2)。

  • 共有三种选择: 1 X, X 2, 1 2:

    • "1" 代表: 主场赢。

    • "X" 代表: 平手。

    • "2" 代表: 客场赢。

球员判罚下场/球员判罚下场-上半场/球员判罚下场-下半场

  • 在指定时间(全場、上半場或下半場)内,是否有任何在场上的「球员」被罚下场。

  • 经理、教练或替补球员被罚下或终场哨响后的事件不计入此结果。

任意球

最先/最后任意球

  • 预测在90分钟完场时间内哪个球队会发出第一或最后一个任意球。

  • 如果赛事在发出第一个任意球后中断,所有第一个任意球的注单将保持有效。

  • 如果赛事在发出第一个任意球后中断,所有最后一个任意球的注单将被取消。

  • 如果赛事在没有发出任何任意球前中断,所有第一个和最后一个任意球的注单将被取消。

  • 如果在90分钟完场时间内并未发出任何任意球,所有第一个和最后一个任意球的注单将被取消。

射门

最先/最后球门球

  • 预测在90分钟完场时间内哪个球队会发出第一或最后一个球门球。

  • 如果赛事在发出第一个球门球后中断,所有第一个球门球的注单将保持有效。

  • 如果赛事在发出第一个球门球后中断,所有最后一个球门球的注单将被取消。

  • 如果赛事在没有发出任何球门球前中断,所有第一个和最后一个球门球的注单将被取消。

  • 如果在90分钟完场时间内并未发出任何球门球,所有第一个和最后一个球门球的注单将被取消。

界外球

最先/最后界外球

  • 预测在90分钟完场时间内哪个球队会发出第一或最后一个界外球。

  • 如果赛事在发出第一个界外球后中断,所有第一个界外球的注单将保持有效。

  • 如果赛事在发出第一个界外球后中断,所有最后一个界外球的注单将被取消。

  • 如果赛事在没有发出任何界外球前中断,所有第一个和最后一个界外球的注单将被取消。

  • 如果在90分钟完场时间内并未发出任何界外球,所有第一个和最后一个界外球的注单将被取消。

替补

最先/最后替补

  • 预测在90分钟完场时间内哪个球队会最先或最后替补球员。

  • 如果两位或以上球员同时被替补,首先被裁判员出示替补的球员,将被视为"优胜者"为注单进行结算。

  • 如果赛事在替补第一个球员后中断,所有第一个替补的注单将保持有效。

  • 如果赛事在替补第一个球员后中断,所有最后一个替补的注单将被取消,除非在赛事中断前,结果已经明确并且若之后有任何潜在替补将对盘口结算裁决没有影响。此情况只有当双方球队都将已分配好的替补机会用完。若遇到任何其他情况,注单将一律被取消。

  • 如果赛事在没有任何替补前中断,所有第一个和最后一个替补的注单将被取消。

  • 如果在90分钟完场时间内并未任何替补,所有第一个和最后一个替补的注单将被取消。

越位

最先/最后越位

  • 预测在90分钟完场时间内哪个球队的球员会最先或最后越位。

  • 如果赛事在第一个球员越位后中断,所有第一个越位的注单将保持有效。

  • 如果赛事在第一个球员越位后中断,所有最后一个越位的注单将被取消。

  • 如果赛事在没有任何球员越位前中断,所有第一个和最后一个越位的注单将被取消。

  • 如果在90分钟完场时间内并未有任何球员越位,所有第一个和最后一个越位的注单将被取消。

点球

一般规则

  • 点球大战将根据胜出回合(和已踢进的点球)来进行结算。

  • 如果比赛规则注明必须完成全部点球,任何在已有明确胜出结果后的点球将不计于结算成绩内。

点球荣获

  • 预测在90分钟完场时间内是否会罚点球。

点球大战 - 让球

  • 预测哪一支球队根据盘口指定的让球数在点球赛里获胜。

  • 骤死赛得分也包括在点球让球盘。

  • 如果赛事并未进行点球,所有注单将被取消。

  • 在90分钟完场时间内以及加时赛踢进的点球将不计算在内。

点球PK:大 / 小(所有点球数)

  • 预测点球赛总入球数将大于或小于在盘口指定的大/小盘球数。

  • 点球大小盘包含骤死赛得分

  • 如果赛事并未进行点球,所有注单将被取消。

  • 在90分钟完场时间内以及加时赛踢进的点球将不计算在内。

  • 如果赛事在点球赛时中断,而在赛事中断前已有明确结果并且之后没有任何显着会影响投注结果的情况,大/小盘注单才会被结算。若遇到任何其他情况,注单将一律被取消。

点球PK: 球队进球:大/小

  • 预测点球赛主队/客队入球数将大于或小于在盘口指定的大/小盘球数。

  • 骤死赛比分计算在内。

点球PK: 净胜球数

  • 预测点球赛结束后的净胜球数。

  • 投注的结算根据点球赛与骤死赛比分的差别做裁决。

点球PK: 波胆

  • 预测点球赛的准确比分。

  • 骤死赛比分计算在内。

点球PK: 总进球数

  • 预测点球赛两队的总入球数。

  • 骤死赛比分计算在内。

点球PK-进球: 单/双

  • 预测点球赛总入球数是单数或双数。

  • 骤死赛比分计算在内。

点球PK: 球队进球: 单/双

  • 预测点球赛主队/客队入球数是单数或双数。

  • 骤死赛比分计算在内。

点球大战 - 独赢

  • 预测哪一支球队将在点球大战胜出或和局。

  • 骤死赛(第6回合起) 将不计算在内。

  • 点球独赢盘只计算球队在前5回合的进球。

点球PK:第X球是否进球

  • 预测特定的球队是否会踢进指定的点球。

  • 根据点球是否进球来进行结算。

会有点球PK吗

  • 预测一场比赛是否会有点球大战

  • 无论此前是否有进行加时赛, 将根据比赛是否有点球大战来进行结算。

点球PK:获胜者

  • 预测哪一支球队将在点球大战胜出。

  • 骤死赛比分计算在内。

点球PK:独赢+进球:大 / 小

  • 同时预测点球大战的比赛结果,以及总入球数将大于或小于在盘口指定的大/小盘球数。

  • 根据所选球队的输、赢,以及点球大战的总进球数,来进行结算。

  • 骤死赛比分计算在内。

点球PK:是否进入骤死赛

  • 预测点球大战是否会进入骤死赛。

点球PK:最后一次点球结果

  • 预测点球大战最后一个点球的结果是进球或是未进球。


比赛

联赛:一般规则

  • 赛果确认完成后将进行派彩。

  • 联赛的派彩将以官方来源或相关体育权威机构判定的结果为准。

  • 所有联赛的积分扣除都予以计算。

  • 冠军比赛规则适用。

小组赛

  • 预测整个赛季中排名最高的球队。

排名前4、6、10等

  • 预测整个赛季中排名在前4、6、10等的球队。

没有球队X的联赛冠军

  • 预测整个赛季中,当所列出的球队或某球队从联赛表中移除后,哪一支球队将获得冠军。

联赛:赛季让分盘

  • 根据每一队让分盘口的差点预测哪支球队将会获胜。

  • 各球队的让分数将会添加到该队赛季的最终积分里。

  • 拥有最高综合总分(让分数和赛季最终积分)的球队为赢家。

  • 此盘口将采用并列名次规则。

  • 球队让分数将不会在赛季中变更,然而赔率将会有所调整。

  • 球队(赛季前)让分数将显示在各别球队名旁。

  • 下列为5队联赛例子

球队

赛季最终积分

让分数

综合总分

最终排名

球队1

90

3

93

第2

球队2

85

0

85

第5

球队3

82

5

87

第4

球队4

79

15

94

第1

球队5

79

9

88

第3


联赛:最后一名球队

  • 预测整个赛季中哪一支球队会成为最后一名。

  • 此类投注也被称为最低分。

联赛:被降级的球队

  • 预测在比赛中哪一支球队会被降级。

  • 所有被降级球队将以全赢作为计算标准,比如:并列名次规则不适用。

  • 如果一支球队从联赛中被移除或清除,投注在此球队的注单将被视为无效。如果在赛季开始之前出现此情况,所有的投注都无效,将会另外开设盘口。

联赛:球队保持原位

  • 预测比赛中哪一支球队不会被降级。

  • 所有没有被降级的球队将以全赢作为计算标准,比如:并列名次规则不适用。

  • 如果一支球队从联赛中被移除或清除,投注在此球队的注单将被视为无效。如果在赛季开始之前出现此情况,所有的投注都无效,将会另外开设盘口。

联赛:球队晋级

  • 预测比赛中哪一支球队会晋级。

  • 投注包括自动晋级以及在特定比赛中通过加赛后的晋级。

  • 所有晋级的球队将以全赢作为计算标准,比如:并列名次规则不适用。

  • 如果一支球队从联赛中被移除或清除,投注在此球队的注单将被视为无效。如果在赛季开始之前出现此情况,所有的投注都无效,将会另外开设盘口。

联赛:最佳新秀

  • 预测哪一支最新晋级的球队将在赛季中获得最高排名。

比赛 - 进球最多的球队

  • 预测在比赛中哪一个球队进球最多。

  • 所有的投注以赛事官方90分钟为完场时间,包括加时、伤停补时。

  • 进球数不包括点球。

  • 如果赛事中断,将以官方单位公布的最后赛果为准,其中包括赛事重新开始或指定的分数。

比赛 - 失球最多的球队

  • 预测在比赛中哪一个球队失球最多。

  • 所有的投注以赛事官方90分钟为完场时间,包括加时、伤停补时。

  • 在点球中的失球不予计算。

  • 如果赛事中断,将以官方单位公布的最后赛果为准,其中包括赛事重新开始或指定的分数。

比赛 – 总进球数

  • 预测在比赛中进球的数量。

  • 所有的投注以赛事官方90分钟为完场时间,包括加时、伤停补时。

  • 在比赛中点球的进球不予计算。

  • 如果赛事中断,将以官方单位公布的最后赛果为准,其中包括赛事重新开始或指定的分数。

比赛 - 帽子戏法

  • 预测在比赛中任何一位球员进3个或以上的球。

  • 所有的投注以赛事官方90分钟为完场时间,包括加时、伤停补时。

  • 帽子戏法不包含点球中的进球。

  • 在一场比赛中如果一个球员进球3个或更多,即为帽子戏法。

  • 如果赛事中断,将以官方单位公布的最后赛果为准,其中包括赛事重新开始或指定的得分。如果帽子戏法是在赛事中断前,且赛事在0-0的情况下或者其它官方单位分配的比分下重新开始,将不予计算。

比赛 - 总帽子戏法

  • 预测在比赛中获得了多少帽子戏法。

  • 所有的投注以赛事官方90分钟为完场时间,包括加时、伤停补时。

  • 帽子戏法不包含点球中的进球。

  • 在一场比赛中如果一个球员进球3个或更多,即为帽子戏法。

  • 如果赛事中断,将以官方单位公布的最后赛果为准,其中包括赛事重新开始或指定的分数。如果帽子戏法是在赛事中断前,且赛事在0-0的情况下或者其它官方单位分配的比分下重新开始,将不予计算。

比赛 – 总红卡数

  • 预测在比赛中红卡的数量。

  • 所有的投注以赛事官方90分钟为完场时间,包括加时、伤停补时。

  • 任何非球员的红卡(例如.经理、教练或替补)不予计算。

  • 点球中的红卡不予计算。

  • 如果赛事在出现红卡之后中断,红卡仍然计算在总红卡数中。

比赛 – 总黄卡数

  • 预测在比赛中黄卡的数量。

  • 所有的投注以赛事官方90分钟为完场时间,包括加时、伤停补时。

  • 任何非球员的黄卡(例如.经理、教练或替补)不予计算

  • 点球中的黄卡不予计算

  • 如果同个球员被出示第二张黄卡,第二张黄卡会被计算在内。

比赛 – 进球最多的城市

  • 预测在比赛中哪一个城市将会进球最多。

  • 所有的投注以官方时间90分钟为准,包括加时、伤停补时。

  • 点球中的进球不予计算。

  • 如果赛事中断,将以官方单位公布的最后赛果为准,其中包括赛事重新开始或指定的分数。

比赛 – 获胜小组

  • 预测在比赛中哪一个小组将会获胜。

  • 冠军比赛规则适用。

赢得最终胜利

  • 预测在比赛中哪一个隊伍获得最终胜利。

  • 所有的投注包括全场、加时、伤停补时、点球大战。

锦标赛 – 小组最后一名球队

  • 预测哪一个球队为最后一名。

  • 冠军比赛规则适用。

冠军所属地

  • 预测比赛的冠军来自哪里。

  • 来源地可以是冠军球队的所属地区、国家或洲。

  • 冠军比赛规则使用。

比赛-晋级

  • 预测那支队伍会晋级去下一轮赛事。

  • 投注包括自动晋级以及在加时赛与点球大战后的晋级。

  • 符合冠军规则。

比赛 - 阶段淘汰

  • 预测比赛中该球队会在哪一个阶段被淘汰。

  • 冠军比赛规则使用。

比赛 - 提名入围

  • 预测哪一支球队会进入决赛。

  • 冠军比赛规则适用。

比赛 – 最终裁判员

  • 预测决赛中的裁判员是哪一位。

  • 无论此前是否有任何公告,将根据决赛开始后的裁判为派彩依据。

  • 冠军比赛规则适用。

直接预测排名(联赛、比赛)

  • 预测在比赛或联赛中哪两个球队获得第1名和第2名的顺序排名。

  • 所有的投注以官方时间90分钟为准,包括加时、伤停补时。

  • 如果赛事中断,将以官方单位公布的最后赛果为准,其中包括赛事重新开始或指定的分数。

双预测排名

  • 预测在比赛或联赛中哪两个球队为前两名的排名。

  • 所有的投注以官方时间90分钟为准,包括加时、伤停补时。

  • 如果赛事中断,将以官方单位公布的最后赛果为准,其中包括赛事重新开始或指定的分数。

最佳射手

  • 预测在一场特定比赛中进球最多的球员。

  • 如果产生超过一个冠军数量, 请以并列名次规则参考结算方式。

  • 投注在被列出的该球队球员将被视为有效,无论他们是否受伤、暂停、不参与比赛或其它任何原因。

  • 如果联赛中途有球员转到同一个联赛的另一个球队, 球员在转到另一个球队前所进得球数将继续计算在内。如果球员是转到不同联赛的球队,在转之前进得球数将不会继续带到新联赛去。两种情况下,投注此球员的注单将保持有效。

  • 乌龙球将不予计算在内。

  • 按照单纯的联赛比赛玩法,只有在联赛中进得球才计算在内。在季后赛进得球将不予计算在内。

最佳射手球队

  • 预测比赛中哪一个球员在所属球队中进球最多。

  • 所有的投注以官方时间90分钟为准,包括加时、伤停补时。

  • 进球数不包括点球。

  • 投注适用于所有比赛的球队。

  • 并列名次规则适用;任何用于决定和局的方法不可作为结算依据,比如:计数协助。

最佳射手/比赛双赢

  • 预测比赛中哪一个球员进球最多和哪一支球队获胜。

  • 所有的投注以官方时间90分钟为准,包括加时、伤停补时。

  • 进球数不包括点球。

  • 如果多于一个球员和最佳射手打平,并列名次规则适用;任何用于决定和局的方法不可作为结算依据,比如:计数协助。

进球最多的小组

  • 预测在比赛中哪一组进球最多。

  • 只计算在小组阶段的进球。

  • 所有的投注以赛事官方单位90分钟为完场时间,包括球员伤停补时。

  • 如果赛事中断,将以官方单位公布的最后赛果为准,其中包括赛事重新开始或指定的分数。

加时赛

  • 预测一场比赛是否会有加时赛。

  • 根据比赛是否在正常的“90分钟”结束,还是进行了加时赛结束,来进行结算。

比赛-季军

  • 预测哪支队伍会在季军战胜出。

  • 投注包括自动晋级以及在加时赛与点球大战后的晋级。

  • 符合冠军规则。

比赛-分组赛冠军

  • 从指定的两个球队预测选出谁将荣登小组榜首。

  • 结算以整个小组所有赛事结束后并且官方宣布的结果为准。

  • 如果出现两个球队比分相同的情况,结果将以官方宣布的获胜者将为准(球分差异,净胜球等等)。

  • 如果官方没有宣布获胜者,所有投注将会被取消。

综合市场

独赢 + 进球 大/小

  • 同时预测“90分钟”后的比赛结果,以及赛事总入球数将大于或小于在盘口指定的大/小盘球数。

  • 根据所选球队的输、赢或和局,以及全场比赛的总进球数,来进行结算。

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。

独赢 + 进球 大/小 - 上半场

  • 同时预测上半场“45分钟”后的比赛结果,以及上半场赛事总入球数将大于或小于在盘口指定的大/小盘球数。

  • 根据所选球队的输、赢或和局,以及上半场比赛的总进球数,来进行结算。

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。

独赢 + 进球 大/小 - 下半场

  • 同时预测下半场“45分钟”后的比赛结果,以及下半场赛事总入球数将大于或小于在盘口指定的大/小盘球数。

  • 根据所选球队的输、赢或和局,以及下半场比赛的总进球数,来进行结算。

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。

独赢 + 双方球队进球

  • 同时预测“90分钟”后的比赛结果,以及双方球队是否都有进球。

  • 根据所选特定球队的输、赢或和局,以及每支球队的进球数,来进行结算。

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。

独赢 + 双方球队进球 - 上半场

  • 同时预测上半场“45分钟”后的比赛结果,以及双方球队是否都有进球。

  • 根据所选特定球队的输、赢或和局,以及每支球队的进球数,来进行结算。

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。

独赢 + 双方球队进球 - 下半场

  • 同时预测下半场“45分钟”后的比赛结果,以及双方球队是否都有进球。

  • 根据所选特定球队的输、赢或和局,以及每支球队的进球数,来进行结算。

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。

独赢 + 最先进球

  • 同时预测“90分钟”后的比赛结果,以及哪支球队将最先进球。

  • 根据所选球队的输、赢或和局,以及是否正确的选择了最先进球球队,来进行结算。

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效

  • 如果赛事中没有首个进球,所有投注将会以输结算。

独赢 + 进球 单/双

  • 同时预测“90分钟”后的比赛结果,以及双方球队总进球数的奇偶。

  • 根据所选球队的输、赢或和局,以及双方球队总进球数的奇偶,来进行结算。

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效

进球 大/小 + 双方球队进球

  • 同时预测赛事总入球数将大于或小于在盘口指定的大/小盘球数,以及双方球队是否都有进球。

  • 根据90分钟后的总进球数,以及两队是否都有进球,来进行结算。

  • 如果在赛果公布之前比赛中断,将根据以下规则进行处理:

    • 如果在比赛中断那一刻,双方球队都已经进1球或以上,并且总进球数大于盘口指定的大/小盘球数,投注将被视为有效。

    • 如果在比赛中断那一刻,双方球队没有都进1球或以上,投注将被视为无效。

进球 大/小 + 进球 单/双

  • 同时预测赛事总入球数将大于或小于在盘口指定的大/小盘球数,以及总进球数的奇偶。

  • 根据90分钟后的总进球数,以及总进球数的奇偶,来进行结算。

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。

进球 大/小 + 最先进球

  • 同时预测赛事总入球数将大于或小于在盘口指定的大/小盘球数,以及哪只球队将成为首先进球球队。

  • 根据90分钟后的总进球数,以及是否正确的选择了最先进球球队,来进行结算。

  • 如果在赛果公布之前比赛中断,将根据以下规则进行处理:

    • 如果在比赛中断那一刻的总进球数大于指定的大/小盘球数,投注将被视为有效。

    • 如果在比赛中断那一刻的总进球数小于指定的大/小盘球数,投注将被视为无效。

  • 如果赛事中没有首个进球,所有投注将会以输结算。

双重机会 + 进球 大/小

  • 从可选的结果中预测正确的结果,以及总进球数对比指定数值的大小。

  • 根据是否正确的选择了可能的结果,以及“90分钟”后的总进球数,来进行结算。

  • 3种可能的结果是:

    • 主队胜出或和局(1 & X)

    • 客队胜出或和局(2 & X)

    • 主队胜出或客队胜出(1 & 2)

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。

双重机会 + 双方球队进球

  • 从可选的结果中预测全场90分钟内赛事正确的结果以及两队是否都会得分。

  • 根据是否在可能的结果中做出了正确的选择以及两队是否都有进球,来进行结算。

  • 3种可能的结果是:

    • 主队胜出或和局(1 & X)

    • 客队胜出或和局(X & 2)

    • 主队胜出或客队胜出(1 & 2)

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。

双重机会 + 双方球队进球 - 上半場

  • 从可选的结果中预测上半场45分钟内赛事正确的结果以及两队是否都会得分。

  • 根据是否在可能的结果中做出了正确的选择以及两队是否都有进球,来进行结算。

  • 3种可能的结果是:

    • 主队胜出或和局(1 & X)

    • 客队胜出或和局(X & 2)

    • 主队胜出或客队胜出(1 & 2)

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。


双重机会 + 双方球队进球 - 下半場

  • 从可选的结果中预测下半场45分钟内赛事正确的结果以及两队是否都会得分。

  • 根据是否在可能的结果中做出了正确的选择以及两队是否都有进球,来进行结算。

  • 3种可能的结果是:

    • 主队胜出或和局(1 & X)

    • 客队胜出或和局(X & 2)

    • 主队胜出或客队胜出(1 & 2)

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。


全场双重机会+上半场双方球队进球

  • 从可选的结果中预测全90分钟内赛事正确的结果以及上半场45分钟内两队是否都会得分。

  • 根据是否在可能的结果中做出了正确的选择以及两队是否都有进球,来进行结算。

  • 3种可能的结果是:

    • 主队胜出或和局(1 & X)

    • 客队胜出或和局(X & 2)

    • 主队胜出或客队胜出(1 & 2)

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。


全场双重机会+下半场双方球队进球

  • 从可选的结果中预测全90分钟内赛事正确的结果以及下半场45分钟内两队是否都会得分。

  • 根据是否在可能的结果中做出了正确的选择以及两队是否都有进球,来进行结算。

  • 3种可能的结果是:

    • 主队胜出或和局(1 & X)

    • 客队胜出或和局(X & 2)

    • 主队胜出或客队胜出(1 & 2)

  • 如果在赛果公布之前比赛中断,所有该盘口的投注将被视为无效。


第 X 个进球 + 1x2

  • 预测全场90分钟内赛事哪支队伍获得指定的进球,以及比赛结果。

  • 根据指定的进球为主、客、无进球,以及全场比赛中的主赢、客赢、或和局,来进行结算。

  • 共7种选项:

    • 主&主:主队获得指定的进球且最终主队获胜。

    • 主&和:主队获得指定的进球且最终比赛和局。

    • 主&客:主队获得指定的进球且最终客队获胜。

    • 客&主:客队获得指定的进球且最终主队获胜。

    • 客&和:客队获得指定的进球且最终比赛和局。

    • 客&客:客队获得指定的进球且最终客队获胜。

    • 无进球:双方皆未获得指定进球。

半场/全场 + 进球 大/小

  • 预测全场90分钟内,赛事上半场45分钟/全场90分钟的获胜队伍,以及总入球数将大于或小于在盘口指定的大/小盘球数。

  • 根据上半场/全场的获胜队伍,以及全场比赛的总进球数,来进行结算。

半场/全场 + 进球数

  • 预测全场90分钟内,赛事上半场45分钟/全场90分钟的获胜队伍,以及两支队伍的准确进球数量。

  • 根据上半场/全场的获胜队伍,以及全场比赛的总进球数,来进行结算。

其他

特定联赛里主客队的总进球数

本公司在某些联赛里会提供某种结合性赛事结果的投注。盘口的玩法将结合主场与客场球队在整个联赛里的赛果之后分出胜负。中立场的比赛,第一个球队被视为这一场赛事的主队。以下列出所提供的个别替补玩法规则。

在特定联赛中的主队和客队进球数:独赢和双重机会

  • 根据得分的进球数预测所有主队对阵所有客队的结果。 例如,如果主队目标是6颗进球,客队目标是8颗进球,那么获胜的选择将是:

    • ‘客队’ (独赢)

    • ‘客队 / 平局’ 和 ‘主队 / 客队’ (双重机会)。

特定联赛里主客队的总进球数:一般规则

  • 如果联赛中有一场赛事中断或取消,所有特定联赛里主客队的总进球数注单将被取消。

  • 比赛日程以及赛事场次将会明确的在盘口显示。例如:

    • 主队-周五-3场赛事

    • 客队-周五-3场赛事。

特定联赛里主客队的进球数:让球

  • 预测在90分钟完场时间内哪一支球队在结合整个联赛里的赛果后在盘口指定的让球数胜出。


特定联赛里主客队的进球数:进球: 大 / 小

  • 预测主客队的总进球数将大于或小于在盘口指定的大/小盘牌数。

奇幻赛事

奇幻赛事是以2个不同赛事的2场比赛为组合进行结果预测的竞猜游戏。

  • 奇幻赛事的竞猜结果以选定的2场赛事的实际比赛结果为准。

  • 如两场赛事中的任意一场(或两场)被取消、终止或延长后的5个小时内无最终结果,奇幻赛事对应竞猜游戏的结果将以无效处理。

  • 如两场赛事中的任意一场(或两场)进行加时赛或点球大战时,此次竞猜将以正式比赛中的90分钟赛事结果为准。

  • 主客场因素将不作为影响奇幻赛事的影响因素。

  • 奇幻赛事所有内容将遵守以上赛事规则。

电竞足球赛事

  • 比赛将以虚拟或真实玩家对决(PVP)模式开打.

  • 盘口的比赛名称将注明比赛时间(例如:12分钟), 且作为最终结算根据

  • 比赛时间若无注明时,结算将以官方或相关体育权威机构数据结果为准

  • 如果比赛因突发情况重制且分隔时间不超过12小时,投注将根据官方结果进行结算。

  • 主/客场排序将不影响结算。例:赛事注明一队对垒二队,但官方显示二队对垒一队,投注仍视为有效。


`; const RulesAndTermsHTML = `
1. 引言
本条款及条件(以下统称「条款」)以及下文提及的文件,皆适用于本网站(以下统称「网站」)及相关联的服务(以下统称「服务」)。
请您仔细阅读本条款,它包含了您使用网站时的权利和义务,并构成您(以下统称「客户」)与我们之间的法律协议。使用本网站或访问相关服务,无论您是访客还是注册用户(以下统称「账户」),都表示您同意接受本条款及其不定时更新的内容。如果您不同意本条款,请立即停止使用本网站及相关服务。
2. 一般条款
我们保留随时修订和更新条款(包括下文提及的任何文件及其链接)的权利。您应定期访问本页面以查看最新的条款与条件。修订内容将在本网站发布后立即生效,并具有法律约束力。如果您对任何变更有异议,必须立即停止使用服务。若您在修订发布后继续使用本网站,即表示您同意接受修订后的条款。所有在条款变更生效前尚未结算的投注,将依据变更前的条款进行处理。
3. 您的义务
您在访问网站和使用服务时,须遵守以下义务:
3.1. 您已年满18岁,或已达到您所在地法律或司法管辖区所规定的合法赌博年龄。我们保留随时要求您提供年龄证明的权利。
3.2. 您需具备法律行为能力,并能够与我们订立具有法律约束力的协议。如果您不具备该法律行为能力,则不得访问本网站或使用服务。
3.3. 您的居住地需允许合法进行赌博活动,且您并非居住在任何禁止在线赌博的国家或地区。确保使用服务的行为符合当地法律是您的个人责任。
3.4. 您不得使用VPN、代理服务器或其他工具来隐藏或篡改您的真实位置。
3.5. 您必须是您所使用支付方式的合法持有人。
3.6. 您必须诚信地进行所有支付,不得尝试取消已完成的付款或采取任何可能导致第三方取消付款的行为。
3.7. 在下注时,您可能会损失部分或全部已存入的资金,您将对此损失负全部责任。
3.8. 在下注时,您不得使用任何违反所在国家/地区现行法律从而获取的信息。
3.9. 您仅以个人身份进行操作,而非代表他人或出于商业目的。
3.10. 您不得恶意操控服务中的任何盘口或元素,或任何可能损害服务或我们诚信的行为。
3.11. 您在使用服务和进行所有投注时,应始终保持诚信。
3.12. 您或您的员工、雇主、代理人或家庭成员(如适用)不得在我们的合作伙伴计划中注册为合作伙伴。
4. 限制使用
4.1. 您不得在以下情况下使用本服务:
4.1.1. 如果您未满18岁(或未达到您所在司法辖区的法定成年年龄),或者您无法依法与我们订立具有法律效力的协议,或者您代表或代理18岁以下(或未达法定成年年龄)的人行事;
4.1.2. 居住在禁止居民或该国境内任何人访问在线赌博的国家;
4.1.3. 如果您是以下国家的居民,或从以下国家访问我们的网站:
奥地利
法国及其领土
德国
荷兰及其领土
西班牙
科摩罗联盟
英国
美国及其领土
中国
新加坡
阿联酋
所有FATF黑名单国家
安茹安离岸金融管理局认定的任何其他禁止区域
4.1.4 通过任何方式收集其他客户的昵称、电子邮件地址或其他信息(例如,发送垃圾邮件、其他未经请求的电子邮件或未经授权的嵌入链接);
4.1.5 扰乱或不当影响其他客户的活动或本服务的运行;
4.1.6 推广未经请求的商业广告、推广链接及其他形式的营销,这些内容可能会在未经通知的情况下从服务中删除;
4.1.7 以任何方式从事我们合理认为可被视为以下行为的活动:(i) 欺骗本公司或其他客户 (ii) 与其他客户串通以获得不正当优势;
4.1.8 抓取我们的赔率或侵犯我们的知识产权;
4.1.9 从事任何非法活动。
4.2 您不得将账户出售或转让给第三方,也不得从第三方获取账户。
4.3 您不得以任何方式在玩家账户之间转移资金。
4.4 如果您将本服务用于未经授权的其他目的,我们会在书面通知后立即终止您的账户。同时,我们也可能会采取法律行动。
4.5 未经本公司董事或首席执行官事先同意,公司员工、其授权商、分销商、批发商、子公司、广告、促销或其他机构、媒体合作伙伴、承包商、零售商及其直系亲属,皆不得使用本服务进行真钱交易。如果发现这种行为,账户将被立即终止,所有奖金和赢利将被没收。
5. 注册
您同意在使用服务时始终遵守以下规定:
5.1 我们保留拒绝任何申请的权利,且无需说明具体原因。
5.2 在使用服务之前,您必须亲自填写注册表格,并阅读和接受本条款。在本服务上投注或提取奖金时,我们可能要求您完成身份验证,包括通过特定的检验。您可能需要提供有效的身份证明和其他我们认为必要的文件。这可能包括带有照片的身份证明(护照、驾照或身份证复本)以及列有姓名和地址的近期公共事业账单作为住所之证明。在收到所需文件之前,我们保留暂停投注或限制账户功能的权利。此程序是为了符合适用的法规和反洗钱法之要求。此外,您需要使用我们网站上列出的支付方式为账户进行充值。
5.3 您必须提供正确的联系方式,包括有效的电子邮件(「注册的电子邮件地址」),并持续更新相关信息。保持联系信息的正确是您的责任。如果未能及时更新,您可能会错过我们发送的重要账户通知和信息,这包括条款的变更项目。我们通过您注册时的电子邮件与您联系,您需维护一个有效的电子邮件账户,并在更改电子邮件时,及时通知我们。每位客户都必须确保其电子邮件的安全,防止第三方未经授权使用。本公司不对因与您电子邮件进行的联系,而造成的任何损害或损失负责。如果您没有提供有效的电子邮件地址,您的账户将被暂停,直到您提供有效的电子邮件地址。如果您故意提供虚假或不正确的个人信息,我们将在书面通知后立即暂停您的账户。在某些情况下,我们也可能对您采取法律行动,或者联系相关部门处理。
5.4 您只能注册一个账户。如果发现您注册了多个账户,我们将立即关闭这些账户,这包括通过代表、亲属、关联方、合作伙伴、相关方或第三方操作的账户。
5.5 为了确保您的财务状况和确认您的身份,我们可能会要求您提供额外的个人信息,例如您的姓名,或者使用我们认为必要的第三方所提供的信息。如果通过第三方而获取了任何额外的个人信息,我们将告知您所获得的相关信息。
5.6 您必须保密您的密码。只要账户信息皆正确,我们有权假设投注、存款和提款皆是由您操作的。我们建议您定期更改密码,并且不要将密码透露给任何第三人。保护密码是您的责任,未能做到这一点将由您自行承担风险和损失。您可以在每次会话结束时登出。如果您认为您的账户信息被第三方滥用、账户被黑客入侵,或密码被第三方发现,您必须立即通知我们。如果您的注册电子邮件被黑客入侵,我们也可能要求您提供额外的信息或文件以验证身份。一旦我们发现这种情况,将立即暂停您的账户。在此期间,您需要对账户上的所有活动负责,包括第三方的访问,无论这些访问是否经过您的授权。
5.7 您不得通过屏幕截图或其他类似方式将服务上的任何内容或信息传输给其他客户或任何其他方,也不得以浏览器中输入网址的方式展示这些信息。
5.8 注册时,您可以使用网站上所有可用的货币。这些货币将用于您的存款、提款和投注。某些支付方式可能不支持所有货币。在这种情况下,页面上会显示可用货币,并提供转换计算器。
5.9 我们没有义务为您开设账户,我们的网站注册页面仅为邀请。是否为您开设账户完全由我们决定。如果我们决定拒绝您的开户申请,我们不需要说明理由。
5.10 在收到您的申请后,我们可能会联系您,要求提供进一步的信息或文件,以便我们遵守相关的监管和法律义务。
6. 您的账户
6.1 账户可以使用多种货币,所有账户余额和交易过程,将以先前交易时所使用的货币显示。
6.2 我们不提供信用额度。
6.3 如果您未能遵守本条款,或我们合理地认为您没有遵守本条款,或为了确保服务的完整性或公平性,或有其他合理原因,我们可能在不提前通知您的情況下,关闭或暂停您的账户。如果因未遵守条款而关闭或暂停您的账户,我们有权取消或作废您的任何投注,并扣留账户中的所有资金(包括存款)。
6.4 我们保留在没有提前通知的情况下,关闭或暂停任何账户的权利,并退还账户中的所有资金。然而,已到期的义务仍需履行。
6.5 我们保留随时拒绝、限制、取消任何投注的权利,无论出于何种原因,包括任何被认为是以欺诈方式进行的投注,以及为规避我们的投注限制或系统规定的相关投注。
6.6 如果您的账户中错误地记入了金额,该金额为我们的财产。一旦发现此类错误,我们将通知您,并从您的账户中扣回该金额。
6.7 如果您的账户因任何原因透支,您必须对透支的金额负责偿还。
6.8 一旦发现账户存在任何错误,您必须立即通知我们。
6.9 请时常记住,投注应仅为娱乐和乐趣,若不再感到有趣,请立即停止。切勿投注超出您所能承受范围的金额。如果您觉得自己可能失去了对投注的控制,我们提供自我排除服务。只需使用您的电子邮件向我们的客户服务部门发送请求,将在收到请求后的24小时内生效。在此期间,您的账户将被禁用,您将无法登录。
6.10 您不能将账户转让、出售或质押给他人。此包括所有形式的资产转让,如账户所有权、奖金、存款、投注以及与这些资产相关的权利或索赔,无论是法律、商业还是其他方面的。此还包括但不限于质押、转让、赋予使用权、交易、经纪、抵押以及与任何受托人或其他第三方、公司、自然人或法人、基金会或协会以任何形式的合作。
6.11 如果您希望关闭账户,请通过我们网站上的链接,从您的注册电子邮件地址向我们的客户服务部门发送电子邮件。
7. 存款
7.1 所有存款都应通过以您本人名义注册的账户、支付系统或信用卡进行。任何以其他货币进行的存款,将使用oanda.com提供的每日汇率,或我们银行及支付处理方的汇率进行兑换,相应金额会存入您的账户。请注意,某些支付系统可能会收取额外的货币兑换费用,这些费用将从您的存款中扣除。
7.2 客户存款和提款可能会收取费用和手续费,详情可在网站上查看。在大多数情况下,我们会承担您向F1bet.cc账户存款时的交易费用。然而您需自行承担因存款所产生的银行费用。
7.3 本公司不是金融机构,我们使用第三方电子支付来处理信用卡和借记卡存款;这些存款不由我们直接处理。如果您使用信用卡或借记卡存款,您的账户只有在我们从发卡机构收到批准和授权后才会入账。如果发卡机构未提供授权,您的账户将不能存款。
7.4 您同意全额支付因使用服务,而产生的任何费用,无论是支付给我们还是给提供商。您也同意不进行任何退款、撤销或其他方式的存款退款。如果发生这些情况,您将补偿我们未支付的存款金额,包括我们在处理存款过程中产生的费用,并且您也同意任何使用这些退款资金进行的投注中奖将被取消。您同意您的玩家账户不是银行账户,因此不受任何存款或银行保险系统或其他类似保险系统的保障,包括但不限于您所在司法管辖区。此外,玩家账户中的资金不会产生利息。
7.5 如果您决定接受我们提供的任何促销或奖金优惠,并在存款时输入代码,即表示您同意相关的奖金条款和每个特定的条款。
7.6 您的资金来源必须合法,不得来自犯罪、非法或未经授权的活动。
7.7 如果您使用信用卡进行存款,建议保留交易记录的副本和本条款的副本。
7.8 在线赌博可能在您所在的司法管辖区是非法的;如果是非法的,您无权使用您的支付卡在本站进行存款。请确保了解您所在国家/地区有关在线赌博的法律。
8. 提款
8.1 您可以通过提交提款申请,来提取账户中未使用且已结算的资金,前提是符合我们的提款条件。每次交易的最低提款金额为10欧元(或等值其他货币),若账户关闭时,您可以提取全部余额。
8.2 如果您的存款已进行投注至少1次,则不会被收取提款手续费。否则,我们有权收取8%的手续费,最低为4欧元(或等值的其他货币),以防止洗钱行为。
8.3 在批准提款之前,我们可能会要求您提供身份证明照片、地址确认,或进行其他验证程序(如请求自拍、安排电话验证等)。我们也保留在您与我们合作期间随时进行身份验证的权利。
8.4 所有提款必须退回到最初用于存款的借记卡、信用卡、银行账户或支付方式。我们可能会根据情况允许您将提款退回到其他支付方式,但这会进行额外的安全检查。
8.5 如果您希望提款,但账户无法访问、处于闲置状态、被锁定或已关闭,请联系客户服务部门。
8.6 如果您的余额是总存款的10倍以上,每月的提款上限为5000欧元(或等值的其他货币)。在其他情况下,每月的最大提款金额为10000欧元。
8.7 请注意,如果您违反了第3.3条和第4条中的限制使用政策,我们无法保证能成功提款或退款。
9. 付款交易
9.1 您对所有应付金额负全责。您必须诚信地支付,不得尝试撤销已支付款项或采取任何措施使第三方撤销该款项,以规避合法的债务。您需赔偿因退单、拒付或付款撤销给我们带来的任何损失。我们有权对每笔退单、拒付或付款撤销收取50欧元(或等值货币)的费用。
9.2 我们保留使用第三方电子支付处理器或商户银行处理您的付款的权利。您同意遵守这些第三方的条款和条件,但前提是本条款已通知您且不与本条款冲突。
9.3 我们网站上的所有交易将可能会被检查,以防止洗钱或恐怖主义融资活动。可疑交易将会报告给相关部门。
10. 错误
10.1 如果我们的系统或流程出现错误或故障,所有相关投注将被作废。您有责任在发现服务出现任何错误时立即通知我们。如果服务或与服务相关的付款过程中发生通信错误、系统故障或病毒,我们不对由此产生的任何直接或间接费用、损失或索赔负责,并保留取消所有相关游戏或投注的权利,以纠正错误。
10.2 我们会尽力确保盘口信息准确无误。然而,如果因人为错误或系统问题,投注赔率与当时市场上的赔率存在明显差异,或赔率与赛事发生的概率不符,我们有权取消该投注或撤销赛事开始后的投注。
10.3 我们有权追回任何超额支付的金额,并调整您的账户以纠正错误。例如,如果价格不正确或我们错误地输入了赛事结果,我们可能会采取行动。如果您的账户余额不足,我们可以要求您支付与任何错误投注相关的未支付金额。因此,我们保留取消、减少或删除任何待处理投注的权利,无论这些投注是否使用了因错误而产生的资金。
11. 游戏规则、退款和取消
11.1 赛事的赢家将于赛事结算当天确定,我们不接受针对投注结果的抗议或更改请求。
11.2 所有公布的结果在72小时后将被视为最终结果,过后不再受理任何查询。在结果公布后的72小时内,我们仅会因人为错误、系统故障或引用错误而进行重置或更正。
11.3 如果在支付期间内,赛事结果因任何原因被赛事管理机构推翻,我们将全额退还所有资金。
11.4 如果比赛有平局选项,所有关于球队胜负的投注将作废。如果没有平局选项,则在比赛平局的情况下,所有投注将全额退款。如果比赛没有平局选项,加时赛结果将计入最终结果。
11.5 如果我们无法验证结果,例如赛事的直播源中断(且无法通过其他来源确认),则相关投注将被我们视为无效,并予以退款。
11.6 我们将设定每场赛事的最低和最高投注金额,并可随时调整,无需提前书面通知。我们也保留调整账户投注限额的权利。
11.7 客户对其账户交易负全责。一旦交易完成,无法更改。我们不对客户遗漏或重复的投注负责,也不会处理因投注遗漏或重复而提出的差异请求。客户可以在每次会话后查看「我的账户」部分的交易记录,以确保所有请求的投注已被接受。
11.8 比赛的有效性以参赛队伍为准,与网站上显示的联赛标题无关。
11.9 网站上显示的电子竞技赛事开始日期和时间仅供参考,不保证准确。如果赛事被暂停或推迟,且在实际安排的开始时间后的72小时内未恢复,则该赛事将视为无效,投注将退款。唯一例外是关于球队/玩家是否晋级或赢得锦标赛的投注,将继续有效,无论赛事是否暂停或推迟。
11.10 如果我们发布的赛事日期不正确,则所有投注将以赛事管理机构宣布的日期为准。
11.11 如果球队使用了替补队员,结果仍然有效,因为这是球队的选择。
11.12 我们保留从网站上删除赛事、市场和其他产品的权利。
11.13 关于我们体育博彩规则的详细说明,请参阅单独的页面:体育博彩规则。
12. 通讯和通知
12.1 您向我们发送的所有通讯和通知应通过网站上的客户支持表单提交。
12.2 我们向您发送的所有通讯和通知,除非另有说明,将通过网站发布或发送至我们系统中记录的注册邮箱地址。我们将决定使用哪种方式进行通讯。
12.3 您或我们在本条款下进行的所有通讯和通知均应以书面形式、英语发送,并且必须使用您账户中的注册邮箱地址。
12.4 我们可能会不时通过电子邮件联系您,提供有关博彩、特别促销优惠以及其他来自F1bet.cc的信息。您在注册网站时同意本条款时即表示同意接收此类电子邮件。您可以随时通过提交请求给客户服务部门选择退订此类促销信息。
13. 超出我们控制范围的事项
对于因不可抗力事件导致的服务失败或延迟,我们不会承担责任,即使我们采取了合理的预防措施,如:自然灾害、贸易或劳工纠纷、停电、政府或权威机构的行为、通讯服务的中断或故障,或其他由第三方造成的延迟或故障。在这些情况下,我们不对您可能遭受的任何损失或损害负责。我们保留取消或暂停服务的权利,而不承担任何责任。
14. 责任
14.1 在法律允许的范围内,我们不对因未能履行本条款而导致的任何可预见的损失或损害(包括直接或间接损失)承担责任,除非我们违反法律规定的义务(如因疏忽导致死亡或人身伤害)。我们不对以下情况造成的损失承担责任:(I) 您自身的过错;(II) 与我们履行本条款无关的第三方因素(如通讯网络问题、拥堵、连接问题或您设备的性能问题);或 (III) 我们或我们的供应商无法预见或防范的其他事件,即使我们或他们采取了合理的预防措施。由于本服务仅供个人使用,我们不承担任何商业损失的责任。
14.2 如果我们需要对某个事件负责,我们的总赔偿金额不会超过以下两者中的较低者:(A) 您通过账户对该投注或产品的投入金额,或 (B) 总计 €500。
14.3 我们强烈建议您 (I) 在使用服务前检查其与您计算机设备的适用性和兼容性;以及 (II) 采取合理的措施保护自己免受有害程序或设备的影响,包括安装防病毒软件。
15. 未成年赌博
15.1. 如果我们怀疑您目前未满18岁,或收到通知您在进行任何投注时未满18岁(或未达到适用法律规定的成年年龄),我们将暂停(锁定)您的账户,防止您继续投注或提取资金。我们将对此进行调查,包括是否有人未满18岁(或未达到适用法律规定的成年年龄)而通过您进行投注。如果我们发现您:(a)目前;(b)在相关时点未满18岁或未达到适用的成年年龄;或(c)作为未满18岁的人进行投注,则:
  • 您账户中当前或应当记入的所有奖金将被保留;
  • 您在未成年人时通过服务获得的奖金必须按要求支付给我们(如果您未遵守此规定,我们将追讨所有相关费用);
  • 账户中未中奖的任何存款将退还给您,或根据我们的决定保留至您年满18岁为止。我们有权从退还金额中扣除交易费用,包括存款的手续费。
15.2. 如果您年满18岁,但在法律规定的合法投注年龄高于18岁的管辖区内进行投注,并且您的年龄低于该法律规定的最低年龄,本条款同样适用。
15.3. 如果我们怀疑您违反了本条款的规定或试图利用本条款进行欺诈目的,我们保留采取必要行动调查此事的权利,包括通知相关执法机关。
16. 欺诈行为
我们将对任何涉及欺诈、不诚实行为或犯罪行为的客户采取法律和合同制裁措施。如果我们怀疑存在上述行为,我们将暂停该客户的付款。客户需赔偿并在要求时支付我们因客户的欺诈、不诚实或犯罪行为所产生的所有费用和损失(包括直接、间接或后果性损失、利润损失、业务损失以及声誉损失)。
17. 知识产权
17.1. 未经授权使用我们的名称和标志可能会导致法律诉讼。
17.2. 我们拥有服务、技术、软件和业务系统(以下统称「系统」)以及赔率的所有权。您不得将个人资料用于商业盈利(例如,将您的状态更新出售给广告商);我们也保留在必要时删除或回收账户昵称的权利。
17.3. 您不得在与我们无关的产品或服务中使用我们的网址、商标、商业名称或商业外观、标志(以下统称「标志」),也不能使用我们的赔率,这可能会导致客户或公众混淆,或以任何方式贬低我们。
17.4. 除非本条款中明确规定,否则我们及我们的许可方不授予您任何明示或隐含的权利、许可、所有权或对系统或标志的利益,所有这些权利、许可、所有权和利益均由我们及我们的许可方保留。您同意不使用任何自动或手动设备监控或复制服务中的网页或内容。任何未经授权的使用或复制可能会导致法律诉讼。
18. 您的许可
18.1. 根据本条款以及您的遵守情况,我们授予您一个非独占的、有限的、不可转让和不可再许可的许可,仅用于个人非商业用途访问和使用服务。如果我们与您之间的协议终止,您的许可也将终止。
18.2. 除了您自己的内容外,您不得在任何情况下修改、发布、传输、转让、销售、复制、上传、发布、分发、演示、展示、创作衍生作品或以其他任何方式利用服务或其上的任何内容或其中的软件,除非我们在本条款中或网站上明确允许。服务中的信息或内容,或与服务相关的信息或内容,不能被修改、改变、与其他数据合并或以任何形式发布,例如屏幕抓取、数据库抓取或其他旨在收集、存储、重组或操作这些信息或内容的活动。
18.3. 如果您违反本条款,可能会侵犯我们或第三方的知识产权和其他专有权利,您可能因此面临民事责任或刑事起诉。
19. 您的行为与安全
19.1. 为了保护您和所有客户的安全,我们禁止在服务中发布任何违法、不当或令人不悦的内容,以及与此相关的任何行为(以下统称「禁止行为」)。
19.2. 如果我们发现您从事了禁止行为,或有理由认为您可能在进行禁止行为,我们可以在不提前通知您的情況下,立即终止您的账户或服务访问权。此外,其他客户、第三方、执法机构或我们可能会对您采取法律行动。
19.3. 禁止行为包括但不限于:
传播您明知是虚假、误导性或非法的信息;
从事任何违法活动,例如推动犯罪活动,侵犯其他客户或第三方的隐私或权利,或创建和传播计算机病毒;
以任何方式伤害未成年人;
传输或提供任何非法、有害、威胁、辱骂、诽谤、粗俗、猥亵、暴力、仇恨、种族歧视或其他令人反感的内容;
传输或提供您没有法律或合同权利分享的内容,例如侵犯他人版权、商标或其他知识产权的内容;
传输或提供含有软件病毒或其他恶意代码的内容,旨在破坏服务、其他网站、软件或硬件的正常功能;
以任何方式干扰、破坏或逆向工程服务,包括但不限于拦截、模拟或重定向我们使用的通信协议,创建或使用作弊工具、修改工具或黑客软件,或使用任何拦截或收集服务信息的软件;
使用机器人、爬虫或其他自动化机制从服务中检索或索引信息;
参与任何可能导致其他客户被骗或受害的活动;
传输或提供任何未经请求或未经授权的广告或群发邮件,例如垃圾邮件(「spam」)、即时消息(「spim」)、连锁信、金字塔计划或其他形式的招揽;
通过自动化手段或虚假或欺诈性借口在网站上创建账户;
冒充其他客户或任何其他第三方;
或任何我们合理认为违反商业原则的行为。
上述禁止行为的列表并不全面,可能会随时更新。我们保留采取任何我们认为合适或必要的措施的权利,包括删除客户的帖子或终止账户。对于直接或间接涉及禁止行为的客户或第三方,我们会采取必要的行动,是否通知相关客户或第三方,由我们自行决定。
20. 链接到其他网站
我们的服务可能会包含指向第三方网站的链接,这些网站不由我们维护,也与我们无关。提供这些链接仅为方便客户,我们不会对这些网站的准确性或完整性进行审查、监控或检查。链接的提供并不意味着我们对这些网站、其内容或其所有者的认可或关联。我们对这些网站的可用性、准确性、完整性、可访问性和实用性不承担任何责任。因此,在访问这些网站时,建议您采取必要的预防措施,比如查看它们的隐私政策和使用条款。
21. 投诉
21.1. 如果您对本条款有任何疑问或问题,请通过网站上的链接联系客户服务,并使用您注册的邮箱进行沟通。
21.2. 尽管有上述规定,我们对收到的任何投诉或相关行动不承担任何责任。
21.3. 如果客户对投注结果处理不满意,请向客户服务部门提供详细的投诉信息。我们会尽可能在几天内回应您的查询,最迟在28天内作出回复。
21.4. 所有争议必须在相关投注决定日期后的三(3)天内提出。期将不再受理任何索赔。客户对其账户交易负有全部责任。
21.5. 如果您与我们之间发生争议,我们的客户服务部门将尝试协商解决。若无法达成一致,我们将把问题提交给管理层处理。
21.6. 如果所有解决争议的尝试仍未能让客户满意,客户有权通过仲裁解决争议。
22. 转让
未经我们事先书面同意,您不得转让本条款或其下的任何权利或义务。我们可在无需您同意的情况下,将本条款下的全部或部分权利和义务,转让给任何第三方,只要该第三方能够提供与服务质量基本相同的服务,并在服务上发布相关书面通知。
23. 可分割性
如果本条款的任何规定被有权机构认定为不可执行或无效,该条款应根据适用法律在最大可能范围内进行修改,以尽可能反映其原始意图。其余条款的有效性和可执行性将不受影响。
24. 违反条款
在不影响我们采取其他补救措施的情况下,如果我们合理地判断您违反了本条款的任何重要规定,我们可以在不提前通知您的情況下,暂停或终止您的账户,并拒绝继续为您提供服务。不过,我们会在措施采取后及时通知您。
25. 一般条款
25.1. 协议期限。 在您访问或使用服务,或作为网站客户或访客期间,本条款将始终有效。即使您的账户因任何原因被终止,本条款仍然适用。
25.2. 性别。 单数词包括复数形式,反之亦然;男性词包括女性和中性词,反之亦然;而涉及「人」的词语包括个人、合伙企业、协会、信托、非法人组织和公司。
25.3. 权利放弃。 我们对您违反或威胁违反本条款的宽容,只有在书面形式且由我们正式签署的情况下才有效,否则不对我们产生约束力,并且仅限于具体的违约行为。即使我们未能在某一时间时候执行本条款中的权利,也不应被视为对该条款的放弃,也不影响我们在其他时间执行该条款的权利。
25.4. 确认。 使用本服务即表示您已阅读、理解并同意本条款的所有内容。因此,您无法对本条款提出任何异议或要求,也无法在未来的诉讼或主张反对本条款。
25.5. 语言。 若本条款的英文版与其他语言版本存在不一致,以英文版本为准。
25.6. 适用法律。 本条款由科摩罗联盟安茹安州的现行法律专属管辖。
25.7. 完整协议。 本条款构成您与我们之间关于访问和使用服务的完整协议,并取代此前任何口头或书面的协议。
`; const AboutHTML = `

关于我们

F1bet 是亚洲值得信赖的在线赌博网站,自从正式投入服务至今最完整和最新的在线赌博游戏。 F1bet有一个简单的使命和愿景是提供诚实和信任的服务。

为什么选择F1bet

作为初学者,您肯定会问,为什么要加入F1bet在线赌博?
你应该知道,技术的发展得非常迅速。 与其它竞争对手相比,F1bet 一直是拥有最新和最先进软件的网站之一,所展示的所有游戏都非常适合所有类型的小工具、台式机和 PC。 您只需要连接互联网即可享受游戏。

最佳市场

我们致力于为您提供最佳的市场赔率,并为您提供最新的市场信息和准确的比赛结果。
F1bet 拥有亚洲最高赔率的足球市场,每月平均提供超过 10,000 场滚球投注的现场比赛。

游戏产品

我们为您提供各种游戏产品。 除了街头足球投注和固定投注市场,我们还提供真人娱乐场、老虎机游戏,这些游戏同样有趣。 同时,我们也不断改进和添加更优质的产品,为您提供最佳的在线赌博娱乐体验。
我们通过提供令人兴奋的新增功能不断提高我们产品的质量,以确保我们只为您提供最好的在线娱乐。

交易方式安全多样化

我们拥有最便捷可靠的支付系统,确保您资金的安全和舒心,我们根据您的需求提供快速、简单、安全的各种类型的存取款,根据您的需求提供安全的存取款。
请访问我们的银行帮助页面,了解有关存款和取款方法的更多信息。

客户服务

• 客户永远是第一位的
• 我们将收集您的所有批评和建议
• 您的满意是我们的目标
24小时客服:访问“在线聊天”联系我们的客服。

`; function omit(obj, keys) { const result = { ...obj }; for (let i = 0; i < keys.length; i++) { const key = keys[i]; delete result[key]; } return result; } const useRichViewStore = defineStore( "rich-view", () => { const content = vue.ref(""); return { content }; }, { persist: true } ); function useRichView() { const router2 = useRouter(); const richViewStore = useRichViewStore(); function open2(props) { richViewStore.content = props.content; router2.push({ path: "/rich-view", query: omit(props, ["content"]) }); } return { open: open2 }; } const _imports_0$4 = "/static/images/qianm.png"; const _imports_1$1 = "/static/images/footer/avatar.png"; const _imports_2$1 = "/static/images/footer/h2.png"; const _imports_3$1 = "/static/images/footer/saiche.png"; const _imports_4$2 = "/static/images/footer/pt/Subtract-1.png"; const _imports_5$1 = "/static/images/footer/pt/Social Icons.png"; const _imports_6$1 = "/static/images/footer/pt/Subtract-2.png"; const _imports_7 = "/static/images/footer/pt/Subtract.png"; const _imports_8 = "/static/images/footer/a.png"; const _imports_9 = "/static/images/footer/b.png"; const _imports_10 = "/static/images/footer/c.png"; const _imports_11 = "/static/images/footer/d.png"; const _imports_12 = "/static/images/layout/logo.png"; const _sfc_main$15 = { __name: "index", props: ["notBg"], setup(__props, { expose: __expose }) { __expose(); const router2 = useRouter(); const richView = useRichView(); const { t: t2 } = useI18n(); function GameRules() { richView.open({ title: uni.$t("玩法规则"), content: GameRulesHTML }); } function RulesAndTerms() { richView.open({ title: uni.$t("规则条款"), content: RulesAndTermsHTML }); } function About() { richView.open({ title: uni.$t("关于我们"), content: AboutHTML }); } function goService() { if (uni.getStorageSync("token")) { uni.navigateTo({ url: "/pages/common/customerService/index" }); } else { if (!uni.getStorageSync("youke_token")) { userGuestRegister().then((res) => { uni.setStorageSync("youke_token", res.data.token); router2.push({ name: "customerService", query: { GuestMode: 1 } }); }); } else { router2.push({ name: "customerService", query: { GuestMode: 1 } }); } } } const __returned__ = { router: router2, richView, t: t2, GameRules, RulesAndTerms, About, goService, get useI18n() { return useI18n; }, get GameRulesHTML() { return GameRulesHTML; }, get RulesAndTermsHTML() { return RulesAndTermsHTML; }, get AboutHTML() { return AboutHTML; }, get userGuestRegister() { return userGuestRegister; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["site-footer", [!$props.notBg ? "notbg-site-footer" : ""]]) }, [ vue.createElementVNode("view", { class: "footer-partners" }, [ vue.createCommentVNode(" 品牌大使 "), vue.createElementVNode("view", { class: "partner-group ambassador-group" }, [ vue.createElementVNode( "view", { class: "footer-title" }, vue.toDisplayString($setup.t("品牌大使")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "ambassador-content" }, [ vue.createElementVNode("view", { class: "ambassador-item" }, [ vue.createElementVNode("view", { class: "ambassador-info" }, [ vue.createElementVNode( "text", { class: "name" }, vue.toDisplayString($setup.t("塞巴斯蒂安·维特尔")), 1 /* TEXT */ ), vue.createCommentVNode(' 增加 mode="widthFix" 防止高度拉伸 '), vue.createElementVNode("image", { src: _imports_0$4, alt: "Signature", class: "signature", mode: "widthFix" }) ]), vue.createElementVNode("image", { src: _imports_1$1, style: { "width": "80px", "height": "80px" } }) ]) ]) ]), vue.createCommentVNode(" 官方合作伙伴 "), vue.createElementVNode("view", { class: "partner-group" }, [ vue.createElementVNode( "view", { class: "footer-title" }, vue.toDisplayString($setup.t("官方合作伙伴")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "partner-logos", style: { "display": "flex", "justify-content": "space-between", "align-items": "center" } }, [ vue.createElementVNode("view", { class: "nav-links" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode("image", { src: _imports_2$1, class: "partner-logo", alt: "Mclaren" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("迈凯伦")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("image", { src: _imports_3$1, style: { "width": "80px", "height": "80px" } }) ]) ]), vue.createCommentVNode(" 帮助中心 "), vue.createElementVNode("view", { class: "partner-group" }, [ vue.createElementVNode( "view", { class: "footer-title" }, vue.toDisplayString($setup.t("帮助")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "nav-links" }, [ vue.createElementVNode( "view", { onClick: $setup.goService }, "7x24" + vue.toDisplayString($setup.t("客服")), 1 /* TEXT */ ), vue.createElementVNode( "view", { onClick: $setup.GameRules }, vue.toDisplayString($setup.t("玩法规则")), 1 /* TEXT */ ), vue.createElementVNode( "view", { onClick: $setup.RulesAndTerms }, vue.toDisplayString($setup.t("规则条款")), 1 /* TEXT */ ), vue.createElementVNode( "view", { onClick: $setup.About }, vue.toDisplayString($setup.t("关于我们")), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 快速链接 "), vue.createCommentVNode(` \r {{ t('快速链接') }}\r \r {{ t('体育赛事') }}\r {{ t('滚球投注') }}\r {{ t('彩票娱乐') }}\r \r `), vue.createCommentVNode(" 社交平台 "), vue.createElementVNode("view", { class: "partner-group" }, [ vue.createElementVNode( "view", { class: "footer-title" }, vue.toDisplayString($setup.t("社交平台")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "nav-links social-links" }, [ vue.createElementVNode("view", { class: "nav-links-pt" }, [ vue.createCommentVNode(' 增加 mode="widthFix" 或在下方 css 中限制 height '), vue.createElementVNode("image", { src: _imports_4$2, alt: "Social", mode: "widthFix" }), vue.createElementVNode("image", { src: _imports_5$1, alt: "Social", mode: "widthFix" }), vue.createElementVNode("image", { src: _imports_6$1, alt: "Social", mode: "widthFix" }), vue.createElementVNode("image", { src: _imports_7, alt: "Social", mode: "widthFix" }) ]), vue.createCommentVNode(' \r\n\r\n ') ]) ]), vue.createElementVNode("view", { class: "partner-group" }, [ vue.createElementVNode( "view", { class: "footer-title" }, vue.toDisplayString($setup.t("责任与权誉")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "compliance-logos partner-group-imgs" }, [ vue.createCommentVNode(' 增加 mode="widthFix" '), vue.createElementVNode("image", { src: _imports_8, alt: "Compliance", mode: "widthFix" }), vue.createElementVNode("image", { src: _imports_9, alt: "Compliance", mode: "widthFix" }), vue.createElementVNode("image", { src: _imports_10, alt: "Compliance", mode: "widthFix" }), vue.createElementVNode("image", { src: _imports_11, alt: "Compliance", mode: "widthFix" }) ]) ]), vue.createCommentVNode(" 下载APP "), vue.createCommentVNode(` \r {{ t('下载APP') }}\r \r \r \r Social\r Social\r \r \r \r `) ]), vue.createCommentVNode(" 关于我们 "), vue.createElementVNode( "view", { class: "footer-title" }, vue.toDisplayString($setup.t("关于我们")), 1 /* TEXT */ ), vue.createCommentVNode(' 增加 mode="widthFix" '), vue.createElementVNode("image", { src: _imports_12, alt: "Logo", class: "footer-logo", mode: "widthFix" }), vue.createElementVNode("view", { class: "footer-about" }, [ vue.createElementVNode( "view", null, vue.toDisplayString($setup.t("F1bet 是亚洲值得信赖的在线赌博网站,自从正式投入服务至今最完整和最新的在线赌博游戏。 F1bet有一个简单的使命和愿景是提供诚实和信任的服务。在近期与Mclaren、塞巴斯蒂安·维特尔 达成赞助伙伴协议,进一步加深了“F1bet”的国际知名度,让平台的名声遍布全球。")), 1 /* TEXT */ ), vue.createElementVNode( "view", null, vue.toDisplayString($setup.t("为了提升用户体验,使用本网站后,我们可能使用Cookies技术从服务器中收集客户信息。如果您在F1bet注册或者继续使用网站,则您将被视为同意我们使用Cookies。")), 1 /* TEXT */ ), vue.createElementVNode( "view", null, vue.toDisplayString($setup.t("如果删除我们的Cookies或禁用我们之后的Cookies,将导致您无法使用平台的某些区域或特色功能。")), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 合规与版权 "), vue.createElementVNode("view", { class: "footer-compliance" }, [ vue.createElementVNode("view", { class: "copyright-text" }, [ vue.createElementVNode( "view", null, vue.toDisplayString($setup.t("© 2015 - 2026 版权所有并受法律保护。")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "disclaimer" }, vue.toDisplayString($setup.t("本平台仅向18岁以上成人提供娱乐服务,请理性投注,谨防沉迷。")), 1 /* TEXT */ ) ]) ]) ], 2 /* CLASS */ ); } const appFooter = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-e83d1d1b"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/components/appFooter/index.vue"]]); const _sfc_main$14 = { __name: "list", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const router2 = useRouter(); const locale = getLocale(); const gameList = [ { name: "PC28", imgName: "pc28", route: { name: "PC28" } }, { name: "极速28", imgName: "ExtremeSpeed28", route: { name: "ExtremeSpeed28" } }, { name: "澳门六合彩", imgName: "MacauMarkSix", route: { name: "Digital" } }, { name: "新澳门六合彩", imgName: "NewMacauMarkSix", route: { name: "NewDigital" } }, { name: "极速六合彩", imgName: "ExtremeSpeedMarkSix", route: { name: "SpeedDigital" } }, { name: "香港六合彩", imgName: "HongKongMarkSix", route: { name: "HKDigital" } } ]; const getImagePath = (baseName) => { let suffix = ""; if (locale === "en") { suffix = "_en"; } else if (locale === "vi") { suffix = "_vi"; } return `/static/images/${baseName}${suffix}.png`; }; const goToGame = (routeObj) => { if (routeObj) { router2.push(routeObj); } }; const __returned__ = { t: t2, router: router2, locale, gameList, getImagePath, goToGame, get useI18n() { return useI18n; }, get getLocale() { return getLocale; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return vue.openBlock(), vue.createElementBlock("view", { class: "entertainment-list" }, [ vue.createElementVNode("view", { class: "game-grid" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameList, (game, index) => { return vue.createElementVNode("view", { class: "game-card", key: index, onClick: ($event) => $setup.goToGame(game.route) }, [ vue.createElementVNode("view", { class: "image-wrapper" }, [ vue.createElementVNode("image", { src: $setup.getImagePath(game.imgName), class: "game-cover" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "hover-overlay" }, [ vue.createElementVNode("view", { class: "play-btn" }, [ vue.createVNode(_component_u_icon, { name: "play-right-fill", size: "28", color: "#000", class: "mr-1" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("立即进入")), 1 /* TEXT */ ) ]) ]) ]) ], 8, ["onClick"]); }), 64 /* STABLE_FRAGMENT */ )) ]) ]); } const list = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-db20a734"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/components/list.vue"]]); const block0$1 = (Comp) => { (Comp.$renderjs || (Comp.$renderjs = [])).push("h5Video"); (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["h5Video"] = "2d61c7cf"; }; const _sfc_main$13 = { __name: "index", setup(__props, { expose: __expose }) { const { t: t2, locale } = useI18n(); const router2 = useRouter(); const route2 = useRoute(); const orderStore = useOrderStore(); const WebsocketData = useWebsocketDataStore(); const pagingRef = vue.ref(null); const PermanentURL = vue.ref("F1bet.cc"); const videoSrc = vue.ref(""); const playTrigger = vue.ref(0); const isPaused = vue.ref(false); const videoLoaded = vue.ref(false); const onVideoLoaded = () => { videoLoaded.value = true; }; __expose({ onVideoLoaded }); vue.onMounted(() => { videoSrc.value = plus.io.convertLocalFileSystemURL("_www/static/video/home.mp4"); }); const toggleVideo = () => { isPaused.value = !isPaused.value; }; const banners1 = vue.ref([]); const banners2 = vue.ref([]); const sportList = vue.ref([]); const sportCount = vue.ref(0); const gamblingList = vue.ref([]); const gamblingCount = vue.ref(0); const limit = vue.ref(10); const selectedMap = vue.ref({}); const skeletonLoading = vue.ref(true); function handleSwiper(item) { router2.push({ name: "promotionDetail", query: { id: banners2.value[item].link } }); } const oddsChangeMap = vue.ref(/* @__PURE__ */ new Map()); const getOddsKey = (matchId, marketId, selection) => { if (selection.handicap !== null && selection.handicap !== void 0 && selection.handicap !== "") { return `${matchId}_${marketId}_${selection.value}_${selection.handicap}`; } return `${matchId}_${marketId}_${selection.value}`; }; const isOddsUp = (key) => { const change = oddsChangeMap.value.get(key); return (change == null ? void 0 : change.direction) === "up" && Date.now() - change.timestamp < 3e3; }; const isOddsDown = (key) => { const change = oddsChangeMap.value.get(key); return (change == null ? void 0 : change.direction) === "down" && Date.now() - change.timestamp < 3e3; }; const getVisibleValues = (values) => { if (!values) return []; if (values.length <= 3) return values; return values.slice(0, 2); }; const hasMore = (values) => { if (!values) return false; return values.length > 3; }; const getRemainCount = (values) => { if (!values) return 0; return values.length - 2; }; const getUniqueKey = (matchId, marketId, selection) => { if (selection.handicap !== null && selection.handicap !== void 0 && selection.handicap !== "") { return `${matchId}_${marketId}_${selection.value}_${selection.handicap}`; } return `${matchId}_${marketId}_${selection.value}`; }; const checkIsLocked = (item) => { if (!item) return true; if (Number(item.is_locked) === 1) return true; if (item.status !== void 0 && Number(item.status) !== 1) return true; if (item.state !== void 0) { const state = Number(item.state); if (state !== 0 && state !== 1) return true; } return false; }; const isOptionLocked = (item, opt) => { if (checkIsLocked(item)) return true; if (!opt) return true; if (!opt.odd || opt.odd === "-" || Number(opt.odd) === 0) return true; if (opt.suspended === true || String(opt.suspended).toLowerCase() === "true") return true; if (item.odds && item.odds[0] && item.odds[0].is_findLocked) return true; return false; }; const syncFromStore = () => { const map = {}; if (orderStore.selectOrders && orderStore.selectOrders.length) { orderStore.selectOrders.forEach((order) => { if (order.uniqueKey) map[order.uniqueKey] = true; }); } selectedMap.value = map; }; vue.watch(() => orderStore.selectOrders, () => { syncFromStore(); }, { deep: true, immediate: true }); vue.watch(() => WebsocketData.data, handleWebsocketData); function handleWebsocketData(data) { try { const res = typeof data === "string" ? JSON.parse(data) : data; if (res.type === "sport_list" && Array.isArray(res.message)) { res.message.forEach((newMatch) => { var _a2; let idx = gamblingList.value.findIndex((item) => item.data_id === newMatch.data_id); if (idx !== -1) { const oldMatch = gamblingList.value[idx]; let parsedNewOdds = newMatch.odds; if (typeof parsedNewOdds === "string") { try { parsedNewOdds = JSON.parse(parsedNewOdds); } catch (e) { parsedNewOdds = []; } } if (((_a2 = oldMatch.odds) == null ? void 0 : _a2[0]) && (parsedNewOdds == null ? void 0 : parsedNewOdds[0])) { const oldMarket = oldMatch.odds[0]; const newMarket = parsedNewOdds[0]; if (oldMarket.values && newMarket.values) { newMarket.values.forEach((newOpt) => { const oldOpt = oldMarket.values.find( (o) => o.value === newOpt.value && (o.handicap == newOpt.handicap || !o.handicap && !newOpt.handicap) ); if ((oldOpt == null ? void 0 : oldOpt.odd) && (newOpt == null ? void 0 : newOpt.odd)) { const oldNum = parseFloat(oldOpt.odd); const newNum = parseFloat(newOpt.odd); if (!isNaN(oldNum) && !isNaN(newNum) && oldNum !== newNum) { const key = getOddsKey(oldMatch.id, newMarket.id, newOpt); const direction = newNum > oldNum ? "up" : "down"; oddsChangeMap.value.set(key, { direction, timestamp: Date.now() }); setTimeout(() => oddsChangeMap.value.delete(key), 3100); } } }); } } let parsedOdds = newMatch.odds; if (typeof parsedOdds === "string") { try { parsedOdds = JSON.parse(parsedOdds); } catch (e) { parsedOdds = []; } } else if (!parsedOdds) { parsedOdds = gamblingList.value[idx].odds; } gamblingList.value[idx] = { ...gamblingList.value[idx], ...newMatch, odds: parsedOdds }; orderStore.updateMatchStatus(newMatch.data_id, gamblingList.value[idx]); } }); } } catch (error) { } } const goDetail = (item) => { router2.push({ name: "sportDetail", query: { data_id: item.data_id } }); }; const toMoreRollBall = (name) => { router2.pushTab({ name }); }; const getStatusText = (state) => { const states = { 0: t2("未开始"), 1: t2("进行中"), 2: t2("已完场"), 3: t2("延期"), 4: t2("取消") }; return states[state] || ""; }; const translateSelection = (valStr) => { if (valStr === void 0 || valStr === null) return ""; return String(valStr); }; const isSelected = (matchId, marketId, selection) => { if (!selection) return false; const uniqueKey = getUniqueKey(matchId, marketId, selection); return !!selectedMap.value[uniqueKey]; }; const handleOddsClick = (item, selection) => { if (isOptionLocked(item, selection)) return; if (!item.odds || item.odds.length === 0) return; const market = item.odds[0]; const uniqueKey = getUniqueKey(item.id, market.id, selection); if (selectedMap.value[uniqueKey]) { orderStore.removeOrderItemByKey(uniqueKey); } else { if (market.values) { market.values.forEach((wsItem) => { const otherKey = getUniqueKey(item.id, market.id, wsItem); if (selectedMap.value[otherKey]) { orderStore.removeOrderItemByKey(otherKey); } }); } const betItem = { matchId: item.id, data_id: item.data_id, league: item.league, league_en: item.league_en, homeTeam: item.home_team, home_team_en: item.home_team_en, guestTeam: item.guest_team, guest_team_en: item.guest_team_en, betType: market.name, betTypeEn: market.name_en, betTypeName: selection.value_text, betTypeNameEn: selection.value, handicap: selection.handicap, handicap_text: selection.handicap_text, odds: selection.odd, score: item.score, state: item.state, status: item.status, is_roll: item.is_roll, is_locked: item.is_locked, uniqueKey, optionValue: selection.value, submit_value: selection.submit_value, marketId: market.id, mininum: market.mininum, maxinum: market.maxinum, selection: { ...selection } }; orderStore.addOrderItem(betItem); uni.vibrateShort(); } }; const fetchGamblingDataWithFallback = async () => { let res = await getSportSchedule({ page: 1, limit: limit.value, state: 1, is_rec: 1 }); if (res.code === 1 && (!res.data || !res.data.list || res.data.list.length === 0)) { res = await getSportSchedule({ page: 1, limit: limit.value, state: 0, is_rec: 1 }); } return res; }; async function onQuery() { var _a2, _b2; try { skeletonLoading.value = true; const [resB1, resB2, resGambling] = await Promise.all([ getActivity({ type: 2 }), getBanner({ type: "app" }), fetchGamblingDataWithFallback() ]); banners1.value = resB1.data.list; banners2.value = resB2.data.list; const formatData = (list2) => { return (list2 || []).map((item) => { if (typeof item.odds === "string") { try { item.odds = JSON.parse(item.odds); } catch (e) { item.odds = []; } } return item; }); }; gamblingList.value = formatData(((_a2 = resGambling == null ? void 0 : resGambling.data) == null ? void 0 : _a2.list) || []); gamblingList.value = gamblingList.value.map((item) => { if (item.odds) { item.odds.forEach((jtem) => { if (item.odd_ids_locked && item.odd_ids_locked.find((trim2) => jtem.id === trim2)) { jtem.is_findLocked = true; } }); } return item; }); gamblingCount.value = ((_b2 = resGambling == null ? void 0 : resGambling.data) == null ? void 0 : _b2.count) || 0; pagingRef.value.complete(true); skeletonLoading.value = false; } catch (error) { pagingRef.value.complete(false); skeletonLoading.value = false; } } onShow(() => { syncFromStore(); if (!isPaused.value) { playTrigger.value++; } }); if (route2.query.token) { uni.setStorageSync("token", route2.query.token); } if (route2.query.token && (!route2.query.is_bind || route2.query.is_bind == 0)) { getUserInfo().then((res) => { if (!res.data.account) { uni.showModal({ title: "温馨提示", content: "您的账号信息尚未完善,为保证功能的正常使用,请前往补充填写。", confirmText: "去填写", success: (res2) => { if (res2.confirm) { uni.navigateTo({ url: "/pages/setAccount/index" }); } } }); } }); } onQuery(); const __returned__ = { t: t2, locale, router: router2, route: route2, orderStore, WebsocketData, pagingRef, PermanentURL, videoSrc, playTrigger, isPaused, videoLoaded, onVideoLoaded, toggleVideo, banners1, banners2, sportList, sportCount, gamblingList, gamblingCount, limit, selectedMap, skeletonLoading, handleSwiper, oddsChangeMap, getOddsKey, isOddsUp, isOddsDown, getVisibleValues, hasMore, getRemainCount, getUniqueKey, checkIsLocked, isOptionLocked, syncFromStore, handleWebsocketData, goDetail, toMoreRollBall, getStatusText, translateSelection, isSelected, handleOddsClick, fetchGamblingDataWithFallback, onQuery, ref: vue.ref, watch: vue.watch, onMounted: vue.onMounted, get onShow() { return onShow; }, get useI18n() { return useI18n; }, get getActivity() { return getActivity; }, get getBanner() { return getBanner; }, get getSportSchedule() { return getSportSchedule; }, get getUserInfo() { return getUserInfo; }, get useOrderStore() { return useOrderStore; }, get useWebsocketDataStore() { return useWebsocketDataStore; }, get formatRange() { return formatRange; }, appFooter, AddDesktopGuide, list }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_skeleton = __unplugin_components_0$3; const _component_u_image = __unplugin_components_1$1; const _component_u_icon = __unplugin_components_0$5; const _component_u_tag = __unplugin_components_2$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, null, { default: vue.withCtx(() => [ vue.createVNode( _component_z_paging, { ref: "pagingRef", onQuery: $setup.onQuery, "refresher-only": true, "loading-more-enabled": false, fixed: false, onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, { refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "flex flex-col items-center justify-center py-6" }, [ vue.createElementVNode("view", { class: "refresh-spinner mb-2" }), vue.createElementVNode( "text", { class: "text-xs tmc" }, vue.toDisplayString($setup.t("正在更新内容...")), 1 /* TEXT */ ) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { style: { "padding": "10px 20px", "box-sizing": "border-box" } }, [ vue.createElementVNode("scroll-view", { "scroll-x": "", class: "banner1-scroll", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "banner1-flex" }, [ $setup.skeletonLoading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(3, (i) => { return vue.createElementVNode("view", { class: "banner1-item", key: "skeleton-banner-" + i }, [ vue.createElementVNode("view", { class: "square-wrapper", style: { "display": "flex", "align-items": "center", "justify-content": "center", "background-color": "#fff" } }, [ vue.createVNode(_component_u_skeleton, { loading: true, animate: true, rows: "0", title: "" }) ]) ]); }), 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList($setup.banners2, (item, i) => { return vue.openBlock(), vue.createElementBlock("view", { class: "banner1-item", key: i, onClick: ($event) => $setup.handleSwiper(i) }, [ vue.createElementVNode("view", { class: "square-wrapper" }, [ vue.createVNode(_component_u_image, { src: item.image, width: "100%", height: "100%", mode: "aspectFill" }, null, 8, ["src"]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "url-header-bar" }, [ vue.createElementVNode("view", { class: "brand-left" }, [ vue.createVNode(_component_u_icon, { name: "star-fill", color: "#f8b932", size: "28" }), vue.createElementVNode("view", { class: "brand-text-box" }, [ vue.createElementVNode("text", { class: "brand-title" }, "F1BET"), vue.createElementVNode( "text", { class: "brand-subtitle" }, vue.toDisplayString($setup.PermanentURL), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "url-right-badge" }, [ vue.createVNode(_component_u_icon, { name: "chrome-circle-fill", color: "#f8b932", size: "16" }), vue.createElementVNode( "text", { class: "url-text" }, vue.toDisplayString($setup.t("永久网址")) + ": " + vue.toDisplayString($setup.PermanentURL), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "video-container" }, [ vue.createCommentVNode(" 修复点:移除了原本依赖 videoLoaded 变量导致 opacity 为 0 的隐藏逻辑,让视频直接显示 "), vue.createElementVNode("view", { id: "homeVideo", videoPath: vue.wp($setup.videoSrc), videoPaused: vue.wp($setup.isPaused), playTrigger: vue.wp($setup.playTrigger), "change:videoPath": _ctx.h5Video.createVideo, "change:videoPaused": _ctx.h5Video.updatePlayState, "change:playTrigger": _ctx.h5Video.forcePlay, style: { "width": "100%", "height": "110px", "position": "absolute", "top": "-10px", "left": "0", "pointer-events": "none" } }, null, 8, ["videoPath", "videoPaused", "playTrigger", "change:videoPath", "change:videoPaused", "change:playTrigger"]), vue.createCommentVNode(' 修复点:移除了 v-show="videoLoaded" 防止播放按钮一起消失 '), vue.createElementVNode("view", { class: "video-control-btn", onClick: $setup.toggleVideo }, [ vue.createVNode(_component_u_icon, { name: $setup.isPaused ? "play-circle-fill" : "pause-circle-fill", color: "rgba(255,255,255,0.8)", size: "30" }, null, 8, ["name"]) ]) ]), vue.createElementVNode("view", { class: "roll-ball-section" }, [ vue.createElementVNode("view", { class: "roll-ball-header" }, [ vue.createElementVNode( "text", { class: "roll-ball-title" }, vue.toDisplayString($setup.t("热门")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "more-roll-btn", onClick: _cache[0] || (_cache[0] = ($event) => $setup.toMoreRollBall("SportsBetting")) }, [ vue.createElementVNode( "text", { style: { "color": "#f8b932", "font-size": "14px" } }, vue.toDisplayString($setup.t("更多体育博彩")) + " »", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("scroll-view", { "scroll-x": "", class: "roll-ball-scroll", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "roll-ball-flex" }, [ $setup.skeletonLoading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(3, (i) => { return vue.createElementVNode("view", { class: "roll-ball-item", key: i }, [ vue.createVNode(_component_u_skeleton, { loading: true, animate: true, rows: "3", title: "", avatar: "", "avatar-size": 28 }) ]); }), 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList($setup.gamblingList, (item, i) => { var _a2, _b2, _c; return vue.openBlock(), vue.createElementBlock("view", { class: "roll-ball-item", key: item.id, onClick: ($event) => $setup.goDetail(item) }, [ vue.createElementVNode("view", { class: "league-info" }, [ vue.createElementVNode("view", { class: "league-left" }, [ vue.createVNode(_component_u_image, { src: item.league_logo, width: "22px", height: "22px", shape: "circle" }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "league-name" }, vue.toDisplayString($setup.locale === "zh" ? item.league : item.league_en), 1 /* TEXT */ ) ]), item.state === 1 && item.fixture_status ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createVNode(_component_u_tag, { text: $setup.t((_a2 = item.fixture_status) == null ? void 0 : _a2.long), mode: "plain", type: "primary", size: "mini" }, null, 8, ["text"]), item.is_roll === 1 ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 0, text: $setup.t("滚球"), mode: "plain", type: "primary", size: "mini", style: { "margin-left": "6px" } }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ])) : (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 1, text: $setup.getStatusText(item.state), mode: "plain", type: "info", size: "mini" }, null, 8, ["text"])) ]), vue.createElementVNode("view", { class: "match-time-status" }, [ item.fixture_status ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, [ ((_b2 = item.fixture_status) == null ? void 0 : _b2.seconds) ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0 }, vue.toDisplayString((_c = item.fixture_status) == null ? void 0 : _c.seconds), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "match-time" }, vue.toDisplayString(item.game_time || "--:--"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "team-item" }, [ vue.createVNode(_component_u_image, { src: item.home_team_logo, width: "28px", height: "28px", shape: "circle" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "team-name", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? item.home_team : item.home_team_en) + " ", 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "success", style: { "margin-left": "4px" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("主")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), item.state !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "team-score" }, vue.toDisplayString(item.score && item.score !== "-" ? item.score.split("-")[0] : "0"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "team-item" }, [ vue.createVNode(_component_u_image, { src: item.guest_team_logo, width: "28px", height: "28px", shape: "circle" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "team-name", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? item.guest_team : item.guest_team_en) + " ", 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "error", style: { "margin-left": "4px" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("客")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), item.state !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "team-score" }, vue.toDisplayString(item.score && item.score !== "-" ? item.score.split("-")[1] : "0"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), [0, 1].includes(item.state) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-group" }, [ item.odds && item.odds.length > 0 && item.odds[0].values ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.getVisibleValues(item.odds[0].values), (opt, optIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["odds-btn", { "is-locked": $setup.isOptionLocked(item, opt), "is-active": $setup.isSelected(item.id, item.odds[0].id, opt), "odds-up": $setup.isOddsUp($setup.getOddsKey(item.id, item.odds[0].id, opt)) && !$setup.isOptionLocked(item, opt), "odds-down": $setup.isOddsDown($setup.getOddsKey(item.id, item.odds[0].id, opt)) && !$setup.isOptionLocked(item, opt) }]), key: optIndex, onClick: vue.withModifiers(($event) => $setup.handleOddsClick(item, opt), ["stop"]) }, [ $setup.isOptionLocked(item, opt) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "locked-overlay" }, [ vue.createVNode(_component_u_icon, { name: "lock", color: "#fff", size: "32" }) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "btn-top" }, [ vue.createElementVNode( "text", { class: "selection-name" }, vue.toDisplayString($setup.locale === "zh" ? opt.value_text : $setup.translateSelection(opt.value)), 1 /* TEXT */ ), opt.handicap_text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "selection-handicap" }, vue.toDisplayString(opt.handicap_text), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btn-bottom" }, [ vue.createElementVNode( "text", { class: "odds-val" }, vue.toDisplayString(opt.odd || "-"), 1 /* TEXT */ ), $setup.isOddsUp($setup.getOddsKey(item.id, item.odds[0].id, opt)) && !$setup.isOptionLocked(item, opt) ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "arrow-up-fill", color: "#4caf50", size: "18", style: { "margin-left": "4px" } })) : $setup.isOddsDown($setup.getOddsKey(item.id, item.odds[0].id, opt)) && !$setup.isOptionLocked(item, opt) ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 1, name: "arrow-down-fill", color: "#f56c6c", size: "18", style: { "margin-left": "4px" } })) : vue.createCommentVNode("v-if", true) ]) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), $setup.hasMore(item.odds[0].values) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-btn expand-btn", onClick: vue.withModifiers(($event) => $setup.goDetail(item), ["stop"]) }, [ vue.createElementVNode("text", { class: "plus-icon" }, "+"), vue.createElementVNode( "text", { class: "remain-count" }, vue.toDisplayString($setup.getRemainCount(item.odds[0].values)), 1 /* TEXT */ ) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "match-footer-tip" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.getStatusText(item.state)), 1 /* TEXT */ ) ])) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]), vue.createElementVNode( "text", { class: "roll-ball-title" }, vue.toDisplayString($setup.t("彩票")), 1 /* TEXT */ ), $setup.skeletonLoading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "margin-top": "18rpx", "padding": "12px", "background": "#fff", "border-radius": "8px", "box-shadow": "0 2px 8px rgba(0, 0, 0, 0.06)" } }, [ vue.createVNode(_component_u_skeleton, { loading: true, animate: true, rows: "3", title: "" }) ])) : (vue.openBlock(), vue.createBlock($setup["list"], { key: 1, style: { "margin-top": "18rpx" } })) ]), vue.createElementVNode("view", { style: { "height": "20px" } }), vue.createVNode($setup["appFooter"]), vue.createElementVNode("view", { class: "safe-hb" }), vue.createElementVNode("view", { class: "safe-ht" }), vue.createElementVNode("view", { class: "home-hb" }) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } if (typeof block0$1 === "function") block0$1(_sfc_main$13); const PagesTabbarHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-1dfc2095"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Home/index.vue"]]); const EmptyProps = { ...baseProps, /** 图标路径 */ src: { type: String, default: "" }, /** 提示文字 */ text: { type: String, default: "" }, /** 文字颜色 */ color: { type: String, default: "var(--u-light-color)" }, /** 图标的颜色 */ iconColor: { type: String, default: "var(--u-light-color)" }, /** 图标的大小 */ iconSize: { type: [String, Number], default: 120 }, /** 文字大小,单位rpx */ fontSize: { type: [String, Number], default: 26 }, /** 选择预置的图标类型 */ mode: { type: String, default: "data" }, /** 图标宽度,单位rpx */ imgWidth: { type: [String, Number], default: 120 }, /** 图标高度,单位rpx */ imgHeight: { type: [String, Number], default: "auto" }, /** 是否显示组件 */ show: { type: Boolean, default: true }, /** 组件距离上一个元素之间的距离 */ marginTop: { type: [String, Number], default: 0 }, /** 图标自定义样式 */ iconStyle: { type: Object, default: () => ({}) } }; const __default__$a = { name: "u-empty", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({ ...__default__$a, props: EmptyProps, setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useLocale(); const props = __props; const icons = vue.computed(() => { return { car: t2("uEmpty.car"), page: t2("uEmpty.page"), search: t2("uEmpty.search"), address: t2("uEmpty.address"), wifi: t2("uEmpty.wifi"), order: t2("uEmpty.order"), coupon: t2("uEmpty.coupon"), favor: t2("uEmpty.favor"), permission: t2("uEmpty.permission"), history: t2("uEmpty.history"), news: t2("uEmpty.news"), message: t2("uEmpty.message"), list: t2("uEmpty.list"), data: t2("uEmpty.data") }; }); const __returned__ = { t: t2, props, icons, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-empty", _ctx.customClass]), style: vue.normalizeStyle($setup.$u.toStyle({ marginTop: _ctx.marginTop + "rpx" }, _ctx.customStyle)) }, [ vue.createVNode(_component_u_icon, { name: _ctx.src ? _ctx.src : "empty-" + _ctx.mode, "custom-style": _ctx.iconStyle, label: _ctx.text ? _ctx.text : $setup.icons[_ctx.mode], "label-pos": "bottom", "label-color": _ctx.color, "label-size": _ctx.fontSize, size: _ctx.iconSize, color: _ctx.iconColor, "margin-top": "14" }, null, 8, ["name", "custom-style", "label", "label-color", "label-size", "size", "color"]), vue.createElementVNode("view", { class: "u-slot-wrap" }, [ vue.renderSlot(_ctx.$slots, "bottom", {}, void 0, true) ]) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __unplugin_components_4$2 = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-f11ecba3"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-empty/u-empty.vue"]]); const TabsProps = { ...baseProps, /** tabs是否可以左右拖动 */ isScroll: { type: Boolean, default: true }, /** 标签数组 */ list: { type: Array, default: () => [] }, /** 当前活动tab的索引 */ current: { type: [Number, String], default: 0 }, /** 导航栏的高度和行高 */ height: { type: [String, Number], default: 80 }, /** 字体大小 */ fontSize: { type: [String, Number], default: 30 }, /** 过渡动画时长, 单位s */ duration: { type: [String, Number], default: 0.5 }, /** 选中项的主题颜色 */ activeColor: { type: String, default: () => getColor("primary") }, /** 未选中项的颜色 */ inactiveColor: { type: String, default: () => getColor("mainColor") }, /** 菜单底部移动的bar的宽度,单位rpx */ barWidth: { type: [String, Number], default: 40 }, /** 移动bar的高度 */ barHeight: { type: [String, Number], default: 6 }, /** 单个tab的左右内边距之和,单位rpx */ gutter: { type: [String, Number], default: 30 }, /** 导航栏的背景颜色 */ bgColor: { type: String, default: "var(--u-bg-white)" }, /** 读取传入的数组对象的属性(tab名称) */ name: { type: String, default: "name" }, /** 读取传入的数组对象的属性(徽标数) */ count: { type: String, default: "count" }, /** 徽标数位置偏移 */ offset: { type: Array, default: () => [5, 20] }, /** 活动tab字体是否加粗 */ bold: { type: Boolean, default: true }, /** 当前活动tab item的样式 */ activeItemStyle: { type: Object, default: () => ({}) }, /** 是否显示底部的滑块 */ showBar: { type: Boolean, default: true }, /** 底部滑块的自定义样式 */ barStyle: { type: Object, default: () => ({}) }, /** 标签的宽度 */ itemWidth: { type: [String, Number], default: "auto" } }; const __default__$9 = { name: "u-tabs", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({ ...__default__$9, props: TabsProps, emits: ["change"], setup(__props, { expose: __expose, emit: __emit }) { const props = __props; const emit = __emit; const instance = vue.getCurrentInstance(); const scrollLeft = vue.ref(0); const tabQueryInfo = vue.ref([]); const componentWidth = vue.ref(0); const scrollBarLeft = vue.ref(0); const parentLeft = vue.ref(0); const id = vue.ref($u.guid()); const currentIndex = vue.ref(props.current); const barFirstTimeMove = vue.ref(true); vue.watch( () => props.list, (n, o) => { if (n.length !== o.length) currentIndex.value = 0; vue.nextTick(() => { init(); }); } ); vue.watch( () => props.current, (nVal) => { vue.nextTick(() => { currentIndex.value = nVal; scrollByIndex(); }); }, { immediate: true } ); const tabBarStyle = vue.computed(() => { const style = { width: props.barWidth + "rpx", transform: `translate(${scrollBarLeft.value}px, -100%)`, // 滑块在页面渲染后第一次滑动时,无需动画效果 "transition-duration": `${barFirstTimeMove.value ? 0 : props.duration}s`, "background-color": props.activeColor, height: props.barHeight + "rpx", opacity: barFirstTimeMove.value ? 0 : 1, // 设置一个很大的值,它会自动取能用的最大值,不用高度的一半,是因为高度可能是单数,会有小数出现 "border-radius": `${Number(props.barHeight) / 2}px` }; Object.assign(style, props.barStyle); return style; }); function tabItemStyle(index) { let style = { height: props.height + "rpx", "line-height": props.height + "rpx", "font-size": props.fontSize + "rpx", "transition-duration": `${props.duration}s`, padding: props.isScroll ? `0 ${props.gutter}rpx` : "", flex: props.isScroll ? "auto" : "1", width: $u.addUnit(props.itemWidth) }; if (index == Number(currentIndex.value) && props.bold) style.fontWeight = "bold"; if (index == Number(currentIndex.value)) { style.color = props.activeColor; style = Object.assign(style, props.activeItemStyle); } else { style.color = props.inactiveColor; } return style; } async function init() { const tabRect = await $u.getRect("#" + id.value, instance); parentLeft.value = tabRect.left; componentWidth.value = tabRect.width; getTabRect(); } function clickTab(index) { if (index == currentIndex.value) return; emit("change", index); } function getTabRect() { const query = uni.createSelectorQuery().in(instance == null ? void 0 : instance.proxy); for (let i = 0; i < props.list.length; i++) { query.select(`#u-tab-item-${i}`).fields({ size: true, rect: true }, () => { }); } query.exec((res) => { tabQueryInfo.value = res; scrollByIndex(); }); } function scrollByIndex() { const tabInfo = tabQueryInfo.value[Number(currentIndex.value)]; if (!tabInfo) return; const tabWidth = tabInfo.width; const offsetLeft = tabInfo.left - parentLeft.value; const scrollL = offsetLeft - (componentWidth.value - tabWidth) / 2; scrollLeft.value = scrollL < 0 ? 0 : scrollL; const left = tabInfo.left + tabInfo.width / 2 - parentLeft.value; scrollBarLeft.value = left - uni.upx2px(Number(props.barWidth)) / 2; if (barFirstTimeMove.value) { setTimeout(() => { barFirstTimeMove.value = false; }, 100); } } vue.onMounted(() => { init(); }); __expose({ init, clickTab, scrollByIndex }); const __returned__ = { props, emit, instance, scrollLeft, tabQueryInfo, componentWidth, scrollBarLeft, parentLeft, id, currentIndex, barFirstTimeMove, tabBarStyle, tabItemStyle, init, clickTab, getTabRect, scrollByIndex, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_badge = __unplugin_components_0$6; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-tabs", _ctx.customClass]), style: vue.normalizeStyle($setup.$u.toStyle({ background: _ctx.bgColor }, _ctx.customStyle)) }, [ vue.createCommentVNode(" $u.getRect()对组件根节点无效,因为写了.in(this),故这里获取内层接点尺寸 "), vue.createElementVNode("view", null, [ vue.createElementVNode("scroll-view", { "scroll-x": "", class: "u-scroll-view", "scroll-left": $setup.scrollLeft, "show-scrollbar": false, "scroll-with-animation": "" }, [ vue.createElementVNode("view", { class: vue.normalizeClass(["u-scroll-box", { "u-tabs-scroll-flex": !_ctx.isScroll }]), id: $setup.id }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.list, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-tab-item u-line-1", [item.hidden ? "u-tab-item-hidden" : ""]]), id: "u-tab-item-" + index, key: index, onClick: ($event) => $setup.clickTab(index), style: vue.normalizeStyle($setup.tabItemStyle(index)) }, [ vue.createVNode(_component_u_badge, { count: item[_ctx.count] || item["count"] || 0, offset: _ctx.offset, size: "mini" }, null, 8, ["count", "offset"]), vue.createTextVNode( " " + vue.toDisplayString(item[_ctx.name] || item["name"]), 1 /* TEXT */ ) ], 14, ["id", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )), _ctx.showBar ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-tab-bar", style: vue.normalizeStyle($setup.tabBarStyle) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 10, ["id"]) ], 8, ["scroll-left"]) ]) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-ec79678d"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-tabs/u-tabs.vue"]]); const _sfc_main$10 = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const orderStore = useOrderStore(); const pagingRef = vue.ref(null); const sportList = vue.ref([]); const router2 = useRouter(); const goDetail = (item) => { router2.push({ name: "sportDetail", query: { data_id: item.data_id } }); }; const tabList = vue.computed(() => [ { name: t2("进行中"), value: 1 }, { name: t2("未开始"), value: 0 }, { name: t2("已完场"), value: 2 }, { name: t2("其他"), value: 4 } ]); const currentTabIndex = vue.ref(0); const currentState = vue.ref(1); const selectedMap = vue.ref({}); const syncFromStore = () => { const map = {}; if (orderStore.selectOrders && orderStore.selectOrders.length) { orderStore.selectOrders.forEach((order) => { if (order.wsi) { map[order.wsi] = true; } }); } selectedMap.value = map; }; vue.watch(() => orderStore.selectOrders, () => { syncFromStore(); }, { deep: true, immediate: true }); onShow(() => { syncFromStore(); }); async function onQuery(pageNo, pageSize) { try { const params = { page: pageNo, limit: pageSize, state: currentState.value, // 进行中时传 is_roll=1,其他状态传 0 (或根据你的后端需求调整) // is_roll: currentState.value === 1 ? 1 : 0 is_roll: 1 }; formatAppLog("log", "at pages/Tabbar/RollingBall/index.vue:187", "Query Params:", params); const res = await getSportSchedule(params); if (res.code === 1) { pagingRef.value.complete(res.data.list || []); } else { pagingRef.value.complete(false); } } catch (error) { formatAppLog("error", "at pages/Tabbar/RollingBall/index.vue:197", "加载失败", error); pagingRef.value.complete(false); } } const onTabChange = (index) => { currentTabIndex.value = index; const selectedTab = tabList.value[index]; if (selectedTab) { currentState.value = selectedTab.value; pagingRef.value.reload(); } }; const getStatusText = (state) => { const states = { 0: t2("未开始"), 1: t2("进行中"), 2: t2("已完场"), 3: t2("延期"), 4: t2("取消") }; return states[state] || ""; }; const getOddsVal = (item, index) => { var _a2, _b2; if (!item.odds || item.odds.length === 0) return "-"; const market = item.odds[0]; return ((_b2 = (_a2 = market == null ? void 0 : market.ws) == null ? void 0 : _a2[index]) == null ? void 0 : _b2.o) || "-"; }; const isSelected = (item, index) => { var _a2; if (!item.odds || item.odds.length === 0) return false; const market = item.odds[0]; const selection = (_a2 = market == null ? void 0 : market.ws) == null ? void 0 : _a2[index]; if (!selection) return false; return !!selectedMap.value[selection.wsi]; }; const handleOddsClick = (item, index) => { var _a2; if (item.state !== 0 && item.state !== 1) return; if (item.is_locked) return; if (!item.odds || item.odds.length === 0) return; const market = item.odds[0]; const selection = (_a2 = market == null ? void 0 : market.ws) == null ? void 0 : _a2[index]; if (!selection || !selection.o || selection.o === "-") return; const wsi = selection.wsi; if (selectedMap.value[wsi]) { orderStore.removeOrderItem(wsi); } else { if (market.ws) { market.ws.forEach((wsItem) => { if (selectedMap.value[wsItem.wsi]) { orderStore.removeOrderItem(wsItem.wsi); } }); } const typeNameMap = [t2("主队赢"), t2("平局"), t2("客队赢")]; const betItem = { matchId: item.id, data_id: item.data_id, league: item.league, homeTeam: item.home_team, guestTeam: item.guest_team, betType: market.btn, betTypeName: typeNameMap[index] || market.btn, odds: selection.o, score: item.score, state: item.state, wsi: selection.wsi, si: selection.si || market.si }; orderStore.addOrderItem(betItem); } }; const __returned__ = { t: t2, orderStore, pagingRef, sportList, router: router2, goDetail, tabList, currentTabIndex, currentState, selectedMap, syncFromStore, onQuery, onTabChange, getStatusText, getOddsVal, isSelected, handleOddsClick, ref: vue.ref, watch: vue.watch, computed: vue.computed, get useI18n() { return useI18n; }, get onShow() { return onShow; }, get getSportSchedule() { return getSportSchedule; }, get useOrderStore() { return useOrderStore; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = __unplugin_components_0$2; const _component_u_icon = __unplugin_components_0$5; const _component_u_tag = __unplugin_components_2$2; const _component_u_image = __unplugin_components_1$1; const _component_u_empty = __unplugin_components_4$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("赛事列表") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-content" }, [ vue.createVNode(_component_z_paging, { ref: "pagingRef", modelValue: $setup.sportList, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.sportList = $event), onQuery: $setup.onQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300 }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "sticky-tabs" }, [ vue.createVNode(_component_u_tabs, { list: $setup.tabList, current: $setup.currentTabIndex, onChange: $setup.onTabChange, "active-color": "#f8b932", "inactive-color": "#666", "line-color": "#f8b932", "is-scroll": false }, null, 8, ["list", "current"]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "flex flex-col items-center justify-center py-6" }, [ vue.createElementVNode("view", { class: "refresh-spinner mb-2" }), vue.createElementVNode( "text", { class: "text-xs tmc" }, vue.toDisplayString($setup.t("正在更新内容...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-box" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无赛事数据"), mode: "data", "icon-size": "100" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "match-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.sportList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "match-card", key: item.id || index, onClick: ($event) => $setup.goDetail(item) }, [ vue.createElementVNode("view", { class: "league-info" }, [ vue.createElementVNode("view", { class: "league-left" }, [ vue.createVNode(_component_u_icon, { name: "grid-fill", color: "#f8b932", size: "16" }), vue.createElementVNode( "text", { class: "league-name" }, vue.toDisplayString(item.league), 1 /* TEXT */ ) ]), item.state === 1 ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 0, text: $setup.t("滚球"), mode: "plain", type: "primary", size: "mini" }, null, 8, ["text"])) : (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 1, text: $setup.getStatusText(item.state), mode: "plain", type: "info", size: "mini" }, null, 8, ["text"])) ]), vue.createElementVNode("view", { class: "match-time-status" }, [ item.state === 1 || item.state === 2 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "match-score" }, vue.toDisplayString(item.score || "0-0"), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "match-time" }, vue.toDisplayString(item.match_time || "--:--"), 1 /* TEXT */ )), item.timer ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "match-status" }, "/ " + vue.toDisplayString(item.timer), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "team-item" }, [ vue.createVNode(_component_u_image, { src: item.home_team_logo, width: "28px", height: "28px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "team-name" }, vue.toDisplayString(item.home_team), 1 /* TEXT */ ), item.state !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "team-score" }, vue.toDisplayString(item.score ? item.score.split("-")[0] : "0"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "team-item" }, [ vue.createVNode(_component_u_image, { src: item.guest_team_logo, width: "28px", height: "28px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "team-name" }, vue.toDisplayString(item.guest_team), 1 /* TEXT */ ), item.state !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "team-score" }, vue.toDisplayString(item.score ? item.score.split("-")[1] : "0"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), [0, 1].includes(item.state) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-group" }, [ vue.createElementVNode("view", { class: vue.normalizeClass(["odds-item", { "is-locked": item.is_locked, "is-active": $setup.isSelected(item, 0) }]), onClick: vue.withModifiers(($event) => $setup.handleOddsClick(item, 0), ["stop"]) }, [ vue.createElementVNode( "text", { class: "odds-label" }, vue.toDisplayString($setup.t("主队赢")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "odds-value" }, vue.toDisplayString($setup.getOddsVal(item, 0)), 1 /* TEXT */ ) ], 10, ["onClick"]), vue.createElementVNode("view", { class: vue.normalizeClass(["odds-item", { "is-locked": item.is_locked, "is-active": $setup.isSelected(item, 1) }]), onClick: vue.withModifiers(($event) => $setup.handleOddsClick(item, 1), ["stop"]) }, [ vue.createElementVNode( "text", { class: "odds-label" }, vue.toDisplayString($setup.t("平局")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "odds-value" }, vue.toDisplayString($setup.getOddsVal(item, 1)), 1 /* TEXT */ ) ], 10, ["onClick"]), vue.createElementVNode("view", { class: vue.normalizeClass(["odds-item", { "is-locked": item.is_locked, "is-active": $setup.isSelected(item, 2) }]), onClick: vue.withModifiers(($event) => $setup.handleOddsClick(item, 2), ["stop"]) }, [ vue.createElementVNode( "text", { class: "odds-label" }, vue.toDisplayString($setup.t("客队赢")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "odds-value" }, vue.toDisplayString($setup.getOddsVal(item, 2)), 1 /* TEXT */ ) ], 10, ["onClick"]), vue.createElementVNode("view", { class: "odds-item handicap" }, [ item.odds_count ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "font-weight": "500" } }, "+ " + vue.toDisplayString(item.odds_count), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "--")) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "match-footer-tip" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.getStatusText(item.state)), 1 /* TEXT */ ) ])) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesTabbarRollingBallIndex = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-d9b17a81"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/RollingBall/index.vue"]]); const { t: t$1 } = useLocale(); const SearchProps = { ...baseProps, /** 搜索框形状,round-圆形,square-方形 */ shape: { type: String, default: "round" }, /** 搜索框背景色,默认值var(--u-bg-gray-light) */ bgColor: { type: String, default: "var(--u-bg-gray-light)" }, /** 占位提示文字 */ placeholder: { type: String, default: () => t$1("uSearch.placeholder") }, /** 是否启用清除控件 */ clearabled: { type: Boolean, default: true }, /** 是否自动聚焦 */ focus: { type: Boolean, default: false }, /** 是否在搜索框右侧显示取消按钮 */ showAction: { type: Boolean, default: true }, /** 右边控件的样式 */ actionStyle: { type: Object, default: () => ({}) }, /** 取消按钮文字 */ actionText: { type: String, default: () => t$1("uSearch.actionText") }, /** 输入框内容对齐方式,可选值为 left|center|right */ inputAlign: { type: String, default: "left" }, /** 是否启用输入框 */ disabled: { type: Boolean, default: false }, /** 开启showAction时,是否在input获取焦点时才显示 */ animation: { type: Boolean, default: false }, /** 边框颜色,只要配置了颜色,才会有边框 */ borderColor: { type: String, default: "none" }, /** 输入框的初始化内容 */ modelValue: { type: String, default: "" }, /** 搜索框高度,单位rpx */ height: { type: [Number, String], default: 64 }, /** input输入框的样式,可以定义文字颜色,大小等,对象形式 */ inputStyle: { type: Object, default: () => ({}) }, /** 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档) */ maxlength: { type: [Number, String], default: "-1" }, /** 搜索图标的颜色,默认同输入框字体颜色 */ searchIconColor: { type: String, default: "" }, /** 输入框字体颜色 */ color: { type: String, default: "var(--u-content-color)" }, /** placeholder的颜色 */ placeholderColor: { type: String, default: "var(--u-tips-color)" }, /** 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30rpx"、"30rpx 20rpx"等写法 */ margin: { type: String, default: "0" }, /** 左边输入框的图标,可以为uView图标名称或图片路径 */ searchIcon: { type: String, default: "search" }, /** 弹出键盘时是否自动调节高度,uni-app默认值是true */ adjustPosition: { type: Boolean, default: true } }; const __default__$8 = { name: "u-search", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({ ...__default__$8, props: SearchProps, emits: [ "update:modelValue", "input", "change", "search", "custom", "clear", "focus", "blur", "click" ], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const emit = __emit; const keyword = vue.ref(props.modelValue); const showClear = vue.ref(false); const show = vue.ref(false); const focused = vue.ref(props.focus); vue.watch( () => props.modelValue, (nVal) => { keyword.value = nVal; } ); vue.watch(keyword, (nVal) => { emit("update:modelValue", nVal); emit("input", nVal); emit("change", nVal); }); const showActionBtn = vue.computed(() => { if (!props.animation && props.showAction) return true; else return false; }); const borderStyle = vue.computed(() => { if (props.borderColor) return `1px solid ${props.borderColor}`; else return "none"; }); function inputChange(e) { keyword.value = e.detail.value; } function clear() { keyword.value = ""; vue.nextTick(() => { emit("clear"); }); } function search(e) { emit("search", e.detail.value); } function custom() { emit("custom", keyword.value); } function getFocus() { focused.value = true; if (props.animation && props.showAction) show.value = true; emit("focus", keyword.value); } function blur() { setTimeout(() => { focused.value = false; }, 100); show.value = false; emit("blur", keyword.value); } function clickHandler() { if (props.disabled) emit("click"); } const __returned__ = { props, emit, keyword, showClear, show, focused, showActionBtn, borderStyle, inputChange, clear, search, custom, getFocus, blur, clickHandler, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-search", _ctx.customClass]), onClick: $setup.clickHandler, style: vue.normalizeStyle($setup.$u.toStyle({ margin: _ctx.margin }, _ctx.customStyle)) }, [ vue.createElementVNode( "view", { class: "u-content", style: vue.normalizeStyle({ backgroundColor: _ctx.bgColor, borderRadius: _ctx.shape == "round" ? "100rpx" : "10rpx", border: $setup.borderStyle, height: _ctx.height + "rpx" }) }, [ vue.createElementVNode("view", { class: "u-icon-wrap" }, [ vue.createVNode(_component_u_icon, { class: "u-clear-icon", size: 30, name: _ctx.searchIcon, color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color }, null, 8, ["name", "color"]) ]), vue.createElementVNode("input", { "confirm-type": "search", onBlur: $setup.blur, value: _ctx.modelValue, onConfirm: $setup.search, onInput: $setup.inputChange, onFocus: $setup.getFocus, focus: _ctx.focus, maxlength: Number(_ctx.maxlength), "placeholder-class": "u-placeholder-class", placeholder: _ctx.placeholder, "placeholder-style": `color: ${_ctx.placeholderColor}`, "adjust-position": _ctx.adjustPosition, class: "u-input", type: "text", style: vue.normalizeStyle([ { textAlign: _ctx.inputAlign, color: _ctx.color, backgroundColor: _ctx.bgColor, pointerEvents: _ctx.disabled ? "none" : "auto" }, _ctx.inputStyle ]) }, null, 44, ["value", "focus", "maxlength", "placeholder", "placeholder-style", "adjust-position"]), $setup.keyword && _ctx.clearabled && $setup.focused ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-close-wrap", onClick: $setup.clear }, [ vue.createVNode(_component_u_icon, { class: "u-clear-icon", name: "close-circle-fill", size: "34", color: "var(--u-light-color)" }) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createElementVNode( "view", { style: vue.normalizeStyle([_ctx.actionStyle]), class: vue.normalizeClass(["u-action", [$setup.showActionBtn || $setup.show ? "u-action-active" : ""]]), onClick: vue.withModifiers($setup.custom, ["stop", "prevent"]) }, vue.toDisplayString(_ctx.actionText), 7 /* TEXT, CLASS, STYLE */ ) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-6375befa"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-search/u-search.vue"]]); const { t } = useLocale(); const CalendarProps = { ...baseProps, /** 是否开启底部安全区适配 */ safeAreaInsetBottom: { type: Boolean, default: false }, /** 是否允许通过点击遮罩关闭Picker */ maskCloseAble: { type: Boolean, default: true }, /** 通过双向绑定控制组件的弹出与收起 */ modelValue: { type: Boolean, default: false }, /** 弹出的z-index值 */ zIndex: { type: [String, Number], default: 0 }, /** 是否允许切换年份 */ changeYear: { type: Boolean, default: true }, /** 是否允许切换月份 */ changeMonth: { type: Boolean, default: true }, /** date-单个日期选择,range-开始日期+结束日期选择 */ mode: { type: String, default: "date" }, /** 可切换的最大年份 */ maxYear: { type: [Number, String], default: 2050 }, /** 可切换的最小年份 */ minYear: { type: [Number, String], default: 1950 }, /** 最小可选日期(不在范围内日期禁用不可选) */ minDate: { type: [Number, String], default: "1950-01-01" }, /** 最大可选日期,默认最大值为今天,之后的日期不可选 */ maxDate: { type: [Number, String], default: "" }, /** 弹窗顶部左右两边的圆角值 */ borderRadius: { type: [String, Number], default: 20 }, /** 月份切换按钮箭头颜色 */ monthArrowColor: { type: String, default: "var(--u-content-color)" }, /** 年份切换按钮箭头颜色 */ yearArrowColor: { type: String, default: "var(--u-tips-color)" }, /** 默认日期字体颜色 */ color: { type: String, default: "var(--u-main-color)" }, /** 选中|起始结束日期背景色 */ activeBgColor: { type: String, default: () => getColor("primary") }, /** 选中|起始结束日期字体颜色 */ activeColor: { type: String, default: "var(--u-white-color)" }, /** 范围内日期背景色 */ rangeBgColor: { type: String, default: "rgba(41,121,255,0.13)" }, /** 范围内日期字体颜色 */ rangeColor: { type: String, default: () => getColor("primary") }, /** mode=range时生效,起始日期自定义文案 */ startText: { type: String, default: () => t("uCalendar.startText") }, /** mode=range时生效,结束日期自定义文案 */ endText: { type: String, default: () => t("uCalendar.endText") }, /** 按钮样式类型 */ btnType: { type: String, default: "primary" }, /** 当前选中日期带选中效果 */ isActiveCurrent: { type: Boolean, default: true }, /** 切换年月是否触发事件 mode=date时生效 */ isChange: { type: Boolean, default: false }, /** 是否显示右上角的关闭图标 */ closeable: { type: Boolean, default: true }, /** 顶部的提示文字 */ toolTip: { type: String, default: () => t("uCalendar.toolTip") }, /** 是否显示农历 */ showLunar: { type: Boolean, default: false }, /** 是否在页面中显示 */ isPage: { type: Boolean, default: false } }; const Calendar = { lunarInfo: [19416, 19168, 42352, 21717, 53856, 55632, 91476, 22176, 39632, 21970, 19168, 42422, 42192, 53840, 119381, 46400, 54944, 44450, 38320, 84343, 18800, 42160, 46261, 27216, 27968, 109396, 11104, 38256, 21234, 18800, 25958, 54432, 59984, 28309, 23248, 11104, 100067, 37600, 116951, 51536, 54432, 120998, 46416, 22176, 107956, 9680, 37584, 53938, 43344, 46423, 27808, 46416, 86869, 19872, 42416, 83315, 21168, 43432, 59728, 27296, 44710, 43856, 19296, 43748, 42352, 21088, 62051, 55632, 23383, 22176, 38608, 19925, 19152, 42192, 54484, 53840, 54616, 46400, 46752, 103846, 38320, 18864, 43380, 42160, 45690, 27216, 27968, 44870, 43872, 38256, 19189, 18800, 25776, 29859, 59984, 27480, 23232, 43872, 38613, 37600, 51552, 55636, 54432, 55888, 30034, 22176, 43959, 9680, 37584, 51893, 43344, 46240, 47780, 44368, 21977, 19360, 42416, 86390, 21168, 43312, 31060, 27296, 44368, 23378, 19296, 42726, 42208, 53856, 60005, 54576, 23200, 30371, 38608, 19195, 19152, 42192, 118966, 53840, 54560, 56645, 46496, 22224, 21938, 18864, 42359, 42160, 43600, 111189, 27936, 44448, 84835, 37744, 18936, 18800, 25776, 92326, 59984, 27424, 108228, 43744, 41696, 53987, 51552, 54615, 54432, 55888, 23893, 22176, 42704, 21972, 21200, 43448, 43344, 46240, 46758, 44368, 21920, 43940, 42416, 21168, 45683, 26928, 29495, 27296, 44368, 84821, 19296, 42352, 21732, 53600, 59752, 54560, 55968, 92838, 22224, 19168, 43476, 41680, 53584, 62034, 54560], solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Gan: ["甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"], Zhi: ["子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"], Animals: ["鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗", "猪"], solarTerm: ["小寒", "大寒", "立春", "雨水", "惊蛰", "春分", "清明", "谷雨", "立夏", "小满", "芒种", "夏至", "小暑", "大暑", "立秋", "处暑", "白露", "秋分", "寒露", "霜降", "立冬", "小雪", "大雪", "冬至"], sTermInfo: ["9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c3598082c95f8c965cc920f", "97bd0b06bdb0722c965ce1cfcc920f", "b027097bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd0b06bdb0722c965ce1cfcc920f", "b027097bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd0b06bdb0722c965ce1cfcc920f", "b027097bd097c36b0b6fc9274c91aa", "9778397bd19801ec9210c965cc920e", "97b6b97bd19801ec95f8c965cc920f", "97bd09801d98082c95f8e1cfcc920f", "97bd097bd097c36b0b6fc9210c8dc2", "9778397bd197c36c9210c9274c91aa", "97b6b97bd19801ec95f8c965cc920e", "97bd09801d98082c95f8e1cfcc920f", "97bd097bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c91aa", "97b6b97bd19801ec95f8c965cc920e", "97bcf97c3598082c95f8e1cfcc920f", "97bd097bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c3598082c95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c3598082c95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd097bd07f595b0b6fc920fb0722", "9778397bd097c36b0b6fc9210c8dc2", "9778397bd19801ec9210c9274c920e", "97b6b97bd19801ec95f8c965cc920f", "97bd07f5307f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c920e", "97b6b97bd19801ec95f8c965cc920f", "97bd07f5307f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bd07f1487f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c9274c920e", "97bcf7f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c91aa", "97b6b97bd197c36c9210c9274c920e", "97bcf7f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c920e", "97b6b7f0e47f531b0723b0b6fb0722", "7f0e37f5307f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36b0b70c9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e37f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc9210c8dc2", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0787b0721", "7f0e27f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c91aa", "97b6b7f0e47f149b0723b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c8dc2", "977837f0e37f149b0723b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e37f5307f595b0b0bc920fb0722", "7f0e397bd097c35b0b6fc9210c8dc2", "977837f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e37f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc9210c8dc2", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f149b0723b0787b0721", "7f0e27f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14998082b0723b06bd", "7f07e7f0e37f149b0723b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e37f1487f595b0b0bb0b6fb0722", "7f0e37f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e37f1487f531b0b0bb0b6fb0722", "7f0e37f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e37f1487f531b0b0bb0b6fb0722", "7f0e37f0e37f14898082b072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e37f0e37f14898082b072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f149b0723b0787b0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14998082b0723b06bd", "7f07e7f0e47f149b0723b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14998082b0723b06bd", "7f07e7f0e37f14998083b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14898082b0723b02d5", "7f07e7f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e36665b66aa89801e9808297c35", "665f67f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e36665b66a449801e9808297c35", "665f67f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e36665b66a449801e9808297c35", "665f67f0e37f14898082b072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e26665b66a449801e9808297c35", "665f67f0e37f1489801eb072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722"], nStr1: ["日", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"], nStr2: ["初", "十", "廿", "卅"], nStr3: ["正", "二", "三", "四", "五", "六", "七", "八", "九", "十", "冬", "腊"], lYearDays: function(b) { for (var f = 348, c2 = 32768; 8 < c2; c2 >>= 1) f += this.lunarInfo[b - 1900] & c2 ? 1 : 0; return f + this.leapDays(b); }, leapMonth: function(b) { return 15 & this.lunarInfo[b - 1900]; }, leapDays: function(b) { return this.leapMonth(b) ? 65536 & this.lunarInfo[b - 1900] ? 30 : 29 : 0; }, monthDays: function(b, f) { return 12 < f || f < 1 ? -1 : this.lunarInfo[b - 1900] & 65536 >> f ? 30 : 29; }, solarDays: function(b, f) { if (12 < f || f < 1) return -1; --f; return 1 == f ? b % 4 == 0 && b % 100 != 0 || b % 400 == 0 ? 29 : 28 : this.solarMonth[f]; }, toGanZhiYear: function(b) { var f = (b - 3) % 10, b = (b - 3) % 12; return 0 == f && (f = 10), 0 == b && (b = 12), this.Gan[f - 1] + this.Zhi[b - 1]; }, toAstro: function(b, f) { return "魔羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯".substr(2 * b - (f < [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22][b - 1] ? 2 : 0), 2) + "座"; }, toGanZhi: function(b) { return this.Gan[b % 10] + this.Zhi[b % 12]; }, getTerm: function(b, f) { if (b < 1900 || 2100 < b) return -1; if (f < 1 || 24 < f) return -1; b = this.sTermInfo[b - 1900], b = [parseInt("0x" + b.substr(0, 5)).toString(), parseInt("0x" + b.substr(5, 5)).toString(), parseInt("0x" + b.substr(10, 5)).toString(), parseInt("0x" + b.substr(15, 5)).toString(), parseInt("0x" + b.substr(20, 5)).toString(), parseInt("0x" + b.substr(25, 5)).toString()], b = [b[0].substr(0, 1), b[0].substr(1, 2), b[0].substr(3, 1), b[0].substr(4, 2), b[1].substr(0, 1), b[1].substr(1, 2), b[1].substr(3, 1), b[1].substr(4, 2), b[2].substr(0, 1), b[2].substr(1, 2), b[2].substr(3, 1), b[2].substr(4, 2), b[3].substr(0, 1), b[3].substr(1, 2), b[3].substr(3, 1), b[3].substr(4, 2), b[4].substr(0, 1), b[4].substr(1, 2), b[4].substr(3, 1), b[4].substr(4, 2), b[5].substr(0, 1), b[5].substr(1, 2), b[5].substr(3, 1), b[5].substr(4, 2)]; return parseInt(b[f - 1]); }, toChinaMonth: function(b) { if (12 < b || b < 1) return -1; b = this.nStr3[b - 1]; return b += "月"; }, toChinaDay: function(b) { var f; switch (b) { case 10: f = "初十"; break; case 20: f = "二十"; break; case 30: f = "三十"; break; default: f = this.nStr2[Math.floor(b / 10)], f += this.nStr1[b % 10]; } return f; }, getAnimal: function(b) { return this.Animals[(b - 4) % 12]; }, solar2lunar: function(b, f, c2) { if (b < 1900 || 2100 < b) return -1; if (1900 == b && 1 == f && c2 < 31) return -1; for (var e = 0, b = (M = b ? new Date(b, parseInt(f) - 1, c2) : /* @__PURE__ */ new Date()).getFullYear(), f = M.getMonth() + 1, c2 = M.getDate(), t2 = (Date.UTC(M.getFullYear(), M.getMonth(), M.getDate()) - Date.UTC(1900, 0, 31)) / 864e5, a = 1900; a < 2101 && 0 < t2; a++) t2 -= e = this.lYearDays(a); t2 < 0 && (t2 += e, a--); var r = /* @__PURE__ */ new Date(), s = false; r.getFullYear() == b && r.getMonth() + 1 == f && r.getDate() == c2 && (s = true); var d = M.getDay(), n = this.nStr1[d]; 0 == d && (d = 7); var i = a, u2 = this.leapMonth(a), o = false; for (a = 1; a < 13 && 0 < t2; a++) e = 0 < u2 && a == u2 + 1 && 0 == o ? (--a, o = true, this.leapDays(i)) : this.monthDays(i, a), 1 == o && a == u2 + 1 && (o = false), t2 -= e; 0 == t2 && 0 < u2 && a == u2 + 1 && (o ? o = false : (o = true, --a)), t2 < 0 && (t2 += e, --a); var h = a, l = t2 + 1, D = f - 1, g = this.toGanZhiYear(i), y = this.getTerm(b, 2 * f - 1), p = this.getTerm(b, 2 * f), m = this.toGanZhi(12 * (b - 1900) + f + 11); y <= c2 && (m = this.toGanZhi(12 * (b - 1900) + f + 12)); var r = false, M = null; y == c2 && (r = true, M = this.solarTerm[2 * f - 2]), p == c2 && (r = true, M = this.solarTerm[2 * f - 1]); p = Date.UTC(b, D, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, D = this.toGanZhi(p + c2 - 1), p = this.toAstro(f, c2); return { lYear: i, lMonth: h, lDay: l, Animal: this.getAnimal(i), IMonthCn: (o ? "闰" : "") + this.toChinaMonth(h), IDayCn: this.toChinaDay(l), cYear: b, cMonth: f, cDay: c2, gzYear: g, gzMonth: m, gzDay: D, isToday: s, isLeap: o, nWeek: d, ncWeek: "星期" + n, isTerm: r, Term: M, astro: p }; }, lunar2solar: function(b, f, c2, e) { var e = !!e, t2 = this.leapMonth(b); this.leapDays(b); if (e && t2 != f) return -1; if (2100 == b && 12 == f && 1 < c2 || 1900 == b && 1 == f && c2 < 31) return -1; var a = this.monthDays(b, f), t2 = a; if (e && (t2 = this.leapDays(b, f)), b < 1900 || 2100 < b || t2 < c2) return -1; for (var r = 0, s = 1900; s < b; s++) r += this.lYearDays(s); for (var d, n = false, s = 1; s < f; s++) d = this.leapMonth(b), n || d <= s && 0 < d && (r += this.leapDays(b), n = true), r += this.monthDays(b, s); e && (r += a); e = Date.UTC(1900, 1, 30, 0, 0, 0), a = new Date(864e5 * (r + c2 - 31) + e), c2 = a.getUTCFullYear(), e = a.getUTCMonth() + 1, a = a.getUTCDate(); return this.solar2lunar(c2, e, a); } }; const __default__$7 = { name: "u-calendar", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({ ...__default__$7, props: CalendarProps, emits: ["update:modelValue", "input", "change"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const emit = __emit; const slots = vue.useSlots(); const { t: t2 } = useLocale(); const weekday = vue.ref(1); const weekdayArr = vue.ref([]); const days = vue.ref(0); const daysArr = vue.ref([]); const lunarArr = vue.ref([]); const showTitle = vue.ref(""); const year = vue.ref(2020); const month = vue.ref(0); const day = vue.ref(0); const startYear = vue.ref(0); const startMonth = vue.ref(0); const startDay = vue.ref(0); const endYear = vue.ref(0); const endMonth = vue.ref(0); const endDay = vue.ref(0); const today = vue.ref(""); const activeDate = vue.ref(""); const startDate = vue.ref(""); const endDate = vue.ref(""); const isStart = vue.ref(true); const min = vue.ref(null); const max = vue.ref(null); const weekDayZh = vue.ref([ t2("uCalendar.sun"), t2("uCalendar.mon"), t2("uCalendar.tue"), t2("uCalendar.wed"), t2("uCalendar.thu"), t2("uCalendar.fri"), t2("uCalendar.sat") ]); const dataChange = vue.computed(() => `${props.mode}-${props.minDate}-${props.maxDate}`); const lunarChange = vue.computed(() => props.showLunar); const uZIndex = vue.computed(() => props.zIndex ? props.zIndex : $u.zIndex.popup); const popupValue = vue.computed({ get: () => props.modelValue, set: (val) => emit("update:modelValue", val) }); vue.watch([dataChange, lunarChange], () => { init(); }); vue.onMounted(() => { init(); }); function getColor2(index, type2) { let color2 = type2 == 1 ? "" : props.color; let dayNum = index + 1; let date2 = `${year.value}-${month.value}-${dayNum}`; let timestamp = new Date(date2.replace(/\-/g, "/")).getTime(); let start = startDate.value.replace(/\-/g, "/"); let end = endDate.value.replace(/\-/g, "/"); if (props.isActiveCurrent && activeDate.value == date2 || startDate.value == date2 || endDate.value == date2) { color2 = type2 == 1 ? props.activeBgColor : props.activeColor; } else if (endDate.value && timestamp > new Date(start).getTime() && timestamp < new Date(end).getTime()) { color2 = type2 == 1 ? props.rangeBgColor : props.rangeColor; } return color2; } function init() { let now2 = /* @__PURE__ */ new Date(); let minDateObj = new Date(String(props.minDate)); let maxDateObj = new Date(String(props.maxDate || "")); if (isNaN(maxDateObj.getTime())) maxDateObj = /* @__PURE__ */ new Date(); if (now2 < minDateObj) now2 = minDateObj; if (now2 > maxDateObj) now2 = maxDateObj; year.value = now2.getFullYear(); month.value = now2.getMonth() + 1; day.value = now2.getDate(); today.value = `${now2.getFullYear()}-${month.value}-${day.value}`; activeDate.value = today.value; min.value = initDate(String(props.minDate)); max.value = initDate(String(props.maxDate) || today.value); startDate.value = ""; startYear.value = 0; startMonth.value = 0; startDay.value = 0; endYear.value = 0; endMonth.value = 0; endDay.value = 0; endDate.value = ""; isStart.value = true; changeData(); } function initDate(date2) { let fdate = date2.split("-"); return { year: Number(fdate[0] || 1920), month: Number(fdate[1] || 1), day: Number(fdate[2] || 1) }; } function openDisAbled(yearNum, monthNum, dayNum) { let bool = true; let date2 = `${yearNum}/${monthNum}/${dayNum}`; let minStr = min.value ? `${min.value.year}/${min.value.month}/${min.value.day}` : ""; let maxStr = max.value ? `${max.value.year}/${max.value.month}/${max.value.day}` : ""; let timestamp = new Date(date2).getTime(); if (min.value && max.value && timestamp >= new Date(minStr).getTime() && timestamp <= new Date(maxStr).getTime()) { bool = false; } return bool; } function generateArray(start, end) { return Array.from(new Array(end + 1).keys()).slice(start); } function formatNum(num) { return num < 10 ? "0" + num : num + ""; } function getMonthDay(yearNum, monthNum) { return new Date(yearNum, monthNum, 0).getDate(); } function getWeekday(yearNum, monthNum) { let date2 = /* @__PURE__ */ new Date(`${yearNum}/${monthNum}/01 00:00:00`); return date2.getDay(); } function checkRange(yearNum) { let overstep = false; if (yearNum < Number(props.minYear) || yearNum > Number(props.maxYear)) { uni.showToast({ title: t2("uCalendar.outOfRange"), icon: "none" }); overstep = true; } return overstep; } function changeMonthHandler(isAdd) { if (isAdd) { let m = month.value + 1; let y = m > 12 ? year.value + 1 : year.value; if (!checkRange(y)) { month.value = m > 12 ? 1 : m; year.value = y; changeData(); } } else { let m = month.value - 1; let y = m < 1 ? year.value - 1 : year.value; if (!checkRange(y)) { month.value = m < 1 ? 12 : m; year.value = y; changeData(); } } } function changeYearHandler(isAdd) { let y = isAdd ? year.value + 1 : year.value - 1; if (!checkRange(y)) { year.value = y; changeData(); } } function changeData() { days.value = getMonthDay(year.value, month.value); daysArr.value = generateArray(1, days.value); weekday.value = getWeekday(year.value, month.value); weekdayArr.value = generateArray(1, weekday.value); showTitle.value = `${year.value}${t2("uCalendar.year")}${month.value}${t2("uCalendar.month")}`; if (props.showLunar) { lunarArr.value = []; daysArr.value.forEach((d) => { lunarArr.value.push(getLunar(year.value, month.value, d)); }); } if (props.isChange && props.mode == "date") { btnFix(true); } } function getLunar(year2, month2, day2) { const val = Calendar.solar2lunar(year2, month2, day2); return { dayCn: val.IDayCn, weekCn: val.ncWeek, monthCn: val.IMonthCn, day: val.lDay, week: val.nWeek, month: val.lMonth, year: val.lYear }; } function dateClick(dayIdx) { if (props.isPage) { return; } const d = dayIdx + 1; if (!openDisAbled(year.value, month.value, d)) { day.value = d; let date2 = `${year.value}-${month.value}-${d}`; if (props.mode == "date") { activeDate.value = date2; } else { let compare = new Date(date2.replace(/\-/g, "/")).getTime() < new Date(startDate.value.replace(/\-/g, "/")).getTime(); if (isStart.value || compare) { startDate.value = date2; startYear.value = year.value; startMonth.value = month.value; startDay.value = day.value; endYear.value = 0; endMonth.value = 0; endDay.value = 0; endDate.value = ""; activeDate.value = ""; isStart.value = false; } else { endDate.value = date2; endYear.value = year.value; endMonth.value = month.value; endDay.value = day.value; isStart.value = true; } } } } function close() { emit("input", false); emit("update:modelValue", false); } function getWeekText(date2) { const d = /* @__PURE__ */ new Date(`${date2.replace(/\-/g, "/")} 00:00:00`); let week = d.getDay(); return "星期" + ["日", "一", "二", "三", "四", "五", "六"][week]; } function btnFix(show) { if (!show) { close(); } if (props.mode == "date") { let arr = activeDate.value.split("-"); let y = props.isChange ? year.value : Number(arr[0]); let m = props.isChange ? month.value : Number(arr[1]); let d = props.isChange ? day.value : Number(arr[2]); let daysNum = getMonthDay(y, m); let result = `${y}-${formatNum(m)}-${formatNum(d)}`; let weekText = getWeekText(result); let isToday = false; if (`${y}-${m}-${d}` == today.value) { isToday = true; } const lunar = props.showLunar ? getLunar(y, m, d) : null; emit("change", { year: y, month: m, day: d, days: daysNum, result, week: weekText, isToday, lunar // switch: show //是否是切换年月操作 }); } else { if (!startDate.value || !endDate.value) return; let startMonthStr = formatNum(startMonth.value); let startDayStr = formatNum(startDay.value); let startDateStr = `${startYear.value}-${startMonthStr}-${startDayStr}`; let startWeek = getWeekText(startDateStr); let endMonthStr = formatNum(endMonth.value); let endDayStr = formatNum(endDay.value); let endDateStr = `${endYear.value}-${endMonthStr}-${endDayStr}`; let endWeek = getWeekText(endDateStr); let startLunar = null; let endLunar = null; if (props.showLunar) { startLunar = getLunar(startYear.value, startMonth.value, startDay.value); endLunar = getLunar(endYear.value, endMonth.value, endDay.value); } emit("change", { startYear: startYear.value, startMonth: startMonth.value, startDay: startDay.value, startDate: startDateStr, startWeek, endYear: endYear.value, endMonth: endMonth.value, endDay: endDay.value, endDate: endDateStr, endWeek, startLunar, endLunar }); } } const __returned__ = { props, emit, slots, t: t2, weekday, weekdayArr, days, daysArr, lunarArr, showTitle, year, month, day, startYear, startMonth, startDay, endYear, endMonth, endDay, today, activeDate, startDate, endDate, isStart, min, max, weekDayZh, dataChange, lunarChange, uZIndex, popupValue, getColor: getColor2, init, initDate, openDisAbled, generateArray, formatNum, getMonthDay, getWeekday, checkRange, changeMonthHandler, changeYearHandler, changeData, getLunar, dateClick, close, getWeekText, btnFix, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_popup = __unplugin_components_2$3; return $setup.props.isPage ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-calendar", $setup.props.customClass]), style: vue.normalizeStyle($setup.$u.toStyle(_ctx.customStyle)) }, [ vue.createCommentVNode(' \r\n \r\n {{ toolTip }}\r\n \r\n \r\n '), vue.createElementVNode("view", { class: "u-calendar__action u-flex u-row-center" }, [ vue.createElementVNode("view", { class: "u-calendar__action__icon" }, [ _ctx.changeYear ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "arrow-left-double", color: _ctx.yearArrowColor, onClick: _cache[0] || (_cache[0] = ($event) => $setup.changeYearHandler(0)) }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "u-calendar__action__icon" }, [ _ctx.changeMonth ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "arrow-left", color: _ctx.monthArrowColor, onClick: _cache[1] || (_cache[1] = ($event) => $setup.changeMonthHandler(0)) }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "u-calendar__action__text" }, vue.toDisplayString($setup.showTitle), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "u-calendar__action__icon" }, [ _ctx.changeMonth ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "arrow-right", color: _ctx.monthArrowColor, onClick: _cache[2] || (_cache[2] = ($event) => $setup.changeMonthHandler(1)) }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "u-calendar__action__icon" }, [ _ctx.changeYear ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "arrow-right-double", color: _ctx.yearArrowColor, onClick: _cache[3] || (_cache[3] = ($event) => $setup.changeYearHandler(1)) }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "u-calendar__week-day" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.weekDayZh, (item, index) => { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-calendar__week-day__text", key: index }, vue.toDisplayString(item), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "u-calendar__content" }, [ vue.createCommentVNode(" 前置空白部分 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.weekdayArr, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { key: index, class: "u-calendar__content__item" }); }), 128 /* KEYED_FRAGMENT */ )), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.daysArr, (item, index) => { var _a2, _b2; return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-calendar__content__item", { "u-hover-class": $setup.openDisAbled($setup.year, $setup.month, index + 1), "u-calendar__content--start-date": _ctx.mode == "range" && $setup.startDate == `${$setup.year}-${$setup.month}-${index + 1}` || _ctx.mode == "date", "u-calendar__content--end-date": _ctx.mode == "range" && $setup.endDate == `${$setup.year}-${$setup.month}-${index + 1}` || _ctx.mode == "date" }]), style: vue.normalizeStyle({ backgroundColor: $setup.getColor(index, 1) }), key: index, onClick: ($event) => $setup.dateClick(index) }, [ vue.createElementVNode( "view", { class: "u-calendar__content__item__inner", style: vue.normalizeStyle({ color: $setup.getColor(index, 2) }) }, [ vue.createElementVNode( "view", null, vue.toDisplayString(index + 1), 1 /* TEXT */ ) ], 4 /* STYLE */ ), _ctx.mode == "range" && $setup.startDate == `${$setup.year}-${$setup.month}-${index + 1}` && $setup.startDate != $setup.endDate ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-calendar__content__item__tips", style: vue.normalizeStyle({ color: _ctx.activeColor }) }, vue.toDisplayString(_ctx.startText), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.mode == "range" && $setup.endDate == `${$setup.year}-${$setup.month}-${index + 1}` ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "u-calendar__content__item__tips", style: vue.normalizeStyle({ color: _ctx.activeColor }) }, vue.toDisplayString(_ctx.endText), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), $setup.props.showLunar && !(_ctx.mode == "range" && $setup.startDate == `${$setup.year}-${$setup.month}-${index + 1}` && $setup.startDate != $setup.endDate) && !(_ctx.mode == "range" && $setup.endDate == `${$setup.year}-${$setup.month}-${index + 1}`) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "u-calendar__content__item__tips", style: vue.normalizeStyle({ color: $setup.getColor(index, 2) }) }, vue.toDisplayString(((_a2 = $setup.lunarArr[index]) == null ? void 0 : _a2.dayCn) === "初一" ? $setup.lunarArr[index].monthCn : ((_b2 = $setup.lunarArr[index]) == null ? void 0 : _b2.dayCn) ?? ""), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode( "view", { class: "u-calendar__content__bg-month" }, vue.toDisplayString($setup.month), 1 /* TEXT */ ) ]), vue.createCommentVNode(` \r \r {{ mode == 'date' ? activeDate : startDate }}\r 至{{ endDate }}\r \r \r 确定\r \r `) ], 6 /* CLASS, STYLE */ )) : (vue.openBlock(), vue.createBlock(_component_u_popup, { key: 1, maskCloseAble: _ctx.maskCloseAble, mode: "bottom", popup: false, modelValue: $setup.popupValue, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.popupValue = $event), length: "auto", safeAreaInsetBottom: _ctx.safeAreaInsetBottom, onClose: $setup.close, "z-index": $setup.uZIndex, "border-radius": _ctx.borderRadius, closeable: _ctx.closeable }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-calendar", $setup.props.customClass]), style: vue.normalizeStyle($setup.$u.toStyle(_ctx.customStyle)) }, [ vue.createElementVNode("view", { class: "u-calendar__header" }, [ !$setup.slots.tooltip ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-calendar__header__text" }, vue.toDisplayString(_ctx.toolTip), 1 /* TEXT */ )) : vue.renderSlot(_ctx.$slots, "tooltip", { key: 1 }, void 0, true) ]), vue.createElementVNode("view", { class: "u-calendar__action u-flex u-row-center" }, [ vue.createElementVNode("view", { class: "u-calendar__action__icon" }, [ _ctx.changeYear ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "arrow-left-double", color: _ctx.yearArrowColor, onClick: _cache[4] || (_cache[4] = ($event) => $setup.changeYearHandler(0)) }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "u-calendar__action__icon" }, [ _ctx.changeMonth ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "arrow-left", color: _ctx.monthArrowColor, onClick: _cache[5] || (_cache[5] = ($event) => $setup.changeMonthHandler(0)) }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "u-calendar__action__text" }, vue.toDisplayString($setup.showTitle), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "u-calendar__action__icon" }, [ _ctx.changeMonth ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "arrow-right", color: _ctx.monthArrowColor, onClick: _cache[6] || (_cache[6] = ($event) => $setup.changeMonthHandler(1)) }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "u-calendar__action__icon" }, [ _ctx.changeYear ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "arrow-right-double", color: _ctx.yearArrowColor, onClick: _cache[7] || (_cache[7] = ($event) => $setup.changeYearHandler(1)) }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "u-calendar__week-day" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.weekDayZh, (item, index) => { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-calendar__week-day__text", key: index }, vue.toDisplayString(item), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "u-calendar__content" }, [ vue.createCommentVNode(" 前置空白部分 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.weekdayArr, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { key: index, class: "u-calendar__content__item" }); }), 128 /* KEYED_FRAGMENT */ )), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.daysArr, (item, index) => { var _a2, _b2; return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-calendar__content__item", { "u-hover-class": $setup.openDisAbled($setup.year, $setup.month, index + 1), "u-calendar__content--start-date": _ctx.mode == "range" && $setup.startDate == `${$setup.year}-${$setup.month}-${index + 1}` || _ctx.mode == "date", "u-calendar__content--end-date": _ctx.mode == "range" && $setup.endDate == `${$setup.year}-${$setup.month}-${index + 1}` || _ctx.mode == "date" }]), style: vue.normalizeStyle({ backgroundColor: $setup.getColor(index, 1) }), key: index, onClick: ($event) => $setup.dateClick(index) }, [ vue.createElementVNode( "view", { class: "u-calendar__content__item__inner", style: vue.normalizeStyle({ color: $setup.getColor(index, 2) }) }, [ vue.createElementVNode( "view", null, vue.toDisplayString(index + 1), 1 /* TEXT */ ) ], 4 /* STYLE */ ), _ctx.mode == "range" && $setup.startDate == `${$setup.year}-${$setup.month}-${index + 1}` && $setup.startDate != $setup.endDate ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-calendar__content__item__tips", style: vue.normalizeStyle({ color: _ctx.activeColor }) }, vue.toDisplayString(_ctx.startText), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.mode == "range" && $setup.endDate == `${$setup.year}-${$setup.month}-${index + 1}` ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "u-calendar__content__item__tips", style: vue.normalizeStyle({ color: _ctx.activeColor }) }, vue.toDisplayString(_ctx.endText), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), $setup.props.showLunar && !(_ctx.mode == "range" && $setup.startDate == `${$setup.year}-${$setup.month}-${index + 1}` && $setup.startDate != $setup.endDate) && !(_ctx.mode == "range" && $setup.endDate == `${$setup.year}-${$setup.month}-${index + 1}`) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "u-calendar__content__item__tips", style: vue.normalizeStyle({ color: $setup.getColor(index, 2) }) }, vue.toDisplayString(((_a2 = $setup.lunarArr[index]) == null ? void 0 : _a2.dayCn) === "初一" ? $setup.lunarArr[index].monthCn : ((_b2 = $setup.lunarArr[index]) == null ? void 0 : _b2.dayCn) ?? ""), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode( "view", { class: "u-calendar__content__bg-month" }, vue.toDisplayString($setup.month), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "u-calendar__bottom" }, [ vue.createElementVNode("view", { class: "u-calendar__bottom__choose" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.mode == "date" ? $setup.activeDate : $setup.startDate), 1 /* TEXT */ ), $setup.endDate ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, vue.toDisplayString($setup.t("uCalendar.to")) + vue.toDisplayString($setup.endDate), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "u-calendar__bottom__btn" }, [ vue.createVNode(_component_u_button, { type: _ctx.btnType, shape: "circle", size: "default", onClick: _cache[8] || (_cache[8] = ($event) => $setup.btnFix(false)) }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("uCalendar.confirmText")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["type"]) ]) ]) ], 6 /* CLASS, STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["maskCloseAble", "modelValue", "safeAreaInsetBottom", "z-index", "border-radius", "closeable"])); } const __unplugin_components_6 = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-2a51c813"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-calendar/u-calendar.vue"]]); const _sfc_main$Z = { __name: "SportDateFilter", props: { state: { type: Number, required: true }, daysCount: { type: Number, default: 7 } }, emits: ["change", "update:date"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const { t: t2 } = useI18n(); const props = __props; const emit = __emit; const activeDate = vue.ref(""); const showCalendar = vue.ref(false); const getLocalYYYYMMDD = (date2) => { const y = date2.getFullYear(); const m = String(date2.getMonth() + 1).padStart(2, "0"); const d = String(date2.getDate()).padStart(2, "0"); return `${y}-${m}-${d}`; }; const getWeekLabel = (dateObj, isToday = false) => { if (isToday) return t2("今天"); const weeks = [t2("周日"), t2("周一"), t2("周二"), t2("周三"), t2("周四"), t2("周五"), t2("周六")]; return weeks[dateObj.getDay()]; }; const getDateLabel = (dateObj) => { const m = String(dateObj.getMonth() + 1).padStart(2, "0"); const d = String(dateObj.getDate()).padStart(2, "0"); return `${m}/${d}`; }; const baseOptions = vue.computed(() => { const options = []; const today = /* @__PURE__ */ new Date(); const direction = props.state === 2 ? -1 : 1; const count = props.state === 1 ? 1 : props.daysCount; for (let i = 0; i < count; i++) { const targetDate = new Date(today); targetDate.setDate(today.getDate() + i * direction); const isActuallyToday = targetDate.toDateString() === today.toDateString(); options.push({ weekLabel: getWeekLabel(targetDate, isActuallyToday), dateLabel: getDateLabel(targetDate), value: getLocalYYYYMMDD(targetDate) }); } return options; }); const displayOptions = vue.computed(() => { const options = [...baseOptions.value]; if (activeDate.value) { const exists = options.some((opt) => opt.value === activeDate.value); if (!exists) { const safeDateStr = activeDate.value.replace(/-/g, "/"); const customDate = new Date(safeDateStr); options.push({ weekLabel: getWeekLabel(customDate, false), dateLabel: getDateLabel(customDate), value: activeDate.value }); } } return options; }); const minDate = vue.computed(() => { const todayStr = getLocalYYYYMMDD(/* @__PURE__ */ new Date()); if (props.state === 0 || props.state === 1) return todayStr; return "2000-01-01"; }); const maxDate = vue.computed(() => { const todayStr = getLocalYYYYMMDD(/* @__PURE__ */ new Date()); if (props.state === 2 || props.state === 1) return todayStr; return "2099-12-31"; }); const initToday = (isPassive = false) => { const todayStr = getLocalYYYYMMDD(/* @__PURE__ */ new Date()); activeDate.value = todayStr; emit("update:date", todayStr); if (!isPassive) { emit("change", todayStr); } }; vue.watch(() => props.state, () => { initToday(true); }); vue.onMounted(() => { initToday(true); }); const selectDate = (val) => { if (activeDate.value === val) return; activeDate.value = val; emit("update:date", val); emit("change", val); }; const openCalendar = () => { showCalendar.value = true; }; const onCalendarConfirm = (e) => { const selected = e.result; activeDate.value = selected; emit("update:date", selected); emit("change", selected); }; const __returned__ = { t: t2, props, emit, activeDate, showCalendar, getLocalYYYYMMDD, getWeekLabel, getDateLabel, baseOptions, displayOptions, minDate, maxDate, initToday, selectDate, openCalendar, onCalendarConfirm, ref: vue.ref, computed: vue.computed, watch: vue.watch, onMounted: vue.onMounted, get useI18n() { return useI18n; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_calendar = __unplugin_components_6; return vue.openBlock(), vue.createElementBlock("view", { class: "sport-date-filter-container" }, [ vue.createElementVNode("scroll-view", { "scroll-x": "", class: "date-scroll", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "date-tabs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.displayOptions, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["date-tab", { "is-active": $setup.activeDate === item.value }]), key: index, onClick: ($event) => $setup.selectDate(item.value) }, [ vue.createElementVNode( "text", { class: "weekday" }, vue.toDisplayString(item.weekLabel), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "date-text" }, vue.toDisplayString(item.dateLabel), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "calendar-action", onClick: $setup.openCalendar }, [ vue.createElementVNode("view", { class: "divider" }), vue.createElementVNode("view", { class: "icon-btn" }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "44", color: "#94a3b8" }) ]) ]), vue.createVNode(_component_u_calendar, { modelValue: $setup.showCalendar, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.showCalendar = $event), mode: "date", "min-date": $setup.minDate, "max-date": $setup.maxDate, "active-bg-color": "#f8b932", "cancel-text": $setup.t("取消"), "confirm-text": $setup.t("确认"), onChange: $setup.onCalendarConfirm }, null, 8, ["modelValue", "min-date", "max-date", "cancel-text", "confirm-text"]) ]); } const SportDateFilter = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-124c2f8c"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/SportsBetting/SportDateFilter.vue"]]); const _sfc_main$Y = { __name: "index", props: { keyword: { type: String, default: "" } }, setup(__props, { expose: __expose }) { const { t: t2, locale } = useI18n(); const router2 = useRouter(); const orderStore = useOrderStore(); const props = __props; const leagueList = vue.ref([]); const page = vue.ref(1); const limit = vue.ref(20); const isFetching = vue.ref(false); const isNoMore = vue.ref(false); const selectedMap = vue.ref({}); vue.onMounted(() => { fetchLeagueList(1); syncFromStore(); }); const fetchLeagueList = async (pageNum) => { if (isFetching.value || isNoMore.value && pageNum !== 1) return; isFetching.value = true; if (pageNum === 1) { leagueList.value = []; isNoMore.value = false; } try { const params = { page: pageNum, limit: limit.value }; if (props.keyword) { params.keyword = props.keyword; } const res = await getLeagueList(params); if (res.code === 1 && res.data && res.data.list) { const formattedList = res.data.list.map((league) => ({ ...league, isExpanded: false, loadingMatches: false, matches: [] })); leagueList.value = pageNum === 1 ? formattedList : [...leagueList.value, ...formattedList]; if (res.data.list.length < limit.value) { isNoMore.value = true; } page.value = pageNum; } else { isNoMore.value = true; } } catch (error) { formatAppLog("error", "at pages/Tabbar/SportsBetting/LeagueList/index.vue:185", "Fetch league list failed", error); } finally { isFetching.value = false; } }; const onLoadMore = () => { if (!isNoMore.value) { fetchLeagueList(page.value + 1); } }; const refresh = () => { fetchLeagueList(1); }; __expose({ refresh }); const toggleLeague = async (index) => { const target = leagueList.value[index]; target.isExpanded = !target.isExpanded; if (target.isExpanded && (!target.matches || target.matches.length === 0)) { target.loadingMatches = true; try { const res = await getSportSchedule({ page: 1, limit: 100, league_id: target.league_id }); if (res.code === 1 && res.data && res.data.list) { target.matches = res.data.list.map((item) => { if (typeof item.odds === "string") { try { item.odds = JSON.parse(item.odds); } catch (e) { item.odds = []; } } return item; }); } } catch (e) { formatAppLog("error", "at pages/Tabbar/SportsBetting/LeagueList/index.vue:220", e); } finally { target.loadingMatches = false; } } }; const goDetail = (item) => { router2.push({ name: "sportDetail", query: { data_id: item.data_id } }); }; const translateSelection = (valStr) => String(valStr || ""); const getUniqueKey = (matchId, marketId, selection) => { if (selection.handicap !== null && selection.handicap !== void 0 && selection.handicap !== "") { return `${matchId}_${marketId}_${selection.value}_${selection.handicap}`; } return `${matchId}_${marketId}_${selection.value}`; }; const checkIsLocked = (item) => { if (!item) return true; if (Number(item.is_locked) === 1) return true; if (Number(item.status) !== 1) return true; const state = Number(item.state); if (state !== 0 && state !== 1) return true; return false; }; const isOptionLocked = (item, opt) => { if (checkIsLocked(item)) return true; if (item && item.odd_ids_locked && item.odds && item.odds.length > 0) { let lockedIds = item.odd_ids_locked; if (typeof lockedIds === "string") { try { lockedIds = JSON.parse(lockedIds); } catch (e) { lockedIds = []; } } const currentMarketId = item.odds[0].id; if (Array.isArray(lockedIds) && lockedIds.map(Number).includes(Number(currentMarketId))) { return true; } } if (!opt) return true; if (!opt.odd || opt.odd === "-" || Number(opt.odd) === 0) return true; if (opt.suspended === true || String(opt.suspended).toLowerCase() === "true") return true; return false; }; const isSelected = (matchId, marketId, selection) => { if (!selection) return false; const uniqueKey = getUniqueKey(matchId, marketId, selection); return !!selectedMap.value[uniqueKey]; }; const handleOddsClick = (item, selection) => { if (isOptionLocked(item, selection)) return; if (!item.odds || item.odds.length === 0) return; const market = item.odds[0]; const uniqueKey = getUniqueKey(item.id, market.id, selection); if (selectedMap.value[uniqueKey]) { orderStore.removeOrderItemByKey(uniqueKey); } else { if (market.values) { market.values.forEach((wsItem) => { const otherKey = getUniqueKey(item.id, market.id, wsItem); if (selectedMap.value[otherKey]) { orderStore.removeOrderItemByKey(otherKey); } }); } const betItem = { matchId: item.id, data_id: item.data_id, league: item.league, league_en: item.league_en, homeTeam: item.home_team, home_team_en: item.home_team_en, guestTeam: item.guest_team, guest_team_en: item.guest_team_en, betType: market.name, betTypeEn: market.name_en, betTypeName: selection.value_text, betTypeNameEn: selection.value, handicap: selection.handicap, handicap_text: selection.handicap_text, odds: selection.odd, score: item.score, state: item.state, status: item.status, is_roll: item.is_roll, is_locked: item.is_locked, uniqueKey, optionValue: selection.value, marketId: market.id, mininum: market.mininum, // 新增:最低限额 maxinum: market.maxinum, // 新增:最高限额 selection: { ...selection } }; orderStore.addOrderItem(betItem); uni.vibrateShort(); } }; const syncFromStore = () => { const map = {}; if (orderStore.selectOrders && orderStore.selectOrders.length) { orderStore.selectOrders.forEach((order) => { if (order.uniqueKey) map[order.uniqueKey] = true; }); } selectedMap.value = map; }; vue.watch(() => orderStore.selectOrders, () => { syncFromStore(); }, { deep: true }); const getStatusText = (state) => { const states = { 0: t2("未开始"), 1: t2("进行中"), 2: t2("已完场"), 3: t2("延期"), 4: t2("取消") }; return states[state] || ""; }; const __returned__ = { t: t2, locale, router: router2, orderStore, props, leagueList, page, limit, isFetching, isNoMore, selectedMap, fetchLeagueList, onLoadMore, refresh, toggleLeague, goDetail, translateSelection, getUniqueKey, checkIsLocked, isOptionLocked, isSelected, handleOddsClick, syncFromStore, getStatusText, ref: vue.ref, watch: vue.watch, onMounted: vue.onMounted, get useI18n() { return useI18n; }, get getLeagueList() { return getLeagueList; }, get getSportSchedule() { return getSportSchedule; }, get useOrderStore() { return useOrderStore; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_image = __unplugin_components_1$1; const _component_u_icon = __unplugin_components_0$5; const _component_u_loading = __unplugin_components_3$3; const _component_u_tag = __unplugin_components_2$2; const _component_u_empty = __unplugin_components_4$2; return vue.openBlock(), vue.createElementBlock( "scroll-view", { class: "league-scroll-view", "scroll-y": "", onScrolltolower: $setup.onLoadMore }, [ vue.createElementVNode("view", { class: "league-list-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.leagueList, (league, lIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: "league-group", key: league.id }, [ vue.createElementVNode("view", { class: "league-header", onClick: ($event) => $setup.toggleLeague(lIndex) }, [ vue.createElementVNode("view", { class: "l-left" }, [ vue.createVNode(_component_u_image, { src: league.logo, width: "24px", height: "24px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "l-name" }, vue.toDisplayString($setup.locale === "zh" ? league.league : league.league_en), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "l-right" }, [ vue.createElementVNode( "text", { class: "l-count" }, vue.toDisplayString(league.sport_count), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: league.isExpanded ? "arrow-up" : "arrow-down", color: "#999", size: "14", style: { "margin-left": "6px" } }, null, 8, ["name"]) ]) ], 8, ["onClick"]), league.isExpanded ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "league-matches" }, [ league.loadingMatches ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "loading-wrap" }, [ vue.createVNode(_component_u_loading, { mode: "circle", color: "#f8b932" }) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "matches-wrap" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(league.matches, (item, index) => { var _a2, _b2, _c; return vue.openBlock(), vue.createElementBlock("view", { class: "match-card", key: item.data_id || item.id, onClick: ($event) => $setup.goDetail(item) }, [ vue.createElementVNode("view", { class: "league-info" }, [ vue.createElementVNode("view", { class: "league-left" }, [ vue.createCommentVNode(' '), vue.createCommentVNode(' '), vue.createVNode(_component_u_tag, { size: "mini", type: item.state === 0 ? "info" : "warning" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.getStatusText(item.state)), 1 /* TEXT */ ) ]), _: 2 /* DYNAMIC */ }, 1032, ["type"]), vue.createCommentVNode(` {{ locale === 'zh' ? item.league : item.league_en }} `) ]), item.state === 1 && item.fixture_status ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createVNode(_component_u_tag, { text: $setup.t((_a2 = item.fixture_status) == null ? void 0 : _a2.long), mode: "plain", type: "primary", size: "mini" }, null, 8, ["text"]), item.is_roll === 1 ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 0, text: $setup.t("滚球"), mode: "plain", type: "primary", size: "mini", style: { "margin-left": "6px" } }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "match-time-status" }, [ item.fixture_status ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, [ ((_b2 = item.fixture_status) == null ? void 0 : _b2.seconds) ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0 }, vue.toDisplayString((_c = item.fixture_status) == null ? void 0 : _c.seconds), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "match-time" }, vue.toDisplayString(item.game_time || "--:--"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "team-item" }, [ vue.createVNode(_component_u_image, { src: item.home_team_logo, width: "28px", height: "28px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "team-name", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? item.home_team : item.home_team_en) + " ", 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "success", style: { "margin-top": "-2px", "margin-left": "4px" }, text: $setup.t("主") }, null, 8, ["text"]) ]), item.state !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "team-score" }, vue.toDisplayString(item.score && item.score !== "-" ? item.score.split("-")[0] : "0"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "team-item" }, [ vue.createVNode(_component_u_image, { src: item.guest_team_logo, width: "28px", height: "28px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "team-name", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? item.guest_team : item.guest_team_en) + " ", 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "error", style: { "margin-left": "4px", "margin-top": "-2px" }, text: $setup.t("客") }, null, 8, ["text"]) ]), item.state !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "team-score" }, vue.toDisplayString(item.score && item.score !== "-" ? item.score.split("-")[1] : "0"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), [0, 1].includes(item.state) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-group" }, [ item.odds && item.odds.length > 0 && item.odds[0].values ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.odds[0].values.slice(0, 3), (opt, optIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["odds-btn compact-btn", { "is-active": $setup.isSelected(item.id, item.odds[0].id, opt), "is-locked": $setup.isOptionLocked(item, opt) }]), key: optIndex, onClick: vue.withModifiers(($event) => $setup.handleOddsClick(item, opt), ["stop"]) }, [ $setup.isOptionLocked(item, opt) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "locked-overlay" }, [ vue.createVNode(_component_u_icon, { name: "lock", color: "#fff", size: "24" }) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "btn-top" }, [ vue.createElementVNode( "text", { class: "selection-name" }, vue.toDisplayString($setup.translateSelection($setup.locale === "zh" ? opt.value_text : opt.value)), 1 /* TEXT */ ), opt.handicap_text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "selection-handicap" }, vue.toDisplayString(opt.handicap_text), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btn-bottom" }, [ vue.createElementVNode("view", { class: "odds-val", style: { "display": "flex" } }, [ vue.createElementVNode( "span", null, vue.toDisplayString(opt.odd || "-"), 1 /* TEXT */ ) ]) ]) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "match-footer-tip" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.getStatusText(item.state)), 1 /* TEXT */ ) ])), vue.createElementVNode("view", { class: "match-footer-bar", onClick: vue.withModifiers(($event) => $setup.goDetail(item), ["stop"]) }, [ vue.createElementVNode( "text", { class: "footer-text" }, vue.toDisplayString($setup.t("全部玩法")) + " " + vue.toDisplayString(item.odds_count ? `(${item.odds_count})` : ""), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-right", color: "#999", size: "12", style: { "margin-left": "4px" } }) ], 8, ["onClick"]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), !league.matches || league.matches.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "empty-box" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无赛事数据"), mode: "data" }, null, 8, ["text"]) ])) : vue.createCommentVNode("v-if", true) ])) ])) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )), $setup.leagueList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "loading-more" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.isNoMore ? $setup.t("没有更多了") : $setup.t("正在加载")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ], 32 /* NEED_HYDRATION */ ); } const LeagueList = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-4130ae5c"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/SportsBetting/LeagueList/index.vue"]]); const MIN_NEW_ITEMS$1 = 10; const TIME_INCREMENT_MS = 6e4; const itemHeight = 220; const _sfc_main$X = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const orderStore = useOrderStore(); const WebsocketData = useWebsocketDataStore(); const sportList = vue.ref([]); const skeletonLoading = vue.ref(true); const router2 = useRouter(); const currentDate = vue.ref(""); const isAndroid = uni.getSystemInfoSync().platform === "android"; const keyword = vue.ref(""); const currentSportIndex = vue.ref(0); const sportCategoryList = vue.ref([ { name: "足球", icon: "⚽️", value: 1 }, { name: "篮球", icon: "🏀", value: 2 }, { name: "网球", icon: "🎾", value: 3 }, { name: "排球", icon: "🏐", value: 4 }, { name: "羽毛球", icon: "🏸", value: 5 }, { name: "乒乓球", icon: "🏓", value: 6 }, { name: "电竞", icon: "🎮", value: 7 } ]); const leagueListRef = vue.ref(null); const onSearch = () => { if (currentState.value === "league") { if (leagueListRef.value) { leagueListRef.value.refresh(); } return; } onQuery(1, currentLimit.value); }; const onSportCategoryChange = (index) => { currentSportIndex.value = index; formatAppLog("log", "at pages/Tabbar/SportsBetting/index.vue:234", "选择的体育分类:", sportCategoryList.value[index].name); }; const isNoMore = vue.ref(false); const isFetching = vue.ref(false); const currentPage = vue.ref(1); const currentLimit = vue.ref(20); let currentQueryId = 0; const scrollTop = vue.ref(0); const scrollTopValue = vue.ref(0); const containerHeight = vue.ref(800); const onScroll = (e) => { scrollTop.value = e.detail.scrollTop; }; const startIndex = vue.computed(() => { let index = Math.floor(scrollTop.value / itemHeight) - 3; let count = Math.ceil(containerHeight.value / itemHeight) + 5; let maxIndex = Math.max(0, sportList.value.length - count); return Math.max(0, Math.min(index, maxIndex)); }); const endIndex = vue.computed(() => { let count = Math.ceil(containerHeight.value / itemHeight) + 5; return Math.min(sportList.value.length, startIndex.value + count); }); const visibleSportList = vue.computed(() => { if (isAndroid) return sportList.value; return sportList.value.slice(startIndex.value, endIndex.value); }); const listPaddingTop = vue.computed(() => { if (isAndroid) return 0; return startIndex.value * itemHeight; }); const listPaddingBottom = vue.computed(() => { if (isAndroid) return 0; return (sportList.value.length - endIndex.value) * itemHeight; }); vue.onMounted(() => { onQuery(1, currentLimit.value); vue.nextTick(() => { uni.createSelectorQuery().select(".scroll-view-container").boundingClientRect((rect) => { if (rect && rect.height) { containerHeight.value = rect.height; } }).exec(); }); }); const onLoadMore = () => { if (isNoMore.value || isFetching.value || skeletonLoading.value) return; onQuery(currentPage.value + 1, currentLimit.value); }; const oddsChangeMap = vue.ref(/* @__PURE__ */ new Map()); const getOddsKey = (matchId, marketId, selection) => { if (selection.handicap !== null && selection.handicap !== void 0 && selection.handicap !== "") { return `${matchId}_${marketId}_${selection.value}_${selection.handicap}`; } return `${matchId}_${marketId}_${selection.value}`; }; const isOddsUp = (key) => { const change = oddsChangeMap.value.get(key); return (change == null ? void 0 : change.direction) === "up" && Date.now() - change.timestamp < 3e3; }; const isOddsDown = (key) => { const change = oddsChangeMap.value.get(key); return (change == null ? void 0 : change.direction) === "down" && Date.now() - change.timestamp < 3e3; }; const showChangeIcon = (key) => { const change = oddsChangeMap.value.get(key); return change && Date.now() - change.timestamp < 3e3; }; const goDetail = (item) => { router2.push({ name: "sportDetail", query: { data_id: item.data_id } }); }; const tabList = vue.computed(() => [ { name: t2("联赛"), value: "league" }, { name: t2("进行中"), value: 1 }, { name: t2("未开始"), value: 0 }, { name: t2("已完场"), value: 2 }, { name: t2("其他"), value: 4 } ]); const currentTabIndex = vue.ref(1); const currentState = vue.ref(1); const selectedMap = vue.ref({}); vue.watch(() => WebsocketData.data, handleWebsocketData); const translateSelection = (valStr) => { if (valStr === void 0 || valStr === null) return ""; return String(valStr); }; const getUniqueKey = (matchId, marketId, selection) => { if (selection.handicap !== null && selection.handicap !== void 0 && selection.handicap !== "") { return `${matchId}_${marketId}_${selection.value}_${selection.handicap}`; } return `${matchId}_${marketId}_${selection.value}`; }; const checkIsLocked = (item) => { if (!item) return true; if (Number(item.is_locked) === 1) return true; if (Number(item.status) !== 1) return true; const state = Number(item.state); if (state !== 0 && state !== 1) return true; return false; }; const isOptionLocked = (item, opt) => { if (checkIsLocked(item)) return true; if (item && item.odd_ids_locked && item.odds && item.odds.length > 0) { let lockedIds = item.odd_ids_locked; if (typeof lockedIds === "string") { try { lockedIds = JSON.parse(lockedIds); } catch (e) { lockedIds = []; } } const currentMarketId = item.odds[0].id; if (Array.isArray(lockedIds) && lockedIds.map(Number).includes(Number(currentMarketId))) { return true; } } if (!opt) return true; if (!opt.odd || opt.odd === "-" || Number(opt.odd) === 0) return true; if (opt.suspended === true || String(opt.suspended).toLowerCase() === "true") return true; return false; }; const syncFromStore = () => { const map = {}; if (orderStore.selectOrders && orderStore.selectOrders.length) { orderStore.selectOrders.forEach((order) => { if (order.uniqueKey) { map[order.uniqueKey] = true; } }); } selectedMap.value = map; }; vue.watch(() => orderStore.selectOrders, () => { syncFromStore(); }, { deep: true, immediate: true }); function handleWebsocketData(data) { if (currentState.value === "league") return; try { const res = typeof data === "string" ? JSON.parse(data) : data; if (res.type === "sport_list" && Array.isArray(res.message)) { res.message.forEach((newMatch) => { var _a2; const idx = sportList.value.findIndex((item) => item.data_id === newMatch.data_id); if (idx !== -1) { const oldMatch = sportList.value[idx]; let parsedOdds = newMatch.odds; if (typeof parsedOdds === "string") { try { parsedOdds = JSON.parse(parsedOdds); } catch (e) { parsedOdds = []; } } else if (!parsedOdds) { parsedOdds = oldMatch.odds; } if (oldMatch && ((_a2 = oldMatch.odds) == null ? void 0 : _a2[0]) && (parsedOdds == null ? void 0 : parsedOdds[0])) { const oldMarket = oldMatch.odds[0]; const newMarket = parsedOdds[0]; if (oldMarket.values && newMarket.values) { newMarket.values.forEach((newOpt) => { const oldOpt = oldMarket.values.find( (o) => o.value === newOpt.value && (o.handicap == newOpt.handicap || !o.handicap && !newOpt.handicap) ); if ((oldOpt == null ? void 0 : oldOpt.odd) && (newOpt == null ? void 0 : newOpt.odd)) { const oldOddNum = parseFloat(oldOpt.odd); const newOddNum = parseFloat(newOpt.odd); if (!isNaN(oldOddNum) && !isNaN(newOddNum) && oldOddNum !== newOddNum) { const marketId = newMarket.id || oldMarket.id; const matchId = oldMatch.id || oldMatch.data_id; const key = getOddsKey(matchId, marketId, newOpt); const direction = newOddNum > oldOddNum ? "up" : "down"; oddsChangeMap.value.set(key, { direction, timestamp: Date.now() }); let timer = setTimeout(() => { oddsChangeMap.value.delete(key); clearTimeout(timer); }, 3100); } } }); } } const isStateChanged = newMatch.state !== void 0 && Number(newMatch.state) !== Number(currentState.value); const isStatusOffline = newMatch.status !== void 0 && Number(newMatch.status) === 0; if (isStateChanged || isStatusOffline) { sportList.value.splice(idx, 1); } else { if (typeof parsedOdds === "string") { try { parsedOdds = JSON.parse(parsedOdds); } catch (e) { parsedOdds = []; } } else if (!parsedOdds) { parsedOdds = sportList.value[idx].odds; } let parsedLockedIds = newMatch.odd_ids_locked; if (typeof parsedLockedIds === "string") { try { parsedLockedIds = JSON.parse(parsedLockedIds); } catch (e) { parsedLockedIds = []; } } else if (parsedLockedIds === void 0) { parsedLockedIds = sportList.value[idx].odd_ids_locked || []; } sportList.value[idx] = { ...sportList.value[idx], ...newMatch, odds: parsedOdds, odd_ids_locked: parsedLockedIds }; if (sportList.value[idx].odds && sportList.value[idx].odds.length > 0) { const market = sportList.value[idx].odds[0]; if (market.values) { market.values.forEach((wsItem) => { if (isOptionLocked(sportList.value[idx], wsItem)) { const uniqueKey = getUniqueKey(sportList.value[idx].id, market.id, wsItem); } }); } } orderStore.updateMatchStatus(newMatch.data_id, sportList.value[idx]); } } else { const isStateMatching = newMatch.state !== void 0 && Number(newMatch.state) === Number(currentState.value); const isStatusOnline = newMatch.status === void 0 || Number(newMatch.status) === 1; if (isStateMatching && isStatusOnline) { let parsedOdds = newMatch.odds; if (typeof parsedOdds === "string") { try { parsedOdds = JSON.parse(parsedOdds); } catch (e) { parsedOdds = []; } } else if (!parsedOdds) { parsedOdds = []; } let parsedLockedIds = newMatch.odd_ids_locked; if (typeof parsedLockedIds === "string") { try { parsedLockedIds = JSON.parse(parsedLockedIds); } catch (e) { parsedLockedIds = []; } } else if (parsedLockedIds === void 0) { parsedLockedIds = []; } const formattedNewMatch = { ...newMatch, odds: parsedOdds, odd_ids_locked: parsedLockedIds }; sportList.value.push(formattedNewMatch); sportList.value.sort((a, b) => { const timeA = a.game_time ? new Date(a.game_time.replace(/-/g, "/")).getTime() : 0; const timeB = b.game_time ? new Date(b.game_time.replace(/-/g, "/")).getTime() : 0; return timeA - timeB; }); } } }); } } catch (error) { formatAppLog("error", "at pages/Tabbar/SportsBetting/index.vue:502", "WebSocket解析错误:", error); } } const setupSocketListener = () => { uni.$on("onSocketMessage", handleWebsocketData); }; const removeSocketListener = () => { }; onShow(() => { syncFromStore(); }); vue.onUnmounted(() => { }); const getTodayStr = () => { const d = /* @__PURE__ */ new Date(); const y = d.getFullYear(); const m = String(d.getMonth() + 1).padStart(2, "0"); const day = String(d.getDate()).padStart(2, "0"); return `${y}-${m}-${day}`; }; async function onQuery(pageNo, pageSize) { if (currentState.value === "league") return; const queryId = ++currentQueryId; try { if (pageNo === 1) { isNoMore.value = false; scrollTopValue.value = scrollTopValue.value === 0 ? -0.1 : 0; scrollTop.value = 0; currentPage.value = 1; skeletonLoading.value = true; sportList.value = []; } else { if (isFetching.value || isNoMore.value) return; } isFetching.value = true; let accumulatedNewItems = []; let currentApiGameTime = null; let attemptCount = 0; const maxAttempts = 5; if (pageNo > 1 && sportList.value.length > 0) { const lastItem = sportList.value[sportList.value.length - 1]; if (lastItem && lastItem.game_time) { currentApiGameTime = lastItem.game_time; } } let targetCount = pageNo === 1 ? pageSize : MIN_NEW_ITEMS$1; while (accumulatedNewItems.length < targetCount && !isNoMore.value && attemptCount < maxAttempts) { if (queryId !== currentQueryId) return; attemptCount++; const params = { page: 1, limit: pageSize, state: currentState.value }; if (keyword.value) { params.keyword = keyword.value; } if (currentApiGameTime) { params.game_time = currentApiGameTime; } const dateObj = { start_time: currentDate.value, end_time: currentDate.value }; if (currentTabIndex.value === 2 || currentTabIndex.value === 3) { Object.assign(params, dateObj); } const res = await getSportSchedule(params); if (queryId !== currentQueryId) return; if (res.code === 1 && res.data.list && res.data.list.length > 0) { const rawList = res.data.list; const formatList = rawList.map((item) => { if (typeof item.odds === "string") { try { item.odds = JSON.parse(item.odds); } catch (e) { item.odds = []; } } return item; }); const existingIds = /* @__PURE__ */ new Set([ ...pageNo === 1 ? [] : sportList.value.map((i) => i.id), ...accumulatedNewItems.map((i) => i.id) ]); const newItems = formatList.filter((item) => !existingIds.has(item.id)); accumulatedNewItems = accumulatedNewItems.concat(newItems); if (rawList.length < pageSize) { isNoMore.value = true; } else { if (newItems.length === 0) { let baseTimeStr = currentApiGameTime || rawList[rawList.length - 1].game_time; if (baseTimeStr) { let dateVal = new Date(baseTimeStr.replace(/-/g, "/")); if (!isNaN(dateVal.getTime())) { dateVal = new Date(dateVal.getTime() + TIME_INCREMENT_MS); const y = dateVal.getFullYear(); const m = String(dateVal.getMonth() + 1).padStart(2, "0"); const d = String(dateVal.getDate()).padStart(2, "0"); const h = String(dateVal.getHours()).padStart(2, "0"); const min = String(dateVal.getMinutes()).padStart(2, "0"); const s = String(dateVal.getSeconds()).padStart(2, "0"); currentApiGameTime = `${y}-${m}-${d} ${h}:${min}:${s}`; } else { currentApiGameTime = rawList[rawList.length - 1].game_time; } } } else { currentApiGameTime = rawList[rawList.length - 1].game_time; } } } else { isNoMore.value = true; } } if (queryId === currentQueryId) { if (pageNo === 1) { sportList.value = accumulatedNewItems; } else { sportList.value = sportList.value.concat(accumulatedNewItems); } currentPage.value = pageNo; skeletonLoading.value = false; isFetching.value = false; } } catch (error) { if (queryId === currentQueryId) { isNoMore.value = true; skeletonLoading.value = false; isFetching.value = false; } } } const onTabChange = (index) => { currentTabIndex.value = index; const selectedTab = tabList.value[index]; if (selectedTab) { currentState.value = selectedTab.value; if (currentState.value !== "league") { currentDate.value = getTodayStr(); onQuery(1, currentLimit.value); } } }; const getStatusText = (state) => { const states = { 0: t2("未开始"), 1: t2("进行中"), 2: t2("已完场"), 3: t2("延期"), 4: t2("取消") }; return states[state] || ""; }; const isSelected = (matchId, marketId, selection) => { if (!selection) return false; const uniqueKey = getUniqueKey(matchId, marketId, selection); return !!selectedMap.value[uniqueKey]; }; const handleOddsClick = (item, selection) => { if (isOptionLocked(item, selection)) return; if (!item.odds || item.odds.length === 0) return; const market = item.odds[0]; const uniqueKey = getUniqueKey(item.id, market.id, selection); if (selectedMap.value[uniqueKey]) { orderStore.removeOrderItemByKey(uniqueKey); } else { if (market.values) { market.values.forEach((wsItem) => { const otherKey = getUniqueKey(item.id, market.id, wsItem); if (selectedMap.value[otherKey]) { orderStore.removeOrderItemByKey(otherKey); } }); } const betItem = { matchId: item.id, data_id: item.data_id, league: item.league, league_en: item.league_en, homeTeam: item.home_team, home_team_en: item.home_team_en, guestTeam: item.guest_team, guest_team_en: item.guest_team_en, betType: market.name, betTypeEn: market.name_en, betTypeName: selection.value_text, betTypeNameEn: selection.value, handicap: selection.handicap, handicap_text: selection.handicap_text, odds: selection.odd, score: item.score, state: item.state, status: item.status, is_roll: item.is_roll, is_locked: item.is_locked, uniqueKey, optionValue: selection.value, submit_value: selection.submit_value, marketId: market.id, mininum: market.mininum, // 新增:最低限额 maxinum: market.maxinum, // 新增:最高限额 selection: { ...selection } }; orderStore.addOrderItem(betItem); uni.vibrateShort(); } }; const onDateChange = (e) => { currentDate.value = e; if (currentTabIndex.value === 2 || currentTabIndex.value === 3) { onQuery(1, currentLimit.value); } }; const __returned__ = { t: t2, locale, orderStore, WebsocketData, sportList, skeletonLoading, router: router2, currentDate, isAndroid, keyword, currentSportIndex, sportCategoryList, leagueListRef, onSearch, onSportCategoryChange, isNoMore, isFetching, currentPage, currentLimit, MIN_NEW_ITEMS: MIN_NEW_ITEMS$1, TIME_INCREMENT_MS, get currentQueryId() { return currentQueryId; }, set currentQueryId(v) { currentQueryId = v; }, scrollTop, scrollTopValue, itemHeight, containerHeight, onScroll, startIndex, endIndex, visibleSportList, listPaddingTop, listPaddingBottom, onLoadMore, oddsChangeMap, getOddsKey, isOddsUp, isOddsDown, showChangeIcon, goDetail, tabList, currentTabIndex, currentState, selectedMap, translateSelection, getUniqueKey, checkIsLocked, isOptionLocked, syncFromStore, handleWebsocketData, setupSocketListener, removeSocketListener, getTodayStr, onQuery, onTabChange, getStatusText, isSelected, handleOddsClick, onDateChange, ref: vue.ref, watch: vue.watch, computed: vue.computed, onUnmounted: vue.onUnmounted, onMounted: vue.onMounted, nextTick: vue.nextTick, get useI18n() { return useI18n; }, get onShow() { return onShow; }, get getSportSchedule() { return getSportSchedule; }, get useOrderStore() { return useOrderStore; }, get getLocale() { return getLocale; }, SportDateFilter, get useWebsocketDataStore() { return useWebsocketDataStore; }, get formatRange() { return formatRange; }, LeagueList }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_search = __unplugin_components_0$1; const _component_u_skeleton = __unplugin_components_0$3; const _component_u_image = __unplugin_components_1$1; const _component_u_icon = __unplugin_components_0$5; const _component_u_tag = __unplugin_components_2$2; const _component_u_empty = __unplugin_components_4$2; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("赛事列表") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-content", style: { "display": "flex", "flex-direction": "column" } }, [ vue.createElementVNode( "view", { onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, [ vue.createElementVNode("view", { class: "sticky-tabs" }, [ vue.createElementVNode("view", { class: "search-box" }, [ vue.createVNode(_component_u_search, { placeholder: $setup.t("搜索赛事关键字"), modelValue: $setup.keyword, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.keyword = $event), "show-action": true, "action-text": $setup.t("搜索"), onSearch: $setup.onSearch, onCustom: $setup.onSearch, onClear: $setup.onSearch, "bg-color": "#f5f6fa", shape: "round" }, null, 8, ["placeholder", "modelValue", "action-text"]) ]), vue.createElementVNode("scroll-view", { "scroll-x": "", class: "capsule-tabs-scroll", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "capsule-tabs-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.tabList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["capsule-tab-item", { "is-active": $setup.currentTabIndex === index }]), key: index, onClick: ($event) => $setup.onTabChange(index) }, [ vue.createElementVNode( "text", null, vue.toDisplayString(item.name), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]), vue.withDirectives(vue.createVNode($setup["SportDateFilter"], { state: $setup.tabList[$setup.currentTabIndex].value, date: $setup.currentDate, "onUpdate:date": _cache[1] || (_cache[1] = ($event) => $setup.currentDate = $event), onChange: $setup.onDateChange }, null, 8, ["state", "date"]), [ [vue.vShow, $setup.currentState !== "league" && $setup.currentTabIndex !== 0 && $setup.currentTabIndex !== 1 && $setup.currentTabIndex !== 4] ]) ], 32 /* NEED_HYDRATION */ ), $setup.currentState === "league" ? (vue.openBlock(), vue.createBlock($setup["LeagueList"], { key: 0, keyword: $setup.keyword, ref: "leagueListRef" }, null, 8, ["keyword"])) : vue.createCommentVNode("v-if", true), vue.withDirectives(vue.createElementVNode("scroll-view", { class: "scroll-view-container", "scroll-y": "", "scroll-top": $setup.scrollTopValue, "scroll-with-animation": false, onScrolltolower: $setup.onLoadMore, onScroll: $setup.onScroll }, [ vue.createElementVNode("view", { class: "match-list" }, [ $setup.skeletonLoading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(5, (i) => { return vue.createElementVNode("view", { class: "match-card", key: i }, [ vue.createVNode(_component_u_skeleton, { loading: true, animate: true, rows: "3", title: "", avatar: "", "avatar-size": 28 }) ]); }), 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, style: vue.normalizeStyle({ paddingTop: $setup.listPaddingTop + "px", paddingBottom: $setup.listPaddingBottom + "px" }) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.visibleSportList, (item, index) => { var _a2, _b2, _c; return vue.openBlock(), vue.createElementBlock("view", { class: "match-card", key: item.data_id || item.id, onClick: ($event) => $setup.goDetail(item) }, [ vue.createElementVNode("view", { class: "league-info" }, [ vue.createElementVNode("view", { class: "league-left" }, [ item.league_logo ? (vue.openBlock(), vue.createBlock(_component_u_image, { key: 0, src: item.league_logo, width: "16px", height: "16px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 1, name: "grid-fill", color: "#f8b932", size: "16" })), vue.createElementVNode( "text", { class: "league-name" }, vue.toDisplayString($setup.locale === "zh" ? item.league : item.league_en), 1 /* TEXT */ ) ]), item.state === 1 && item.fixture_status ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createVNode(_component_u_tag, { text: $setup.t((_a2 = item.fixture_status) == null ? void 0 : _a2.long), mode: "plain", type: "primary", size: "mini" }, null, 8, ["text"]), item.is_roll === 1 ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 0, text: $setup.t("滚球"), mode: "plain", type: "primary", size: "mini", style: { "margin-left": "6px" } }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "match-time-status" }, [ item.fixture_status ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, [ ((_b2 = item.fixture_status) == null ? void 0 : _b2.seconds) ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0 }, vue.toDisplayString((_c = item.fixture_status) == null ? void 0 : _c.seconds), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "match-time" }, vue.toDisplayString(item.game_time || "--:--"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "team-item" }, [ vue.createVNode(_component_u_image, { src: item.home_team_logo, width: "28px", height: "28px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "team-name", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? item.home_team : item.home_team_en) + " ", 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "success", style: { "margin-top": "-2px", "margin-left": "4px" }, text: $setup.t("主") }, null, 8, ["text"]) ]), item.state !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "team-score" }, vue.toDisplayString(item.score && item.score !== "-" ? item.score.split("-")[0] : "0"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "team-item" }, [ vue.createVNode(_component_u_image, { src: item.guest_team_logo, width: "28px", height: "28px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "team-name", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? item.guest_team : item.guest_team_en) + " ", 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "error", style: { "margin-left": "4px", "margin-top": "-2px" }, text: $setup.t("客") }, null, 8, ["text"]) ]), item.state !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "team-score" }, vue.toDisplayString(item.score && item.score !== "-" ? item.score.split("-")[1] : "0"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), [0, 1].includes(item.state) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-group" }, [ item.odds && item.odds.length > 0 && item.odds[0].values ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.odds[0].values.slice(0, 3), (opt, optIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["odds-btn compact-btn", { "is-active": $setup.isSelected(item.id, item.odds[0].id, opt), "odds-up": $setup.isOddsUp($setup.getOddsKey(item.id, item.odds[0].id, opt)) && !$setup.isOptionLocked(item, opt), "odds-down": $setup.isOddsDown($setup.getOddsKey(item.id, item.odds[0].id, opt)) && !$setup.isOptionLocked(item, opt), "is-locked": $setup.isOptionLocked(item, opt) }]), key: optIndex, onClick: vue.withModifiers(($event) => $setup.handleOddsClick(item, opt), ["stop"]) }, [ $setup.isOptionLocked(item, opt) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "locked-overlay" }, [ vue.createVNode(_component_u_icon, { name: "lock", color: "#fff", size: "24" }) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "btn-top" }, [ vue.createElementVNode( "text", { class: "selection-name" }, vue.toDisplayString($setup.translateSelection($setup.locale === "zh" ? opt.value_text : opt.value)), 1 /* TEXT */ ), opt.handicap_text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "selection-handicap" }, vue.toDisplayString(opt.handicap_text), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btn-bottom" }, [ vue.createElementVNode("view", { class: "odds-val", style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode( "span", null, vue.toDisplayString(opt.odd || "-"), 1 /* TEXT */ ), $setup.showChangeIcon($setup.getOddsKey(item.id, item.odds[0].id, opt)) && !$setup.isOptionLocked(item, opt) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["change-icon", { up: $setup.isOddsUp($setup.getOddsKey(item.id, item.odds[0].id, opt)), down: $setup.isOddsDown($setup.getOddsKey(item.id, item.odds[0].id, opt)) }]) }, [ vue.withDirectives(vue.createVNode( _component_u_icon, { name: "arrow-up-fill", size: "12" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.isOddsUp($setup.getOddsKey(item.id, item.odds[0].id, opt))] ]), vue.withDirectives(vue.createVNode( _component_u_icon, { name: "arrow-down-fill", size: "12" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, !$setup.isOddsUp($setup.getOddsKey(item.id, item.odds[0].id, opt))] ]) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ]) ]) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "match-footer-tip" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.getStatusText(item.state)), 1 /* TEXT */ ) ])), item.state === 0 || item.state === 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "match-footer-bar", onClick: vue.withModifiers(($event) => $setup.goDetail(item), ["stop"]) }, [ vue.createElementVNode( "text", { class: "footer-text" }, vue.toDisplayString($setup.t("全部玩法")) + " " + vue.toDisplayString(item.odds_count ? `(${item.odds_count})` : ""), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-right", color: "#999", size: "12", style: { "margin-left": "4px" } }) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ )) ]), $setup.sportList.length === 0 && !$setup.skeletonLoading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "empty-box" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无赛事数据"), mode: "data", "icon-size": "100" }, null, 8, ["text"]) ])) : vue.createCommentVNode("v-if", true), $setup.sportList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "loading-more" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.isNoMore ? $setup.t("没有更多了") : $setup.t("正在加载")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { style: { "height": "50px" } }), vue.createElementVNode("view", { class: "digital-bottom" }) ], 40, ["scroll-top"]), [ [vue.vShow, $setup.currentState !== "league"] ]) ]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesTabbarSportsBettingIndex = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__scopeId", "data-v-e5399539"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/SportsBetting/index.vue"]]); const MIN_NEW_ITEMS = 10; const _sfc_main$W = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const orderStore = useOrderStore(); const WebsocketData = useWebsocketDataStore(); const sportList = vue.ref([]); const skeletonLoading = vue.ref(true); const router2 = useRouter(); const currentSportIndex = vue.ref(0); const sportCategoryList = vue.ref([ { name: "足球", icon: "⚽️", value: 1 }, { name: "篮球", icon: "🏀", value: 2 }, { name: "网球", icon: "🎾", value: 3 }, { name: "排球", icon: "🏐", value: 4 }, { name: "羽毛球", icon: "🏸", value: 5 }, { name: "乒乓球", icon: "🏓", value: 6 }, { name: "电竞", icon: "🎮", value: 7 } ]); const onSportCategoryChange = (index) => { currentSportIndex.value = index; formatAppLog("log", "at pages/Tabbar/WorldCup/index.vue:188", "选择的体育分类:", sportCategoryList.value[index].name); }; const isTriggered = vue.ref(false); const isNoMore = vue.ref(false); const isFetching = vue.ref(false); const currentPage = vue.ref(1); const currentLimit = vue.ref(20); let currentQueryId = 0; const activeDateTab = vue.ref(""); const intoViewId = vue.ref(""); const dateTabs = vue.computed(() => { const dates = []; const dateSet = /* @__PURE__ */ new Set(); sportList.value.forEach((item) => { if (item.game_time) { const datePart = item.game_time.split(" ")[0]; if (!dateSet.has(datePart)) { dateSet.add(datePart); dates.push(datePart); } } }); return dates; }); vue.watch(dateTabs, (newVal) => { if (newVal.length > 0 && !activeDateTab.value) { activeDateTab.value = newVal[0]; } }); const scrollToDate = (datePart) => { activeDateTab.value = datePart; const targetItem = sportList.value.find((item) => item.game_time && item.game_time.split(" ")[0] === datePart); if (targetItem) { intoViewId.value = ""; vue.nextTick(() => { intoViewId.value = "match-" + (targetItem.data_id || targetItem.id); }); } }; const formatDateInfo = (dateStr) => { if (!dateStr) return { topText: "", bottomText: "" }; const [year, month, day] = dateStr.split("-"); const dateObj = new Date(dateStr.replace(/-/g, "/")); const daysArr = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]; const dayOfWeek = daysArr[dateObj.getDay()]; const today = /* @__PURE__ */ new Date(); const isToday = today.getFullYear() === parseInt(year) && today.getMonth() + 1 === parseInt(month) && today.getDate() === parseInt(day); return { topText: isToday ? t2("今天") : t2(dayOfWeek), bottomText: `${month}/${day}` }; }; vue.onMounted(() => { onQuery(1, currentLimit.value); }); const oddsChangeMap = vue.ref(/* @__PURE__ */ new Map()); const getOddsKey = (matchId, marketId, selection) => { if (selection.handicap !== null && selection.handicap !== void 0 && selection.handicap !== "") { return `${matchId}_${marketId}_${selection.value}_${selection.handicap}`; } return `${matchId}_${marketId}_${selection.value}`; }; const isOddsUp = (key) => { const change = oddsChangeMap.value.get(key); return (change == null ? void 0 : change.direction) === "up" && Date.now() - change.timestamp < 3e3; }; const isOddsDown = (key) => { const change = oddsChangeMap.value.get(key); return (change == null ? void 0 : change.direction) === "down" && Date.now() - change.timestamp < 3e3; }; const showChangeIcon = (key) => { const change = oddsChangeMap.value.get(key); return change && Date.now() - change.timestamp < 3e3; }; const goDetail = (item) => { router2.push({ name: "sportDetail", query: { data_id: item.data_id } }); }; const selectedMap = vue.ref({}); vue.watch(() => WebsocketData.data, handleWebsocketData); const translateSelection = (valStr) => { if (valStr === void 0 || valStr === null) return ""; return String(valStr); }; const getUniqueKey = (matchId, marketId, selection) => { if (selection.handicap !== null && selection.handicap !== void 0 && selection.handicap !== "") { return `${matchId}_${marketId}_${selection.value}_${selection.handicap}`; } return `${matchId}_${marketId}_${selection.value}`; }; const checkIsLocked = (item) => { if (!item) return true; if (Number(item.is_locked) === 1) return true; if (Number(item.status) !== 1) return true; const state = Number(item.state); if (state !== 0 && state !== 1) return true; return false; }; const isOptionLocked = (item, opt) => { if (checkIsLocked(item)) return true; if (item && item.odd_ids_locked && item.odds && item.odds.length > 0) { let lockedIds = item.odd_ids_locked; if (typeof lockedIds === "string") { try { lockedIds = JSON.parse(lockedIds); } catch (e) { lockedIds = []; } } const currentMarketId = item.odds[0].id; if (Array.isArray(lockedIds) && lockedIds.map(Number).includes(Number(currentMarketId))) { return true; } } if (!opt) return true; if (!opt.odd || opt.odd === "-" || Number(opt.odd) === 0) return true; if (opt.suspended === true || String(opt.suspended).toLowerCase() === "true") return true; return false; }; const syncFromStore = () => { const map = {}; if (orderStore.selectOrders && orderStore.selectOrders.length) { orderStore.selectOrders.forEach((order) => { if (order.uniqueKey) { map[order.uniqueKey] = true; } }); } selectedMap.value = map; }; vue.watch(() => orderStore.selectOrders, () => { syncFromStore(); }, { deep: true, immediate: true }); function handleWebsocketData(data) { try { const res = typeof data === "string" ? JSON.parse(data) : data; if (res.type === "sport_list" && Array.isArray(res.message)) { res.message.forEach((newMatch) => { var _a2; if (newMatch.league_id !== 1) return; const idx = sportList.value.findIndex((item) => item.data_id === newMatch.data_id); if (idx !== -1) { const oldMatch = sportList.value[idx]; let parsedOdds = newMatch.odds; if (typeof parsedOdds === "string") { try { parsedOdds = JSON.parse(parsedOdds); } catch (e) { parsedOdds = []; } } else if (!parsedOdds) { parsedOdds = oldMatch.odds; } if (oldMatch && ((_a2 = oldMatch.odds) == null ? void 0 : _a2[0]) && (parsedOdds == null ? void 0 : parsedOdds[0])) { const oldMarket = oldMatch.odds[0]; const newMarket = parsedOdds[0]; if (oldMarket.values && newMarket.values) { newMarket.values.forEach((newOpt) => { const oldOpt = oldMarket.values.find( (o) => o.value === newOpt.value && (o.handicap == newOpt.handicap || !o.handicap && !newOpt.handicap) ); if ((oldOpt == null ? void 0 : oldOpt.odd) && (newOpt == null ? void 0 : newOpt.odd)) { const oldOddNum = parseFloat(oldOpt.odd); const newOddNum = parseFloat(newOpt.odd); if (!isNaN(oldOddNum) && !isNaN(newOddNum) && oldOddNum !== newOddNum) { const marketId = newMarket.id || oldMarket.id; const matchId = oldMatch.id || oldMatch.data_id; const key = getOddsKey(matchId, marketId, newOpt); const direction = newOddNum > oldOddNum ? "up" : "down"; oddsChangeMap.value.set(key, { direction, timestamp: Date.now() }); let timer = setTimeout(() => { oddsChangeMap.value.delete(key); clearTimeout(timer); }, 3100); } } }); } } if (typeof parsedOdds === "string") { try { parsedOdds = JSON.parse(parsedOdds); } catch (e) { parsedOdds = []; } } else if (!parsedOdds) { parsedOdds = sportList.value[idx].odds; } let parsedLockedIds = newMatch.odd_ids_locked; if (typeof parsedLockedIds === "string") { try { parsedLockedIds = JSON.parse(parsedLockedIds); } catch (e) { parsedLockedIds = []; } } else if (parsedLockedIds === void 0) { parsedLockedIds = sportList.value[idx].odd_ids_locked || []; } sportList.value[idx] = { ...sportList.value[idx], ...newMatch, odds: parsedOdds, odd_ids_locked: parsedLockedIds }; if (sportList.value[idx].odds && sportList.value[idx].odds.length > 0) { const market = sportList.value[idx].odds[0]; if (market.values) { market.values.forEach((wsItem) => { if (isOptionLocked(sportList.value[idx], wsItem)) { const uniqueKey = getUniqueKey(sportList.value[idx].id, market.id, wsItem); } }); } } orderStore.updateMatchStatus(newMatch.data_id, sportList.value[idx]); } else { const isStatusOnline = newMatch.status === void 0 || Number(newMatch.status) === 1; if (isStatusOnline) { let parsedOdds = newMatch.odds; if (typeof parsedOdds === "string") { try { parsedOdds = JSON.parse(parsedOdds); } catch (e) { parsedOdds = []; } } else if (!parsedOdds) { parsedOdds = []; } let parsedLockedIds = newMatch.odd_ids_locked; if (typeof parsedLockedIds === "string") { try { parsedLockedIds = JSON.parse(parsedLockedIds); } catch (e) { parsedLockedIds = []; } } else if (parsedLockedIds === void 0) { parsedLockedIds = []; } const formattedNewMatch = { ...newMatch, odds: parsedOdds, odd_ids_locked: parsedLockedIds }; sportList.value.push(formattedNewMatch); sportList.value.sort((a, b) => { const timeA = a.game_time ? new Date(a.game_time.replace(/-/g, "/")).getTime() : 0; const timeB = b.game_time ? new Date(b.game_time.replace(/-/g, "/")).getTime() : 0; return timeA - timeB; }); } } }); } } catch (error) { formatAppLog("error", "at pages/Tabbar/WorldCup/index.vue:449", "WebSocket解析错误:", error); } } const setupSocketListener = () => { uni.$on("onSocketMessage", handleWebsocketData); }; const removeSocketListener = () => { }; onShow(() => { syncFromStore(); }); vue.onUnmounted(() => { }); async function onQuery(pageNo, pageSize) { const queryId = ++currentQueryId; try { if (pageNo === 1) { isNoMore.value = false; currentPage.value = 1; if (!isTriggered.value) { skeletonLoading.value = true; sportList.value = []; } } else { if (isFetching.value || isNoMore.value) return; } isFetching.value = true; let accumulatedNewItems = []; let attemptCount = 0; const maxAttempts = 5; let targetCount = pageNo === 1 ? pageSize : MIN_NEW_ITEMS; let extendDate = null; while (accumulatedNewItems.length < targetCount && !isNoMore.value && attemptCount < maxAttempts) { if (queryId !== currentQueryId) return; attemptCount++; const res = await getWorldCupSport(); if (queryId !== currentQueryId) return; if (res.code === 1 && res.data.list && res.data.list.length > 0) { if (res.data.extend && res.data.extend.date) { extendDate = res.data.extend.date; } const rawList = res.data.list; const formatList = rawList.map((item) => { if (typeof item.odds === "string") { try { item.odds = JSON.parse(item.odds); } catch (e) { item.odds = []; } } return item; }); const existingIds = /* @__PURE__ */ new Set([ ...pageNo === 1 ? [] : sportList.value.map((i) => i.id), ...accumulatedNewItems.map((i) => i.id) ]); const newItems = formatList.filter((item) => !existingIds.has(item.id)); accumulatedNewItems = accumulatedNewItems.concat(newItems); if (rawList.length < pageSize) { isNoMore.value = true; } } else { isNoMore.value = true; } } if (queryId === currentQueryId) { if (pageNo === 1) { sportList.value = accumulatedNewItems; } else { sportList.value = sportList.value.concat(accumulatedNewItems); } currentPage.value = pageNo; skeletonLoading.value = false; isFetching.value = false; if (pageNo === 1 && extendDate) { vue.nextTick(() => { if (dateTabs.value.length > 0) { const targetMatch = sportList.value.find((item) => { if (item.state === 0 && item.game_time) { const itemDate = item.game_time.split(" ")[0]; return itemDate >= extendDate; } return false; }); if (targetMatch) { const targetDatePart = targetMatch.game_time.split(" ")[0]; activeDateTab.value = targetDatePart; intoViewId.value = ""; vue.nextTick(() => { intoViewId.value = "match-" + (targetMatch.data_id || targetMatch.id); }); } else { const lastDate = dateTabs.value[dateTabs.value.length - 1]; scrollToDate(lastDate); } } }); } } } catch (error) { if (queryId === currentQueryId) { isNoMore.value = true; skeletonLoading.value = false; isFetching.value = false; } } } const getStatusText = (state) => { const states = { 0: t2("未开始"), 1: t2("进行中"), 2: t2("已完场"), 3: t2("延期"), 4: t2("取消") }; return states[state] || ""; }; const isSelected = (matchId, marketId, selection) => { if (!selection) return false; const uniqueKey = getUniqueKey(matchId, marketId, selection); return !!selectedMap.value[uniqueKey]; }; const handleOddsClick = (item, selection) => { if (isOptionLocked(item, selection)) return; if (!item.odds || item.odds.length === 0) return; const market = item.odds[0]; const uniqueKey = getUniqueKey(item.id, market.id, selection); if (selectedMap.value[uniqueKey]) { orderStore.removeOrderItemByKey(uniqueKey); } else { if (market.values) { market.values.forEach((wsItem) => { const otherKey = getUniqueKey(item.id, market.id, wsItem); if (selectedMap.value[otherKey]) { orderStore.removeOrderItemByKey(otherKey); } }); } const betItem = { matchId: item.id, data_id: item.data_id, league: item.league, league_en: item.league_en, homeTeam: item.home_team, home_team_en: item.home_team_en, guestTeam: item.guest_team, guest_team_en: item.guest_team_en, betType: market.name, betTypeEn: market.name_en, betTypeName: selection.value_text, betTypeNameEn: selection.value, handicap: selection.handicap, handicap_text: selection.handicap_text, odds: selection.odd, score: item.score, state: item.state, status: item.status, is_roll: item.is_roll, is_locked: item.is_locked, uniqueKey, optionValue: selection.value, marketId: market.id }; orderStore.addOrderItem(betItem); uni.vibrateShort(); } }; const __returned__ = { t: t2, locale, orderStore, WebsocketData, sportList, skeletonLoading, router: router2, currentSportIndex, sportCategoryList, onSportCategoryChange, isTriggered, isNoMore, isFetching, currentPage, currentLimit, MIN_NEW_ITEMS, get currentQueryId() { return currentQueryId; }, set currentQueryId(v) { currentQueryId = v; }, activeDateTab, intoViewId, dateTabs, scrollToDate, formatDateInfo, oddsChangeMap, getOddsKey, isOddsUp, isOddsDown, showChangeIcon, goDetail, selectedMap, translateSelection, getUniqueKey, checkIsLocked, isOptionLocked, syncFromStore, handleWebsocketData, setupSocketListener, removeSocketListener, onQuery, getStatusText, isSelected, handleOddsClick, ref: vue.ref, watch: vue.watch, computed: vue.computed, onUnmounted: vue.onUnmounted, onMounted: vue.onMounted, nextTick: vue.nextTick, get useI18n() { return useI18n; }, get onShow() { return onShow; }, get getWorldCupSport() { return getWorldCupSport; }, get useOrderStore() { return useOrderStore; }, get getLocale() { return getLocale; }, get useWebsocketDataStore() { return useWebsocketDataStore; }, get formatRange() { return formatRange; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_skeleton = __unplugin_components_0$3; const _component_u_image = __unplugin_components_1$1; const _component_u_icon = __unplugin_components_0$5; const _component_u_tag = __unplugin_components_2$2; const _component_u_empty = __unplugin_components_4$2; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("世界杯") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-content", style: { "display": "flex", "flex-direction": "column" } }, [ $setup.dateTabs.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "sticky-tabs" }, [ vue.createElementVNode("scroll-view", { "scroll-x": "", class: "date-tabs-scroll", "show-scrollbar": false, "scroll-into-view": "tab-" + $setup.activeDateTab }, [ vue.createElementVNode("view", { class: "date-tabs-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.dateTabs, (date2, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["date-tab-item", { "is-active": $setup.activeDateTab === date2 }]), key: index, id: "tab-" + date2, onClick: ($event) => $setup.scrollToDate(date2) }, [ vue.createElementVNode( "text", { class: "tab-text-top" }, vue.toDisplayString($setup.formatDateInfo(date2).topText), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "tab-text-bottom" }, vue.toDisplayString($setup.formatDateInfo(date2).bottomText), 1 /* TEXT */ ) ], 10, ["id", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 8, ["scroll-into-view"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("scroll-view", { class: "scroll-view-container", "scroll-y": "", "scroll-into-view": $setup.intoViewId, "scroll-with-animation": true }, [ vue.createElementVNode("view", { class: "match-list" }, [ $setup.skeletonLoading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(5, (i) => { return vue.createElementVNode("view", { class: "match-card", key: i }, [ vue.createVNode(_component_u_skeleton, { loading: true, animate: true, rows: "3", title: "", avatar: "", "avatar-size": 28 }) ]); }), 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.sportList, (item, index) => { var _a2, _b2, _c; return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", { class: "match-card", key: item.data_id || item.id, id: "match-" + (item.data_id || item.id), onClick: ($event) => $setup.goDetail(item) }, [ vue.createElementVNode("view", { class: "league-info" }, [ vue.createElementVNode("view", { class: "league-left" }, [ item.league_logo ? (vue.openBlock(), vue.createBlock(_component_u_image, { key: 0, src: item.league_logo, width: "16px", height: "16px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 1, name: "grid-fill", color: "#f8b932", size: "16" })), vue.createElementVNode( "text", { class: "league-name" }, vue.toDisplayString($setup.locale === "zh" ? item.league : item.league_en), 1 /* TEXT */ ) ]), item.state === 1 && item.fixture_status ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createVNode(_component_u_tag, { text: $setup.t((_a2 = item.fixture_status) == null ? void 0 : _a2.long), mode: "plain", type: "primary", size: "mini" }, null, 8, ["text"]), item.is_roll === 1 ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 0, text: $setup.t("滚球"), mode: "plain", type: "primary", size: "mini", style: { "margin-left": "6px" } }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "match-time-status" }, [ item.fixture_status ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, [ ((_b2 = item.fixture_status) == null ? void 0 : _b2.seconds) ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0 }, vue.toDisplayString((_c = item.fixture_status) == null ? void 0 : _c.seconds), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "match-time" }, vue.toDisplayString(item.game_time || "--:--"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "team-item" }, [ vue.createVNode(_component_u_image, { src: item.home_team_logo, width: "28px", height: "28px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "team-name", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? item.home_team : item.home_team_en) + " ", 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "success", style: { "margin-top": "-2px", "margin-left": "4px" }, text: $setup.t("主") }, null, 8, ["text"]) ]), item.state !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "team-score" }, vue.toDisplayString(item.score && item.score !== "-" ? item.score.split("-")[0] : "0"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "team-item" }, [ vue.createVNode(_component_u_image, { src: item.guest_team_logo, width: "28px", height: "28px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "team-name", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode( vue.toDisplayString($setup.locale === "zh" ? item.guest_team : item.guest_team_en) + " ", 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "error", style: { "margin-left": "4px", "margin-top": "-2px" }, text: $setup.t("客") }, null, 8, ["text"]) ]), item.state !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "team-score" }, vue.toDisplayString(item.score && item.score !== "-" ? item.score.split("-")[1] : "0"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), [0, 1].includes(item.state) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-group" }, [ item.odds && item.odds.length > 0 && item.odds[0].values ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.odds[0].values.slice(0, 3), (opt, optIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["odds-btn compact-btn", { "is-active": $setup.isSelected(item.id, item.odds[0].id, opt), "odds-up": $setup.isOddsUp($setup.getOddsKey(item.id, item.odds[0].id, opt)) && !$setup.isOptionLocked(item, opt), "odds-down": $setup.isOddsDown($setup.getOddsKey(item.id, item.odds[0].id, opt)) && !$setup.isOptionLocked(item, opt), "is-locked": $setup.isOptionLocked(item, opt) }]), key: optIndex, onClick: vue.withModifiers(($event) => $setup.handleOddsClick(item, opt), ["stop"]) }, [ $setup.isOptionLocked(item, opt) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "locked-overlay" }, [ vue.createVNode(_component_u_icon, { name: "lock", color: "#fff", size: "24" }) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "btn-top" }, [ vue.createElementVNode( "text", { class: "selection-name" }, vue.toDisplayString($setup.translateSelection($setup.locale === "zh" ? opt.value_text : opt.value)), 1 /* TEXT */ ), opt.handicap_text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "selection-handicap" }, vue.toDisplayString(opt.handicap_text), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btn-bottom" }, [ vue.createElementVNode("view", { class: "odds-val", style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode( "span", null, vue.toDisplayString(opt.odd || "-"), 1 /* TEXT */ ), $setup.showChangeIcon($setup.getOddsKey(item.id, item.odds[0].id, opt)) && !$setup.isOptionLocked(item, opt) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["change-icon", { up: $setup.isOddsUp($setup.getOddsKey(item.id, item.odds[0].id, opt)), down: $setup.isOddsDown($setup.getOddsKey(item.id, item.odds[0].id, opt)) }]) }, [ vue.withDirectives(vue.createVNode( _component_u_icon, { name: "arrow-up-fill", size: "12" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.isOddsUp($setup.getOddsKey(item.id, item.odds[0].id, opt))] ]), vue.withDirectives(vue.createVNode( _component_u_icon, { name: "arrow-down-fill", size: "12" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, !$setup.isOddsUp($setup.getOddsKey(item.id, item.odds[0].id, opt))] ]) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ]) ]) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "match-footer-tip" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.getStatusText(item.state)), 1 /* TEXT */ ) ])), item.state === 0 || item.state === 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "match-footer-bar", onClick: vue.withModifiers(($event) => $setup.goDetail(item), ["stop"]) }, [ vue.createElementVNode( "text", { class: "footer-text" }, vue.toDisplayString($setup.t("全部玩法")) + " " + vue.toDisplayString(item.odds_count ? `(${item.odds_count})` : ""), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-right", color: "#999", size: "12", style: { "margin-left": "4px" } }) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ], 8, ["id", "onClick"])), [ [vue.vShow, item.league_id === 1] ]); }), 128 /* KEYED_FRAGMENT */ )) ])) ]), $setup.sportList.length === 0 && !$setup.skeletonLoading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "empty-box" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无赛事数据"), mode: "data", "icon-size": "100" }, null, 8, ["text"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { style: { "height": "50px" } }) ], 8, ["scroll-into-view"]) ]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesTabbarWorldCupIndex = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__scopeId", "data-v-938cd9d8"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/WorldCup/index.vue"]]); const _sfc_main$V = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const __returned__ = { t: t2, list, get useI18n() { return useI18n; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) { const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("彩票"), style: { "background": "linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)), url('/static/images/enter-bg.png') no-repeat", "background-size": "cover" } }, { default: vue.withCtx(() => [ vue.createElementVNode("div", { style: { "padding": "24rpx" } }, [ vue.createVNode($setup["list"]) ]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesTabbarEntertainmentIndex = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/index.vue"]]); const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const router2 = useRouter(); const mainTab = vue.ref(0); onLoad((options) => { if (options.tab !== void 0) { mainTab.value = Number(options.tab); onGameQuery(); } }); const switchMainTab = (index) => { if (mainTab.value === index) return; mainTab.value = index; }; const tabList = vue.computed(() => [ { name: t2("体育"), value: 1 }, { name: t2("彩票"), value: 0 }, { name: t2("六合彩"), value: 2 } ]); const gamePagingRef = vue.ref(null); const gameBetList = vue.ref([]); const gameStatusShow = vue.ref(false); const gameSettleStatusShow = vue.ref(false); const gameCalendarShow = vue.ref(false); const gameStatus = vue.ref(""); const gameSettleStatus = vue.ref(""); const gameDateRange = vue.ref(""); const gameStart = vue.ref(""); const gameEnd = vue.ref(""); const gameStatusColumns = vue.computed(() => [ { label: t2("中奖"), value: 1 }, { label: t2("未中奖"), value: 0 } ]); const gameSettleStatusColumns = vue.computed(() => [ { label: t2("待结算"), value: 1 }, { label: t2("已结算"), value: 2 } ]); const gameStatusText = vue.computed(() => { const target = gameStatusColumns.value.find((item) => item.value === gameStatus.value); return target ? target.label : ""; }); const gameSettleStatusText = vue.computed(() => { const target = gameSettleStatusColumns.value.find((item) => item.value === gameSettleStatus.value); return target ? target.label : ""; }); const onTabChange = (index) => { mainTab.value = index; }; const onGameQuery = async (pageNo, pageSize) => { try { const params = { page: pageNo, limit: pageSize, is_winner: gameStatus.value, status: gameSettleStatus.value, start_time: gameStart.value, end_time: gameEnd.value }; const res = await getGameBetList(params); if (res.code === 1 && res.data && res.data.list) { gamePagingRef.value.complete(res.data.list); } else { gamePagingRef.value.complete(false); } } catch (error) { gamePagingRef.value.complete(false); } }; const onGameStatusConfirm = (e) => { gameStatus.value = e[0].value; handleGameQuery(); }; const onGameSettleStatusConfirm = (e) => { gameSettleStatus.value = e[0].value; handleGameQuery(); }; const onGameCalendarChange = (e) => { if (e.startDate && e.endDate) { gameStart.value = e.startDate; gameEnd.value = e.endDate; gameDateRange.value = `${e.startDate} ~ ${e.endDate}`; handleGameQuery(); } }; const handleGameQuery = () => { var _a2; (_a2 = gamePagingRef.value) == null ? void 0 : _a2.reload(); }; const handleGameReset = () => { var _a2; gameStatus.value = ""; gameSettleStatus.value = ""; gameDateRange.value = ""; gameStart.value = ""; gameEnd.value = ""; (_a2 = gamePagingRef.value) == null ? void 0 : _a2.reload(); }; const getGameStatusText = (item) => { const status = Number(item.status); const isWinner = Number(item.profit) > 0; if (status === 1) return t2("待结算"); else if (status === 2) return isWinner ? t2("已中奖") : t2("未中奖"); return t2("未知"); }; const getGameStatusClass = (item) => { const status = Number(item.status); const isWinner = Number(item.profit) > 0; if (status === 1) return "status-pending"; else if (status === 2) return isWinner ? "status-win" : "status-lose"; return "status-default"; }; const sportPagingRef = vue.ref(null); const sportOrderList = vue.ref([]); const sportStatusShow = vue.ref(false); const sportSettleStatusShow = vue.ref(false); const sportCalendarShow = vue.ref(false); const sportStatus = vue.ref(""); const sportSettleStatus = vue.ref(""); const sportDateRange = vue.ref(""); const sportStart = vue.ref(""); const sportEnd = vue.ref(""); const sportStatusColumns = vue.computed(() => [ { label: t2("未中奖"), value: 0 }, { label: t2("中奖"), value: 1 }, { label: t2("和局"), value: 2 }, { label: t2("平手半"), value: 3 } ]); const sportSettleStatusColumns = vue.computed(() => [ { label: t2("未结算"), value: 0 }, { label: t2("已结算"), value: 1 }, { label: t2("结算待发放"), value: 2 } ]); const sportStatusText = vue.computed(() => { const target = sportStatusColumns.value.find((item) => item.value === sportStatus.value); return target ? target.label : ""; }); const sportSettleStatusText = vue.computed(() => { const target = sportSettleStatusColumns.value.find((item) => item.value === sportSettleStatus.value); return target ? target.label : ""; }); const onSportQuery = async (pageNo, pageSize) => { try { const params = { page: pageNo, limit: pageSize, is_win: sportStatus.value, settlement_status: sportSettleStatus.value, start_time: sportStart.value, end_time: sportEnd.value }; const res = await getOrderList(params); if (res.code === 1) { const list2 = (res.data.list || []).map((item) => { try { item.parsedDetail = item.detail ? JSON.parse(item.detail) : {}; } catch (e) { item.parsedDetail = {}; } return item; }); sportPagingRef.value.complete(list2); } else { sportPagingRef.value.complete(false); } } catch (e) { sportPagingRef.value.complete(false); } }; const getMarketName = (item) => { var _a2, _b2, _c; return ((_c = (_b2 = (_a2 = item.parsedDetail) == null ? void 0 : _a2.odds) == null ? void 0 : _b2[0]) == null ? void 0 : _c.name) || "-"; }; const getSelectionValue = (item) => { var _a2, _b2, _c, _d, _e; return ((_e = (_d = (_c = (_b2 = (_a2 = item.parsedDetail) == null ? void 0 : _a2.odds) == null ? void 0 : _b2[0]) == null ? void 0 : _c.values) == null ? void 0 : _d[0]) == null ? void 0 : _e.value) || "-"; }; const getSelectionHandicap = (item) => { var _a2, _b2, _c, _d, _e; return ((_e = (_d = (_c = (_b2 = (_a2 = item.parsedDetail) == null ? void 0 : _a2.odds) == null ? void 0 : _b2[0]) == null ? void 0 : _c.values) == null ? void 0 : _d[0]) == null ? void 0 : _e.handicap) || ""; }; const getSelectionOdd = (item) => { var _a2, _b2, _c, _d, _e; return ((_e = (_d = (_c = (_b2 = (_a2 = item.parsedDetail) == null ? void 0 : _a2.odds) == null ? void 0 : _b2[0]) == null ? void 0 : _c.values) == null ? void 0 : _d[0]) == null ? void 0 : _e.odd) || "0.00"; }; const onSportStatusConfirm = (e) => { sportStatus.value = e[0].value; handleSportQuery(); }; const onSportSettleStatusConfirm = (e) => { sportSettleStatus.value = e[0].value; handleSportQuery(); }; const onSportCalendarConfirm = (e) => { if (e.startDate && e.endDate) { sportStart.value = e.startDate; sportEnd.value = e.endDate; sportDateRange.value = `${e.startDate} ~ ${e.endDate}`; handleSportQuery(); } sportCalendarShow.value = false; }; const handleSportQuery = () => { var _a2; (_a2 = sportPagingRef.value) == null ? void 0 : _a2.reload(); }; const handleSportReset = () => { var _a2; sportStatus.value = ""; sportSettleStatus.value = ""; sportDateRange.value = ""; sportStart.value = ""; sportEnd.value = ""; (_a2 = sportPagingRef.value) == null ? void 0 : _a2.reload(); }; const getSportItemStatus = (item) => { const settleStatus = Number(item.status); const settlementStatus = Number(item.settlement_status); const isWin = Number(item.is_win); if (settlementStatus === 1) { switch (isWin) { case 1: return { text: t2("中奖"), type: "success" }; case 2: return { text: t2("和局"), type: "primary" }; case 0: default: return { text: t2("未中奖"), type: "error" }; } } if (settleStatus === 0) return { text: t2("下注中"), type: "warning" }; else if (settleStatus === 1) return { text: t2("下注成功"), type: "success" }; else if (settleStatus === -1) return { text: t2("订单已取消"), type: "error" }; }; const getSportProfitClass = (item) => { if (item.status !== 1) return ""; const profit = Number(item.profit_and_loss); if (profit > 0) return "text-success"; if (profit < 0) return "text-error"; return "text-gray"; }; const getRefundStatusText = (status) => { const map = { 1: t2("退款审核中"), 2: t2("已退款"), 3: t2("退款被驳回") }; return map[Number(status)] || ""; }; const getRefundStatusClass = (status) => { const map = { 1: "refund-pending", 2: "refund-success", 3: "refund-reject" }; return map[Number(status)] || ""; }; const copyText = (text) => { uni.setClipboardData({ data: text, success: () => uni.showToast({ title: t2("复制成功"), icon: "none" }) }); }; const handleSportDetail = (item) => { router2.push({ name: "bettingDetail", query: { order_id: item.order_id }, data: { order_id: item.order_id } }); }; const lhcPagingRef = vue.ref(null); const lhcOrderList = vue.ref([]); const lhcStatusShow = vue.ref(false); const lhcCalendarShow = vue.ref(false); const lhcStatus = vue.ref(""); const lhcDateRange = vue.ref(""); const lhcStart = vue.ref(""); const lhcEnd = vue.ref(""); const lhcStatusColumns = vue.computed(() => [ { value: 0, label: t2("待开奖") }, { value: 1, label: t2("未中奖") }, { value: 2, label: t2("已中奖") }, { value: 3, label: t2("合局") } // { value: 4, label: t('购物车') }, ]); const lhcStatusText = vue.computed(() => { const target = lhcStatusColumns.value.find((item) => item.value === lhcStatus.value); return target ? target.label : ""; }); const onLhcQuery = async (pageNo, pageSize) => { try { const params = { page: pageNo, limit: pageSize, lottery_status: lhcStatus.value, start_time: lhcStart.value, end_time: lhcEnd.value }; const res = await (typeof getDigitalOrderList === "function" ? getDigitalOrderList(params) : Promise.resolve({ code: 1, data: { list: [] } })); if (res.code === 1 && res.data && res.data.list) { lhcPagingRef.value.complete(res.data.list); } else { lhcPagingRef.value.complete(false); } } catch (error) { lhcPagingRef.value.complete(false); } }; const onLhcStatusConfirm = (e) => { lhcStatus.value = e[0].value; handleLhcQuery(); }; const onLhcCalendarChange = (e) => { if (e.startDate && e.endDate) { lhcStart.value = e.startDate; lhcEnd.value = e.endDate; lhcDateRange.value = `${e.startDate} ~ ${e.endDate}`; handleLhcQuery(); } }; const handleLhcQuery = () => { var _a2; (_a2 = lhcPagingRef.value) == null ? void 0 : _a2.reload(); }; const handleLhcReset = () => { var _a2; lhcStatus.value = ""; lhcDateRange.value = ""; lhcStart.value = ""; lhcEnd.value = ""; (_a2 = lhcPagingRef.value) == null ? void 0 : _a2.reload(); }; const getLhcStatusText = (status) => { const s = Number(status); if (s === 0) return t2("待开奖"); if (s === 1) return t2("未中奖"); if (s === 2) return t2("已中奖"); if (s === 3) return t2("合局"); if (s === 4) return t2("购物车"); return t2("未知"); }; const getLhcStatusClass = (status) => { const s = Number(status); if (s === 0) return "status-pending"; if (s === 1) return "status-lose"; if (s === 2) return "status-win"; if (s === 3) return "status-default"; if (s === 4) return "status-default"; return "status-default"; }; const getLhcProfitText = (data) => { const status = Number(data.lottery_status); if (status === 1) { return data.profit_and_loss || "--"; } else if (status === 2) { return data.win_amount || "--"; } else { return 0; } }; const getLhcProfitClass = (status) => { const s = Number(status); if (s === 1) return "is-lose"; if (s === 2) return "is-win"; return ""; }; const handleLhcDetail = (item) => { router2.push({ name: "DigitalDetail", query: { id: item.id } }); }; const __returned__ = { t: t2, router: router2, mainTab, switchMainTab, tabList, gamePagingRef, gameBetList, gameStatusShow, gameSettleStatusShow, gameCalendarShow, gameStatus, gameSettleStatus, gameDateRange, gameStart, gameEnd, gameStatusColumns, gameSettleStatusColumns, gameStatusText, gameSettleStatusText, onTabChange, onGameQuery, onGameStatusConfirm, onGameSettleStatusConfirm, onGameCalendarChange, handleGameQuery, handleGameReset, getGameStatusText, getGameStatusClass, sportPagingRef, sportOrderList, sportStatusShow, sportSettleStatusShow, sportCalendarShow, sportStatus, sportSettleStatus, sportDateRange, sportStart, sportEnd, sportStatusColumns, sportSettleStatusColumns, sportStatusText, sportSettleStatusText, onSportQuery, getMarketName, getSelectionValue, getSelectionHandicap, getSelectionOdd, onSportStatusConfirm, onSportSettleStatusConfirm, onSportCalendarConfirm, handleSportQuery, handleSportReset, getSportItemStatus, getSportProfitClass, getRefundStatusText, getRefundStatusClass, copyText, handleSportDetail, lhcPagingRef, lhcOrderList, lhcStatusShow, lhcCalendarShow, lhcStatus, lhcDateRange, lhcStart, lhcEnd, lhcStatusColumns, lhcStatusText, onLhcQuery, onLhcStatusConfirm, onLhcCalendarChange, handleLhcQuery, handleLhcReset, getLhcStatusText, getLhcStatusClass, getLhcProfitText, getLhcProfitClass, handleLhcDetail, get getLocale() { return getLocale; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = __unplugin_components_0$2; const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_tag = __unplugin_components_2$2; const _component_u_empty = __unplugin_components_4$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_select = __unplugin_components_5$1; const _component_u_calendar = __unplugin_components_6; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-content" }, [ vue.createVNode(_component_u_tabs, { list: $setup.tabList, current: $setup.mainTab, onChange: $setup.onTabChange, "active-color": "#f8b932", "inactive-color": "#666", "line-color": "#f8b932", "is-scroll": $setup.getLocale() != "zh" }, null, 8, ["list", "current", "is-scroll"]), vue.createElementVNode("view", { class: "main-tabs-wrapper" }), vue.createElementVNode("view", { class: "paging-container" }, [ $setup.mainTab === 1 ? (vue.openBlock(), vue.createBlock(_component_z_paging, { key: 0, ref: "gamePagingRef", modelValue: $setup.gameBetList, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.gameBetList = $event), onQuery: $setup.onGameQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300, loadingMoreLoadingText: $setup.t("正在加载"), loadingMoreNoMoreText: $setup.t("没有更多了"), loadingMoreDefaultText: $setup.t("点击加载更多") }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "filter-wrapper" }, [ vue.createElementVNode("view", { class: "filter-card" }, [ vue.createElementVNode("view", { class: "filter-header" }, [ vue.createElementVNode("view", { class: "title-line" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title-text" }, vue.toDisplayString($setup.t("条件筛选")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "reset-link", onClick: $setup.handleGameReset }, vue.toDisplayString($setup.t("重置全部")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "filter-body" }, [ vue.createElementVNode("view", { class: "filter-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[0] || (_cache[0] = ($event) => $setup.gameStatusShow = true) }, [ vue.createVNode(_component_u_icon, { name: "list-dot", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.gameStatusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.gameStatusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("是否中奖")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.gameStatusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "filter-item date-item", onClick: _cache[1] || (_cache[1] = ($event) => $setup.gameCalendarShow = true) }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ $setup.gameDateRange ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "filter-value" }, vue.toDisplayString($setup.gameDateRange), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "filter-placeholder" }, vue.toDisplayString($setup.t("日期区间")), 1 /* TEXT */ )) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "filter-row action-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[2] || (_cache[2] = ($event) => $setup.gameSettleStatusShow = true) }, [ vue.createVNode(_component_u_icon, { name: "coupon", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.gameSettleStatusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.gameSettleStatusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("结算状态")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.gameSettleStatusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "button-group" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "search-btn", onClick: $setup.handleGameQuery, "custom-style": "width: 100%; height: 76rpx;" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "search", size: "32", color: "#fff", class: "mr-1" }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("立即查询")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("更新数据中...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无投注记录"), mode: "history", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bet-list-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameBetList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id, class: "bet-card", onClick: ($event) => $setup.router.push({ name: "EntertainmentDetail", query: { id: item.id } }) }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "issue-box" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("期号")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "issue-no" }, vue.toDisplayString(item.issue_no), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["status-badge", $setup.getGameStatusClass(item)]) }, vue.toDisplayString($setup.getGameStatusText(item)), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "card-main" }, [ vue.createElementVNode("view", { class: "bet-content-box", style: { "margin-bottom": "12rpx" } }, [ vue.createElementVNode( "text", { class: "bet-label" }, vue.toDisplayString($setup.t("彩票玩法")), 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { text: Number(item.is_pc) === 1 ? $setup.t("加拿大") + 28 : $setup.t("极速") + 28, type: "primary", plain: "", size: "mini" }, null, 8, ["text"]) ]), vue.createElementVNode("view", { class: "bet-content-box" }, [ vue.createElementVNode( "text", { class: "bet-label" }, vue.toDisplayString($setup.t("投注内容")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "bet-keywords" }, vue.toDisplayString(item.keywords), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-grid" }, [ vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "d-val" }, vue.toDisplayString(item.odds), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("投注本金")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "d-val" }, vue.toDisplayString(parseFloat(item.amount)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("盈亏")), 1 /* TEXT */ ), item.status === 2 && !Number(item.profit) > 0 ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0, class: "d-val profit-val is-lose" }, " - " + vue.toDisplayString(parseFloat(item.amount)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "span", { key: 1, class: vue.normalizeClass(["d-val profit-val", Number(item.profit) > 0 ? "is-win" : ""]) }, [ Number(item.profit) > 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, " +" + vue.toDisplayString(parseFloat(item.profit)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1 }, vue.toDisplayString(parseFloat(item.profit)), 1 /* TEXT */ )) ], 2 /* CLASS */ )) ]) ]) ]), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString(item.created_at), 1 /* TEXT */ ) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "loadingMoreLoadingText", "loadingMoreNoMoreText", "loadingMoreDefaultText"])) : vue.createCommentVNode("v-if", true), $setup.mainTab === 0 ? (vue.openBlock(), vue.createBlock(_component_z_paging, { key: 1, ref: "sportPagingRef", modelValue: $setup.sportOrderList, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.sportOrderList = $event), onQuery: $setup.onSportQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300, loadingMoreLoadingText: $setup.t("正在加载"), loadingMoreNoMoreText: $setup.t("没有更多了"), loadingMoreDefaultText: $setup.t("点击加载更多") }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "filter-wrapper" }, [ vue.createElementVNode("view", { class: "filter-card" }, [ vue.createElementVNode("view", { class: "filter-header" }, [ vue.createElementVNode("view", { class: "title-line" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title-text" }, vue.toDisplayString($setup.t("条件筛选")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "reset-link", onClick: $setup.handleSportReset }, vue.toDisplayString($setup.t("重置全部")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "filter-body" }, [ vue.createElementVNode("view", { class: "filter-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[4] || (_cache[4] = ($event) => $setup.sportStatusShow = true) }, [ vue.createVNode(_component_u_icon, { name: "list-dot", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.sportStatusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.sportStatusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("是否中奖")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.sportStatusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "filter-item date-item", onClick: _cache[5] || (_cache[5] = ($event) => $setup.sportCalendarShow = true) }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ $setup.sportDateRange ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "filter-value" }, vue.toDisplayString($setup.sportDateRange), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "filter-placeholder" }, vue.toDisplayString($setup.t("日期区间")), 1 /* TEXT */ )) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "filter-row action-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[6] || (_cache[6] = ($event) => $setup.sportSettleStatusShow = true) }, [ vue.createVNode(_component_u_icon, { name: "coupon", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.sportSettleStatusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.sportSettleStatusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("结算状态")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.sportSettleStatusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "button-group" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "search-btn", onClick: $setup.handleSportQuery, "custom-style": "width: 100%; height: 76rpx;" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "search", size: "32", color: "#fff", class: "mr-1" }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("立即查询")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("加载最新记录...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无投注记录"), mode: "list", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.sportOrderList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id || index, class: "log-card", onClick: ($event) => $setup.handleSportDetail(item) }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("注单号")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString(item.order_id), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: vue.withModifiers(($event) => $setup.copyText(item.order_id), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "file-text", size: "24", color: "#999" }) ], 8, ["onClick"]) ]), vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString(item.create_time), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-main" }, [ vue.createElementVNode("view", { class: "bet-info" }, [ vue.createElementVNode("view", { class: "bet-type" }, [ vue.createElementVNode("text", { class: "type-name" }, [ vue.createCommentVNode(" {{ getMarketName(item) }}"), vue.createTextVNode( " " + vue.toDisplayString(item.odd_name) + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { style: { "color": "#64748b", "font-size": "26rpx", "margin-left": "8rpx", "font-weight": "normal" } }, [ vue.createTextVNode( " - " + vue.toDisplayString(item.odd_value) + " ", 1 /* TEXT */ ), vue.createCommentVNode(" {{ getSelectionValue(item) }}") ]), $setup.getSelectionHandicap(item) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "color": "#f8b932", "margin-left": "6rpx" } }, " [" + vue.toDisplayString($setup.getSelectionHandicap(item)) + "] ", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { style: { "margin-top": "8rpx", "margin-bottom": "8rpx", "display": "flex", "gap": "8rpx" } }, [ item.is_roll ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 0, text: $setup.t("滚球"), size: "mini", type: "primary", plain: "" }, null, 8, ["text"])) : (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 1, text: $setup.t("体育博彩"), size: "mini", type: "primary", plain: "" }, null, 8, ["text"])) ]), vue.createElementVNode("view", { class: "odds-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createCommentVNode(' {{ getSelectionOdd(item) }}'), vue.createTextVNode( " " + vue.toDisplayString(Number(item.odd)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["custom-sport-tag", "tag-" + $setup.getSportItemStatus(item).type]) }, vue.toDisplayString($setup.getSportItemStatus(item).text), 3 /* TEXT, CLASS */ ) ]), item.failure ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "odds-row" }, [ vue.createElementVNode( "span", { class: "label" }, vue.toDisplayString($setup.t("取消原因")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "span", { style: { "color": "#fa3534" } }, vue.toDisplayString(item.failure), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "divider" }), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode("view", { class: "info-column" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("投注金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(item.amount), 1 /* TEXT */ ), Number(item.return_status) !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["refund-text", $setup.getRefundStatusClass(item.return_status)]) }, vue.toDisplayString($setup.getRefundStatusText(item.return_status)), 3 /* TEXT, CLASS */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "info-column align-right" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("派彩金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: vue.normalizeClass(["info-value big-num", $setup.getSportProfitClass(item)]) }, [ item.is_win === 0 ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0 }, vue.toDisplayString(item.profit_and_loss), 1 /* TEXT */ )) : item.is_win === 1 ? (vue.openBlock(), vue.createElementBlock( "span", { key: 1 }, "+" + vue.toDisplayString(item.win_amount), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("span", { key: 2 }, "0.00")) ], 2 /* CLASS */ ) ]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "loadingMoreLoadingText", "loadingMoreNoMoreText", "loadingMoreDefaultText"])) : vue.createCommentVNode("v-if", true), $setup.mainTab === 2 ? (vue.openBlock(), vue.createBlock(_component_z_paging, { key: 2, ref: "lhcPagingRef", modelValue: $setup.lhcOrderList, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.lhcOrderList = $event), onQuery: $setup.onLhcQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300, loadingMoreLoadingText: $setup.t("正在加载"), loadingMoreNoMoreText: $setup.t("没有更多了"), loadingMoreDefaultText: $setup.t("点击加载更多") }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "filter-wrapper" }, [ vue.createElementVNode("view", { class: "filter-card" }, [ vue.createElementVNode("view", { class: "filter-header" }, [ vue.createElementVNode("view", { class: "title-line" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title-text" }, vue.toDisplayString($setup.t("条件筛选")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "reset-link", onClick: $setup.handleLhcReset }, vue.toDisplayString($setup.t("重置全部")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "filter-body" }, [ vue.createElementVNode("view", { class: "filter-row action-row" }, [ vue.createElementVNode("view", { class: "filter-item date-item", onClick: _cache[8] || (_cache[8] = ($event) => $setup.lhcCalendarShow = true), style: { "margin-bottom": "20rpx" } }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ $setup.lhcDateRange ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "filter-value" }, vue.toDisplayString($setup.lhcDateRange), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "filter-placeholder" }, vue.toDisplayString($setup.t("日期区间")), 1 /* TEXT */ )) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "filter-row action-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[9] || (_cache[9] = ($event) => $setup.lhcStatusShow = true) }, [ vue.createVNode(_component_u_icon, { name: "list-dot", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.lhcStatusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.lhcStatusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("状态")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.lhcStatusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "button-group", style: { "margin-left": "20rpx" } }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "search-btn", onClick: $setup.handleLhcQuery, "custom-style": "width: 100%; height: 76rpx;" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "search", size: "32", color: "#fff", style: { "margin-right": "20rpx" } }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("查询")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("更新数据中...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无投注记录"), mode: "history", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bet-list-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.lhcOrderList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id, class: "bet-card lhc-card", onClick: ($event) => $setup.handleLhcDetail(item) }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "issue-box" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("期号")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "issue-no" }, vue.toDisplayString(item.issue), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["status-badge", $setup.getLhcStatusClass(item.lottery_status)]) }, vue.toDisplayString($setup.getLhcStatusText(item.lottery_status)), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "card-main" }, [ vue.createElementVNode("view", { class: "bet-content-box", style: { "margin-bottom": "12rpx" } }, [ item.type === 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "bet-label" }, vue.toDisplayString($setup.t("澳门六合彩")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "bet-label" }, vue.toDisplayString($setup.t("香港六合彩")), 1 /* TEXT */ )), vue.createVNode(_component_u_tag, { text: `[${item.game}] - ${item.gameplay}`, type: "primary", plain: "", size: "mini" }, null, 8, ["text"]) ]), vue.createElementVNode("view", { class: "bet-content-box" }, [ vue.createElementVNode( "text", { class: "bet-label" }, vue.toDisplayString($setup.t("投注内容")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "bet-keywords" }, vue.toDisplayString(item.number), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-grid" }, [ vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "d-val" }, "@" + vue.toDisplayString(item.odds), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("投注本金")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "d-val" }, vue.toDisplayString(parseFloat(item.amount || 0).toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("盈亏")), 1 /* TEXT */ ), vue.createElementVNode( "span", { class: vue.normalizeClass(["d-val profit-val", $setup.getLhcProfitClass(item.lottery_status)]) }, vue.toDisplayString($setup.getLhcProfitText(item)), 3 /* TEXT, CLASS */ ) ]) ]) ]), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center", "gap": "8rpx", "color": "#94a3b8", "font-size": "22rpx" } }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("单号")) + ":", 1 /* TEXT */ ), vue.createTextVNode(), vue.createElementVNode( "text", { style: { "font-family": "monospace" } }, vue.toDisplayString(item.ordernum), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString(item.created_at), 1 /* TEXT */ ) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "loadingMoreLoadingText", "loadingMoreNoMoreText", "loadingMoreDefaultText"])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createVNode(_component_u_select, { modelValue: $setup.gameStatusShow, "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $setup.gameStatusShow = $event), mode: "single-column", list: $setup.gameStatusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onGameStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_select, { modelValue: $setup.gameSettleStatusShow, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $setup.gameSettleStatusShow = $event), mode: "single-column", list: $setup.gameSettleStatusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onGameSettleStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.gameCalendarShow, "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $setup.gameCalendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", onChange: $setup.onGameCalendarChange }, null, 8, ["modelValue", "active-bg-color", "range-color"]), vue.createVNode(_component_u_select, { modelValue: $setup.sportStatusShow, "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $setup.sportStatusShow = $event), mode: "single-column", list: $setup.sportStatusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onSportStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_select, { modelValue: $setup.sportSettleStatusShow, "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $setup.sportSettleStatusShow = $event), mode: "single-column", list: $setup.sportSettleStatusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onSportSettleStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.sportCalendarShow, "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $setup.sportCalendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", onChange: $setup.onSportCalendarConfirm }, null, 8, ["modelValue", "active-bg-color", "range-color"]), vue.createVNode(_component_u_select, { modelValue: $setup.lhcStatusShow, "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => $setup.lhcStatusShow = $event), mode: "single-column", list: $setup.lhcStatusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onLhcStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.lhcCalendarShow, "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => $setup.lhcCalendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", onChange: $setup.onLhcCalendarChange }, null, 8, ["modelValue", "active-bg-color", "range-color"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } const PagesTabbarBettingHistoryIndex = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-43be1064"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/BettingHistory/index.vue"]]); const CellGroupProps = { ...baseProps, /** 分组标题 */ title: { type: String, default: "" }, /** 是否显示分组list上下边框 */ border: { type: Boolean, default: true }, /** 分组标题的样式,对象形式,注意驼峰属性写法 */ titleStyle: { type: Object, default: () => ({}) } }; const __default__$6 = { name: "u-cell-group", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({ ...__default__$6, props: CellGroupProps, setup(__props, { expose: __expose }) { __expose(); const __returned__ = { get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-cell-box", _ctx.customClass]), style: vue.normalizeStyle($setup.$u.toStyle(_ctx.customStyle)) }, [ _ctx.title ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-cell-title", style: vue.normalizeStyle([_ctx.titleStyle]) }, vue.toDisplayString(_ctx.title), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["u-cell-item-box", { "u-border-bottom u-border-top": _ctx.border }]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 2 /* CLASS */ ) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-c088534b"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-cell-group/u-cell-group.vue"]]); const CellItemProps = { ...baseProps, /** 左侧图标名称(只能uView内置图标),或者图标src */ icon: { type: String, default: "" }, /** 左侧标题 */ title: { type: [String, Number], default: "" }, /** 右侧内容 */ value: { type: [String, Number], default: "" }, /** 标题下方的描述信息 */ label: { type: [String, Number], default: "" }, /** 是否显示下边框 */ borderBottom: { type: Boolean, default: true }, /** 是否显示上边框 */ borderTop: { type: Boolean, default: false }, /** 是否开启点击反馈,即点击时cell背景为灰色,none为无效果 */ hoverClass: { type: String, default: "u-cell-hover" }, /** 是否显示右侧箭头 */ arrow: { type: Boolean, default: true }, /** 内容是否垂直居中 */ center: { type: Boolean, default: false }, /** 是否显示左边表示必填的星号 */ required: { type: Boolean, default: false }, /** 标题的宽度,单位rpx */ titleWidth: { type: [Number, String], default: "" }, /** 右侧箭头方向,可选值:right|up|down,默认为right */ arrowDirection: { type: String, default: "right" }, /** 控制标题的样式 */ titleStyle: { type: Object, default: () => ({}) }, /** 右侧显示内容的样式 */ valueStyle: { type: Object, default: () => ({}) }, /** 描述信息的样式 */ labelStyle: { type: Object, default: () => ({}) }, /** 背景颜色 */ bgColor: { type: String, default: "transparent" }, /** 用于识别被点击的是第几个cell */ index: { type: [String, Number], default: "" }, /** 是否使用label插槽 */ useLabelSlot: { type: Boolean, default: false }, /** 左边图标的大小,单位rpx,只对传入icon字段时有效 */ iconSize: { type: [Number, String], default: 34 }, /** 左边图标的样式,对象形式 */ iconStyle: { type: Object, default: () => ({}) } }; const __default__$5 = { name: "u-cell-item", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({ ...__default__$5, props: CellItemProps, emits: ["click"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const emit = __emit; const props = __props; const $slots = vue.useSlots(); const arrowStyle = vue.computed(() => { let style = {}; if (props.arrowDirection === "up") style.transform = "rotate(-90deg)"; else if (props.arrowDirection === "down") style.transform = "rotate(90deg)"; else style.transform = "rotate(0deg)"; return style; }); function onClick() { emit("click", props.index); } const __returned__ = { emit, props, $slots, arrowStyle, onClick, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return vue.openBlock(), vue.createElementBlock("view", { onClick: $setup.onClick, class: vue.normalizeClass(["u-cell", [ { "u-border-bottom": _ctx.borderBottom, "u-border-top": _ctx.borderTop, "u-col-center": _ctx.center, "u-cell--required": _ctx.required }, _ctx.customClass ]]), "hover-stay-time": "150", "hover-class": _ctx.hoverClass, style: vue.normalizeStyle($setup.$u.toStyle({ backgroundColor: _ctx.bgColor }, _ctx.customStyle)) }, [ _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-cell__left-icon-wrap" }, [ vue.createVNode(_component_u_icon, { size: _ctx.iconSize, name: _ctx.icon, "custom-style": _ctx.iconStyle }, null, 8, ["size", "name", "custom-style"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-flex" }, [ vue.renderSlot(_ctx.$slots, "icon", {}, void 0, true) ])), vue.createElementVNode( "view", { class: "u-cell_title", style: vue.normalizeStyle([{ width: _ctx.titleWidth ? _ctx.titleWidth + "rpx" : "auto" }, _ctx.titleStyle]) }, [ _ctx.title !== "" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createTextVNode( vue.toDisplayString(_ctx.title), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.renderSlot(_ctx.$slots, "title", { key: 1 }, void 0, true), _ctx.label || $setup.$slots.label ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "u-cell__label", style: vue.normalizeStyle([_ctx.labelStyle]) }, [ _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createTextVNode( vue.toDisplayString(_ctx.label), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.renderSlot(_ctx.$slots, "label", { key: 1 }, void 0, true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "u-cell__value", style: vue.normalizeStyle([_ctx.valueStyle]) }, [ _ctx.value !== "" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createTextVNode( vue.toDisplayString(_ctx.value), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true) ], 4 /* STYLE */ ), $setup.$slots["right-icon"] ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "u-flex u-cell_right" }, [ vue.renderSlot(_ctx.$slots, "right-icon", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true), _ctx.arrow ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "u-icon-wrap u-cell__right-icon-wrap" }, [ vue.createVNode(_component_u_icon, { name: "arrow-right", style: vue.normalizeStyle([$setup.arrowStyle]) }, null, 8, ["style"]) ])) : vue.createCommentVNode("v-if", true) ], 14, ["hover-class"]); } const __unplugin_components_3 = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-44a61c62"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-cell-item/u-cell-item.vue"]]); const AvatarProps = { ...baseProps, /** 背景颜色 */ bgColor: { type: String, default: "transparent" }, /** 头像路径 */ src: { type: String, default: "" }, /** 尺寸,large-大,default-中等,mini-小,如果为数值,则单位为rpx,宽度等于高度 */ size: { type: [String, Number], default: "default" }, /** 头像模型,square-带圆角方形,circle-圆形 */ mode: { type: String, default: "circle" }, /** 文字内容 */ text: { type: String, default: "" }, /** 图片的裁剪模型 */ imgMode: { type: String, default: "aspectFill" }, /** 标识符 */ index: { type: [String, Number], default: "" }, /** 右上角性别角标,man-男,woman-女 */ sexIcon: { type: String, default: "man" }, /** 右下角的等级图标 */ levelIcon: { type: String, default: "level" }, /** 右下角等级图标背景颜色 */ levelBgColor: { type: String, default: "" }, /** 右上角性别图标的背景颜色 */ sexBgColor: { type: String, default: "" }, /** 是否显示性别图标 */ showSex: { type: Boolean, default: false }, /** 是否显示等级图标 */ showLevel: { type: Boolean, default: false } }; const __default__$4 = { name: "u-avatar", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({ ...__default__$4, props: AvatarProps, emits: ["click"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCADIAMgDAREAAhEBAxEB/8QAcQABAQEAAwEBAAAAAAAAAAAAAAUEAQMGAgcBAQAAAAAAAAAAAAAAAAAAAAAQAAIBAwICBgkDBQAAAAAAAAABAhEDBCEFMVFBYXGREiKBscHRMkJSEyOh4XLxYjNDFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHbHFyZ/Dam+yLA+Z2L0Pjtyj2poD4AAAAAAAAAAAAAAAAAAAAAAAAKWFs9y6lcvvwQeqj8z9wFaziY1n/HbUX9XF97A7QAGXI23EvJ1goyfzR0YEfN269jeZ+a03pNe0DIAAAAAAAAAAAAAAAAAAAACvtO3RcVkXlWutuL9YFYAAAAAOJRjKLjJVi9GmB5/csH/mu1h/in8PU+QGMAAAAAAAAAAAAAAAAAAaMDG/6MmMH8C80+xAelSSVFolwQAAAAAAAHVlWI37ErUulaPk+hgeYnCUJuElSUXRrrQHAAAAAAAAAAAAAAAAABa2Oz4bM7r4zdF2ICmAAAAAAAAAg7zZ8GX41wuJP0rRgYAAAAAAAAAAAAAAAAAD0m2R8ODaXU33tsDSAAAAAAAAAlb9HyWZcnJd9PcBHAAAAAAAAAAAAAAAAAPS7e64Vn+KA0AAAAAAAAAJm+v8Ftf3ewCKAAAAAAAAAAAAAAAAAX9muqeGo9NttP06+0DcAAAAAAAAAjb7dTu2ra+VOT9P8AQCWAAAAAAAAAAAAAAAAAUNmyPt5Ltv4bui/kuAF0AAAAAAADiUlGLlJ0SVW+oDzOXfd/Ind6JPRdS0QHSAAAAAAAAAAAAAAAAAE2nVaNcGB6Lbs6OTao9LsF51z60BrAAAAAABJ3jOVHjW3r/sa9QEgAAAAAAAAAAAAAAAAAAAPu1duWriuW34ZR4MC9hbnZyEoy8l36XwfYBsAAADaSq9EuLAlZ+7xSdrGdW9Hc5dgEdtt1erfFgAAAAAAAAAAAAAAAAADVjbblX6NR8MH80tEBRs7HYivyzlN8lovaBPzduvY0m6eK10TXtAyAarO55lpJK54orolr+4GqO/Xaea1FvqbXvA+Z77kNeW3GPbV+4DJfzcm/pcm3H6Vou5AdAFLC2ed2Pjv1txa8sV8T6wOL+yZEKu1JXFy4MDBOE4ScZxcZLinoB8gAAAAAAAAAAAB242LeyJ+C3GvN9C7QLmJtePYpKS+5c+p8F2IDYAANJqj1T4oCfk7Nj3G5Wn9qXJax7gJ93Z82D8sVNc4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z"; const props = __props; const emit = __emit; const avatar = vue.ref(props.src ? props.src : base64Avatar); const error = vue.ref(false); vue.watch( () => props.src, (n) => { if (!n) { avatar.value = base64Avatar; error.value = true; } else { avatar.value = n; error.value = false; } } ); const wrapStyle = vue.computed(() => { let style = {}; style.height = props.size === "large" ? "120rpx" : props.size === "default" ? "90rpx" : props.size === "mini" ? "70rpx" : props.size + "rpx"; style.width = style.height; style.flex = `0 0 ${style.height}`; style.backgroundColor = props.bgColor; style.borderRadius = props.mode === "circle" ? "500px" : "5px"; if (props.text) style.padding = "0 6rpx"; return style; }); const imgStyle = vue.computed(() => { let style = {}; style.borderRadius = props.mode === "circle" ? "500px" : "5px"; return style; }); const uText = vue.computed(() => { return String(props.text)[0]; }); const uSexStyle = vue.computed(() => { let style = {}; if (props.sexBgColor) style.backgroundColor = props.sexBgColor; return style; }); const uLevelStyle = vue.computed(() => { let style = {}; if (props.levelBgColor) style.backgroundColor = props.levelBgColor; return style; }); function onLoadError() { error.value = true; avatar.value = base64Avatar; } function onClick() { emit("click", props.index); } const __returned__ = { base64Avatar, props, emit, avatar, error, wrapStyle, imgStyle, uText, uSexStyle, uLevelStyle, onLoadError, onClick, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-avatar", _ctx.customClass]), style: vue.normalizeStyle($setup.$u.toStyle($setup.wrapStyle, _ctx.customStyle)), onClick: $setup.onClick }, [ !$setup.uText && $setup.avatar ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, onError: $setup.onLoadError, style: vue.normalizeStyle($setup.imgStyle), class: "u-avatar__img", src: $setup.avatar, mode: _ctx.imgMode }, null, 44, ["src", "mode"])) : $setup.uText ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-line-1", style: { fontSize: "38rpx" } }, vue.toDisplayString($setup.uText), 1 /* TEXT */ )) : vue.renderSlot(_ctx.$slots, "default", { key: 2 }, void 0, true), _ctx.showSex ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: vue.normalizeClass(["u-avatar__sex", ["u-avatar__sex--" + _ctx.sexIcon]]), style: vue.normalizeStyle($setup.uSexStyle) }, [ vue.createVNode(_component_u_icon, { name: _ctx.sexIcon, size: "20" }, null, 8, ["name"]) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.showLevel ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4, class: "u-avatar__level", style: vue.normalizeStyle($setup.uLevelStyle) }, [ vue.createVNode(_component_u_icon, { name: _ctx.levelIcon, size: "20" }, null, 8, ["name"]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_0 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-8a1adb58"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-avatar/u-avatar.vue"]]); const _sfc_main$Q = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const router2 = useRouter(); const userSubmitData = vue.ref({ avatar: "" }); const userInfo = vue.ref({}); const showUpload = vue.ref(false); function getData() { getUserInfo().then((res) => { formatAppLog("log", "at pages/Tabbar/My/index.vue:221", res, 218); userInfo.value = res.data; }); } function saveAvatar() { if (!userSubmitData.value.avatar) { uni.showToast({ title: uni.$t("请先选择头像"), icon: "none" }); return; } updateUserInfo(userSubmitData.value).then(async () => { showUpload.value = false; await sleep(1e3); getData(); }); } function changeImg(e) { userSubmitData.value.avatar = Array.isArray(e) ? e[0] : e; } function goPage(name) { router2.push({ name }); } function goLogout() { uni.showModal({ title: uni.$t("提示"), content: uni.$t("确定要退出登录吗?"), confirmText: uni.$t("确定"), cancelText: uni.$t("取消"), success: (res) => { if (res.confirm) { logout().then(() => { uni.removeStorageSync("token"); uni.removeStorageSync("userInfo"); router2.replaceAll("/login"); }); } } }); } const handleCopy = () => { var _a2; const code2 = (_a2 = userInfo.value) == null ? void 0 : _a2.user_code; if (!code2) return; uni.setClipboardData({ data: String(code2), // 必须是字符串类型 success: () => { uni.showToast({ title: uni.$t("复制成功"), icon: "success", duration: 2e3 }); } }); }; onShow(() => { getData(); }); const __returned__ = { router: router2, userSubmitData, userInfo, showUpload, getData, saveAvatar, changeImg, goPage, goLogout, handleCopy, CUploadImage, get getUserInfo() { return getUserInfo; }, get updateUserInfo() { return updateUserInfo; }, get logout() { return logout; }, ref: vue.ref, get onShow() { return onShow; }, get sleep() { return sleep; }, PageContainer }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_avatar = __unplugin_components_0; const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_cell_item = __unplugin_components_3; const _component_u_cell_group = __unplugin_components_4$1; const _component_u_popup = __unplugin_components_2$3; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode($setup["PageContainer"], null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "my-page" }, [ vue.createElementVNode("view", { class: "top-bg" }), vue.createElementVNode("view", { class: "main-content" }, [ vue.createElementVNode("view", { class: "user-card" }, [ vue.createElementVNode("view", { class: "avatar-section" }, [ vue.createElementVNode("view", { class: "avatar-wrapper" }, [ $setup.userInfo.level && $setup.userInfo.level != 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "avatar-wrapper-lv" }, [ vue.createElementVNode("image", { src: $setup.userInfo.level.img, style: { "width": "100%", "height": "100%" } }, null, 8, ["src"]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_avatar, { src: $setup.userInfo.avatar || "https://img.yzcdn.cn/vant/cat.jpeg", size: "120", shape: "circle", customStyle: "border: 3px solid rgba(248, 185, 50, 0.2)" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "upload-btn", onClick: _cache[0] || (_cache[0] = ($event) => $setup.showUpload = true) }, [ vue.createVNode(_component_u_icon, { name: "camera-fill", color: "#fff", size: "20" }) ]) ]), vue.createElementVNode("view", { class: "user-info" }, [ vue.createElementVNode("text", { class: "username" }, [ vue.createTextVNode( vue.toDisplayString($setup.userInfo.first_name || _ctx.$t("未设置用户名")) + " ", 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "edit-pen", color: "#999", size: "32", onClick: _cache[1] || (_cache[1] = ($event) => $setup.router.push({ name: "userInfo" })) }) ]), vue.createElementVNode("view", { class: "invite-code-container" }, [ vue.createElementVNode( "text", { class: "user-id", style: { "color": "#666" } }, vue.toDisplayString(_ctx.$t("邀请码")) + ": " + vue.toDisplayString($setup.userInfo.user_code || "--"), 1 /* TEXT */ ), $setup.userInfo.user_id ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "copy-btn", onClick: $setup.handleCopy }, [ vue.createVNode(_component_u_icon, { name: "file-text", size: "30" }) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "text", { class: "user-id", style: { "font-size": "12px" } }, "ID: " + vue.toDisplayString($setup.userInfo.user_id || "--"), 1 /* TEXT */ ) ]) ]), $setup.userInfo.level && $setup.userInfo.level.level != 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "level-progress-section" }, [ vue.createElementVNode("view", { class: "level-info-text" }, [ vue.createElementVNode( "text", { class: "current-level-name" }, vue.toDisplayString($setup.userInfo.level.level_name), 1 /* TEXT */ ), $setup.userInfo.next_level ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "upgrade-tips" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("距升级")) + " " + vue.toDisplayString($setup.userInfo.next_level.level_name) + " " + vue.toDisplayString(_ctx.$t("还需")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "highlight" }, vue.toDisplayString(Math.max(0, Number($setup.userInfo.next_level.recharge) - Number($setup.userInfo.total_recharge || 0)).toFixed(2)), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$t("成长值")), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "upgrade-tips" }, vue.toDisplayString(_ctx.$t("已达到最高等级")), 1 /* TEXT */ )) ]), vue.createElementVNode("view", { class: "progress-bar-container" }, [ vue.createElementVNode("view", { class: "progress-track" }, [ vue.createElementVNode( "view", { class: "progress-fill", style: vue.normalizeStyle({ width: $setup.userInfo.next_level ? Math.min(Number($setup.userInfo.total_recharge || 0) / Number($setup.userInfo.next_level.recharge) * 100, 100) + "%" : "100%" }) }, null, 4 /* STYLE */ ) ]), vue.createElementVNode("view", { class: "progress-value" }, [ $setup.userInfo.next_level ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, vue.toDisplayString(Number($setup.userInfo.total_recharge || 0).toFixed(2)) + " / " + vue.toDisplayString(Number($setup.userInfo.next_level.recharge).toFixed(2)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1 }, vue.toDisplayString(Number($setup.userInfo.total_recharge || 0).toFixed(2)) + " / MAX", 1 /* TEXT */ )) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "asset-section" }, [ vue.createElementVNode("view", { class: "asset-item" }, [ vue.createElementVNode( "text", { class: "asset-label" }, vue.toDisplayString(_ctx.$t("账户余额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "asset-value" }, "¥" + vue.toDisplayString($setup.userInfo.money || 0), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "asset-item" }, [ vue.createElementVNode( "text", { class: "asset-label" }, vue.toDisplayString(_ctx.$t("冻结金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "asset-value muted" }, "¥" + vue.toDisplayString($setup.userInfo.frozen_money || 0), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "quick-actions" }, [ vue.createVNode(_component_u_button, { type: "primary", icon: "plus-circle", customStyle: "flex: 1; height: 46px; border-radius: 12px; background: #f8b932; border: none; font-weight: bold;", onClick: _cache[2] || (_cache[2] = ($event) => $setup.goPage("topUp")) }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("充值")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_button, { type: "primary", icon: "red-packet", customStyle: "flex: 1; height: 46px; border-radius: 12px; background: #f8b932; border: none; font-weight: bold;", onClick: _cache[3] || (_cache[3] = ($event) => $setup.goPage("withdraw")) }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("提现")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), vue.createElementVNode("view", { class: "function-list" }, [ vue.createVNode(_component_u_cell_group, { border: false }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_cell_item, { title: _ctx.$t("余额宝"), isLink: "", icon: "rmb-circle", customStyle: "padding: 12px 20px", onClick: _cache[4] || (_cache[4] = ($event) => $setup.goPage("Yuebao")) }, null, 8, ["title"]), vue.createVNode(_component_u_cell_item, { title: _ctx.$t("钱包管理"), isLink: "", icon: "bag", customStyle: "padding: 12px 20px", onClick: _cache[5] || (_cache[5] = ($event) => $setup.goPage("WalletManagement")) }, null, 8, ["title"]), vue.createVNode(_component_u_cell_item, { title: _ctx.$t("优惠活动"), isLink: "", icon: "gift", customStyle: "padding: 12px 20px", onClick: _cache[6] || (_cache[6] = ($event) => $setup.goPage("promotion")) }, null, 8, ["title"]), vue.createVNode(_component_u_cell_item, { title: _ctx.$t("资金记录"), isLink: "", icon: "order", customStyle: "padding: 12px 20px", onClick: _cache[7] || (_cache[7] = ($event) => $setup.goPage("fundRecord")) }, null, 8, ["title"]), vue.createVNode(_component_u_cell_item, { title: _ctx.$t("充值记录"), isLink: "", icon: "coupon", customStyle: "padding: 12px 20px", onClick: _cache[8] || (_cache[8] = ($event) => $setup.goPage("rechargeRecord")) }, null, 8, ["title"]), vue.createVNode(_component_u_cell_item, { title: _ctx.$t("提现记录"), isLink: "", icon: "tags", customStyle: "padding: 12px 20px", onClick: _cache[9] || (_cache[9] = ($event) => $setup.goPage("withdrawalHistory")) }, null, 8, ["title"]), vue.createVNode(_component_u_cell_item, { title: _ctx.$t("投注历史"), isLink: "", icon: "clock", customStyle: "padding: 12px 20px", onClick: _cache[10] || (_cache[10] = ($event) => $setup.goPage("AllHistory")) }, null, 8, ["title"]), vue.createVNode(_component_u_cell_item, { title: _ctx.$t("账户安全"), isLink: "", icon: "integral", customStyle: "padding: 12px 20px", onClick: _cache[11] || (_cache[11] = ($event) => $setup.goPage("safety")) }, null, 8, ["title"]) ]), _: 1 /* STABLE */ }) ]), vue.createElementVNode("view", { class: "logout-section" }, [ vue.createVNode(_component_u_button, { plain: "", customStyle: "height: 46px; border-radius: 12px; color: #ff6b6b; border-color: #ff6b6b; font-weight: 500;", onClick: $setup.goLogout }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("退出登录")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), vue.createElementVNode("view", { class: "my-bottom" }) ]), vue.createVNode(_component_u_popup, { modelValue: $setup.showUpload, "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $setup.showUpload = $event), mode: "bottom", "border-radius": "24", "safe-area-inset-bottom": true, onClose: _cache[14] || (_cache[14] = ($event) => $setup.showUpload = false) }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-inner" }, [ vue.createElementVNode( "view", { class: "popup-title" }, vue.toDisplayString(_ctx.$t("更换头像")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "uploader-box" }, [ vue.createVNode($setup["CUploadImage"], { onChange: $setup.changeImg, maxCount: 1 }) ]), vue.createElementVNode("view", { class: "popup-btns" }, [ vue.createVNode(_component_u_button, { customStyle: "flex: 1; height: 48px; border-radius: 12px; margin-right: 12px", onClick: _cache[12] || (_cache[12] = ($event) => $setup.showUpload = false) }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("取消")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_button, { type: "primary", customStyle: "flex: 1; height: 48px; border-radius: 12px; background: #f8b932; border: none;", onClick: $setup.saveAvatar }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("保存")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } const PagesTabbarMyIndex = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__scopeId", "data-v-5b567bcd"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/My/index.vue"]]); const _sfc_main$P = { __name: "detail", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const detailData = vue.ref(null); const orderId = vue.ref(""); onLoad((options) => { if (options && options.id) { orderId.value = options.id; fetchDetail(); } }); const fetchDetail = async () => { try { const res = await getDigitalOrderInfo({ id: orderId.value }); if (res && res.code === 1 && res.data) { detailData.value = res.data; } else { uni.showToast({ title: (res == null ? void 0 : res.msg) || t2("获取注单详情失败"), icon: "none" }); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/components/Digital/detail.vue:138", "获取详情失败", error); } }; const getBallColorClass = (numStr) => { const num = parseInt(numStr, 10); if (isNaN(num)) return "bg-gray"; const reds = [1, 2, 7, 8, 12, 13, 18, 19, 23, 24, 29, 30, 34, 35, 40, 45, 46]; const blues = [3, 4, 9, 10, 14, 15, 20, 25, 26, 31, 36, 37, 41, 42, 47, 48]; const greens = [5, 6, 11, 16, 17, 21, 22, 27, 28, 32, 33, 38, 39, 43, 44, 49]; if (reds.includes(num)) return "bg-red"; if (blues.includes(num)) return "bg-blue"; if (greens.includes(num)) return "bg-green"; return "bg-gray"; }; const getStatusText = (status) => { const s = Number(status); if (s === 0) return t2("待开奖"); if (s === 1) return t2("未中奖"); if (s === 2) return t2("已中奖"); if (s === 3) return t2("合局"); return t2("未知状态"); }; const statusBgClass = vue.computed(() => { if (!detailData.value) return ""; const s = Number(detailData.value.lottery_status); if (s === 0) return "bg-pending"; if (s === 1) return "bg-loss"; if (s === 2) return "bg-win"; if (s === 3) return "bg-draw"; return "bg-loss"; }); const statusIcon = vue.computed(() => { if (!detailData.value) return ""; const s = Number(detailData.value.lottery_status); if (s === 0) return "clock"; if (s === 1) return "close-circle"; if (s === 2) return "checkmark-circle"; if (s === 3) return "minus-circle"; return "info-circle"; }); const getProfitText = (data) => { const s = Number(data.lottery_status); if (s === 2) return `+${parseFloat(data.win_amount || 0).toFixed(2)}`; if (s === 1) return `-${parseFloat(data.amount || 0).toFixed(2)}`; if (s === 3) return "0.00"; return "--"; }; const copyText = (text) => { uni.setClipboardData({ data: String(text), success: () => uni.showToast({ title: t2("复制成功"), icon: "none" }) }); }; const __returned__ = { t: t2, detailData, orderId, fetchDetail, getBallColorClass, getStatusText, statusBgClass, statusIcon, getProfitText, copyText, ref: vue.ref, computed: vue.computed, get onLoad() { return onLoad; }, get useI18n() { return useI18n; }, get getDigitalOrderInfo() { return getDigitalOrderInfo; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_tag = __unplugin_components_2$2; const _component_u_cell_item = __unplugin_components_3; const _component_u_cell_group = __unplugin_components_4$1; const _component_u_loading = __unplugin_components_3$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("注单详情") }, { default: vue.withCtx(() => [ $setup.detailData ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "detail-content" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["status-card", $setup.statusBgClass]) }, [ vue.createElementVNode("view", { class: "status-top" }, [ vue.createElementVNode("view", { class: "status-icon-row" }, [ vue.createVNode(_component_u_icon, { name: $setup.statusIcon, size: "44", color: "#fff" }, null, 8, ["name"]), vue.createElementVNode( "text", { class: "status-text" }, vue.toDisplayString($setup.getStatusText($setup.detailData.lottery_status)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "profit-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.detailData.lottery_status === 0 ? $setup.t("等待开奖中") : $setup.t("盈亏金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: vue.normalizeClass(["value", { "is-win": $setup.detailData.lottery_status === 2 }]) }, vue.toDisplayString($setup.getProfitText($setup.detailData)), 3 /* TEXT, CLASS */ ) ]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "info-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString($setup.t("投注内容")), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_tag, { text: $setup.detailData.type === 1 ? $setup.t("澳门六合彩") : $setup.t("香港六合彩"), type: "primary", plain: "", size: "mini" }, null, 8, ["text"]) ]), vue.createElementVNode("view", { class: "bet-details" }, [ vue.createElementVNode("view", { class: "detail-item full-width" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("期号 / 玩法")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "val" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("第")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "font-din" }, vue.toDisplayString($setup.detailData.issue), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString($setup.t("期")) + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { style: { "color": "#94a3b8", "margin": "0 8rpx" } }, "|"), vue.createTextVNode( " [" + vue.toDisplayString($setup.detailData.game) + "] - " + vue.toDisplayString($setup.detailData.gameplay), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "detail-item full-width highlight-box" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("投注项")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val bet-number" }, vue.toDisplayString($setup.detailData.number), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "detail-item-group" }, [ vue.createElementVNode("view", { class: "detail-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val odds" }, "@" + vue.toDisplayString($setup.detailData.odds), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "detail-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("投注本金")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val amount-val" }, vue.toDisplayString(parseFloat($setup.detailData.amount || 0).toFixed(2)), 1 /* TEXT */ ) ]), $setup.detailData.lottery_status === 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "detail-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("派彩金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val win-val" }, vue.toDisplayString(parseFloat($setup.detailData.win_amount || 0).toFixed(2)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]) ]), $setup.detailData.lottery && $setup.detailData.lottery.open_code ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "info-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString($setup.t("开奖结果")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "lottery-result-box" }, [ $setup.detailData.lottery.open_time ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "open-time-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("开奖时间")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val font-din" }, vue.toDisplayString($setup.detailData.lottery.open_time), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "lhc-open-code-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.detailData.lottery.open_code.split(","), (code2, index) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: index }, [ index === $setup.detailData.lottery.open_code.split(",").length - 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "plus-sign" }, "+")) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 替换为波色计算类名 "), vue.createElementVNode( "view", { class: vue.normalizeClass(["lhc-ball", $setup.getBallColorClass(code2)]) }, vue.toDisplayString(code2), 3 /* TEXT, CLASS */ ) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "info-card no-padding" }, [ vue.createVNode(_component_u_cell_group, { border: false }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_cell_item, { title: $setup.t("注单单号"), arrow: false, "border-bottom": true, "title-style": { color: "#64748b" } }, { "right-icon": vue.withCtx(() => [ vue.createElementVNode("view", { class: "copy-value", onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyText($setup.detailData.ordernum)) }, [ vue.createElementVNode( "text", { class: "font-din" }, vue.toDisplayString($setup.detailData.ordernum), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "file-text", size: "28", color: "#94a3b8", style: { "margin-left": "8rpx" } }) ]) ]), _: 1 /* STABLE */ }, 8, ["title"]), vue.createVNode(_component_u_cell_item, { title: $setup.t("投注时间"), value: $setup.detailData.created_at, arrow: false, "border-bottom": false, "title-style": { color: "#64748b" } }, null, 8, ["title", "value"]) ]), _: 1 /* STABLE */ }) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "loading-container" }, [ vue.createVNode(_component_u_loading, { mode: "circle", size: "40", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode( "text", { class: "loading-text" }, vue.toDisplayString($setup.t("正在加载注单详情...")), 1 /* TEXT */ ) ])) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesTabbarEntertainmentComponentsDigitalDetail = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__scopeId", "data-v-d0d4f802"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/components/Digital/detail.vue"]]); const version = "4.1.2"; const description = ""; const author = { name: "viarotel", email: "viarotel@qq.com", url: "https://viarotel.eu.org/", wechat: "viarotel", address: "河南省郑州市" }; const primaryColor = "#028d71"; const appName = "MelBet"; const appVersion = version; const appDescription = description; const appExtra = { ...author }; var wsURL = "wss://sportapi.sp2509.cc:9501"; class WebSocketService { constructor() { this.url = wsURL; this.socketTask = null; this.isOpen = false; this.isReconnecting = false; this.reconnectCount = 0; this.maxReconnect = 5; this.timer = null; this.pingInterval = 3e4; } // 1. 初始化连接 connect() { if (this.isOpen) return; let token = uni.getStorageSync("token"); this.socketTask = uni.connectSocket({ url: token ? this.url + "?token=" + token : this.url, success: () => { formatAppLog("log", "at utils/websocket.js:40", "WebSocket 开始连接..."); } }); this.socketTask.onOpen(() => { formatAppLog("log", "at utils/websocket.js:46", "WebSocket 连接成功"); this.isOpen = true; this.isReconnecting = false; this.reconnectCount = 0; this.startHeartbeat(); }); this.socketTask.onMessage((res) => { const WebsocketData = useWebsocketDataStore(); const responseData = JSON.parse(res.data); if (responseData.type === "sport_list") { try { const arrayBuffer = uni.base64ToArrayBuffer(responseData.message); const uint8Array = new Uint8Array(arrayBuffer); const decompressedData = pako.inflate(uint8Array); let resultText = ""; if (typeof TextDecoder !== "undefined") { const textDecoder = new TextDecoder("utf-8"); resultText = textDecoder.decode(decompressedData); } else { resultText = utf8ArrayToString(decompressedData); } const sport_list_res = JSON.stringify( { ...responseData, message: JSON.parse(resultText) } ); WebsocketData.setWebsocketData(sport_list_res); } catch (err) { formatAppLog("error", "at utils/websocket.js:106", "解压失败:", err); } } else { WebsocketData.setWebsocketGlobalData(responseData); uni.$emit("onSocketMessage", res.data); } }); this.socketTask.onClose(() => { formatAppLog("log", "at utils/websocket.js:119", "WebSocket 连接断开"); this.isOpen = false; this.socketTask = null; this.stopHeartbeat(); this.reconnect(); }); this.socketTask.onError((err) => { formatAppLog("error", "at utils/websocket.js:128", "WebSocket 连接错误:", err); this.isOpen = false; }); } // 2. 发送消息 send(data) { if (this.isOpen && this.socketTask) { const msg = typeof data === "object" ? JSON.stringify(data) : data; this.socketTask.send({ data: msg }); } else { formatAppLog("error", "at utils/websocket.js:140", "WebSocket 尚未连接,消息发送失败"); } } // 3. 开启心跳机制 (防止连接假死或被网关切断) startHeartbeat() { this.stopHeartbeat(); this.timer = setInterval(() => { this.send({ type: "ping" }); }, this.pingInterval); } // 4. 停止心跳 stopHeartbeat() { if (this.timer) { clearInterval(this.timer); this.timer = null; } } // 5. 断线重连机制 reconnect() { if (this.isReconnecting) return; this.isReconnecting = true; this.reconnectCount++; formatAppLog("log", "at utils/websocket.js:171", `WebSocket 正在尝试第 ${this.reconnectCount} 次重连...`); setTimeout(() => { this.isReconnecting = false; this.connect(); }, 3e3); } // 6. 主动关闭连接 (退出登录或离开应用时调用) close() { this.maxReconnect = 0; this.stopHeartbeat(); if (this.isOpen && this.socketTask) { this.socketTask.close(); } } } const socket = new WebSocketService(); function useWebView() { const router2 = useRouter(); function open2(props) { router2.push({ path: "/web-view", query: props }); } return { open: open2 }; } var __defProp$3 = Object.defineProperty; var __defProps$3 = Object.defineProperties; var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols; var __hasOwnProp$3 = Object.prototype.hasOwnProperty; var __propIsEnum$3 = Object.prototype.propertyIsEnumerable; var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues$3 = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp$3.call(b, prop)) __defNormalProp$3(a, prop, b[prop]); if (__getOwnPropSymbols$3) for (var prop of __getOwnPropSymbols$3(b)) { if (__propIsEnum$3.call(b, prop)) __defNormalProp$3(a, prop, b[prop]); } return a; }; var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b)); function promisify(callback) { return (...args) => { const options = args[0]; return new Promise( (resolve2, reject) => { callback(__spreadProps$3(__spreadValues$3({}, options), { success: (result) => { var _a2; (_a2 = options == null ? void 0 : options.success) == null ? void 0 : _a2.call(options, result); resolve2(result); }, fail: (error) => { var _a2; (_a2 = options == null ? void 0 : options.fail) == null ? void 0 : _a2.call(options, error); reject(error); } })); } ); }; } promisify(uni.addPhoneContact); promisify(uni.authorize); promisify(uni.checkIsSoterEnrolledInDevice); promisify(uni.checkIsSupportSoterAuthentication); promisify(uni.checkSession); promisify(uni.chooseAddress); promisify(uni.chooseFile); promisify(uni.chooseImage); promisify(uni.chooseInvoice); promisify(uni.chooseInvoiceTitle); promisify(uni.chooseLocation); promisify(uni.chooseMedia); promisify(uni.chooseMessageFile); promisify(uni.chooseVideo); promisify(uni.clearStorage); promisify(uni.closeBLEConnection); promisify(uni.closeBluetoothAdapter); promisify(uni.closePreviewImage); promisify(uni.compressImage); promisify(uni.compressVideo); promisify(uni.createBLEConnection); promisify(uni.createPushMessage); promisify(uni.getBatteryInfo); promisify(uni.getBLEDeviceCharacteristics); promisify(uni.getBLEDeviceRSSI); promisify(uni.getBLEDeviceServices); promisify(uni.getBluetoothAdapterState); promisify(uni.getBluetoothDevices); promisify(uni.getCheckBoxState); promisify(uni.getClipboardData); promisify(uni.getConnectedBluetoothDevices); promisify(uni.getExtConfig); promisify(uni.getFileInfo); promisify(uni.getImageInfo); promisify(uni.getLocation); promisify(uni.getNetworkType); promisify(uni.getProvider); promisify(uni.getPushClientId); promisify(uni.getSavedFileInfo); promisify(uni.getSavedFileList); promisify(uni.getScreenBrightness); promisify(uni.getSelectedTextRange); promisify(uni.getSetting); promisify(uni.getStorage); promisify(uni.getStorageInfo); promisify(uni.getSystemInfo); promisify(uni.getUserInfo); promisify(uni.getUserProfile); promisify(uni.getVideoInfo); promisify(uni.hideHomeButton); promisify(uni.hideNavigationBarLoading); promisify(uni.hideShareMenu); promisify(uni.hideTabBar); promisify(uni.hideTabBarRedDot); promisify(uni.loadFontFace); promisify(uni.login); promisify(uni.makePhoneCall); promisify(uni.navigateBack); promisify(uni.navigateBackMiniProgram); promisify(uni.navigateTo); promisify(uni.navigateToMiniProgram); promisify(uni.notifyBLECharacteristicValueChange); promisify(uni.openAppAuthorizeSetting); promisify(uni.openBluetoothAdapter); promisify(uni.openDocument); promisify(uni.openLocation); promisify(uni.openVideoEditor); promisify(uni.pageScrollTo); promisify(uni.preLogin); promisify(uni.previewImage); promisify(uni.readBLECharacteristicValue); promisify(uni.redirectTo); promisify(uni.reLaunch); promisify(uni.removeSavedFile); promisify(uni.removeStorage); promisify(uni.removeTabBarBadge); promisify(uni.requestPayment); promisify(uni.requestSubscribeMessage); promisify(uni.saveFile); promisify(uni.saveImageToPhotosAlbum); promisify(uni.saveVideoToPhotosAlbum); promisify(uni.scanCode); promisify(uni.setBackgroundColor); promisify(uni.setBackgroundTextStyle); promisify(uni.setBLEMTU); promisify(uni.setClipboardData); promisify(uni.setEnableDebug); promisify(uni.setKeepScreenOn); promisify(uni.setNavigationBarColor); promisify(uni.setNavigationBarTitle); promisify(uni.setScreenBrightness); promisify(uni.setStorage); promisify(uni.setTabBarBadge); promisify(uni.setTabBarItem); promisify(uni.setTabBarStyle); promisify(uni.share); promisify(uni.shareWithSystem); promisify(uni.showActionSheet); promisify(uni.showLoading); const showModal = promisify(uni.showModal); promisify(uni.showNavigationBarLoading); promisify(uni.showShareMenu); promisify(uni.showTabBar); promisify(uni.showTabBarRedDot); const showToast = promisify(uni.showToast); promisify(uni.startBluetoothDevicesDiscovery); promisify(uni.startPullDownRefresh); promisify(uni.startSoterAuthentication); promisify(uni.stopBluetoothDevicesDiscovery); promisify(uni.switchTab); promisify(uni.vibrate); promisify(uni.vibrateLong); promisify(uni.vibrateShort); promisify(uni.writeBLECharacteristicValue); const useUserStore = defineStore( "user", () => { const userInfo = vue.ref({}); const userId = vue.computed(() => userInfo.value.id || ""); const loginLoading = vue.ref(false); function logout2() { uni.removeStorageSync("token"); uni.removeStorageSync("user_info"); userInfo.value = {}; } async function getUserData() { if (!uni.getStorageSync("token")) { throw new Error("未登录,无法获取用户信息"); } try { const res = await getUserInfo(); if (res == null ? void 0 : res.data) { userInfo.value = res.data; uni.setStorageSync("user_info", res.data); } } catch (error) { formatAppLog("error", "at store/user/index.js:42", "获取用户信息失败:", error); throw new Error("获取用户信息失败"); } } async function initUserInfo() { if (uni.getStorageSync("token")) { await getUserData(); } } return { userInfo, userId, loginLoading, logout: logout2, getUserData, initUserInfo }; } ); const _imports_0$3 = "/static/images/login/f1bet.png"; const _imports_1 = "/static/images/login/mclaren.png"; const _imports_2 = "/static/images/login/Profile.png"; const _imports_3 = "/static/images/login/Lock.png"; const _imports_4$1 = "/static/images/login/register.png"; const _imports_5 = "/static/images/login/youke.png"; const _imports_6 = "/static/images/login/kefu.png"; const _sfc_main$O = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { locale } = useI18n(); const router2 = useRouter(); const webView = useWebView(); const richView = useRichView(); const userStore = useUserStore(); const agreed = vue.ref(false); const RememberPwd = vue.ref(false); const activeLoginType = vue.ref(0); const accountForm = vue.reactive({ account: "", // 账号 password: "" // 密码 }); const emailForm = vue.reactive({ account: "", // 邮箱 password: "" // 密码 }); function initRecall() { const isRememberAccount = uni.getStorageSync("is_remember_pwd_account"); if (isRememberAccount === "true" || isRememberAccount === true) { accountForm.account = uni.getStorageSync("saved_account_account") || ""; accountForm.password = uni.getStorageSync("saved_password_account") || ""; } const isRememberEmail = uni.getStorageSync("is_remember_pwd_email"); if (isRememberEmail === "true" || isRememberEmail === true) { emailForm.account = uni.getStorageSync("saved_account_email") || ""; emailForm.password = uni.getStorageSync("saved_password_email") || ""; } updateRememberPwdStatus(); } function updateRememberPwdStatus() { if (activeLoginType.value === 0) { const isRememberAccount = uni.getStorageSync("is_remember_pwd_account"); RememberPwd.value = isRememberAccount === "true" || isRememberAccount === true; } else { const isRememberEmail = uni.getStorageSync("is_remember_pwd_email"); RememberPwd.value = isRememberEmail === "true" || isRememberEmail === true; } } initRecall(); const changeLoginType = (index) => { activeLoginType.value = index; updateRememberPwdStatus(); }; function onAgreementClick() { richView.open({ title: uni.$t("隐私政策"), content: `

隐私政策声明

欢迎您使用我们的服务!我们非常重视您的隐私保护和个人信息安全。本《隐私政策》将帮助您了解我们如何收集、使用、存储和保护您的个人信息。

1. 我们如何收集您的信息

当您注册账号或使用我们的产品时,我们可能会收集您的以下信息:

  • 注册信息:如您的邮箱地址、账号名称、密码等。
  • 设备信息:如设备型号、操作系统版本、唯一设备标识符等,用于保障账号安全及风险控制。
  • 日志信息:如您的IP地址、访问时间、操作记录等。

2. 我们如何使用您的信息

我们收集的信息将主要用于以下用途:

  • 向您提供、维护和改进我们的产品及服务;
  • 进行身份验证、安全防范、诈骗监测,确保系统及您的资金/数据安全;
  • 为您提供专属的客户服务及技术支持。

3. 信息的共享与保护

我们承诺对您的信息承担保密义务。除法律法规要求或为实现核心功能所必须的第三方合作外,我们不会擅自向任何无关第三方出售、共享或披露您的个人信息。我们采用符合业界标准的加密技术和安全防护措施,防止您的信息遭到未经授权的访问、泄露或损坏。

4. 您的权利

您有权随时访问、更正、删除您的个人信息,或注销您的账号。如您在此过程中遇到任何问题,请随时联系我们的在线客服。

请仔细阅读以上内容,勾选“我已阅读并同意”即代表您完全认可本政策。
` }); } async function validateAccountForm() { if (!accountForm.account) { await $u.toast(uni.$t("请输入账号")); return false; } if (!accountForm.password) { await $u.toast(uni.$t("请输入登录密码")); return false; } return true; } async function validateEmailForm() { if (!emailForm.account) { await $u.toast(uni.$t("请输入登录邮箱")); return false; } if (!emailForm.password) { await $u.toast(uni.$t("请输入登录密码")); return false; } return true; } function checkAgreement(callback) { if (!agreed.value) { uni.showModal({ title: uni.$t("温馨提示"), content: uni.$t("为了保障您的权益,请先阅读并同意相关条款"), confirmText: uni.$t("同意"), cancelText: uni.$t("取消"), confirmColor: "#f8b932", success: (res) => { if (res.confirm) { agreed.value = true; callback(); } } }); } else { callback(); } } function onGuestClick() { checkAgreement(() => { uni.switchTab({ url: "/pages/Tabbar/Home/index" }); }); } function onLineService() { if (!uni.getStorageSync("youke_token")) { userGuestRegister().then((res) => { uni.setStorageSync("youke_token", res.data.token); router2.push({ name: "customerService", query: { GuestMode: 1 } }); }); } else { router2.push({ name: "customerService", query: { GuestMode: 1 } }); } } function onLoginClick() { checkAgreement(async () => { let isValid = false; let loginData = { account: "", password: "" }; if (activeLoginType.value === 0) { isValid = await validateAccountForm(); loginData.account = accountForm.account; loginData.password = accountForm.password; } else { isValid = await validateEmailForm(); loginData.account = emailForm.account; loginData.password = emailForm.password; } if (!isValid) return; postUserLogin(loginData).then((res) => { formatAppLog("log", "at pages/login/index.vue:336", res, 315); socket.close(); if (activeLoginType.value === 0) { if (RememberPwd.value) { uni.setStorageSync("is_remember_pwd_account", true); uni.setStorageSync("saved_account_account", loginData.account); uni.setStorageSync("saved_password_account", loginData.password); } else { uni.removeStorageSync("is_remember_pwd_account"); uni.removeStorageSync("saved_account_account"); uni.removeStorageSync("saved_password_account"); } } else { if (RememberPwd.value) { uni.setStorageSync("is_remember_pwd_email", true); uni.setStorageSync("saved_account_email", loginData.account); uni.setStorageSync("saved_password_email", loginData.password); } else { uni.removeStorageSync("is_remember_pwd_email"); uni.removeStorageSync("saved_account_email"); uni.removeStorageSync("saved_password_email"); } } uni.setStorageSync("token", res.data.token); setTimeout(() => { userStore.getUserData(); const pages = getCurrentPages(); if (pages.length > 1) { uni.navigateBack({ delta: 1 }); } else { router2.pushTab({ name: "index" }); } }, 1500); }); }); } const __returned__ = { locale, router: router2, webView, richView, userStore, agreed, RememberPwd, activeLoginType, accountForm, emailForm, initRecall, updateRememberPwdStatus, changeLoginType, onAgreementClick, validateAccountForm, validateEmailForm, checkAgreement, onGuestClick, onLineService, onLoginClick, ref: vue.ref, reactive: vue.reactive, computed: vue.computed, get $u() { return $u; }, get useLocale() { return useLocale; }, get appDescription() { return appDescription; }, get appExtra() { return appExtra; }, get appName() { return appName; }, get appVersion() { return appVersion; }, selectLang, get postUserLogin() { return postUserLogin; }, get userGuestRegister() { return userGuestRegister; }, get getLocale() { return getLocale; }, get socket() { return socket; }, get useI18n() { return useI18n; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_input = __unplugin_components_3$2; const _component_u_button = __unplugin_components_2$1; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "relative overflow-hidden login-page", style: { "background-image": "url('/static/images/login/bg-login-app.png')" } }, [ vue.createElementVNode("view", { class: "pos-fixed", style: { "z-index": "999", "right": "20px", "top": "calc(20px + env(safe-area-inset-top))" } }, [ vue.createVNode($setup["selectLang"]) ]), vue.createElementVNode("view", { class: "relative z-10 flex flex-col justify-center", style: { "height": "100dvh", "padding-top": "env(safe-area-inset-top)", "padding-bottom": "env(safe-area-inset-bottom)", "box-sizing": "border-box" } }, [ vue.createElementVNode("view", { class: "flex justify-center mb-4" }, [ vue.createElementVNode("image", { src: _imports_0$3, mode: "heightFix", class: "h-6" }) ]), vue.createElementVNode("view", { class: "mx-5 rounded-3xl p-4 shadow-lg relative", style: { "background": "rgba(120, 120, 120, 0.1)", "backdrop-filter": "blur(5px)", "border": "1px solid rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("view", { class: "text-center mb-4 px-4" }, [ vue.createElementVNode("image", { src: _imports_1, mode: "widthFix", style: { "width": "150px" } }), vue.createElementVNode( "text", { class: "block mt-2", style: { "font-weight": "800", "font-size": "20px" } }, vue.toDisplayString(_ctx.$t("迈凯伦")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text-xs text-gray-600 block mt-1" }, vue.toDisplayString(_ctx.$t("官方合作伙伴")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "flex mb-4" }, [ vue.createElementVNode( "view", { class: "flex-1 text-center py-1.5 text-sm font-bold transition-all", style: vue.normalizeStyle($setup.activeLoginType === 0 ? "background: rgba(255,255,255,0.8); color: #ff7700; border: 1px solid #ff7700; border-radius: 8px;" : "background: rgba(255,255,255,0.4); color: #666; border: 1px solid transparent; border-radius: 8px;"), onClick: _cache[0] || (_cache[0] = ($event) => $setup.changeLoginType(0)) }, vue.toDisplayString(_ctx.$t("账号登录")), 5 /* TEXT, STYLE */ ), vue.createElementVNode("view", { style: { "width": "10px" } }), vue.createElementVNode( "view", { class: "flex-1 text-center py-1.5 text-sm font-bold transition-all", style: vue.normalizeStyle($setup.activeLoginType === 1 ? "background: rgba(255,255,255,0.8); color: #ff7700; border: 1px solid #ff7700; border-radius: 8px;" : "background: rgba(255,255,255,0.4); color: #666; border: 1px solid transparent; border-radius: 8px;"), onClick: _cache[1] || (_cache[1] = ($event) => $setup.changeLoginType(1)) }, vue.toDisplayString(_ctx.$t("邮箱登录")), 5 /* TEXT, STYLE */ ) ]), $setup.activeLoginType === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "space-y-3 mb-4" }, [ vue.createElementVNode("view", { class: "rounded-xl flex items-center px-4 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_2, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.accountForm.account, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.accountForm.account = $event), placeholder: _ctx.$t("请输入账号"), type: "text", clearable: "", border: false }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-4 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_3, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.accountForm.password, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.accountForm.password = $event), placeholder: _ctx.$t("请输入登录密码"), type: "password", clearable: "", border: false, "password-icon": "" }, null, 8, ["modelValue", "placeholder"]) ]) ])) : vue.createCommentVNode("v-if", true), $setup.activeLoginType === 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "space-y-3 mb-4" }, [ vue.createElementVNode("view", { class: "rounded-xl flex items-center px-4 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_2, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.emailForm.account, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.emailForm.account = $event), placeholder: _ctx.$t("请输入登录邮箱"), type: "text", clearable: "", border: false }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-4 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_3, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.emailForm.password, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.emailForm.password = $event), placeholder: _ctx.$t("请输入登录密码"), type: "password", clearable: "", border: false, "password-icon": "" }, null, 8, ["modelValue", "placeholder"]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["flex items-center justify-between mb-4 text-xs", [$setup.locale !== "zh" ? "checkbox-group" : ""]]) }, [ vue.createElementVNode("view", { class: "flex items-center", onClick: _cache[6] || (_cache[6] = ($event) => $setup.RememberPwd = !$setup.RememberPwd) }, [ vue.createElementVNode( "view", { class: "flex items-center justify-center rounded-full transition-all", style: vue.normalizeStyle([{ "width": "15px", "height": "15px", "border": "1px solid" }, $setup.RememberPwd ? "border-color: #ff8c00; background: rgba(255,255,255,0.9);" : "border-color: #999; background: rgba(255,255,255,0.4);"]) }, [ $setup.RememberPwd ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "rounded-full", style: { "width": "7px", "height": "7px", "background-color": "#ff8c00" } })) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createElementVNode( "text", { class: "text-gray-800 ml-1.5" }, vue.toDisplayString(_ctx.$t("记住密码")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "flex items-center", onClick: _cache[7] || (_cache[7] = ($event) => $setup.agreed = !$setup.agreed) }, [ vue.createElementVNode( "view", { class: "flex items-center justify-center rounded-full transition-all", style: vue.normalizeStyle([{ "width": "15px", "height": "15px", "border": "1px solid" }, $setup.agreed ? "border-color: #ff8c00; background: rgba(255,255,255,0.9);" : "border-color: #999; background: rgba(255,255,255,0.4);"]) }, [ $setup.agreed ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "rounded-full", style: { "width": "7px", "height": "7px", "background-color": "#ff8c00" } })) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createElementVNode( "text", { class: "text-gray-800 ml-1.5" }, vue.toDisplayString(_ctx.$t("已阅读并同意")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "font-medium", style: { "color": "#ff8c00" }, onClick: vue.withModifiers($setup.onAgreementClick, ["stop"]) }, "《" + vue.toDisplayString(_ctx.$t("隐私政策")) + "》", 1 /* TEXT */ ) ]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "mb-4" }, [ vue.createVNode(_component_u_button, { ripple: "", onClick: $setup.onLoginClick, class: "rounded-xl h-10 text-base w-full font-bold", "custom-style": { background: "linear-gradient(90deg, #ff8c00, #ff6600)", color: "#fff", border: "none", borderRadius: "10px" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("登录")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["custom-style"]) ]), vue.createElementVNode("view", { class: "flex justify-between gap-2" }, [ vue.createElementVNode("view", { class: "flex-1 flex flex-col items-center justify-center py-1.5 rounded-xl transition-all", style: { "background": "rgba(255,255,255,0.2)", "border": "1px solid rgba(255,255,255,0.4)" }, onClick: _cache[8] || (_cache[8] = ($event) => $setup.router.push("/register")) }, [ vue.createElementVNode("image", { src: _imports_4$1, class: "w-5 h-5 mb-1", mode: "aspectFit" }), vue.createElementVNode( "text", { class: "text-white text-xs b-btn" }, vue.toDisplayString(_ctx.$t("注册")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "flex-1 flex flex-col items-center justify-center py-1.5 rounded-xl transition-all", style: { "background": "rgba(255,255,255,0.2)", "border": "1px solid rgba(255,255,255,0.4)" }, onClick: $setup.onGuestClick }, [ vue.createElementVNode("image", { src: _imports_5, class: "w-5 h-5 mb-1", mode: "aspectFit" }), vue.createElementVNode( "text", { class: "text-white text-xs b-btn" }, vue.toDisplayString(_ctx.$t("游客登陆")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "flex-1 flex flex-col items-center justify-center py-1.5 rounded-xl transition-all", style: { "background": "rgba(255,255,255,0.2)", "border": "1px solid rgba(255,255,255,0.4)" }, onClick: $setup.onLineService }, [ vue.createElementVNode("image", { src: _imports_6, class: "w-5 h-5 mb-1", mode: "aspectFit" }), vue.createElementVNode( "text", { class: "text-white text-xs b-btn" }, vue.toDisplayString(_ctx.$t("在线客服")), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "px-6 py-4" }, [ vue.createElementVNode("view", { class: "text-center space-y-3" }, [ vue.createElementVNode("view", { class: "flex items-center justify-center text-xs text-white/70 space-x-2" }, [ vue.createElementVNode("view", { class: "i-carbon-information h-3 w-3" }), vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.$t("版本")) + " v" + vue.toDisplayString($setup.appVersion), 1 /* TEXT */ ) ]) ]) ]) ]) ]) ]), _: 1 /* STABLE */ }); } const PagesLoginIndex = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__scopeId", "data-v-45258083"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/login/index.vue"]]); const _imports_4 = "/static/images/login/user.png"; const _sfc_main$N = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const router2 = useRouter(); const route2 = useRoute(); const richView = useRichView(); const userStore = useUserStore(); const agreed = vue.ref(false); const registerLoading = vue.ref(false); const activeRegisterType = vue.ref(1); const emailForm = vue.reactive({ account: "", password: "", confirmPassword: "", user_code: "" }); const accountForm = vue.reactive({ account: "", password: "", confirmPassword: "", user_code: "" }); if (route2.query.invitationCode) { uni.setStorageSync("vip_invitationCode", route2.query.invitationCode); emailForm.user_code = route2.query.invitationCode; accountForm.user_code = route2.query.invitationCode; } else { let vip_invitationCode = uni.getStorageSync("vip_invitationCode"); if (vip_invitationCode) { emailForm.user_code = vip_invitationCode; accountForm.user_code = vip_invitationCode; } } const showCaptchaDialog = vue.ref(false); const captchaStatus = vue.ref("idle"); const sliderMoveX = vue.ref(0); const touchStartX = vue.ref(0); const captchaData = vue.reactive({ bg: "", slider: "", y: 0, captcha: "" }); const imgScale = vue.ref(1); const bgDisplayHeight = vue.ref(160); const sliderBaseWidth = vue.ref(48); const sliderBaseHeight = vue.ref(48); const changeRegisterType = (index) => { activeRegisterType.value = index; }; const isEmail = (val) => /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(val); function onAgreementClick() { richView.open({ title: uni.$t("隐私政策"), content: `

隐私政策声明

欢迎您使用我们的服务!我们非常重视您的隐私保护和个人信息安全。本《隐私政策》将帮助您了解我们如何收集、使用、存储和保护您的个人信息。

1. 我们如何收集您的信息

当您注册账号或使用我们的产品时,我们可能会收集您的以下信息:

  • 注册信息:如您的邮箱地址、账号名称、密码等。
  • 设备信息:如设备型号、操作系统版本、唯一设备标识符等,用于保障账号安全及风险控制。
  • 日志信息:如您的IP地址、访问时间、操作记录等。

2. 我们如何使用您的信息

我们收集的信息将主要用于以下用途:

  • 向您提供、维护和改进我们的产品及服务;
  • 进行身份验证、安全防范、诈骗监测,确保系统及您的资金/数据安全;
  • 为您提供专属的客户服务及技术支持。

3. 信息的共享与保护

我们承诺对您的信息承担保密义务。除法律法规要求或为实现核心功能所必须的第三方合作外,我们不会擅自向任何无关第三方出售、共享或披露您的个人信息。我们采用符合业界标准的加密技术和安全防护措施,防止您的信息遭到未经授权的访问、泄露或损坏。

4. 您的权利

您有权随时访问、更正、删除您的个人信息,或注销您的账号。如您在此过程中遇到任何问题,请随时联系我们的在线客服。

请仔细阅读以上内容,勾选“我已阅读并同意”即代表您完全认可本政策。
` }); } async function validateEmailForm() { if (!emailForm.account) { $u.toast(uni.$t("请输入注册邮箱")); return false; } if (!isEmail(emailForm.account)) { $u.toast(uni.$t("请输入正确的邮箱格式")); return false; } if (!emailForm.password) { $u.toast(uni.$t("请设置登录密码")); return false; } if (emailForm.password.length < 6 || emailForm.password.length > 20) { $u.toast(uni.$t("密码长度需在6-20个字符之间")); return false; } if (emailForm.password !== emailForm.confirmPassword) { $u.toast(uni.$t("两次输入的密码不一致")); return false; } if (!emailForm.user_code) { $u.toast(uni.$t("请输入邀请码")); return false; } return true; } async function validateAccountForm() { if (!accountForm.account) { $u.toast(uni.$t("请输入账号")); return false; } if (!accountForm.password) { $u.toast(uni.$t("请设置登录密码")); return false; } if (accountForm.password.length < 6 || accountForm.password.length > 20) { $u.toast(uni.$t("密码长度需在6-20个字符之间")); return false; } if (accountForm.password !== accountForm.confirmPassword) { $u.toast(uni.$t("两次输入的密码不一致")); return false; } if (!accountForm.user_code) { $u.toast(uni.$t("请输入邀请码")); return false; } return true; } function onGuestClick() { if (!agreed.value) return $u.toast(uni.$t("请先同意服务协议")); uni.switchTab({ url: "/pages/Tabbar/Home/index" }); } function onLineService() { if (!uni.getStorageSync("youke_token")) { userGuestRegister().then((res) => { uni.setStorageSync("youke_token", res.data.token); router2.push({ name: "customerService", query: { GuestMode: 1 } }); }); } else { router2.push({ name: "customerService", query: { GuestMode: 1 } }); } } const onBgLoad = (e) => { if (e.detail.width) { imgScale.value = 320 / e.detail.width; bgDisplayHeight.value = e.detail.height * imgScale.value; } }; const onSliderLoad = (e) => { if (e.detail.width) { sliderBaseWidth.value = e.detail.width; sliderBaseHeight.value = e.detail.height; } }; const initCaptcha = async () => { captchaStatus.value = "loading"; sliderMoveX.value = 0; imgScale.value = 1; try { const res = await getCaptcha(); captchaData.bg = res.data.bg; captchaData.slider = res.data.slider; captchaData.y = res.data.y; captchaData.captcha = res.data.captcha; captchaStatus.value = "idle"; } catch (e) { formatAppLog("error", "at pages/register/index.vue:327", e); $u.toast(uni.$t("获取验证码失败")); captchaStatus.value = "error"; } }; const closeCaptcha = () => { showCaptchaDialog.value = false; }; const onTouchStart = (e) => { if (captchaStatus.value === "success") return; touchStartX.value = e.touches[0].clientX; }; const onTouchMove = (e) => { if (captchaStatus.value === "success") return; const moveX = e.touches[0].clientX - touchStartX.value; if (moveX < 0) { sliderMoveX.value = 0; } else if (moveX > 272) { sliderMoveX.value = 272; } else { sliderMoveX.value = moveX; } }; const onTouchEnd = async () => { if (captchaStatus.value === "success") return; if (sliderMoveX.value === 0) return; doRegister(); }; async function onRegisterClick() { if (!agreed.value) return $u.toast(uni.$t("请先同意服务协议")); if (activeRegisterType.value === 0) { const isValid = await validateEmailForm(); if (!isValid) return; } else { const isValid = await validateAccountForm(); if (!isValid) return; } showCaptchaDialog.value = true; initCaptcha(); } async function doRegister() { registerLoading.value = true; captchaStatus.value = "loading"; try { const submitRealX = Math.round(sliderMoveX.value / (imgScale.value || 1)); let params = {}; if (activeRegisterType.value === 0) { params = { account: emailForm.account, password: emailForm.password, user_code: emailForm.user_code, register_type: "email", type: "email", moveX: submitRealX, captcha: captchaData.captcha }; } else { params = { account: accountForm.account, password: accountForm.password, user_code: accountForm.user_code, register_type: "account", type: "account", moveX: submitRealX, captcha: captchaData.captcha }; } const res = await postUserRegister(params); if (res.data.check_captcha === 0) { uni.showToast({ title: res.msg, icon: "none" }); captchaStatus.value = "error"; setTimeout(() => { initCaptcha(); }, 1e3); registerLoading.value = false; return; } captchaStatus.value = "success"; uni.setStorageSync("token", res.data.token); uni.showToast({ title: res.msg, icon: "none" }); setTimeout(() => { showCaptchaDialog.value = false; userStore.getUserData(); router2.pushTab({ name: "index" }); }, 1500); } catch (e) { showCaptchaDialog.value = false; } finally { registerLoading.value = false; } } const __returned__ = { router: router2, route: route2, richView, userStore, agreed, registerLoading, activeRegisterType, emailForm, accountForm, showCaptchaDialog, captchaStatus, sliderMoveX, touchStartX, captchaData, imgScale, bgDisplayHeight, sliderBaseWidth, sliderBaseHeight, changeRegisterType, isEmail, onAgreementClick, validateEmailForm, validateAccountForm, onGuestClick, onLineService, onBgLoad, onSliderLoad, initCaptcha, closeCaptcha, onTouchStart, onTouchMove, onTouchEnd, onRegisterClick, doRegister, ref: vue.ref, reactive: vue.reactive, get $u() { return $u; }, get appName() { return appName; }, get appVersion() { return appVersion; }, selectLang, get postUserRegister() { return postUserRegister; }, get getCaptcha() { return getCaptcha; }, get userGuestRegister() { return userGuestRegister; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_input = __unplugin_components_3$2; const _component_u_button = __unplugin_components_2$1; const _component_u_loading = __unplugin_components_3$3; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "relative overflow-hidden login-page", style: { "background-image": "url('/static/images/login/bg-login-app.png')" } }, [ vue.createElementVNode("view", { class: "pos-fixed", style: { "z-index": "999", "right": "20px", "top": "calc(20px + env(safe-area-inset-top))" } }, [ vue.createVNode($setup["selectLang"]) ]), vue.createElementVNode("view", { class: "relative z-10 flex flex-col justify-center", style: { "height": "100dvh", "padding-top": "env(safe-area-inset-top)", "padding-bottom": "env(safe-area-inset-bottom)", "box-sizing": "border-box" } }, [ vue.createElementVNode("view", { class: "flex justify-center mb-4" }, [ vue.createElementVNode("image", { src: _imports_0$3, mode: "heightFix", class: "h-6" }) ]), vue.createElementVNode("view", { class: "mx-5 rounded-3xl p-4 shadow-lg relative", style: { "background": "rgba(120, 120, 120, 0.1)", "backdrop-filter": "blur(5px)", "border": "1px solid rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("view", { class: "text-center mb-4 px-4" }, [ vue.createElementVNode("image", { src: _imports_1, mode: "widthFix", style: { "width": "150px" } }), vue.createElementVNode( "text", { class: "block mt-2", style: { "font-weight": "800", "font-size": "20px" } }, vue.toDisplayString(_ctx.$t("迈凯伦")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text-xs text-gray-600 block mt-1" }, vue.toDisplayString(_ctx.$t("官方合作伙伴")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "flex mb-4" }, [ vue.createElementVNode( "view", { class: "flex-1 text-center py-1.5 text-sm font-bold transition-all", style: vue.normalizeStyle($setup.activeRegisterType === 1 ? "background: rgba(255,255,255,0.8); color: #ff7700; border: 1px solid #ff7700; border-radius: 8px;" : "background: rgba(255,255,255,0.4); color: #666; border: 1px solid transparent; border-radius: 8px;"), onClick: _cache[0] || (_cache[0] = ($event) => $setup.changeRegisterType(1)) }, vue.toDisplayString(_ctx.$t("账号注册")), 5 /* TEXT, STYLE */ ), vue.createElementVNode("view", { style: { "width": "10px" } }), vue.createElementVNode( "view", { class: "flex-1 text-center py-1.5 text-sm font-bold transition-all", style: vue.normalizeStyle($setup.activeRegisterType === 0 ? "background: rgba(255,255,255,0.8); color: #ff7700; border: 1px solid #ff7700; border-radius: 8px;" : "background: rgba(255,255,255,0.4); color: #666; border: 1px solid transparent; border-radius: 8px;"), onClick: _cache[1] || (_cache[1] = ($event) => $setup.changeRegisterType(0)) }, vue.toDisplayString(_ctx.$t("邮箱注册")), 5 /* TEXT, STYLE */ ) ]), $setup.activeRegisterType === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "space-y-3 mb-4" }, [ vue.createElementVNode("view", { class: "rounded-xl flex items-center px-3 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_2, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.emailForm.account, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.emailForm.account = $event), placeholder: _ctx.$t("请输入注册邮箱"), type: "text", clearable: "", border: false }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-3 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_3, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.emailForm.password, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.emailForm.password = $event), placeholder: _ctx.$t("请设置登录密码"), type: "password", clearable: "", border: false, "password-icon": "" }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-3 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_3, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.emailForm.confirmPassword, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.emailForm.confirmPassword = $event), placeholder: _ctx.$t("请确认登录密码"), type: "password", clearable: "", border: false, "password-icon": "" }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-3 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_2, class: "w-5 h-5 mr-2", mode: "aspectFit", style: { "filter": "opacity(0.7)" } }), vue.createVNode(_component_u_input, { modelValue: $setup.emailForm.user_code, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.emailForm.user_code = $event), placeholder: _ctx.$t("请输入邀请码"), type: "text", clearable: "", border: false }, null, 8, ["modelValue", "placeholder"]) ]) ])) : vue.createCommentVNode("v-if", true), $setup.activeRegisterType === 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "space-y-3 mb-4" }, [ vue.createElementVNode("view", { class: "rounded-xl flex items-center px-3 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_2, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.accountForm.account, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.accountForm.account = $event), placeholder: _ctx.$t("请输入账号"), type: "text", clearable: "", border: false }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-3 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_3, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.accountForm.password, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.accountForm.password = $event), placeholder: _ctx.$t("请设置登录密码"), type: "password", clearable: "", border: false, "password-icon": "" }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-3 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_3, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.accountForm.confirmPassword, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.accountForm.confirmPassword = $event), placeholder: _ctx.$t("请确认登录密码"), type: "password", clearable: "", border: false, "password-icon": "" }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-3 py-0.5", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_2, class: "w-5 h-5 mr-2", mode: "aspectFit", style: { "filter": "opacity(0.7)" } }), vue.createVNode(_component_u_input, { modelValue: $setup.accountForm.user_code, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.accountForm.user_code = $event), placeholder: _ctx.$t("请输入邀请码"), type: "text", clearable: "", border: false }, null, 8, ["modelValue", "placeholder"]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "flex items-center justify-center mb-4 text-xs" }, [ vue.createElementVNode("view", { class: "flex items-center", onClick: _cache[10] || (_cache[10] = ($event) => $setup.agreed = !$setup.agreed) }, [ vue.createElementVNode( "view", { class: "flex items-center justify-center rounded-full transition-all", style: vue.normalizeStyle([{ "width": "15px", "height": "15px", "border": "1px solid" }, $setup.agreed ? "border-color: #ff8c00; background: rgba(255,255,255,0.9);" : "border-color: #999; background: rgba(255,255,255,0.4);"]) }, [ $setup.agreed ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "rounded-full", style: { "width": "7px", "height": "7px", "background-color": "#ff8c00" } })) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createElementVNode( "text", { class: "text-gray-800 ml-1.5" }, vue.toDisplayString(_ctx.$t("我已阅读并同意")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "font-medium", style: { "color": "#ff8c00" }, onClick: vue.withModifiers($setup.onAgreementClick, ["stop"]) }, "《" + vue.toDisplayString(_ctx.$t("隐私政策")) + "》", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "mb-4" }, [ vue.createVNode(_component_u_button, { ripple: "", loading: $setup.registerLoading, onClick: $setup.onRegisterClick, disabled: $setup.registerLoading, class: "rounded-xl h-10 text-base w-full font-bold", "custom-style": { background: "linear-gradient(90deg, #ff8c00, #ff6600)", color: "#fff", border: "none", borderRadius: "10px" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("立即注册")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["loading", "disabled", "custom-style"]) ]), vue.createElementVNode("view", { class: "flex justify-between gap-2" }, [ vue.createElementVNode("view", { class: "flex-1 flex flex-col items-center justify-center py-1.5 rounded-xl transition-all", style: { "background": "rgba(255,255,255,0.2)", "border": "1px solid rgba(255,255,255,0.4)" }, onClick: _cache[11] || (_cache[11] = ($event) => $setup.router.push({ name: "login" })) }, [ vue.createElementVNode("image", { src: _imports_4, class: "w-5 h-5 mb-1", mode: "aspectFit" }), vue.createElementVNode( "text", { class: "text-white text-xs b-btn" }, vue.toDisplayString(_ctx.$t("去登录")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "flex-1 flex flex-col items-center justify-center py-1.5 rounded-xl transition-all", style: { "background": "rgba(255,255,255,0.2)", "border": "1px solid rgba(255,255,255,0.4)" }, onClick: $setup.onGuestClick }, [ vue.createElementVNode("image", { src: _imports_5, class: "w-5 h-5 mb-1", mode: "aspectFit" }), vue.createElementVNode( "text", { class: "text-white text-xs b-btn" }, vue.toDisplayString(_ctx.$t("游客登陆")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "flex-1 flex flex-col items-center justify-center py-1.5 rounded-xl transition-all", style: { "background": "rgba(255,255,255,0.2)", "border": "1px solid rgba(255,255,255,0.4)" }, onClick: $setup.onLineService }, [ vue.createElementVNode("image", { src: _imports_6, class: "w-5 h-5 mb-1", mode: "aspectFit" }), vue.createElementVNode( "text", { class: "text-white text-xs b-btn" }, vue.toDisplayString(_ctx.$t("在线客服")), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "px-6 py-4" }, [ vue.createElementVNode("view", { class: "text-center space-y-3" }, [ vue.createElementVNode("view", { class: "flex items-center justify-center text-xs text-white/70 space-x-2" }, [ vue.createElementVNode("view", { class: "i-carbon-information h-3 w-3" }), vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.$t("版本")) + " v" + vue.toDisplayString($setup.appVersion), 1 /* TEXT */ ) ]) ]) ]) ]), $setup.showCaptchaDialog ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "fixed inset-0 flex justify-center items-center", style: { "z-index": "9999", "background": "rgba(0,0,0,0.6)" }, onTouchmove: _cache[12] || (_cache[12] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, [ vue.createElementVNode("view", { class: "bg-white rounded-2xl p-4 shadow-2xl relative", style: { "width": "352px" } }, [ vue.createElementVNode("view", { class: "flex justify-between items-center mb-3 px-1" }, [ vue.createElementVNode( "text", { class: "text-base font-bold text-gray-800" }, vue.toDisplayString(_ctx.$t("安全验证")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "i-carbon-close text-2xl text-gray-400", onClick: $setup.closeCaptcha }) ]), vue.createElementVNode( "view", { class: "relative bg-gray-100 rounded-lg overflow-hidden transition-all", style: vue.normalizeStyle({ width: "320px", height: $setup.bgDisplayHeight + "px" }) }, [ $setup.captchaStatus === "loading" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "absolute inset-0 flex justify-center items-center z-20 bg-white/80" }, [ vue.createVNode(_component_u_loading, { mode: "circle", size: "24" }) ])) : vue.createCommentVNode("v-if", true), $setup.captchaData.bg ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: $setup.captchaData.bg, class: "w-full h-full block", mode: "scaleToFill", onLoad: $setup.onBgLoad }, null, 40, ["src"])) : vue.createCommentVNode("v-if", true), $setup.captchaData.slider ? (vue.openBlock(), vue.createElementBlock("image", { key: 2, src: $setup.captchaData.slider, class: "absolute", style: vue.normalizeStyle({ width: $setup.sliderBaseWidth * $setup.imgScale + "px", height: $setup.sliderBaseHeight * $setup.imgScale + "px", top: $setup.captchaData.y * $setup.imgScale + "px", left: $setup.sliderMoveX + "px", zIndex: 10 }), mode: "scaleToFill", onLoad: $setup.onSliderLoad }, null, 44, ["src"])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createElementVNode("view", { class: "relative h-11 mt-5 bg-gray-100 rounded-full flex items-center shadow-inner overflow-hidden border border-gray-200", style: { "width": "320px" } }, [ vue.createElementVNode( "text", { class: "absolute w-full text-center text-sm text-gray-400 select-none" }, vue.toDisplayString(_ctx.$t("向右拖动滑块完成拼图")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "absolute left-0 top-0 h-full rounded-full pointer-events-none", style: vue.normalizeStyle([{ "background": "linear-gradient(90deg, rgba(255, 140, 0, 0.1), rgba(255, 140, 0, 0.3))", "border-right": "2px solid rgba(255, 140, 0, 0.6)" }, { width: $setup.sliderMoveX + 24 + "px" }]) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "absolute h-11 w-12 bg-white rounded-full shadow flex justify-center items-center transition-shadow border-2 border-orange-200", style: vue.normalizeStyle([{ "box-shadow": "0 0 12px rgba(0,0,0,0.12)" }, { left: $setup.sliderMoveX + "px" }]), onTouchstart: $setup.onTouchStart, onTouchmove: vue.withModifiers($setup.onTouchMove, ["stop", "prevent"]), onTouchend: $setup.onTouchEnd }, [ $setup.captchaStatus === "success" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "i-carbon-checkmark text-green-500 text-2xl font-bold" })) : $setup.captchaStatus === "error" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "i-carbon-close text-red-500 text-2xl font-bold" })) : (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "text-orange-500 text-2xl font-bold", style: { "transform": "scaleX(1.3)" } }, "→")) ], 36 /* STYLE, NEED_HYDRATION */ ) ]) ]) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }); } const PagesRegisterIndex = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-c5d9c666"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/register/index.vue"]]); const _sfc_main$M = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const router2 = useRouter(); const userStore = useUserStore(); const registerLoading = vue.ref(false); const accountForm = vue.reactive({ account: "", password: "", confirmPassword: "", user_code: "" }); function onBack() { uni.navigateBack(); } async function validateAccountForm() { if (!accountForm.account) { $u.toast(uni.$t("请输入账号")); return false; } if (!accountForm.password) { $u.toast(uni.$t("请设置登录密码")); return false; } if (accountForm.password.length < 6 || accountForm.password.length > 20) { $u.toast(uni.$t("密码长度需在6-20个字符之间")); return false; } if (accountForm.password !== accountForm.confirmPassword) { $u.toast(uni.$t("两次输入的密码不一致")); return false; } if (!accountForm.user_code) { $u.toast(uni.$t("请输入邀请码")); return false; } return true; } async function onRegisterClick() { const isValid = await validateAccountForm(); if (!isValid) return; doRegister(); } async function doRegister() { registerLoading.value = true; try { const params = { account: accountForm.account, password: accountForm.password, user_code: accountForm.user_code }; const res = await setAccount(params); if (res.data && res.data.token) { uni.setStorageSync("token", res.data.token); } uni.showToast({ title: res.msg || uni.$t("提交成功"), icon: "none" }); setTimeout(() => { userStore.getUserData(); router2.pushTab({ name: "index" }); }, 1500); } catch (e) { formatAppLog("error", "at pages/setAccount/index.vue:140", e); } finally { registerLoading.value = false; } } const __returned__ = { router: router2, userStore, registerLoading, accountForm, onBack, validateAccountForm, onRegisterClick, doRegister, ref: vue.ref, reactive: vue.reactive, get $u() { return $u; }, get appName() { return appName; }, get appVersion() { return appVersion; }, selectLang, get setAccount() { return setAccount; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_input = __unplugin_components_3$2; const _component_u_button = __unplugin_components_2$1; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "relative min-h-screen overflow-hidden login-page", style: { "background-image": "url('/static/images/login/bg-login-app.png')" } }, [ vue.createElementVNode("view", { class: "pos-fixed", style: { "z-index": "999", "right": "20px", "top": "20px" } }, [ vue.createVNode($setup["selectLang"]) ]), vue.createElementVNode("view", { class: "relative z-10 min-h-screen flex flex-col pt-12" }, [ vue.createElementVNode("view", { class: "flex justify-center mb-6 pt-10" }, [ vue.createElementVNode("image", { src: _imports_0$3, mode: "heightFix", class: "h-6" }) ]), vue.createElementVNode("view", { class: "mx-5 rounded-3xl p-5 shadow-lg relative", style: { "background": "rgba(120, 120, 120, 0.1)", "backdrop-filter": "blur(5px)", "border": "1px solid rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("view", { class: "text-center mb-6 px-4" }, [ vue.createElementVNode("image", { src: _imports_1, mode: "widthFix", style: { "width": "200px" } }), vue.createElementVNode( "text", { class: "block mt-2", style: { "font-weight": "800", "font-size": "24px" } }, vue.toDisplayString(_ctx.$t("迈凯伦")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text-xs text-gray-600 block mt-1" }, vue.toDisplayString(_ctx.$t("官方合作伙伴")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "space-y-4 mb-5" }, [ vue.createElementVNode("view", { class: "rounded-xl flex items-center px-4 py-1", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_2, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.accountForm.account, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.accountForm.account = $event), placeholder: _ctx.$t("请输入账号"), type: "text", clearable: "", border: false }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-4 py-1", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_3, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.accountForm.password, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.accountForm.password = $event), placeholder: _ctx.$t("请设置登录密码"), type: "password", clearable: "", border: false, "password-icon": "" }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-4 py-1", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_3, class: "w-5 h-5 mr-2", mode: "aspectFit" }), vue.createVNode(_component_u_input, { modelValue: $setup.accountForm.confirmPassword, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.accountForm.confirmPassword = $event), placeholder: _ctx.$t("请确认登录密码"), type: "password", clearable: "", border: false, "password-icon": "" }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "rounded-xl flex items-center px-4 py-1", style: { "background": "rgba(255,255,255,0.6)" } }, [ vue.createElementVNode("image", { src: _imports_2, class: "w-5 h-5 mr-2", mode: "aspectFit", style: { "filter": "opacity(0.7)" } }), vue.createVNode(_component_u_input, { modelValue: $setup.accountForm.user_code, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.accountForm.user_code = $event), placeholder: _ctx.$t("请输入邀请码"), type: "text", clearable: "", border: false }, null, 8, ["modelValue", "placeholder"]) ]) ]), vue.createElementVNode("view", { class: "mb-6 flex space-x-3" }, [ vue.createVNode(_component_u_button, { onClick: $setup.onBack, class: "flex-1 rounded-xl h-12 text-lg font-bold", "custom-style": { background: "rgba(255,255,255,0.2)", color: "#fd7602", border: "1px solid rgba(255,255,255,0.4)", borderRadius: "12px" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("返回")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["custom-style"]), vue.createVNode(_component_u_button, { ripple: "", loading: $setup.registerLoading, onClick: $setup.onRegisterClick, disabled: $setup.registerLoading, class: "flex-1 rounded-xl h-12 text-lg font-bold", "custom-style": { background: "linear-gradient(90deg, #ff8c00, #ff6600)", color: "#fff", border: "none", borderRadius: "12px" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("提交")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["loading", "disabled", "custom-style"]) ]) ]), vue.createElementVNode("view", { class: "mt-auto px-6 pb-8" }, [ vue.createElementVNode("view", { class: "text-center space-y-3" }, [ vue.createElementVNode("view", { class: "flex items-center justify-center text-xs text-white/70 space-x-2" }, [ vue.createElementVNode("view", { class: "i-carbon-information h-3 w-3" }), vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.$t("版本")) + " v" + vue.toDisplayString($setup.appVersion), 1 /* TEXT */ ) ]) ]) ]) ]) ]) ]), _: 1 /* STABLE */ }); } const PagesSetAccountIndex = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-58a2bbdf"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/setAccount/index.vue"]]); const _sfc_main$L = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const tabModel = [ { label: "实用技巧", children: [ { icon: "i-carbon-router", text: "路由中间件", path: "/pages/tips/middleware/index" } ] }, { label: "业务模板", children: [ { icon: "i-carbon-list", text: "通用列表", path: "/pages/template/paging/index" } ] } ]; const tabIndex = vue.ref(0); function onTabClick(index) { tabIndex.value = index; } const activeTabItem = vue.computed(() => tabModel[tabIndex.value].children); const __returned__ = { tabModel, tabIndex, onTabClick, activeTabItem }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) { const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "h-full flex flex-col overflow-hidden" }, [ vue.createElementVNode("view", { class: "h-[--safe-top] flex-none uni-mp:mt-4" }), vue.createElementVNode("view", { class: "flex flex-none bg-white px-3 py-2 !uni-mp:pr-[var(--safe-right)]" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.tabModel, (item, index) => { return vue.createElementVNode("view", { key: index, class: vue.normalizeClass(["h-10 w-0 flex flex-1 items-center justify-center rounded-lg", [$setup.tabIndex === index ? "bg-primary-50 text-primary-600 font-bold" : ""]]), onClick: ($event) => $setup.onTabClick(index) }, vue.toDisplayString(item.label), 11, ["onClick"]); }), 64 /* STABLE_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "mt-3 h-0 flex-1 overflow-auto" }, [ vue.createElementVNode("view", { class: "mx-3 overflow-hidden rounded-xl shadow-sm" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.activeTabItem, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { key: index, class: vue.normalizeClass(["flex items-center bg-white px-5 py-4 transition-colors duration-200 active:bg-gray-50", [ index !== $setup.activeTabItem.length - 1 ? "border-b border-gray-100" : "" ]]), "hover-class": "bg-gray-50", onClick: ($event) => _ctx.$Router.push(item.path) }, [ vue.createElementVNode("view", { class: "w-10 flex flex-none items-center justify-center text-gray-500" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["size-6 text-primary-500", item.icon]) }, null, 2 /* CLASS */ ) ]), vue.createElementVNode( "view", { class: "flex-1 text-gray-700 font-medium" }, vue.toDisplayString(item.text), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "text-gray-400" }, [ vue.createElementVNode("view", { class: "i-carbon-chevron-right size-5" }) ]) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ]), _: 1 /* STABLE */ }); } const PagesIndexExampleIndex = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/index/example/index.vue"]]); const _imports_0$2 = "/assets/avatar.0ad11987.gif"; const _sfc_main$K = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const userStore = useUserStore(); const router2 = useRouter(); const isLogin = vue.computed(() => !!uni.getStorageSync("token")); const userInfo = vue.computed(() => userStore.userInfo); const systemItems = vue.computed(() => [ { icon: "i-carbon-customer-service", text: "联系我们", path: "/contact" }, { icon: "i-carbon-chat", text: "意见反馈", path: "/feedback" }, { icon: "i-carbon-settings", text: "偏好设置", path: "/preference" } ]); function handleMenuItemClick(item) { router2.push({ path: item.path, query: item.query || {} }); } function handleLogin() { if (isLogin.value) { router2.push({ path: "/personal" }); return false; } router2.push({ path: "/login" }); } function onEnterpriseClick() { window.open(appExtra.url); } async function handleLogout() { const result = await showModal({ title: "提示", content: "确定要退出登录吗?", showCancel: true, confirmText: "确定", cancelText: "取消" }); if (result.confirm) { await userStore.logout(); await showToast({ title: "退出登录成功", icon: "success" }); await sleep(); router2.push({ path: "/login" }); } } const __returned__ = { userStore, router: router2, isLogin, userInfo, systemItems, handleMenuItemClick, handleLogin, onEnterpriseClick, handleLogout, get showModal() { return showModal; }, get showToast() { return showToast; }, get appExtra() { return appExtra; }, get appVersion() { return appVersion; }, get sleep() { return sleep; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) { const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "h-full flex flex-col" }, [ vue.createElementVNode("view", { class: "relative overflow-hidden" }, [ vue.createElementVNode("view", { class: "absolute inset-0 bg-primary-500" }), vue.createElementVNode("view", { class: "absolute h-42 w-42 rounded-full bg-white opacity-10 -right-10 -top-10" }), vue.createElementVNode("view", { class: "absolute bottom-0 right-20 h-20 w-20 rounded-full bg-white opacity-10" }), vue.createElementVNode("view", { class: "h-[--safe-top]" }), vue.createElementVNode("view", { class: "relative flex items-center px-6 pb-12 pt-12", "hover-class": "opacity-90", onClick: $setup.handleLogin }, [ vue.createElementVNode("view", { class: "h-18 w-18 overflow-hidden border-2 border-white/30 rounded-full shadow-lg" }, [ vue.createElementVNode("image", { src: _imports_0$2, alt: "用户头像", class: "h-full w-full" }) ]), vue.createElementVNode("view", { class: "ml-4 flex-1" }, [ $setup.isLogin ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "text-xl text-white font-bold" }, vue.toDisplayString($setup.userInfo.username), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "flex items-center" }, [ vue.createElementVNode("view", { class: "text-xl text-white font-medium" }, " 立即登录 "), vue.createElementVNode("view", { class: "ml-2 rounded-full bg-white/20 px-3 py-1 text-xs text-white" }, " 未登录 ") ])) ]), $setup.isLogin ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "flex items-center text-white/70" }, [ vue.createElementVNode("view", null, "编辑个人资料"), vue.createElementVNode("view", { class: "i-carbon-chevron-right size-6" }) ])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "mx-3 mt-3 overflow-hidden rounded-xl shadow-sm" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.systemItems, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { key: index, class: vue.normalizeClass(["flex items-center bg-white px-5 py-4 transition-colors duration-200 active:bg-gray-50", [ index !== $setup.systemItems.length - 1 ? "border-b border-gray-100" : "" ]]), "hover-class": "bg-gray-50", onClick: ($event) => $setup.handleMenuItemClick(item) }, [ vue.createElementVNode("view", { class: "w-10 flex flex-none items-center justify-center text-gray-500" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["size-6 text-primary-500", item.icon]) }, null, 2 /* CLASS */ ) ]), vue.createElementVNode( "view", { class: "flex-1 text-gray-700 font-medium" }, vue.toDisplayString(item.text), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "text-gray-400" }, [ vue.createElementVNode("view", { class: "i-carbon-chevron-right size-5" }) ]) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]), $setup.isLogin ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "mb-8 mt-auto px-5" }, [ vue.createElementVNode("button", { class: "w-full bg-red-500 py-3 text-gray-50 font-medium transition-colors duration-200 !rounded-lg", "hover-class": "bg-red-700", onClick: $setup.handleLogout }, " 退出登录 ") ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "mb-6 mt-auto text-center text-xs text-gray-400" }, [ vue.createElementVNode("view", null, [ vue.createTextVNode(" Supported by "), vue.createElementVNode( "text", { class: "text-primary-500 underline active:text-primary-700", onClick: $setup.onEnterpriseClick }, vue.toDisplayString($setup.appExtra.name), 1 /* TEXT */ ), vue.createTextVNode( " v" + vue.toDisplayString($setup.appVersion), 1 /* TEXT */ ) ]) ])) ]) ]), _: 1 /* STABLE */ }); } const PagesIndexUserIndex = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/index/user/index.vue"]]); const _sfc_main$J = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const route2 = useRoute(); const webViewProps = vue.computed(() => route2.query); uni.showLoading({ title: uni.$t("加载中") }); setTimeout(() => { hideLoading(); }, 1 * 1e3); function hideLoading() { uni.hideLoading(); } onLoad(() => { if (webViewProps.value && webViewProps.value.src) { if (webViewProps.value.src === `${globalBaseURL}/rule.html`) { uni.setNavigationBarTitle({ title: "开奖规则" }); } } }); const __returned__ = { route: route2, webViewProps, hideLoading, get globalBaseURL() { return globalBaseURL; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) { const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("web-view", { src: $setup.webViewProps.src, onLoad: $setup.hideLoading, onError: $setup.hideLoading }, null, 40, ["src"]) ]), _: 1 /* STABLE */ }); } const PagesCommonWebViewIndex = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/common/web-view/index.vue"]]); const block0 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("handler"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["handler"] = "812594ec"; }; const _sfc_main$I = { name: "node", options: {}, data() { return { ctrl: {} }; }, props: { name: String, attrs: { type: Object, default() { return {}; } }, childs: Array, opts: Array }, components: {}, mounted() { this.$nextTick(() => { for (this.root = this.$parent; this.root.$options.name !== "uv-parse"; this.root = this.root.$parent) ; }); if (this.opts[0]) { let i; for (i = this.childs.length; i--; ) { if (this.childs[i].name === "img") break; } if (i !== -1) { this.observer = uni.createIntersectionObserver(this).relativeToViewport({ top: 500, bottom: 500 }); this.observer.observe("._img", (res) => { if (res.intersectionRatio) { this.$set(this.ctrl, "load", 1); this.observer.disconnect(); } }); } } }, beforeDestroy() { if (this.observer) { this.observer.disconnect(); } }, methods: { /** * @description 播放视频事件 * @param {Event} e */ play(e) { this.root.$emit("play"); }, /** * @description 图片点击事件 * @param {Event} e */ imgTap(e) { const node2 = this.childs[e.currentTarget.dataset.i]; if (node2.a) { this.linkTap(node2.a); return; } if (node2.attrs.ignore) return; node2.attrs.src = node2.attrs.src || node2.attrs["data-src"]; this.root.$emit("imgtap", node2.attrs); if (this.root.previewImg) { uni.previewImage({ current: parseInt(node2.attrs.i), urls: this.root.imgList }); } }, /** * @description 图片长按 */ imgLongTap(e) { const attrs = this.childs[e.currentTarget.dataset.i].attrs; if (this.opts[3] && !attrs.ignore) { uni.showActionSheet({ itemList: ["保存图片"], success: () => { const save = (path) => { uni.saveImageToPhotosAlbum({ filePath: path, success() { uni.showToast({ title: "保存成功" }); } }); }; if (this.root.imgList[attrs.i].startsWith("http")) { uni.downloadFile({ url: this.root.imgList[attrs.i], success: (res) => save(res.tempFilePath) }); } else { save(this.root.imgList[attrs.i]); } } }); } }, /** * @description 图片加载完成事件 * @param {Event} e */ imgLoad(e) { const i = e.currentTarget.dataset.i; if (!this.childs[i].w) { this.$set(this.ctrl, i, e.detail.width); } else if (this.opts[1] && !this.ctrl[i] || this.ctrl[i] === -1) { this.$set(this.ctrl, i, 1); } this.checkReady(); }, /** * @description 检查是否所有图片加载完毕 */ checkReady() { if (this.root && !this.root.lazyLoad) { this.root._unloadimgs -= 1; if (!this.root._unloadimgs) { setTimeout(() => { this.root.getRect().then((rect) => { this.root.$emit("ready", rect); }).catch(() => { this.root.$emit("ready", {}); }); }, 350); } } }, /** * @description 链接点击事件 * @param {Event} e */ linkTap(e) { const node2 = e.currentTarget ? this.childs[e.currentTarget.dataset.i] : {}; const attrs = node2.attrs || e; const href = attrs.href; this.root.$emit("linktap", Object.assign({ innerText: this.root.getText(node2.children || []) // 链接内的文本内容 }, attrs)); if (href) { if (href[0] === "#") { this.root.navigateTo(href.substring(1)).catch(() => { }); } else if (href.split("?")[0].includes("://")) { if (this.root.copyLink) { plus.runtime.openWeb(href); } } else { uni.navigateTo({ url: href, fail() { uni.switchTab({ url: href, fail() { } }); } }); } } }, /** * @description 错误事件 * @param {Event} e */ mediaError(e) { const i = e.currentTarget.dataset.i; const node2 = this.childs[i]; if (node2.name === "video" || node2.name === "audio") { let index = (this.ctrl[i] || 0) + 1; if (index > node2.src.length) { index = 0; } if (index < node2.src.length) { this.$set(this.ctrl, i, index); return; } } else if (node2.name === "img") { if (this.opts[2]) { this.$set(this.ctrl, i, -1); } this.checkReady(); } if (this.root) { this.root.$emit("error", { source: node2.name, attrs: node2.attrs, errMsg: e.detail.errMsg }); } } } }; function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) { const _component_node = vue.resolveComponent("node", true); return vue.openBlock(), vue.createElementBlock("view", { id: $props.attrs.id, class: vue.normalizeClass("_block _" + $props.name + " " + $props.attrs.class), style: vue.normalizeStyle($props.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.childs, (n, i) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: i }, [ vue.createCommentVNode(" 图片 "), vue.createCommentVNode(" 占位图 "), n.name === "img" && !n.t && ($props.opts[1] && !$data.ctrl[i] || $data.ctrl[i] < 0) ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "_img", style: vue.normalizeStyle(n.attrs.style), src: $data.ctrl[i] < 0 ? $props.opts[2] : $props.opts[1], mode: "widthFix" }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 显示图片 "), vue.createCommentVNode(" 表格中的图片,使用 rich-text 防止大小不正确 "), n.name === "img" && n.t ? (vue.openBlock(), vue.createElementBlock("rich-text", { key: 1, style: vue.normalizeStyle("display:" + n.t), nodes: [{ attrs: { style: n.attrs.style, src: n.attrs.src }, name: "img" }], "data-i": i, onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])) }, null, 12, ["nodes", "data-i"])) : n.name === "img" ? (vue.openBlock(), vue.createElementBlock("image", { key: 2, id: n.attrs.id, class: vue.normalizeClass("_img " + n.attrs.class), style: vue.normalizeStyle(($data.ctrl[i] === -1 ? "display:none;" : "") + "width:" + ($data.ctrl[i] || 1) + "px;" + n.attrs.style), src: n.attrs.src || ($data.ctrl.load ? n.attrs["data-src"] : ""), mode: !n.h ? "widthFix" : !n.w ? "heightFix" : "", "data-i": i, onLoad: _cache[1] || (_cache[1] = (...args) => $options.imgLoad && $options.imgLoad(...args)), onError: _cache[2] || (_cache[2] = (...args) => $options.mediaError && $options.mediaError(...args)), onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])), onLongpress: _cache[4] || (_cache[4] = (...args) => $options.imgLongTap && $options.imgLongTap(...args)) }, null, 46, ["id", "src", "mode", "data-i"])) : n.text ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 3 }, [ vue.createCommentVNode(" 文本 "), vue.createElementVNode( "text", { decode: "" }, vue.toDisplayString(n.text), 1 /* TEXT */ ) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n.name === "br" ? (vue.openBlock(), vue.createElementBlock("text", { key: 4 }, "\\n")) : n.name === "a" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 5 }, [ vue.createCommentVNode(" 链接 "), vue.createElementVNode("view", { id: n.attrs.id, class: vue.normalizeClass((n.attrs.href ? "_a " : "") + n.attrs.class), "hover-class": "_hover", style: vue.normalizeStyle("display:inline;" + n.attrs.style), "data-i": i, onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.linkTap && $options.linkTap(...args), ["stop"])) }, [ vue.createVNode(_component_node, { name: "span", childs: n.children, opts: $props.opts, style: { "display": "inherit" } }, null, 8, ["childs", "opts"]) ], 14, ["id", "data-i"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n.html ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 6 }, [ vue.createCommentVNode(" 视频 "), vue.createElementVNode("view", { id: n.attrs.id, class: vue.normalizeClass("_video " + n.attrs.class), style: vue.normalizeStyle(n.attrs.style), innerHTML: n.html, onVplay: _cache[6] || (_cache[6] = vue.withModifiers((...args) => $options.play && $options.play(...args), ["stop"])) }, null, 46, ["id", "innerHTML"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n.name === "iframe" ? (vue.openBlock(), vue.createElementBlock("iframe", { key: 7, style: vue.normalizeStyle(n.attrs.style), allowfullscreen: n.attrs.allowfullscreen, frameborder: n.attrs.frameborder, src: n.attrs.src }, null, 12, ["allowfullscreen", "frameborder", "src"])) : n.name === "embed" ? (vue.openBlock(), vue.createElementBlock("embed", { key: 8, style: vue.normalizeStyle(n.attrs.style), src: n.attrs.src }, null, 12, ["src"])) : n.name === "table" && n.c || n.name === "li" ? (vue.openBlock(), vue.createElementBlock("view", { key: 9, id: n.attrs.id, class: vue.normalizeClass("_" + n.name + " " + n.attrs.class), style: vue.normalizeStyle(n.attrs.style) }, [ n.name === "li" ? (vue.openBlock(), vue.createBlock(_component_node, { key: 0, childs: n.children, opts: $props.opts }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(n.children, (tbody, x) => { return vue.openBlock(), vue.createElementBlock( "view", { key: x, class: vue.normalizeClass("_" + tbody.name + " " + tbody.attrs.class), style: vue.normalizeStyle(tbody.attrs.style) }, [ tbody.name === "td" || tbody.name === "th" ? (vue.openBlock(), vue.createBlock(_component_node, { key: 0, childs: tbody.children, opts: $props.opts }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(tbody.children, (tr, y) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: y }, [ tr.name === "td" || tr.name === "th" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class), style: vue.normalizeStyle(tr.attrs.style) }, [ vue.createVNode(_component_node, { childs: tr.children, opts: $props.opts }, null, 8, ["childs", "opts"]) ], 6 /* CLASS, STYLE */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class), style: vue.normalizeStyle(tr.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(tr.children, (td, z) => { return vue.openBlock(), vue.createElementBlock( "view", { key: z, class: vue.normalizeClass("_" + td.name + " " + td.attrs.class), style: vue.normalizeStyle(td.attrs.style) }, [ vue.createVNode(_component_node, { childs: td.children, opts: $props.opts }, null, 8, ["childs", "opts"]) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ )) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"])) : !n.c ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 10 }, [ vue.createCommentVNode(" 富文本 "), vue.createElementVNode("rich-text", { id: n.attrs.id, style: vue.normalizeStyle("display:inline;" + n.f), preview: false, selectable: $props.opts[4], "user-select": $props.opts[4], nodes: [n] }, null, 12, ["id", "selectable", "user-select", "nodes"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n.c === 2 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 11 }, [ vue.createCommentVNode(" 继续递归 "), vue.createElementVNode("view", { id: n.attrs.id, class: vue.normalizeClass("_block _" + n.name + " " + n.attrs.class), style: vue.normalizeStyle(n.f + ";" + n.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(n.children, (n2, j) => { return vue.openBlock(), vue.createBlock(_component_node, { key: j, style: vue.normalizeStyle(n2.f), name: n2.name, attrs: n2.attrs, childs: n2.children, opts: $props.opts }, null, 8, ["style", "name", "attrs", "childs", "opts"]); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : (vue.openBlock(), vue.createBlock(_component_node, { key: 12, style: vue.normalizeStyle(n.f), name: n.name, attrs: n.attrs, childs: n.children, opts: $props.opts }, null, 8, ["style", "name", "attrs", "childs", "opts"])) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"]); } if (typeof block0 === "function") block0(_sfc_main$I); const node = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-c65e823d"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/uni_modules/uv-parse/components/uv-parse/node/node.vue"]]); const config = { // 信任的标签(保持标签名不变) trustTags: makeMap("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"), // 块级标签(转为 div,其他的非信任标签转为 span) blockTags: makeMap("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"), // 行内标签 inlineTags: makeMap("abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup"), // 要移除的标签 ignoreTags: makeMap("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"), // 自闭合的标签 voidTags: makeMap("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"), // html 实体 entities: { lt: "<", gt: ">", quot: '"', apos: "'", ensp: " ", emsp: " ", nbsp: " ", semi: ";", ndash: "–", mdash: "—", middot: "·", lsquo: "‘", rsquo: "’", ldquo: "“", rdquo: "”", bull: "•", hellip: "…", larr: "←", uarr: "↑", rarr: "→", darr: "↓" }, // 默认的标签样式 tagStyle: { address: "font-style:italic", big: "display:inline;font-size:1.2em", caption: "display:table-caption;text-align:center", center: "text-align:center", cite: "font-style:italic", dd: "margin-left:40px", mark: "background-color:yellow", pre: "font-family:monospace;white-space:pre", s: "text-decoration:line-through", small: "display:inline;font-size:0.8em", strike: "text-decoration:line-through", u: "text-decoration:underline" }, // svg 大小写对照表 svgDict: { animatetransform: "animateTransform", lineargradient: "linearGradient", viewbox: "viewBox", attributename: "attributeName", repeatcount: "repeatCount", repeatdur: "repeatDur" } }; const tagSelector = {}; const { windowWidth } = uni.getSystemInfoSync(); const blankChar = makeMap(" ,\r,\n, ,\f"); let idIndex = 0; config.ignoreTags.iframe = void 0; config.trustTags.iframe = true; config.ignoreTags.embed = void 0; config.trustTags.embed = true; function makeMap(str) { const map = /* @__PURE__ */ Object.create(null); const list2 = str.split(","); for (let i = list2.length; i--; ) { map[list2[i]] = true; } return map; } function decodeEntity(str, amp) { let i = str.indexOf("&"); while (i !== -1) { const j = str.indexOf(";", i + 3); let code2; if (j === -1) break; if (str[i + 1] === "#") { code2 = parseInt((str[i + 2] === "x" ? "0" : "") + str.substring(i + 2, j)); if (!isNaN(code2)) { str = str.substr(0, i) + String.fromCharCode(code2) + str.substr(j + 1); } } else { code2 = str.substring(i + 1, j); if (config.entities[code2] || code2 === "amp" && amp) { str = str.substr(0, i) + (config.entities[code2] || "&") + str.substr(j + 1); } } i = str.indexOf("&", i + 1); } return str; } function mergeNodes(nodes) { let i = nodes.length - 1; for (let j = i; j >= -1; j--) { if (j === -1 || nodes[j].c || !nodes[j].name || nodes[j].name !== "div" && nodes[j].name !== "p" && nodes[j].name[0] !== "h" || (nodes[j].attrs.style || "").includes("inline")) { if (i - j >= 5) { nodes.splice(j + 1, i - j, { name: "div", attrs: {}, children: nodes.slice(j + 1, i + 1) }); } i = j - 1; } } } function Parser(vm) { this.options = vm || {}; this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle); this.imgList = vm.imgList || []; this.imgList._unloadimgs = 0; this.plugins = vm.plugins || []; this.attrs = /* @__PURE__ */ Object.create(null); this.stack = []; this.nodes = []; this.pre = (this.options.containerStyle || "").includes("white-space") && this.options.containerStyle.includes("pre") ? 2 : 0; } Parser.prototype.parse = function(content) { for (let i = this.plugins.length; i--; ) { if (this.plugins[i].onUpdate) { content = this.plugins[i].onUpdate(content, config) || content; } } new Lexer(this).parse(content); while (this.stack.length) { this.popNode(); } if (this.nodes.length > 50) { mergeNodes(this.nodes); } return this.nodes; }; Parser.prototype.expose = function() { for (let i = this.stack.length; i--; ) { const item = this.stack[i]; if (item.c || item.name === "a" || item.name === "video" || item.name === "audio") return; item.c = 1; } }; Parser.prototype.hook = function(node2) { for (let i = this.plugins.length; i--; ) { if (this.plugins[i].onParse && this.plugins[i].onParse(node2, this) === false) { return false; } } return true; }; Parser.prototype.getUrl = function(url2) { const domain = this.options.domain; if (url2[0] === "/") { if (url2[1] === "/") { url2 = (domain ? domain.split("://")[0] : "http") + ":" + url2; } else if (domain) { url2 = domain + url2; } else { url2 = plus.io.convertLocalFileSystemURL(url2); } } else if (!url2.includes("data:") && !url2.includes("://")) { if (domain) { url2 = domain + "/" + url2; } else { url2 = plus.io.convertLocalFileSystemURL(url2); } } return url2; }; Parser.prototype.parseStyle = function(node2) { const attrs = node2.attrs; const list2 = (this.tagStyle[node2.name] || "").split(";").concat((attrs.style || "").split(";")); const styleObj = {}; let tmp = ""; if (attrs.id && !this.xml) { if (this.options.useAnchor) { this.expose(); } else if (node2.name !== "img" && node2.name !== "a" && node2.name !== "video" && node2.name !== "audio") { attrs.id = void 0; } } if (attrs.width) { styleObj.width = parseFloat(attrs.width) + (attrs.width.includes("%") ? "%" : "px"); attrs.width = void 0; } if (attrs.height) { styleObj.height = parseFloat(attrs.height) + (attrs.height.includes("%") ? "%" : "px"); attrs.height = void 0; } for (let i = 0, len = list2.length; i < len; i++) { const info = list2[i].split(":"); if (info.length < 2) continue; const key = info.shift().trim().toLowerCase(); let value = info.join(":").trim(); if (value[0] === "-" && value.lastIndexOf("-") > 0 || value.includes("safe")) { tmp += `;${key}:${value}`; } else if (!styleObj[key] || value.includes("import") || !styleObj[key].includes("import")) { if (value.includes("url")) { let j = value.indexOf("(") + 1; if (j) { while (value[j] === '"' || value[j] === "'" || blankChar[value[j]]) { j++; } value = value.substr(0, j) + this.getUrl(value.substr(j)); } } else if (value.includes("rpx")) { value = value.replace(/[0-9.]+\s*rpx/g, ($) => parseFloat($) * windowWidth / 750 + "px"); } styleObj[key] = value; } } node2.attrs.style = tmp; return styleObj; }; Parser.prototype.onTagName = function(name) { this.tagName = this.xml ? name : name.toLowerCase(); if (this.tagName === "svg") { this.xml = (this.xml || 0) + 1; config.ignoreTags.style = void 0; } }; Parser.prototype.onAttrName = function(name) { name = this.xml ? name : name.toLowerCase(); if (name.substr(0, 5) === "data-") { if (name === "data-src" && !this.attrs.src) { this.attrName = "src"; } else if (this.tagName === "img" || this.tagName === "a") { this.attrName = name; } else { this.attrName = void 0; } } else { this.attrName = name; this.attrs[name] = "T"; } }; Parser.prototype.onAttrVal = function(val) { const name = this.attrName || ""; if (name === "style" || name === "href") { this.attrs[name] = decodeEntity(val, true); } else if (name.includes("src")) { this.attrs[name] = this.getUrl(decodeEntity(val, true)); } else if (name) { this.attrs[name] = val; } }; Parser.prototype.onOpenTag = function(selfClose) { const node2 = /* @__PURE__ */ Object.create(null); node2.name = this.tagName; node2.attrs = this.attrs; if (this.options.nodes.length) { node2.type = "node"; } this.attrs = /* @__PURE__ */ Object.create(null); const attrs = node2.attrs; const parent = this.stack[this.stack.length - 1]; const siblings = parent ? parent.children : this.nodes; const close = this.xml ? selfClose : config.voidTags[node2.name]; if (tagSelector[node2.name]) { attrs.class = tagSelector[node2.name] + (attrs.class ? " " + attrs.class : ""); } if (node2.name === "embed") { this.expose(); } if (node2.name === "video" || node2.name === "audio") { if (node2.name === "video" && !attrs.id) { attrs.id = "v" + idIndex++; } if (!attrs.controls && !attrs.autoplay) { attrs.controls = "T"; } node2.src = []; if (attrs.src) { node2.src.push(attrs.src); attrs.src = void 0; } this.expose(); } if (close) { if (!this.hook(node2) || config.ignoreTags[node2.name]) { if (node2.name === "base" && !this.options.domain) { this.options.domain = attrs.href; } else if (node2.name === "source" && parent && (parent.name === "video" || parent.name === "audio") && attrs.src) { parent.src.push(attrs.src); } return; } const styleObj = this.parseStyle(node2); if (node2.name === "img") { if (attrs.src) { if (attrs.src.includes("webp")) { node2.webp = "T"; } if (attrs.src.includes("data:") && !attrs["original-src"]) { attrs.ignore = "T"; } if (!attrs.ignore || node2.webp || attrs.src.includes("cloud://")) { for (let i = this.stack.length; i--; ) { const item = this.stack[i]; if (item.name === "a") { node2.a = item.attrs; } if (item.name === "table" && !node2.webp && !attrs.src.includes("cloud://")) { if (!styleObj.display || styleObj.display.includes("inline")) { node2.t = "inline-block"; } else { node2.t = styleObj.display; } styleObj.display = void 0; } item.c = 1; } attrs.i = this.imgList.length.toString(); let src = attrs["original-src"] || attrs.src; this.imgList.push(src); if (!node2.t) { this.imgList._unloadimgs += 1; } if (this.options.lazyLoad) { attrs["data-src"] = attrs.src; attrs.src = void 0; } } } if (styleObj.display === "inline") { styleObj.display = ""; } if (attrs.ignore) { styleObj["max-width"] = styleObj["max-width"] || "100%"; attrs.style += ";-webkit-touch-callout:none"; } if (parseInt(styleObj.width) > windowWidth) { styleObj.height = void 0; } if (!isNaN(parseInt(styleObj.width))) { node2.w = "T"; } if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes("%") || parent && (parent.attrs.style || "").includes("height"))) { node2.h = "T"; } } else if (node2.name === "svg") { siblings.push(node2); this.stack.push(node2); this.popNode(); return; } for (const key in styleObj) { if (styleObj[key]) { attrs.style += `;${key}:${styleObj[key].replace(" !important", "")}`; } } attrs.style = attrs.style.substr(1) || void 0; } else { if ((node2.name === "pre" || (attrs.style || "").includes("white-space") && attrs.style.includes("pre")) && this.pre !== 2) { this.pre = node2.pre = 1; } node2.children = []; this.stack.push(node2); } siblings.push(node2); }; Parser.prototype.onCloseTag = function(name) { name = this.xml ? name : name.toLowerCase(); let i; for (i = this.stack.length; i--; ) { if (this.stack[i].name === name) break; } if (i !== -1) { while (this.stack.length > i) { this.popNode(); } } else if (name === "p" || name === "br") { const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes; siblings.push({ name, attrs: { class: tagSelector[name] || "", style: this.tagStyle[name] || "" } }); } }; Parser.prototype.popNode = function() { const node2 = this.stack.pop(); let attrs = node2.attrs; const children = node2.children; const parent = this.stack[this.stack.length - 1]; const siblings = parent ? parent.children : this.nodes; if (!this.hook(node2) || config.ignoreTags[node2.name]) { if (node2.name === "title" && children.length && children[0].type === "text" && this.options.setTitle) { uni.setNavigationBarTitle({ title: children[0].text }); } siblings.pop(); return; } if (node2.pre && this.pre !== 2) { this.pre = node2.pre = void 0; for (let i = this.stack.length; i--; ) { if (this.stack[i].pre) { this.pre = 1; } } } const styleObj = {}; if (node2.name === "svg") { if (this.xml > 1) { this.xml--; return; } let src = ""; const style = attrs.style; attrs.style = ""; attrs.xmlns = "http://www.w3.org/2000/svg"; (function traversal(node3) { if (node3.type === "text") { src += node3.text; return; } const name = config.svgDict[node3.name] || node3.name; src += "<" + name; for (const item in node3.attrs) { const val = node3.attrs[item]; if (val) { src += ` ${config.svgDict[item] || item}="${val}"`; } } if (!node3.children) { src += "/>"; } else { src += ">"; for (let i = 0; i < node3.children.length; i++) { traversal(node3.children[i]); } src += ""; } })(node2); node2.name = "img"; node2.attrs = { src: "data:image/svg+xml;utf8," + src.replace(/#/g, "%23"), style, ignore: "T" }; node2.children = void 0; this.xml = false; config.ignoreTags.style = true; return; } if (attrs.align) { if (node2.name === "table") { if (attrs.align === "center") { styleObj["margin-inline-start"] = styleObj["margin-inline-end"] = "auto"; } else { styleObj.float = attrs.align; } } else { styleObj["text-align"] = attrs.align; } attrs.align = void 0; } if (attrs.dir) { styleObj.direction = attrs.dir; attrs.dir = void 0; } if (node2.name === "font") { if (attrs.color) { styleObj.color = attrs.color; attrs.color = void 0; } if (attrs.face) { styleObj["font-family"] = attrs.face; attrs.face = void 0; } if (attrs.size) { let size = parseInt(attrs.size); if (!isNaN(size)) { if (size < 1) { size = 1; } else if (size > 7) { size = 7; } styleObj["font-size"] = ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"][size - 1]; } attrs.size = void 0; } } if ((attrs.class || "").includes("align-center")) { styleObj["text-align"] = "center"; } Object.assign(styleObj, this.parseStyle(node2)); if (node2.name !== "table" && parseInt(styleObj.width) > windowWidth) { styleObj["max-width"] = "100%"; styleObj["box-sizing"] = "border-box"; } if (config.blockTags[node2.name]) { node2.name = "div"; } else if (!config.trustTags[node2.name] && !this.xml) { node2.name = "span"; } if (node2.name === "a" || node2.name === "ad" || node2.name === "iframe") { this.expose(); } else if (node2.name === "video") { if ((styleObj.height || "").includes("auto")) { styleObj.height = void 0; } let str = '"; node2.html = str; } else if ((node2.name === "ul" || node2.name === "ol") && node2.c) { const types2 = { a: "lower-alpha", A: "upper-alpha", i: "lower-roman", I: "upper-roman" }; if (types2[attrs.type]) { attrs.style += ";list-style-type:" + types2[attrs.type]; attrs.type = void 0; } for (let i = children.length; i--; ) { if (children[i].name === "li") { children[i].c = 1; } } } else if (node2.name === "table") { let padding = parseFloat(attrs.cellpadding); let spacing = parseFloat(attrs.cellspacing); const border = parseFloat(attrs.border); const bordercolor = styleObj["border-color"]; const borderstyle = styleObj["border-style"]; if (node2.c) { if (isNaN(padding)) { padding = 2; } if (isNaN(spacing)) { spacing = 2; } } if (border) { attrs.style += `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}`; } if (node2.flag && node2.c) { styleObj.display = "grid"; if (spacing) { styleObj["grid-gap"] = spacing + "px"; styleObj.padding = spacing + "px"; } else if (border) { attrs.style += ";border-left:0;border-top:0"; } const width = []; const trList = []; const cells = []; const map = {}; (function traversal(nodes) { for (let i = 0; i < nodes.length; i++) { if (nodes[i].name === "tr") { trList.push(nodes[i]); } else { traversal(nodes[i].children || []); } } })(children); for (let row = 1; row <= trList.length; row++) { let col = 1; for (let j = 0; j < trList[row - 1].children.length; j++) { const td = trList[row - 1].children[j]; if (td.name === "td" || td.name === "th") { while (map[row + "." + col]) { col++; } let style = td.attrs.style || ""; let start = style.indexOf("width") ? style.indexOf(";width") : 0; if (start !== -1) { let end = style.indexOf(";", start + 6); if (end === -1) { end = style.length; } if (!td.attrs.colspan) { width[col] = style.substring(start ? start + 7 : 6, end); } style = style.substr(0, start) + style.substr(end); } style += ";display:flex"; start = style.indexOf("vertical-align"); if (start !== -1) { const val = style.substr(start + 15, 10); if (val.includes("middle")) { style += ";align-items:center"; } else if (val.includes("bottom")) { style += ";align-items:flex-end"; } } else { style += ";align-items:center"; } start = style.indexOf("text-align"); if (start !== -1) { const val = style.substr(start + 11, 10); if (val.includes("center")) { style += ";justify-content: center"; } else if (val.includes("right")) { style += ";justify-content: right"; } } style = (border ? `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}` + (spacing ? "" : ";border-right:0;border-bottom:0") : "") + (padding ? `;padding:${padding}px` : "") + ";" + style; if (td.attrs.colspan) { style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`; if (!td.attrs.rowspan) { style += `;grid-row-start:${row};grid-row-end:${row + 1}`; } col += parseInt(td.attrs.colspan) - 1; } if (td.attrs.rowspan) { style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`; if (!td.attrs.colspan) { style += `;grid-column-start:${col};grid-column-end:${col + 1}`; } for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) { for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) { map[row + rowspan + "." + (col - colspan)] = 1; } } } if (style) { td.attrs.style = style; } cells.push(td); col++; } } if (row === 1) { let temp = ""; for (let i = 1; i < col; i++) { temp += (width[i] ? width[i] : "auto") + " "; } styleObj["grid-template-columns"] = temp; } } node2.children = cells; } else { if (node2.c) { styleObj.display = "table"; } if (!isNaN(spacing)) { styleObj["border-spacing"] = spacing + "px"; } if (border || padding) { (function traversal(nodes) { for (let i = 0; i < nodes.length; i++) { const td = nodes[i]; if (td.name === "th" || td.name === "td") { if (border) { td.attrs.style = `border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"};${td.attrs.style || ""}`; } if (padding) { td.attrs.style = `padding:${padding}px;${td.attrs.style || ""}`; } } else if (td.children) { traversal(td.children); } } })(children); } } if (this.options.scrollTable && !(attrs.style || "").includes("inline")) { const table = Object.assign({}, node2); node2.name = "div"; node2.attrs = { style: "overflow:auto" }; node2.children = [table]; attrs = table.attrs; } } else if ((node2.name === "td" || node2.name === "th") && (attrs.colspan || attrs.rowspan)) { for (let i = this.stack.length; i--; ) { if (this.stack[i].name === "table") { this.stack[i].flag = 1; break; } } } else if (node2.name === "ruby") { node2.name = "span"; for (let i = 0; i < children.length - 1; i++) { if (children[i].type === "text" && children[i + 1].name === "rt") { children[i] = { name: "div", attrs: { style: "display:inline-block;text-align:center" }, children: [{ name: "div", attrs: { style: "font-size:50%;" + (children[i + 1].attrs.style || "") }, children: children[i + 1].children }, children[i]] }; children.splice(i + 1, 1); } } } else if (node2.c) { (function traversal(node3) { node3.c = 2; for (let i = node3.children.length; i--; ) { const child = node3.children[i]; if (child.name && (config.inlineTags[child.name] || (child.attrs.style || "").includes("inline") && child.children) && !child.c) { traversal(child); } if (!child.c || child.name === "table") { node3.c = 1; } } })(node2); } if ((styleObj.display || "").includes("flex") && !node2.c) { for (let i = children.length; i--; ) { const item = children[i]; if (item.f) { item.attrs.style = (item.attrs.style || "") + item.f; item.f = void 0; } } } const flex = parent && ((parent.attrs.style || "").includes("flex") || (parent.attrs.style || "").includes("grid")) && !node2.c; if (flex) { node2.f = ";max-width:100%"; } if (children.length >= 50 && node2.c && !(styleObj.display || "").includes("flex")) { mergeNodes(children); } for (const key in styleObj) { if (styleObj[key]) { const val = `;${key}:${styleObj[key].replace(" !important", "")}`; if (flex && (key.includes("flex") && key !== "flex-direction" || key === "align-self" || key.includes("grid") || styleObj[key][0] === "-" || key.includes("width") && val.includes("%"))) { node2.f += val; if (key === "width") { attrs.style += ";width:100%"; } } else { attrs.style += val; } } } attrs.style = attrs.style.substr(1) || void 0; }; Parser.prototype.onText = function(text) { if (!this.pre) { let trim2 = ""; let flag2; for (let i = 0, len = text.length; i < len; i++) { if (!blankChar[text[i]]) { trim2 += text[i]; } else { if (trim2[trim2.length - 1] !== " ") { trim2 += " "; } if (text[i] === "\n" && !flag2) { flag2 = true; } } } if (trim2 === " ") { if (flag2) return; else { const parent = this.stack[this.stack.length - 1]; if (parent && parent.name[0] === "t") return; } } text = trim2; } const node2 = /* @__PURE__ */ Object.create(null); node2.type = "text"; node2.text = decodeEntity(text); if (this.hook(node2)) { const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes; siblings.push(node2); } }; function Lexer(handler) { this.handler = handler; } Lexer.prototype.parse = function(content) { this.content = content || ""; this.i = 0; this.start = 0; this.state = this.text; for (let len = this.content.length; this.i !== -1 && this.i < len; ) { this.state(); } }; Lexer.prototype.checkClose = function(method2) { const selfClose = this.content[this.i] === "/"; if (this.content[this.i] === ">" || selfClose && this.content[this.i + 1] === ">") { if (method2) { this.handler[method2](this.content.substring(this.start, this.i)); } this.i += selfClose ? 2 : 1; this.start = this.i; this.handler.onOpenTag(selfClose); if (this.handler.tagName === "script") { this.i = this.content.indexOf("= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z") { if (this.start !== this.i) { this.handler.onText(this.content.substring(this.start, this.i)); } this.start = ++this.i; this.state = this.tagName; } else if (c2 === "/" || c2 === "!" || c2 === "?") { if (this.start !== this.i) { this.handler.onText(this.content.substring(this.start, this.i)); } const next = this.content[this.i + 2]; if (c2 === "/" && (next >= "a" && next <= "z" || next >= "A" && next <= "Z")) { this.i += 2; this.start = this.i; this.state = this.endTag; return; } let end = "-->"; if (c2 !== "!" || this.content[this.i + 2] !== "-" || this.content[this.i + 3] !== "-") { end = ">"; } this.i = this.content.indexOf(end, this.i); if (this.i !== -1) { this.i += end.length; this.start = this.i; } } else { this.i++; } }; Lexer.prototype.tagName = function() { if (blankChar[this.content[this.i]]) { this.handler.onTagName(this.content.substring(this.start, this.i)); while (blankChar[this.content[++this.i]]) ; if (this.i < this.content.length && !this.checkClose()) { this.start = this.i; this.state = this.attrName; } } else if (!this.checkClose("onTagName")) { this.i++; } }; Lexer.prototype.attrName = function() { let c2 = this.content[this.i]; if (blankChar[c2] || c2 === "=") { this.handler.onAttrName(this.content.substring(this.start, this.i)); let needVal = c2 === "="; const len = this.content.length; while (++this.i < len) { c2 = this.content[this.i]; if (!blankChar[c2]) { if (this.checkClose()) return; if (needVal) { this.start = this.i; this.state = this.attrVal; return; } if (this.content[this.i] === "=") { needVal = true; } else { this.start = this.i; this.state = this.attrName; return; } } } } else if (!this.checkClose("onAttrName")) { this.i++; } }; Lexer.prototype.attrVal = function() { const c2 = this.content[this.i]; const len = this.content.length; if (c2 === '"' || c2 === "'") { this.start = ++this.i; this.i = this.content.indexOf(c2, this.i); if (this.i === -1) return; this.handler.onAttrVal(this.content.substring(this.start, this.i)); } else { for (; this.i < len; this.i++) { if (blankChar[this.content[this.i]]) { this.handler.onAttrVal(this.content.substring(this.start, this.i)); break; } else if (this.checkClose("onAttrVal")) return; } } while (blankChar[this.content[++this.i]]) ; if (this.i < len && !this.checkClose()) { this.start = this.i; this.state = this.attrName; } }; Lexer.prototype.endTag = function() { const c2 = this.content[this.i]; if (blankChar[c2] || c2 === ">" || c2 === "/") { this.handler.onCloseTag(this.content.substring(this.start, this.i)); if (c2 !== ">") { this.i = this.content.indexOf(">", this.i); if (this.i === -1) return; } this.start = ++this.i; this.state = this.text; } else { this.i++; } }; const plugins = []; const _sfc_main$H = { name: "uv-parse", data() { return { nodes: [] }; }, props: { containerStyle: { type: String, default: "" }, content: { type: String, default: "" }, copyLink: { type: [Boolean, String], default: true }, domain: String, errorImg: { type: String, default: "" }, lazyLoad: { type: [Boolean, String], default: false }, loadingImg: { type: String, default: "" }, pauseVideo: { type: [Boolean, String], default: true }, previewImg: { type: [Boolean, String], default: true }, scrollTable: [Boolean, String], selectable: [Boolean, String], setTitle: { type: [Boolean, String], default: true }, showImgMenu: { type: [Boolean, String], default: true }, tagStyle: Object, useAnchor: [Boolean, Number] }, emits: ["load", "ready", "imgtap", "linktap", "play", "error"], components: { node }, watch: { content(content) { this.setContent(content); } }, created() { this.plugins = []; for (let i = plugins.length; i--; ) { this.plugins.push(new plugins[i](this)); } }, mounted() { if (this.content && !this.nodes.length) { this.setContent(this.content); } }, beforeDestroy() { this._hook("onDetached"); }, methods: { /** * @description 将锚点跳转的范围限定在一个 scroll-view 内 * @param {Object} page scroll-view 所在页面的示例 * @param {String} selector scroll-view 的选择器 * @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名 */ in(page, selector, scrollTop) { if (page && selector && scrollTop) { this._in = { page, selector, scrollTop }; } }, /** * @description 锚点跳转 * @param {String} id 要跳转的锚点 id * @param {Number} offset 跳转位置的偏移量 * @returns {Promise} */ navigateTo(id, offset) { return new Promise((resolve2, reject) => { if (!this.useAnchor) { reject(Error("Anchor is disabled")); return; } offset = offset || parseInt(this.useAnchor) || 0; let deep = " "; const selector = uni.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector : "._root") + (id ? `${deep}#${id}` : "")).boundingClientRect(); if (this._in) { selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect(); } else { selector.selectViewport().scrollOffset(); } selector.exec((res) => { if (!res[0]) { reject(Error("Label not found")); return; } const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset; if (this._in) { this._in.page[this._in.scrollTop] = scrollTop; } else { uni.pageScrollTo({ scrollTop, duration: 300 }); } resolve2(); }); }); }, /** * @description 获取文本内容 * @return {String} */ getText(nodes) { let text = ""; (function traversal(nodes2) { for (let i = 0; i < nodes2.length; i++) { const node2 = nodes2[i]; if (node2.type === "text") { text += node2.text.replace(/&/g, "&"); } else if (node2.name === "br") { text += "\n"; } else { const isBlock = node2.name === "p" || node2.name === "div" || node2.name === "tr" || node2.name === "li" || node2.name[0] === "h" && node2.name[1] > "0" && node2.name[1] < "7"; if (isBlock && text && text[text.length - 1] !== "\n") { text += "\n"; } if (node2.children) { traversal(node2.children); } if (isBlock && text[text.length - 1] !== "\n") { text += "\n"; } else if (node2.name === "td" || node2.name === "th") { text += " "; } } } })(nodes || this.nodes); return text; }, /** * @description 获取内容大小和位置 * @return {Promise} */ getRect() { return new Promise((resolve2, reject) => { uni.createSelectorQuery().in(this).select("#_root").boundingClientRect().exec((res) => res[0] ? resolve2(res[0]) : reject(Error("Root label not found"))); }); }, /** * @description 暂停播放媒体 */ pauseMedia() { for (let i = (this._videos || []).length; i--; ) { this._videos[i].pause(); } const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()'; let page = this.$parent; while (!page.$scope) page = page.$parent; page.$scope.$getAppWebview().evalJS(command); }, /** * @description 设置媒体播放速率 * @param {Number} rate 播放速率 */ setPlaybackRate(rate) { this.playbackRate = rate; for (let i = (this._videos || []).length; i--; ) { this._videos[i].playbackRate(rate); } const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].playbackRate=' + rate; let page = this.$parent; while (!page.$scope) page = page.$parent; page.$scope.$getAppWebview().evalJS(command); }, /** * @description 设置内容 * @param {String} content html 内容 * @param {Boolean} append 是否在尾部追加 */ setContent(content, append) { if (!append || !this.imgList) { this.imgList = []; } const nodes = new Parser(this).parse(content); this.$set(this, "nodes", append ? (this.nodes || []).concat(nodes) : nodes); this._videos = []; this.$nextTick(() => { this._hook("onLoad"); this.$emit("load"); }); if (this.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) { let height = 0; const callback = (rect) => { if (!rect || !rect.height) rect = {}; if (rect.height === height) { this.$emit("ready", rect); } else { height = rect.height; setTimeout(() => { this.getRect().then(callback).catch(callback); }, 350); } }; this.getRect().then(callback).catch(callback); } else { if (!this.imgList._unloadimgs) { this.getRect().then((rect) => { this.$emit("ready", rect); }).catch(() => { this.$emit("ready", {}); }); } } }, /** * @description 调用插件钩子函数 */ _hook(name) { for (let i = plugins.length; i--; ) { if (this.plugins[i][name]) { this.plugins[i][name](); } } } } }; function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) { const _component_node = vue.resolveComponent("node"); return vue.openBlock(), vue.createElementBlock( "view", { id: "_root", class: vue.normalizeClass(($props.selectable ? "_select " : "") + "_root"), style: vue.normalizeStyle($props.containerStyle) }, [ !$data.nodes[0] ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_node, { key: 1, childs: $data.nodes, opts: [$props.lazyLoad, $props.loadingImg, $props.errorImg, $props.showImgMenu, $props.selectable], name: "span" }, null, 8, ["childs", "opts"])) ], 6 /* CLASS, STYLE */ ); } const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-73e89447"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/uni_modules/uv-parse/components/uv-parse/uv-parse.vue"]]); const _sfc_main$G = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const route2 = useRoute(); const richViewStore = useRichViewStore(); const richViewProps = vue.computed(() => ({ ...route2.query, content: richViewStore.content })); vue.watchEffect(() => { if (richViewProps.value.title) { uni.setNavigationBarTitle({ title: decodeURIComponent(richViewProps.value.title) }); } }); const __returned__ = { route: route2, richViewStore, richViewProps }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_parse = resolveEasycom(vue.resolveDynamicComponent("uv-parse"), __easycom_0); const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "p-4" }, [ vue.createVNode(_component_uv_parse, { content: $setup.richViewProps.content }, null, 8, ["content"]) ]) ]), _: 1 /* STABLE */ }); } const PagesCommonRichViewIndex = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/common/rich-view/index.vue"]]); const _sfc_main$F = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const resultInfo = vue.ref({ title: "操作成功", description: "你已通过路由中间件校验", details: [], showProgress: false, shareable: false, footerTip: "" }); const __returned__ = { resultInfo }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) { const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "h-full flex flex-col bg-gray-50" }, [ vue.createElementVNode("view", { class: "flex flex-1 flex-col items-center justify-center px-6 py-8" }, [ vue.createElementVNode("view", { class: "success-icon-container mb-8" }, [ vue.createElementVNode("view", { class: "relative" }, [ vue.createElementVNode("view", { class: "h-32 w-32 flex items-center justify-center rounded-full bg-green-500 shadow-lg" }, [ vue.createElementVNode("view", { class: "i-carbon-checkmark size-16 animate-bounce text-white" }) ]), vue.createElementVNode("view", { class: "absolute inset-0 h-32 w-32 animate-ping border-4 border-green-200 rounded-full" }), vue.createElementVNode("view", { class: "absolute h-36 w-36 border-2 border-green-100 rounded-full opacity-50 -inset-2" }) ]) ]), vue.createElementVNode("view", { class: "success-info mb-8 text-center" }, [ vue.createElementVNode( "view", { class: "mb-3 text-2xl text-gray-800 font-bold" }, vue.toDisplayString($setup.resultInfo.title), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "max-w-sm text-base text-gray-600 leading-relaxed" }, vue.toDisplayString($setup.resultInfo.description), 1 /* TEXT */ ) ]), $setup.resultInfo.details && $setup.resultInfo.details.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "details-card mb-8 max-w-sm w-full" }, [ vue.createElementVNode("view", { class: "rounded-xl bg-white p-5 shadow-sm" }, [ vue.createElementVNode("view", { class: "mb-4 flex items-center text-lg text-gray-800 font-semibold" }, [ vue.createElementVNode("view", { class: "i-carbon-information mr-2 text-lg text-primary-500" }), vue.createTextVNode(" 详细信息 ") ]), vue.createElementVNode("view", { class: "space-y-3" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.resultInfo.details, (detail, index) => { return vue.openBlock(), vue.createElementBlock( "view", { key: index, class: vue.normalizeClass(["flex items-center justify-between py-2", index !== $setup.resultInfo.details.length - 1 ? "border-b border-gray-100" : ""]) }, [ vue.createElementVNode( "view", { class: "text-sm text-gray-600" }, vue.toDisplayString(detail.label), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "text-sm text-gray-800 font-medium" }, vue.toDisplayString(detail.value), 1 /* TEXT */ ) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ])) : vue.createCommentVNode("v-if", true) ]) ]) ]), _: 1 /* STABLE */ }); } const PagesTipsMiddlewareIndex = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__scopeId", "data-v-3c93bb86"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/tips/middleware/index.vue"]]); const _sfc_main$E = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const pagingRef = vue.ref(null); const dataList = vue.ref([]); const currentPage = vue.ref(1); const pageSize = vue.ref(10); const total = vue.ref(0); const isLoading = vue.ref(false); const stats = vue.computed(() => ({ loaded: dataList.value.length, total: total.value, pages: Math.ceil(total.value / pageSize.value), currentPage: currentPage.value })); const mockDataTypes = [ { type: "article", icon: "i-carbon-document", color: "from-blue-400 to-blue-600", titles: [ "Vue 3 Composition API 最佳实践", "UniApp 跨平台开发指南", "前端性能优化技巧分享", "TypeScript 进阶使用技巧", "移动端适配解决方案" ] }, { type: "video", icon: "i-carbon-video", color: "from-red-400 to-red-600", titles: [ "深入理解 JavaScript 异步编程", "CSS Grid 布局完全指南", "React Hooks 实战教程", "Webpack 配置优化实践", "Node.js 后端开发入门" ] }, { type: "project", icon: "i-carbon-code", color: "from-green-400 to-green-600", titles: [ "开源组件库设计与实现", "微前端架构实践案例", "全栈项目开发经验", "DevOps 自动化部署", "数据可视化项目实战" ] }, { type: "tutorial", icon: "i-carbon-education", color: "from-purple-400 to-purple-600", titles: [ "Git 版本控制进阶教程", "Docker 容器化部署指南", "API 设计最佳实践", "代码重构技巧与方法", "软件架构设计原则" ] } ]; const mockTags = [ "前端开发", "后端开发", "UI设计", "产品设计", "数据分析", "人工智能", "云计算", "微服务", "区块链", "物联网" ]; function generateMockData(page, size) { const data = []; const startIndex = (page - 1) * size; for (let i = 0; i < size; i++) { const index = startIndex + i; const dataType = mockDataTypes[index % mockDataTypes.length]; const title = dataType.titles[index % dataType.titles.length]; data.push({ id: index + 1, type: dataType.type, icon: dataType.icon, color: dataType.color, title: `${title} #${index + 1}`, description: `这是第 ${index + 1} 条内容的详细描述,展示了丰富的功能特性和优秀的用户体验设计。内容包含了最新的技术趋势和实践经验分享。`, tags: [ mockTags[index % mockTags.length], mockTags[(index + 1) % mockTags.length] ], stats: { views: Math.floor(Math.random() * 9999) + 100, likes: Math.floor(Math.random() * 999) + 10, comments: Math.floor(Math.random() * 99) + 1, shares: Math.floor(Math.random() * 50) + 1 }, publishTime: new Date(Date.now() - Math.random() * 30 * 24 * 60 * 60 * 1e3).toLocaleDateString(), readTime: `${Math.floor(Math.random() * 15) + 1} 分钟`, isLiked: Math.random() > 0.7, isBookmarked: Math.random() > 0.8, difficulty: ["入门", "进阶", "高级"][Math.floor(Math.random() * 3)], status: Math.random() > 0.9 ? "hot" : Math.random() > 0.7 ? "new" : "normal" }); } return data; } async function mockRequest(page, size = 10) { await sleep(800 + Math.random() * 1200); const totalItems = 156; const data = generateMockData(page, size); const hasMore = page * size < totalItems; if (Math.random() < 0.05) { throw new Error("网络连接异常,请稍后重试"); } return { code: 200, data, total: totalItems, page, pageSize: size, hasMore, message: "success" }; } async function onQuery(pageNo, pageSize2) { try { isLoading.value = true; currentPage.value = pageNo; const result = await mockRequest(pageNo, pageSize2); if (result.code === 200) { total.value = result.total; if (pageNo === 1) { dataList.value = result.data; } else { dataList.value.push(...result.data); } pagingRef.value.complete(result.data); if (!result.hasMore) { pagingRef.value.completeByNoMore(result.data); } } else { throw new Error(result.message || "数据加载失败"); } } catch (error) { formatAppLog("error", "at pages/template/paging/index.vue:171", "数据加载失败:", error); uni.showToast({ title: error.message || "加载失败", icon: "none", duration: 2e3 }); pagingRef.value.complete(false); } finally { isLoading.value = false; } } function onRefresh() { onQuery(1, pageSize.value); } function toggleLike(item) { var _a2; item.isLiked = !item.isLiked; if (item.isLiked) { item.stats.likes++; } else { item.stats.likes--; } (_a2 = uni.vibrateShort) == null ? void 0 : _a2.call(uni); } function handleItemClick(item) { uni.showToast({ title: `查看: ${item.title}`, icon: "none" }); } function formatNumber(num) { if (num >= 1e4) { return `${(num / 1e4).toFixed(1)}w`; } else if (num >= 1e3) { return `${(num / 1e3).toFixed(1)}k`; } return num.toString(); } const __returned__ = { pagingRef, dataList, currentPage, pageSize, total, isLoading, stats, mockDataTypes, mockTags, generateMockData, mockRequest, onQuery, onRefresh, toggleLike, handleItemClick, formatNumber, get sleep() { return sleep; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) { const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "h-full" }, [ vue.createVNode(_component_z_paging, { ref: "pagingRef", modelValue: $setup.dataList, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.dataList = $event), class: "flex-1", "refresher-enabled": true, "refresher-threshold": 80, "refresher-default-text": "下拉刷新数据", "refresher-pulling-text": "释放立即刷新", "refresher-refreshing-text": "正在刷新...", "refresher-complete-text": "刷新完成", "loading-more-enabled": true, "loading-more-text": ["点击加载更多", "正在加载...", "已全部加载"], "empty-view-text": "暂无内容数据", "auto-show-back-to-top": true, "back-to-top-threshold": 300, onQuery: $setup.onQuery, onOnRefresh: $setup.onRefresh }, { refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "flex flex-col items-center justify-center bg-white/80 py-6 backdrop-blur-sm" }, [ vue.createElementVNode("view", { class: "mb-2 h-8 w-8 animate-spin border-3 border-blue-500 border-t-transparent rounded-full" }), vue.createElementVNode("text", { class: "text-sm text-blue-600 font-medium" }, " 正在刷新内容... ") ]) ]), loadingMore: vue.withCtx(() => [ vue.createElementVNode("view", { class: "flex flex-col items-center justify-center py-8" }, [ vue.createElementVNode("view", { class: "mb-2 h-6 w-6 animate-spin border-2 border-gray-300 border-t-blue-500 rounded-full" }), vue.createElementVNode("text", { class: "text-sm text-gray-500" }, " 正在加载更多内容... ") ]) ]), noMore: vue.withCtx(() => [ vue.createElementVNode("view", { class: "flex flex-col items-center justify-center py-8" }, [ vue.createElementVNode("view", { class: "i-carbon-checkmark-filled mb-2 h-8 w-8 text-green-500" }), vue.createElementVNode("text", { class: "text-sm text-gray-500" }, " 已加载全部内容 "), vue.createElementVNode( "text", { class: "mt-1 text-xs text-gray-400" }, " 共 " + vue.toDisplayString($setup.stats.total) + " 条数据 ", 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "flex flex-col items-center justify-center py-16" }, [ vue.createElementVNode("view", { class: "i-carbon-document-blank mb-4 h-16 w-16 text-gray-300" }), vue.createElementVNode("text", { class: "mb-2 text-base text-gray-500 font-medium" }, " 暂无内容 "), vue.createElementVNode("text", { class: "mb-6 text-sm text-gray-400" }, " 下拉刷新试试看 "), vue.createElementVNode("button", { class: "rounded-lg bg-blue-500 px-6 py-2 text-sm text-white font-medium transition-transform active:scale-95", onClick: $setup.onRefresh }, " 立即刷新 ") ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "px-4 py-2 space-y-4" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.dataList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id, class: "overflow-hidden border border-gray-100 rounded-2xl bg-white shadow-sm transition-all duration-200 active:scale-98", onClick: ($event) => $setup.handleItemClick(item) }, [ vue.createElementVNode("view", { class: "p-4 pb-3" }, [ vue.createElementVNode("view", { class: "mb-3 flex items-start justify-between" }, [ vue.createElementVNode("view", { class: "flex flex-1 items-center space-x-3" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["h-10 w-10 flex items-center justify-center rounded-xl text-white", `bg-gradient-to-r ${item.color}`]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(`${item.icon} w-5 h-5`) }, null, 2 /* CLASS */ ) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "min-w-0 flex-1" }, [ vue.createElementVNode("view", { class: "mb-1 flex items-center space-x-2" }, [ vue.createElementVNode( "text", { class: "truncate text-base text-gray-900 font-semibold leading-tight" }, vue.toDisplayString(item.title), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "line-clamp-2 text-sm text-gray-600 leading-relaxed" }, vue.toDisplayString(item.description), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "mb-3 flex items-center space-x-2" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.tags, (tag) => { return vue.openBlock(), vue.createElementBlock( "view", { key: tag, class: "rounded-md bg-blue-50 px-2 py-1 text-xs text-blue-700 font-medium" }, vue.toDisplayString(tag), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode( "view", { class: "rounded-md bg-gray-100 px-2 py-1 text-xs text-gray-600" }, vue.toDisplayString(item.difficulty), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "border-t border-gray-100 bg-gray-50 px-4 py-3" }, [ vue.createElementVNode("view", { class: "flex items-center justify-between" }, [ vue.createElementVNode("view", { class: "flex items-center space-x-4" }, [ vue.createElementVNode("view", { class: "flex items-center text-gray-500 space-x-1" }, [ vue.createElementVNode("view", { class: "i-carbon-view h-4 w-4" }), vue.createElementVNode( "text", { class: "text-sm" }, vue.toDisplayString($setup.formatNumber(item.stats.views)), 1 /* TEXT */ ) ]), vue.createElementVNode("button", { class: vue.normalizeClass(["flex items-center transition-colors duration-200 active:scale-95 space-x-1", item.isLiked ? "text-red-500" : "text-gray-500"]), onClick: vue.withModifiers(($event) => $setup.toggleLike(item), ["stop"]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass([item.isLiked ? "i-carbon-favorite-filled" : "i-carbon-favorite", "h-4 w-4"]) }, null, 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "text-sm" }, vue.toDisplayString($setup.formatNumber(item.stats.likes)), 1 /* TEXT */ ) ], 10, ["onClick"]), vue.createElementVNode("view", { class: "flex items-center text-gray-500 space-x-1" }, [ vue.createElementVNode("view", { class: "i-carbon-chat h-4 w-4" }), vue.createElementVNode( "text", { class: "text-sm" }, vue.toDisplayString($setup.formatNumber(item.stats.comments)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "flex items-center space-x-2" }, [ vue.createElementVNode("button", { class: "p-2 text-gray-400 transition-all active:scale-95 hover:text-gray-600" }, [ vue.createElementVNode("view", { class: "i-carbon-share h-4 w-4" }) ]), vue.createElementVNode("button", { class: "p-2 text-gray-400 transition-all active:scale-95 hover:text-gray-600" }, [ vue.createElementVNode("view", { class: "i-carbon-overflow-menu-horizontal h-4 w-4" }) ]) ]) ]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "loading-more-text"]) ]) ]), _: 1 /* STABLE */ }); } const PagesTemplatePagingIndex = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-588af3ed"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/template/paging/index.vue"]]); const _imports_0$1 = "/assets/avatar-default.d890a8c4.png"; const _sfc_main$D = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const userStore = useUserStore(); const userInfo = vue.computed(() => userStore.userInfo); const genderText = vue.computed(() => { const genderMap = { 0: "未设置", 1: "男", 2: "女" }; return genderMap[userInfo.value.gender] || "未设置"; }); function formatPhone(phone) { if (!phone) return "未设置"; return phone.replace(/(\d{3})(\d{4})(\d{4})/, "$1****$3"); } function changeAvatar() { uni.chooseImage({ count: 1, sizeType: ["compressed"], sourceType: ["album", "camera"], success: (res) => { userInfo.value.avatar = res.tempFilePaths[0]; showToast2("头像已更新"); } }); } function editField(field) { showToast2("编辑基本信息"); } function changePassword() { showToast2("修改密码"); } function privacySettings() { showToast2("隐私设置"); } function deleteAccount2() { uni.showModal({ title: "警告", content: "注销账户将永久删除您的所有数据,此操作不可恢复。确定要继续吗?", confirmText: "确定注销", cancelText: "取消", confirmColor: "#ef4444", success: (res) => { if (res.confirm) { showToast2("账户注销功能暂未开放", "none"); } } }); } async function saveProfile() { try { await new Promise((resolve2) => setTimeout(resolve2, 1e3)); showToast2("保存成功"); } catch (error) { showToast2("保存失败,请重试", "none"); } } function showToast2(title, icon = "success") { uni.showToast({ title, icon }); } const __returned__ = { userStore, userInfo, genderText, formatPhone, changeAvatar, editField, changePassword, privacySettings, deleteAccount: deleteAccount2, saveProfile, showToast: showToast2 }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) { const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "profile-edit-page h-full flex flex-col bg-gray-50" }, [ vue.createElementVNode("view", { class: "header-section relative" }, [ vue.createElementVNode("view", { class: "relative h-40 overflow-hidden bg-primary-400" }, [ vue.createElementVNode("view", { class: "absolute h-32 w-32 rounded-full bg-white opacity-10 -right-8 -top-8" }), vue.createElementVNode("view", { class: "absolute bottom-4 right-16 h-16 w-16 rounded-full bg-white opacity-10" }) ]), vue.createElementVNode("view", { class: "absolute bottom-0 left-1/2 translate-y-1/2 transform -translate-x-1/2" }, [ vue.createElementVNode("view", { class: "relative" }, [ vue.createElementVNode("view", { class: "h-24 w-24 overflow-hidden border-4 border-white rounded-full shadow-lg", onClick: $setup.changeAvatar }, [ $setup.userInfo.avatar ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: $setup.userInfo.avatar, class: "size-full", mode: "aspectFill" }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: _imports_0$1, class: "size-full", mode: "aspectFill" })) ]), vue.createElementVNode("view", { class: "absolute bottom-0 right-0 h-7 w-7 flex items-center justify-center border-2 border-white rounded-full bg-primary-500" }, [ vue.createElementVNode("view", { class: "i-carbon-edit text-sm text-white" }) ]) ]) ]) ]), vue.createElementVNode("view", { class: "content-section flex-1 px-4 pb-4 pt-16" }, [ vue.createElementVNode("view", { class: "info-card mb-4 overflow-hidden rounded-xl bg-white shadow-sm" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "i-carbon-user text-lg text-primary-500" }), vue.createElementVNode("view", { class: "card-title" }, " 基本信息 ") ]), vue.createElementVNode("view", { class: "divide-y divide-gray-100" }, [ vue.createElementVNode("view", { class: "info-item", onClick: _cache[0] || (_cache[0] = ($event) => $setup.editField("username")) }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-user-identification text-lg text-gray-400" }), vue.createElementVNode("text", null, "用户名") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.userInfo.username || "未设置"), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "info-item", onClick: _cache[1] || (_cache[1] = ($event) => $setup.editField("realName")) }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-identification text-lg text-gray-400" }), vue.createElementVNode("text", null, "真实姓名") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.userInfo.realName || "未设置"), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "info-item", onClick: _cache[2] || (_cache[2] = ($event) => $setup.editField("gender")) }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-gender-male text-lg text-gray-400" }), vue.createElementVNode("text", null, "性别") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.genderText), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "info-item", onClick: _cache[3] || (_cache[3] = ($event) => $setup.editField("birthday")) }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-calendar text-lg text-gray-400" }), vue.createElementVNode("text", null, "生日") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.userInfo.birthday || "未设置"), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]) ]) ]), vue.createElementVNode("view", { class: "info-card mb-4 overflow-hidden rounded-xl bg-white shadow-sm" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "i-carbon-phone text-lg text-primary-500" }), vue.createElementVNode("view", { class: "card-title" }, " 联系方式 ") ]), vue.createElementVNode("view", { class: "divide-y divide-gray-100" }, [ vue.createElementVNode("view", { class: "info-item", onClick: _cache[4] || (_cache[4] = ($event) => $setup.editField("phone")) }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-mobile text-lg text-gray-400" }), vue.createElementVNode("text", null, "手机号") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.formatPhone($setup.userInfo.phone)), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "info-item", onClick: _cache[5] || (_cache[5] = ($event) => $setup.editField("email")) }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-email text-lg text-gray-400" }), vue.createElementVNode("text", null, "邮箱地址") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.userInfo.email || "未设置"), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "info-item", onClick: _cache[6] || (_cache[6] = ($event) => $setup.editField("wechat")) }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-logo-wechat text-lg text-gray-400" }), vue.createElementVNode("text", null, "微信号") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.userInfo.wechat || "未设置"), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]) ]) ]), vue.createElementVNode("view", { class: "info-card mb-4 overflow-hidden rounded-xl bg-white shadow-sm" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "i-carbon-location text-lg text-primary-500" }), vue.createElementVNode("view", { class: "card-title" }, " 地址信息 ") ]), vue.createElementVNode("view", { class: "divide-y divide-gray-100" }, [ vue.createElementVNode("view", { class: "info-item", onClick: _cache[7] || (_cache[7] = ($event) => $setup.editField("region")) }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-earth text-lg text-gray-400" }), vue.createElementVNode("text", null, "所在地区") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.userInfo.region || "未设置"), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "info-item", onClick: _cache[8] || (_cache[8] = ($event) => $setup.editField("address")) }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-map text-lg text-gray-400" }), vue.createElementVNode("text", null, "详细地址") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.userInfo.address || "未设置"), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]) ]) ]), vue.createElementVNode("view", { class: "info-card mb-4 overflow-hidden rounded-xl bg-white shadow-sm" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "i-carbon-settings text-lg text-primary-500" }), vue.createElementVNode("view", { class: "card-title" }, " 账户设置 ") ]), vue.createElementVNode("view", { class: "divide-y divide-gray-100" }, [ vue.createElementVNode("view", { class: "info-item", onClick: $setup.changePassword }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-password text-lg text-gray-400" }), vue.createElementVNode("text", null, "修改密码") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode("text", { class: "text-gray-400" }, " 点击修改 "), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "info-item", onClick: $setup.privacySettings }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-security text-lg text-gray-400" }), vue.createElementVNode("text", null, "隐私设置") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode("text", { class: "text-gray-400" }, " 管理隐私 "), vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "info-item", onClick: $setup.deleteAccount }, [ vue.createElementVNode("view", { class: "info-label" }, [ vue.createElementVNode("view", { class: "i-carbon-user-x text-lg text-red-400" }), vue.createElementVNode("text", { class: "text-red-500" }, " 注销账户 ") ]), vue.createElementVNode("view", { class: "info-value" }, [ vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]) ]) ]) ]), vue.createElementVNode("view", { class: "action-section px-4 pb-8 pt-4" }, [ vue.createElementVNode("button", { class: "w-full flex items-center justify-center rounded-lg bg-primary-500 py-3 text-white font-medium transition-colors duration-200 active:bg-primary-600", "hover-class": "bg-primary-600", onClick: $setup.saveProfile }, [ vue.createElementVNode("view", { class: "i-carbon-save mr-2 text-lg" }), vue.createTextVNode(" 保存修改 ") ]) ]) ]) ]), _: 1 /* STABLE */ }); } const PagesOldPagePersonalIndex = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-ac070472"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/oldPage/personal/index.vue"]]); const wechatImage = "/assets/image-wechat.067dc3d4.png"; const _imports_0 = "/assets/image-banner.11e6c99c.jpg"; const _sfc_main$C = { __name: "index", setup(__props, { expose: __expose }) { __expose(); function handleCopy(text) { uni.setClipboardData({ data: text, success: () => { showToast2("复制成功"); } }); } function handleCall(phone) { uni.makePhoneCall({ phoneNumber: phone, fail: () => { showToast2("拨打电话失败"); } }); } function previewImage(url2) { uni.previewImage({ urls: [url2], current: url2 }); } function handleSaveQrCode() { uni.saveImageToPhotosAlbum({ filePath: wechatImage, success: () => { showToast2("保存成功"); }, fail: () => { showToast2("保存失败,请检查权限设置", "none"); } }); } function showToast2(title, icon = "success") { uni.showToast({ title, icon }); } const __returned__ = { handleCopy, handleCall, previewImage, handleSaveQrCode, showToast: showToast2, get wechatImage() { return wechatImage; }, get appExtra() { return appExtra; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) { const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "contact-page h-full flex flex-col bg-gray-50" }, [ vue.createElementVNode("view", { class: "header-section relative" }, [ vue.createElementVNode("image", { src: _imports_0, mode: "aspectFill", class: "h-50 w-full rounded-b-3xl object-cover shadow-md" }), vue.createElementVNode("view", { class: "absolute inset-0 rounded-b-3xl from-black/0 to-black/60 bg-gradient-to-b" }), vue.createElementVNode("view", { class: "absolute bottom-4 left-0 w-full p-6 text-white" }, [ vue.createElementVNode("view", { class: "mb-1 text-2xl font-bold" }, " 联系我们 "), vue.createElementVNode("view", { class: "text-sm text-white/80" }, " 为您提供有限的帮助与支持 ") ]) ]), vue.createElementVNode("view", { class: "contact-cards relative z-10 px-4 -mt-4" }, [ vue.createElementVNode("view", { class: "overflow-hidden rounded-xl bg-white shadow-lg" }, [ vue.createElementVNode("view", { class: "border-b border-gray-100 px-5 py-4" }, [ vue.createElementVNode("view", { class: "text-lg text-gray-800 font-bold" }, " 联系方式 ") ]), vue.createElementVNode("view", { class: "divide-y divide-gray-100" }, [ vue.createElementVNode("view", { class: "contact-item", onClick: _cache[0] || (_cache[0] = ($event) => $setup.handleCopy($setup.appExtra.email)) }, [ vue.createElementVNode("view", { class: "icon-container" }, [ vue.createElementVNode("view", { class: "i-carbon-email size-6 text-primary-500" }) ]), vue.createElementVNode("view", { class: "info-container" }, [ vue.createElementVNode("view", { class: "label" }, " 电子邮箱 "), vue.createElementVNode( "view", { class: "value" }, vue.toDisplayString($setup.appExtra.email), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "action-container" }, [ vue.createElementVNode("view", { class: "copy-button" }, " 复制 ") ]) ]), vue.createElementVNode("view", { class: "contact-item", onClick: _cache[1] || (_cache[1] = ($event) => $setup.handleCopy($setup.appExtra.wechat)) }, [ vue.createElementVNode("view", { class: "icon-container" }, [ vue.createElementVNode("view", { class: "i-carbon-logo-wechat size-6 text-primary-500" }) ]), vue.createElementVNode("view", { class: "info-container" }, [ vue.createElementVNode("view", { class: "label" }, " 微信号 "), vue.createElementVNode( "view", { class: "value" }, vue.toDisplayString($setup.appExtra.wechat), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "action-container" }, [ vue.createElementVNode("view", { class: "copy-button" }, " 复制 ") ]) ]) ]) ]), vue.createElementVNode("view", { class: "mt-4 overflow-hidden rounded-xl bg-white shadow-lg" }, [ vue.createElementVNode("view", { class: "border-b border-gray-100 px-5 py-4" }, [ vue.createElementVNode("view", { class: "text-lg text-gray-800 font-bold" }, " 微信二维码 ") ]), vue.createElementVNode("view", { class: "flex flex-col items-center p-5" }, [ vue.createElementVNode("image", { src: $setup.wechatImage, mode: "aspectFit", class: "h-50 w-50 border border-gray-100 rounded-lg", onClick: _cache[2] || (_cache[2] = ($event) => $setup.previewImage($setup.wechatImage)) }, null, 8, ["src"]), vue.createElementVNode("view", { class: "mt-3 text-sm text-gray-500" }, " 点击二维码可放大查看 "), vue.createElementVNode("button", { class: "mt-4 w-full rounded-lg bg-primary-500 py-1 text-white font-medium transition-colors duration-200 active:bg-primary-600", "hover-class": "bg-primary-600", onClick: $setup.handleSaveQrCode }, " 保存二维码到相册 ") ]) ]) ]), vue.createElementVNode("view", { class: "footer-section mt-auto p-4 text-center text-xs text-gray-400" }, [ vue.createElementVNode( "view", { class: "mt-1" }, " © " + vue.toDisplayString((/* @__PURE__ */ new Date()).getFullYear()) + " " + vue.toDisplayString($setup.appExtra.name) + " 版权所有 ", 1 /* TEXT */ ) ]) ]) ]), _: 1 /* STABLE */ }); } const PagesOldPageContactIndex = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-813728b9"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/oldPage/contact/index.vue"]]); const useAppStore = defineStore( "app", () => { const themeModel = { primary: { color: primaryColor, name: "默认" } }; const currentTheme2 = vue.ref("primary"); const currentThemeInfo = vue.computed(() => themeModel[currentTheme2.value] || themeModel.primary); const primaryColor$1 = vue.computed(() => { var _a2; return ((_a2 = currentThemeInfo.value) == null ? void 0 : _a2.color) || primaryColor; }); return { themeModel, currentTheme: currentTheme2, currentThemeInfo, primaryColor: primaryColor$1 }; }, { persist: true } ); const _sfc_main$B = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const appStore = useAppStore(); const router2 = useRouter(); const settings = vue.ref({ darkMode: false, themeColor: "blue", fontSize: "medium", pushNotification: true, soundAlert: true, vibration: true, biometric: false, autoClean: true }); const storageUsed = vue.ref("2.3GB"); const storageTotal = vue.ref("64GB"); const cacheSize = vue.ref("156MB"); const hasUpdate = vue.ref(false); const fontSizes = { small: "小", medium: "中", large: "大" }; const autoLockOptions = { 1: "1分钟", 5: "5分钟", 10: "10分钟", 30: "30分钟", 0: "从不" }; const currentThemeColor = vue.computed(() => appStore.primaryColor); const currentThemeText = vue.computed(() => { var _a2; return ((_a2 = appStore.currentThemeInfo) == null ? void 0 : _a2.name) || "默认"; }); const fontSizeText = vue.computed(() => fontSizes[settings.value.fontSize] || "中"); const autoLockText = vue.computed(() => autoLockOptions[settings.value.autoLock] || "5分钟"); function resetSettings() { uni.showModal({ title: "重置设置", content: "确定要将所有设置恢复为默认值吗?", confirmText: "重置", cancelText: "取消", success: (res) => { if (res.confirm) { settings.value = { darkMode: false, themeColor: "blue", fontSize: "medium", pushNotification: true, soundAlert: true, vibration: true, biometric: false, autoLock: 5, autoClean: true }; showToast2("设置已重置"); } } }); } function toggleSetting(key) { settings.value[key] = !settings.value[key]; if (settings.value.vibration) { uni.vibrateShort(); } saveSettings(); } function selectThemeColor() { const items = Object.entries(appStore.themeModel).map(([key, value]) => value.name); uni.showActionSheet({ itemList: items, success: (res) => { const colorKeys = Object.keys(appStore.themeModel); appStore.currentTheme = colorKeys[res.tapIndex]; showToast2("主题已更换"); } }); } function adjustFontSize() { const items = Object.values(fontSizes); uni.showActionSheet({ itemList: items, success: (res) => { const sizeKeys = Object.keys(fontSizes); settings.value.fontSize = sizeKeys[res.tapIndex]; saveSettings(); showToast2("字体大小已调整"); } }); } function setAutoLock() { const items = Object.values(autoLockOptions); uni.showActionSheet({ itemList: items, success: (res) => { const lockKeys = Object.keys(autoLockOptions); settings.value.autoLock = Number.parseInt(lockKeys[res.tapIndex]); saveSettings(); showToast2("自动锁屏时间已设置"); } }); } function clearCache() { uni.showModal({ title: "清除缓存", content: `确定要清除 ${cacheSize.value} 的缓存数据吗?`, confirmText: "清除", cancelText: "取消", success: (res) => { if (res.confirm) { uni.showLoading({ title: "清除中..." }); setTimeout(() => { uni.hideLoading(); cacheSize.value = "0MB"; showToast2("缓存清除成功"); }, 2e3); } } }); } function viewStorageInfo() { showToast2("存储空间"); } function viewPrivacyPolicy() { showToast2("隐私政策"); } function checkUpdate() { uni.showLoading({ title: "检查中..." }); setTimeout(() => { uni.hideLoading(); if (hasUpdate.value) { uni.showModal({ title: "发现新版本", content: "发现新版本 1.3.0,是否立即更新?", confirmText: "更新", cancelText: "稍后", success: (res) => { if (res.confirm) { showToast2("开始下载更新"); } } }); } else { showToast2("已是最新版本"); } }, 1500); } function openHelpCenter() { router2.push("/contact"); } function submitFeedback() { router2.push("/contact"); } function aboutUs() { router2.push("/contact"); } function saveSettings() { uni.setStorageSync("app_settings", settings.value); } function showToast2(title, icon = "success") { uni.showToast({ title, icon }); } function loadSettings() { try { const savedSettings = uni.getStorageSync("app_settings"); if (savedSettings) { settings.value = { ...settings.value, ...savedSettings }; } } catch (error) { formatAppLog("log", "at pages/oldPage/preference/index.vue:208", "读取设置失败:", error); } } loadSettings(); const __returned__ = { appStore, router: router2, settings, storageUsed, storageTotal, cacheSize, hasUpdate, fontSizes, autoLockOptions, currentThemeColor, currentThemeText, fontSizeText, autoLockText, resetSettings, toggleSetting, selectThemeColor, adjustFontSize, setAutoLock, clearCache, viewStorageInfo, viewPrivacyPolicy, checkUpdate, openHelpCenter, submitFeedback, aboutUs, saveSettings, showToast: showToast2, loadSettings, get appVersion() { return appVersion; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) { const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "p-4" }, [ vue.createElementVNode("view", { class: "pb-4 text-center text-gray-500" }, " 以下部分内容仅为组件演示,暂无实际功能。 "), vue.createElementVNode("view", { class: "settings-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "i-carbon-paint-brush text-lg text-primary-500" }), vue.createElementVNode("view", { class: "card-title" }, " 显示与主题 ") ]), vue.createElementVNode("view", { class: "divide-y divide-gray-100" }, [ vue.createElementVNode("view", { class: "setting-item" }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-moon text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 深色模式 "), vue.createElementVNode("text", { class: "setting-desc" }, " 开启后界面将使用深色主题 ") ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("switch", { checked: $setup.settings.darkMode, color: $setup.currentThemeColor, onChange: _cache[0] || (_cache[0] = ($event) => $setup.toggleSetting("darkMode")) }, null, 40, ["checked", "color"]) ]) ]), vue.createElementVNode("view", { class: "setting-item", onClick: $setup.selectThemeColor }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-color-palette text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 主题色彩 "), vue.createElementVNode( "text", { class: "setting-desc" }, vue.toDisplayString($setup.currentThemeText), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode( "view", { class: "h-6 w-6 border-2 border-gray-200 rounded-full", style: vue.normalizeStyle({ backgroundColor: $setup.currentThemeColor }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "i-carbon-chevron-right ml-2 text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "setting-item", onClick: $setup.adjustFontSize }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-text-font text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 字体大小 "), vue.createElementVNode( "text", { class: "setting-desc" }, vue.toDisplayString($setup.fontSizeText), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]) ]) ]), vue.createElementVNode("view", { class: "settings-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "i-carbon-notification text-lg text-primary-500" }), vue.createElementVNode("view", { class: "card-title" }, " 通知设置 ") ]), vue.createElementVNode("view", { class: "divide-y divide-gray-100" }, [ vue.createElementVNode("view", { class: "setting-item" }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-notification-new text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 推送通知 "), vue.createElementVNode("text", { class: "setting-desc" }, " 接收应用推送消息 ") ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("switch", { checked: $setup.settings.pushNotification, color: $setup.currentThemeColor, onChange: _cache[1] || (_cache[1] = ($event) => $setup.toggleSetting("pushNotification")) }, null, 40, ["checked", "color"]) ]) ]), vue.createElementVNode("view", { class: "setting-item" }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-volume-up text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 声音提醒 "), vue.createElementVNode("text", { class: "setting-desc" }, " 消息到达时播放提示音 ") ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("switch", { checked: $setup.settings.soundAlert, color: $setup.currentThemeColor, onChange: _cache[2] || (_cache[2] = ($event) => $setup.toggleSetting("soundAlert")) }, null, 40, ["checked", "color"]) ]) ]), vue.createElementVNode("view", { class: "setting-item" }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-phone-vibrate text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 震动反馈 "), vue.createElementVNode("text", { class: "setting-desc" }, " 操作时提供震动反馈 ") ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("switch", { checked: $setup.settings.vibration, color: $setup.currentThemeColor, onChange: _cache[3] || (_cache[3] = ($event) => $setup.toggleSetting("vibration")) }, null, 40, ["checked", "color"]) ]) ]) ]) ]), vue.createElementVNode("view", { class: "settings-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "i-carbon-security text-lg text-primary-500" }), vue.createElementVNode("view", { class: "card-title" }, " 隐私与安全 ") ]), vue.createElementVNode("view", { class: "divide-y divide-gray-100" }, [ vue.createElementVNode("view", { class: "setting-item" }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-fingerprint-recognition text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 生物识别 "), vue.createElementVNode("text", { class: "setting-desc" }, " 使用指纹或面容解锁 ") ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("switch", { checked: $setup.settings.biometric, color: $setup.currentThemeColor, onChange: _cache[4] || (_cache[4] = ($event) => $setup.toggleSetting("biometric")) }, null, 40, ["checked", "color"]) ]) ]), vue.createElementVNode("view", { class: "setting-item", onClick: $setup.setAutoLock }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-locked text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 自动锁屏 "), vue.createElementVNode( "text", { class: "setting-desc" }, vue.toDisplayString($setup.autoLockText), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "setting-item", onClick: $setup.viewPrivacyPolicy }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-document text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 隐私协议 "), vue.createElementVNode("text", { class: "setting-desc" }, " 查看隐私政策和用户协议 ") ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]) ]) ]), vue.createElementVNode("view", { class: "settings-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "i-carbon-data-base text-lg text-primary-500" }), vue.createElementVNode("view", { class: "card-title" }, " 存储与缓存 ") ]), vue.createElementVNode("view", { class: "divide-y divide-gray-100" }, [ vue.createElementVNode("view", { class: "setting-item", onClick: $setup.viewStorageInfo }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-data-volume text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 存储空间 "), vue.createElementVNode( "text", { class: "setting-desc" }, " 已使用 " + vue.toDisplayString($setup.storageUsed) + ",共 " + vue.toDisplayString($setup.storageTotal), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "setting-item", onClick: $setup.clearCache }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-clean text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 清除缓存 "), vue.createElementVNode( "text", { class: "setting-desc" }, " 缓存大小:" + vue.toDisplayString($setup.cacheSize), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("view", { class: "rounded-full bg-red-50 px-3 py-1 text-sm text-red-500" }, " 清除 ") ]) ]), vue.createElementVNode("view", { class: "setting-item" }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-automatic text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 自动清理 "), vue.createElementVNode("text", { class: "setting-desc" }, " 定期自动清理临时文件 ") ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("switch", { checked: $setup.settings.autoClean, color: $setup.currentThemeColor, onChange: _cache[5] || (_cache[5] = ($event) => $setup.toggleSetting("autoClean")) }, null, 40, ["checked", "color"]) ]) ]) ]) ]), vue.createElementVNode("view", { class: "settings-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "i-carbon-information text-lg text-primary-500" }), vue.createElementVNode("view", { class: "card-title" }, " 关于与帮助 ") ]), vue.createElementVNode("view", { class: "divide-y divide-gray-100" }, [ vue.createElementVNode("view", { class: "setting-item", onClick: $setup.checkUpdate }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-application text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 版本信息 "), vue.createElementVNode( "text", { class: "setting-desc" }, " 当前版本 " + vue.toDisplayString($setup.appVersion), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ $setup.hasUpdate ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "rounded-full bg-red-500 px-2 py-1 text-xs text-white" }, " 有更新 ")) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "i-carbon-chevron-right ml-2 text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "setting-item", onClick: $setup.openHelpCenter }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-help text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 帮助中心 "), vue.createElementVNode("text", { class: "setting-desc" }, " 常见问题和使用指南 ") ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "setting-item", onClick: $setup.submitFeedback }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-chat text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 意见反馈 "), vue.createElementVNode("text", { class: "setting-desc" }, " 向我们反馈问题和建议 ") ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]), vue.createElementVNode("view", { class: "setting-item", onClick: $setup.aboutUs }, [ vue.createElementVNode("view", { class: "setting-label" }, [ vue.createElementVNode("view", { class: "i-carbon-favorite text-lg text-gray-400" }), vue.createElementVNode("view", { class: "setting-info" }, [ vue.createElementVNode("text", { class: "setting-title" }, " 关于我们 "), vue.createElementVNode("text", { class: "setting-desc" }, " 了解更多关于我们的信息 ") ]) ]), vue.createElementVNode("view", { class: "setting-control" }, [ vue.createElementVNode("view", { class: "i-carbon-chevron-right text-sm text-gray-400" }) ]) ]) ]) ]), vue.createElementVNode("view", { class: "mt-4" }, [ vue.createElementVNode("button", { class: "w-full flex items-center justify-center rounded-lg bg-primary-400 py-3 text-white font-medium transition-colors duration-200 active:bg-primary-600", "hover-class": "bg-primary-600", onClick: $setup.resetSettings }, [ vue.createElementVNode("view", { class: "i-carbon-reset mr-2 text-lg" }), vue.createTextVNode(" 重置设置 ") ]) ]) ]) ]), _: 1 /* STABLE */ }); } const PagesOldPagePreferenceIndex = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-48f00c31"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/oldPage/preference/index.vue"]]); const maxLength = 500; const _sfc_main$A = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const feedbackForm = vue.ref({ type: "功能建议", content: "", contact: "" }); const feedbackTypes = [ { label: "功能建议", value: "功能建议" }, { label: "问题反馈", value: "问题反馈" }, { label: "其他", value: "其他" } ]; const isSubmitting = vue.ref(false); function selectFeedbackType(type2) { feedbackForm.value.type = type2; } async function submitFeedback() { if (!feedbackForm.value.content.trim()) { await showToast({ title: "请填写反馈内容", icon: "none" }); return; } if (feedbackForm.value.content.trim().length < 10) { await showToast({ title: "反馈内容至少需要10个字符", icon: "none" }); return; } try { isSubmitting.value = true; await new Promise((resolve2) => setTimeout(resolve2, 1500)); await showToast({ title: "反馈提交成功", icon: "success" }); feedbackForm.value = { type: "功能建议", content: "", contact: "" }; setTimeout(() => { uni.navigateBack(); }, 1500); } catch (error) { await showToast({ title: "提交失败,请重试", icon: "error" }); } finally { isSubmitting.value = false; } } const contentLength = vue.computed(() => feedbackForm.value.content.length); const __returned__ = { feedbackForm, feedbackTypes, isSubmitting, selectFeedbackType, submitFeedback, contentLength, maxLength, get showToast() { return showToast; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) { const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "feedback-page h-full flex flex-col bg-gray-50" }, [ vue.createCommentVNode(" 页面头部 "), vue.createElementVNode("view", { class: "header-section relative" }, [ vue.createElementVNode("view", { class: "h-32 from-primary-400 to-primary-500 bg-gradient-to-br" }), vue.createElementVNode("view", { class: "absolute inset-0 flex items-center justify-center" }, [ vue.createElementVNode("view", { class: "text-center text-white" }, [ vue.createElementVNode("view", { class: "mb-2 text-2xl font-bold" }, " 意见反馈 "), vue.createElementVNode("view", { class: "text-sm text-white/80" }, " 您的建议是我们前进的动力 ") ]) ]) ]), vue.createCommentVNode(" 表单内容 "), vue.createElementVNode("view", { class: "form-section relative z-10 flex-1 px-4 -mt-4" }, [ vue.createElementVNode("view", { class: "overflow-hidden rounded-xl bg-white shadow-lg" }, [ vue.createCommentVNode(" 反馈类型选择 "), vue.createElementVNode("view", { class: "border-b border-gray-100 px-5 py-4" }, [ vue.createElementVNode("view", { class: "mb-3 text-base text-gray-800 font-medium" }, " 反馈类型 "), vue.createElementVNode("view", { class: "flex space-x-3" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.feedbackTypes, (type2) => { return vue.createElementVNode("view", { key: type2.value, class: vue.normalizeClass(["flex-1 rounded-lg border-2 px-3 py-2 text-center text-sm font-medium transition-all duration-200", [ $setup.feedbackForm.type === type2.value ? "border-primary-500 bg-primary-50 text-primary-600" : "border-gray-200 bg-gray-50 text-gray-600 active:bg-gray-100" ]]), onClick: ($event) => $setup.selectFeedbackType(type2.value) }, vue.toDisplayString(type2.label), 11, ["onClick"]); }), 64 /* STABLE_FRAGMENT */ )) ]) ]), vue.createCommentVNode(" 反馈内容 "), vue.createElementVNode("view", { class: "border-b border-gray-100 px-5 py-4" }, [ vue.createElementVNode("view", { class: "mb-3 flex items-center justify-between" }, [ vue.createElementVNode("view", { class: "text-base text-gray-800 font-medium" }, [ vue.createTextVNode(" 反馈内容 "), vue.createElementVNode("text", { class: "text-red-500" }, " * ") ]), vue.createElementVNode( "view", { class: "text-xs text-gray-400" }, vue.toDisplayString($setup.contentLength) + "/" + vue.toDisplayString($setup.maxLength), 1 /* TEXT */ ) ]), vue.withDirectives(vue.createElementVNode( "textarea", { "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.feedbackForm.content = $event), class: "w-full resize-none rounded-lg border border-gray-200 bg-gray-50 px-3 py-3 text-sm text-gray-700 placeholder-gray-400 transition-colors duration-200 focus:border-primary-500 focus:bg-white focus:outline-none", placeholder: "请详细描述您的问题或建议,我们会认真对待每一条反馈...", maxlength: $setup.maxLength, rows: "6" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $setup.feedbackForm.content] ]) ]), vue.createCommentVNode(" 联系方式 "), vue.createElementVNode("view", { class: "px-5 py-4" }, [ vue.createElementVNode("view", { class: "mb-3 text-base text-gray-800 font-medium" }, [ vue.createTextVNode(" 联系方式 "), vue.createElementVNode("text", { class: "text-xs text-gray-400 font-normal" }, " (选填) ") ]), vue.withDirectives(vue.createElementVNode( "input", { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.feedbackForm.contact = $event), class: "w-full h-9 rounded-lg border border-gray-200 bg-gray-50 px-3 text-sm text-gray-700 placeholder-gray-400 transition-colors duration-200 focus:border-primary-500 focus:bg-white focus:outline-none", placeholder: "请输入联系方式", type: "text" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $setup.feedbackForm.contact] ]) ]) ]), vue.createCommentVNode(" 提交按钮 "), vue.createElementVNode("view", { class: "mt-6 px-2" }, [ vue.createElementVNode("button", { class: vue.normalizeClass(["w-full rounded-xl from-primary-500 to-primary-400 bg-gradient-to-r px-6 py-4 font-semibold shadow-lg transition-all duration-200 active:scale-98 disabled:cursor-not-allowed !text-white disabled:opacity-70", { "shadow-xl": !$setup.isSubmitting }]), disabled: $setup.isSubmitting || !$setup.feedbackForm.content.trim(), onClick: $setup.submitFeedback }, [ vue.createElementVNode("view", { class: "flex items-center justify-center space-x-2" }, [ $setup.isSubmitting ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "i-carbon-fade h-5 w-5 animate-spin" })) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "i-carbon-send h-5 w-5" })), vue.createElementVNode( "text", null, vue.toDisplayString($setup.isSubmitting ? "提交中..." : "提交反馈"), 1 /* TEXT */ ) ]) ], 10, ["disabled"]) ]), vue.createCommentVNode(" 温馨提示 "), vue.createElementVNode("view", { class: "mt-4 rounded-lg bg-blue-50 p-4" }, [ vue.createElementVNode("view", { class: "flex items-start space-x-2" }, [ vue.createElementVNode("view", { class: "i-carbon-information mt-0.5 h-4 w-4 flex-shrink-0 text-primary-500" }), vue.createElementVNode("view", { class: "text-xs text-primary-600 leading-relaxed" }, [ vue.createElementVNode("view", { class: "mb-1 font-medium" }, " 温馨提示: "), vue.createElementVNode("view", null, "• 我们会在1-3个工作日内回复您的反馈"), vue.createElementVNode("view", null, '• 如需紧急处理,请通过"联系我们"页面联系客服'), vue.createElementVNode("view", null, "• 您的隐私信息将得到严格保护") ]) ]) ]) ]) ]) ]), _: 1 /* STABLE */ }); } const PagesOldPageFeedbackIndex = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-ef1844d7"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/oldPage/feedback/index.vue"]]); const _sfc_main$z = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const dataList = vue.ref([]); const loading = vue.ref(true); function onQuery() { loading.value = true; getActivity({ type: 3 }).then((res) => { dataList.value = res.data.list || []; loading.value = false; }).catch((err) => { formatAppLog("error", "at pages/WorkModule/my/promotion/index.vue:69", "获取活动失败", err); dataList.value = []; loading.value = false; }); } function goDetail(item) { uni.navigateTo({ url: `/pages/WorkModule/my/promotion/detail/index?id=${item.id}` }); } vue.onMounted(() => { onQuery(); }); const __returned__ = { t: t2, dataList, loading, onQuery, goDetail, get useI18n() { return useI18n; }, get getActivity() { return getActivity; }, onMounted: vue.onMounted, ref: vue.ref }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_skeleton = __unplugin_components_0$3; const _component_u_image = __unplugin_components_1$1; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": "优惠活动" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { style: { "padding": "10px", "box-sizing": "border-box" } }, [ vue.createElementVNode( "scroll-view", { "scroll-y": "", onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => { }, ["stop", "prevent"])), style: { "height": "calc(100vh - 100px - env(safe-area-inset-bottom) - env(safe-area-inset-top))" } }, [ vue.createCommentVNode(" 骨架屏 - 加载中显示多个卡片骨架 "), $setup.loading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(6, (n) => { return vue.createElementVNode("view", { class: "promotion-item", key: n }, [ vue.createVNode(_component_u_skeleton, { loading: true, animate: true, rows: "1", title: "", "title-width": 260, "title-height": 18 }) ]); }), 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 真实内容 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.dataList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "promotion-item", key: index, onClick: ($event) => $setup.goDetail(item) }, [ vue.createVNode(_component_u_image, { class: "rounded-lg", src: item.detail_image, width: "100%", height: "100%", mode: "aspectFill", "lazy-load": true, fade: true }, null, 8, ["src"]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { style: { "height": "50px" } }) ], 64 /* STABLE_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyPromotionIndex = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-e55816c5"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/promotion/index.vue"]]); const _sfc_main$y = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const content = vue.ref(); const id = vue.ref(); onLoad((val) => { id.value = val.id; getActivityDetail({ id: id.value }).then((res) => { content.value = res.data.content.replace(/</g, "<").replace(/>/g, ">").replace(/ /g, " ").replace(/&/g, "&").replace(/"/g, '"').replace(/<\/?p[^>]*>/gi, "").replace(/<\/?br[^>]*>/gi, ""); }); }); const __returned__ = { content, id, get getActivityDetail() { return getActivityDetail; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) { const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": "优惠活动详情" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { style: { "overflow-y": "auto", "height": "100%" } }, [ vue.createElementVNode("view", { innerHTML: $setup.content }, null, 8, ["innerHTML"]) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyPromotionDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/promotion/detail/index.vue"]]); const routes = [ { "path": "/pages/Tabbar/Home/index", "aliasPath": "/", "name": "index" }, { "path": "/pages/Tabbar/RollingBall/index", "aliasPath": "/RollingBall", "name": "RollingBall" }, { "path": "/pages/Tabbar/SportsBetting/index", "aliasPath": "/SportsBetting", "name": "SportsBetting" }, { "path": "/pages/Tabbar/WorldCup/index", "aliasPath": "/WorldCup", "name": "WorldCup" }, { "path": "/pages/Tabbar/Entertainment/index", "aliasPath": "/Entertainment", "name": "Entertainment" }, { "path": "/pages/Tabbar/BettingHistory/index", "aliasPath": "/BettingHistory", "name": "BettingHistory" }, { "path": "/pages/Tabbar/My/index", "aliasPath": "/My", "name": "My" }, { "path": "/pages/Tabbar/Entertainment/components/Digital/detail", "aliasPath": "/DigitalDetail", "name": "DigitalDetail" }, { "path": "/pages/login/index", "aliasPath": "/login", "name": "login" }, { "path": "/pages/register/index", "aliasPath": "/register", "name": "register" }, { "path": "/pages/setAccount/index", "aliasPath": "/setAccount", "name": "setAccount" }, { "path": "/pages/index/example/index", "aliasPath": "/example", "name": "example" }, { "path": "/pages/index/user/index", "aliasPath": "/user", "name": "user" }, { "path": "/pages/common/web-view/index", "aliasPath": "/web-view", "name": "web-view" }, { "path": "/pages/common/rich-view/index", "aliasPath": "/rich-view", "name": "rich-view" }, { "path": "/pages/tips/middleware/index", "aliasPath": "/tips-middleware", "name": "tips-middleware", "meta": { "middleware": [ "test" ] } }, { "path": "/pages/template/paging/index", "aliasPath": "/template-paging", "name": "template-paging" }, { "path": "/pages/oldPage/personal/index", "aliasPath": "/personal", "name": "personal" }, { "path": "/pages/oldPage/contact/index", "aliasPath": "/contact", "name": "contact" }, { "path": "/pages/oldPage/preference/index", "aliasPath": "/preference", "name": "preference" }, { "path": "/pages/oldPage/feedback/index", "aliasPath": "/feedback", "name": "feedback" }, { "path": "/pages/WorkModule/my/promotion/index", "aliasPath": "/promotion", "name": "promotion" }, { "path": "/pages/WorkModule/my/promotion/detail/index", "aliasPath": "/promotionDetail", "name": "promotionDetail" }, { "path": "/pages/WorkModule/my/safety/index", "aliasPath": "/safety", "name": "safety" }, { "path": "/pages/WorkModule/my/userInfo/index", "aliasPath": "/userInfo", "name": "userInfo" }, { "path": "/pages/WorkModule/my/topUp/index", "aliasPath": "/topUp", "name": "topUp" }, { "path": "/pages/WorkModule/my/rechargeRecord/index", "aliasPath": "/rechargeRecord", "name": "rechargeRecord" }, { "path": "/pages/WorkModule/my/withdraw/index", "aliasPath": "/withdraw", "name": "withdraw" }, { "path": "/pages/WorkModule/my/withdrawalHistory/index", "aliasPath": "/withdrawalHistory", "name": "withdrawalHistory" }, { "path": "/pages/WorkModule/my/Yuebao/index", "aliasPath": "/Yuebao", "name": "Yuebao" }, { "path": "/pages/WorkModule/my/Yuebao/itemList", "aliasPath": "/YuebaoItemList", "name": "YuebaoItemList" }, { "path": "/pages/WorkModule/my/WalletManagement/index", "aliasPath": "/WalletManagement", "name": "WalletManagement" }, { "path": "/pages/WorkModule/my/changePassword/index", "aliasPath": "/changePassword", "name": "changePassword" }, { "path": "/pages/WorkModule/my/changeFundPassword/index", "aliasPath": "/changeFundPassword", "name": "changeFundPassword" }, { "path": "/pages/WorkModule/my/fundRecord/index", "aliasPath": "/fundRecord", "name": "fundRecord" }, { "path": "/pages/common/betSlip/index", "aliasPath": "/betSlip", "name": "betSlip" }, { "path": "/pages/common/customerService/index", "aliasPath": "/customerService", "name": "customerService" }, { "path": "/pages/WorkModule/bettingHistory/bettingDetail/index", "aliasPath": "/bettingDetail", "name": "bettingDetail" }, { "path": "/pages/common/sportDetail/index", "aliasPath": "/sportDetail", "name": "sportDetail" }, { "path": "/pages/Tabbar/Entertainment/view/PC28/index", "aliasPath": "/PC28", "name": "PC28" }, { "path": "/pages/Tabbar/Entertainment/view/ExtremeSpeed28/index", "aliasPath": "/ExtremeSpeed28", "name": "ExtremeSpeed28" }, { "path": "/pages/Tabbar/Entertainment/view/Digital/index", "aliasPath": "/Digital", "name": "Digital" }, { "path": "/pages/Tabbar/Entertainment/view/NewDigital/index", "aliasPath": "/NewDigital", "name": "NewDigital" }, { "path": "/pages/Tabbar/Entertainment/view/SpeedDigital/index", "aliasPath": "/SpeedDigital", "name": "SpeedDigital" }, { "path": "/pages/Tabbar/Entertainment/view/HKDigital/index", "aliasPath": "/HKDigital", "name": "HKDigital" }, { "path": "/pages/Tabbar/Entertainment/view/history/index", "aliasPath": "/history", "name": "history" }, { "path": "/pages/Tabbar/Entertainment/view/Pc28BettingHistory/index", "aliasPath": "/Pc28BettingHistory", "name": "Pc28BettingHistory" }, { "path": "/pages/common/AllHistory/index", "aliasPath": "/AllHistory", "name": "AllHistory" }, { "path": "/pages/common/PC28Rule/index", "aliasPath": "/PC28Rule", "name": "PC28Rule" }, { "path": "/pages/WorkModule/Entertainment/Detail/index", "aliasPath": "/EntertainmentDetail", "name": "EntertainmentDetail" } ]; function login(router2) { router2.beforeEach((to, from, next) => { next(); }); router2.afterEach(() => { }); } function test(router2) { router2.beforeEach((to, from, next) => { uni.showModal({ title: "提示", content: "触发了路由中间件,是否允许通过?", success: (res) => { if (res.cancel) { next(false); } else { next(); } } }); }); router2.afterEach(() => { }); } function permission(router2) { login(router2); defineMiddleware("test", test, { router: router2 }); } const router = createRouter({ routes: [...routes] }); permission(router); const _sfc_main$x = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const showModal2 = vue.ref(false); const handleConfirmDelete = () => { deleteAccount().then(() => { showModal2.value = false; uni.clearStorageSync(); router.replaceAll({ name: "login" }); }).catch(() => { showModal2.value = false; }); }; const goPage = (name) => { router.push({ name }); }; const __returned__ = { showModal: showModal2, handleConfirmDelete, goPage, ref: vue.ref, get deleteAccount() { return deleteAccount; }, get router() { return router; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_cell_item = __unplugin_components_3; const _component_u_cell_group = __unplugin_components_4$1; const _component_u_modal = __unplugin_components_4$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": "安全" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "content" }, [ vue.createVNode(_component_u_cell_group, { border: false }, { default: vue.withCtx(() => [ vue.createCommentVNode(" 修改密码 "), vue.createVNode(_component_u_cell_item, { title: _ctx.$t("修改密码"), icon: "lock", onClick: _cache[0] || (_cache[0] = ($event) => $setup.goPage("changePassword")) }, null, 8, ["title"]), vue.createCommentVNode(" 修改资金密码 "), vue.createVNode(_component_u_cell_item, { title: _ctx.$t("修改资金密码"), icon: "lock", onClick: _cache[1] || (_cache[1] = ($event) => $setup.goPage("changeFundPassword")) }, null, 8, ["title"]), vue.createCommentVNode(" 注销账号 "), vue.createVNode(_component_u_cell_item, { title: _ctx.$t("注销账号"), icon: "man-add-fill", onClick: _cache[2] || (_cache[2] = ($event) => $setup.showModal = true) }, null, 8, ["title"]) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(" 注销确认模态框 "), vue.createVNode(_component_u_modal, { modelValue: $setup.showModal, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.showModal = $event), title: _ctx.$t("提示"), content: _ctx.$t("是否注销账户,注销账户后,系统将删除清空账户"), "show-cancel-button": true, "confirm-text": _ctx.$t("确认"), "cancel-text": _ctx.$t("取消"), "confirm-color": "#f8b932", "async-close": true, onConfirm: $setup.handleConfirmDelete }, null, 8, ["modelValue", "title", "content", "confirm-text", "cancel-text"]) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMySafetyIndex = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/safety/index.vue"]]); const _sfc_main$w = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const userInfo = vue.ref({}); const showModal2 = vue.ref(false); const submitLoading = vue.ref(false); const editForm = vue.ref({ phone: "", email: "" }); const btnStyle = { color: "#333", fontWeight: "600" }; onShow(() => { fetchUserData(); }); const fetchUserData = async () => { try { const res = await getUserInfo(); if (res.code === 1) { const data = res.data; userInfo.value = data; } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/userInfo/index.vue:166", "获取用户信息失败", error); } }; const openEditModal = () => { editForm.value.phone = userInfo.value.phone || ""; editForm.value.email = userInfo.value.email || ""; showModal2.value = true; }; const closeModal = () => { showModal2.value = false; }; const handleConfirm = async () => { if (submitLoading.value) return; submitLoading.value = true; const params = { phone: editForm.value.phone, email: editForm.value.email }; try { const res = await updateUserInfo(params); if (res.code === 1) { showModal2.value = false; fetchUserData(); } else { } } catch (error) { } finally { submitLoading.value = false; } }; const copyText = (text) => { if (!text) return; uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "复制成功", icon: "none" }); } }); }; const __returned__ = { userInfo, showModal: showModal2, submitLoading, editForm, btnStyle, fetchUserData, openEditModal, closeModal, handleConfirm, copyText, ref: vue.ref, get onShow() { return onShow; }, get getUserInfo() { return getUserInfo; }, get updateUserInfo() { return updateUserInfo; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_input = __unplugin_components_3$2; const _component_u_popup = __unplugin_components_2$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": "个人资料" }, { navBarRight: vue.withCtx(() => [ vue.createElementVNode("view", { class: "nav-btn", onClick: $setup.openEditModal }, [ vue.createVNode(_component_u_icon, { name: "edit-pen", size: "28" }) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "profile-page" }, [ vue.createCommentVNode(" 1. 账户卡片 "), vue.createElementVNode("view", { class: "info-card" }, [ vue.createElementVNode( "view", { class: "card-title" }, vue.toDisplayString(_ctx.$t("账户")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("名称")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "value" }, vue.toDisplayString($setup.userInfo.first_name || "-"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("性别")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "value" }, vue.toDisplayString($setup.userInfo.sex === 2 ? _ctx.$t("未知") : $setup.userInfo.sex === 1 ? _ctx.$t("男") : _ctx.$t("女")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("账户号码")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "value-box", onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyText($setup.userInfo.account)) }, [ vue.createVNode(_component_u_icon, { name: "file-text-fill", color: "#666", class: "m-r-10" }), vue.createElementVNode( "text", { class: "value bold" }, vue.toDisplayString($setup.userInfo.account || "-"), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("您的密码")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "value" }, vue.toDisplayString($setup.userInfo.has_password ? "********" : _ctx.$t("未设置")), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 2. 联系方式 "), vue.createElementVNode("view", { class: "info-card" }, [ vue.createElementVNode( "view", { class: "card-title" }, vue.toDisplayString(_ctx.$t("联系方式")), 1 /* TEXT */ ), vue.createCommentVNode(" 电话 "), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode("view", { class: "label-box" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("电话")), 1 /* TEXT */ ), !$setup.userInfo.phone ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "not-provided" }, "(" + vue.toDisplayString(_ctx.$t("未提供")) + ")", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "value-box" }, [ $setup.userInfo.phone ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "value m-r-10" }, vue.toDisplayString($setup.userInfo.phone), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_icon, { name: "edit-pen", size: "28", color: "#999" }) ]) ]), vue.createCommentVNode(" 邮箱 "), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode("view", { class: "label-box" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("电子邮箱")), 1 /* TEXT */ ), !$setup.userInfo.email ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "not-provided" }, "(" + vue.toDisplayString(_ctx.$t("未提供")) + ")", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "value-box" }, [ $setup.userInfo.email ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "value m-r-10" }, vue.toDisplayString($setup.userInfo.email), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_icon, { name: "edit-pen", size: "28", color: "#999" }) ]) ]) ]), vue.createCommentVNode(" 3. 个人信息 "), vue.createCommentVNode(` {{ $t('个人信息') }} {{ $t('名字') }} {{ userInfo.first_name || '-' }} `), vue.createCommentVNode(" 底部操作按钮 "), vue.createElementVNode("view", { class: "bottom-action" }, [ vue.createVNode(_component_u_button, { type: "primary", "custom-style": $setup.btnStyle, onClick: $setup.openEditModal }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("编辑")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), vue.createCommentVNode(" 编辑弹窗修正版 "), vue.createCommentVNode(" 1. 使用 v-model 绑定显示状态 "), vue.createCommentVNode(" 2. 使用 border-radius 设置圆角 "), vue.createCommentVNode(" 3. 使用 width 设置宽度 "), vue.createVNode(_component_u_popup, { modelValue: $setup.showModal, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.showModal = $event), mode: "center", "border-radius": "24", width: "620rpx", closeable: true, onClose: $setup.closeModal }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "edit-popup" }, [ vue.createElementVNode( "view", { class: "popup-title" }, vue.toDisplayString(_ctx.$t("修改联系方式")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode( "text", { class: "form-label" }, vue.toDisplayString(_ctx.$t("电话")), 1 /* TEXT */ ), vue.createVNode(_component_u_input, { modelValue: $setup.editForm.phone, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.editForm.phone = $event), placeholder: _ctx.$t("请输入电话号码"), clearable: "", border: "" }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode( "text", { class: "form-label" }, vue.toDisplayString(_ctx.$t("电子邮箱")), 1 /* TEXT */ ), vue.createVNode(_component_u_input, { modelValue: $setup.editForm.email, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.editForm.email = $event), placeholder: _ctx.$t("请输入电子邮箱"), border: "", clearable: "" }, null, 8, ["modelValue", "placeholder"]) ]), vue.createElementVNode("view", { class: "popup-btns" }, [ vue.createVNode(_component_u_button, { class: "cancel-btn", onClick: $setup.closeModal }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("取消")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_button, { class: "confirm-btn", type: "primary", color: "#f8b932", loading: $setup.submitLoading, onClick: $setup.handleConfirm }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("保存")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["loading"]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyUserInfoIndex = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-fa4f7792"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/userInfo/index.vue"]]); const _sfc_main$v = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const router2 = useRouter(); const CUploadImageRef = vue.ref(); const channelList = vue.ref([]); const currentChannel = vue.ref(null); const amount2 = vue.ref(""); const uploadFileUrl = vue.ref(""); const payResult = vue.ref(null); const usdtRate = vue.ref(""); const trc20Address = vue.ref(""); const erc20Address = vue.ref(""); const showThirdPayment = vue.ref("0"); const selectedNetwork = vue.ref(""); const usdtQrcode = vue.ref(""); const usdtAddress = vue.ref(""); const receivingType = vue.ref(""); const rgczMethods = [ { label: "微信", value: 1 }, { label: "支付宝", value: 2 }, { label: "银行卡", value: 3 } ]; const selectedRgczMethod = vue.ref(""); const changeImg = (e) => { uploadFileUrl.value = Array.isArray(e) ? e[0] : e; }; const selectChannel = (item) => { currentChannel.value = item; amount2.value = ""; selectedNetwork.value = ""; usdtQrcode.value = ""; usdtAddress.value = ""; uploadFileUrl.value = ""; payResult.value = null; selectedRgczMethod.value = ""; if (item.isUsdt) { if (trc20Address.value) { selectNetwork("trc20"); } else if (erc20Address.value) { selectNetwork("erc20"); } } }; const selectFixedAmount = (val) => { amount2.value = val; }; const selectNetwork = (network) => { selectedNetwork.value = network; getScanQrcode(); }; const copyAddress = () => { if (!usdtAddress.value) return; uni.setClipboardData({ data: usdtAddress.value, success: () => { uni.showToast({ title: t2("复制成功"), icon: "none" }); } }); }; const copyPayUrl = (url2) => { if (!url2) return; uni.setClipboardData({ data: url2, success: () => { uni.showToast({ title: t2("复制成功"), icon: "none" }); } }); }; const openPayUrl = (url2) => { if (!url2) return; router2.push({ name: "web-view", query: { src: url2 } }); }; const submitRecharge = async () => { if (!currentChannel.value) return uni.showToast({ title: t2("请选择支付方式"), icon: "none" }); if (currentChannel.value.isUsdt) { if (!amount2.value) return uni.showToast({ title: t2("请输入充值数量"), icon: "none" }); if (!selectedNetwork.value) return uni.showToast({ title: t2("请选择网络类型"), icon: "none" }); if (!uploadFileUrl.value) return uni.showToast({ title: t2("请上传支付凭证"), icon: "none" }); uni.showLoading({ title: t2("提交中...") }); uni.request({ url: apiUrl + "wallet/recharge", method: "POST", data: { amount: amount2.value, image: uploadFileUrl.value, net: selectedNetwork.value, toAddress: selectedNetwork.value === "trc20" ? trc20Address.value : erc20Address.value }, header: { Authorization: uni.getStorageSync("token"), lang: locale.value }, success: (res) => { uni.hideLoading(); if (res.data.code === 0) { uni.showToast({ title: res.data.msg || t2("提交成功"), icon: "success" }); amount2.value = ""; selectedNetwork.value = ""; uploadFileUrl.value = ""; usdtQrcode.value = ""; usdtAddress.value = ""; CUploadImageRef.value.clear(); } else { uni.showToast({ title: res.data.msg || t2("提交失败"), icon: "none" }); } }, fail: (err) => { uni.hideLoading(); uni.showToast({ title: t2("网络错误"), icon: "none" }); } }); return; } if (currentChannel.value.value === "rgcz") { if (!amount2.value) return uni.showToast({ title: t2("请输入或选择充值金额"), icon: "none" }); if (!selectedRgczMethod.value) return uni.showToast({ title: t2("请选择支付方式"), icon: "none" }); uni.showLoading({ title: t2("提交中...") }); uni.request({ url: apiUrl + "wallet/paymentOrder", method: "POST", data: { payment_type: selectedRgczMethod.value, amount: amount2.value }, header: { Authorization: uni.getStorageSync("token"), lang: locale.value }, success: (res) => { uni.hideLoading(); if (res.data.code === 0) { uni.showToast({ title: res.data.msg || t2("提交成功"), icon: "success" }); amount2.value = ""; selectedRgczMethod.value = ""; } else { uni.showToast({ title: res.data.msg || t2("提交失败"), icon: "none" }); } }, fail: (err) => { uni.hideLoading(); uni.showToast({ title: t2("网络错误"), icon: "none" }); } }); return; } if (!amount2.value) return uni.showToast({ title: t2("请输入或选择充值金额"), icon: "none" }); uni.showLoading({ title: t2("提交中...") }); uni.request({ url: apiUrl + "wallet/createPay", method: "POST", data: { payment_type: currentChannel.value.config.type, amount: amount2.value }, header: { Authorization: uni.getStorageSync("token"), lang: locale.value }, success: (res) => { uni.hideLoading(); if (res.data.code === 0) { uni.showToast({ title: res.data.msg || t2("提交成功"), icon: "success" }); payResult.value = res.data.data; } else { uni.showToast({ title: res.data.msg || t2("提交失败"), icon: "none" }); } }, fail: (err) => { uni.hideLoading(); uni.showToast({ title: t2("网络错误"), icon: "none" }); } }); }; const getData = async () => { try { const configData = await getConfigIndex(); if (configData && configData.data) { formatAppLog("log", "at pages/WorkModule/my/topUp/index.vue:377", configData, 266); configData.data.forEach((item) => { if (item.field === "exchange_rate_rmb") usdtRate.value = item.val; if (item.field === "receiving_address") trc20Address.value = item.val; if (item.field === "receiving_address_erc20") erc20Address.value = item.val; if (item.field === "three_payment_switch") showThirdPayment.value = item.val; if (item.field === "receiving_type") receivingType.value = item.val; }); } channelList.value = []; const res = await getChannel(); if (res && res.data && res.data.list) { channelList.value = res.data.list.map((item) => { if (item.value === "usdt" || item.type === "usdt" || item.isUsdt) { item.isUsdt = true; } return item; }); } if (channelList.value.length > 0) { selectChannel(channelList.value[0]); } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/topUp/index.vue:405", error); } }; function getChannel() { return new Promise((resolve2, reject) => { uni.request({ url: apiUrl + "wallet/channel", method: "GET", success: (res) => resolve2(res.data), fail: (err) => reject(err), header: { Authorization: uni.getStorageSync("token"), lang: locale.value } }); }); } function getScanQrcode() { uni.showLoading({ title: t2("获取中...") }); uni.request({ url: apiUrl + "wallet/scan", method: "GET", data: { type: selectedNetwork.value }, header: { Authorization: uni.getStorageSync("token"), lang: locale.value }, success: (res) => { uni.hideLoading(); if (res.data && res.data.code === 0 && res.data.data) { usdtQrcode.value = res.data.data.qrcode; usdtAddress.value = res.data.data.address; } else { uni.showToast({ title: res.data.msg || t2("获取二维码失败"), icon: "none" }); } }, fail: (err) => { var _a2; uni.hideLoading(); uni.showToast({ title: ((_a2 = err.data) == null ? void 0 : _a2.msg) || t2("网络错误"), icon: "none" }); } }); } onLoad(() => { getData(); }); const __returned__ = { t: t2, locale, router: router2, CUploadImageRef, channelList, currentChannel, amount: amount2, uploadFileUrl, payResult, usdtRate, trc20Address, erc20Address, showThirdPayment, selectedNetwork, usdtQrcode, usdtAddress, receivingType, rgczMethods, selectedRgczMethod, changeImg, selectChannel, selectFixedAmount, selectNetwork, copyAddress, copyPayUrl, openPayUrl, submitRecharge, getData, getChannel, getScanQrcode, ref: vue.ref, watch: vue.watch, reactive: vue.reactive, get useI18n() { return useI18n; }, get onLoad() { return onLoad; }, get recharge() { return recharge; }, get getConfigIndex() { return getConfigIndex; }, CUploadImage, get apiUrl() { return apiUrl; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": "充值" }, { navBarRight: vue.withCtx(() => [ vue.createElementVNode("view", { class: "nav-btn", onClick: _cache[0] || (_cache[0] = ($event) => $setup.router.push({ name: "rechargeRecord" })) }, [ vue.createVNode(_component_u_icon, { name: "clock", size: "36" }) ]) ]), default: vue.withCtx(() => { var _a2; return [ vue.createElementVNode("view", { class: "page-body" }, [ vue.createElementVNode("scroll-view", { "scroll-y": "", class: "main-scroll", style: { "height": "100%" } }, [ !$setup.payResult ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode("view", { class: "section" }, [ vue.createElementVNode( "view", { class: "section-title" }, vue.toDisplayString(_ctx.$t("选择支付方式")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "channel-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.channelList, (item, index) => { var _a3; return vue.openBlock(), vue.createElementBlock("view", { key: index, class: vue.normalizeClass(["channel-item", { active: ((_a3 = $setup.currentChannel) == null ? void 0 : _a3.value) === item.value }]), onClick: ($event) => $setup.selectChannel(item) }, vue.toDisplayString(item.label), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), $setup.currentChannel && $setup.currentChannel.isUsdt ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "section" }, [ $setup.receivingType !== "1" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { class: "section-title" }, vue.toDisplayString(_ctx.$t("充值金额")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "amount-input-box", style: { "margin-bottom": "20rpx" } }, [ vue.createElementVNode("text", { class: "currency" }, "$"), vue.withDirectives(vue.createElementVNode("input", { type: "digit", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.amount = $event), class: "amount-input", placeholder: _ctx.$t("请输入充值数量") }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.amount] ]) ]) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $setup.usdtRate ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "rate-tip" }, vue.toDisplayString(_ctx.$t("当前汇率 (USDT/RMB)")) + ": " + vue.toDisplayString($setup.usdtRate), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "network-section" }, [ vue.createElementVNode( "view", { class: "network-title" }, vue.toDisplayString(_ctx.$t("网络类型")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "network-list" }, [ $setup.trc20Address ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["network-item", { active: $setup.selectedNetwork === "trc20" }]), onClick: _cache[2] || (_cache[2] = ($event) => $setup.selectNetwork("trc20")) }, " TRC20 ", 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), $setup.erc20Address ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["network-item", { active: $setup.selectedNetwork === "erc20" }]), onClick: _cache[3] || (_cache[3] = ($event) => $setup.selectNetwork("erc20")) }, " ERC20 ", 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ]) ]), $setup.usdtQrcode ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ vue.createElementVNode("view", { class: "qrcode-box" }, [ vue.createElementVNode("image", { src: $setup.usdtQrcode, mode: "aspectFit", class: "qrcode-img" }, null, 8, ["src"]) ]), $setup.usdtAddress ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "address-box" }, [ vue.createElementVNode( "text", { class: "address-text" }, vue.toDisplayString($setup.usdtAddress), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "copy-btn", onClick: $setup.copyAddress }, vue.toDisplayString(_ctx.$t("复制")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $setup.receivingType !== "1" ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "network-section", style: { "margin-top": "40rpx" } }, [ vue.createElementVNode( "view", { class: "network-title" }, vue.toDisplayString(_ctx.$t("上传支付凭证")), 1 /* TEXT */ ), vue.createVNode( $setup["CUploadImage"], { ref: "CUploadImageRef", onChange: $setup.changeImg }, null, 512 /* NEED_PATCH */ ) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), $setup.currentChannel && !$setup.currentChannel.isUsdt ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "section" }, [ vue.createElementVNode( "view", { class: "section-title" }, vue.toDisplayString(_ctx.$t("充值金额")), 1 /* TEXT */ ), $setup.currentChannel.config.fixed ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "amount-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.currentChannel.config.fixed, (val, index) => { return vue.openBlock(), vue.createElementBlock("view", { key: index, class: vue.normalizeClass(["amount-item", { active: $setup.amount === val }]), onClick: ($event) => $setup.selectFixedAmount(val) }, " ¥" + vue.toDisplayString(val), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "amount-input-box" }, [ vue.createElementVNode("text", { class: "currency" }, "¥"), vue.withDirectives(vue.createElementVNode("input", { type: "digit", "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.amount = $event), class: "amount-input", placeholder: _ctx.$t("限额") + ` ${$setup.currentChannel.config.min} - ${$setup.currentChannel.config.max}` }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.amount] ]) ])), $setup.currentChannel.value === "rgcz" ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "network-section" }, [ vue.createElementVNode( "view", { class: "network-title" }, vue.toDisplayString(_ctx.$t("支付方式")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "network-list" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.rgczMethods, (method2) => { return vue.createElementVNode("view", { key: method2.value, class: vue.normalizeClass(["network-item", { active: $setup.selectedRgczMethod === method2.value }]), onClick: ($event) => $setup.selectedRgczMethod = method2.value }, vue.toDisplayString(method2.label), 11, ["onClick"]); }), 64 /* STABLE_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $setup.payResult ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "section result-section" }, [ vue.createElementVNode("view", { class: "qrcode-box", style: { "margin-top": "0", "margin-bottom": "40rpx" } }, [ vue.createElementVNode("image", { src: $setup.payResult.image, mode: "aspectFit", class: "qrcode-img" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "result-text-box" }, [ vue.createElementVNode( "view", { class: "result-line" }, vue.toDisplayString($setup.currentChannel.label) + "扫码充值确认", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "result-line" }, "请使用浏览器扫码或者复制支付地址到浏览器打开"), vue.createElementVNode("view", { class: "result-line", style: { "display": "flex", "align-items": "center", "justify-content": "space-between" } }, [ vue.createElementVNode("view", { style: { "flex": "1" } }, [ vue.createTextVNode(" 支付地址:"), vue.createElementVNode( "text", { class: "link-text", onClick: _cache[5] || (_cache[5] = ($event) => $setup.openPayUrl($setup.payResult.url)) }, vue.toDisplayString($setup.payResult.url), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "copy-btn", style: { "margin-left": "20rpx", "flex-shrink": "0" }, onClick: _cache[6] || (_cache[6] = ($event) => $setup.copyPayUrl($setup.payResult.url)) }, vue.toDisplayString(_ctx.$t("复制")), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "result-line" }, "支付金额:" + vue.toDisplayString($setup.amount) + " RMB", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "result-line" }, "请按实际支付金额进行付款,否则影响到账"), vue.createElementVNode("view", { class: "result-line" }, "支付完成后请耐心等待,支付到账会第一时间通知您!") ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "bottom-placeholder" }) ]), !$setup.payResult && !(((_a2 = $setup.currentChannel) == null ? void 0 : _a2.isUsdt) && $setup.receivingType === "1") ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "fixed-submit-section" }, [ vue.createVNode(_component_u_button, { type: "primary", onClick: $setup.submitRecharge, class: "submit-btn", "custom-style": { backgroundColor: "#f8b932", borderColor: "#f8b932", color: "#000", fontWeight: "bold", height: "90rpx" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("确认充值")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : vue.createCommentVNode("v-if", true) ]) ]; }), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyTopUpIndex = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-61af56f2"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/topUp/index.vue"]]); const _sfc_main$u = { __name: "index", props: { visible: { type: Boolean, default: false }, item: { type: Object, default: () => ({}) } }, emits: ["update:visible", "recharge-confirm"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const { t: t2, locale } = useI18n(); const props = __props; const emit = __emit; const CUploadImageRef = vue.ref(); const dataRef = vue.ref({}); const dataParams = vue.reactive({ id: "", image: "" }); const payment_type_text = vue.ref(["微信", "支付宝", "银行卡"]); vue.watch(() => props.visible, (newVal) => { if (newVal && props.item && props.item.pay_data) { dataParams.id = props.item.id; dataRef.value = JSON.parse(props.item.pay_data); } }); const handleConfirm = () => { uni.request({ url: apiUrl + "wallet/submitImage", method: "POST", data: dataParams, header: { Authorization: uni.getStorageSync("token"), lang: locale.value }, success: (res) => { uni.hideLoading(); if (res.data.code === 0) { uni.showToast({ title: res.data.msg || t2("提交成功"), icon: "success" }); dataParams.id = ""; dataParams.image = ""; CUploadImageRef.value.clear(); emit("recharge-confirm"); } else { uni.showToast({ title: res.data.msg || t2("提交失败"), icon: "none" }); } }, fail: (err) => { uni.hideLoading(); uni.showToast({ title: t2("网络错误"), icon: "none" }); } }); emit("update:visible", false); }; const handleCancel = () => { emit("update:visible", false); }; const changeImg = (e) => { dataParams.image = Array.isArray(e) ? e[0] : e; }; const __returned__ = { t: t2, locale, props, emit, CUploadImageRef, dataRef, dataParams, payment_type_text, handleConfirm, handleCancel, changeImg, ref: vue.ref, reactive: vue.reactive, watch: vue.watch, get apiUrl() { return apiUrl; }, get useI18n() { return useI18n; }, CUploadImage }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_button = __unplugin_components_2$1; return $props.visible ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "recharge-modal", onTouchmove: vue.withModifiers(() => { }, ["stop", "prevent"]) }, [ vue.createElementVNode("view", { class: "recharge-box" }, [ vue.createElementVNode( "view", { class: "modal-header" }, vue.toDisplayString(_ctx.$t("充值确认")), 1 /* TEXT */ ), $setup.dataRef ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "info-container" }, [ vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("充值类型")), 1 /* TEXT */ ), $props.item && $props.item.payment_type ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "value" }, vue.toDisplayString($setup.payment_type_text[Number($props.item.payment_type) - 1]), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("收款人姓名")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "value" }, vue.toDisplayString($setup.dataRef.payName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("收款账号")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "value" }, vue.toDisplayString($setup.dataRef.payAccount), 1 /* TEXT */ ) ]), $props.item.payment_type == "3" && $setup.dataRef.bankName ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(_ctx.$t("开户行")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "value" }, vue.toDisplayString($setup.dataRef.bankName), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $props.item.payment_type != "3" && $setup.dataRef.payQrCode ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "qr-wrapper" }, [ vue.createElementVNode("image", { class: "qr-code", src: $setup.dataRef.payQrCode, mode: "aspectFit" }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "qr-tip" }, vue.toDisplayString(_ctx.$t("收款码")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "qr-wrapper" }, [ vue.createVNode( $setup["CUploadImage"], { onChange: $setup.changeImg, maxCount: 1, ref: "CUploadImageRef" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode( "text", { class: "qr-tip" }, vue.toDisplayString(_ctx.$t("上传支付凭证")), 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "action-btns" }, [ vue.createVNode(_component_u_button, { type: "error", onClick: $setup.handleCancel, class: "btn" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("取消")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_button, { type: "primary", onClick: $setup.handleConfirm, class: "btn" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("提交")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const RechargeModal = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-3fbb0aca"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/rechargeRecord/components/rechargeModal/index.vue"]]); const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const pagingRef = vue.ref(null); const moneyLogList = vue.ref([]); const isModalVisible = vue.ref(false); const currentRechargeItem = vue.ref({}); const typePickerShow = vue.ref(false); const calendarShow = vue.ref(false); const dateRange = vue.ref(""); const startTime = vue.ref(""); const endTime = vue.ref(""); const rechargeType = vue.ref("rmb"); const typeColumns = vue.computed(() => [ { label: t2("RMB充值"), value: "rmb" }, { label: t2("加密货币充值"), value: "crypto_coin" } ]); const rechargeTypeText = vue.computed(() => { const target = typeColumns.value.find((item) => item.value === rechargeType.value); return target ? target.label : t2("RMB充值"); }); async function onQuery(pageNo, pageSize) { try { const params = { type: rechargeType.value, // 充值类型直接传 type page: pageNo, limit: pageSize, start_time: startTime.value, end_time: endTime.value }; const res = await getRecharge(params); if (res.code === 1) { pagingRef.value.complete(res.data.list); } else { pagingRef.value.complete(false); } } catch (e) { pagingRef.value.complete(false); } } function onCalendarChange(e) { const range2 = e; if (range2.startDate && range2.endDate) { startTime.value = range2.startDate; endTime.value = range2.endDate; dateRange.value = `${range2.startDate} ~ ${range2.endDate}`; handleQuery2(); } } function onTypeConfirm(e) { rechargeType.value = e[0].value; handleQuery2(); } function handleUploadVoucher(item) { formatAppLog("log", "at pages/WorkModule/my/rechargeRecord/index.vue:271", "上传凭证", item); openRechargeModal(item); } function handleQuery2() { pagingRef.value.reload(); } function handleReset() { dateRange.value = ""; startTime.value = ""; endTime.value = ""; rechargeType.value = "rmb"; pagingRef.value.reload(); } function getStatusText(status, channel) { let statusMap = { 0: t2("待处理"), 1: t2("处理中"), 2: t2("成功"), 3: t2("失败"), 4: t2("待用户提交凭证"), 5: t2("待审核") }; if (channel === "rgcz") { statusMap = { 0: t2("待人工处理"), 1: t2("处理中"), 2: t2("成功"), 3: t2("审核驳回"), 4: t2("待用户提交凭证"), 5: t2("待审核") }; } return statusMap[status] || t2("未知"); } function getStatusClass(status) { const classMap = { 0: "status-pending", 1: "status-processing", 2: "status-success", 3: "status-error", 4: "status-pending", 5: "status-pending" }; return classMap[status] || ""; } function previewImage(url2) { uni.previewImage({ urls: [url2] }); } function handleDetail(item) { } const openRechargeModal = (item) => { currentRechargeItem.value = item; isModalVisible.value = true; }; const handleRechargeSuccess = () => { formatAppLog("log", "at pages/WorkModule/my/rechargeRecord/index.vue:322", "支付凭证提交成功!"); handleQuery2(); }; const __returned__ = { t: t2, pagingRef, moneyLogList, isModalVisible, currentRechargeItem, typePickerShow, calendarShow, dateRange, startTime, endTime, rechargeType, typeColumns, rechargeTypeText, onQuery, onCalendarChange, onTypeConfirm, handleUploadVoucher, handleQuery: handleQuery2, handleReset, getStatusText, getStatusClass, previewImage, handleDetail, openRechargeModal, handleRechargeSuccess, RechargeModal }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_empty = __unplugin_components_4$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_select = __unplugin_components_5$1; const _component_u_calendar = __unplugin_components_6; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("充值记录") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-content" }, [ vue.createVNode(_component_z_paging, { ref: "pagingRef", modelValue: $setup.moneyLogList, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.moneyLogList = $event), onQuery: $setup.onQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300, loadingMoreLoadingText: $setup.t("正在加载"), loadingMoreNoMoreText: $setup.t("没有更多了"), loadingMoreDefaultText: $setup.t("点击加载更多") }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "filter-wrapper" }, [ vue.createElementVNode("view", { class: "filter-card" }, [ vue.createElementVNode("view", { class: "filter-header" }, [ vue.createElementVNode("view", { class: "title-line" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title-text" }, vue.toDisplayString($setup.t("条件筛选")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "reset-link", onClick: $setup.handleReset }, vue.toDisplayString($setup.t("重置全部")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "filter-body" }, [ vue.createCommentVNode(" 将筛选和日期并排 "), vue.createElementVNode("view", { class: "filter-row" }, [ vue.createCommentVNode(" 充值类型筛选 "), vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[0] || (_cache[0] = ($event) => $setup.typePickerShow = true) }, [ vue.createVNode(_component_u_icon, { name: "list-dot", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.rechargeTypeText), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createCommentVNode(" 日期筛选 "), vue.createElementVNode("view", { class: "date-selector", onClick: _cache[1] || (_cache[1] = ($event) => $setup.calendarShow = true) }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "date-content" }, [ $setup.dateRange ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "date-value" }, vue.toDisplayString($setup.dateRange), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "date-placeholder" }, vue.toDisplayString($setup.t("请选择日期")), 1 /* TEXT */ )) ]), vue.createVNode(_component_u_icon, { name: "arrow-right", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "button-group" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "search-btn", onClick: $setup.handleQuery }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "search", size: "32", color: "#fff", class: "mr-1" }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("立即查询")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("更新数据中...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("没有发现相关记录"), mode: "search", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "money-log-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.moneyLogList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id, class: "log-card", onClick: ($event) => $setup.handleDetail(item) }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "type-badge" }, [ vue.createElementVNode("view", { class: "dot" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("充值")), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 兼容 order_no "), vue.createElementVNode( "text", { class: "order-no" }, "NO." + vue.toDisplayString(item.txid || item.order_no || item.id), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-main" }, [ vue.createElementVNode("view", { class: "amount-box" }, [ vue.createElementVNode("text", { class: "amount-symbol" }, "+"), vue.createCommentVNode(" 兼容没有 actual_received 的情况,直接取 amount "), vue.createElementVNode( "text", { class: "amount-val" }, vue.toDisplayString(parseFloat(item.actual_received || item.amount)), 1 /* TEXT */ ), vue.createCommentVNode(" 兼容货币单位显示 "), vue.createElementVNode( "text", { class: "currency" }, vue.toDisplayString($setup.rechargeType === "rmb" ? "RMB" : _ctx.$currency), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["status-text", $setup.getStatusClass(item.status)]) }, vue.toDisplayString($setup.getStatusText(item.status, item.channel)), 3 /* TEXT, CLASS */ ) ]) ]), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("充值金额")), 1 /* TEXT */ ), vue.createCommentVNode(" 兼容没有 coin 的情况 "), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(parseFloat(item.amount || 0)) + " " + vue.toDisplayString(item.coin || ($setup.rechargeType === "rmb" ? "RMB" : "")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-row" }, [ vue.createCommentVNode(" 兼容银行名称或渠道标识,如果是RMB则显示充值渠道,否则显示网络类型 "), vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString(item.bank_name || item.channel_text ? $setup.t("充值渠道") : $setup.t("网络类型")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(item.bank_name || item.channel_text || item.net || "--"), 1 /* TEXT */ ) ]), item.exchange_rate ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("汇率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(parseFloat(item.exchange_rate)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), item.from_address ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("来源地址")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value address-text" }, vue.toDisplayString(item.from_address), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("创建时间")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(item.created_at), 1 /* TEXT */ ) ]), item.image ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("支付凭证")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "info-value highlighted", onClick: vue.withModifiers(($event) => $setup.previewImage(item.image), ["stop"]) }, vue.toDisplayString($setup.t("查看凭证")), 9, ["onClick"]) ])) : vue.createCommentVNode("v-if", true), item.status === 3 && item.remark ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("驳回原因")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value", style: { "color": "#ef4444" } }, vue.toDisplayString(item.remark), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $setup.rechargeType === "rmb" && item.pay_data && item.status === 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("操作")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "info-value highlighted", onClick: vue.withModifiers(($event) => $setup.handleUploadVoucher(item), ["stop"]) }, vue.toDisplayString($setup.t("上传凭证")), 9, ["onClick"]) ])) : vue.createCommentVNode("v-if", true) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "loadingMoreLoadingText", "loadingMoreNoMoreText", "loadingMoreDefaultText"]) ]), vue.createVNode(_component_u_select, { modelValue: $setup.typePickerShow, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.typePickerShow = $event), mode: "single-column", list: $setup.typeColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onTypeConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.calendarShow, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.calendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", "start-text": $setup.t("开始"), "end-text": $setup.t("结束"), "btn-type": "primary", "tool-tip": $setup.t("请选择记录查询区间"), onChange: $setup.onCalendarChange }, null, 8, ["modelValue", "active-bg-color", "range-color", "start-text", "end-text", "tool-tip"]), vue.createVNode($setup["RechargeModal"], { visible: $setup.isModalVisible, "onUpdate:visible": _cache[5] || (_cache[5] = ($event) => $setup.isModalVisible = $event), item: $setup.currentRechargeItem, onRechargeConfirm: $setup.handleRechargeSuccess }, null, 8, ["visible", "item"]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyRechargeRecordIndex = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-7364c036"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/rechargeRecord/index.vue"]]); const _sfc_main$s = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const router2 = useRouter(); const customRequest = (path, method2 = "GET", data = {}) => { return new Promise((resolve2, reject) => { uni.request({ url: apiUrl + path, method: method2, data, header: { "Authorization": uni.getStorageSync("token") || "", "lang": locale.value }, success: (res) => resolve2(res.data), fail: (err) => reject(err) }); }); }; const channelList = vue.ref([]); const activeChannelIndex = vue.ref(0); const submitLoading = vue.ref(false); const isFetchingAccounts = vue.ref(false); const bankList = vue.ref([]); const addressList = vue.ref([]); const showAccountPopup = vue.ref(false); const selectedAccount = vue.ref(null); const formData = vue.reactive({ amount: "", safe_word: "" }); const currentChannel = vue.computed(() => channelList.value[activeChannelIndex.value] || {}); const isUSDT = vue.computed(() => { var _a2; return ((_a2 = currentChannel.value) == null ? void 0 : _a2.value) === "USDT"; }); const availableAccounts = vue.computed(() => { if (isUSDT.value) { return addressList.value; } else { return bankList.value.filter((b) => b.channel === currentChannel.value.value); } }); vue.onMounted(() => { fetchChannels(); fetchAllAccounts(); }); const fetchChannels = async () => { try { const res = await customRequest("wallet/withdrawChannel", "GET"); if (res.code === 0 && res.data && Array.isArray(res.data)) { channelList.value = res.data; } else { uni.showToast({ title: res.msg || t2("获取提现渠道失败"), icon: "none" }); } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/withdraw/index.vue:214", "Fetch Channels Error:", error); } }; const fetchAllAccounts = async () => { var _a2, _b2; isFetchingAccounts.value = true; try { const [bankRes, addressRes] = await Promise.all([ customRequest("wallet/bankList", "GET"), customRequest("wallet/address", "GET") ]); if (bankRes.code === 0 || bankRes.code === 1) { bankList.value = ((_a2 = bankRes.data) == null ? void 0 : _a2.list) || []; } if (addressRes.code === 0 || addressRes.code === 1) { addressList.value = ((_b2 = addressRes.data) == null ? void 0 : _b2.list) || []; } autoSelectAccount(); } catch (error) { formatAppLog("error", "at pages/WorkModule/my/withdraw/index.vue:237", "Fetch Accounts Error:", error); } finally { isFetchingAccounts.value = false; } }; vue.watch(activeChannelIndex, () => { autoSelectAccount(); }); const autoSelectAccount = () => { if (availableAccounts.value.length > 0) { selectedAccount.value = availableAccounts.value[0]; } else { selectedAccount.value = null; } }; const switchChannel = (index) => { if (activeChannelIndex.value === index) return; activeChannelIndex.value = index; }; const handleSelectAccount = (item) => { selectedAccount.value = item; showAccountPopup.value = false; }; const goWalletManage = () => { showAccountPopup.value = false; router2.push({ name: "WalletManagement" }); }; const handleSubmit = async () => { if (!selectedAccount.value) { return uni.showToast({ title: t2("请选择收款账户"), icon: "none" }); } if (!formData.amount || Number(formData.amount) <= 0) { return uni.showToast({ title: t2("请输入有效的提现金额"), icon: "none" }); } if (!formData.safe_word) { return uni.showToast({ title: t2("请输入资金密码"), icon: "none" }); } submitLoading.value = true; try { let res; if (isUSDT.value) { const payload = { address: selectedAccount.value.address, amount: String(formData.amount), safe_word: formData.safe_word }; res = await customRequest("wallet/withdraw", "POST", payload); } else { const payload = { account: selectedAccount.value.account, amount: String(formData.amount), bank_name: selectedAccount.value.bank_name, card_no: selectedAccount.value.card_no, channel: currentChannel.value.value, safe_word: formData.safe_word }; res = await customRequest("wallet/payout", "POST", payload); } if (res.code === 0 || res.code === 1) { uni.showToast({ title: res.msg || t2("提现申请提交成功"), icon: "none" }); formData.amount = ""; formData.safe_word = ""; } else { uni.showToast({ title: res.msg || t2("提现失败,请重试"), icon: "none" }); } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/withdraw/index.vue:316", "Withdraw Submit Error:", error); uni.showToast({ title: t2("网络异常,请稍后再试"), icon: "none" }); } finally { submitLoading.value = false; } }; const formatCardNo = (no) => { if (!no) return ""; if (no.length > 8) { return no.substring(0, 4) + " **** **** " + no.substring(no.length - 4); } return no; }; const __returned__ = { t: t2, locale, router: router2, customRequest, channelList, activeChannelIndex, submitLoading, isFetchingAccounts, bankList, addressList, showAccountPopup, selectedAccount, formData, currentChannel, isUSDT, availableAccounts, fetchChannels, fetchAllAccounts, autoSelectAccount, switchChannel, handleSelectAccount, goWalletManage, handleSubmit, formatCardNo, ref: vue.ref, computed: vue.computed, reactive: vue.reactive, onMounted: vue.onMounted, watch: vue.watch, get useI18n() { return useI18n; }, get apiUrl() { return apiUrl; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_loading = __unplugin_components_3$3; const _component_u_button = __unplugin_components_2$1; const _component_u_empty = __unplugin_components_4$2; const _component_u_popup = __unplugin_components_2$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("提现") }, { navBarRight: vue.withCtx(() => [ vue.createElementVNode("view", { class: "nav-btn", onClick: _cache[0] || (_cache[0] = ($event) => $setup.router.push({ name: "withdrawalHistory" })) }, [ vue.createVNode(_component_u_icon, { name: "clock", size: "36" }) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "withdraw-container" }, [ vue.createElementVNode("view", { class: "section-title" }, [ vue.createElementVNode("view", { class: "stick" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("选择提现方式")), 1 /* TEXT */ ) ]), $setup.channelList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "channel-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.channelList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["channel-item", { "is-active": $setup.activeChannelIndex === index }]), key: item.value, onClick: ($event) => $setup.switchChannel(index) }, [ vue.createElementVNode( "text", { class: "channel-name" }, vue.toDisplayString(item.label), 1 /* TEXT */ ), $setup.activeChannelIndex === index ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "checkbox-mark", color: "#fff", size: "24", class: "check-icon" })) : vue.createCommentVNode("v-if", true) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "loading-channels" }, [ vue.createVNode(_component_u_loading, { mode: "circle", color: "#f8b932" }), vue.createElementVNode( "text", { style: { "margin-left": "8px", "color": "#999", "font-size": "12px" } }, vue.toDisplayString($setup.t("加载提现渠道中...")), 1 /* TEXT */ ) ])), $setup.channelList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "form-card" }, [ vue.createElementVNode("view", { class: "form-group amount-group" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("提现金额")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "input-box" }, [ vue.createElementVNode( "text", { class: "currency-symbol" }, vue.toDisplayString($setup.isUSDT ? "$" : "¥"), 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode("input", { type: "digit", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.amount = $event), class: "amount-input", placeholder: $setup.t("请输入提现金额") }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.formData.amount] ]) ]) ]), vue.createElementVNode("view", { class: "divider" }), vue.createElementVNode("view", { class: "form-group" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("收款账户")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "account-selector", onClick: _cache[2] || (_cache[2] = ($event) => $setup.showAccountPopup = true) }, [ $setup.selectedAccount ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ $setup.isUSDT ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "account-info" }, [ vue.createElementVNode( "text", { class: "a-name" }, vue.toDisplayString($setup.selectedAccount.alias || "USDT地址"), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "a-desc" }, vue.toDisplayString($setup.selectedAccount.address), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "account-info" }, [ vue.createElementVNode( "text", { class: "a-name" }, vue.toDisplayString($setup.selectedAccount.bank_name) + " (" + vue.toDisplayString($setup.selectedAccount.account) + ")", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "a-desc" }, vue.toDisplayString($setup.formatCardNo($setup.selectedAccount.card_no)), 1 /* TEXT */ ) ])) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "placeholder" }, vue.toDisplayString($setup.t("请选择收款账户")), 1 /* TEXT */ )), vue.createVNode(_component_u_icon, { name: "arrow-right", color: "#cbd5e1", size: "20" }) ]) ]), vue.createElementVNode("view", { class: "form-group", style: { "margin-top": "20px" } }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("资金密码")), 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode("input", { type: "password", "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.formData.safe_word = $event), class: "std-input", placeholder: $setup.t("请输入资金密码") }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.formData.safe_word] ]) ]) ])) : vue.createCommentVNode("v-if", true), $setup.channelList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "submit-action" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", loading: $setup.submitLoading, "custom-style": { height: "44px", fontSize: "16px", fontWeight: "bold" }, onClick: $setup.handleSubmit }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("确认提现")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["loading"]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createVNode(_component_u_popup, { modelValue: $setup.showAccountPopup, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.showAccountPopup = $event), mode: "bottom", round: "16", onClose: _cache[5] || (_cache[5] = ($event) => $setup.showAccountPopup = false), closeable: true }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-container" }, [ vue.createElementVNode( "view", { class: "popup-header" }, vue.toDisplayString($setup.t("选择收款账户")), 1 /* TEXT */ ), vue.createElementVNode("scroll-view", { "scroll-y": "", class: "popup-list" }, [ $setup.isFetchingAccounts ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "loading-state" }, [ vue.createVNode(_component_u_loading, { mode: "circle", color: "#f8b932" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("加载中...")), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ $setup.availableAccounts.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "empty-account" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无可用账户"), mode: "list" }, null, 8, ["text"]), vue.createVNode(_component_u_button, { type: "primary", shape: "circle", plain: "", style: { "margin-top": "20px", "width": "160px" }, onClick: $setup.goWalletManage }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("去添加账户")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList($setup.availableAccounts, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["account-item", { "is-active": $setup.selectedAccount && $setup.selectedAccount.id === item.id }]), key: item.id, onClick: ($event) => $setup.handleSelectAccount(item) }, [ $setup.isUSDT ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "item-content" }, [ vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString(item.alias || "USDT地址"), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "desc" }, vue.toDisplayString(item.address), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "item-content" }, [ vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString(item.bank_name) + " (" + vue.toDisplayString(item.account) + ")", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "desc" }, vue.toDisplayString($setup.formatCardNo(item.card_no)), 1 /* TEXT */ ) ])), $setup.selectedAccount && $setup.selectedAccount.id === item.id ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 2, name: "checkbox-mark", color: "#f8b932", size: "24" })) : vue.createCommentVNode("v-if", true) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 64 /* STABLE_FRAGMENT */ )) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyWithdrawIndex = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-a81f47eb"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/withdraw/index.vue"]]); const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const pagingRef = vue.ref(null); const moneyLogList = vue.ref([]); const calendarShow = vue.ref(false); const typePickerShow = vue.ref(false); const dateRange = vue.ref(""); const startTime = vue.ref(""); const endTime = vue.ref(""); const withdrawType = vue.ref("rmb"); const typeColumns = vue.computed(() => [ { label: t2("RMB提现"), value: "rmb" }, { label: t2("加密货币提现"), value: "crypto_coin" } ]); const withdrawTypeText = vue.computed(() => { const target = typeColumns.value.find((item) => item.value === withdrawType.value); return target ? target.label : t2("RMB提现"); }); async function onQuery(pageNo, pageSize) { try { const params = { type: withdrawType.value, // rmb 或 crypto_coin page: pageNo, limit: pageSize, start_time: startTime.value, end_time: endTime.value }; const res = await getWithdrawHistory(params); if (res.code === 1) { pagingRef.value.complete(res.data.list); } else { pagingRef.value.complete(false); } } catch (e) { pagingRef.value.complete(false); } } function onTypeConfirm(e) { withdrawType.value = e[0].value; handleQuery2(); } function onCalendarChange(e) { const range2 = e; if (range2.startDate && range2.endDate) { startTime.value = range2.startDate; endTime.value = range2.endDate; dateRange.value = `${range2.startDate} ~ ${range2.endDate}`; handleQuery2(); } } function handleQuery2() { pagingRef.value.reload(); } function handleReset() { withdrawType.value = "rmb"; dateRange.value = ""; startTime.value = ""; endTime.value = ""; pagingRef.value.reload(); } function getStatusText(status, type2) { let statusMap = {}; if (type2 === "crypto_coin") { statusMap = { 0: t2("待处理"), 1: t2("成功"), 2: t2("失败") }; } else { statusMap = { 0: t2("待处理"), 1: t2("处理中"), 2: t2("成功"), 3: t2("失败") }; } return statusMap[status] || t2("未知"); } function getStatusClass(status, type2) { let classMap = {}; if (type2 === "crypto_coin") { classMap = { 0: "status-pending", 1: "status-success", 2: "status-error" }; } else { classMap = { 0: "status-pending", 1: "status-processing", 2: "status-success", 3: "status-error" }; } return classMap[status] || ""; } function getCryptoActualReceived(item) { const amount2 = Number(item.amount) || 0; const rate = item.exchange_rate ? Number(item.exchange_rate) : 1; return parseFloat((amount2 * rate).toFixed(4)); } function getBankActualReceived(item) { const amount2 = parseFloat(item.amount || 0); const fee = parseFloat(item.fee || 0); const actual = amount2 - fee > 0 ? amount2 - fee : 0; return parseFloat(actual.toFixed(2)); } const __returned__ = { t: t2, pagingRef, moneyLogList, calendarShow, typePickerShow, dateRange, startTime, endTime, withdrawType, typeColumns, withdrawTypeText, onQuery, onTypeConfirm, onCalendarChange, handleQuery: handleQuery2, handleReset, getStatusText, getStatusClass, getCryptoActualReceived, getBankActualReceived }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_empty = __unplugin_components_4$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_select = __unplugin_components_5$1; const _component_u_calendar = __unplugin_components_6; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("提现记录") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-content" }, [ vue.createVNode(_component_z_paging, { ref: "pagingRef", modelValue: $setup.moneyLogList, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.moneyLogList = $event), onQuery: $setup.onQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300, loadingMoreLoadingText: $setup.t("正在加载"), loadingMoreNoMoreText: $setup.t("没有更多了"), loadingMoreDefaultText: $setup.t("点击加载更多") }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "filter-wrapper" }, [ vue.createElementVNode("view", { class: "filter-card" }, [ vue.createElementVNode("view", { class: "filter-header" }, [ vue.createElementVNode("view", { class: "title-line" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title-text" }, vue.toDisplayString($setup.t("条件筛选")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "reset-link", onClick: $setup.handleReset }, vue.toDisplayString($setup.t("重置全部")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "filter-body" }, [ vue.createElementVNode("view", { class: "filter-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[0] || (_cache[0] = ($event) => $setup.typePickerShow = true) }, [ vue.createVNode(_component_u_icon, { name: "list-dot", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.withdrawTypeText), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "filter-item date-item", onClick: _cache[1] || (_cache[1] = ($event) => $setup.calendarShow = true) }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ $setup.dateRange ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "filter-value" }, vue.toDisplayString($setup.dateRange), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "filter-placeholder" }, vue.toDisplayString($setup.t("日期区间")), 1 /* TEXT */ )) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "button-group" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "search-btn", onClick: $setup.handleQuery }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "search", size: "32", color: "#fff", class: "mr-1" }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("立即查询")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("更新数据中...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("没有发现相关记录"), mode: "search", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "money-log-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.moneyLogList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id, class: "log-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["type-badge", "withdraw", $setup.withdrawType === "rmb" ? "badge-rmb" : "badge-crypto"]) }, [ vue.createElementVNode("view", { class: "dot" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.withdrawType === "rmb" ? $setup.t("RMB提现") : $setup.t("加密货币提现")), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "order-no" }, "NO." + vue.toDisplayString(item.order_no || item.id), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-main" }, [ vue.createElementVNode("view", { class: "amount-box" }, [ vue.createElementVNode( "text", { class: "amount-val" }, vue.toDisplayString(item.amount), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "currency" }, vue.toDisplayString(item.currency || ($setup.withdrawType === "rmb" ? "CNY" : "USDT")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["status-text", $setup.getStatusClass(item.status, $setup.withdrawType)]) }, vue.toDisplayString($setup.getStatusText(item.status, $setup.withdrawType)), 3 /* TEXT, CLASS */ ) ]) ]), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("到账金额")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "info-value" }, [ vue.createTextVNode( vue.toDisplayString($setup.withdrawType === "crypto_coin" ? item.to_account : item.amount) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "currency" }, vue.toDisplayString(item.currency || ($setup.withdrawType === "rmb" ? "CNY" : "USDT")), 1 /* TEXT */ ) ]) ]), $setup.withdrawType === "crypto_coin" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("汇率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value highlighted" }, vue.toDisplayString(item.exchange_rate || "--"), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("手续费")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString($setup.withdrawType === "crypto_coin" ? item.service_charge : item.fee) + " " + vue.toDisplayString(item.currency || ($setup.withdrawType === "rmb" ? "CNY" : "USDT")), 1 /* TEXT */ ) ]), $setup.withdrawType === "rmb" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("提现渠道")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(item.channel_text || item.bank_name || "--"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("收款人")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(item.account || "--"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("收款账号")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value address-value" }, vue.toDisplayString(item.card_no || "--"), 1 /* TEXT */ ) ]) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("提现地址")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value address-value" }, vue.toDisplayString(item.address || "--"), 1 /* TEXT */ ) ])), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("申请时间")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(item.created_at), 1 /* TEXT */ ) ]), ($setup.withdrawType === "crypto_coin" && item.status === 2 || $setup.withdrawType === "rmb" && item.status === 3) && (item.admin_note || item.remark) ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "reject-box" }, [ vue.createElementVNode( "text", { class: "reject-label" }, vue.toDisplayString($setup.t("失败原因")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "reject-value" }, vue.toDisplayString(item.admin_note || item.remark), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "loadingMoreLoadingText", "loadingMoreNoMoreText", "loadingMoreDefaultText"]) ]), vue.createVNode(_component_u_select, { modelValue: $setup.typePickerShow, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.typePickerShow = $event), mode: "single-column", list: $setup.typeColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onTypeConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.calendarShow, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.calendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", "start-text": $setup.t("开始"), "end-text": $setup.t("结束"), "btn-type": "primary", "tool-tip": $setup.t("请选择记录查询区间"), onChange: $setup.onCalendarChange }, null, 8, ["modelValue", "active-bg-color", "range-color", "start-text", "end-text", "tool-tip"]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyWithdrawalHistoryIndex = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-9e36bfa3"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/withdrawalHistory/index.vue"]]); const _sfc_main$q = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const router2 = useRouter(); const yuebaoBalance = vue.ref("0.00"); const yuebaoInterest = vue.ref("0.00"); const tableData = vue.ref([]); const queryParams2 = vue.reactive({ page: 1, limit: 15, status: "", start_time: "", end_time: "" }); const total = vue.ref(0); const isRefreshing = vue.ref(false); const loadStatus = vue.ref("more"); const loadStatusText = vue.computed(() => { if (loadStatus.value === "loading") return t2("正在加载..."); if (loadStatus.value === "noMore") return t2("没有更多记录了"); return t2("上拉加载更多"); }); const statusOptions = vue.computed(() => [ { label: t2("全部"), value: "" }, { label: t2("持仓中"), value: 1 }, { label: t2("已取出"), value: 2 } ]); const showModal2 = vue.ref(false); const modalType = vue.ref("add"); const amount2 = vue.ref(""); const submitLoading = vue.ref(false); const showCalendar = vue.ref(false); vue.onMounted(() => { fetchBalance(); fetchData(true); }); onShow(() => { fetchBalance(); }); const fetchBalance = async () => { try { const res = await getBalance(); if (res && res.code === 1 && res.data) { yuebaoBalance.value = res.data.yuebao || "0.00"; yuebaoInterest.value = res.data.yuebao_invest || "0.00"; } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/Yuebao/index.vue:223", "获取余额失败", error); } }; const fetchData = async (isRefresh = false) => { if (isRefresh) { queryParams2.page = 1; loadStatus.value = "loading"; } else { if (loadStatus.value === "noMore") return; loadStatus.value = "loading"; } try { const res = await getYuebaoItemList(queryParams2); if (res && res.code === 1) { const list2 = res.data.list || res.data.data || []; const resTotal = res.data.total || 0; if (isRefresh) { tableData.value = list2; } else { tableData.value = [...tableData.value, ...list2]; } total.value = resTotal; if (tableData.value.length >= total.value || list2.length < queryParams2.limit) { loadStatus.value = "noMore"; } else { loadStatus.value = "more"; } } else { if (isRefresh) tableData.value = []; loadStatus.value = "noMore"; } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/Yuebao/index.vue:260", "获取列表失败", error); loadStatus.value = "more"; } finally { isRefreshing.value = false; } }; const handleCalendarChange = (e) => { queryParams2.start_time = e.startDate; queryParams2.end_time = e.endDate; }; const onRefresh = () => { isRefreshing.value = true; fetchBalance(); fetchData(true); }; const loadMore = () => { if (loadStatus.value === "loading" || loadStatus.value === "noMore") return; queryParams2.page += 1; fetchData(false); }; const handleTabChange = (val) => { if (queryParams2.status === val) return; queryParams2.status = val; fetchData(true); }; const openModal = (type2) => { modalType.value = type2; amount2.value = ""; showModal2.value = true; }; const closeModal = () => { showModal2.value = false; }; const handleSubmit = async () => { if (!amount2.value || Number(amount2.value) <= 0) { return uni.showToast({ title: t2("请输入有效金额"), icon: "none" }); } if (modalType.value === "add" && Number(amount2.value) < 1) { return uni.showToast({ title: t2("转入金额最小为 1"), icon: "none" }); } submitLoading.value = true; try { const apiCall = modalType.value === "add" ? addYuebao : withdrawYuebao; const res = await apiCall({ amount: String(amount2.value) }); if (res.code === 1 || res.code === 0) { uni.showToast({ title: res.msg || t2("操作成功"), icon: "success" }); closeModal(); onRefresh(); } else { uni.showToast({ title: res.msg || t2("操作失败"), icon: "none" }); } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/Yuebao/index.vue:324", error); } finally { submitLoading.value = false; } }; const formatMoney = (val) => { if (!val && val !== 0) return "0.00"; return Number(val).toFixed(2); }; const getStatusText = (status) => { if (Number(status) === 1) return t2("持仓中"); if (Number(status) === 2) return t2("已取出"); return t2("未知"); }; const __returned__ = { t: t2, router: router2, yuebaoBalance, yuebaoInterest, tableData, queryParams: queryParams2, total, isRefreshing, loadStatus, loadStatusText, statusOptions, showModal: showModal2, modalType, amount: amount2, submitLoading, showCalendar, fetchBalance, fetchData, handleCalendarChange, onRefresh, loadMore, handleTabChange, openModal, closeModal, handleSubmit, formatMoney, getStatusText, ref: vue.ref, reactive: vue.reactive, computed: vue.computed, onMounted: vue.onMounted, get onShow() { return onShow; }, get useI18n() { return useI18n; }, get addYuebao() { return addYuebao; }, get withdrawYuebao() { return withdrawYuebao; }, get getYuebaoItemList() { return getYuebaoItemList; }, get getBalance() { return getBalance; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_loading = __unplugin_components_3$3; const _component_u_empty = __unplugin_components_4$2; const _component_u_button = __unplugin_components_2$1; const _component_u_popup = __unplugin_components_2$3; const _component_u_calendar = __unplugin_components_6; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("余额宝") }, { navBarRight: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "tmc", onClick: _cache[0] || (_cache[0] = ($event) => $setup.router.push({ name: "YuebaoItemList" })) }, vue.toDisplayString($setup.t("明细")), 1 /* TEXT */ ) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "yuebao-page" }, [ vue.createElementVNode( "view", { class: "dashboard-card", onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, [ vue.createElementVNode("view", { class: "dashboard-header" }, [ vue.createElementVNode("view", { class: "decorate-bar" }), vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString($setup.t("灵活存取,稳健收益")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "assets-box" }, [ vue.createElementVNode("view", { class: "asset-item" }, [ vue.createElementVNode( "text", { class: "asset-label" }, vue.toDisplayString($setup.t("余额宝总额(元)")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "asset-value text-gold" }, vue.toDisplayString($setup.yuebaoBalance), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "divider" }), vue.createElementVNode("view", { class: "asset-item" }, [ vue.createElementVNode( "text", { class: "asset-label" }, vue.toDisplayString($setup.t("累计收益(元)")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "asset-value" }, vue.toDisplayString($setup.yuebaoInterest), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "action-group" }, [ vue.createElementVNode("view", { class: "action-btn primary", onClick: _cache[1] || (_cache[1] = ($event) => $setup.openModal("add")) }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("转入")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "action-btn", onClick: _cache[2] || (_cache[2] = ($event) => $setup.openModal("out")), style: { "border": "2px solid #999" } }, [ vue.createVNode(_component_u_icon, { name: "upload", color: "#333", size: "18", class: "mr-1" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("转出")), 1 /* TEXT */ ) ]) ]) ], 32 /* NEED_HYDRATION */ ), vue.createElementVNode( "view", { class: "search-filter-section", onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, [ vue.createElementVNode("view", { class: "filter-tabs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.statusOptions, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["tab-item", { "is-active": $setup.queryParams.status === item.value }]), key: index, onClick: ($event) => $setup.handleTabChange(item.value) }, [ vue.createElementVNode( "text", null, vue.toDisplayString(item.label), 1 /* TEXT */ ), $setup.queryParams.status === item.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "tab-line" })) : vue.createCommentVNode("v-if", true) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "date-search-box" }, [ vue.createElementVNode("view", { class: "date-input-group", onClick: _cache[4] || (_cache[4] = ($event) => $setup.showCalendar = true) }, [ vue.createElementVNode( "view", { class: "date-picker-btn" }, vue.toDisplayString($setup.queryParams.start_time || $setup.t("开始日期")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "date-sep" }, "-"), vue.createElementVNode( "view", { class: "date-picker-btn" }, vue.toDisplayString($setup.queryParams.end_time || $setup.t("结束日期")), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "search-btn-mini", onClick: $setup.onRefresh }, vue.toDisplayString($setup.t("搜索")), 1 /* TEXT */ ) ]) ], 32 /* NEED_HYDRATION */ ), vue.createElementVNode("scroll-view", { class: "list-scroll-view", "scroll-y": "", "refresher-enabled": true, "refresher-triggered": $setup.isRefreshing, onRefresherrefresh: $setup.onRefresh, onScrolltolower: $setup.loadMore }, [ $setup.tableData.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "list-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.tableData, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "record-card", key: item.id || index }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode( "text", { class: "time-text" }, vue.toDisplayString(item.create_time), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["status-tag", "status-" + item.status]) }, vue.toDisplayString($setup.getStatusText(item.status)), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "card-body" }, [ vue.createElementVNode("view", { class: "main-row" }, [ vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("本金")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val text-gold" }, "¥" + vue.toDisplayString($setup.formatMoney(item.principal)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("预估收益")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val text-gold" }, "¥" + vue.toDisplayString($setup.formatMoney(item.estimated_interest)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "sub-row" }, [ vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("剩余本金")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, "¥" + vue.toDisplayString($setup.formatMoney(item.surplus_principal)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("日利率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString(item.daily_interest_rate || "0.00") + "%", 1 /* TEXT */ ) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "load-more-tip" }, [ $setup.loadStatus === "loading" ? (vue.openBlock(), vue.createBlock(_component_u_loading, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "tip-text" }, vue.toDisplayString($setup.loadStatusText), 1 /* TEXT */ ) ]) ])) : !$setup.isRefreshing && $setup.loadStatus !== "loading" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty-box" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无持仓记录"), mode: "list" }, null, 8, ["text"]) ])) : vue.createCommentVNode("v-if", true) ], 40, ["refresher-triggered"]), vue.createVNode(_component_u_popup, { modelValue: $setup.showModal, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.showModal = $event), mode: "bottom", round: "16", onClose: $setup.closeModal, closeable: true }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "modal-content" }, [ vue.createElementVNode( "view", { class: "modal-title" }, vue.toDisplayString($setup.modalType === "add" ? $setup.t("转入余额宝") : $setup.t("转出余额宝")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "modal-body" }, [ vue.createElementVNode( "text", { class: "input-label" }, vue.toDisplayString($setup.modalType === "add" ? $setup.t("转入金额") : $setup.t("转出金额")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "input-box" }, [ vue.createElementVNode("text", { class: "currency" }, "¥"), vue.withDirectives(vue.createElementVNode("input", { type: "digit", "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.amount = $event), class: "amount-input", placeholder: $setup.modalType === "add" ? $setup.t("请输入转入金额,最小为 1") : $setup.t("请输入转出金额") }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.amount] ]) ]) ]), vue.createElementVNode("view", { class: "modal-footer" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", loading: $setup.submitLoading, onClick: $setup.handleSubmit, "custom-style": { height: "48px", fontSize: "16px", fontWeight: "bold" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.modalType === "add" ? $setup.t("确认转入") : $setup.t("确认转出")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["loading"]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.showCalendar, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.showCalendar = $event), mode: "range", "start-text": $setup.t("开始"), "end-text": $setup.t("结束"), onChange: $setup.handleCalendarChange }, null, 8, ["modelValue", "start-text", "end-text"]) ]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyYuebaoIndex = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__scopeId", "data-v-5183df57"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/Yuebao/index.vue"]]); const _sfc_main$p = { __name: "itemList", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const logList = vue.ref([]); const queryParams2 = vue.reactive({ page: 1, limit: 20 }); const total = vue.ref(0); const isRefreshing = vue.ref(false); const loadStatus = vue.ref("more"); const loadStatusText = vue.computed(() => { if (loadStatus.value === "loading") return t2("正在加载..."); if (loadStatus.value === "noMore") return t2("没有更多记录了"); return t2("上拉加载更多"); }); vue.onMounted(() => { fetchData(true); }); const fetchData = async (isRefresh = false) => { if (isRefresh) { queryParams2.page = 1; loadStatus.value = "loading"; } else { if (loadStatus.value === "noMore") return; loadStatus.value = "loading"; } try { const res = await getYuebaoLogList(queryParams2); if (res && res.code === 1 && res.data) { const list2 = res.data.list || []; const resTotal = res.data.count || 0; if (isRefresh) { logList.value = list2; } else { logList.value = [...logList.value, ...list2]; } total.value = resTotal; if (logList.value.length >= total.value || list2.length < queryParams2.limit) { loadStatus.value = "noMore"; } else { loadStatus.value = "more"; } } else { if (isRefresh) logList.value = []; loadStatus.value = "noMore"; } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/Yuebao/itemList.vue:118", "获取余额宝明细失败", error); loadStatus.value = "more"; } finally { isRefreshing.value = false; } }; const onRefresh = () => { isRefreshing.value = true; fetchData(true); }; const loadMore = () => { if (loadStatus.value === "loading" || loadStatus.value === "noMore") return; queryParams2.page += 1; fetchData(false); }; const formatMoney = (val) => { if (!val && val !== 0) return "0.00"; return Number(val).toFixed(2); }; const formatHoldTime = (hours) => { const h = Number(hours); if (isNaN(h) || h === 0) return `0${t2("小时")}`; if (h < 24) return `${h}${t2("小时")}`; const days = Math.floor(h / 24); const remainHours = h % 24; return remainHours > 0 ? `${days}${t2("天")}${remainHours}${t2("小时")}` : `${days}${t2("天")}`; }; const getTypeText = (type2) => { if (type2 === 1) return t2("转入"); if (type2 === 2) return t2("转出"); return t2("其他"); }; const getAmountSign = (type2) => { if (type2 === 1) return "+"; if (type2 === 2) return "-"; return ""; }; const getAmountClass = (type2) => { if (type2 === 1) return "text-in"; if (type2 === 2) return "text-out"; return ""; }; const __returned__ = { t: t2, logList, queryParams: queryParams2, total, isRefreshing, loadStatus, loadStatusText, fetchData, onRefresh, loadMore, formatMoney, formatHoldTime, getTypeText, getAmountSign, getAmountClass, ref: vue.ref, reactive: vue.reactive, computed: vue.computed, onMounted: vue.onMounted, get useI18n() { return useI18n; }, get getYuebaoLogList() { return getYuebaoLogList; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tag = __unplugin_components_2$2; const _component_u_loading = __unplugin_components_3$3; const _component_u_empty = __unplugin_components_4$2; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("余额宝明细") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "yuebao-log-page" }, [ vue.createElementVNode("scroll-view", { class: "log-scroll-view", "scroll-y": "", "refresher-enabled": true, "refresher-triggered": $setup.isRefreshing, onRefresherrefresh: $setup.onRefresh, onScrolltolower: $setup.loadMore }, [ $setup.logList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "log-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.logList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "log-item", key: item.id }, [ vue.createElementVNode("view", { class: "item-left" }, [ vue.createElementVNode("view", { class: "type-wrap" }, [ vue.createVNode(_component_u_tag, { text: $setup.getTypeText(item.type), type: item.type === 1 ? "success" : "error", size: "mini", mode: "light" }, null, 8, ["text", "type"]) ]), vue.createElementVNode( "text", { class: "item-time" }, vue.toDisplayString(item.create_time), 1 /* TEXT */ ), item.hold_hours !== void 0 && item.hold_hours !== null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "item-hold" }, vue.toDisplayString($setup.t("持仓时间")) + ": " + vue.toDisplayString($setup.formatHoldTime(item.hold_hours)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item-right" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["item-amount", $setup.getAmountClass(item.type)]) }, vue.toDisplayString($setup.getAmountSign(item.type)) + vue.toDisplayString($setup.formatMoney(item.amount)), 3 /* TEXT, CLASS */ ), Number(item.interest) > 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "item-interest" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("收益")) + ": ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text-gold" }, "+" + vue.toDisplayString($setup.formatMoney(item.interest)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "loading-more" }, [ $setup.loadStatus === "loading" ? (vue.openBlock(), vue.createBlock(_component_u_loading, { key: 0, color: "#f8b932", size: "16" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "tip-text" }, vue.toDisplayString($setup.loadStatusText), 1 /* TEXT */ ) ]) ])) : !$setup.isRefreshing && $setup.loadStatus !== "loading" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty-box" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无明细记录"), mode: "list" }, null, 8, ["text"]) ])) : vue.createCommentVNode("v-if", true) ], 40, ["refresher-triggered"]) ]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyYuebaoItemList = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-f2d05e0d"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/Yuebao/itemList.vue"]]); const _sfc_main$o = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const loading = vue.ref(true); const submitLoading = vue.ref(false); const channelList = vue.ref([]); const activeChannel = vue.ref(""); const bankList = vue.ref([]); const addressList = vue.ref([]); const showModal2 = vue.ref(false); const form = vue.reactive({ id: "", address: "", bank_name: "", card_no: "", account: "", alias: "" }); const isUSDT = vue.computed(() => activeChannel.value === "USDT"); const currentAccountList = vue.computed(() => { if (isUSDT.value) { return addressList.value; } return bankList.value.filter((item) => item.channel === activeChannel.value); }); vue.onMounted(() => { initData(); }); const customRequest = (path, method2 = "GET", data = {}) => { return new Promise((resolve2, reject) => { uni.request({ url: apiUrl + path, method: method2, data, header: { "Authorization": uni.getStorageSync("token") || "", "lang": locale.value }, success: (res) => resolve2(res.data), fail: (err) => reject(err) }); }); }; const initData = async () => { loading.value = true; try { const channelRes = await customRequest("wallet/withdrawChannel", "GET"); if (channelRes.code === 0 || channelRes.code === 1) { channelList.value = channelRes.data || []; if (channelList.value.length > 0) { activeChannel.value = channelList.value[0].value; } } await fetchAllAccounts(); } catch (error) { formatAppLog("error", "at pages/WorkModule/my/WalletManagement/index.vue:215", "初始化失败", error); } finally { loading.value = false; } }; const fetchAllAccounts = async () => { var _a2, _b2; try { const [bankRes, addressRes] = await Promise.all([ customRequest("wallet/bankList", "GET"), customRequest("wallet/address", "GET") ]); if (bankRes.code === 0 || bankRes.code === 1) { bankList.value = ((_a2 = bankRes.data) == null ? void 0 : _a2.list) || []; } if (addressRes.code === 0 || addressRes.code === 1) { addressList.value = ((_b2 = addressRes.data) == null ? void 0 : _b2.list) || []; } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/WalletManagement/index.vue:234", "获取账户失败", error); } }; const switchChannel = (val) => { if (activeChannel.value === val) return; activeChannel.value = val; }; const getChannelLabel = (value) => { const target = channelList.value.find((item) => item.value === value); return target ? target.label : value; }; const getBankNamePlaceholder = () => { const current = channelList.value.find((c2) => c2.value === activeChannel.value); if (current && current.label === "支付宝") return t2("例如:支付宝"); return t2("请输入银行名称或平台名"); }; const openModal = (item = null) => { if (item) { form.id = item.id; form.address = item.address || ""; form.bank_name = item.bank_name || ""; form.card_no = item.card_no || ""; form.account = item.account || ""; form.alias = item.alias || ""; } else { form.id = ""; form.address = ""; form.bank_name = ""; form.card_no = ""; form.account = ""; form.alias = ""; } showModal2.value = true; }; const submitForm = async () => { if (isUSDT.value) { if (!form.address) return uni.showToast({ title: t2("请输入提现地址"), icon: "none" }); } else { if (!form.bank_name || !form.card_no || !form.account) { return uni.showToast({ title: t2("请填写所有带 * 的必填项"), icon: "none" }); } } submitLoading.value = true; try { let res; if (isUSDT.value) { const payload = { address: form.address, alias: form.alias }; if (form.id) payload.id = form.id; res = await customRequest("wallet/addAddress", "POST", payload); } else { const payload = { channel: activeChannel.value, bank_name: form.bank_name, card_no: form.card_no, account: form.account, alias: form.alias }; if (form.id) payload.id = form.id; res = await customRequest("wallet/addBank", "POST", payload); } if (res.code === 0 || res.code === 1) { uni.showToast({ title: res.msg || t2("保存成功"), icon: "success" }); showModal2.value = false; uni.showLoading({ title: t2("刷新中..."), mask: true }); await fetchAllAccounts(); uni.hideLoading(); } else { uni.showToast({ title: res.msg || t2("保存失败"), icon: "none" }); } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/WalletManagement/index.vue:318", error); uni.showToast({ title: t2("网络异常,请稍后再试"), icon: "none" }); } finally { submitLoading.value = false; } }; const handleDelete = (id) => { uni.showModal({ title: t2("提示"), content: t2("确认要删除这条账户记录吗?"), confirmText: t2("确定"), cancelText: t2("取消"), success: async (result) => { if (result.confirm) { uni.showLoading({ title: t2("删除中..."), mask: true }); try { let res; if (isUSDT.value) { res = await customRequest("wallet/delAddress", "GET", { id }); } else { res = await customRequest("wallet/delBank", "GET", { id }); } if (res.code === 0 || res.code === 1) { uni.showToast({ title: res.msg || t2("删除成功"), icon: "success" }); await fetchAllAccounts(); } else { uni.showToast({ title: res.msg || t2("删除失败"), icon: "none" }); } } catch (error) { formatAppLog("error", "at pages/WorkModule/my/WalletManagement/index.vue:349", error); } finally { uni.hideLoading(); } } } }); }; const formatCardNo = (no) => { if (!no) return ""; if (no.length > 8) { return no.substring(0, 4) + " **** **** " + no.substring(no.length - 4); } return no; }; const getCardSkin = (channelVal) => { if (channelVal === "USDT") return "usdt-card"; if (channelVal === "DF002") return "bank-card-alipay"; if (channelVal === "DF005") return "bank-card-rmb"; return "bank-card-default"; }; const __returned__ = { t: t2, locale, loading, submitLoading, channelList, activeChannel, bankList, addressList, showModal: showModal2, form, isUSDT, currentAccountList, customRequest, initData, fetchAllAccounts, switchChannel, getChannelLabel, getBankNamePlaceholder, openModal, submitForm, handleDelete, formatCardNo, getCardSkin, ref: vue.ref, reactive: vue.reactive, computed: vue.computed, onMounted: vue.onMounted, get useI18n() { return useI18n; }, get apiUrl() { return apiUrl; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_loading = __unplugin_components_3$3; const _component_u_empty = __unplugin_components_4$2; const _component_u_button = __unplugin_components_2$1; const _component_u_popup = __unplugin_components_2$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("钱包管理") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "wallet-manage-page" }, [ vue.createElementVNode("view", { class: "section-title" }, [ vue.createElementVNode("view", { class: "stick" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("选择提现方式")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "channel-list-container" }, [ $setup.channelList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "channel-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.channelList, (ch) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["channel-item", { "is-active": $setup.activeChannel === ch.value }]), key: ch.value, onClick: ($event) => $setup.switchChannel(ch.value) }, [ vue.createElementVNode( "text", { class: "channel-name" }, vue.toDisplayString(ch.label), 1 /* TEXT */ ), $setup.activeChannel === ch.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "check-ribbon" }, [ vue.createVNode(_component_u_icon, { name: "checkbox-mark", color: "#fff", size: "18", class: "check-icon" }) ])) : vue.createCommentVNode("v-if", true) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "list-content" }, [ $setup.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "loading-wrap" }, [ vue.createVNode(_component_u_loading, { color: "#f8b932", size: "24" }), vue.createElementVNode( "text", { class: "loading-text" }, vue.toDisplayString($setup.t("加载中...")), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createElementVNode("view", { class: "add-btn-card", onClick: _cache[0] || (_cache[0] = ($event) => $setup.openModal(null)) }, [ vue.createVNode(_component_u_icon, { name: "plus", size: "28", color: "#666" }), vue.createElementVNode( "text", { class: "add-text" }, vue.toDisplayString($setup.t("添加账户")), 1 /* TEXT */ ) ]), $setup.currentAccountList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "cards-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.currentAccountList, (item) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["wallet-card", $setup.getCardSkin($setup.activeChannel)]), key: item.id }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode( "text", { class: "bank-name" }, vue.toDisplayString($setup.isUSDT ? "USDT" : item.bank_name), 1 /* TEXT */ ), ($setup.isUSDT ? item.alias : item.channel) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "channel-tag" }, vue.toDisplayString($setup.isUSDT ? item.alias : $setup.getChannelLabel(item.channel)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "card-body" }, [ $setup.isUSDT ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "address-text" }, vue.toDisplayString(item.address), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "card-no" }, vue.toDisplayString($setup.formatCardNo(item.card_no)), 1 /* TEXT */ )) ]), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode( "text", { class: "account-name" }, vue.toDisplayString($setup.isUSDT ? "" : item.account), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "actions" }, [ vue.createElementVNode("view", { class: "action-icon", onClick: ($event) => $setup.openModal(item) }, [ vue.createVNode(_component_u_icon, { name: "edit-pen", size: "20", color: "rgba(255,255,255,0.8)" }) ], 8, ["onClick"]), vue.createElementVNode("view", { class: "action-icon", onClick: ($event) => $setup.handleDelete(item.id) }, [ vue.createVNode(_component_u_icon, { name: "trash", size: "20", color: "rgba(255,255,255,0.8)" }) ], 8, ["onClick"]) ]) ]) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty-box" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无账户记录"), mode: "list" }, null, 8, ["text"]) ])) ], 64 /* STABLE_FRAGMENT */ )) ]), vue.createVNode(_component_u_popup, { modelValue: $setup.showModal, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.showModal = $event), mode: "bottom", round: "16", onClose: _cache[8] || (_cache[8] = ($event) => $setup.showModal = false), closeable: true }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "modal-container" }, [ vue.createElementVNode( "view", { class: "modal-title" }, vue.toDisplayString($setup.form.id ? $setup.t("编辑账户") : $setup.t("添加账户")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "form-body" }, [ $setup.isUSDT ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("USDT 提现地址")) + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "req" }, "*") ]), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.address = $event), class: "app-input", placeholder: $setup.t("请输入准确的 USDT 地址") }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.form.address] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("地址别名 (可选)")), 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.form.alias = $event), class: "app-input", placeholder: $setup.t("如:波场TRC20钱包") }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.form.alias] ]) ]) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("银行名称/平台")) + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "req" }, "*") ]), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.form.bank_name = $event), class: "app-input", placeholder: $setup.getBankNamePlaceholder() }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.form.bank_name] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("收款账号(卡号)")) + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "req" }, "*") ]), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.form.card_no = $event), class: "app-input", placeholder: $setup.t("请输入收款账号或银行卡号") }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.form.card_no] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("真实姓名")) + " ", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "req" }, "*") ]), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.form.account = $event), class: "app-input", placeholder: $setup.t("请输入收款人真实姓名") }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.form.account] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("别名 (可选)")), 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.form.alias = $event), class: "app-input", placeholder: $setup.t("如:我的建行卡") }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.form.alias] ]) ]) ], 64 /* STABLE_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "modal-footer" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", loading: $setup.submitLoading, onClick: $setup.submitForm, "custom-style": { height: "48px", fontSize: "16px", fontWeight: "bold" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("保存")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["loading"]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyWalletManagementIndex = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-098681d1"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/WalletManagement/index.vue"]]); const ToastProps = { ...baseProps, /** 层级 z-index */ zIndex: { type: [Number, String], default: zIndex.toast }, /** 提示类型,success/warning/error/loading 等 */ type: { type: String, default: "" }, /** 显示时长,单位ms。设为 0 表示不自动关闭,需手动调用 hide/close 方法 */ duration: { type: Number, default: 2e3 }, /** 是否显示图标 */ icon: { type: Boolean, default: true }, /** 显示位置,center/top/bottom */ position: { type: String, default: "center" }, /** 关闭时的回调函数 */ callback: { type: Function, default: null }, /** 是否返回上一页 */ back: { type: Boolean, default: false }, /** 是否为tab页面跳转 */ isTab: { type: Boolean, default: false }, /** 跳转的url */ url: { type: String, default: "" }, /** 跳转参数对象 */ params: { type: Object, default: () => ({}) }, /** 是否作为全局根部 toast(通常放在 App.vue 中,给 useToast() 使用) */ global: { type: Boolean, default: false }, /** 是否作为页面级 toast(通常放在页面中,给 useToast({ page: true }) 使用) */ page: { type: Boolean, default: false }, /** 是否为loading “常驻” */ loading: { type: Boolean, default: false } }; const __default__$3 = { name: "u-toast", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({ ...__default__$3, props: ToastProps, setup(__props, { expose: __expose }) { const props = __props; const isShow = vue.ref(false); let timer = null; const config2 = vue.computed(() => { return { zIndex: props.zIndex, // z-index值 type: props.type, // 主题类型,primary,success,error,warning,black duration: props.duration, // 显示的时间,毫秒 icon: props.icon, // 显示的图标 position: props.position, // toast出现的位置 callback: props.callback, // 执行完后的回调函数 back: props.back, // 结束toast是否自动返回上一页 isTab: props.isTab, // 是否跳转tab页面 url: props.url, // toast消失后是否跳转页面,有则跳转,优先级高于back参数 params: props.params, // URL跳转的参数,对象 loading: props.loading, title: "" // 显示文本 }; }); const tmpConfig = vue.ref({ ...config2.value }); const iconName = vue.computed(() => { if (["error", "warning", "success", "info"].indexOf(tmpConfig.value.type) >= 0 && tmpConfig.value.icon) { let icon = $u.type2icon(tmpConfig.value.type); return icon; } return ""; }); const uZIndex = vue.computed(() => { return isShow.value ? props.zIndex ? props.zIndex : $u.zIndex.toast : "999999"; }); function show(options) { tmpConfig.value = $u.deepMerge(config2.value, options); if (timer) { clearTimeout(timer); timer = null; } isShow.value = true; if (tmpConfig.value.duration > 0) { timer = setTimeout(() => { isShow.value = false; clearTimeout(timer); timer = null; typeof tmpConfig.value.callback === "function" && tmpConfig.value.callback(); timeEnd(); }, tmpConfig.value.duration); } } function hide() { isShow.value = false; if (timer) { clearTimeout(timer); timer = null; } } function timeEnd() { if (tmpConfig.value.url) { if (tmpConfig.value.url[0] != "/") tmpConfig.value.url = "/" + tmpConfig.value.url; if (Object.keys(tmpConfig.value.params).length) { let query = ""; if (/.*\/.*\?.*=.*/.test(tmpConfig.value.url)) { query = $u.queryParams(tmpConfig.value.params, false); tmpConfig.value.url = tmpConfig.value.url + "&" + query; } else { query = $u.queryParams(tmpConfig.value.params); tmpConfig.value.url += query; } } if (tmpConfig.value.isTab) { uni.switchTab({ url: tmpConfig.value.url }); } else { uni.navigateTo({ url: tmpConfig.value.url }); } } else if (tmpConfig.value.back) { $u.route({ type: "back" }); } } function onServiceShow(payload) { show(payload || {}); } function onServiceHide() { hide(); } const isGlobal = vue.computed(() => props.global); const isPage = vue.computed(() => props.page); const showEvent = vue.computed(() => isGlobal.value ? U_TOAST_GLOBAL_EVENT_SHOW : isPage.value ? U_TOAST_EVENT_SHOW : ""); const hideEvent = vue.computed(() => isGlobal.value ? U_TOAST_GLOBAL_EVENT_HIDE : isPage.value ? U_TOAST_EVENT_HIDE : ""); vue.onMounted(() => { if (showEvent.value) { (uni == null ? void 0 : uni.$on) && uni.$on(showEvent.value, onServiceShow); } if (hideEvent.value) { (uni == null ? void 0 : uni.$on) && uni.$on(hideEvent.value, onServiceHide); } }); vue.onBeforeUnmount(() => { if (showEvent.value) { (uni == null ? void 0 : uni.$off) && uni.$off(showEvent.value, onServiceShow); } if (hideEvent.value) { (uni == null ? void 0 : uni.$off) && uni.$off(hideEvent.value, onServiceHide); } }); __expose({ show, hide, close: hide }); const __returned__ = { props, isShow, get timer() { return timer; }, set timer(v) { timer = v; }, config: config2, tmpConfig, iconName, uZIndex, show, hide, timeEnd, onServiceShow, onServiceHide, isGlobal, isPage, showEvent, hideEvent, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_loading = __unplugin_components_3$3; const _component_u_icon = __unplugin_components_0$5; const _component_u_mask = __unplugin_components_2$4; return vue.openBlock(), vue.createBlock(_component_u_mask, { "z-index": $setup.uZIndex, show: $setup.isShow, "custom-style": "background-color:transparent;" }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-toast", [ $setup.isShow ? "u-show" : "", "u-type-" + $setup.tmpConfig.type, "u-position-" + $setup.tmpConfig.position, _ctx.customClass ]]), style: vue.normalizeStyle($setup.$u.toStyle({ zIndex: $setup.uZIndex }, _ctx.customStyle)) }, [ vue.createElementVNode("view", { class: "u-icon-wrap" }, [ vue.createCommentVNode(" loading 类型走独立的加载动画组件 "), $setup.tmpConfig.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading, { key: 0, mode: "circle", "custom-style": "margin-right: 16rpx;", color: $setup.$u.color[$setup.tmpConfig.type] }, null, 8, ["color"])) : $setup.tmpConfig.icon && $setup.iconName ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 其它类型仍然使用图标 "), vue.createVNode(_component_u_icon, { "custom-class": "u-toast_icon", "custom-style": "margin-right: 10rpx;", name: $setup.iconName, size: 40, color: $setup.tmpConfig.type }, null, 8, ["name", "color"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "text", { class: "u-text" }, vue.toDisplayString($setup.tmpConfig.title), 1 /* TEXT */ ) ], 6 /* CLASS, STYLE */ ) ]), _: 1 /* STABLE */ }, 8, ["z-index", "show"]); } const __unplugin_components_4 = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__scopeId", "data-v-b09e1691"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-toast/u-toast.vue"]]); const FormProps = { ...baseProps, /** 当前form的需要验证字段的集合 */ model: { type: Object, default: () => ({}) }, /** 表单验证规则 */ rules: { type: Object, default: () => ({}) }, /** 有错误时的提示方式,message-提示信息,border-如果input设置了边框,变成呈红色,border-bottom-下边框呈现红色,none-无提示 */ errorType: { type: Array, default: () => ["message", "toast"] }, /** 是否显示表单域的下划线边框 */ borderBottom: { type: Boolean, default: true }, /** label的位置,left-左边,top-上边 */ labelPosition: { type: String, default: "left" }, /** label的宽度,单位rpx */ labelWidth: { type: [String, Number], default: 90 }, /** label字体的对齐方式 */ labelAlign: { type: String, default: "left" }, /** label的样式,对象形式 */ labelStyle: { type: Object, default: () => ({}) } }; const __default__$2 = { name: "u-form", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({ ...__default__$2, props: FormProps, setup(__props, { expose: __expose }) { const props = __props; useParent("u-form"); const fields = vue.ref([]); const rules2 = vue.ref(props.rules); function setRules(newRules) { rules2.value = newRules; } function resetFields() { fields.value.forEach((field) => { field.resetField && field.resetField(); }); } function validate(callback) { return new Promise((resolve2) => { let valid = true; let count = 0; let errorArr = []; if (fields.value.length === 0) { resolve2(true); if (typeof callback === "function") callback(true, []); return; } fields.value.forEach((field) => { field.validation && field.validation("", (error) => { if (error) { valid = false; errorArr.push({ prop: field.prop, message: error }); } if (++count === fields.value.length) { resolve2(valid); if (props.errorType.indexOf("none") === -1 && props.errorType.indexOf("toast") >= 0 && errorArr.length > 0) { errorArr[0].message && $u.toast(errorArr[0].message); } if (typeof callback === "function") callback(valid, errorArr); } }); }); }); } __expose({ setRules, resetFields, validate, addField(field) { if (!fields.value.includes(field)) fields.value.push(field); }, removeField(field) { fields.value = fields.value.filter((f) => f.prop !== field.prop); }, fields, rules: rules2, props, model: vue.computed(() => props.model) }); const __returned__ = { props, fields, rules: rules2, setRules, resetFields, validate, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-form", _ctx.customClass]), style: vue.normalizeStyle($setup.$u.toStyle(_ctx.customStyle)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_2 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-c53c6302"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-form/u-form.vue"]]); var define_process_env_default = {}; function _extends() { return (_extends = Object.assign || function(e) { for (var r = 1; r < arguments.length; r++) { var t2, n = arguments[r]; for (t2 in n) Object.prototype.hasOwnProperty.call(n, t2) && (e[t2] = n[t2]); } return e; }).apply(this, arguments); } var formatRegExp = /%[sdj%]/g, warning = function() { }; function convertFieldsError(e) { if (!e || !e.length) return null; var t2 = {}; return e.forEach(function(e2) { var r = e2.field; t2[r] = t2[r] || [], t2[r].push(e2); }), t2; } function format() { for (var e = arguments.length, r = new Array(e), t2 = 0; t2 < e; t2++) r[t2] = arguments[t2]; var n = 1, a = r[0], i = r.length; if ("function" == typeof a) return a.apply(null, r.slice(1)); if ("string" != typeof a) return a; for (var s = String(a).replace(formatRegExp, function(e2) { if ("%%" === e2) return "%"; if (i <= n) return e2; switch (e2) { case "%s": return String(r[n++]); case "%d": return Number(r[n++]); case "%j": try { return JSON.stringify(r[n++]); } catch (e3) { return "[Circular]"; } break; default: return e2; } }), u2 = r[n]; n < i; u2 = r[++n]) s += " " + u2; return s; } function isNativeStringType(e) { return "string" === e || "url" === e || "hex" === e || "email" === e || "pattern" === e; } function isEmptyValue(e, r) { return null == e || (!("array" !== r || !Array.isArray(e) || e.length) || !(!isNativeStringType(r) || "string" != typeof e || e)); } function asyncParallelArray(e, r, t2) { var n = [], a = 0, i = e.length; function s(e2) { n.push.apply(n, e2), ++a === i && t2(n); } e.forEach(function(e2) { r(e2, s); }); } function asyncSerialArray(t2, n, a) { var i = 0, s = t2.length; !function e(r) { r && r.length ? a(r) : (r = i, i += 1, r < s ? n(t2[r], e) : a([])); }([]); } function flattenObjArr(r) { var t2 = []; return Object.keys(r).forEach(function(e) { t2.push.apply(t2, r[e]); }), t2; } function asyncMap(a, e, i, s) { if (e.first) { var r = new Promise(function(r2, t2) { asyncSerialArray(flattenObjArr(a), i, function(e2) { return s(e2), e2.length ? t2({ errors: e2, fields: convertFieldsError(e2) }) : r2(); }); }); return r.catch(function(e2) { return e2; }), r; } var u2 = e.firstFields || []; true === u2 && (u2 = Object.keys(a)); var o = Object.keys(a), l = o.length, f = 0, p = [], e = new Promise(function(r2, t2) { function n(e2) { if (p.push.apply(p, e2), ++f === l) return s(p), p.length ? t2({ errors: p, fields: convertFieldsError(p) }) : r2(); } o.length || (s(p), r2()), o.forEach(function(e2) { var r3 = a[e2]; (-1 !== u2.indexOf(e2) ? asyncSerialArray : asyncParallelArray)(r3, i, n); }); }); return e.catch(function(e2) { return e2; }), e; } function complementError(r) { return function(e) { return e && e.message ? (e.field = e.field || r.fullField, e) : { message: "function" == typeof e ? e() : e, field: e.field || r.fullField }; }; } function deepMerge(e, r) { if (r) for (var t2 in r) { var n; r.hasOwnProperty(t2) && ("object" == typeof (n = r[t2]) && "object" == typeof e[t2] ? e[t2] = _extends({}, e[t2], {}, n) : e[t2] = n); } return e; } function required(e, r, t2, n, a, i) { !e.required || t2.hasOwnProperty(e.field) && !isEmptyValue(r, i || e.type) || n.push(format(a.messages.required, e.fullField)); } function whitespace(e, r, t2, n, a) { !/^\s+$/.test(r) && "" !== r || n.push(format(a.messages.whitespace, e.fullField)); } "undefined" != typeof process && define_process_env_default && true && "undefined" != typeof window && "undefined" != typeof document && (warning = function(e, r) { "undefined" != typeof console && console.warn && r.every(function(e2) { return "string" == typeof e2; }) && console.warn(e, r); }); var pattern = { email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"), hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i }, types = { integer: function(e) { return types.number(e) && parseInt(e, 10) === e; }, float: function(e) { return types.number(e) && !types.integer(e); }, array: function(e) { return Array.isArray(e); }, regexp: function(e) { if (e instanceof RegExp) return true; try { return !!new RegExp(e); } catch (e2) { return false; } }, date: function(e) { return "function" == typeof e.getTime && "function" == typeof e.getMonth && "function" == typeof e.getYear; }, number: function(e) { return !isNaN(e) && "number" == typeof +e; }, object: function(e) { return "object" == typeof e && !types.array(e); }, method: function(e) { return "function" == typeof e; }, email: function(e) { return "string" == typeof e && !!e.match(pattern.email) && e.length < 255; }, url: function(e) { return "string" == typeof e && !!e.match(pattern.url); }, hex: function(e) { return "string" == typeof e && !!e.match(pattern.hex); } }; function type(e, r, t2, n, a) { e.required && void 0 === r ? required(e, r, t2, n, a) : (t2 = e.type, -1 < ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"].indexOf(t2) ? types[t2](r) || n.push(format(a.messages.types[t2], e.fullField, e.type)) : t2 && typeof r !== e.type && n.push(format(a.messages.types[t2], e.fullField, e.type))); } function range(e, r, t2, n, a) { var i = "number" == typeof e.len, s = "number" == typeof e.min, u2 = "number" == typeof e.max, o = r, l = null, f = "number" == typeof r, p = "string" == typeof r, d = Array.isArray(r); if (f ? l = "number" : p ? l = "string" : d && (l = "array"), !l) return false; d && (o = r.length), p && (o = r.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length), i ? o !== e.len && n.push(format(a.messages[l].len, e.fullField, e.len)) : s && !u2 && o < e.min ? n.push(format(a.messages[l].min, e.fullField, e.min)) : u2 && !s && o > e.max ? n.push(format(a.messages[l].max, e.fullField, e.max)) : s && u2 && (o < e.min || o > e.max) && n.push(format(a.messages[l].range, e.fullField, e.min, e.max)); } var ENUM = "enum"; function enumerable(e, r, t2, n, a) { e[ENUM] = Array.isArray(e[ENUM]) ? e[ENUM] : [], -1 === e[ENUM].indexOf(r) && n.push(format(a.messages[ENUM], e.fullField, e[ENUM].join(", "))); } function pattern$1(e, r, t2, n, a) { e.pattern && (e.pattern instanceof RegExp ? (e.pattern.lastIndex = 0, e.pattern.test(r) || n.push(format(a.messages.pattern.mismatch, e.fullField, r, e.pattern))) : "string" == typeof e.pattern && (new RegExp(e.pattern).test(r) || n.push(format(a.messages.pattern.mismatch, e.fullField, r, e.pattern)))); } var rules = { required, whitespace, type, range, enum: enumerable, pattern: pattern$1 }; function string(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r, "string") && !e.required) return t2(); rules.required(e, r, n, i, a, "string"), isEmptyValue(r, "string") || (rules.type(e, r, n, i, a), rules.range(e, r, n, i, a), rules.pattern(e, r, n, i, a), true === e.whitespace && rules.whitespace(e, r, n, i, a)); } t2(i); } function method(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r) && !e.required) return t2(); rules.required(e, r, n, i, a), void 0 !== r && rules.type(e, r, n, i, a); } t2(i); } function number(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if ("" === r && (r = void 0), isEmptyValue(r) && !e.required) return t2(); rules.required(e, r, n, i, a), void 0 !== r && (rules.type(e, r, n, i, a), rules.range(e, r, n, i, a)); } t2(i); } function _boolean(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r) && !e.required) return t2(); rules.required(e, r, n, i, a), void 0 !== r && rules.type(e, r, n, i, a); } t2(i); } function regexp(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r) && !e.required) return t2(); rules.required(e, r, n, i, a), isEmptyValue(r) || rules.type(e, r, n, i, a); } t2(i); } function integer(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r) && !e.required) return t2(); rules.required(e, r, n, i, a), void 0 !== r && (rules.type(e, r, n, i, a), rules.range(e, r, n, i, a)); } t2(i); } function floatFn(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r) && !e.required) return t2(); rules.required(e, r, n, i, a), void 0 !== r && (rules.type(e, r, n, i, a), rules.range(e, r, n, i, a)); } t2(i); } function array(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r, "array") && !e.required) return t2(); rules.required(e, r, n, i, a, "array"), isEmptyValue(r, "array") || (rules.type(e, r, n, i, a), rules.range(e, r, n, i, a)); } t2(i); } function object(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r) && !e.required) return t2(); rules.required(e, r, n, i, a), void 0 !== r && rules.type(e, r, n, i, a); } t2(i); } var ENUM$1 = "enum"; function enumerable$1(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r) && !e.required) return t2(); rules.required(e, r, n, i, a), void 0 !== r && rules[ENUM$1](e, r, n, i, a); } t2(i); } function pattern$2(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r, "string") && !e.required) return t2(); rules.required(e, r, n, i, a), isEmptyValue(r, "string") || rules.pattern(e, r, n, i, a); } t2(i); } function date(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r) && !e.required) return t2(); rules.required(e, r, n, i, a), isEmptyValue(r) || (r = "number" == typeof r ? new Date(r) : r, rules.type(e, r, n, i, a), r && rules.range(e, r.getTime(), n, i, a)); } t2(i); } function required$1(e, r, t2, n, a) { var i = [], s = Array.isArray(r) ? "array" : typeof r; rules.required(e, r, n, i, a, s), t2(i); } function type$1(e, r, t2, n, a) { var i = e.type, s = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r, i) && !e.required) return t2(); rules.required(e, r, n, s, a, i), isEmptyValue(r, i) || rules.type(e, r, n, s, a); } t2(s); } function any(e, r, t2, n, a) { var i = []; if (e.required || !e.required && n.hasOwnProperty(e.field)) { if (isEmptyValue(r) && !e.required) return t2(); rules.required(e, r, n, i, a); } t2(i); } var validators = { string, method, number, boolean: _boolean, regexp, integer, float: floatFn, array, object, enum: enumerable$1, pattern: pattern$2, date, url: type$1, hex: type$1, email: type$1, required: required$1, any }; function newMessages() { return { default: "Validation error on field %s", required: "%s is required", enum: "%s must be one of %s", whitespace: "%s cannot be empty", date: { format: "%s date %s is invalid for format %s", parse: "%s date could not be parsed, %s is invalid ", invalid: "%s date %s is invalid" }, types: { string: "%s is not a %s", method: "%s is not a %s (function)", array: "%s is not an %s", object: "%s is not an %s", number: "%s is not a %s", date: "%s is not a %s", boolean: "%s is not a %s", integer: "%s is not an %s", float: "%s is not a %s", regexp: "%s is not a valid %s", email: "%s is not a valid %s", url: "%s is not a valid %s", hex: "%s is not a valid %s" }, string: { len: "%s must be exactly %s characters", min: "%s must be at least %s characters", max: "%s cannot be longer than %s characters", range: "%s must be between %s and %s characters" }, number: { len: "%s must equal %s", min: "%s cannot be less than %s", max: "%s cannot be greater than %s", range: "%s must be between %s and %s" }, array: { len: "%s must be exactly %s in length", min: "%s cannot be less than %s in length", max: "%s cannot be greater than %s in length", range: "%s must be between %s and %s in length" }, pattern: { mismatch: "%s value %s does not match pattern %s" }, clone: function() { var e = JSON.parse(JSON.stringify(this)); return e.clone = this.clone, e; } }; } var messages = newMessages(); function Schema(e) { this.rules = null, this._messages = messages, this.define(e); } Schema.prototype = { messages: function(e) { return e && (this._messages = deepMerge(newMessages(), e)), this._messages; }, define: function(e) { if (!e) throw new Error("Cannot configure a schema with no rules"); if ("object" != typeof e || Array.isArray(e)) throw new Error("Rules must be an object"); var r, t2; for (r in this.rules = {}, e) e.hasOwnProperty(r) && (t2 = e[r], this.rules[r] = Array.isArray(t2) ? t2 : [t2]); }, validate: function(t2, e, r) { var n = this; void 0 === e && (e = {}), void 0 === r && (r = function() { }); var a, i, s = t2, p = e, u2 = r; if ("function" == typeof p && (u2 = p, p = {}), !this.rules || 0 === Object.keys(this.rules).length) return u2 && u2(), Promise.resolve(); p.messages ? ((r = this.messages()) === messages && (r = newMessages()), deepMerge(r, p.messages), p.messages = r) : p.messages = this.messages(); var o = {}; (p.keys || Object.keys(this.rules)).forEach(function(r2) { a = n.rules[r2], i = s[r2], a.forEach(function(e2) { "function" == typeof e2.transform && (s === t2 && (s = _extends({}, s)), i = s[r2] = e2.transform(i)), (e2 = "function" == typeof e2 ? { validator: e2 } : _extends({}, e2)).validator = n.getValidationMethod(e2), e2.field = r2, e2.fullField = e2.fullField || r2, e2.type = n.getType(e2), e2.validator && (o[r2] = o[r2] || [], o[r2].push({ rule: e2, value: i, source: s, field: r2 })); }); }); var d = {}; return asyncMap(o, p, function(s2, u22) { var e2, o2 = s2.rule, l = !("object" !== o2.type && "array" !== o2.type || "object" != typeof o2.fields && "object" != typeof o2.defaultField); function f(e3, r3) { return _extends({}, r3, { fullField: o2.fullField + "." + e3 }); } function r2(e3) { void 0 === e3 && (e3 = []); var t22 = e3; if (Array.isArray(t22) || (t22 = [t22]), !p.suppressWarning && t22.length && Schema.warning("async-validator:", t22), t22.length && o2.message && (t22 = [].concat(o2.message)), t22 = t22.map(complementError(o2)), p.first && t22.length) return d[o2.field] = 1, u22(t22); if (l) { if (o2.required && !s2.value) return t22 = o2.message ? [].concat(o2.message).map(complementError(o2)) : p.error ? [p.error(o2, format(p.messages.required, o2.field))] : [], u22(t22); var r3, n2, a2 = {}; if (o2.defaultField) for (var i2 in s2.value) s2.value.hasOwnProperty(i2) && (a2[i2] = o2.defaultField); for (r3 in a2 = _extends({}, a2, {}, s2.rule.fields)) a2.hasOwnProperty(r3) && (n2 = Array.isArray(a2[r3]) ? a2[r3] : [a2[r3]], a2[r3] = n2.map(f.bind(null, r3))); e3 = new Schema(a2); e3.messages(p.messages), s2.rule.options && (s2.rule.options.messages = p.messages, s2.rule.options.error = p.error), e3.validate(s2.value, s2.rule.options || p, function(e4) { var r4 = []; t22 && t22.length && r4.push.apply(r4, t22), e4 && e4.length && r4.push.apply(r4, e4), u22(r4.length ? r4 : null); }); } else u22(t22); } l = l && (o2.required || !o2.required && s2.value), o2.field = s2.field, o2.asyncValidator ? e2 = o2.asyncValidator(o2, s2.value, r2, s2.source, p) : o2.validator && (true === (e2 = o2.validator(o2, s2.value, r2, s2.source, p)) ? r2() : false === e2 ? r2(o2.message || o2.field + " fails") : e2 instanceof Array ? r2(e2) : e2 instanceof Error && r2(e2.message)), e2 && e2.then && e2.then(function() { return r2(); }, r2); }, function(e2) { !function(e3) { var r2, t22, n2 = [], a2 = {}; for (r2 = 0; r2 < e3.length; r2++) t22 = e3[r2], Array.isArray(t22) ? n2 = n2.concat.apply(n2, t22) : n2.push(t22); a2 = n2.length ? convertFieldsError(n2) : n2 = null, u2(n2, a2); }(e2); }); }, getType: function(e) { if (void 0 === e.type && e.pattern instanceof RegExp && (e.type = "pattern"), "function" != typeof e.validator && e.type && !validators.hasOwnProperty(e.type)) throw new Error(format("Unknown rule type %s", e.type)); return e.type || "string"; }, getValidationMethod: function(e) { if ("function" == typeof e.validator) return e.validator; var r = Object.keys(e), t2 = r.indexOf("message"); return -1 !== t2 && r.splice(t2, 1), 1 === r.length && "required" === r[0] ? validators.required : validators[this.getType(e)] || false; } }, Schema.register = function(e, r) { if ("function" != typeof r) throw new Error("Cannot register a validator by type, validator is not a function"); validators[e] = r; }, Schema.warning = warning, Schema.messages = messages; const FormItemProps = { ...baseProps, /** input的label提示语 */ label: { type: String, default: "" }, /** 绑定的值 */ prop: { type: String, default: "" }, /** 是否显示表单域的下划线边框 */ borderBottom: { type: [String, Boolean], default: "" }, /** label的位置,left-左边,top-上边 */ labelPosition: { type: String, default: "" }, /** label的宽度,单位rpx */ labelWidth: { type: [String, Number], default: "" }, /** label的样式,对象形式 */ labelStyle: { type: Object, default: () => ({}) }, /** label字体的对齐方式 */ labelAlign: { type: String, default: "" }, /** 右侧图标 */ rightIcon: { type: String, default: "" }, /** 左侧图标 */ leftIcon: { type: String, default: "" }, /** 左侧图标的样式 */ leftIconStyle: { type: Object, default: () => ({}) }, /** 右侧图标的样式 */ rightIconStyle: { type: Object, default: () => ({}) }, /** 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置 */ required: { type: Boolean, default: false } }; const __default__$1 = { name: "u-form-item", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({ ...__default__$1, props: FormItemProps, setup(__props, { expose: __expose }) { Schema.warning = function() { }; const { broadcast } = useParent("u-form-item"); const props = __props; const $slots = vue.useSlots(); const { parentExposed } = useChildren("u-form-item", "u-form"); const initialValue = vue.ref(""); const validateState = vue.ref(""); const validateMessage = vue.ref(""); const errorType = vue.ref(["message"]); const fieldValue = vue.ref(""); const parentData = vue.ref({ borderBottom: true, // 父表单下划线边框 labelWidth: 90, // 父表单 label 宽度 labelPosition: "left", // 父表单 label 位置 labelStyle: {}, // 父表单 label 样式 labelAlign: "left" // 父表单 label 对齐 }); const showError = vue.computed(() => (type2) => { if (errorType.value.indexOf("none") >= 0) return false; else if (errorType.value.indexOf(type2) >= 0) return true; else return false; }); vue.watch(validateState, () => { broadcastInputError(); }); vue.watch( () => { var _a2, _b2; return (_b2 = (_a2 = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a2.props) == null ? void 0 : _b2.errorType; }, (val) => { if (val) errorType.value = val; broadcastInputError(); }, { immediate: true } ); const uLabelWidth = vue.computed(() => { return elLabelPosition.value == "left" ? (props.label === "true" || props.label === "") && !$slots.label ? "auto" : $u.addUnit(elLabelWidth.value) : "100%"; }); const elLabelWidth = vue.computed(() => { return props.labelWidth != 0 && props.labelWidth !== "" ? props.labelWidth : parentData.value.labelWidth ? parentData.value.labelWidth : 90; }); const elLabelStyle = vue.computed(() => { return Object.keys(props.labelStyle).length ? props.labelStyle : parentData.value.labelStyle ? parentData.value.labelStyle : {}; }); const elLabelPosition = vue.computed(() => { return props.labelPosition ? props.labelPosition : parentData.value.labelPosition ? parentData.value.labelPosition : "left"; }); const elLabelAlign = vue.computed(() => { return props.labelAlign ? props.labelAlign : parentData.value.labelAlign ? parentData.value.labelAlign : "left"; }); const elBorderBottom = vue.computed(() => { return props.borderBottom !== "" ? props.borderBottom : parentData.value.borderBottom ? parentData.value.borderBottom : true; }); function broadcastInputError() { broadcast("onFormItemError", validateState.value === "error" && showError.value("border")); } function getPropByPath(obj, path) { if (!obj || !path) return { o: obj, k: "", v: void 0 }; const paths = path.split("."); let current = obj; let key = ""; for (let i = 0; i < paths.length; i++) { key = paths[i]; if (!current) break; if (i === paths.length - 1) { return { o: current, k: key, v: current[key] }; } current = current[key]; } return { o: current, k: key, v: void 0 }; } function getRules() { var _a2, _b2; let rules2 = ((_b2 = (_a2 = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a2.rules) == null ? void 0 : _b2.value) || {}; rules2 = rules2 ? rules2[props.prop] || getPropByPath(rules2, props.prop.replace(/(\.|^)(\d+)\./, ".defaultField.fields.")).v : []; return [].concat(rules2 || []); } function onFieldBlur() { validation("blur"); } function onFieldChange() { validation("change"); } function onFormBlur() { onFieldBlur(); } function onFormChange() { onFieldChange(); } function getFilteredRule(triggerType = "") { const rules2 = getRules(); if (!triggerType) return rules2; return rules2.filter((res) => res.trigger && res.trigger.indexOf(triggerType) !== -1); } function validation(trigger, callback = () => { }) { var _a2, _b2; const propPath = getPropByPath((_b2 = (_a2 = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a2.model) == null ? void 0 : _b2.value, props.prop); fieldValue.value = propPath.v; let rules2 = getFilteredRule(trigger); if (!rules2 || rules2.length === 0) { callback(""); return; } validateState.value = "validating"; let validator = new Schema({ [props.prop]: rules2 }); validator.validate({ [props.prop]: fieldValue.value }, { firstFields: true }, (errors) => { validateState.value = !errors ? "success" : "error"; validateMessage.value = errors ? errors[0].message : ""; callback(validateMessage.value); }); } function resetField() { var _a2, _b2; if (((_b2 = (_a2 = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a2.model) == null ? void 0 : _b2.value) && props.prop) { const propPath = getPropByPath(parentExposed.value.model.value, props.prop); if (propPath.o && propPath.k) { propPath.o[propPath.k] = initialValue.value; } } setTimeout(() => { validateState.value = "success"; }, 50); } vue.onMounted(() => { vue.nextTick(() => { var _a2, _b2, _c, _d, _e; if (parentExposed.value) { Object.keys(parentData.value).forEach((key) => { var _a3; parentData.value[key] = (_a3 = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a3.props[key]; }); if (props.prop) { ((_a2 = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a2.addField) && ((_b2 = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _b2.addField({ validation, resetField, prop: props.prop })); errorType.value = ((_c = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _c.errorType) || errorType.value; const propPath = getPropByPath((_e = (_d = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _d.model) == null ? void 0 : _e.value, props.prop); fieldValue.value = propPath.v; initialValue.value = fieldValue.value; } } }); }); vue.onBeforeUnmount(() => { var _a2; if ((parentExposed == null ? void 0 : parentExposed.value) && props.prop) { (_a2 = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a2.removeField({ prop: props.prop }); } }); __expose({ validation, resetField, onFormBlur, onFormChange }); const __returned__ = { broadcast, props, $slots, parentExposed, initialValue, validateState, validateMessage, errorType, fieldValue, parentData, showError, uLabelWidth, elLabelWidth, elLabelStyle, elLabelPosition, elLabelAlign, elBorderBottom, broadcastInputError, getPropByPath, getRules, onFieldBlur, onFieldChange, onFormBlur, onFormChange, getFilteredRule, validation, resetField, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-form-item", [ { "u-border-bottom": $setup.elBorderBottom, "u-form-item__border-bottom--error": $setup.validateState === "error" && $setup.showError("border-bottom"), "u-form-item__border--error": $setup.validateState === "error" && $setup.showError("border") }, _ctx.customClass ]]), style: vue.normalizeStyle($setup.$u.toStyle(_ctx.customStyle)) }, [ vue.createElementVNode( "view", { class: "u-form-item__body", style: vue.normalizeStyle({ flexDirection: $setup.elLabelPosition == "left" ? "row" : "column" }) }, [ vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '), vue.createElementVNode( "view", { class: "u-form-item--left", style: vue.normalizeStyle({ width: $setup.uLabelWidth, flex: `0 0 ${$setup.uLabelWidth}`, marginBottom: $setup.elLabelPosition == "left" ? 0 : "10rpx" }) }, [ vue.createCommentVNode(" 为了块对齐 "), _ctx.required || _ctx.leftIcon || _ctx.label || $setup.$slots.label ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-form-item--left__content" }, [ vue.createCommentVNode(" nvue不支持伪元素before "), _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "u-form-item--left__content--required" }, "*")) : vue.createCommentVNode("v-if", true), _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-form-item--left__content__icon" }, [ vue.createVNode(_component_u_icon, { name: _ctx.leftIcon, "custom-style": _ctx.leftIconStyle }, null, 8, ["name", "custom-style"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-form-item--left__content__label", style: vue.normalizeStyle([ $setup.elLabelStyle, { "justify-content": $setup.elLabelAlign == "left" ? "flex-start" : $setup.elLabelAlign == "center" ? "center" : "flex-end" } ]) }, [ vue.renderSlot(_ctx.$slots, "label", {}, () => [ vue.createTextVNode( vue.toDisplayString(_ctx.label), 1 /* TEXT */ ) ], true) ], 4 /* STYLE */ ) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createElementVNode("view", { class: "u-form-item--right u-flex" }, [ vue.createElementVNode("view", { class: "u-form-item--right__content" }, [ vue.createElementVNode("view", { class: "u-form-item--right__content__slot" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), $setup.$slots.right || _ctx.rightIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-form-item--right__content__icon u-flex" }, [ _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, "custom-style": _ctx.rightIconStyle, name: _ctx.rightIcon }, null, 8, ["custom-style", "name"])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true) ]) ]) ], 4 /* STYLE */ ), $setup.validateState === "error" && $setup.showError("message") ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-form-item__message", style: vue.normalizeStyle({ paddingLeft: $setup.elLabelPosition == "left" ? $setup.$u.addUnit($setup.elLabelWidth) : "0" }) }, vue.toDisplayString($setup.validateMessage), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const __unplugin_components_1 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-759dc3ff"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-form-item/u-form-item.vue"]]); const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const uToastRef = vue.ref(); const form = vue.reactive({ old_password: "", // 旧密码 new_password: "", // 新密码 confirmPassword: "" // 确认密码(仅前端校验) }); const validateForm = () => { if (!form.old_password) { uni.showToast({ title: t2("请输入旧密码"), icon: "none" }); return false; } if (!form.new_password) { uni.showToast({ title: t2("请输入新密码"), icon: "none" }); return false; } if (form.new_password.length < 6) { uni.showToast({ title: t2("新密码长度不能少于") + 6 + t2("位"), icon: "none" }); return false; } if (!form.confirmPassword) { uni.showToast({ title: t2("请再次输入确认密码"), icon: "none" }); return false; } if (form.confirmPassword !== form.new_password) { uni.showToast({ title: t2("两次输入的新密码不一致"), icon: "none" }); return false; } if (form.old_password === form.new_password) { uni.showToast({ title: t2("新密码不能与旧密码相同"), icon: "none" }); return false; } return true; }; const handleResetPassword = () => { if (!validateForm()) return; const requestData = { old_password: form.old_password, new_password: form.new_password }; resetPassword(requestData).then(() => { uni.removeStorageSync("token"); uni.removeStorageSync("user_info"); let timer = setTimeout(() => { clearTimeout(timer); router.replaceAll({ name: "login" }); }, 1500); }); }; const __returned__ = { t: t2, uToastRef, form, validateForm, handleResetPassword }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_input = __unplugin_components_3$2; const _component_u_form_item = __unplugin_components_1; const _component_u_form = __unplugin_components_2; const _component_u_button = __unplugin_components_2$1; const _component_u_toast = __unplugin_components_4; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("修改密码"), class: "safety-page" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "reset-password-container" }, [ vue.createVNode(_component_u_form, { model: $setup.form, ref: "uFormRef", "label-position": "top" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_form_item, { label: $setup.t("旧密码"), prop: "old_password", "border-bottom": "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { type: "password", modelValue: $setup.form.old_password, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.old_password = $event), placeholder: $setup.t("请输入旧密码"), "password-icon": true, clearable: false }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_u_form_item, { label: $setup.t("新密码"), prop: "new_password", "border-bottom": "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { type: "password", modelValue: $setup.form.new_password, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.new_password = $event), placeholder: $setup.t("请输入新密码(至少6位)"), "password-icon": true, clearable: false }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_u_form_item, { label: $setup.t("确认新密码"), prop: "confirmPassword", "border-bottom": "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { type: "password", modelValue: $setup.form.confirmPassword, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.form.confirmPassword = $event), placeholder: $setup.t("请再次输入新密码"), "password-icon": true, clearable: false }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), _: 1 /* STABLE */ }, 8, ["model"]), vue.createElementVNode("view", { class: "btn-wrap" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "reset-btn", onClick: $setup.handleResetPassword }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("确认修改")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]), vue.createVNode( _component_u_toast, { ref: "uToastRef" }, null, 512 /* NEED_PATCH */ ) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyChangePasswordIndex = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-c14ec030"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/changePassword/index.vue"]]); const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const uToastRef = vue.ref(); const form = vue.reactive({ old_password: "", // 旧密码(可选) password: "", // 新资金密码(必需) confirmPassword: "" // 确认密码(仅前端校验) }); const validateForm = () => { if (!form.password) { uni.showToast({ title: t2("请输入新资金密码"), icon: "none" }); return false; } if (form.password.length < 6) { uni.showToast({ title: t2("新资金密码长度不能少于6位"), icon: "none" }); return false; } if (!form.confirmPassword) { uni.showToast({ title: t2("请再次输入确认密码"), icon: "none" }); return false; } if (form.confirmPassword !== form.password) { uni.showToast({ title: t2("两次输入的新资金密码不一致"), icon: "none" }); return false; } if (form.old_password && form.old_password === form.password) { uni.showToast({ title: t2("新资金密码不能与旧密码相同"), icon: "none" }); return false; } return true; }; const handleModifySafeWord = () => { if (!validateForm()) return; const requestData = { password: form.password }; if (form.old_password) { requestData.old_password = form.old_password; } modifySafeWord(requestData).then(() => { uni.showToast({ title: t2("设置成功"), icon: "success" }); let timer = setTimeout(() => { clearTimeout(timer); router.back(); }, 1500); }); }; const __returned__ = { t: t2, uToastRef, form, validateForm, handleModifySafeWord }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_input = __unplugin_components_3$2; const _component_u_form_item = __unplugin_components_1; const _component_u_form = __unplugin_components_2; const _component_u_button = __unplugin_components_2$1; const _component_u_toast = __unplugin_components_4; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("修改资金密码"), class: "safety-page" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "reset-password-container" }, [ vue.createVNode(_component_u_form, { model: $setup.form, ref: "uFormRef", "label-position": "top" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_form_item, { label: $setup.t("旧资金密码"), prop: "old_password", "border-bottom": "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { type: "password", modelValue: $setup.form.old_password, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.old_password = $event), placeholder: $setup.t("请输入旧密码(第一次设置资金密码可以为空)"), "password-icon": true, clearable: false }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_u_form_item, { label: $setup.t("新资金密码"), prop: "password", "border-bottom": "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { type: "password", modelValue: $setup.form.password, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.password = $event), placeholder: $setup.t("请输入新资金密码(至少6位)"), "password-icon": true, clearable: false }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]), vue.createVNode(_component_u_form_item, { label: $setup.t("确认新资金密码"), prop: "confirmPassword", "border-bottom": "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { type: "password", modelValue: $setup.form.confirmPassword, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.form.confirmPassword = $event), placeholder: $setup.t("请再次输入新资金密码"), "password-icon": true, clearable: false }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 /* STABLE */ }, 8, ["label"]) ]), _: 1 /* STABLE */ }, 8, ["model"]), vue.createElementVNode("view", { class: "btn-wrap" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "reset-btn", onClick: $setup.handleModifySafeWord }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("确认修改")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]), vue.createVNode( _component_u_toast, { ref: "uToastRef" }, null, 512 /* NEED_PATCH */ ) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyChangeFundPasswordIndex = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-f33293e6"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/changeFundPassword/index.vue"]]); const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const pagingRef = vue.ref(null); const moneyLogList = vue.ref([]); const fundTypePickerShow = vue.ref(false); const typePickerShow = vue.ref(false); const calendarShow = vue.ref(false); const fundType = vue.ref(""); const transactionType = vue.ref(""); const startTime = vue.ref(""); const endTime = vue.ref(""); const dateRange = vue.ref(""); const fundTypeColumns = vue.ref([ { label: t2("全部资金"), value: "" }, { label: t2("可用余额"), value: "1" }, { label: t2("冻结金额"), value: "2" } ]); const typeColumns = vue.ref([ { label: t2("全部类型"), value: "" }, { label: t2("充值"), value: "充值" }, { label: t2("提现"), value: "提现" }, { label: t2("投注"), value: "投注" } ]); const fundTypeText = vue.computed(() => { const target = fundTypeColumns.value.find((item) => item.value === fundType.value); return target ? target.label : ""; }); const transactionTypeText = vue.computed(() => { const target = typeColumns.value.find((item) => item.value === transactionType.value); return target ? target.label : ""; }); async function onQuery(pageNo, pageSize) { var _a2, _b2; try { const params = { type: fundType.value, // 新增:资金类型 change_type: transactionType.value, // 如果后端改了此字段名请对应修改 page: pageNo, limit: pageSize, start_time: startTime.value, end_time: endTime.value }; const res = await getMoneyLog(params); typeColumns.value = [{ label: t2("全部类型"), value: "" }].concat(((_b2 = (_a2 = res.data) == null ? void 0 : _a2.extend) == null ? void 0 : _b2.change_type_list) || []); if (res.code === 1) { pagingRef.value.complete(res.data.list); } else { pagingRef.value.complete(false); } } catch (e) { pagingRef.value.complete(false); } } function onFundTypeConfirm(e) { fundType.value = e[0].value; handleQuery2(); } function onTypeConfirm(e) { transactionType.value = e[0].value; handleQuery2(); } function onCalendarChange(e) { const range2 = e; if (range2.startDate && range2.endDate) { startTime.value = range2.startDate; endTime.value = range2.endDate; dateRange.value = `${range2.startDate} ~ ${range2.endDate}`; handleQuery2(); } } function handleQuery2() { pagingRef.value.reload(); } function handleReset() { fundType.value = ""; transactionType.value = ""; dateRange.value = ""; startTime.value = ""; endTime.value = ""; pagingRef.value.reload(); } const __returned__ = { t: t2, pagingRef, moneyLogList, fundTypePickerShow, typePickerShow, calendarShow, fundType, transactionType, startTime, endTime, dateRange, fundTypeColumns, typeColumns, fundTypeText, transactionTypeText, onQuery, onFundTypeConfirm, onTypeConfirm, onCalendarChange, handleQuery: handleQuery2, handleReset }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_empty = __unplugin_components_4$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_select = __unplugin_components_5$1; const _component_u_calendar = __unplugin_components_6; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": "资金记录" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-content" }, [ vue.createVNode(_component_z_paging, { ref: "pagingRef", modelValue: $setup.moneyLogList, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.moneyLogList = $event), onQuery: $setup.onQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300, loadingMoreLoadingText: $setup.t("正在加载"), loadingMoreNoMoreText: $setup.t("没有更多了"), loadingMoreDefaultText: $setup.t("点击加载更多") }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "filter-wrapper" }, [ vue.createElementVNode("view", { class: "filter-card" }, [ vue.createElementVNode("view", { class: "filter-header" }, [ vue.createElementVNode("view", { class: "title-line" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title-text" }, vue.toDisplayString($setup.t("条件筛选")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "reset-link", onClick: $setup.handleReset }, vue.toDisplayString($setup.t("重置全部")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "filter-body" }, [ vue.createElementVNode("view", { class: "filter-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[0] || (_cache[0] = ($event) => $setup.fundTypePickerShow = true) }, [ vue.createVNode(_component_u_icon, { name: "rmb-circle", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.fundTypeText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.fundTypeText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("全部资金")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.fundTypeText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[1] || (_cache[1] = ($event) => $setup.typePickerShow = true) }, [ vue.createVNode(_component_u_icon, { name: "list-dot", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.transactionTypeText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.transactionTypeText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("全部类型")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.transactionTypeText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "filter-row" }, [ vue.createElementVNode("view", { class: "filter-item date-item", onClick: _cache[2] || (_cache[2] = ($event) => $setup.calendarShow = true) }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ $setup.dateRange ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "filter-value" }, vue.toDisplayString($setup.dateRange), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "filter-placeholder" }, vue.toDisplayString($setup.t("日期区间")), 1 /* TEXT */ )) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "button-group" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "search-btn", onClick: $setup.handleQuery, ripple: "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "search", size: "32", color: "#fff", class: "mr-1" }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("立即查询")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("更新数据中...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无相关资金记录"), mode: "data", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "money-log-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.moneyLogList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id, class: "log-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["type-badge", parseFloat(item.amount || 0) < 0 ? "withdraw" : "recharge"]) }, [ vue.createElementVNode("view", { class: "dot" }), vue.createElementVNode( "text", null, vue.toDisplayString(item.change_type || (parseFloat(item.amount || 0) < 0 ? $setup.t("支出") : $setup.t("收入"))), 1 /* TEXT */ ), vue.createElementVNode( "text", null, vue.toDisplayString(item.change_type_text || ""), 1 /* TEXT */ ) ], 2 /* CLASS */ ) ]), vue.createElementVNode("view", { class: "card-main" }, [ vue.createElementVNode("view", { class: "amount-box" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["amount-val", parseFloat(item.amount) < 0 ? "decrease" : "increase"]) }, vue.toDisplayString(parseFloat(item.amount || 0) > 0 ? "+" + parseFloat(item.amount || 0) : parseFloat(item.amount || 0)), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "text", { class: "currency" }, vue.toDisplayString(_ctx.$currency), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "time-box" }, [ vue.createElementVNode( "text", { class: "time-text" }, vue.toDisplayString(item.created_at), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("资金类型")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(item.type == 1 ? $setup.t("可用余额") : item.type == 2 ? $setup.t("冻结金额") : $setup.t("未知")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("变动前余额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(parseFloat(item.before_balance || 0)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-row" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("变动后余额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value highlighted" }, vue.toDisplayString(parseFloat(item.after_balance || 0)), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "loadingMoreLoadingText", "loadingMoreNoMoreText", "loadingMoreDefaultText"]) ]), vue.createVNode(_component_u_select, { modelValue: $setup.fundTypePickerShow, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.fundTypePickerShow = $event), mode: "single-column", list: $setup.fundTypeColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onFundTypeConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_select, { modelValue: $setup.typePickerShow, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.typePickerShow = $event), mode: "single-column", list: $setup.typeColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onTypeConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.calendarShow, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.calendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", "start-text": $setup.t("开始"), "end-text": $setup.t("结束"), "btn-type": "primary", onChange: $setup.onCalendarChange }, null, 8, ["modelValue", "active-bg-color", "range-color", "start-text", "end-text"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleMyFundRecordIndex = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-b9e809c6"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/my/fundRecord/index.vue"]]); const _sfc_main$h = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const router2 = useRouter(); const orderStore = useOrderStore(); const userMoney = vue.ref(0); const safeModalRef = vue.ref(null); const showSafeModal = vue.ref(false); const safeWord = vue.ref(""); const retryModalRef = vue.ref(null); const showRetryModal = vue.ref(false); const retryFailures = vue.ref([]); const checkIsLocked = (item) => { if (!item) return true; if (Number(item.is_locked) === 1) return true; if (item.status !== void 0 && Number(item.status) !== 1) return true; if (!item.odds || item.odds === "-" || Number(item.odds) === 0) return true; if (item.state !== void 0) { const state = Number(item.state); if (state !== 0 && state !== 1) return true; } return false; }; const validOrders = vue.computed(() => { return orderStore.selectOrders.filter((item) => !checkIsLocked(item)); }); const validTotalOdds = vue.computed(() => { if (validOrders.value.length === 0) return 0; return validOrders.value.reduce((sum, item) => sum + (Number(item.odds) || 0), 0); }); const validTotalStake = vue.computed(() => { return validOrders.value.reduce((sum, item) => sum + (Number(item.stake) || 0), 0); }); function getData() { getBalance().then((res) => { userMoney.value = res.data.money; }).catch((err) => { }); } const goBack = () => { uni.navigateBack(); }; const topUp = () => { router2.push({ name: "topUp" }); }; const changeStake = (item, delta) => { if (checkIsLocked(item)) return; let val = Number(item.stake) || 0; val += delta; if (val < 0) val = 0; orderStore.updateStake(item.uniqueKey, val); item.errorMsg = ""; }; const onInputStake = (e, item) => { if (checkIsLocked(item)) return; orderStore.updateStake(item.uniqueKey, e.detail.value); item.errorMsg = ""; }; const submitBet = () => { if (orderStore.selectOrders.length === 0) { return uni.$u.toast(t2("请选择投注单")); } if (validOrders.value.length === 0) { return uni.$u.toast(t2("暂无有效投注项,请移除锁定盘口或重新选择")); } if (validTotalStake.value > userMoney.value) { return uni.showToast({ title: t2("余额不足"), icon: "none" }); } safeWord.value = ""; confirmSubmitBet(); }; const doSubmit = (ordersData, submittedKeys, isRetry = false) => { submitOrder({ data: ordersData, safe_word: safeWord.value }).then((res) => { var _a2, _b2, _c; if (res.code === 1) { const failures = ((_a2 = res.data) == null ? void 0 : _a2.failure) || []; const newOrders = []; orderStore.selectOrders.forEach((order) => { const isSubmitted = submittedKeys.includes(order.uniqueKey); if (isSubmitted) { const failInfo = failures.find( (f) => String(f.data_id) === String(order.data_id) && String(f.id) === String(order.marketId) && String(f.value) === String(order.optionValue) && String(f.handicap || "") === String(order.handicap || "") ); if (failInfo) { order.errorMsg = failInfo.msg || t2("投注失败"); if (failInfo.odd) order.odds = failInfo.odd; newOrders.push(order); } } else { newOrders.push(order); } }); orderStore.selectOrders = newOrders; orderStore.saveToStorage(); if (isRetry) { showRetryModal.value = false; } else { showSafeModal.value = false; } if (failures.length === 0) { uni.showToast({ title: t2("全部下注成功"), icon: "success" }); if (orderStore.selectOrders.length === 0) { setTimeout(() => { goBack(); }, 1e3); } } else { const successCount = ordersData.length - failures.length; if (successCount > 0) { uni.showToast({ title: `成功 ${successCount}单,失败 ${failures.length}单`, icon: "none", duration: 2500 }); } retryFailures.value = failures; setTimeout(() => { showRetryModal.value = true; }, 500); } getData(); } else { uni.showToast({ title: res.msg || t2("投注失败"), icon: "none" }); if (isRetry) { (_b2 = retryModalRef.value) == null ? void 0 : _b2.clearLoading(); } else { (_c = safeModalRef.value) == null ? void 0 : _c.clearLoading(); } } }).catch((err) => { var _a2, _b2; if (isRetry) { (_a2 = retryModalRef.value) == null ? void 0 : _a2.clearLoading(); } else { (_b2 = safeModalRef.value) == null ? void 0 : _b2.clearLoading(); } }); }; const confirmSubmitBet = () => { uni.showModal({ title: t2("提示"), content: t2("确认提交吗?"), success: (res) => { if (res.confirm) { const submittedKeys = []; const ordersData = validOrders.value.map((item) => { submittedKeys.push(item.uniqueKey); const payload = { data_id: item.data_id, amount: item.stake, id: item.marketId, value: item.optionValue, odd: item.odds }; if (item.handicap !== null && item.handicap !== void 0 && item.handicap !== "") { payload.handicap = String(item.handicap); } return payload; }); doSubmit(ordersData, submittedKeys, false); } } }); }; const confirmRetryBet = () => { const submittedKeys = []; const ordersData = retryFailures.value.map((f) => { let hdp = f.handicap !== null && f.handicap !== void 0 && f.handicap !== "" ? `_${f.handicap}` : ""; submittedKeys.push(`${f.data_id}_${f.id}_${f.value}${hdp}`); const payload = { data_id: f.data_id, amount: f.amount, id: f.id, value: f.value, odd: f.odd }; if (f.handicap !== null && f.handicap !== void 0 && f.handicap !== "") { payload.handicap = String(f.handicap); } return payload; }); doSubmit(ordersData, submittedKeys, true); }; onShow(() => { getData(); }); const __returned__ = { t: t2, router: router2, orderStore, userMoney, safeModalRef, showSafeModal, safeWord, retryModalRef, showRetryModal, retryFailures, checkIsLocked, validOrders, validTotalOdds, validTotalStake, getData, goBack, topUp, changeStake, onInputStake, submitBet, doSubmit, confirmSubmitBet, confirmRetryBet, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, get onShow() { return onShow; }, get useI18n() { return useI18n; }, get useOrderStore() { return useOrderStore; }, get getBalance() { return getBalance; }, get submitOrder() { return submitOrder; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_input = __unplugin_components_3$2; const _component_u_modal = __unplugin_components_4$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("投注单") }, { navBarRight: vue.withCtx(() => [ vue.createElementVNode("view", { style: { "display": "flex", "gap": "10px" } }, [ vue.createElementVNode("view", { class: "nav-btn", onClick: _cache[0] || (_cache[0] = ($event) => $setup.router.push({ name: "AllHistory", query: { tab: 0 } })) }, [ vue.createVNode(_component_u_icon, { name: "clock", size: "36" }) ]), vue.createElementVNode("view", { class: "nav-btn", onClick: _cache[1] || (_cache[1] = (...args) => $setup.orderStore.clearAllOrders && $setup.orderStore.clearAllOrders(...args)) }, [ vue.createVNode(_component_u_icon, { name: "trash", size: "36" }) ]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "content" }, [ $setup.orderStore.selectedCount === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "empty-sheet" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("暂无投注项")), 1 /* TEXT */ ), vue.createVNode(_component_u_button, { type: "primary", customStyle: { marginTop: "20px", width: "120px" }, onClick: $setup.goBack }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("去投注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "bet-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.orderStore.selectOrders, (item, index) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["bet-item", { "is-locked": $setup.checkIsLocked(item) }]), key: index }, [ $setup.checkIsLocked(item) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "lock-overlay" }, [ vue.createVNode(_component_u_icon, { name: "lock-fill", color: "#fff", size: "32" }), vue.createElementVNode( "text", { class: "lock-text" }, vue.toDisplayString($setup.t("盘口已失效或关闭")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), item.errorMsg ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "fail-msg-box" }, [ vue.createVNode(_component_u_icon, { name: "info-circle-fill", color: "#fa3534", size: "28" }), vue.createElementVNode( "text", { class: "fail-text" }, vue.toDisplayString($setup.t(item.errorMsg)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "item-header" }, [ vue.createElementVNode( "text", { class: "team-names" }, vue.toDisplayString(item.homeTeam) + " - " + vue.toDisplayString(item.guestTeam), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "close-btn", onClick: vue.withModifiers(($event) => $setup.orderStore.removeOrderItem(item.uniqueKey), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#666", size: "16" }) ], 8, ["onClick"]) ]), vue.createElementVNode("view", { class: "item-info" }, [ vue.createElementVNode("view", { class: "bet-type" }, [ vue.createElementVNode("text", { class: "type-name" }, [ vue.createTextVNode( vue.toDisplayString(item.betType) + ": " + vue.toDisplayString(item.betTypeName) + " ", 1 /* TEXT */ ), item.handicap ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "margin-left": "4px", "color": "#f8b932" } }, "[" + vue.toDisplayString(item.handicap) + "]", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "odds-box" }, [ vue.createElementVNode( "text", { class: "odds-val" }, vue.toDisplayString(item.odds), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "league-info" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(item.league), 1 /* TEXT */ ), item.score && item.score !== "-" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "live-score" }, vue.toDisplayString($setup.t("当前比分")) + ": " + vue.toDisplayString(item.score), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["stake-input-box", { "error-border": item.errorMsg || !$setup.checkIsLocked(item) && Number(item.stake) > Number($setup.userMoney) }]) }, [ vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeStake(item, -10), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "minus", size: "24" }) ], 8, ["onClick"]), vue.withDirectives(vue.createElementVNode("input", { type: "number", class: "stake-input", "onUpdate:modelValue": ($event) => item.stake = $event, onInput: (e) => $setup.onInputStake(e, item), placeholder: "本金", disabled: $setup.checkIsLocked(item) }, null, 40, ["onUpdate:modelValue", "onInput", "disabled"]), [ [vue.vModelText, item.stake] ]), vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeStake(item, 10), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "plus", size: "24" }) ], 8, ["onClick"]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "item-footer" }, [ !$setup.checkIsLocked(item) && Number(item.stake) > Number($setup.userMoney) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "err-msg" }, vue.toDisplayString($setup.t("投注额超过您的余额")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "potential-win" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("潜在赢利")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "win-amount" }, vue.toDisplayString((Number(item.stake) * Number(item.odds)).toFixed(2)) + " " + vue.toDisplayString(_ctx.$currency), 1 /* TEXT */ ) ])) ]) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) ]), $setup.orderStore.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "sheet-action-bar" }, [ vue.createElementVNode("view", { class: "total-odds-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("总赔率 (有效)")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString($setup.validTotalOdds.toFixed(2)), 1 /* TEXT */ ) ]), $setup.validTotalStake > $setup.userMoney ? (vue.openBlock(), vue.createBlock(_component_u_button, { key: 0, type: "primary", onClick: $setup.topUp }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("存款")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ })) : (vue.openBlock(), vue.createBlock(_component_u_button, { key: 1, type: "primary", onClick: $setup.submitBet }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("投注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ })) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_modal, { ref: "safeModalRef", modelValue: $setup.showSafeModal, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.showSafeModal = $event), "async-close": true, title: $setup.t("安全验证"), "show-cancel-button": true, "confirm-text": $setup.t("确定投注"), "cancel-text": $setup.t("取消"), "confirm-color": "#f8b932", onConfirm: $setup.confirmSubmitBet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "safe-modal-content" }, [ vue.createElementVNode( "text", { class: "safe-tips" }, vue.toDisplayString($setup.t("为保障您的资金安全,请输入资金密码")), 1 /* TEXT */ ), vue.createVNode(_component_u_input, { modelValue: $setup.safeWord, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.safeWord = $event), type: "password", placeholder: $setup.t("请输入资金密码"), border: true, "border-color": "#e4e7ed", clearable: true }, null, 8, ["modelValue", "placeholder"]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "title", "confirm-text", "cancel-text"]), vue.createVNode(_component_u_modal, { ref: "retryModalRef", modelValue: $setup.showRetryModal, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.showRetryModal = $event), "async-close": true, title: $setup.t("提示"), "show-cancel-button": true, "confirm-text": $setup.t("确定"), "cancel-text": $setup.t("取消"), "confirm-color": "#f8b932", onConfirm: $setup.confirmRetryBet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "retry-modal-content" }, [ vue.createElementVNode( "text", { class: "retry-tips" }, vue.toDisplayString($setup.t("以下注单提交失败,是否重新提交?")), 1 /* TEXT */ ), vue.createElementVNode("scroll-view", { "scroll-y": "", class: "retry-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.retryFailures, (err, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "retry-item", key: idx }, [ vue.createElementVNode("text", { class: "err-val" }, [ vue.createTextVNode( vue.toDisplayString(err.value) + " ", 1 /* TEXT */ ), err.handicap ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, "[" + vue.toDisplayString(err.handicap) + "]", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " @" + vue.toDisplayString(err.odd), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "err-msg" }, vue.toDisplayString(err.msg), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "title", "confirm-text", "cancel-text"]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesCommonBetSlipIndex = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-94a1f34f"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/common/betSlip/index.vue"]]); const _sfc_main$g = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const route2 = useRoute(); let token = vue.ref(uni.getStorageSync("token")); if (route2.query.GuestMode && route2.query.GuestMode == 1) { token.value = uni.getStorageSync("youke_token"); } let lang = vue.ref(uni.getStorageSync("locale") || "zh"); var url2 = vue.ref("http://bot28webkefu.sp2509.cc/#/userMsg?token=" + token.value + "&Lang=" + lang.value); const __returned__ = { route: route2, get token() { return token; }, set token(v) { token = v; }, get lang() { return lang; }, set lang(v) { lang = v; }, get url() { return url2; }, set url(v) { url2 = v; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) { const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, null, { default: vue.withCtx(() => [ vue.createElementVNode("iframe", { height: "100%", width: "100%", src: $setup.url }, null, 8, ["src"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } const PagesCommonCustomerServiceIndex = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/common/customerService/index.vue"]]); const SubsectionProps = { ...baseProps, /** tab的数据 */ list: { type: Array, default: () => [] }, /** 当前活动的tab的index */ current: { type: [Number, String], default: 0 }, /** 激活的颜色 */ activeColor: { type: String, default: "var(--u-main-color)" }, /** 未激活的颜色 */ inactiveColor: { type: String, default: "var(--u-content-color)" }, /** 模式选择,mode=button为按钮形式,mode=subsection时为分段模式 */ mode: { type: String, default: "button" }, /** 字体大小,单位rpx */ fontSize: { type: [Number, String], default: 28 }, /** 是否开启动画效果 */ animation: { type: Boolean, default: true }, /** 组件的高度,单位rpx */ height: { type: [Number, String], default: 70 }, /** 激活tab的字体是否加粗 */ bold: { type: Boolean, default: true }, /** mode=button时,组件背景颜色 */ bgColor: { type: String, default: "var(--u-divider-color)" }, /** mode = button时,滑块背景颜色 */ buttonColor: { type: String, default: "var(--u-bg-white)" }, /** 在切换分段器的时候,是否让设备震一下 */ vibrateShort: { type: Boolean, default: false } }; const __default__ = { name: "u-subsection", options: { addGlobalClass: true, virtualHost: true, styleIsolation: "shared" } }; const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({ ...__default__, props: SubsectionProps, emits: ["change"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props = __props; const emit = __emit; const listInfo = vue.ref([]); const itemBgStyle = vue.ref({ width: 0, left: 0, backgroundColor: "var(--u-bg-white)", height: "100%", transition: "" }); const currentIndex = vue.ref(Number(props.current)); const buttonPadding = 3; const borderRadius = 5; const firstTimeVibrateShort = vue.ref(true); const instanceId = $u.guid(); const instance = vue.getCurrentInstance(); vue.watch( () => props.current, (nVal) => { currentIndex.value = Number(nVal); changeSectionStatus(currentIndex.value); }, { immediate: true } ); vue.watch( () => props.list, () => { if (!props.list || !props.list.length) return; initListInfo(); vue.nextTick(() => { setTimeout(() => { getTabsInfo(); }, 10); }); }, { deep: true, immediate: true } ); vue.watch( () => props.mode, () => { vue.nextTick(() => { setTimeout(() => { getTabsInfo(); }, 10); }); } ); function initListInfo() { listInfo.value = props.list.map((val) => { if (typeof val !== "object") { return { width: 0, name: val }; } else { return { ...val, width: 0 }; } }); } const noBorderRight = vue.computed(() => { return (index) => { if (props.mode !== "subsection") return ""; let classs = ""; if (index < props.list.length - 1) classs += " u-none-border-right"; if (index === 0) classs += " u-item-first"; if (index === props.list.length - 1) classs += " u-item-last"; return classs; }; }); const textStyle = vue.computed(() => { return (index) => { const style = {}; if (props.mode === "subsection") { style.color = index === currentIndex.value ? "var(--u-white-color)" : props.activeColor; } else { style.color = index === currentIndex.value ? props.activeColor : props.inactiveColor; } if (index === currentIndex.value && props.bold) style.fontWeight = "bold"; style.fontSize = props.fontSize + "rpx"; return style; }; }); const itemStyle = vue.computed(() => { return (index) => { const style = {}; if (props.mode === "subsection") { style.borderColor = props.activeColor; style.borderWidth = "1px"; style.borderStyle = "solid"; } return style; }; }); const subsectionStyle = vue.computed(() => { const style = {}; style.height = uni.upx2px(Number(props.height)) + "px"; if (props.mode === "button") { style.backgroundColor = props.bgColor; style.padding = `${buttonPadding}px`; style.borderRadius = `${borderRadius}px`; } return style; }); const itemBarStyle = vue.computed(() => { const style = {}; style.backgroundColor = props.activeColor; style.zIndex = 1; if (props.mode === "button") { style.backgroundColor = props.buttonColor; style.borderRadius = `${borderRadius}px`; style.bottom = `${buttonPadding}px`; style.height = uni.upx2px(Number(props.height)) - buttonPadding * 2 + "px"; style.zIndex = 0; } return Object.assign({}, itemBgStyle.value, style); }); function changeSectionStatus(nVal) { if (props.mode === "subsection") { if (nVal === props.list.length - 1) { itemBgStyle.value.borderRadius = `0 ${buttonPadding}px ${buttonPadding}px 0`; } if (nVal === 0) { itemBgStyle.value.borderRadius = `${buttonPadding}px 0 0 ${buttonPadding}px`; } if (nVal > 0 && nVal < props.list.length - 1) { itemBgStyle.value.borderRadius = "0"; } } setTimeout(() => { itemBgLeft(); }, 10); if (props.vibrateShort && !firstTimeVibrateShort.value) { uni.vibrateShort(); } firstTimeVibrateShort.value = false; } function click2(index) { if (index === currentIndex.value) return; currentIndex.value = index; changeSectionStatus(index); emit("change", index); } function getTabsInfo() { const view = uni.createSelectorQuery().in(instance == null ? void 0 : instance.proxy); for (let i = 0; i < props.list.length; i++) { view.select(`#${instanceId} .u-item-${i}`).boundingClientRect(); } view.exec((res) => { var _a2; if (!res.length) { setTimeout(() => { getTabsInfo(); return; }, 10); } res.map((val, index) => { listInfo.value[index].width = val.width; }); if (props.mode === "subsection" || props.mode === "button") { itemBgStyle.value.width = ((_a2 = listInfo.value[0]) == null ? void 0 : _a2.width) + "px"; } itemBgLeft(); }); } function itemBgLeft() { if (props.animation) { itemBgStyle.value.transition = "all 0.35s"; } else { itemBgStyle.value.transition = "all 0s"; } let left = 0; listInfo.value.forEach((val, index) => { if (index < currentIndex.value) left += val.width ?? 0; }); if (props.mode === "subsection") { itemBgStyle.value.left = left + "px"; } else if (props.mode === "button") { itemBgStyle.value.left = left + buttonPadding + "px"; } } const __returned__ = { props, emit, listInfo, itemBgStyle, currentIndex, buttonPadding, borderRadius, firstTimeVibrateShort, instanceId, instance, initListInfo, noBorderRight, textStyle, itemStyle, subsectionStyle, itemBarStyle, changeSectionStatus, click: click2, getTabsInfo, itemBgLeft, get $u() { return $u; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { id: $setup.instanceId, class: vue.normalizeClass(["u-subsection", _ctx.customClass]), style: vue.normalizeStyle($setup.$u.toStyle($setup.subsectionStyle, _ctx.customStyle)) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.listInfo, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-item u-line-1", [$setup.noBorderRight(index), `u-item-${index}`]]), style: vue.normalizeStyle($setup.itemStyle(index)), onClick: ($event) => $setup.click(index), key: index }, [ vue.createElementVNode( "view", { style: vue.normalizeStyle($setup.textStyle(index)), class: "u-item-text u-line-1" }, vue.toDisplayString(item.name), 5 /* TEXT, STYLE */ ) ], 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode( "view", { class: "u-item-bg", style: vue.normalizeStyle($setup.itemBarStyle) }, null, 4 /* STYLE */ ) ], 14, ["id"]); } const __unplugin_components_5 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-753bf5ed"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/node_modules/uview-pro/components/u-subsection/u-subsection.vue"]]); const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const orderInfo = vue.ref(null); const order_id = vue.ref(""); onLoad((options) => { if (options && options.order_id) { order_id.value = options.order_id; fetchDetail(); } }); const fetchDetail = async () => { try { const res = await getOrderInfo({ order_id: order_id.value }); if (res.code === 1) { const data = res.data; if (typeof data.detail === "string") { try { data.detail = JSON.parse(data.detail); } catch (e) { data.detail = {}; } } orderInfo.value = data; } else { uni.showToast({ title: res.msg || t2("获取详情失败"), icon: "none" }); } } catch (error) { formatAppLog("error", "at pages/WorkModule/bettingHistory/bettingDetail/index.vue:249", error); } }; const getOrderStatusTag = (val) => { const map = { "0": { text: t2("下注中"), type: "info" }, "1": { text: t2("下注成功"), type: "success" }, "2": { text: t2("已退款"), type: "warning" }, "-1": { text: t2("已取消"), type: "danger" } }; return map[String(val)] || { text: "--", type: "info" }; }; const getMarketName = () => { var _a2, _b2; if (((_b2 = (_a2 = orderInfo.value) == null ? void 0 : _a2.detail) == null ? void 0 : _b2.odds) && orderInfo.value.detail.odds[0]) { return orderInfo.value.detail.odds[0].name || "-"; } return "-"; }; const getSelectionValue = () => { var _a2, _b2, _c; if (((_b2 = (_a2 = orderInfo.value) == null ? void 0 : _a2.detail) == null ? void 0 : _b2.odds) && ((_c = orderInfo.value.detail.odds[0]) == null ? void 0 : _c.values) && orderInfo.value.detail.odds[0].values[0]) { return orderInfo.value.detail.odds[0].values[0].value || "-"; } return "-"; }; const getSelectionHandicap = () => { var _a2, _b2, _c; if (((_b2 = (_a2 = orderInfo.value) == null ? void 0 : _a2.detail) == null ? void 0 : _b2.odds) && ((_c = orderInfo.value.detail.odds[0]) == null ? void 0 : _c.values) && orderInfo.value.detail.odds[0].values[0]) { return orderInfo.value.detail.odds[0].values[0].handicap || ""; } return ""; }; const getSelectionOdd = () => { var _a2, _b2, _c; if (((_b2 = (_a2 = orderInfo.value) == null ? void 0 : _a2.detail) == null ? void 0 : _b2.odds) && ((_c = orderInfo.value.detail.odds[0]) == null ? void 0 : _c.values) && orderInfo.value.detail.odds[0].values[0]) { return orderInfo.value.detail.odds[0].values[0].odd || "0.00"; } return "0.00"; }; const statusClass = vue.computed(() => { if (!orderInfo.value) return ""; const { settlement_status, is_win, return_status } = orderInfo.value; if (Number(return_status) === 2) return "bg-cancel"; if (settlement_status === 0) return "bg-pending"; if (settlement_status === 2) return "bg-cancel"; const winStatus = parseInt(is_win); if (winStatus === 1) return "bg-win"; if ([2, 3].includes(winStatus)) return "bg-draw"; return "bg-loss"; }); const statusIcon = vue.computed(() => { if (!orderInfo.value) return ""; const { settlement_status, is_win, return_status } = orderInfo.value; if (Number(return_status) === 2) return "close-circle"; if (settlement_status === 0) return "clock"; if (settlement_status === 2) return "close-circle"; if (parseInt(is_win) === 1) return "checkmark-circle"; if ([2, 3].includes(parseInt(is_win))) return "minus-circle"; return "close-circle"; }); const statusText = vue.computed(() => { if (!orderInfo.value) return ""; const { settlement_status, is_win, return_status } = orderInfo.value; if (Number(return_status) === 2) return t2("已退款"); if (settlement_status === 0) return t2("待结算"); if (settlement_status === 2) return t2("结算待发放"); const winMap = { 0: t2("未中奖"), 1: t2("中奖"), 2: t2("和局"), 3: t2("平手半") }; return winMap[parseInt(is_win)] || t2("已结算"); }); const settlementStatusText = vue.computed(() => { if (!orderInfo.value) return ""; const status = Number(orderInfo.value.settlement_status); if (status === 0) return t2("待结算"); if (status === 1) return t2("已结算"); if (status === 2) return t2("结算待发放"); return t2("未知"); }); const getMatchStatusText = (state) => { const states = { 0: t2("未开始"), 1: t2("进行中"), 2: t2("已完场"), 3: t2("延期"), 4: t2("取消") }; return states[Number(state)] || t2("未知"); }; const getMatchStateType = (state) => { const s = Number(state); if (s === 0) return "info"; if (s === 1) return "primary"; if (s === 2) return "success"; if (s === 3) return "warning"; if (s === 4) return "error"; return "info"; }; const formatTimestamp = (timestamp) => { if (!timestamp) return ""; const date2 = new Date(timestamp * 1e3); const Y = date2.getFullYear(); const M = (date2.getMonth() + 1).toString().padStart(2, "0"); const D = date2.getDate().toString().padStart(2, "0"); const h = date2.getHours().toString().padStart(2, "0"); const m = date2.getMinutes().toString().padStart(2, "0"); return `${Y}-${M}-${D} ${h}:${m}`; }; const formatGameTimeOnly = (timestamp, formatStr) => { if (!timestamp) return ""; const date2 = new Date(timestamp * 1e3); const m = String(date2.getMonth() + 1).padStart(2, "0"); const d = String(date2.getDate()).padStart(2, "0"); const h = String(date2.getHours()).padStart(2, "0"); const min = String(date2.getMinutes()).padStart(2, "0"); if (formatStr === "MM-DD") return `${m}-${d}`; if (formatStr === "HH:mm") return `${h}:${min}`; return `${m}-${d} ${h}:${min}`; }; const getScore = (scoreStr, index) => { if (!scoreStr || scoreStr === "-") return 0; const parts = scoreStr.split("-"); return parts[index] || 0; }; const statActiveTab = vue.ref(0); const statTabChange = (index) => { statActiveTab.value = index; }; const hasStatistics = vue.computed(() => { var _a2, _b2; return ((_b2 = (_a2 = orderInfo.value) == null ? void 0 : _a2.sport) == null ? void 0 : _b2.statistics) && Array.isArray(orderInfo.value.sport.statistics) && orderInfo.value.sport.statistics.length > 0; }); const currentHalfStats = vue.computed(() => { if (!hasStatistics.value) return []; const stats = orderInfo.value.sport.statistics; const homeId = orderInfo.value.sport.home_team_id; const guestId = orderInfo.value.sport.guest_team_id; const targetHalf = statActiveTab.value + 1; const uniqueStats = {}; stats.forEach((item) => { if (item.half === targetHalf) { uniqueStats[`${item.team_id}`] = item; } }); const homeData = uniqueStats[homeId] || {}; const guestData = uniqueStats[guestId] || {}; const formatVal = (val) => val === null || val === void 0 ? "-" : val; const statMapping = [ { key: "shots_on_goal", label: t2("射正球门") }, { key: "shots_off_goal", label: t2("射偏球门") }, { key: "shots_insidebox", label: t2("禁区内射门") }, { key: "shots_outsidebox", label: t2("禁区外射门") }, { key: "total_shots", label: t2("总射门次数") }, { key: "blocked_shots", label: t2("被封堵射门") }, { key: "fouls", label: t2("犯规次数") }, { key: "corner_kicks", label: t2("角球") }, { key: "offsides", label: t2("越位") }, { key: "ball_possession", label: t2("控球率(%)") }, { key: "yellow_cards", label: t2("黄牌") }, { key: "red_cards", label: t2("红牌") }, { key: "goalkeeper_saves", label: t2("门将扑救") }, { key: "total_passes", label: t2("总传球数") }, { key: "passes_accurate", label: t2("精准传球") }, { key: "passes_percent", label: t2("传球成功率") } ]; return statMapping.map((row) => ({ label: row.label, home: formatVal(homeData[row.key]), guest: formatVal(guestData[row.key]) })); }); const getRefundStatusText = (status) => { const map = { // 1: t('退款审核中'), 2: t2("已退款") // 3: t('退款被驳回') }; return map[Number(status)] || t2("未知"); }; const handleRefundTagClick = () => { if (Number(orderInfo.value.return_status) === 3) { uni.showToast({ title: orderInfo.value.failure_msg || t2("无详细驳回原因"), icon: "none", duration: 3e3 }); } }; const canRefund = vue.computed(() => { if (!orderInfo.value) return false; const userRefund = Number(orderInfo.value.user_refund); const payStatus = Number(orderInfo.value.pay_status); const settlementStatus = Number(orderInfo.value.settlement_status); const returnStatus = Number(orderInfo.value.return_status); return userRefund === 1 && payStatus === 1 && settlementStatus === 0 && returnStatus === 0; }); const handleRefund = () => { uni.showModal({ title: t2("退款确认"), content: t2("您确定要申请退款吗?"), confirmText: t2("确定"), cancelText: t2("取消"), confirmColor: "#ef4444", success: (res) => { if (res.confirm) { uni.showLoading({ title: t2("提交中...") }); applyRefund({ order_id: orderInfo.value.order_id }).then(() => { let timer = setTimeout(() => { clearTimeout(timer); fetchDetail(); }, 1500); }); } } }); }; const copyText = (text) => { uni.setClipboardData({ data: text, success: () => uni.showToast({ title: t2("复制成功"), icon: "none" }) }); }; const __returned__ = { t: t2, locale, orderInfo, order_id, fetchDetail, getOrderStatusTag, getMarketName, getSelectionValue, getSelectionHandicap, getSelectionOdd, statusClass, statusIcon, statusText, settlementStatusText, getMatchStatusText, getMatchStateType, formatTimestamp, formatGameTimeOnly, getScore, statActiveTab, statTabChange, hasStatistics, currentHalfStats, getRefundStatusText, handleRefundTagClick, canRefund, handleRefund, copyText }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_tag = __unplugin_components_2$2; const _component_u_image = __unplugin_components_1$1; const _component_u_cell_item = __unplugin_components_3; const _component_u_cell_group = __unplugin_components_4$1; const _component_u_subsection = __unplugin_components_5; const _component_u_button = __unplugin_components_2$1; const _component_u_loading = __unplugin_components_3$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("注单详情") }, { default: vue.withCtx(() => { var _a2, _b2, _c, _d; return [ $setup.orderInfo ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "detail-content" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["status-card", $setup.statusClass]) }, [ vue.createElementVNode("view", { class: "status-top" }, [ vue.createElementVNode("view", { class: "status-icon-row" }, [ vue.createVNode(_component_u_icon, { name: $setup.statusIcon, size: "40", color: "#fff" }, null, 8, ["name"]), vue.createElementVNode( "text", { class: "status-text" }, vue.toDisplayString($setup.statusText), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "profit-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("盈亏金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "value" }, vue.toDisplayString($setup.orderInfo.settlement_status === 0 ? "--" : $setup.orderInfo.profit_and_loss), 1 /* TEXT */ ) ]) ], 2 /* CLASS */ ), $setup.orderInfo.sport ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "info-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString($setup.t("赛事信息")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "match-status-tag" }, [ vue.createVNode(_component_u_tag, { text: $setup.getMatchStatusText($setup.orderInfo.sport.state), type: $setup.getMatchStateType($setup.orderInfo.sport.state), plain: "", size: "mini" }, null, 8, ["text", "type"]) ]) ]), vue.createElementVNode("view", { class: "match-info-box" }, [ vue.createElementVNode("view", { class: "league-row" }, [ vue.createElementVNode("view", { class: "league-name" }, [ vue.createVNode(_component_u_icon, { name: "grid-fill", color: "#f8b932", size: "16", class: "mr-1" }), vue.createTextVNode( " " + vue.toDisplayString($setup.locale === "zh" ? $setup.orderInfo.sport.league : $setup.orderInfo.sport.league_en), 1 /* TEXT */ ) ]), $setup.orderInfo.is_roll === 1 ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 0, text: $setup.t("滚球"), type: "error", plain: "", size: "mini" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "match-time" }, [ vue.createElementVNode( "text", null, vue.toDisplayString((_a2 = $setup.orderInfo.detail) == null ? void 0 : _a2.game_time), 1 /* TEXT */ ), ((_b2 = $setup.orderInfo.detail) == null ? void 0 : _b2.fixture_status) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "fixture-status" }, [ $setup.orderInfo.detail.fixture_status.long ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "margin-left": "12px", "color": "#f8b932" } }, vue.toDisplayString($setup.orderInfo.detail.fixture_status.long), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $setup.orderInfo.detail.fixture_status.elapsed ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, style: { "margin-left": "6px", "color": "#f8b932" } }, vue.toDisplayString($setup.orderInfo.detail.fixture_status.seconds) + "'", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "vs-container" }, [ vue.createElementVNode("view", { class: "team-box" }, [ vue.createVNode(_component_u_image, { src: $setup.orderInfo.sport.home_team_logo, width: "40px", height: "40px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "team-name" }, vue.toDisplayString($setup.locale === "zh" ? $setup.orderInfo.sport.home_team : $setup.orderInfo.sport.home_team_en), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "score-box" }, [ $setup.orderInfo.sport.state !== 0 && ((_c = $setup.orderInfo.detail) == null ? void 0 : _c.score) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "score-main" }, [ vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($setup.getScore($setup.orderInfo.detail.score, 0)), 1 /* TEXT */ ), vue.createElementVNode("span", { style: { "color": "#ccc" } }, ":"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($setup.getScore($setup.orderInfo.detail.score, 1)), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, style: { "font-weight": "bold" } }, " VS ")), ((_d = $setup.orderInfo.detail) == null ? void 0 : _d.half_score) && $setup.orderInfo.sport.state !== 0 && $setup.orderInfo.detail.half_score !== "-" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "half-score" }, vue.toDisplayString($setup.t("半场")) + ": " + vue.toDisplayString($setup.orderInfo.detail.half_score), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "team-box" }, [ vue.createVNode(_component_u_image, { src: $setup.orderInfo.sport.guest_team_logo, width: "40px", height: "40px", shape: "circle", errorIcon: "photo" }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "team-name" }, vue.toDisplayString($setup.locale === "zh" ? $setup.orderInfo.sport.guest_team : $setup.orderInfo.sport.guest_team_en), 1 /* TEXT */ ) ]) ]), $setup.orderInfo.sport.state !== 0 && ($setup.orderInfo.sport.score || $setup.orderInfo.sport.half_score) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "live-score-row" }, [ vue.createElementVNode( "text", { class: "live-label" }, vue.toDisplayString($setup.t("即时比分")) + ":", 1 /* TEXT */ ), $setup.orderInfo.sport.score ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "live-val" }, vue.toDisplayString($setup.orderInfo.sport.score), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $setup.orderInfo.sport.half_score && $setup.orderInfo.sport.half_score !== "-" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "live-half" }, "(" + vue.toDisplayString($setup.t("半场")) + ": " + vue.toDisplayString($setup.orderInfo.sport.half_score) + ")", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "info-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString($setup.t("投注内容")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "bet-details" }, [ vue.createElementVNode("view", { class: "detail-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("玩法")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val bold" }, vue.toDisplayString($setup.orderInfo.odd_name), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "detail-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("选项")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "val", style: { "color": "#3b82f6" } }, [ vue.createTextVNode( vue.toDisplayString($setup.orderInfo.odd_value) + " ", 1 /* TEXT */ ), $setup.getSelectionHandicap() ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "margin-left": "4px", "color": "#f8b932", "font-weight": "bold" } }, " [" + vue.toDisplayString($setup.getSelectionHandicap()) + "] ", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "detail-item" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val odds" }, vue.toDisplayString(Number($setup.orderInfo.odd)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "divider" }), vue.createElementVNode("view", { class: "amount-row", style: { "margin-bottom": "12px" } }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("下注金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "amount-val" }, vue.toDisplayString($setup.orderInfo.amount), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "amount-row", style: { "margin-bottom": "12px" } }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("赔率玩法")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "" }, vue.toDisplayString($setup.orderInfo.odd_value), 1 /* TEXT */ ) ]), $setup.orderInfo.handicap ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "amount-row", style: { "margin-bottom": "12px" } }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("盘口")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "" }, vue.toDisplayString($setup.orderInfo.handicap || "--"), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $setup.orderInfo.failure ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "amount-row", style: { "margin-bottom": "12px" } }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("下注失败原因")), 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "color": "#fa3534" } }, vue.toDisplayString($setup.orderInfo.failure || "--"), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $setup.orderInfo.settlement_status === 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "amount-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("派彩金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "amount-val highlight" }, vue.toDisplayString($setup.orderInfo.win_amount), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "info-card no-padding" }, [ vue.createVNode(_component_u_cell_group, { border: false }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_cell_item, { title: $setup.t("订单编号"), arrow: false, "border-bottom": false }, { "right-icon": vue.withCtx(() => [ vue.createElementVNode("view", { class: "copy-value", onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyText($setup.orderInfo.order_id)) }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.orderInfo.order_id), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "file-text", size: "28", color: "#999", style: { "margin-left": "4px" } }) ]) ]), _: 1 /* STABLE */ }, 8, ["title"]), vue.createVNode(_component_u_cell_item, { title: $setup.t("订单状态"), arrow: false, "border-bottom": false }, { "right-icon": vue.withCtx(() => [ vue.createVNode(_component_u_tag, { text: $setup.getOrderStatusTag($setup.orderInfo.status).text, type: $setup.getOrderStatusTag($setup.orderInfo.status).type, plain: "", size: "mini" }, null, 8, ["text", "type"]) ]), _: 1 /* STABLE */ }, 8, ["title"]), vue.createVNode(_component_u_cell_item, { title: $setup.t("下注时间"), value: $setup.orderInfo.create_time, arrow: false, "border-bottom": false }, null, 8, ["title", "value"]), $setup.orderInfo.return_operation_time ? (vue.openBlock(), vue.createBlock(_component_u_cell_item, { key: 0, title: $setup.t("退款时间"), value: $setup.orderInfo.return_operation_time, arrow: false, "border-bottom": false }, null, 8, ["title", "value"])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_cell_item, { title: $setup.t("结算状态"), value: $setup.settlementStatusText, arrow: false, "border-bottom": false }, null, 8, ["title", "value"]), $setup.orderInfo.settlement_status !== 0 && $setup.orderInfo.settlement_time ? (vue.openBlock(), vue.createBlock(_component_u_cell_item, { key: 1, title: $setup.t("结算时间"), value: $setup.orderInfo.settlement_time, arrow: false, "border-bottom": false }, null, 8, ["title", "value"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }) ]), $setup.hasStatistics ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "info-card" }, [ vue.createElementVNode("view", { class: "card-header", style: { "margin-bottom": "16rpx" } }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString($setup.t("赛事统计")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { style: { "margin-bottom": "24rpx" } }, [ vue.createVNode(_component_u_subsection, { list: [$setup.t("上半场"), $setup.t("下半场")], current: $setup.statActiveTab, onChange: $setup.statTabChange, activeColor: "#f8b932" }, null, 8, ["list", "current"]) ]), vue.createElementVNode("view", { class: "stat-team-header" }, [ vue.createElementVNode( "text", { class: "team-name home" }, vue.toDisplayString($setup.locale === "zh" ? $setup.orderInfo.sport.home_team : $setup.orderInfo.sport.home_team_en), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "vs-text" }, "VS"), vue.createElementVNode( "text", { class: "team-name guest" }, vue.toDisplayString($setup.locale === "zh" ? $setup.orderInfo.sport.guest_team : $setup.orderInfo.sport.guest_team_en), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "stat-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.currentHalfStats, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "stat-row", key: index }, [ vue.createElementVNode( "text", { class: "stat-val home" }, vue.toDisplayString(item.home), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "stat-label-box" }, [ vue.createElementVNode( "text", { class: "stat-label" }, vue.toDisplayString(item.label), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "stat-val guest" }, vue.toDisplayString(item.guest), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), $setup.canRefund ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "action-box" }, [ vue.createVNode(_component_u_button, { type: "error", shape: "circle", onClick: $setup.handleRefund }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("申请退款")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : vue.createCommentVNode("v-if", true) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "loading-container" }, [ vue.createVNode(_component_u_loading, { mode: "circle", size: "36", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("text", { class: "loading-text" }, "Loading...") ])) ]; }), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleBettingHistoryBettingDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-32ff12af"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/bettingHistory/bettingDetail/index.vue"]]); const _sfc_main$d = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const orderStore = useOrderStore(); const WebsocketData = useWebsocketDataStore(); const pagingRef = vue.ref(null); const matchInfo = vue.ref(null); const dataId = vue.ref(""); const selectedMap = vue.ref({}); const stateTagType = vue.computed(() => { return (state) => { if (state === 0) return "warning"; else if (state === 1) return "success"; else return "danger"; }; }); const threeColMarkets = [ "Fulltime Result", "Match Winner", "Second Half Winner", "Double Chance", "To Win 2nd Half", "First Half Winner", "Results/Both Teams Score", "Handicap Result", "Team To Score First", "Team To Score Last", "Home Team Exact Goals Number", "Away Team Exact Goals Number", "Corners 1x2", "1x2 - 60 minutes", "1x2 - 30 minutes", "Highest Scoring Half", "First 10 min Winner", "Double Chance - First Half" ]; const pairPriority = { "Home": 1, "Away": 2, "Over": 1, "Under": 2, "Yes": 1, "No": 2, "Odd": 1, "Even": 2 }; const translateSelection = (valStr) => valStr === void 0 || valStr === null ? "" : String(valStr); const isDoubleChanceMarket = (market) => { if (!market || !market.values) return false; if (market.name_en && market.name_en.toLowerCase().includes("double chance")) return true; const vals = market.values.map((v) => v.value); const hasCombo1 = vals.includes("Home/Draw") && vals.includes("Home/Away") && vals.includes("Draw/Away"); const hasCombo2 = vals.includes("1/X") && vals.includes("1/2") && vals.includes("X/2"); return hasCombo1 || hasCombo2; }; const isThreeWayMarket = (market) => { if (!market || !market.values) return false; const hasHome = market.values.some((v) => ["Home", "1"].includes(v.value)); const hasDraw = market.values.some((v) => ["Draw", "X"].includes(v.value)); const hasAway = market.values.some((v) => ["Away", "2"].includes(v.value)); if (hasHome && hasDraw && hasAway) return true; const hasOver = market.values.some((v) => ["Over"].includes(v.value)); const hasExactly = market.values.some((v) => ["Exactly"].includes(v.value)); const hasUnder = market.values.some((v) => ["Under"].includes(v.value)); return hasOver && hasExactly && hasUnder; }; const getThreeWayHeaders = (market) => { if (!market || !market.values) return ["", "", ""]; let col1 = "", col2 = "", col3 = ""; const hasHome = market.values.some((v) => ["Home", "1"].includes(v.value)); const hasDraw = market.values.some((v) => ["Draw", "X"].includes(v.value)); const hasAway = market.values.some((v) => ["Away", "2"].includes(v.value)); const isHAD = hasHome && hasDraw && hasAway; for (const v of market.values) { if (isHAD) { if (!col1 && ["Home", "1"].includes(v.value)) { col1 = translateSelection(locale.value === "zh" ? v.value_text : v.value); } else if (!col2 && ["Draw", "X"].includes(v.value)) { col2 = translateSelection(locale.value === "zh" ? v.value_text : v.value); } else if (!col3 && ["Away", "2"].includes(v.value)) { col3 = translateSelection(locale.value === "zh" ? v.value_text : v.value); } } else { if (!col1 && ["Over"].includes(v.value)) { col1 = translateSelection(locale.value === "zh" ? v.value_text : v.value); } else if (!col2 && ["Exactly"].includes(v.value)) { col2 = translateSelection(locale.value === "zh" ? v.value_text : v.value); } else if (!col3 && ["Under"].includes(v.value)) { col3 = translateSelection(locale.value === "zh" ? v.value_text : v.value); } } } return [col1, col2, col3]; }; const isSlashGroupMarket = (market) => { if (!market || !market.values) return false; if (isDoubleChanceMarket(market)) return false; return market.values.some((v) => typeof v.value === "string" && v.value.includes("/")); }; const getSlashHeadersInfo = (market) => { const headers = []; const keys = []; if (!market || !market.values) return { headers, keys }; market.values.forEach((v) => { if (typeof v.value === "string" && v.value.includes("/")) { const key = v.value.split("/")[0]; if (!keys.includes(key)) { keys.push(key); let name = key; if (locale.value === "zh" && v.value_text && v.value_text.includes("/")) { name = v.value_text.split("/")[0]; } else { name = translateSelection(key); } headers.push({ key, name }); } } }); const orderedHeaders = []; const order = ["Home", "1", "Draw", "X", "Away", "2"]; order.forEach((k) => { const found = headers.find((h) => h.key === k); if (found && !orderedHeaders.includes(found)) orderedHeaders.push(found); }); headers.forEach((h) => { if (!orderedHeaders.includes(h)) orderedHeaders.push(h); }); return { headers: orderedHeaders, keys: orderedHeaders.map((h) => h.key) }; }; const isOverUnderMixedMarket = (market) => { if (!market || !market.values) return false; if (isThreeWayMarket(market)) return false; if (isSlashGroupMarket(market)) return false; let hasOver = false; let hasUnder = false; market.values.forEach((v) => { const val = String(v.value).toLowerCase(); const zhVal = String(v.value_text || ""); const hasNumber = /\d/.test(val) || /\d/.test(zhVal); if (hasNumber) { if (val.includes("over ") || val.includes(" or more") || zhVal.includes("大")) { hasOver = true; } if (val.includes("under ") || zhVal.includes("小")) { hasUnder = true; } } }); return hasOver && hasUnder; }; const getSelectionDisplayName = (market, selection) => { let rawText = translateSelection(locale.value === "zh" ? selection.value_text : selection.value); return rawText; }; const getColClass = (market) => { if (isThreeWayMarket(market)) return "col-3"; if (isSlashGroupMarket(market)) { return getSlashHeadersInfo(market).headers.length === 3 ? "col-3" : "col-2"; } if (isOverUnderMixedMarket(market)) return "col-2"; if (threeColMarkets.includes(market.name_en)) return "col-3"; return "col-2"; }; const showExpand = (market) => { if (isSlashGroupMarket(market)) { return market.values && market.values.length > getSlashHeadersInfo(market).headers.length; } if (isOverUnderMixedMarket(market)) { return market.values && market.values.length > 2; } return hasMore(market.values) && !threeColMarkets.includes(market.name_en); }; const getExpandRemainCount = (market) => { if (isSlashGroupMarket(market)) { return market.values.length - getSlashHeadersInfo(market).headers.length; } if (isOverUnderMixedMarket(market)) { return market.values.length - 2; } return getRemainCount(market.values); }; const isHeaderValue = (market, val) => { if (isSlashGroupMarket(market) || isOverUnderMixedMarket(market)) return false; if (isThreeWayMarket(market)) { return ["Home", "1", "Draw", "X", "Away", "2", "Over", "Exactly", "Under"].includes(val); } return hasPairHeaders(market) && pairPriority[val]; }; const getPairHeaders = (market) => { if (!market || !market.values) return ["", ""]; let left = ""; let right = ""; for (const v of market.values) { if (pairPriority[v.value] === 1 && !left) { left = translateSelection(locale.value === "zh" ? v.value_text : v.value); } else if (pairPriority[v.value] === 2 && !right) { right = translateSelection(locale.value === "zh" ? v.value_text : v.value); } } return [left, right]; }; const hasPairHeaders = (market) => { if (threeColMarkets.includes(market.name_en)) return false; if (isThreeWayMarket(market)) return false; if (isSlashGroupMarket(market)) return false; if (isOverUnderMixedMarket(market)) return false; const headers = getPairHeaders(market); return !!(headers[0] || headers[1]); }; const oddsChangeMap = vue.ref(/* @__PURE__ */ new Map()); const getOddsKey = (matchId, marketId, selection) => { let val = selection.submit_value !== void 0 ? selection.submit_value : selection.value; if (selection.handicap !== null && selection.handicap !== void 0 && selection.handicap !== "") { return `${matchId}_${marketId}_${val}_${selection.handicap}`; } if (selection.handicap_text !== null && selection.handicap_text !== void 0 && selection.handicap_text !== "") { return `${matchId}_${marketId}_${val}_${selection.handicap_text}`; } return `${matchId}_${marketId}_${val}`; }; const isOddsUp = (key) => { const change = oddsChangeMap.value.get(key); return (change == null ? void 0 : change.direction) === "up" && Date.now() - change.timestamp < 3e3; }; const isOddsDown = (key) => { const change = oddsChangeMap.value.get(key); return (change == null ? void 0 : change.direction) === "down" && Date.now() - change.timestamp < 3e3; }; const showChangeIcon = (key) => { const change = oddsChangeMap.value.get(key); return change && Date.now() - change.timestamp < 3e3; }; const isEventsExpanded = vue.ref(true); const parsedEvents = vue.computed(() => { if (!matchInfo.value || !matchInfo.value.event || !Array.isArray(matchInfo.value.event)) return []; return matchInfo.value.event.map((ev) => { let player = {}; let assist = {}; try { player = ev.player ? JSON.parse(ev.player) : {}; } catch (e) { } try { assist = ev.assist ? JSON.parse(ev.assist) : {}; } catch (e) { } return { ...ev, playerName: (player == null ? void 0 : player.name) || t2("未知"), assistName: (assist == null ? void 0 : assist.name) || "" }; }).sort((a, b) => a.time_elapsed - b.time_elapsed); }); const getEventIcon = (type2, detail) => { const lowerType = String(type2).toLowerCase(); const lowerDetail = String(detail).toLowerCase(); if (lowerType === "goal") return "⚽"; if (lowerType === "card") return lowerDetail.includes("yellow") ? "🟨" : "🟥"; if (lowerType === "subst") return "🔄"; return "⏱"; }; const getEventDetailText = (ev) => { let text = (locale.value === "zh" ? ev.detail_text : ev.detail) || ev.type; if (ev.assistName) text += ` (${ev.assistName})`; if (ev.comments) text += ` - ${ev.comments}`; return text; }; const getUniqueKey = (dataId2, marketId, selection) => { let val = selection.submit_value !== void 0 ? selection.submit_value : selection.value !== void 0 ? selection.value : selection.optionValue; let hdp = ""; if (selection.handicap !== null && selection.handicap !== void 0 && selection.handicap !== "") { hdp = `_${selection.handicap}`; } else if (selection.handicap_text !== null && selection.handicap_text !== void 0 && selection.handicap_text !== "") { hdp = `_${selection.handicap_text}`; } return `${dataId2}_${marketId}_${val}${hdp}`; }; const checkIsLocked = (item) => { if (!item) return true; if (Number(item.is_locked) === 1) return true; if (Number(item.status) !== 1) return true; const state = Number(item.state); return state !== 0 && state !== 1; }; const isOptionLocked = (item, marketId, opt) => { if (checkIsLocked(item)) return true; if (item && item.odd_ids_locked) { let lockedIds = item.odd_ids_locked; if (typeof lockedIds === "string") { try { lockedIds = JSON.parse(lockedIds); } catch (e) { lockedIds = []; } } if (Array.isArray(lockedIds) && lockedIds.map(Number).includes(Number(marketId))) return true; } if (!opt || !opt.odd || opt.odd === "-" || Number(opt.odd) === 0) return true; return opt.suspended === true || String(opt.suspended).toLowerCase() === "true"; }; const expandedGroups = vue.ref({}); const isExpanded = (id) => !!expandedGroups.value[id]; const toggleGroup = (id) => { expandedGroups.value[id] = !expandedGroups.value[id]; }; const getVisibleValues = (market, values) => { if (!values) return []; if (isSlashGroupMarket(market)) { const { keys } = getSlashHeadersInfo(market); const groups = {}; keys.forEach((k) => groups[k] = []); const others2 = []; values.forEach((v) => { if (typeof v.value === "string" && v.value.includes("/")) { const k = v.value.split("/")[0]; if (groups[k]) groups[k].push(v); else others2.push(v); } else { others2.push(v); } }); let sortedValues2 = []; const maxLen = Math.max(...keys.map((k) => groups[k].length), 0); for (let i = 0; i < maxLen; i++) { keys.forEach((k) => { if (groups[k][i]) sortedValues2.push(groups[k][i]); }); } sortedValues2 = sortedValues2.concat(others2); if (isExpanded(market.id)) return sortedValues2; return sortedValues2.length <= keys.length ? sortedValues2 : sortedValues2.slice(0, keys.length); } if (isOverUnderMixedMarket(market)) { const overs = [], unders = [], others2 = []; values.forEach((v) => { const valStr = String(v.value).toLowerCase(); const zhStr = String(v.value_text || ""); let type2 = ""; if (valStr.includes("under") || zhStr.startsWith("小")) type2 = "under"; else if (valStr.includes("over") || valStr.includes("or more") || zhStr.startsWith("大")) type2 = "over"; const numMatch = valStr.match(/\d+(\.\d+)?/); const key = numMatch ? numMatch[0] : valStr; if (type2 === "over") overs.push({ ...v, _sortKey: key }); else if (type2 === "under") unders.push({ ...v, _sortKey: key }); else others2.push(v); }); const keys = [.../* @__PURE__ */ new Set([...overs.map((o) => o._sortKey), ...unders.map((u2) => u2._sortKey)])]; keys.sort((a, b) => { const numA = parseFloat(a); const numB = parseFloat(b); if (!isNaN(numA) && !isNaN(numB)) return numA - numB; return a.localeCompare(b); }); let sortedValues2 = []; keys.forEach((k) => { const overItem = overs.find((o) => o._sortKey === k); const underItem = unders.find((u2) => u2._sortKey === k); if (overItem) sortedValues2.push(overItem); if (underItem) sortedValues2.push(underItem); }); sortedValues2 = sortedValues2.concat(others2); if (isExpanded(market.id)) return sortedValues2; return sortedValues2.length <= 2 ? sortedValues2 : sortedValues2.slice(0, 2); } if (threeColMarkets.includes(market.name_en)) return values; if (isThreeWayMarket(market)) { const col1 = [], col2 = [], col3 = [], others2 = []; const hasHome = market.values.some((v) => ["Home", "1"].includes(v.value)); const hasDraw = market.values.some((v) => ["Draw", "X"].includes(v.value)); const hasAway = market.values.some((v) => ["Away", "2"].includes(v.value)); const isHAD = hasHome && hasDraw && hasAway; values.forEach((v) => { if (isHAD) { if (["Home", "1"].includes(v.value)) col1.push(v); else if (["Draw", "X"].includes(v.value)) col2.push(v); else if (["Away", "2"].includes(v.value)) col3.push(v); else others2.push(v); } else { if (["Over"].includes(v.value)) col1.push(v); else if (["Exactly"].includes(v.value)) col2.push(v); else if (["Under"].includes(v.value)) col3.push(v); else others2.push(v); } }); let sortedValues2 = []; const maxLen = Math.max(col1.length, col2.length, col3.length); for (let i = 0; i < maxLen; i++) { if (col1[i]) sortedValues2.push(col1[i]); if (col2[i]) sortedValues2.push(col2[i]); if (col3[i]) sortedValues2.push(col3[i]); } sortedValues2 = sortedValues2.concat(others2); if (isExpanded(market.id)) return sortedValues2; return sortedValues2.length <= 3 ? sortedValues2 : sortedValues2.slice(0, 3); } const lefts = []; const rights = []; const others = []; values.forEach((v) => { const p = pairPriority[v.value]; if (p === 1) lefts.push(v); else if (p === 2) rights.push(v); else others.push(v); }); let sortedValues = []; if (lefts.length > 0 || rights.length > 0) { const maxLen = Math.max(lefts.length, rights.length); for (let i = 0; i < maxLen; i++) { if (lefts[i]) sortedValues.push(lefts[i]); if (rights[i]) sortedValues.push(rights[i]); } sortedValues = sortedValues.concat(others); } else { sortedValues = [...values]; } if (isExpanded(market.id)) return sortedValues; return sortedValues.length <= 3 ? sortedValues : sortedValues.slice(0, 2); }; const hasMore = (values) => { if (!values) return false; return values.length > 3; }; const getRemainCount = (values) => { if (!values) return 0; return values.length - 2; }; onLoad((options) => { if (options && options.data_id) dataId.value = options.data_id; }); vue.watch(() => WebsocketData.data, handleWebsocketData); function handleWebsocketData(data) { try { const res = typeof data === "string" ? JSON.parse(data) : data; if (res.type === "sport_list" && Array.isArray(res.message)) { res.message.forEach((newMatch) => { if (matchInfo.value && String(matchInfo.value.data_id) === String(newMatch.data_id)) { const oldMatch = matchInfo.value; let parsedNewOdds = newMatch.odds; if (typeof parsedNewOdds === "string") { try { parsedNewOdds = JSON.parse(parsedNewOdds); } catch (e) { parsedNewOdds = []; } } else if (!parsedNewOdds) parsedNewOdds = oldMatch.odds; if (oldMatch.odds && Array.isArray(oldMatch.odds) && parsedNewOdds && Array.isArray(parsedNewOdds)) { parsedNewOdds.forEach((newMarket) => { const oldMarket = oldMatch.odds.find((m) => m.id === newMarket.id); if (oldMarket && oldMarket.values && newMarket.values) { newMarket.values.forEach((newOpt) => { const oldOpt = oldMarket.values.find((o) => { if (o.submit_value && newOpt.submit_value) { return o.submit_value === newOpt.submit_value; } return o.value === newOpt.value && (o.handicap == newOpt.handicap || !o.handicap && !newOpt.handicap); }); if ((oldOpt == null ? void 0 : oldOpt.odd) && (newOpt == null ? void 0 : newOpt.odd)) { const oldOddNum = parseFloat(oldOpt.odd); const newOddNum = parseFloat(newOpt.odd); if (!isNaN(oldOddNum) && !isNaN(newOddNum) && oldOddNum !== newOddNum) { const key = getOddsKey(oldMatch.data_id, newMarket.id, newOpt); oddsChangeMap.value.set(key, { direction: newOddNum > oldOddNum ? "up" : "down", timestamp: Date.now() }); setTimeout(() => { oddsChangeMap.value.delete(key); }, 3100); } } }); } }); } let parsedOdds = newMatch.odds; if (typeof parsedOdds === "string") { try { parsedOdds = JSON.parse(parsedOdds); } catch (e) { parsedOdds = []; } } else if (!parsedOdds) parsedOdds = matchInfo.value.odds; let parsedLockedIds = newMatch.odd_ids_locked; if (typeof parsedLockedIds === "string") { try { parsedLockedIds = JSON.parse(parsedLockedIds); } catch (e) { parsedLockedIds = []; } } else if (parsedLockedIds === void 0) parsedLockedIds = matchInfo.value.odd_ids_locked || []; matchInfo.value = { ...matchInfo.value, ...newMatch, odds: parsedOdds, odd_ids_locked: parsedLockedIds }; if (matchInfo.value.odds) { matchInfo.value.odds.forEach((market) => { if (market.values) { market.values.forEach((wsItem) => { if (isOptionLocked(matchInfo.value, market.id, wsItem)) { const uniqueKey = getUniqueKey(matchInfo.value.data_id, market.id, wsItem); } }); } }); } orderStore.updateMatchStatus(newMatch.data_id, matchInfo.value); } }); } } catch (error) { } } onShow(() => { syncFromStore(); fetchData(); }); vue.watch(() => orderStore.selectOrders, () => { syncFromStore(); }, { deep: true }); const syncFromStore = () => { const map = {}; if (orderStore.selectOrders && orderStore.selectOrders.length) { orderStore.selectOrders.forEach((order) => { if (order.uniqueKey) map[order.uniqueKey] = true; }); } selectedMap.value = map; }; const fetchData = async () => { if (!dataId.value) return pagingRef.value.complete(false); try { const res = await getSportInfo({ data_id: dataId.value }); if (res.code === 1 && res.data) { if (typeof res.data.odds === "string") { try { res.data.odds = JSON.parse(res.data.odds); } catch (e) { res.data.odds = []; } } if (res.data.odd_ids_locked && typeof res.data.odd_ids_locked === "string") { try { res.data.odd_ids_locked = JSON.parse(res.data.odd_ids_locked); } catch (e) { res.data.odd_ids_locked = []; } } matchInfo.value = res.data; pagingRef.value.complete(true); } else { pagingRef.value.complete(false); uni.showToast({ title: res.msg || t2("获取赛事失败"), icon: "none" }); setTimeout(() => { uni.navigateBack(); }, 1500); } } catch (e) { pagingRef.value.complete(false); } }; const getStatusText = (state) => { const states = { 0: t2("未开始"), 1: t2("进行中"), 2: t2("已完场"), 3: t2("延期"), 4: t2("取消") }; return states[state] || t2("未知"); }; const getScore = (scoreStr, index) => { if (!scoreStr || scoreStr === "-") return 0; return scoreStr.split("-")[index] || 0; }; const getMarketName = (name) => name; const isSelected = (marketId, selection) => matchInfo.value ? !!selectedMap.value[getUniqueKey(matchInfo.value.data_id, marketId, selection)] : false; const handleBet = (market, selection) => { if (isOptionLocked(matchInfo.value, market.id, selection)) return; const uniqueKey = getUniqueKey(matchInfo.value.data_id, market.id, selection); if (isSelected(market.id, selection)) { orderStore.removeOrderItemByKey(uniqueKey); } else { if (market.values) { market.values.forEach((wsItem) => { const otherKey = getUniqueKey(matchInfo.value.data_id, market.id, wsItem); if (selectedMap.value[otherKey]) orderStore.removeOrderItemByKey(otherKey); }); } const betItem = { matchId: matchInfo.value.id, data_id: matchInfo.value.data_id, league: matchInfo.value.league, league_en: matchInfo.value.league_en, homeTeam: matchInfo.value.home_team, home_team_en: matchInfo.value.home_team_en, guestTeam: matchInfo.value.guest_team, guest_team_en: matchInfo.value.guest_team_en, betType: market.name, betTypeEn: market.name_en, betTypeName: selection.value_text, betTypeNameEn: selection.value, handicap: selection.handicap, handicap_text: selection.handicap_text, odds: selection.odd, score: matchInfo.value.score, state: matchInfo.value.state, status: matchInfo.value.status, is_roll: matchInfo.value.is_roll, is_locked: matchInfo.value.is_locked, uniqueKey, optionValue: selection.value, submit_value: selection.submit_value, marketId: market.id, mininum: market.mininum, // 新增:最低限额 maxinum: market.maxinum, // 新增:最高限额 selection: { ...selection } }; orderStore.addOrderItem(betItem); uni.vibrateShort(); } }; const __returned__ = { t: t2, locale, orderStore, WebsocketData, pagingRef, matchInfo, dataId, selectedMap, stateTagType, threeColMarkets, pairPriority, translateSelection, isDoubleChanceMarket, isThreeWayMarket, getThreeWayHeaders, isSlashGroupMarket, getSlashHeadersInfo, isOverUnderMixedMarket, getSelectionDisplayName, getColClass, showExpand, getExpandRemainCount, isHeaderValue, getPairHeaders, hasPairHeaders, oddsChangeMap, getOddsKey, isOddsUp, isOddsDown, showChangeIcon, isEventsExpanded, parsedEvents, getEventIcon, getEventDetailText, getUniqueKey, checkIsLocked, isOptionLocked, expandedGroups, isExpanded, toggleGroup, getVisibleValues, hasMore, getRemainCount, handleWebsocketData, syncFromStore, fetchData, getStatusText, getScore, getMarketName, isSelected, handleBet, ref: vue.ref, watch: vue.watch, onUnmounted: vue.onUnmounted, computed: vue.computed, get onLoad() { return onLoad; }, get onShow() { return onShow; }, get useI18n() { return useI18n; }, get getSportInfo() { return getSportInfo; }, get useOrderStore() { return useOrderStore; }, get useWebsocketDataStore() { return useWebsocketDataStore; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_image = __unplugin_components_1$1; const _component_u_icon = __unplugin_components_0$5; const _component_u_tag = __unplugin_components_2$2; const _component_u_empty = __unplugin_components_4$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("赛事详情") }, { default: vue.withCtx(() => [ vue.createVNode( _component_z_paging, { ref: "pagingRef", onQuery: $setup.fetchData, "refresher-only": true, "loading-more-enabled": false, fixed: false, "auto-show-system-loading": true }, { refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "flex flex-col items-center justify-center py-6" }, [ vue.createElementVNode("view", { class: "refresh-spinner mb-2" }), vue.createElementVNode( "text", { class: "text-xs tmc" }, vue.toDisplayString($setup.t("正在更新赛事...")), 1 /* TEXT */ ) ]) ]), default: vue.withCtx(() => { var _a2, _b2; return [ $setup.matchInfo ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode("view", { class: "scoreboard" }, [ vue.createElementVNode("view", { class: "bg-mask" }), vue.createElementVNode("view", { class: "league-bar-top" }, [ vue.createElementVNode("view", { class: "league-info" }, [ $setup.matchInfo.league_logo ? (vue.openBlock(), vue.createBlock(_component_u_image, { key: 0, src: $setup.matchInfo.league_logo, width: "16px", height: "16px" }, null, 8, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 1, name: "grid-fill", color: "#f8b932", size: "14" })), vue.createElementVNode( "text", { class: "league-name" }, vue.toDisplayString($setup.locale === "zh" ? $setup.matchInfo.league : $setup.matchInfo.league_en), 1 /* TEXT */ ), $setup.matchInfo.is_roll === 1 ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 2, text: $setup.t("滚球"), type: "primary", size: "mini", class: "ml-2" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "match-main-info" }, [ vue.createElementVNode("view", { class: "team-block" }, [ vue.createElementVNode("view", { class: "logo-wrapper" }, [ vue.createVNode(_component_u_image, { src: $setup.matchInfo.home_team_logo, errorIcon: "photo", width: "56px", height: "56px", shape: "circle" }, null, 8, ["src"]) ]), vue.createElementVNode( "text", { class: "team-name" }, vue.toDisplayString($setup.locale === "zh" ? $setup.matchInfo.home_team : $setup.matchInfo.home_team_en), 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "success", plain: "" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("主")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), vue.createElementVNode("view", { class: "score-block" }, [ vue.createElementVNode( "span", { class: vue.normalizeClass(["game-time-tag", `is-${$setup.stateTagType($setup.matchInfo.state)}`]) }, vue.toDisplayString($setup.matchInfo.game_time), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["status-badge", `is-${$setup.stateTagType($setup.matchInfo.state)}`]) }, [ $setup.matchInfo.state === 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "live-dot" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "status-text" }, vue.toDisplayString($setup.getStatusText($setup.matchInfo.state)), 1 /* TEXT */ ) ], 2 /* CLASS */ ), $setup.matchInfo.state !== 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "score-display" }, [ vue.createElementVNode( "text", { class: "score-num" }, vue.toDisplayString($setup.getScore($setup.matchInfo.score, 0)), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "score-colon" }, ":"), vue.createElementVNode( "text", { class: "score-num" }, vue.toDisplayString($setup.getScore($setup.matchInfo.score, 1)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $setup.matchInfo.half_score && $setup.matchInfo.state !== 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "half-score" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("上半场")) + " " + vue.toDisplayString($setup.matchInfo.half_score), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $setup.matchInfo.fixture_status && ((_a2 = $setup.matchInfo.fixture_status) == null ? void 0 : _a2.long) ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "fixture-status" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t((_b2 = $setup.matchInfo.fixture_status) == null ? void 0 : _b2.long)), 1 /* TEXT */ ), $setup.matchInfo.fixture_status.seconds ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "margin-left": "4px" } }, vue.toDisplayString($setup.matchInfo.fixture_status.seconds), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "team-block" }, [ vue.createElementVNode("view", { class: "logo-wrapper" }, [ vue.createVNode(_component_u_image, { src: $setup.matchInfo.guest_team_logo, width: "56px", height: "56px", errorIcon: "photo", shape: "circle" }, null, 8, ["src"]) ]), vue.createElementVNode( "text", { class: "team-name" }, vue.toDisplayString($setup.locale === "zh" ? $setup.matchInfo.guest_team : $setup.matchInfo.guest_team_en), 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { size: "mini", type: "error", plain: "" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("客")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]), vue.createElementVNode("view", { class: "market-list" }, [ $setup.matchInfo.event && $setup.matchInfo.event.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "market-card events-card" }, [ vue.createElementVNode("view", { class: "market-header", onClick: _cache[0] || (_cache[0] = ($event) => $setup.isEventsExpanded = !$setup.isEventsExpanded), style: { "cursor": "pointer", "border-bottom": "none", "padding-bottom": "0", "margin-bottom": "0" } }, [ vue.createElementVNode("view", { class: "header-left" }, [ vue.createElementVNode("view", { class: "stick" }), vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString($setup.t("比赛事件")), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_icon, { name: $setup.isEventsExpanded ? "arrow-up" : "arrow-down", color: "#94a3b8", size: "16" }, null, 8, ["name"]) ]), vue.withDirectives(vue.createElementVNode( "view", { class: "events-body" }, [ vue.createElementVNode("view", { class: "timeline" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.parsedEvents, (ev, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "timeline-item", key: ev.id || idx }, [ vue.createElementVNode( "view", { class: "t-time" }, vue.toDisplayString(ev.time_elapsed) + "'", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "t-node" }, [ vue.createElementVNode( "text", { class: "t-icon" }, vue.toDisplayString($setup.getEventIcon(ev.type, ev.detail)), 1 /* TEXT */ ), idx !== $setup.parsedEvents.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "t-line" })) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "t-content" }, [ vue.createElementVNode( "text", { class: "t-player" }, vue.toDisplayString(ev.playerName), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "t-detail" }, vue.toDisplayString($setup.getEventDetailText(ev)), 1 /* TEXT */ ) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.isEventsExpanded] ]) ])) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.matchInfo.odds, (market, mIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: "market-card", key: mIndex }, [ vue.createElementVNode("view", { class: "market-header" }, [ vue.createElementVNode("view", { class: "header-left" }, [ vue.createElementVNode("view", { class: "stick" }), vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString($setup.getMarketName($setup.locale === "zh" ? market.name : market.name_en)), 1 /* TEXT */ ) ]), $setup.showExpand(market) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "header-right", onClick: ($event) => $setup.toggleGroup(market.id) }, [ vue.createElementVNode( "text", { class: "toggle-text" }, vue.toDisplayString($setup.isExpanded(market.id) ? $setup.t("收起") : $setup.t("展开") + " +" + $setup.getExpandRemainCount(market)), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: $setup.isExpanded(market.id) ? "arrow-up" : "arrow-down", color: "#64748b", size: "14" }, null, 8, ["name"]) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ]), $setup.hasPairHeaders(market) || $setup.isThreeWayMarket(market) || $setup.isSlashGroupMarket(market) || $setup.isOverUnderMixedMarket(market) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "pair-headers" }, [ $setup.isSlashGroupMarket(market) ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($setup.getSlashHeadersInfo(market).headers, (h, idx) => { return vue.openBlock(), vue.createElementBlock( "view", { class: "pair-header-item", key: idx }, vue.toDisplayString(h.name), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) : $setup.isThreeWayMarket(market) ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createElementVNode( "view", { class: "pair-header-item" }, vue.toDisplayString($setup.getThreeWayHeaders(market)[0]), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "pair-header-item" }, vue.toDisplayString($setup.getThreeWayHeaders(market)[1]), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "pair-header-item" }, vue.toDisplayString($setup.getThreeWayHeaders(market)[2]), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : $setup.isOverUnderMixedMarket(market) ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ vue.createElementVNode( "view", { class: "pair-header-item" }, vue.toDisplayString($setup.locale === "zh" ? "大" : "Over"), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "pair-header-item" }, vue.toDisplayString($setup.locale === "zh" ? "小" : "Under"), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 3 }, [ vue.createElementVNode( "view", { class: "pair-header-item" }, vue.toDisplayString($setup.getPairHeaders(market)[0]), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "pair-header-item" }, vue.toDisplayString($setup.getPairHeaders(market)[1]), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "odds-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.getVisibleValues(market, market.values), (selection, sIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["odds-btn", [ $setup.getColClass(market), { "is-active": $setup.isSelected(market.id, selection), "is-locked": $setup.isOptionLocked($setup.matchInfo, market.id, selection), "odds-up": $setup.isOddsUp($setup.getOddsKey($setup.matchInfo.data_id, market.id, selection)) && !$setup.isOptionLocked($setup.matchInfo, market.id, selection), "odds-down": $setup.isOddsDown($setup.getOddsKey($setup.matchInfo.data_id, market.id, selection)) && !$setup.isOptionLocked($setup.matchInfo, market.id, selection) } ]]), key: sIndex, onClick: ($event) => $setup.handleBet(market, selection) }, [ $setup.isOptionLocked($setup.matchInfo, market.id, selection) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "locked-overlay" }, [ vue.createVNode(_component_u_icon, { name: "lock", color: "#fff", size: "32" }) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "btn-left" }, [ vue.createElementVNode( "text", { class: "selection-name" }, vue.toDisplayString($setup.getSelectionDisplayName(market, selection)), 1 /* TEXT */ ), selection.handicap_text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "selection-handicap" }, vue.toDisplayString(selection.handicap_text), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btn-right" }, [ vue.createElementVNode("text", { class: "odds-val" }, [ vue.createTextVNode( vue.toDisplayString(selection.odd || "-") + " ", 1 /* TEXT */ ), $setup.showChangeIcon($setup.getOddsKey($setup.matchInfo.data_id, market.id, selection)) && !$setup.isOptionLocked($setup.matchInfo, market.id, selection) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["change-icon", { up: $setup.isOddsUp($setup.getOddsKey($setup.matchInfo.data_id, market.id, selection)), down: $setup.isOddsDown($setup.getOddsKey($setup.matchInfo.data_id, market.id, selection)) }]) }, [ vue.withDirectives(vue.createVNode( _component_u_icon, { name: "arrow-up-fill" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.isOddsUp($setup.getOddsKey($setup.matchInfo.data_id, market.id, selection))] ]), vue.withDirectives(vue.createVNode( _component_u_icon, { name: "arrow-down-fill" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, !$setup.isOddsUp($setup.getOddsKey($setup.matchInfo.data_id, market.id, selection))] ]) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ]) ]) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), (!$setup.matchInfo.odds || $setup.matchInfo.odds.length === 0) && $setup.matchInfo.state !== 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty-box" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无盘口数据"), mode: "data" }, null, 8, ["text"]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btHeight" }), vue.createElementVNode("view", { class: "safe-hb" }), vue.createElementVNode("view", { class: "safe-ht" }) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]; }), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesCommonSportDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-21bc9fc5"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/common/sportDetail/index.vue"]]); const _sfc_main$c = { __name: "BettingItems", props: ["PageContainerRef", "issue_no", "m", "s", "pc28", "apiIsFengpan", "selectedItems"], emits: ["toggle"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const { t: t2 } = useI18n(); const WebsocketData = useWebsocketDataStore(); const ruleList = vue.ref([]); const isFengpan = vue.ref(false); const props = __props; const emit = __emit; vue.watch(() => props.apiIsFengpan, (val) => { isFengpan.value = val; }); const expandedGroups = vue.ref({}); const isExpanded = (groupName) => !!expandedGroups.value[groupName]; const expandGroup = (groupName) => { expandedGroups.value[groupName] = true; }; const getLimit = () => { return 3; }; const getVisibleRules = (groupName, rules2) => { if (groupName === "热门" || isExpanded(groupName)) { return rules2; } const limit = getLimit(); return rules2.slice(0, limit); }; const hasMore = (groupName, rules2) => { if (groupName === "热门") return false; const limit = getLimit(); return rules2.length > limit; }; const getRemainCount = (rules2) => { const limit = getLimit(); return rules2.length - limit; }; vue.onMounted(() => { fetchRules(); }); const fetchRules = async () => { try { const res = await getGameRuleList({ page: 1, limit: 999 }); if (res.code === 1 && res.data && res.data.list) { ruleList.value = res.data.list.reverse(); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/components/BettingItems.vue:104", "获取玩法规则失败", error); } }; const groupedRules = vue.computed(() => { const map = {}; ruleList.value.forEach((rule) => { let group = rule.groups || "其他"; if (!map[group]) { map[group] = []; } map[group].push(rule); }); const sortedMap = {}; if (map["热门"]) { sortedMap["热门"] = map["热门"]; delete map["热门"]; } Object.keys(map).forEach((key) => { sortedMap[key] = map[key]; }); return sortedMap; }); const isSelected = (id) => { return props.selectedItems && props.selectedItems.some((item) => item.id === id); }; vue.watch(() => WebsocketData.globalData, (data) => { const res = typeof data === "string" ? JSON.parse(data) : data; if (props.pc28 === 0) { if (res && res.type === "issue_fengpan") { isFengpan.value = true; } else if (res && res.type === "issue_kaipan") { isFengpan.value = false; } } else if (props.pc28 === 1) { if (res && res.type === "jisu_fengpan") { isFengpan.value = true; } else if (res && res.type === "jisu_kaipan") { isFengpan.value = false; } } }); const __returned__ = { t: t2, WebsocketData, ruleList, isFengpan, props, emit, expandedGroups, isExpanded, expandGroup, getLimit, getVisibleRules, hasMore, getRemainCount, fetchRules, groupedRules, isSelected, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, watch: vue.watch, get useI18n() { return useI18n; }, get getGameRuleList() { return getGameRuleList; }, get useWebsocketDataStore() { return useWebsocketDataStore; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_empty = __unplugin_components_4$2; return vue.openBlock(), vue.createElementBlock("view", { class: "rule-betting-container" }, [ vue.createElementVNode("view", { class: "rule-list-wrap" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.groupedRules, (rules2, groupName) => { return vue.openBlock(), vue.createElementBlock("view", { key: groupName, class: "rule-group" }, [ vue.createElementVNode("view", { class: "group-title" }, [ vue.createElementVNode("view", { class: "stick" }), vue.createElementVNode( "text", null, vue.toDisplayString(groupName || $setup.t("其他玩法")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "rule-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.getVisibleRules(groupName, rules2), (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["rule-btn", { "is-active": $setup.isSelected(item.id), "is-disabled": Number(item.odds) <= 0 || $setup.isFengpan }]), key: item.id, onClick: ($event) => !$setup.isFengpan && Number(item.odds) > 0 && $setup.emit("toggle", item) }, [ vue.createElementVNode( "text", { class: "keyword" }, vue.toDisplayString(item.keywords), 1 /* TEXT */ ), !$setup.isFengpan && Number(item.odds) > 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "odds" }, vue.toDisplayString(Number(item.odds).toFixed(2)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "odds" }, "--")) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), !$setup.isExpanded(groupName) && $setup.hasMore(groupName, rules2) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "rule-btn expand-btn", onClick: ($event) => $setup.expandGroup(groupName) }, [ vue.createElementVNode("text", { class: "plus-icon" }, "+"), vue.createElementVNode( "text", { class: "remain-count" }, vue.toDisplayString($setup.getRemainCount(rules2)), 1 /* TEXT */ ) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), Object.keys($setup.groupedRules).length === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "empty-box" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无玩法数据"), mode: "data" }, null, 8, ["text"]) ])) : vue.createCommentVNode("v-if", true) ]) ]); } const BettingItems = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-1a6727a2"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/components/BettingItems.vue"]]); const CACHE_KEY$1 = "0_GAME_RULE_CART_CACHE"; const _sfc_main$b = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const router2 = useRouter(); const PageContainerRef = vue.ref(); const pagingRef = vue.ref(null); const latestDraw = vue.ref(null); const countdownInfo = vue.ref(null); const isFengpan = vue.ref(false); const showDetailPopup = vue.ref(false); const timeLeft = vue.ref(0); let timer = null; const selectedItems = vue.ref(uni.getStorageSync(CACHE_KEY$1) || []); const isOpen = vue.ref(false); const userMoney = vue.ref(0); const safeModalRef = vue.ref(null); const showSafeModal = vue.ref(false); const safeWord = vue.ref(""); const batchStakeValue = vue.ref(uni.getStorageSync("pc28BatchStakeCache") || ""); vue.watch(selectedItems, (newVal) => { uni.setStorageSync(CACHE_KEY$1, newVal); }, { deep: true }); const selectedCount = vue.computed(() => selectedItems.value.length); const totalStake = vue.computed(() => { return selectedItems.value.reduce((sum, item) => sum + (Number(item.amount) || 0), 0); }); const handleToggleItem = (rule) => { if (Number(rule.odds) <= 0 || isFengpan.value) return; const index = selectedItems.value.findIndex((item) => item.id === rule.id); if (index > -1) { selectedItems.value.splice(index, 1); if (selectedItems.value.length === 0) isOpen.value = false; } else { const defaultAmount = Number(rule.mininum) > 0 ? Number(rule.mininum) : 20; selectedItems.value.push({ ...rule, amount: defaultAmount }); } }; const removeItem = (id) => { selectedItems.value = selectedItems.value.filter((item) => item.id !== id); if (selectedItems.value.length === 0) isOpen.value = false; }; const changeAmount = (item, delta) => { let val = Number(item.amount) || 0; Number(item.mininum) || 0; const max = Number(item.maxinum) || 9999999; val += delta; if (val < 0) val = 0; if (val > max) { val = max; uni.showToast({ title: `${t2("已达最高投注")} ${max}`, icon: "none" }); } item.amount = val; }; const validateAmount = (item) => { }; const applyBatchStake = () => { let val = batchStakeValue.value; uni.setStorageSync("pc28BatchStakeCache", val); if (val === "") { selectedItems.value.forEach((item) => { item.amount = ""; }); return; } let numVal = Number(val); if (isNaN(numVal) || numVal <= 0) { return uni.showToast({ title: t2("请输入大于0的有效金额"), icon: "none" }); } selectedItems.value.forEach((item) => { let itemVal = numVal; const min = Number(item.mininum) || 0; const max = Number(item.maxinum) || 9999999; if (itemVal < min) { itemVal = min; } if (itemVal > max) { itemVal = max; } item.amount = itemVal; }); }; const fetchBalance = async () => { try { const res = await getBalance(); if (res.code === 1) { userMoney.value = Number(res.data.money); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/PC28/index.vue:392", "获取余额失败", error); } }; const submitBet = () => { if (isFengpan.value) return; if (selectedItems.value.length === 0) return uni.$u.toast(t2("请选择投注单")); for (let i = 0; i < selectedItems.value.length; i++) { const item = selectedItems.value[i]; const stake = Number(item.amount); if (!stake || stake <= 0) { return uni.showToast({ title: t2("请输入大于0的有效投注金额"), icon: "none" }); } const min = Number(item.mininum) || 0; const max = Number(item.maxinum) || 9999999; if (stake < min) { return uni.showToast({ title: `${t2("最低投注限额为")} ${min}`, icon: "none" }); } if (stake > max) { return uni.showToast({ title: `${t2("最高投注限额为")} ${max}`, icon: "none" }); } } if (totalStake.value > userMoney.value) return uni.showToast({ title: t2("余额不足"), icon: "none" }); safeWord.value = ""; confirmSubmitBet(); }; const confirmSubmitBet = () => { uni.showModal({ title: t2("提示"), content: t2("确认提交吗?"), success: (res) => { if (res.confirm) { const ordersData = selectedItems.value.map((item) => ({ id: item.id, amount: item.amount })); submitGameBet({ data: ordersData, safe_word: safeWord.value, pc28: 0 }).then((res2) => { var _a2, _b2; if (res2.code === 1) { uni.showToast({ title: t2("投注成功"), icon: "success" }); selectedItems.value = []; isOpen.value = false; showSafeModal.value = false; fetchBalance(); if ((_a2 = PageContainerRef.value) == null ? void 0 : _a2.getData) { PageContainerRef.value.getData(); } } else { uni.showToast({ title: res2.msg || t2("投注失败"), icon: "none" }); (_b2 = safeModalRef.value) == null ? void 0 : _b2.clearLoading(); } }).catch((err) => { var _a2; formatAppLog("error", "at pages/Tabbar/Entertainment/view/PC28/index.vue:448", "投注错误:", err); (_a2 = safeModalRef.value) == null ? void 0 : _a2.clearLoading(); }); } } }); }; const goTopUp = () => { if (!uni.getStorageSync("token")) { uni.showToast({ title: t2("请先登录"), icon: "none" }); uni.navigateTo({ url: "/pages/login/index?redirect=/pages/Tabbar/Entertainment/view/PC28/index" }); return; } router2.push({ name: "topUp" }); }; const getApiBasePath = () => { return "issue"; }; const getLatestYuanTou = () => { return new Promise((resolve2, reject) => { uni.request({ url: `${apiUrl}${getApiBasePath()}/yuanTou`, method: "GET", success: (res) => resolve2(res.data), fail: (err) => reject(err), header: { lang: locale.value } }); }); }; const getCountdown = () => { return new Promise((resolve2, reject) => { uni.request({ url: `${apiUrl}${getApiBasePath()}/countdown`, method: "GET", success: (res) => resolve2(res.data), fail: (err) => reject(err), header: { lang: locale.value } }); }); }; const onQuery = async () => { try { await fetchTopData(); pagingRef.value.complete([]); } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/PC28/index.vue:516", error); pagingRef.value.complete(false); } }; const goToHistory = () => { router2.push({ name: "history" }); }; const goToPC28History = () => { router2.push({ name: "AllHistory", query: { tab: 1 } }); }; const fetchTopData = async () => { try { const [yuanTouRes, countRes] = await Promise.all([ getLatestYuanTou(), getCountdown() ]); if (yuanTouRes.code === 0 && yuanTouRes.data.length > 0) { latestDraw.value = yuanTouRes.data[0]; } if (countRes.code === 0 && countRes.data) { countdownInfo.value = countRes.data; startCountdown(countRes.data.end_time, countRes.data.current_time); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/PC28/index.vue:551", "获取顶部数据失败", error); } }; const startCountdown = (endTime, currentTime) => { clearInterval(timer); const diff = endTime - currentTime; timeLeft.value = Math.max(0, diff); if (diff > 0) { timer = setInterval(() => { if (timeLeft.value > 0) { timeLeft.value--; } else { clearInterval(timer); } }, 1e3); } }; const formatTime = (seconds) => { const m = Math.floor(seconds / 60).toString().padStart(2, "0"); const s = (seconds % 60).toString().padStart(2, "0"); return { m, s }; }; const latestSum = vue.computed(() => { if (!latestDraw.value) return 0; return Number(latestDraw.value.openCode1 || 0) + Number(latestDraw.value.openCode2 || 0) + Number(latestDraw.value.openCode3 || 0); }); const calcDetails = vue.computed(() => { if (!latestDraw.value || !latestDraw.value.keno) return null; const keno = latestDraw.value.keno.map(Number); const getZone = (startIndex) => { let nums = []; let sum = 0; for (let i = 0; i < 6; i++) { const val = keno[startIndex + i * 3]; nums.push(val); sum += val; } return { str: nums.join(" + "), sum }; }; return { zone1: getZone(1), zone2: getZone(2), zone3: getZone(3) }; }); const getBallColor = (numStr) => { const num = parseInt(numStr, 10); return num % 2 === 0 ? "red-ball" : "blue-ball"; }; const getGridCellClass = (num) => { if (!latestDraw.value || !latestDraw.value.keno) return ""; const isSelected = latestDraw.value.keno.some((k) => Number(k) === num); if (isSelected) { return num % 2 === 0 ? "bg-red" : "bg-blue"; } return ""; }; const goRule = () => { router2.push({ name: "PC28Rule" }); }; vue.onMounted(() => { uni.$on("onSocketMessage", (data) => { var _a2; if (!data) return; try { const res = JSON.parse(data); if (res.type === "new_issue") { const currentIssue = (_a2 = countdownInfo.value) == null ? void 0 : _a2.issue_no; if (currentIssue !== res.message) { fetchTopData(); getGameLotteryStatus(); } } if (res && res.type === "issue_fengpan") { isFengpan.value = true; } else if (res && res.type === "issue_kaipan") { isFengpan.value = false; } } catch (e) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/PC28/index.vue:648", "WebSocket消息解析失败:", e); } }); }); onQuery(); function getGameLotteryStatus() { gameLotteryStatus({ type: 1 }).then((res) => { if (res.data.is_kaipan == 0) { isFengpan.value = true; } else if (res.data.is_kaipan == 1) { isFengpan.value = false; } }); } getGameLotteryStatus(); vue.onUnmounted(() => { clearInterval(timer); uni.$off("onSocketMessage"); }); onLoad(() => { }); onShow(() => { vue.nextTick(() => { uni.customFromPath = ""; }); batchStakeValue.value = uni.getStorageSync("pc28BatchStakeCache") || ""; if (uni.getStorageSync("token")) { fetchBalance(); } }); const __returned__ = { t: t2, locale, router: router2, PageContainerRef, pagingRef, latestDraw, countdownInfo, isFengpan, showDetailPopup, timeLeft, get timer() { return timer; }, set timer(v) { timer = v; }, CACHE_KEY: CACHE_KEY$1, selectedItems, isOpen, userMoney, safeModalRef, showSafeModal, safeWord, batchStakeValue, selectedCount, totalStake, handleToggleItem, removeItem, changeAmount, validateAmount, applyBatchStake, fetchBalance, submitBet, confirmSubmitBet, goTopUp, getApiBasePath, getLatestYuanTou, getCountdown, onQuery, goToHistory, goToPC28History, fetchTopData, startCountdown, formatTime, latestSum, calcDetails, getBallColor, getGridCellClass, goRule, getGameLotteryStatus, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, nextTick: vue.nextTick, watch: vue.watch, get useI18n() { return useI18n; }, BettingItems, get onLoad() { return onLoad; }, get onShow() { return onShow; }, get apiUrl() { return apiUrl; }, get gameLotteryStatus() { return gameLotteryStatus; }, get getBalance() { return getBalance; }, get submitGameBet() { return submitGameBet; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_tag = __unplugin_components_2$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_popup = __unplugin_components_2$3; const _component_u_button = __unplugin_components_2$1; const _component_u_input = __unplugin_components_3$2; const _component_u_modal = __unplugin_components_4$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode( _component_PageContainer, { ref: "PageContainerRef", navTitle: "加拿大28" }, { default: vue.withCtx(() => [ vue.createVNode( _component_z_paging, { ref: "pagingRef", onQuery: $setup.onQuery, fixed: false, "refresher-only": true, "refresher-enabled": true, "loading-more-enabled": false, "auto-show-back-to-top": true }, { refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("获取最新数据...")), 1 /* TEXT */ ) ]) ]), default: vue.withCtx(() => { var _a2; return [ vue.createElementVNode("view", { class: "top-section" }, [ $setup.latestDraw ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "latest-draw-card" }, [ vue.createElementVNode("view", { class: "header" }, [ vue.createElementVNode("view", { class: "title-left" }, [ vue.createElementVNode( "text", { class: "bclc" }, vue.toDisplayString($setup.t("加拿大")) + "28", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "issue" }, vue.toDisplayString($setup.latestDraw.issue_no || $setup.latestDraw.section) + " " + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_icon, { name: "globe", size: "40", color: "#666" }) ]), $setup.latestDraw.keno && $setup.latestDraw.keno.length > 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "balls-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.latestDraw.keno, (num, idx) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["ball", $setup.getBallColor(num)]), key: idx }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(num), 1 /* TEXT */ ) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "calc-tabs" }, [ vue.createElementVNode( "view", { class: "c-tab active", onClick: _cache[0] || (_cache[0] = ($event) => $setup.showDetailPopup = true) }, vue.toDisplayString($setup.t("开奖详情")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "c-tab active", onClick: $setup.goToHistory }, vue.toDisplayString($setup.t("往期历史")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "c-tab active", onClick: $setup.goToPC28History }, vue.toDisplayString($setup.t("投注记录")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "c-tab active", onClick: $setup.goRule }, vue.toDisplayString($setup.t("开奖规则")), 1 /* TEXT */ ) ]), $setup.latestDraw && $setup.calcDetails ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "calc-card" }, [ vue.createElementVNode("view", { class: "equation" }, [ vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode1), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "+"), vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode2), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "+"), vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode3), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "="), vue.createElementVNode( "view", { class: "circle result" }, vue.toDisplayString($setup.latestSum), 1 /* TEXT */ ) ]), $setup.latestDraw.keno && $setup.latestDraw.keno.length > 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "details-list" }, [ vue.createElementVNode("view", { class: "d-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("前")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "formula" }, vue.toDisplayString($setup.calcDetails.zone1.str) + " = " + vue.toDisplayString($setup.calcDetails.zone1.sum) + " " + vue.toDisplayString($setup.t("取")) + " " + vue.toDisplayString($setup.latestDraw.openCode1), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "d-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("中")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "formula" }, vue.toDisplayString($setup.calcDetails.zone2.str) + " = " + vue.toDisplayString($setup.calcDetails.zone2.sum) + " " + vue.toDisplayString($setup.t("取")) + " " + vue.toDisplayString($setup.latestDraw.openCode2), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "d-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("尾")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "formula" }, vue.toDisplayString($setup.calcDetails.zone3.str) + " = " + vue.toDisplayString($setup.calcDetails.zone3.sum) + " " + vue.toDisplayString($setup.t("取")) + " " + vue.toDisplayString($setup.latestDraw.openCode3), 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), $setup.countdownInfo ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "next-draw-card" }, [ vue.createElementVNode("view", { class: "n-header" }, [ vue.createElementVNode("text", { class: "n-title" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("最新")) + ": ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "n-issue" }, vue.toDisplayString($setup.countdownInfo.issue_no), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "n-timer" }, [ vue.createElementVNode( "text", { class: "t-label" }, vue.toDisplayString($setup.t("下一期")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "t-box" }, vue.toDisplayString($setup.formatTime($setup.timeLeft).m), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "t-unit" }, vue.toDisplayString($setup.t("分")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "t-box" }, vue.toDisplayString($setup.formatTime($setup.timeLeft).s), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "t-unit" }, vue.toDisplayString($setup.t("秒")), 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true) ]), $setup.isFengpan ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 0, type: "error", text: $setup.t("封盘中"), style: { "width": "calc(100% - 20px)", "text-align": "center", "margin-left": "10px" } }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), vue.createVNode($setup["BettingItems"], { pc28: 0, m: $setup.formatTime($setup.timeLeft).m, s: $setup.formatTime($setup.timeLeft).s, PageContainerRef: $setup.PageContainerRef, issue_no: (_a2 = $setup.countdownInfo) == null ? void 0 : _a2.issue_no, apiIsFengpan: $setup.isFengpan, selectedItems: $setup.selectedItems, onToggle: $setup.handleToggleItem }, null, 8, ["m", "s", "PageContainerRef", "issue_no", "apiIsFengpan", "selectedItems"]), vue.createElementVNode("view", { style: { "height": "100px" } }) ]; }), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), vue.createVNode(_component_u_popup, { modelValue: $setup.showDetailPopup, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.showDetailPopup = $event), mode: "center", "border-radius": "20", "mask-close-able": true }, { default: vue.withCtx(() => { var _a2, _b2; return [ vue.createElementVNode("view", { class: "popup-wrapper" }, [ vue.createElementVNode( "view", { class: "p-title" }, vue.toDisplayString(((_a2 = $setup.latestDraw) == null ? void 0 : _a2.issue_no) || ((_b2 = $setup.latestDraw) == null ? void 0 : _b2.section)) + " " + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ), $setup.latestDraw ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "p-equation" }, [ vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode1), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "+"), vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode2), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "+"), vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode3), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "="), vue.createElementVNode( "view", { class: "circle result" }, vue.toDisplayString($setup.latestSum), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "p-grid" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(80, (i) => { return vue.createElementVNode( "view", { class: vue.normalizeClass(["p-cell", $setup.getGridCellClass(i)]), key: i }, vue.toDisplayString(i), 3 /* TEXT, CLASS */ ); }), 64 /* STABLE_FRAGMENT */ )) ]) ]) ]; }), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createElementVNode("view", { style: { "height": "70px" } }), !$setup.isOpen ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "sticky-header-bar", onClick: _cache[3] || (_cache[3] = ($event) => $setup.isOpen = true) }, [ vue.createElementVNode("view", { class: "betting-sheet-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.selectedCount), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("投注单")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-up", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right" }, [ vue.createElementVNode("view", { class: "settings-btn" }, [ vue.createVNode(_component_u_button, { onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $setup.isOpen = true, ["stop"])), size: "mini", type: "primary", disabled: $setup.isFengpan }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("下注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["disabled"]) ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_popup, { modelValue: $setup.isOpen, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.isOpen = $event), mode: "bottom", "border-radius": "24", mask: true, "mask-close-able": true, "z-index": 990, "safe-area-inset-bottom": true, height: "70%" }, { default: vue.withCtx(() => { var _a2; return [ vue.createElementVNode("view", { class: "popup-betting-sheet-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header border-bottom", onClick: _cache[5] || (_cache[5] = ($event) => $setup.isOpen = false) }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.selectedCount), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("投注单")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-down", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right" }, [ vue.createElementVNode("view", { class: "settings-btn" }, [ vue.createElementVNode( "text", { style: { "font-size": "12px", "margin-right": "4px" }, class: "tmc", onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => $setup.selectedItems = [], ["stop"])) }, vue.toDisplayString($setup.t("清空")), 1 /* TEXT */ ) ]) ]) ]), $setup.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "batch-stake-box" }, [ vue.createElementVNode( "text", { class: "batch-label" }, vue.toDisplayString($setup.t("批量设置金额")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "batch-input-wrapper" }, [ vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.batchStakeValue = $event), class: "batch-input", placeholder: $setup.t("请输入金额"), type: "number" }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.batchStakeValue] ]) ]), vue.createVNode(_component_u_button, { size: "mini", type: "primary", style: { "margin-left": "10px" }, onClick: $setup.applyBatchStake }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("确定")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : vue.createCommentVNode("v-if", true) ]), $setup.selectedCount === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "empty-sheet" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("暂无投注项")), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "bet-list" }, [ vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center", "margin-bottom": "10px", "justify-content": "space-between" } }, [ vue.createElementVNode("text", { class: "n-title" }, [ vue.createElementVNode( "text", { class: "n-issue" }, vue.toDisplayString((_a2 = $setup.countdownInfo) == null ? void 0 : _a2.issue_no), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "n-timer" }, [ vue.createElementVNode( "view", { class: "t-box" }, vue.toDisplayString($setup.formatTime($setup.timeLeft).m), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "t-unit" }, vue.toDisplayString($setup.t("分")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "t-box" }, vue.toDisplayString($setup.formatTime($setup.timeLeft).s), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "t-unit" }, vue.toDisplayString($setup.t("秒")), 1 /* TEXT */ ) ]) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.selectedItems, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "bet-item", key: item.id }, [ vue.createElementVNode("view", { class: "item-header" }, [ vue.createElementVNode( "text", { class: "team-names" }, vue.toDisplayString(item.groups) + " - " + vue.toDisplayString(item.keywords), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "close-btn", onClick: vue.withModifiers(($event) => $setup.removeItem(item.id), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#666", size: "16" }) ], 8, ["onClick"]) ]), vue.createElementVNode("view", { class: "item-info" }, [ vue.createElementVNode("view", { class: "bet-type" }, [ vue.createElementVNode( "text", { class: "type-name" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "odds-box" }, [ vue.createElementVNode( "text", { class: "odds-val" }, vue.toDisplayString($setup.isFengpan ? "--" : Number(item.odds).toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "limit-info" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("限额")) + ": " + vue.toDisplayString(item.mininum) + " ~ " + vue.toDisplayString(item.maxinum), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["stake-input-box", { "error-border": item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 || Number(item.amount) > Number($setup.userMoney) || item.mininum !== void 0 && item.amount !== "" && item.amount !== void 0 && Number(item.amount) < Number(item.mininum) || item.maxinum !== void 0 && Number(item.amount) > Number(item.maxinum) }]) }, [ vue.createElementVNode("view", { class: "stepper-btn", onClick: ($event) => $setup.changeAmount(item, -10) }, "-", 8, ["onClick"]), vue.withDirectives(vue.createElementVNode("input", { type: "number", class: "stake-input", "onUpdate:modelValue": ($event) => item.amount = $event, onBlur: ($event) => $setup.validateAmount(item), placeholder: "输入本金" }, null, 40, ["onUpdate:modelValue", "onBlur"]), [ [vue.vModelText, item.amount] ]), vue.createElementVNode("view", { class: "stepper-btn", onClick: ($event) => $setup.changeAmount(item, 10) }, "+", 8, ["onClick"]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "item-footer" }, [ item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "err-msg" }, vue.toDisplayString($setup.t("金额不能小于等于0")), 1 /* TEXT */ )) : item.mininum !== void 0 && item.amount !== "" && item.amount !== void 0 && Number(item.amount) < Number(item.mininum) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "err-msg" }, vue.toDisplayString($setup.t("单注最低限制为")) + " " + vue.toDisplayString(item.mininum), 1 /* TEXT */ )) : item.maxinum !== void 0 && Number(item.amount) > Number(item.maxinum) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "err-msg" }, vue.toDisplayString($setup.t("单注最高限制为")) + " " + vue.toDisplayString(item.maxinum), 1 /* TEXT */ )) : Number(item.amount) > Number($setup.userMoney) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "err-msg" }, vue.toDisplayString($setup.t("投注额超过您的余额")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "potential-win" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("潜在赢利")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "win-amount" }, vue.toDisplayString((Number(item.amount) * Number(item.odds)).toFixed(2)) + " " + vue.toDisplayString(_ctx.$currency || "USDT"), 1 /* TEXT */ ) ])) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])), $setup.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "sheet-action-bar pc28-cart-bottom" }, [ vue.createElementVNode("view", { class: "total-odds-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("总投注金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString($setup.totalStake.toFixed(2)), 1 /* TEXT */ ) ]), $setup.totalStake > $setup.userMoney ? (vue.openBlock(), vue.createBlock(_component_u_button, { key: 0, type: "primary", onClick: $setup.goTopUp }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("余额不足,去存款")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ })) : (vue.openBlock(), vue.createBlock(_component_u_button, { key: 1, type: "primary", onClick: $setup.submitBet, disabled: $setup.isFengpan }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("立即投注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["disabled"])) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { style: { "height": "90px" } }) ]; }), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_u_modal, { ref: "safeModalRef", modelValue: $setup.showSafeModal, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.showSafeModal = $event), "async-close": true, title: $setup.t("安全验证"), "show-cancel-button": true, "confirm-text": $setup.t("确定投注"), "cancel-text": $setup.t("取消"), "confirm-color": "#f8b932", onConfirm: $setup.confirmSubmitBet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "safe-modal-content" }, [ vue.createElementVNode( "text", { class: "safe-tips" }, vue.toDisplayString($setup.t("为保障您的资金安全,请输入资金密码")), 1 /* TEXT */ ), vue.createVNode(_component_u_input, { modelValue: $setup.safeWord, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.safeWord = $event), type: "password", placeholder: $setup.t("请输入资金密码"), border: true, "border-color": "#e4e7ed", clearable: true }, null, 8, ["modelValue", "placeholder"]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "title", "confirm-text", "cancel-text"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]), _: 1 /* STABLE */ }); } const PagesTabbarEntertainmentViewPC28Index = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-a6a987df"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/view/PC28/index.vue"]]); const CACHE_KEY = "1_GAME_RULE_CART_CACHE"; const _sfc_main$a = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const router2 = useRouter(); const PageContainerRef = vue.ref(); const pagingRef = vue.ref(null); const latestDraw = vue.ref(null); const countdownInfo = vue.ref(null); const isFengpan = vue.ref(false); const showDetailPopup = vue.ref(false); const timeLeft = vue.ref(0); let timer = null; const selectedItems = vue.ref(uni.getStorageSync(CACHE_KEY) || []); const isOpen = vue.ref(false); const userMoney = vue.ref(0); const safeModalRef = vue.ref(null); const showSafeModal = vue.ref(false); const safeWord = vue.ref(""); const batchStakeValue = vue.ref(uni.getStorageSync("jisu28BatchStakeCache") || ""); vue.watch(selectedItems, (newVal) => { uni.setStorageSync(CACHE_KEY, newVal); }, { deep: true }); const selectedCount = vue.computed(() => selectedItems.value.length); const totalStake = vue.computed(() => { return selectedItems.value.reduce((sum, item) => sum + (Number(item.amount) || 0), 0); }); const handleToggleItem = (rule) => { if (Number(rule.odds) <= 0 || isFengpan.value) return; const index = selectedItems.value.findIndex((item) => item.id === rule.id); if (index > -1) { selectedItems.value.splice(index, 1); if (selectedItems.value.length === 0) isOpen.value = false; } else { const defaultAmount = Number(rule.mininum) > 0 ? Number(rule.mininum) : 20; selectedItems.value.push({ ...rule, amount: defaultAmount }); } }; const removeItem = (id) => { selectedItems.value = selectedItems.value.filter((item) => item.id !== id); if (selectedItems.value.length === 0) isOpen.value = false; }; const changeAmount = (item, delta) => { let val = Number(item.amount) || 0; Number(item.mininum) || 0; const max = Number(item.maxinum) || 9999999; val += delta; if (val < 0) val = 0; if (val > max) { val = max; uni.showToast({ title: `${t2("已达最高投注")} ${max}`, icon: "none" }); } item.amount = val; }; const validateAmount = (item) => { }; const applyBatchStake = () => { let val = batchStakeValue.value; uni.setStorageSync("jisu28BatchStakeCache", val); if (val === "") { selectedItems.value.forEach((item) => { item.amount = ""; }); return; } let numVal = Number(val); if (isNaN(numVal) || numVal <= 0) { return uni.showToast({ title: t2("请输入大于0的有效金额"), icon: "none" }); } selectedItems.value.forEach((item) => { let itemVal = numVal; const min = Number(item.mininum) || 0; const max = Number(item.maxinum) || 9999999; if (itemVal < min) { itemVal = min; } if (itemVal > max) { itemVal = max; } item.amount = itemVal; }); }; const fetchBalance = async () => { try { const res = await getBalance(); if (res.code === 1) { userMoney.value = Number(res.data.money); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/ExtremeSpeed28/index.vue:394", "获取余额失败", error); } }; const submitBet = () => { if (isFengpan.value) return; if (selectedItems.value.length === 0) return uni.$u.toast(t2("请选择投注单")); for (let i = 0; i < selectedItems.value.length; i++) { const item = selectedItems.value[i]; const stake = Number(item.amount); if (!stake || stake <= 0) { return uni.showToast({ title: t2("请输入大于0的有效投注金额"), icon: "none" }); } const min = Number(item.mininum) || 0; const max = Number(item.maxinum) || 9999999; if (stake < min) { return uni.showToast({ title: `${t2("最低投注限额为")} ${min}`, icon: "none" }); } if (stake > max) { return uni.showToast({ title: `${t2("最高投注限额为")} ${max}`, icon: "none" }); } } if (totalStake.value > userMoney.value) return uni.showToast({ title: t2("余额不足"), icon: "none" }); safeWord.value = ""; confirmSubmitBet(); }; const confirmSubmitBet = () => { uni.showModal({ title: t2("提示"), content: t2("确认提交吗?"), success: (res) => { if (res.confirm) { const ordersData = selectedItems.value.map((item) => ({ id: item.id, amount: item.amount })); submitGameBet({ data: ordersData, safe_word: safeWord.value, pc28: 1 }).then((res2) => { var _a2, _b2; if (res2.code === 1) { uni.showToast({ title: t2("投注成功"), icon: "success" }); selectedItems.value = []; isOpen.value = false; showSafeModal.value = false; fetchBalance(); if ((_a2 = PageContainerRef.value) == null ? void 0 : _a2.getData) { PageContainerRef.value.getData(); } } else { uni.showToast({ title: res2.msg || t2("投注失败"), icon: "none" }); (_b2 = safeModalRef.value) == null ? void 0 : _b2.clearLoading(); } }).catch((err) => { var _a2; formatAppLog("error", "at pages/Tabbar/Entertainment/view/ExtremeSpeed28/index.vue:451", "投注错误:", err); (_a2 = safeModalRef.value) == null ? void 0 : _a2.clearLoading(); }); } } }); }; const goTopUp = () => { if (!uni.getStorageSync("token")) { uni.showToast({ title: t2("请先登录"), icon: "none" }); return; } router2.push({ name: "topUp" }); }; const getApiBasePath = () => { return "newPc"; }; const getLatestYuanTou = () => { return new Promise((resolve2, reject) => { uni.request({ url: `${apiUrl}${getApiBasePath()}/yuanTou`, method: "GET", success: (res) => resolve2(res.data), fail: (err) => reject(err), header: { lang: locale.value } }); }); }; const getCountdown = () => { return new Promise((resolve2, reject) => { uni.request({ url: `${apiUrl}${getApiBasePath()}/countdown`, method: "GET", success: (res) => resolve2(res.data), fail: (err) => reject(err), header: { lang: locale.value } }); }); }; const onQuery = async () => { try { await fetchTopData(); pagingRef.value.complete([]); } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/ExtremeSpeed28/index.vue:515", error); pagingRef.value.complete(false); } }; const goToHistory = () => { router2.push({ name: "history", query: { type: "newPc" } }); }; const goToPC28History = () => { router2.push({ name: "AllHistory", query: { tab: 1 } }); }; const fetchTopData = async () => { try { const [yuanTouRes, countRes] = await Promise.all([ getLatestYuanTou(), getCountdown() ]); if (yuanTouRes.code === 0 && yuanTouRes.data.length > 0) { latestDraw.value = yuanTouRes.data[0]; } if (countRes.code === 0 && countRes.data) { countdownInfo.value = countRes.data; startCountdown(countRes.data.end_time, countRes.data.current_time); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/ExtremeSpeed28/index.vue:551", "获取顶部数据失败", error); } }; const startCountdown = (endTime, currentTime) => { clearInterval(timer); const diff = endTime - currentTime; timeLeft.value = Math.max(0, diff); if (diff > 0) { timer = setInterval(() => { if (timeLeft.value > 0) { timeLeft.value--; } else { clearInterval(timer); } }, 1e3); } }; const formatTime = (seconds) => { const m = Math.floor(seconds / 60).toString().padStart(2, "0"); const s = (seconds % 60).toString().padStart(2, "0"); return { m, s }; }; const latestSum = vue.computed(() => { if (!latestDraw.value) return 0; return Number(latestDraw.value.openCode1 || 0) + Number(latestDraw.value.openCode2 || 0) + Number(latestDraw.value.openCode3 || 0); }); const calcDetails = vue.computed(() => { if (!latestDraw.value || !latestDraw.value.keno) return null; const keno = latestDraw.value.keno.map(Number); const getZone = (startIndex) => { let nums = []; let sum = 0; for (let i = 0; i < 6; i++) { const val = keno[startIndex + i * 3]; nums.push(val); sum += val; } return { str: nums.join(" + "), sum }; }; return { zone1: getZone(1), zone2: getZone(2), zone3: getZone(3) }; }); const getBallColor = (numStr) => { const num = parseInt(numStr, 10); return num % 2 === 0 ? "red-ball" : "blue-ball"; }; const getGridCellClass = (num) => { if (!latestDraw.value || !latestDraw.value.keno) return ""; const isSelected = latestDraw.value.keno.some((k) => Number(k) === num); if (isSelected) { return num % 2 === 0 ? "bg-red" : "bg-blue"; } return ""; }; const goRule = () => { router2.push({ name: "PC28Rule" }); }; vue.onMounted(() => { uni.$on("onSocketMessage", (data) => { var _a2; if (!data) return; try { const res = JSON.parse(data); if (res.type === "new_jisu_issue") { const currentIssue = (_a2 = countdownInfo.value) == null ? void 0 : _a2.issue_no; if (currentIssue !== res.message) { fetchTopData(); getGameLotteryStatus(); } } if (res && res.type === "jisu_fengpan") { isFengpan.value = true; } else if (res && res.type === "jisu_kaipan") { isFengpan.value = false; } } catch (e) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/ExtremeSpeed28/index.vue:652", "WebSocket消息解析失败:", e); } }); }); function getGameLotteryStatus() { gameLotteryStatus({ type: 2 }).then((res) => { if (res.data.is_kaipan == 0) { isFengpan.value = true; } else if (res.data.is_kaipan == 1) { isFengpan.value = false; } }); } getGameLotteryStatus(); onQuery(); vue.onUnmounted(() => { clearInterval(timer); uni.$off("onSocketMessage"); }); onLoad(() => { }); onShow(() => { vue.nextTick(() => { uni.customFromPath = ""; }); batchStakeValue.value = uni.getStorageSync("jisu28BatchStakeCache") || ""; if (uni.getStorageSync("token")) { fetchBalance(); } }); const __returned__ = { t: t2, locale, router: router2, PageContainerRef, pagingRef, latestDraw, countdownInfo, isFengpan, showDetailPopup, timeLeft, get timer() { return timer; }, set timer(v) { timer = v; }, CACHE_KEY, selectedItems, isOpen, userMoney, safeModalRef, showSafeModal, safeWord, batchStakeValue, selectedCount, totalStake, handleToggleItem, removeItem, changeAmount, validateAmount, applyBatchStake, fetchBalance, submitBet, confirmSubmitBet, goTopUp, getApiBasePath, getLatestYuanTou, getCountdown, onQuery, goToHistory, goToPC28History, fetchTopData, startCountdown, formatTime, latestSum, calcDetails, getBallColor, getGridCellClass, goRule, getGameLotteryStatus, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, nextTick: vue.nextTick, watch: vue.watch, get useI18n() { return useI18n; }, BettingItems, get onLoad() { return onLoad; }, get onShow() { return onShow; }, get apiUrl() { return apiUrl; }, get gameLotteryStatus() { return gameLotteryStatus; }, get getBalance() { return getBalance; }, get submitGameBet() { return submitGameBet; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_tag = __unplugin_components_2$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_popup = __unplugin_components_2$3; const _component_u_button = __unplugin_components_2$1; const _component_u_input = __unplugin_components_3$2; const _component_u_modal = __unplugin_components_4$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode( _component_PageContainer, { ref: "PageContainerRef", navTitle: "极速28" }, { default: vue.withCtx(() => [ vue.createVNode( _component_z_paging, { ref: "pagingRef", onQuery: $setup.onQuery, fixed: false, "refresher-only": true, "refresher-enabled": true, "loading-more-enabled": false, "auto-show-back-to-top": true }, { refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("获取最新数据...")), 1 /* TEXT */ ) ]) ]), default: vue.withCtx(() => { var _a2; return [ vue.createElementVNode("view", { class: "top-section" }, [ $setup.latestDraw ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "latest-draw-card" }, [ vue.createElementVNode("view", { class: "header" }, [ vue.createElementVNode("view", { class: "title-left" }, [ vue.createElementVNode( "text", { class: "bclc" }, vue.toDisplayString($setup.t("极速")) + "28", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "issue" }, vue.toDisplayString($setup.latestDraw.issue_no || $setup.latestDraw.section) + " " + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_icon, { name: "globe", size: "40", color: "#666" }) ]), vue.createElementVNode("view", { class: "balls-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.latestDraw.keno, (num, idx) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["ball", $setup.getBallColor(num)]), key: idx }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(num), 1 /* TEXT */ ) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "calc-tabs" }, [ vue.createElementVNode( "view", { class: "c-tab active", onClick: _cache[0] || (_cache[0] = ($event) => $setup.showDetailPopup = true) }, vue.toDisplayString($setup.t("开奖详情")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "c-tab active", onClick: $setup.goToHistory }, vue.toDisplayString($setup.t("往期历史")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "c-tab active", onClick: $setup.goToPC28History }, vue.toDisplayString($setup.t("投注记录")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "c-tab active", onClick: $setup.goRule }, vue.toDisplayString($setup.t("开奖规则")), 1 /* TEXT */ ) ]), $setup.latestDraw && $setup.calcDetails ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "calc-card" }, [ vue.createElementVNode("view", { class: "equation" }, [ vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode1), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "+"), vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode2), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "+"), vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode3), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "="), vue.createElementVNode( "view", { class: "circle result" }, vue.toDisplayString($setup.latestSum), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "details-list" }, [ vue.createElementVNode("view", { class: "d-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("前")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "formula" }, vue.toDisplayString($setup.calcDetails.zone1.str) + " = " + vue.toDisplayString($setup.calcDetails.zone1.sum) + " " + vue.toDisplayString($setup.t("取")) + " " + vue.toDisplayString($setup.latestDraw.openCode1), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "d-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("中")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "formula" }, vue.toDisplayString($setup.calcDetails.zone2.str) + " = " + vue.toDisplayString($setup.calcDetails.zone2.sum) + " " + vue.toDisplayString($setup.t("取")) + " " + vue.toDisplayString($setup.latestDraw.openCode2), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "d-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("尾")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "formula" }, vue.toDisplayString($setup.calcDetails.zone3.str) + " = " + vue.toDisplayString($setup.calcDetails.zone3.sum) + " " + vue.toDisplayString($setup.t("取")) + " " + vue.toDisplayString($setup.latestDraw.openCode3), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), $setup.countdownInfo ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "next-draw-card" }, [ vue.createElementVNode("view", { class: "n-header" }, [ vue.createElementVNode("text", { class: "n-title" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("最新")) + ": ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "n-issue" }, vue.toDisplayString($setup.countdownInfo.issue_no), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "n-timer" }, [ vue.createElementVNode( "text", { class: "t-label" }, vue.toDisplayString($setup.t("下一期")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "t-box" }, vue.toDisplayString($setup.formatTime($setup.timeLeft).m), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "t-unit" }, vue.toDisplayString($setup.t("分")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "t-box" }, vue.toDisplayString($setup.formatTime($setup.timeLeft).s), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "t-unit" }, vue.toDisplayString($setup.t("秒")), 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true) ]), $setup.isFengpan ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 0, type: "error", text: $setup.t("封盘中"), style: { "width": "calc(100% - 20px)", "text-align": "center", "margin-left": "10px" } }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), vue.createVNode($setup["BettingItems"], { pc28: 1, m: $setup.formatTime($setup.timeLeft).m, s: $setup.formatTime($setup.timeLeft).s, PageContainerRef: $setup.PageContainerRef, issue_no: (_a2 = $setup.countdownInfo) == null ? void 0 : _a2.issue_no, apiIsFengpan: $setup.isFengpan, selectedItems: $setup.selectedItems, onToggle: $setup.handleToggleItem }, null, 8, ["m", "s", "PageContainerRef", "issue_no", "apiIsFengpan", "selectedItems"]), vue.createElementVNode("view", { style: { "height": "100px" } }) ]; }), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), vue.createVNode(_component_u_popup, { modelValue: $setup.showDetailPopup, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.showDetailPopup = $event), mode: "center", "border-radius": "20", "mask-close-able": true }, { default: vue.withCtx(() => { var _a2, _b2; return [ vue.createElementVNode("view", { class: "popup-wrapper" }, [ vue.createElementVNode( "view", { class: "p-title" }, vue.toDisplayString(((_a2 = $setup.latestDraw) == null ? void 0 : _a2.issue_no) || ((_b2 = $setup.latestDraw) == null ? void 0 : _b2.section)) + " " + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ), $setup.latestDraw ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "p-equation" }, [ vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode1), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "+"), vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode2), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "+"), vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.latestDraw.openCode3), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "="), vue.createElementVNode( "view", { class: "circle result" }, vue.toDisplayString($setup.latestSum), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "p-grid" }, [ (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList(80, (i) => { return vue.createElementVNode( "view", { class: vue.normalizeClass(["p-cell", $setup.getGridCellClass(i)]), key: i }, vue.toDisplayString(i), 3 /* TEXT, CLASS */ ); }), 64 /* STABLE_FRAGMENT */ )) ]) ]) ]; }), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createElementVNode("view", { style: { "height": "70px" } }), !$setup.isOpen ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "sticky-header-bar", onClick: _cache[3] || (_cache[3] = ($event) => $setup.isOpen = true) }, [ vue.createElementVNode("view", { class: "betting-sheet-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.selectedCount), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("投注单")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-up", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right" }, [ vue.createElementVNode("view", { class: "settings-btn" }, [ vue.createVNode(_component_u_button, { onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $setup.isOpen = true, ["stop"])), size: "mini", type: "primary", disabled: $setup.isFengpan }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("下注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["disabled"]) ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_popup, { modelValue: $setup.isOpen, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.isOpen = $event), mode: "bottom", "border-radius": "24", mask: true, "mask-close-able": true, "z-index": 990, "safe-area-inset-bottom": true, height: "70%" }, { default: vue.withCtx(() => { var _a2; return [ vue.createElementVNode("view", { class: "popup-betting-sheet-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header border-bottom", onClick: _cache[5] || (_cache[5] = ($event) => $setup.isOpen = false) }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.selectedCount), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("投注单")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-down", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right" }, [ vue.createElementVNode("view", { class: "settings-btn" }, [ vue.createElementVNode( "text", { style: { "font-size": "12px", "margin-right": "4px" }, class: "tmc", onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => $setup.selectedItems = [], ["stop"])) }, vue.toDisplayString($setup.t("清空")), 1 /* TEXT */ ) ]) ]) ]), $setup.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "batch-stake-box" }, [ vue.createElementVNode( "text", { class: "batch-label" }, vue.toDisplayString($setup.t("批量设置金额")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "batch-input-wrapper" }, [ vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.batchStakeValue = $event), class: "batch-input", placeholder: $setup.t("请输入金额"), type: "number" }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.batchStakeValue] ]) ]), vue.createVNode(_component_u_button, { size: "mini", type: "primary", style: { "margin-left": "10px" }, onClick: $setup.applyBatchStake }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("确定")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : vue.createCommentVNode("v-if", true) ]), $setup.selectedCount === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "empty-sheet" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("暂无投注项")), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "bet-list" }, [ vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center", "margin-bottom": "10px", "justify-content": "space-between" } }, [ vue.createElementVNode("text", { class: "n-title" }, [ vue.createElementVNode( "text", { class: "n-issue" }, vue.toDisplayString((_a2 = $setup.countdownInfo) == null ? void 0 : _a2.issue_no), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "n-timer" }, [ vue.createElementVNode( "view", { class: "t-box" }, vue.toDisplayString($setup.formatTime($setup.timeLeft).m), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "t-unit" }, vue.toDisplayString($setup.t("分")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "t-box" }, vue.toDisplayString($setup.formatTime($setup.timeLeft).s), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "t-unit" }, vue.toDisplayString($setup.t("秒")), 1 /* TEXT */ ) ]) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.selectedItems, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "bet-item", key: item.id }, [ vue.createElementVNode("view", { class: "item-header" }, [ vue.createElementVNode( "text", { class: "team-names" }, vue.toDisplayString(item.groups) + " - " + vue.toDisplayString(item.keywords), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "close-btn", onClick: vue.withModifiers(($event) => $setup.removeItem(item.id), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#666", size: "16" }) ], 8, ["onClick"]) ]), vue.createElementVNode("view", { class: "item-info" }, [ vue.createElementVNode("view", { class: "bet-type" }, [ vue.createElementVNode( "text", { class: "type-name" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "odds-box" }, [ vue.createElementVNode( "text", { class: "odds-val" }, vue.toDisplayString($setup.isFengpan ? "--" : Number(item.odds).toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "limit-info" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("限额")) + ": " + vue.toDisplayString(item.mininum) + " ~ " + vue.toDisplayString(item.maxinum), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["stake-input-box", { "error-border": item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 || Number(item.amount) > Number($setup.userMoney) || item.mininum !== void 0 && item.amount !== "" && item.amount !== void 0 && Number(item.amount) < Number(item.mininum) || item.maxinum !== void 0 && Number(item.amount) > Number(item.maxinum) }]) }, [ vue.createElementVNode("view", { class: "stepper-btn", onClick: ($event) => $setup.changeAmount(item, -10) }, "-", 8, ["onClick"]), vue.withDirectives(vue.createElementVNode("input", { type: "number", class: "stake-input", "onUpdate:modelValue": ($event) => item.amount = $event, onBlur: ($event) => $setup.validateAmount(item), placeholder: "输入本金" }, null, 40, ["onUpdate:modelValue", "onBlur"]), [ [vue.vModelText, item.amount] ]), vue.createElementVNode("view", { class: "stepper-btn", onClick: ($event) => $setup.changeAmount(item, 10) }, "+", 8, ["onClick"]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "item-footer" }, [ item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "err-msg" }, vue.toDisplayString($setup.t("金额不能小于等于0")), 1 /* TEXT */ )) : item.mininum !== void 0 && item.amount !== "" && item.amount !== void 0 && Number(item.amount) < Number(item.mininum) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "err-msg" }, vue.toDisplayString($setup.t("单注最低限制为")) + " " + vue.toDisplayString(item.mininum), 1 /* TEXT */ )) : item.maxinum !== void 0 && Number(item.amount) > Number(item.maxinum) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "err-msg" }, vue.toDisplayString($setup.t("单注最高限制为")) + " " + vue.toDisplayString(item.maxinum), 1 /* TEXT */ )) : Number(item.amount) > Number($setup.userMoney) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "err-msg" }, vue.toDisplayString($setup.t("投注额超过您的余额")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "potential-win" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("潜在赢利")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "win-amount" }, vue.toDisplayString((Number(item.amount) * Number(item.odds)).toFixed(2)) + " " + vue.toDisplayString(_ctx.$currency || "USDT"), 1 /* TEXT */ ) ])) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])), $setup.selectedCount > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "sheet-action-bar pc28-cart-bottom" }, [ vue.createElementVNode("view", { class: "total-odds-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("总投注金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString($setup.totalStake.toFixed(2)), 1 /* TEXT */ ) ]), $setup.totalStake > $setup.userMoney ? (vue.openBlock(), vue.createBlock(_component_u_button, { key: 0, type: "primary", onClick: $setup.goTopUp }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("余额不足,去存款")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ })) : (vue.openBlock(), vue.createBlock(_component_u_button, { key: 1, type: "primary", onClick: $setup.submitBet, disabled: $setup.isFengpan }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("立即投注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["disabled"])) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { style: { "height": "90px" } }) ]; }), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_u_modal, { ref: "safeModalRef", modelValue: $setup.showSafeModal, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.showSafeModal = $event), "async-close": true, title: $setup.t("安全验证"), "show-cancel-button": true, "confirm-text": $setup.t("确定投注"), "cancel-text": $setup.t("取消"), "confirm-color": "#f8b932", onConfirm: $setup.confirmSubmitBet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "safe-modal-content" }, [ vue.createElementVNode( "text", { class: "safe-tips" }, vue.toDisplayString($setup.t("为保障您的资金安全,请输入资金密码")), 1 /* TEXT */ ), vue.createVNode(_component_u_input, { modelValue: $setup.safeWord, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.safeWord = $event), type: "password", placeholder: $setup.t("请输入资金密码"), border: true, "border-color": "#e4e7ed", clearable: true }, null, 8, ["modelValue", "placeholder"]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "title", "confirm-text", "cancel-text"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]), _: 1 /* STABLE */ }); } const PagesTabbarEntertainmentViewExtremeSpeed28Index = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-a95a1c58"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/view/ExtremeSpeed28/index.vue"]]); const _sfc_main$9 = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const router2 = useRouter(); const { t: t2 } = useI18n(); const PageContainerRef = vue.ref(); const pagingRef1 = vue.ref(null); const safeModalRef = vue.ref(null); const cartPopupVisible = vue.ref(false); const showSafeModal = vue.ref(false); const historyPopupVisible = vue.ref(false); const safeWord = vue.ref(""); const batchStakeValue = vue.ref(uni.getStorageSync("self_lhcBatchStakeCache") || ""); const userMoney = vue.ref(0); const WebsocketData = useWebsocketDataStore(); const isFengpan = vue.ref(false); const numberToZodiacMap = vue.ref({}); const zodiacToNumberMap = vue.ref({}); const currentIssue = vue.ref(""); const gameList = vue.ref([]); const historyLotteryList = vue.ref([]); const numberList = vue.ref([]); const lhcGame = vue.ref({}); const activeGameIndex = vue.ref(0); const activePlayIndex = vue.ref(0); const selectedBets = vue.ref(uni.getStorageSync("self_lhc_selected_bets") || []); vue.watch(selectedBets, (newVal) => { uni.setStorageSync("self_lhc_selected_bets", newVal); }, { deep: true }); const timeData = vue.ref({ days: 0, hours: "00", minutes: "00", seconds: "00" }); let countdownTimer = null; let remainingSeconds = 0; const currentGame = vue.computed(() => gameList.value[activeGameIndex.value] || {}); const currentPlayName = vue.computed(() => { var _a2, _b2; return ((_b2 = (_a2 = currentGame.value.gameplay) == null ? void 0 : _a2[activePlayIndex.value]) == null ? void 0 : _b2.name) || ""; }); const currentPlayId = vue.computed(() => { var _a2, _b2; return ((_b2 = (_a2 = currentGame.value.gameplay) == null ? void 0 : _a2[activePlayIndex.value]) == null ? void 0 : _b2.id) || ""; }); const lastDraw = vue.computed(() => historyLotteryList.value[0] || null); const isBallStyle = vue.computed(() => { const ballGames = [t2("特码"), t2("正码"), t2("正码特"), t2("正码1-6")]; return ballGames.includes(currentGame.value.name); }); const totalBets = vue.computed(() => selectedBets.value.length); const totalAmount = vue.computed(() => { return selectedBets.value.reduce((sum, item) => sum + (Number(item.amount) || 0), 0); }); const onQuery = async () => { var _a2; await initHowPlayData(); await fetchBalance(); (_a2 = pagingRef1.value) == null ? void 0 : _a2.complete([]); }; const fetchBalance = async () => { if (uni.getStorageSync("token")) { try { const res = await getBalance(); if (res.code === 1) { userMoney.value = Number(res.data.money); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/Digital/index.vue:377", "获取余额失败", error); } } }; const initHowPlayData = async () => { var _a2; try { const [infoRes, playRes] = await Promise.all([ getLHCInfo(), getHowPlay({ type: 3 }) ]); if (infoRes.code === 1 && infoRes.data) { numberToZodiacMap.value = infoRes.data.number_to_zodiac || {}; zodiacToNumberMap.value = infoRes.data.zodiac_to_number || {}; } if (playRes.code === 1 && playRes.data) { lhcGame.value = playRes.data; currentIssue.value = playRes.data.issue; gameList.value = playRes.data.games || []; if (playRes.data.history_lottery) { historyLotteryList.value = playRes.data.history_lottery.map((item) => ({ ...item, lottery_codes: item.lottery_codes.map((codeStr) => ({ code: codeStr, color: calculateBallColor(codeStr), zodiac: numberToZodiacMap.value[codeStr] || "" })) })); } if (((_a2 = playRes.data) == null ? void 0 : _a2.countdown) != 0) { startCountdown(Number(playRes.data.countdown || 0)); } await fetchPlayInfo(); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/Digital/index.vue:419", "获取数据失败", error); } }; vue.onMounted(() => { initHowPlayData(); fetchBalance(); }); onShow(() => { batchStakeValue.value = uni.getStorageSync("self_lhcBatchStakeCache") || ""; fetchBalance(); }); vue.onUnmounted(() => { clearInterval(countdownTimer); }); const handleGameClick = (index) => { if (activeGameIndex.value === index) return; activeGameIndex.value = index; activePlayIndex.value = 0; fetchPlayInfo(); }; const handlePlayClick = (index) => { if (activePlayIndex.value === index) return; activePlayIndex.value = index; fetchPlayInfo(); }; const fetchPlayInfo = async () => { if (!currentPlayId.value) return; numberList.value = []; try { const res = await getPlayInfo({ id: currentPlayId.value }); if (res.code === 1 && res.data) { numberList.value = res.data.map((item) => { let color2 = ""; if (isBallStyle.value || !isNaN(item.number)) { color2 = calculateBallColor(item.number); } else { if (item.number.includes(t2("红"))) color2 = t2("红"); else if (item.number.includes(t2("蓝"))) color2 = t2("蓝"); else if (item.number.includes(t2("绿"))) color2 = t2("绿"); } let tinyNums = []; if (zodiacToNumberMap.value[item.number]) { tinyNums = zodiacToNumberMap.value[item.number].map((nStr) => ({ number: nStr, color: calculateBallColor(nStr) })); } const isSelected = selectedBets.value.some((b) => b.id === item.id); return { id: item.id, number: item.number, odds: item.odds, color: color2, flag: isSelected, numbers: tinyNums, mininum: item.mininum, maxinum: item.maxinum }; }); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/Digital/index.vue:494", "获取玩法失败", error); } finally { uni.hideLoading(); } }; const toggleSelect = (index) => { if (isFengpan.value) return; const item = numberList.value[index]; item.flag = !item.flag; if (item.flag) { const amountToSet = batchStakeValue.value !== "" ? Number(batchStakeValue.value) : item.mininum !== void 0 ? item.mininum : 10; selectedBets.value.push({ id: item.id, gameName: currentGame.value.name, playName: currentPlayName.value, number: item.number, odds: item.odds, color: item.color, mininum: item.mininum, maxinum: item.maxinum, amount: amountToSet }); } else { selectedBets.value = selectedBets.value.filter((b) => b.id !== item.id); } }; const quickSelectWave = (colorStr) => { if (isFengpan.value) return; numberList.value.forEach((item, index) => { const shouldSelect = item.color === colorStr; if (item.flag !== shouldSelect) { toggleSelect(index); } }); }; const randomSelect = () => { if (isFengpan.value) return; const unselectedIndices = []; numberList.value.forEach((item, index) => { if (!item.flag) { unselectedIndices.push(index); } }); if (unselectedIndices.length > 0) { const randomPos = Math.floor(Math.random() * unselectedIndices.length); const targetIndex = unselectedIndices[randomPos]; toggleSelect(targetIndex); } else { uni.showToast({ title: t2("所有选项已全选"), icon: "none" }); } }; const clearSelect = () => { numberList.value.forEach((item) => item.flag = false); selectedBets.value = []; cartPopupVisible.value = false; }; const removeSelected = (id) => { selectedBets.value = selectedBets.value.filter((b) => b.id !== id); const visibleItem = numberList.value.find((n) => n.id === id); if (visibleItem) { visibleItem.flag = false; } if (selectedBets.value.length === 0) { cartPopupVisible.value = false; } }; const applyBatchStake = () => { let val = batchStakeValue.value; uni.setStorageSync("self_lhcBatchStakeCache", val); if (val === "") { selectedBets.value.forEach((item) => { item.amount = ""; }); return; } let numVal = Number(val); if (isNaN(numVal) || numVal <= 0) { return uni.showToast({ title: t2("请输入大于0的有效金额"), icon: "none" }); } selectedBets.value.forEach((item) => { let itemVal = numVal; const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (itemVal < min) { itemVal = min; } if (itemVal > max) { itemVal = max; } if (itemVal > userMoney.value) { itemVal = userMoney.value; uni.showToast({ title: t2("余额不足"), icon: "none" }); } item.amount = itemVal; }); }; const validateAmount = (item) => { const val = Number(item.amount); const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (isNaN(val) || val <= 0) { item.amount = ""; } else if (val < min) { uni.showToast({ title: t2("单注最低") + ` ${min}`, icon: "none" }); item.amount = min; } else if (val > max) { uni.showToast({ title: t2("单注最高") + ` ${max}`, icon: "none" }); item.amount = max; } else if (val > userMoney.value) { uni.showToast({ title: t2("余额不足"), icon: "none" }); item.amount = userMoney.value; } }; const changeAmount = (item, delta) => { let val = Number(item.amount) || 0; val += delta; const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (val < 0) { val = 0; item.amount = ""; return; } if (val > 0 && val < min) { val = min; uni.showToast({ title: t2("单注最低") + ` ${min}`, icon: "none" }); } else if (val > max) { val = max; uni.showToast({ title: t2("单注最高") + ` ${max}`, icon: "none" }); } else if (val > userMoney.value) { val = userMoney.value; uni.showToast({ title: t2("余额不足"), icon: "none" }); } item.amount = val || ""; }; const openCartPopup = () => { if (totalBets.value === 0) return uni.showToast({ title: t2("请先选择投注项"), icon: "none" }); cartPopupVisible.value = true; }; const handleOneClickBet = () => { if (!uni.getStorageSync("token")) { uni.showToast({ title: t2("请先登录"), icon: "none" }); return; } if (isFengpan.value) return; if (totalBets.value === 0) { return uni.showToast({ title: t2("请先选择投注项"), icon: "none" }); } if (totalAmount.value > userMoney.value) { return uni.showToast({ title: t2("总投注金额超过可用余额"), icon: "none" }); } const invalidItems = selectedBets.value.filter((item) => { const val = Number(item.amount); const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; return !val || val <= 0 || val < min || val > max || val > userMoney.value; }); if (invalidItems.length > 0) { if (!cartPopupVisible.value) { cartPopupVisible.value = true; } return uni.showToast({ title: t2("请检查下注金额、限额及余额"), icon: "none" }); } safeWord.value = ""; cartPopupVisible.value = false; setTimeout(() => { confirmSubmitBet(); }, 300); }; const confirmSubmitBet = async () => { uni.showModal({ title: t2("提示"), content: t2("确认提交吗?"), success: async (res) => { var _a2, _b2, _c; if (res.confirm) { const payloadData = selectedBets.value.map((item) => ({ id: item.id, amount: Number(item.amount) })); try { const res2 = await submitBetCart({ data: payloadData, safe_word: safeWord.value, type: 3 }); if (res2.code === 1) { showSafeModal.value = false; clearSelect(); fetchBalance(); (_a2 = PageContainerRef.value) == null ? void 0 : _a2.getData(); } else { (_b2 = safeModalRef.value) == null ? void 0 : _b2.clearLoading(); } } catch (error) { (_c = safeModalRef.value) == null ? void 0 : _c.clearLoading(); } } } }); }; const goToOrder = () => { router2.push({ name: "AllHistory", query: { tab: 2 } }); }; const startCountdown = (seconds) => { remainingSeconds = seconds; clearInterval(countdownTimer); countdownTimer = setInterval(() => { formatAppLog("log", "at pages/Tabbar/Entertainment/view/Digital/index.vue:748", remainingSeconds, 622); if (remainingSeconds > 0) { remainingSeconds--; const d = Math.floor(remainingSeconds / 86400); const h = Math.floor(remainingSeconds % 86400 / 3600); const m = Math.floor(remainingSeconds % 3600 / 60); const s = remainingSeconds % 60; timeData.value.days = d; timeData.value.hours = h.toString().padStart(2, "0"); timeData.value.minutes = m.toString().padStart(2, "0"); timeData.value.seconds = s.toString().padStart(2, "0"); } else { clearInterval(countdownTimer); initHowPlayData(); } }, 1e3); }; const calculateBallColor = (numStr) => { const num = parseInt(numStr, 10); if (isNaN(num)) return ""; const reds = [1, 2, 7, 8, 12, 13, 18, 19, 23, 24, 29, 30, 34, 35, 40, 45, 46]; const blues = [3, 4, 9, 10, 14, 15, 20, 25, 26, 31, 36, 37, 41, 42, 47, 48]; const greens = [5, 6, 11, 16, 17, 21, 22, 27, 28, 32, 33, 38, 39, 43, 44, 49]; if (reds.includes(num)) return t2("红"); if (blues.includes(num)) return t2("蓝"); if (greens.includes(num)) return t2("绿"); return ""; }; const getBgColorClass = (colorName) => { if (colorName === t2("红")) return "bg-red"; if (colorName === t2("蓝")) return "bg-blue"; if (colorName === t2("绿")) return "bg-green"; return "bg-gray"; }; const getTextColorClass = (colorName) => { if (colorName === t2("红")) return "text-red"; if (colorName === t2("蓝")) return "text-blue"; if (colorName === t2("绿")) return "text-green"; return ""; }; vue.watch(() => WebsocketData.globalData, (data) => { const res = typeof data === "string" ? JSON.parse(data) : data; if (res && res.type === "self_lhc_fengpan") { isFengpan.value = true; } else if (res && res.type === "self_lhc_kaipan") { isFengpan.value = false; } }); gameLotteryStatus({ type: 5 }).then((res) => { if (res.data.is_kaipan == 0) { isFengpan.value = true; } else if (res.data.is_kaipan == 1) { isFengpan.value = false; } }); const __returned__ = { router: router2, t: t2, PageContainerRef, pagingRef1, safeModalRef, cartPopupVisible, showSafeModal, historyPopupVisible, safeWord, batchStakeValue, userMoney, WebsocketData, isFengpan, numberToZodiacMap, zodiacToNumberMap, currentIssue, gameList, historyLotteryList, numberList, lhcGame, activeGameIndex, activePlayIndex, selectedBets, timeData, get countdownTimer() { return countdownTimer; }, set countdownTimer(v) { countdownTimer = v; }, get remainingSeconds() { return remainingSeconds; }, set remainingSeconds(v) { remainingSeconds = v; }, currentGame, currentPlayName, currentPlayId, lastDraw, isBallStyle, totalBets, totalAmount, onQuery, fetchBalance, initHowPlayData, handleGameClick, handlePlayClick, fetchPlayInfo, toggleSelect, quickSelectWave, randomSelect, clearSelect, removeSelected, applyBatchStake, validateAmount, changeAmount, openCartPopup, handleOneClickBet, confirmSubmitBet, goToOrder, startCountdown, calculateBallColor, getBgColorClass, getTextColorClass, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, watch: vue.watch, get useI18n() { return useI18n; }, get onShow() { return onShow; }, get getHowPlay() { return getHowPlay; }, get getLHCInfo() { return getLHCInfo; }, get getPlayInfo() { return getPlayInfo; }, get submitBetCart() { return submitBetCart; }, get getBalance() { return getBalance; }, get useWebsocketDataStore() { return useWebsocketDataStore; }, get gameLotteryStatus() { return gameLotteryStatus; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_popup = __unplugin_components_2$3; const _component_u_input = __unplugin_components_3$2; const _component_u_modal = __unplugin_components_4$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode( _component_PageContainer, { ref: "PageContainerRef", navTitle: "澳门六合彩" }, { default: vue.withCtx(() => [ vue.createVNode( _component_z_paging, { ref: "pagingRef1", onQuery: $setup.onQuery, fixed: false, "refresher-only": true, "refresher-enabled": true, "loading-more-enabled": false, "auto-show-back-to-top": true }, { refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("获取最新数据...")), 1 /* TEXT */ ) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "app-digital-container" }, [ vue.createElementVNode("view", { class: "calc-card lottery-dashboard" }, [ vue.createElementVNode("view", { class: "dash-top" }, [ vue.createElementVNode("view", { class: "lottery-title" }, [ vue.createElementVNode("text", { class: "issue-text" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("距")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "highlight" }, vue.toDisplayString($setup.lhcGame.next_issue), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString($setup.t("期截止")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "timer-box" }, [ !$setup.isFengpan ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ $setup.timeData.days > 0 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.days), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "colon" }, vue.toDisplayString($setup.t("天")), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.hours), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "colon" }, ":"), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.minutes), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "colon" }, ":"), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.seconds), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "fengpan-text" }, vue.toDisplayString($setup.t("封盘中")), 1 /* TEXT */ )) ]) ]), $setup.lastDraw ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "dash-bottom" }, [ vue.createElementVNode("view", { class: "result-header" }, [ vue.createElementVNode( "text", { class: "r-title" }, vue.toDisplayString($setup.t("第")) + " " + vue.toDisplayString($setup.lhcGame.issue) + " " + vue.toDisplayString($setup.t("期开奖")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "actions" }, [ vue.createElementVNode( "text", { class: "action-btn tmc", onClick: _cache[0] || (_cache[0] = ($event) => $setup.historyPopupVisible = true) }, vue.toDisplayString($setup.t("近期开奖")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "action-divider" }, "|"), vue.createElementVNode( "text", { class: "action-btn tmc", onClick: $setup.goToOrder }, vue.toDisplayString($setup.t("购彩记录")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "balls-display" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.lastDraw.lottery_codes.slice(0, 6), (ball, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ball-group", key: "norm_" + idx }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball", $setup.getBgColorClass(ball.color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(ball.code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(ball.zodiac), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("text", { class: "plus-icon" }, "+"), $setup.lastDraw.lottery_codes[6] ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "ball-group special" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball special-ball", $setup.getBgColorClass($setup.lastDraw.lottery_codes[6].color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString($setup.lastDraw.lottery_codes[6].code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString($setup.lastDraw.lottery_codes[6].zodiac), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true) ]), $setup.gameList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "play-tabs-container" }, [ vue.createElementVNode("scroll-view", { "scroll-x": "", class: "scroll-x-box", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "main-tabs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameList, (game, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["play-tab", { "is-active": $setup.activeGameIndex === index }]), key: game.id, onClick: ($event) => $setup.handleGameClick(index) }, vue.toDisplayString(game.name), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), $setup.currentGame.gameplay && $setup.currentGame.gameplay.length > 1 ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, "scroll-x": "", class: "scroll-x-box", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "sub-tabs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.currentGame.gameplay, (play, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["sub-tab", { "is-active": $setup.activePlayIndex === index }]), key: play.id, onClick: ($event) => $setup.handlePlayClick(index) }, vue.toDisplayString(play.name), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "play-grid-wrap" }, [ vue.createElementVNode("view", { class: "play-group-card" }, [ [$setup.t("特码"), $setup.t("正码"), $setup.t("正码特")].includes($setup.currentGame.name) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "calc-tabs quick-actions" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab red", { "is-disabled": $setup.isFengpan }]), onClick: _cache[1] || (_cache[1] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("红"))) }, vue.toDisplayString($setup.t("红波")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab blue", { "is-disabled": $setup.isFengpan }]), onClick: _cache[2] || (_cache[2] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("蓝"))) }, vue.toDisplayString($setup.t("蓝波")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab green", { "is-disabled": $setup.isFengpan }]), onClick: _cache[3] || (_cache[3] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("绿"))) }, vue.toDisplayString($setup.t("绿波")), 3 /* TEXT, CLASS */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["number-grid", $setup.isBallStyle ? "is-ball-grid" : "is-box-grid"]) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.numberList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["rule-btn num-item", { "is-active": item.flag, "is-disabled": $setup.isFengpan }]), key: item.id, onClick: ($event) => !$setup.isFengpan && $setup.toggleSelect(index) }, [ $setup.isBallStyle ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["ball-wrapper", $setup.getBgColorClass(item.color)]) }, [ vue.createElementVNode( "text", { class: "ball-text" }, vue.toDisplayString(item.number), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "odds-text" }, vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createElementVNode("view", { class: "box-top" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["box-name", $setup.getTextColorClass(item.color)]) }, vue.toDisplayString(item.number), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "text", { class: "box-odds" }, vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ]), item.numbers && item.numbers.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "box-bottom" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.numbers, (numObj, nIdx) => { return vue.openBlock(), vue.createElementBlock( "text", { key: nIdx, class: vue.normalizeClass(["mini-num", $setup.getTextColorClass(numObj.color)]) }, vue.toDisplayString(numObj.number), 3 /* TEXT, CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 2 /* CLASS */ ) ]) ]), vue.createElementVNode("view", { style: { "height": "80px" } }) ]), vue.createElementVNode("view", { class: "digital-bottom" }) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), !$setup.cartPopupVisible ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "sticky-header-bar", onClick: $setup.openCartPopup }, [ vue.createElementVNode("view", { class: "betting-sheet-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.totalBets), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("已选注单")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-up", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right", style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["btn-action", { "is-disabled": $setup.isFengpan }]), style: { "margin-right": "10px", "background": "#6EC149", "color": "#fff" }, onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => !$setup.isFengpan && $setup.randomSelect(), ["stop"])) }, vue.toDisplayString($setup.t("机选")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["btn-action bet-btn", { "is-disabled": $setup.isFengpan }]), style: { "background-color": "#f8b932", "color": "#fff", "border-color": "#f8b932" }, onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => !$setup.isFengpan && $setup.openCartPopup(), ["stop"])) }, vue.toDisplayString($setup.t("下注")), 3 /* TEXT, CLASS */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_popup, { modelValue: $setup.cartPopupVisible, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.cartPopupVisible = $event), mode: "bottom", "border-radius": "24", mask: true, "mask-close-able": true, "z-index": 990, "safe-area-inset-bottom": true, height: "75%" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-cart-layout" }, [ vue.createElementVNode("view", { class: "popup-fixed-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header border-bottom", onClick: _cache[6] || (_cache[6] = ($event) => $setup.cartPopupVisible = false) }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.totalBets), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("已选注单明细")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-down", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right", style: { "display": "flex", "align-items": "center" } }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "settings-btn", onClick: vue.withModifiers($setup.clearSelect, ["stop"]) }, [ vue.createElementVNode( "text", { style: { "font-size": "12px" }, class: "tmc" }, vue.toDisplayString($setup.t("清空")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "batch-stake-box" }, [ vue.createElementVNode( "text", { class: "batch-label" }, vue.toDisplayString($setup.t("批量设置金额")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "batch-input-wrapper" }, [ vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.batchStakeValue = $event), class: "batch-input", placeholder: $setup.t("请输入金额"), type: "number" }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.batchStakeValue] ]) ]), vue.createVNode(_component_u_button, { size: "mini", type: "primary", style: { "margin-left": "10px" }, onClick: $setup.applyBatchStake }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("确定")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : vue.createCommentVNode("v-if", true) ]), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, "scroll-y": "true", class: "scroll-view-container" }, [ vue.createElementVNode("view", { class: "bet-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.selectedBets, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "bet-item", key: item.id }, [ vue.createElementVNode("view", { class: "item-header" }, [ vue.createElementVNode("text", { class: "team-names" }, [ vue.createTextVNode( vue.toDisplayString(item.playName) + " - ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: vue.normalizeClass($setup.getTextColorClass(item.color)) }, vue.toDisplayString(item.number), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "close-btn", onClick: vue.withModifiers(($event) => $setup.removeSelected(item.id), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#666", size: "16" }) ], 8, ["onClick"]) ]), vue.createElementVNode("view", { class: "item-info" }, [ vue.createElementVNode("view", { class: "bet-type" }, [ vue.createElementVNode( "text", { class: "type-name" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "limit-text", style: { "margin-left": "10px", "font-size": "12px", "color": "#999" } }, vue.toDisplayString($setup.t("单注限额")) + " " + vue.toDisplayString(item.mininum !== void 0 ? item.mininum : 10) + " ~ " + vue.toDisplayString(item.maxinum !== void 0 ? item.maxinum : 1e4), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "odds-box" }, [ vue.createElementVNode( "text", { class: "odds-val" }, "@" + vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["stake-input-box", { "error-border": item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 || item.mininum !== void 0 && item.amount !== "" && item.amount !== void 0 && Number(item.amount) < (item.mininum !== void 0 ? Number(item.mininum) : 10) || item.maxinum !== void 0 && Number(item.amount) > (item.maxinum !== void 0 ? Number(item.maxinum) : 1e4) || Number(item.amount) > $setup.userMoney }]) }, [ vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeAmount(item, -10), ["stop"]) }, "-", 8, ["onClick"]), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": ($event) => item.amount = $event, type: "number", class: "stake-input", placeholder: $setup.t("输入本金"), onBlur: ($event) => $setup.validateAmount(item) }, null, 40, ["onUpdate:modelValue", "placeholder", "onBlur"]), [ [vue.vModelText, item.amount] ]), vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeAmount(item, 10), ["stop"]) }, "+", 8, ["onClick"]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "item-footer" }, [ item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "err-msg" }, vue.toDisplayString($setup.t("金额不能小于等于0")), 1 /* TEXT */ )) : item.amount !== "" && item.amount !== void 0 && Number(item.amount) < (item.mininum !== void 0 ? Number(item.mininum) : 10) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "err-msg" }, vue.toDisplayString($setup.t("单注最低限制为")) + " " + vue.toDisplayString(item.mininum !== void 0 ? item.mininum : 10), 1 /* TEXT */ )) : Number(item.amount) > (item.maxinum !== void 0 ? Number(item.maxinum) : 1e4) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "err-msg" }, vue.toDisplayString($setup.t("单注最高限制为")) + " " + vue.toDisplayString(item.maxinum !== void 0 ? item.maxinum : 1e4), 1 /* TEXT */ )) : Number(item.amount) > $setup.userMoney ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "err-msg" }, vue.toDisplayString($setup.t("余额不足")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "potential-win" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("潜在赢利")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "win-amount" }, vue.toDisplayString((Number(item.amount) * Number(item.odds)).toFixed(2)), 1 /* TEXT */ ) ])) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { style: { "height": "100px" } }) ])) : vue.createCommentVNode("v-if", true), $setup.totalBets === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty-sheet" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("暂无投注项")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "sheet-action-bar popup-fixed-footer digital-cart-bottom" }, [ vue.createElementVNode("view", { class: "total-odds-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("总投注金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString($setup.totalAmount.toFixed(2)), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_button, { type: "primary", onClick: $setup.handleOneClickBet, disabled: $setup.isFengpan }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("立即投注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["disabled"]) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_u_modal, { ref: "safeModalRef", modelValue: $setup.showSafeModal, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.showSafeModal = $event), "async-close": true, title: $setup.t("安全验证"), "show-cancel-button": true, "confirm-text": $setup.t("确定投注"), "cancel-text": $setup.t("取消"), "confirm-color": "#f8b932", onConfirm: $setup.confirmSubmitBet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "safe-modal-content" }, [ vue.createElementVNode( "text", { class: "safe-tips" }, vue.toDisplayString($setup.t("为保障您的资金安全,请输入资金密码")), 1 /* TEXT */ ), vue.createVNode(_component_u_input, { modelValue: $setup.safeWord, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.safeWord = $event), type: "password", placeholder: $setup.t("请输入资金密码"), border: true, "border-color": "#e4e7ed", clearable: true, "input-align": "center" }, null, 8, ["modelValue", "placeholder"]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "title", "confirm-text", "cancel-text"]), vue.createVNode(_component_u_popup, { modelValue: $setup.historyPopupVisible, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $setup.historyPopupVisible = $event), mode: "center", "border-radius": "20", mask: true, "z-index": 990, width: "90%" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-wrapper history-popup" }, [ vue.createElementVNode( "view", { class: "p-title" }, vue.toDisplayString($setup.t("近期开奖记录")), 1 /* TEXT */ ), vue.createElementVNode("scroll-view", { "scroll-y": "true", class: "history-scroll-container" }, [ vue.createElementVNode("view", { class: "history-list-content" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.historyLotteryList, (item, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "history-item", key: idx }, [ vue.createElementVNode("view", { class: "h-top" }, [ vue.createElementVNode( "text", { class: "h-issue" }, vue.toDisplayString(item.issue) + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "h-time" }, vue.toDisplayString(item.open_time), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "balls-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.lottery_codes.slice(0, 6), (b, i) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ball-group", key: i }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball", $setup.getBgColorClass(b.color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(b.code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(b.zodiac), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("text", { class: "plus" }, "+"), vue.createElementVNode("view", { class: "ball-group" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball special-ball", $setup.getBgColorClass(item.lottery_codes[6].color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(item.lottery_codes[6].code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(item.lottery_codes[6].zodiac), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode( "view", { class: "close-btn-bottom", onClick: _cache[11] || (_cache[11] = ($event) => $setup.historyPopupVisible = false) }, vue.toDisplayString($setup.t("关闭")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]), _: 1 /* STABLE */ }); } const PagesTabbarEntertainmentViewDigitalIndex = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-3c5c7d70"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/view/Digital/index.vue"]]); const _sfc_main$8 = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const router2 = useRouter(); const { t: t2 } = useI18n(); const PageContainerRef = vue.ref(); const pagingRef1 = vue.ref(null); const safeModalRef = vue.ref(null); const cartPopupVisible = vue.ref(false); const showSafeModal = vue.ref(false); const historyPopupVisible = vue.ref(false); const safeWord = vue.ref(""); const batchStakeValue = vue.ref(uni.getStorageSync("lhcBatchStakeCache") || ""); const userMoney = vue.ref(0); const WebsocketData = useWebsocketDataStore(); const isFengpan = vue.ref(false); const numberToZodiacMap = vue.ref({}); const zodiacToNumberMap = vue.ref({}); const currentIssue = vue.ref(""); const gameList = vue.ref([]); const historyLotteryList = vue.ref([]); const numberList = vue.ref([]); const lhcGame = vue.ref({}); const activeGameIndex = vue.ref(0); const activePlayIndex = vue.ref(0); const selectedBets = vue.ref(uni.getStorageSync("lhc_selected_bets") || []); vue.watch(selectedBets, (newVal) => { uni.setStorageSync("lhc_selected_bets", newVal); }, { deep: true }); const timeData = vue.ref({ days: 0, hours: "00", minutes: "00", seconds: "00" }); let countdownTimer = null; let remainingSeconds = 0; const currentGame = vue.computed(() => gameList.value[activeGameIndex.value] || {}); const currentPlayName = vue.computed(() => { var _a2, _b2; return ((_b2 = (_a2 = currentGame.value.gameplay) == null ? void 0 : _a2[activePlayIndex.value]) == null ? void 0 : _b2.name) || ""; }); const currentPlayId = vue.computed(() => { var _a2, _b2; return ((_b2 = (_a2 = currentGame.value.gameplay) == null ? void 0 : _a2[activePlayIndex.value]) == null ? void 0 : _b2.id) || ""; }); const lastDraw = vue.computed(() => historyLotteryList.value[0] || null); const isBallStyle = vue.computed(() => { const ballGames = [t2("特码"), t2("正码"), t2("正码特"), t2("正码1-6")]; return ballGames.includes(currentGame.value.name); }); const totalBets = vue.computed(() => selectedBets.value.length); const totalAmount = vue.computed(() => { return selectedBets.value.reduce((sum, item) => sum + (Number(item.amount) || 0), 0); }); const onQuery = async () => { var _a2; await initHowPlayData(); await fetchBalance(); (_a2 = pagingRef1.value) == null ? void 0 : _a2.complete([]); }; const fetchBalance = async () => { if (uni.getStorageSync("token")) { try { const res = await getBalance(); if (res.code === 1) { userMoney.value = Number(res.data.money); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/NewDigital/index.vue:377", "获取余额失败", error); } } }; const initHowPlayData = async () => { var _a2; try { const [infoRes, playRes] = await Promise.all([ getLHCInfo(), getHowPlay({ type: 1 }) ]); if (infoRes.code === 1 && infoRes.data) { numberToZodiacMap.value = infoRes.data.number_to_zodiac || {}; zodiacToNumberMap.value = infoRes.data.zodiac_to_number || {}; } if (playRes.code === 1 && playRes.data) { lhcGame.value = playRes.data; currentIssue.value = playRes.data.issue; gameList.value = playRes.data.games || []; if (playRes.data.history_lottery) { historyLotteryList.value = playRes.data.history_lottery.map((item) => ({ ...item, lottery_codes: item.lottery_codes.map((codeStr) => ({ code: codeStr, color: calculateBallColor(codeStr), zodiac: numberToZodiacMap.value[codeStr] || "" })) })); } if (((_a2 = playRes.data) == null ? void 0 : _a2.countdown) != 0) { startCountdown(Number(playRes.data.countdown || 0)); } await fetchPlayInfo(); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/NewDigital/index.vue:419", "获取数据失败", error); } }; vue.onMounted(() => { initHowPlayData(); fetchBalance(); }); onShow(() => { batchStakeValue.value = uni.getStorageSync("lhcBatchStakeCache") || ""; fetchBalance(); }); vue.onUnmounted(() => { clearInterval(countdownTimer); }); const handleGameClick = (index) => { if (activeGameIndex.value === index) return; activeGameIndex.value = index; activePlayIndex.value = 0; fetchPlayInfo(); }; const handlePlayClick = (index) => { if (activePlayIndex.value === index) return; activePlayIndex.value = index; fetchPlayInfo(); }; const fetchPlayInfo = async () => { if (!currentPlayId.value) return; numberList.value = []; try { const res = await getPlayInfo({ id: currentPlayId.value }); if (res.code === 1 && res.data) { numberList.value = res.data.map((item) => { let color2 = ""; if (isBallStyle.value || !isNaN(item.number)) { color2 = calculateBallColor(item.number); } else { if (item.number.includes(t2("红"))) color2 = t2("红"); else if (item.number.includes(t2("蓝"))) color2 = t2("蓝"); else if (item.number.includes(t2("绿"))) color2 = t2("绿"); } let tinyNums = []; if (zodiacToNumberMap.value[item.number]) { tinyNums = zodiacToNumberMap.value[item.number].map((nStr) => ({ number: nStr, color: calculateBallColor(nStr) })); } const isSelected = selectedBets.value.some((b) => b.id === item.id); return { id: item.id, number: item.number, odds: item.odds, color: color2, flag: isSelected, numbers: tinyNums, mininum: item.mininum, maxinum: item.maxinum }; }); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/NewDigital/index.vue:494", "获取玩法失败", error); } finally { uni.hideLoading(); } }; const toggleSelect = (index) => { if (isFengpan.value) return; const item = numberList.value[index]; item.flag = !item.flag; if (item.flag) { const amountToSet = batchStakeValue.value !== "" ? Number(batchStakeValue.value) : item.mininum !== void 0 ? item.mininum : 10; selectedBets.value.push({ id: item.id, gameName: currentGame.value.name, playName: currentPlayName.value, number: item.number, odds: item.odds, color: item.color, mininum: item.mininum, maxinum: item.maxinum, amount: amountToSet }); } else { selectedBets.value = selectedBets.value.filter((b) => b.id !== item.id); } }; const quickSelectWave = (colorStr) => { if (isFengpan.value) return; numberList.value.forEach((item, index) => { const shouldSelect = item.color === colorStr; if (item.flag !== shouldSelect) { toggleSelect(index); } }); }; const randomSelect = () => { if (isFengpan.value) return; const unselectedIndices = []; numberList.value.forEach((item, index) => { if (!item.flag) { unselectedIndices.push(index); } }); if (unselectedIndices.length > 0) { const randomPos = Math.floor(Math.random() * unselectedIndices.length); const targetIndex = unselectedIndices[randomPos]; toggleSelect(targetIndex); } else { uni.showToast({ title: t2("所有选项已全选"), icon: "none" }); } }; const clearSelect = () => { numberList.value.forEach((item) => item.flag = false); selectedBets.value = []; cartPopupVisible.value = false; }; const removeSelected = (id) => { selectedBets.value = selectedBets.value.filter((b) => b.id !== id); const visibleItem = numberList.value.find((n) => n.id === id); if (visibleItem) { visibleItem.flag = false; } if (selectedBets.value.length === 0) { cartPopupVisible.value = false; } }; const applyBatchStake = () => { let val = batchStakeValue.value; uni.setStorageSync("lhcBatchStakeCache", val); if (val === "") { selectedBets.value.forEach((item) => { item.amount = ""; }); return; } let numVal = Number(val); if (isNaN(numVal) || numVal <= 0) { return uni.showToast({ title: t2("请输入大于0的有效金额"), icon: "none" }); } selectedBets.value.forEach((item) => { let itemVal = numVal; const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (itemVal < min) { itemVal = min; } if (itemVal > max) { itemVal = max; } if (itemVal > userMoney.value) { itemVal = userMoney.value; uni.showToast({ title: t2("余额不足"), icon: "none" }); } item.amount = itemVal; }); }; const validateAmount = (item) => { const val = Number(item.amount); const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (isNaN(val) || val <= 0) { item.amount = ""; } else if (val < min) { uni.showToast({ title: t2("单注最低") + ` ${min}`, icon: "none" }); item.amount = min; } else if (val > max) { uni.showToast({ title: t2("单注最高") + ` ${max}`, icon: "none" }); item.amount = max; } else if (val > userMoney.value) { uni.showToast({ title: t2("余额不足"), icon: "none" }); item.amount = userMoney.value; } }; const changeAmount = (item, delta) => { let val = Number(item.amount) || 0; val += delta; const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (val < 0) { val = 0; item.amount = ""; return; } if (val > 0 && val < min) { val = min; uni.showToast({ title: t2("单注最低") + ` ${min}`, icon: "none" }); } else if (val > max) { val = max; uni.showToast({ title: t2("单注最高") + ` ${max}`, icon: "none" }); } else if (val > userMoney.value) { val = userMoney.value; uni.showToast({ title: t2("余额不足"), icon: "none" }); } item.amount = val || ""; }; const openCartPopup = () => { if (totalBets.value === 0) return uni.showToast({ title: t2("请先选择投注项"), icon: "none" }); cartPopupVisible.value = true; }; const handleOneClickBet = () => { if (!uni.getStorageSync("token")) { uni.showToast({ title: t2("请先登录"), icon: "none" }); return; } if (isFengpan.value) return; if (totalBets.value === 0) { return uni.showToast({ title: t2("请先选择投注项"), icon: "none" }); } if (totalAmount.value > userMoney.value) { return uni.showToast({ title: t2("总投注金额超过可用余额"), icon: "none" }); } const invalidItems = selectedBets.value.filter((item) => { const val = Number(item.amount); const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; return !val || val <= 0 || val < min || val > max || val > userMoney.value; }); if (invalidItems.length > 0) { if (!cartPopupVisible.value) { cartPopupVisible.value = true; } return uni.showToast({ title: t2("请检查下注金额、限额及余额"), icon: "none" }); } safeWord.value = ""; cartPopupVisible.value = false; setTimeout(() => { confirmSubmitBet(); }, 300); }; const confirmSubmitBet = async () => { uni.showModal({ title: t2("提示"), content: t2("确认提交吗?"), success: async (res) => { var _a2, _b2, _c; if (res.confirm) { const payloadData = selectedBets.value.map((item) => ({ id: item.id, amount: Number(item.amount) })); try { const res2 = await submitBetCart({ data: payloadData, safe_word: safeWord.value, type: 1 }); if (res2.code === 1) { showSafeModal.value = false; clearSelect(); fetchBalance(); (_a2 = PageContainerRef.value) == null ? void 0 : _a2.getData(); } else { (_b2 = safeModalRef.value) == null ? void 0 : _b2.clearLoading(); } } catch (error) { (_c = safeModalRef.value) == null ? void 0 : _c.clearLoading(); } } } }); }; const goToOrder = () => { router2.push({ name: "AllHistory", query: { tab: 2 } }); }; const startCountdown = (seconds) => { remainingSeconds = seconds; clearInterval(countdownTimer); countdownTimer = setInterval(() => { formatAppLog("log", "at pages/Tabbar/Entertainment/view/NewDigital/index.vue:748", remainingSeconds, 622); if (remainingSeconds > 0) { remainingSeconds--; const d = Math.floor(remainingSeconds / 86400); const h = Math.floor(remainingSeconds % 86400 / 3600); const m = Math.floor(remainingSeconds % 3600 / 60); const s = remainingSeconds % 60; timeData.value.days = d; timeData.value.hours = h.toString().padStart(2, "0"); timeData.value.minutes = m.toString().padStart(2, "0"); timeData.value.seconds = s.toString().padStart(2, "0"); } else { clearInterval(countdownTimer); initHowPlayData(); } }, 1e3); }; const calculateBallColor = (numStr) => { const num = parseInt(numStr, 10); if (isNaN(num)) return ""; const reds = [1, 2, 7, 8, 12, 13, 18, 19, 23, 24, 29, 30, 34, 35, 40, 45, 46]; const blues = [3, 4, 9, 10, 14, 15, 20, 25, 26, 31, 36, 37, 41, 42, 47, 48]; const greens = [5, 6, 11, 16, 17, 21, 22, 27, 28, 32, 33, 38, 39, 43, 44, 49]; if (reds.includes(num)) return t2("红"); if (blues.includes(num)) return t2("蓝"); if (greens.includes(num)) return t2("绿"); return ""; }; const getBgColorClass = (colorName) => { if (colorName === t2("红")) return "bg-red"; if (colorName === t2("蓝")) return "bg-blue"; if (colorName === t2("绿")) return "bg-green"; return "bg-gray"; }; const getTextColorClass = (colorName) => { if (colorName === t2("红")) return "text-red"; if (colorName === t2("蓝")) return "text-blue"; if (colorName === t2("绿")) return "text-green"; return ""; }; vue.watch(() => WebsocketData.globalData, (data) => { const res = typeof data === "string" ? JSON.parse(data) : data; if (res && res.type === "aomen_lhc_fengpan") { isFengpan.value = true; } else if (res && res.type === "aomen_lhc_kaipan") { isFengpan.value = false; } }); gameLotteryStatus({ type: 3 }).then((res) => { if (res.data.is_kaipan == 0) { isFengpan.value = true; } else if (res.data.is_kaipan == 1) { isFengpan.value = false; } }); const __returned__ = { router: router2, t: t2, PageContainerRef, pagingRef1, safeModalRef, cartPopupVisible, showSafeModal, historyPopupVisible, safeWord, batchStakeValue, userMoney, WebsocketData, isFengpan, numberToZodiacMap, zodiacToNumberMap, currentIssue, gameList, historyLotteryList, numberList, lhcGame, activeGameIndex, activePlayIndex, selectedBets, timeData, get countdownTimer() { return countdownTimer; }, set countdownTimer(v) { countdownTimer = v; }, get remainingSeconds() { return remainingSeconds; }, set remainingSeconds(v) { remainingSeconds = v; }, currentGame, currentPlayName, currentPlayId, lastDraw, isBallStyle, totalBets, totalAmount, onQuery, fetchBalance, initHowPlayData, handleGameClick, handlePlayClick, fetchPlayInfo, toggleSelect, quickSelectWave, randomSelect, clearSelect, removeSelected, applyBatchStake, validateAmount, changeAmount, openCartPopup, handleOneClickBet, confirmSubmitBet, goToOrder, startCountdown, calculateBallColor, getBgColorClass, getTextColorClass, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, watch: vue.watch, get useI18n() { return useI18n; }, get onShow() { return onShow; }, get getHowPlay() { return getHowPlay; }, get getLHCInfo() { return getLHCInfo; }, get getPlayInfo() { return getPlayInfo; }, get submitBetCart() { return submitBetCart; }, get getBalance() { return getBalance; }, get useWebsocketDataStore() { return useWebsocketDataStore; }, get gameLotteryStatus() { return gameLotteryStatus; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) { const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_popup = __unplugin_components_2$3; const _component_u_input = __unplugin_components_3$2; const _component_u_modal = __unplugin_components_4$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode( _component_PageContainer, { ref: "PageContainerRef", navTitle: "新澳门六合彩" }, { default: vue.withCtx(() => [ vue.createVNode( _component_z_paging, { ref: "pagingRef1", onQuery: $setup.onQuery, fixed: false, "refresher-only": true, "refresher-enabled": true, "loading-more-enabled": false, "auto-show-back-to-top": true }, { refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("获取最新数据...")), 1 /* TEXT */ ) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "app-digital-container" }, [ vue.createElementVNode("view", { class: "calc-card lottery-dashboard" }, [ vue.createElementVNode("view", { class: "dash-top" }, [ vue.createElementVNode("view", { class: "lottery-title" }, [ vue.createElementVNode("text", { class: "issue-text" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("距")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "highlight" }, vue.toDisplayString($setup.lhcGame.next_issue), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString($setup.t("期截止")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "timer-box" }, [ !$setup.isFengpan ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ $setup.timeData.days > 0 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.days), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "colon" }, vue.toDisplayString($setup.t("天")), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.hours), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "colon" }, ":"), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.minutes), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "colon" }, ":"), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.seconds), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "fengpan-text" }, vue.toDisplayString($setup.t("封盘中")), 1 /* TEXT */ )) ]) ]), $setup.lastDraw ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "dash-bottom" }, [ vue.createElementVNode("view", { class: "result-header" }, [ vue.createElementVNode( "text", { class: "r-title" }, vue.toDisplayString($setup.t("第")) + " " + vue.toDisplayString($setup.lhcGame.issue) + " " + vue.toDisplayString($setup.t("期开奖")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "actions" }, [ vue.createElementVNode( "text", { class: "action-btn tmc", onClick: _cache[0] || (_cache[0] = ($event) => $setup.historyPopupVisible = true) }, vue.toDisplayString($setup.t("近期开奖")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "action-divider" }, "|"), vue.createElementVNode( "text", { class: "action-btn tmc", onClick: $setup.goToOrder }, vue.toDisplayString($setup.t("购彩记录")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "balls-display" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.lastDraw.lottery_codes.slice(0, 6), (ball, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ball-group", key: "norm_" + idx }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball", $setup.getBgColorClass(ball.color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(ball.code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(ball.zodiac), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("text", { class: "plus-icon" }, "+"), $setup.lastDraw.lottery_codes[6] ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "ball-group special" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball special-ball", $setup.getBgColorClass($setup.lastDraw.lottery_codes[6].color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString($setup.lastDraw.lottery_codes[6].code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString($setup.lastDraw.lottery_codes[6].zodiac), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true) ]), $setup.gameList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "play-tabs-container" }, [ vue.createElementVNode("scroll-view", { "scroll-x": "", class: "scroll-x-box", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "main-tabs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameList, (game, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["play-tab", { "is-active": $setup.activeGameIndex === index }]), key: game.id, onClick: ($event) => $setup.handleGameClick(index) }, vue.toDisplayString(game.name), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), $setup.currentGame.gameplay && $setup.currentGame.gameplay.length > 1 ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, "scroll-x": "", class: "scroll-x-box", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "sub-tabs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.currentGame.gameplay, (play, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["sub-tab", { "is-active": $setup.activePlayIndex === index }]), key: play.id, onClick: ($event) => $setup.handlePlayClick(index) }, vue.toDisplayString(play.name), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "play-grid-wrap" }, [ vue.createElementVNode("view", { class: "play-group-card" }, [ [$setup.t("特码"), $setup.t("正码"), $setup.t("正码特")].includes($setup.currentGame.name) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "calc-tabs quick-actions" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab red", { "is-disabled": $setup.isFengpan }]), onClick: _cache[1] || (_cache[1] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("红"))) }, vue.toDisplayString($setup.t("红波")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab blue", { "is-disabled": $setup.isFengpan }]), onClick: _cache[2] || (_cache[2] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("蓝"))) }, vue.toDisplayString($setup.t("蓝波")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab green", { "is-disabled": $setup.isFengpan }]), onClick: _cache[3] || (_cache[3] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("绿"))) }, vue.toDisplayString($setup.t("绿波")), 3 /* TEXT, CLASS */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["number-grid", $setup.isBallStyle ? "is-ball-grid" : "is-box-grid"]) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.numberList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["rule-btn num-item", { "is-active": item.flag, "is-disabled": $setup.isFengpan }]), key: item.id, onClick: ($event) => !$setup.isFengpan && $setup.toggleSelect(index) }, [ $setup.isBallStyle ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["ball-wrapper", $setup.getBgColorClass(item.color)]) }, [ vue.createElementVNode( "text", { class: "ball-text" }, vue.toDisplayString(item.number), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "odds-text" }, vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createElementVNode("view", { class: "box-top" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["box-name", $setup.getTextColorClass(item.color)]) }, vue.toDisplayString(item.number), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "text", { class: "box-odds" }, vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ]), item.numbers && item.numbers.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "box-bottom" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.numbers, (numObj, nIdx) => { return vue.openBlock(), vue.createElementBlock( "text", { key: nIdx, class: vue.normalizeClass(["mini-num", $setup.getTextColorClass(numObj.color)]) }, vue.toDisplayString(numObj.number), 3 /* TEXT, CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 2 /* CLASS */ ) ]) ]), vue.createElementVNode("view", { style: { "height": "80px" } }) ]), vue.createElementVNode("view", { class: "digital-bottom" }) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), !$setup.cartPopupVisible ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "sticky-header-bar", onClick: $setup.openCartPopup }, [ vue.createElementVNode("view", { class: "betting-sheet-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.totalBets), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("已选注单")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-up", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right", style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["btn-action", { "is-disabled": $setup.isFengpan }]), style: { "margin-right": "10px", "background": "#6EC149", "color": "#fff" }, onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => !$setup.isFengpan && $setup.randomSelect(), ["stop"])) }, vue.toDisplayString($setup.t("机选")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["btn-action bet-btn", { "is-disabled": $setup.isFengpan }]), style: { "background-color": "#f8b932", "color": "#fff", "border-color": "#f8b932" }, onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => !$setup.isFengpan && $setup.openCartPopup(), ["stop"])) }, vue.toDisplayString($setup.t("下注")), 3 /* TEXT, CLASS */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_popup, { modelValue: $setup.cartPopupVisible, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.cartPopupVisible = $event), mode: "bottom", "border-radius": "24", mask: true, "mask-close-able": true, "z-index": 990, "safe-area-inset-bottom": true, height: "75%" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-cart-layout" }, [ vue.createElementVNode("view", { class: "popup-fixed-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header border-bottom", onClick: _cache[6] || (_cache[6] = ($event) => $setup.cartPopupVisible = false) }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.totalBets), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("已选注单明细")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-down", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right", style: { "display": "flex", "align-items": "center" } }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "settings-btn", onClick: vue.withModifiers($setup.clearSelect, ["stop"]) }, [ vue.createElementVNode( "text", { style: { "font-size": "12px" }, class: "tmc" }, vue.toDisplayString($setup.t("清空")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "batch-stake-box" }, [ vue.createElementVNode( "text", { class: "batch-label" }, vue.toDisplayString($setup.t("批量设置金额")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "batch-input-wrapper" }, [ vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.batchStakeValue = $event), class: "batch-input", placeholder: $setup.t("请输入金额"), type: "number" }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.batchStakeValue] ]) ]), vue.createVNode(_component_u_button, { size: "mini", type: "primary", style: { "margin-left": "10px" }, onClick: $setup.applyBatchStake }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("确定")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : vue.createCommentVNode("v-if", true) ]), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, "scroll-y": "true", class: "scroll-view-container" }, [ vue.createElementVNode("view", { class: "bet-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.selectedBets, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "bet-item", key: item.id }, [ vue.createElementVNode("view", { class: "item-header" }, [ vue.createElementVNode("text", { class: "team-names" }, [ vue.createTextVNode( vue.toDisplayString(item.playName) + " - ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: vue.normalizeClass($setup.getTextColorClass(item.color)) }, vue.toDisplayString(item.number), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "close-btn", onClick: vue.withModifiers(($event) => $setup.removeSelected(item.id), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#666", size: "16" }) ], 8, ["onClick"]) ]), vue.createElementVNode("view", { class: "item-info" }, [ vue.createElementVNode("view", { class: "bet-type" }, [ vue.createElementVNode( "text", { class: "type-name" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "limit-text", style: { "margin-left": "10px", "font-size": "12px", "color": "#999" } }, vue.toDisplayString($setup.t("单注限额")) + " " + vue.toDisplayString(item.mininum !== void 0 ? item.mininum : 10) + " ~ " + vue.toDisplayString(item.maxinum !== void 0 ? item.maxinum : 1e4), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "odds-box" }, [ vue.createElementVNode( "text", { class: "odds-val" }, "@" + vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["stake-input-box", { "error-border": item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 || item.mininum !== void 0 && item.amount !== "" && item.amount !== void 0 && Number(item.amount) < (item.mininum !== void 0 ? Number(item.mininum) : 10) || item.maxinum !== void 0 && Number(item.amount) > (item.maxinum !== void 0 ? Number(item.maxinum) : 1e4) || Number(item.amount) > $setup.userMoney }]) }, [ vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeAmount(item, -10), ["stop"]) }, "-", 8, ["onClick"]), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": ($event) => item.amount = $event, type: "number", class: "stake-input", placeholder: $setup.t("输入本金"), onBlur: ($event) => $setup.validateAmount(item) }, null, 40, ["onUpdate:modelValue", "placeholder", "onBlur"]), [ [vue.vModelText, item.amount] ]), vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeAmount(item, 10), ["stop"]) }, "+", 8, ["onClick"]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "item-footer" }, [ item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "err-msg" }, vue.toDisplayString($setup.t("金额不能小于等于0")), 1 /* TEXT */ )) : item.amount !== "" && item.amount !== void 0 && Number(item.amount) < (item.mininum !== void 0 ? Number(item.mininum) : 10) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "err-msg" }, vue.toDisplayString($setup.t("单注最低限制为")) + " " + vue.toDisplayString(item.mininum !== void 0 ? item.mininum : 10), 1 /* TEXT */ )) : Number(item.amount) > (item.maxinum !== void 0 ? Number(item.maxinum) : 1e4) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "err-msg" }, vue.toDisplayString($setup.t("单注最高限制为")) + " " + vue.toDisplayString(item.maxinum !== void 0 ? item.maxinum : 1e4), 1 /* TEXT */ )) : Number(item.amount) > $setup.userMoney ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "err-msg" }, vue.toDisplayString($setup.t("余额不足")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "potential-win" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("潜在赢利")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "win-amount" }, vue.toDisplayString((Number(item.amount) * Number(item.odds)).toFixed(2)), 1 /* TEXT */ ) ])) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { style: { "height": "100px" } }) ])) : vue.createCommentVNode("v-if", true), $setup.totalBets === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty-sheet" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("暂无投注项")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "sheet-action-bar popup-fixed-footer digital-cart-bottom" }, [ vue.createElementVNode("view", { class: "total-odds-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("总投注金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString($setup.totalAmount.toFixed(2)), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_button, { type: "primary", onClick: $setup.handleOneClickBet, disabled: $setup.isFengpan }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("立即投注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["disabled"]) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_u_modal, { ref: "safeModalRef", modelValue: $setup.showSafeModal, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.showSafeModal = $event), "async-close": true, title: $setup.t("安全验证"), "show-cancel-button": true, "confirm-text": $setup.t("确定投注"), "cancel-text": $setup.t("取消"), "confirm-color": "#f8b932", onConfirm: $setup.confirmSubmitBet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "safe-modal-content" }, [ vue.createElementVNode( "text", { class: "safe-tips" }, vue.toDisplayString($setup.t("为保障您的资金安全,请输入资金密码")), 1 /* TEXT */ ), vue.createVNode(_component_u_input, { modelValue: $setup.safeWord, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.safeWord = $event), type: "password", placeholder: $setup.t("请输入资金密码"), border: true, "border-color": "#e4e7ed", clearable: true, "input-align": "center" }, null, 8, ["modelValue", "placeholder"]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "title", "confirm-text", "cancel-text"]), vue.createVNode(_component_u_popup, { modelValue: $setup.historyPopupVisible, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $setup.historyPopupVisible = $event), mode: "center", "border-radius": "20", mask: true, "z-index": 990, width: "90%" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-wrapper history-popup" }, [ vue.createElementVNode( "view", { class: "p-title" }, vue.toDisplayString($setup.t("近期开奖记录")), 1 /* TEXT */ ), vue.createElementVNode("scroll-view", { "scroll-y": "true", class: "history-scroll-container" }, [ vue.createElementVNode("view", { class: "history-list-content" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.historyLotteryList, (item, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "history-item", key: idx }, [ vue.createElementVNode("view", { class: "h-top" }, [ vue.createElementVNode( "text", { class: "h-issue" }, vue.toDisplayString(item.issue) + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "h-time" }, vue.toDisplayString(item.open_time), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "balls-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.lottery_codes.slice(0, 6), (b, i) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ball-group", key: i }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball", $setup.getBgColorClass(b.color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(b.code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(b.zodiac), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("text", { class: "plus" }, "+"), vue.createElementVNode("view", { class: "ball-group" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball special-ball", $setup.getBgColorClass(item.lottery_codes[6].color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(item.lottery_codes[6].code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(item.lottery_codes[6].zodiac), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode( "view", { class: "close-btn-bottom", onClick: _cache[11] || (_cache[11] = ($event) => $setup.historyPopupVisible = false) }, vue.toDisplayString($setup.t("关闭")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]), _: 1 /* STABLE */ }); } const PagesTabbarEntertainmentViewNewDigitalIndex = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-0e8825e2"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/view/NewDigital/index.vue"]]); const _sfc_main$7 = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const router2 = useRouter(); const { t: t2 } = useI18n(); const PageContainerRef = vue.ref(); const pagingRef1 = vue.ref(null); const safeModalRef = vue.ref(null); const cartPopupVisible = vue.ref(false); const showSafeModal = vue.ref(false); const historyPopupVisible = vue.ref(false); const safeWord = vue.ref(""); const batchStakeValue = vue.ref(uni.getStorageSync("jisu_lhcBatchStakeCache") || ""); const userMoney = vue.ref(0); const WebsocketData = useWebsocketDataStore(); const isFengpan = vue.ref(false); const numberToZodiacMap = vue.ref({}); const zodiacToNumberMap = vue.ref({}); const currentIssue = vue.ref(""); const gameList = vue.ref([]); const historyLotteryList = vue.ref([]); const numberList = vue.ref([]); const lhcGame = vue.ref({}); const activeGameIndex = vue.ref(0); const activePlayIndex = vue.ref(0); const selectedBets = vue.ref(uni.getStorageSync("jisu_lhc_selected_bets") || []); vue.watch(selectedBets, (newVal) => { uni.setStorageSync("jisu_lhc_selected_bets", newVal); }, { deep: true }); const timeData = vue.ref({ days: 0, hours: "00", minutes: "00", seconds: "00" }); let countdownTimer = null; let remainingSeconds = 0; const currentGame = vue.computed(() => gameList.value[activeGameIndex.value] || {}); const currentPlayName = vue.computed(() => { var _a2, _b2; return ((_b2 = (_a2 = currentGame.value.gameplay) == null ? void 0 : _a2[activePlayIndex.value]) == null ? void 0 : _b2.name) || ""; }); const currentPlayId = vue.computed(() => { var _a2, _b2; return ((_b2 = (_a2 = currentGame.value.gameplay) == null ? void 0 : _a2[activePlayIndex.value]) == null ? void 0 : _b2.id) || ""; }); const lastDraw = vue.computed(() => historyLotteryList.value[0] || null); const isBallStyle = vue.computed(() => { const ballGames = [t2("特码"), t2("正码"), t2("正码特"), t2("正码1-6")]; return ballGames.includes(currentGame.value.name); }); const totalBets = vue.computed(() => selectedBets.value.length); const totalAmount = vue.computed(() => { return selectedBets.value.reduce((sum, item) => sum + (Number(item.amount) || 0), 0); }); const onQuery = async () => { var _a2; await initHowPlayData(); await fetchBalance(); (_a2 = pagingRef1.value) == null ? void 0 : _a2.complete([]); }; const fetchBalance = async () => { if (uni.getStorageSync("token")) { try { const res = await getBalance(); if (res.code === 1) { userMoney.value = Number(res.data.money); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/SpeedDigital/index.vue:377", "获取余额失败", error); } } }; const initHowPlayData = async () => { var _a2; try { const [infoRes, playRes] = await Promise.all([ getLHCInfo(), getHowPlay({ type: 4 }) ]); if (infoRes.code === 1 && infoRes.data) { numberToZodiacMap.value = infoRes.data.number_to_zodiac || {}; zodiacToNumberMap.value = infoRes.data.zodiac_to_number || {}; } if (playRes.code === 1 && playRes.data) { lhcGame.value = playRes.data; currentIssue.value = playRes.data.issue; gameList.value = playRes.data.games || []; if (playRes.data.history_lottery) { historyLotteryList.value = playRes.data.history_lottery.map((item) => ({ ...item, lottery_codes: item.lottery_codes.map((codeStr) => ({ code: codeStr, color: calculateBallColor(codeStr), zodiac: numberToZodiacMap.value[codeStr] || "" })) })); } if (((_a2 = playRes.data) == null ? void 0 : _a2.countdown) != 0) { startCountdown(Number(playRes.data.countdown || 0)); } await fetchPlayInfo(); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/SpeedDigital/index.vue:419", "获取数据失败", error); } }; vue.onMounted(() => { initHowPlayData(); fetchBalance(); }); onShow(() => { batchStakeValue.value = uni.getStorageSync("jisu_lhcBatchStakeCache") || ""; fetchBalance(); }); vue.onUnmounted(() => { clearInterval(countdownTimer); }); const handleGameClick = (index) => { if (activeGameIndex.value === index) return; activeGameIndex.value = index; activePlayIndex.value = 0; fetchPlayInfo(); }; const handlePlayClick = (index) => { if (activePlayIndex.value === index) return; activePlayIndex.value = index; fetchPlayInfo(); }; const fetchPlayInfo = async () => { if (!currentPlayId.value) return; numberList.value = []; try { const res = await getPlayInfo({ id: currentPlayId.value }); if (res.code === 1 && res.data) { numberList.value = res.data.map((item) => { let color2 = ""; if (isBallStyle.value || !isNaN(item.number)) { color2 = calculateBallColor(item.number); } else { if (item.number.includes(t2("红"))) color2 = t2("红"); else if (item.number.includes(t2("蓝"))) color2 = t2("蓝"); else if (item.number.includes(t2("绿"))) color2 = t2("绿"); } let tinyNums = []; if (zodiacToNumberMap.value[item.number]) { tinyNums = zodiacToNumberMap.value[item.number].map((nStr) => ({ number: nStr, color: calculateBallColor(nStr) })); } const isSelected = selectedBets.value.some((b) => b.id === item.id); return { id: item.id, number: item.number, odds: item.odds, color: color2, flag: isSelected, numbers: tinyNums, mininum: item.mininum, maxinum: item.maxinum }; }); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/SpeedDigital/index.vue:494", "获取玩法失败", error); } finally { uni.hideLoading(); } }; const toggleSelect = (index) => { if (isFengpan.value) return; const item = numberList.value[index]; item.flag = !item.flag; if (item.flag) { const amountToSet = batchStakeValue.value !== "" ? Number(batchStakeValue.value) : item.mininum !== void 0 ? item.mininum : 10; selectedBets.value.push({ id: item.id, gameName: currentGame.value.name, playName: currentPlayName.value, number: item.number, odds: item.odds, color: item.color, mininum: item.mininum, maxinum: item.maxinum, amount: amountToSet }); } else { selectedBets.value = selectedBets.value.filter((b) => b.id !== item.id); } }; const quickSelectWave = (colorStr) => { if (isFengpan.value) return; numberList.value.forEach((item, index) => { const shouldSelect = item.color === colorStr; if (item.flag !== shouldSelect) { toggleSelect(index); } }); }; const randomSelect = () => { if (isFengpan.value) return; const unselectedIndices = []; numberList.value.forEach((item, index) => { if (!item.flag) { unselectedIndices.push(index); } }); if (unselectedIndices.length > 0) { const randomPos = Math.floor(Math.random() * unselectedIndices.length); const targetIndex = unselectedIndices[randomPos]; toggleSelect(targetIndex); } else { uni.showToast({ title: t2("所有选项已全选"), icon: "none" }); } }; const clearSelect = () => { numberList.value.forEach((item) => item.flag = false); selectedBets.value = []; cartPopupVisible.value = false; }; const removeSelected = (id) => { selectedBets.value = selectedBets.value.filter((b) => b.id !== id); const visibleItem = numberList.value.find((n) => n.id === id); if (visibleItem) { visibleItem.flag = false; } if (selectedBets.value.length === 0) { cartPopupVisible.value = false; } }; const applyBatchStake = () => { let val = batchStakeValue.value; uni.setStorageSync("jisu_lhcBatchStakeCache", val); if (val === "") { selectedBets.value.forEach((item) => { item.amount = ""; }); return; } let numVal = Number(val); if (isNaN(numVal) || numVal <= 0) { return uni.showToast({ title: t2("请输入大于0的有效金额"), icon: "none" }); } selectedBets.value.forEach((item) => { let itemVal = numVal; const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (itemVal < min) { itemVal = min; } if (itemVal > max) { itemVal = max; } if (itemVal > userMoney.value) { itemVal = userMoney.value; uni.showToast({ title: t2("余额不足"), icon: "none" }); } item.amount = itemVal; }); }; const validateAmount = (item) => { const val = Number(item.amount); const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (isNaN(val) || val <= 0) { item.amount = ""; } else if (val < min) { uni.showToast({ title: t2("单注最低") + ` ${min}`, icon: "none" }); item.amount = min; } else if (val > max) { uni.showToast({ title: t2("单注最高") + ` ${max}`, icon: "none" }); item.amount = max; } else if (val > userMoney.value) { uni.showToast({ title: t2("余额不足"), icon: "none" }); item.amount = userMoney.value; } }; const changeAmount = (item, delta) => { let val = Number(item.amount) || 0; val += delta; const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (val < 0) { val = 0; item.amount = ""; return; } if (val > 0 && val < min) { val = min; uni.showToast({ title: t2("单注最低") + ` ${min}`, icon: "none" }); } else if (val > max) { val = max; uni.showToast({ title: t2("单注最高") + ` ${max}`, icon: "none" }); } else if (val > userMoney.value) { val = userMoney.value; uni.showToast({ title: t2("余额不足"), icon: "none" }); } item.amount = val || ""; }; const openCartPopup = () => { if (totalBets.value === 0) return uni.showToast({ title: t2("请先选择投注项"), icon: "none" }); cartPopupVisible.value = true; }; const handleOneClickBet = () => { if (!uni.getStorageSync("token")) { uni.showToast({ title: t2("请先登录"), icon: "none" }); return; } if (isFengpan.value) return; if (totalBets.value === 0) { return uni.showToast({ title: t2("请先选择投注项"), icon: "none" }); } if (totalAmount.value > userMoney.value) { return uni.showToast({ title: t2("总投注金额超过可用余额"), icon: "none" }); } const invalidItems = selectedBets.value.filter((item) => { const val = Number(item.amount); const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; return !val || val <= 0 || val < min || val > max || val > userMoney.value; }); if (invalidItems.length > 0) { if (!cartPopupVisible.value) { cartPopupVisible.value = true; } return uni.showToast({ title: t2("请检查下注金额、限额及余额"), icon: "none" }); } safeWord.value = ""; cartPopupVisible.value = false; setTimeout(() => { confirmSubmitBet(); }, 300); }; const confirmSubmitBet = async () => { uni.showModal({ title: t2("提示"), content: t2("确认提交吗?"), success: async (res) => { var _a2, _b2, _c; if (res.confirm) { const payloadData = selectedBets.value.map((item) => ({ id: item.id, amount: Number(item.amount) })); try { const res2 = await submitBetCart({ data: payloadData, safe_word: safeWord.value, type: 4 }); if (res2.code === 1) { showSafeModal.value = false; clearSelect(); fetchBalance(); (_a2 = PageContainerRef.value) == null ? void 0 : _a2.getData(); } else { (_b2 = safeModalRef.value) == null ? void 0 : _b2.clearLoading(); } } catch (error) { (_c = safeModalRef.value) == null ? void 0 : _c.clearLoading(); } } } }); }; const goToOrder = () => { router2.push({ name: "AllHistory", query: { tab: 2 } }); }; const startCountdown = (seconds) => { remainingSeconds = seconds; clearInterval(countdownTimer); countdownTimer = setInterval(() => { formatAppLog("log", "at pages/Tabbar/Entertainment/view/SpeedDigital/index.vue:748", remainingSeconds, 622); if (remainingSeconds > 0) { remainingSeconds--; const d = Math.floor(remainingSeconds / 86400); const h = Math.floor(remainingSeconds % 86400 / 3600); const m = Math.floor(remainingSeconds % 3600 / 60); const s = remainingSeconds % 60; timeData.value.days = d; timeData.value.hours = h.toString().padStart(2, "0"); timeData.value.minutes = m.toString().padStart(2, "0"); timeData.value.seconds = s.toString().padStart(2, "0"); } else { clearInterval(countdownTimer); initHowPlayData(); } }, 1e3); }; const calculateBallColor = (numStr) => { const num = parseInt(numStr, 10); if (isNaN(num)) return ""; const reds = [1, 2, 7, 8, 12, 13, 18, 19, 23, 24, 29, 30, 34, 35, 40, 45, 46]; const blues = [3, 4, 9, 10, 14, 15, 20, 25, 26, 31, 36, 37, 41, 42, 47, 48]; const greens = [5, 6, 11, 16, 17, 21, 22, 27, 28, 32, 33, 38, 39, 43, 44, 49]; if (reds.includes(num)) return t2("红"); if (blues.includes(num)) return t2("蓝"); if (greens.includes(num)) return t2("绿"); return ""; }; const getBgColorClass = (colorName) => { if (colorName === t2("红")) return "bg-red"; if (colorName === t2("蓝")) return "bg-blue"; if (colorName === t2("绿")) return "bg-green"; return "bg-gray"; }; const getTextColorClass = (colorName) => { if (colorName === t2("红")) return "text-red"; if (colorName === t2("蓝")) return "text-blue"; if (colorName === t2("绿")) return "text-green"; return ""; }; vue.watch(() => WebsocketData.globalData, (data) => { const res = typeof data === "string" ? JSON.parse(data) : data; if (res && res.type === "jisu_lhc_fengpan") { isFengpan.value = true; } else if (res && res.type === "jisu_lhc_kaipan") { isFengpan.value = false; } }); gameLotteryStatus({ type: 6 }).then((res) => { if (res.data.is_kaipan == 0) { isFengpan.value = true; } else if (res.data.is_kaipan == 1) { isFengpan.value = false; } }); const __returned__ = { router: router2, t: t2, PageContainerRef, pagingRef1, safeModalRef, cartPopupVisible, showSafeModal, historyPopupVisible, safeWord, batchStakeValue, userMoney, WebsocketData, isFengpan, numberToZodiacMap, zodiacToNumberMap, currentIssue, gameList, historyLotteryList, numberList, lhcGame, activeGameIndex, activePlayIndex, selectedBets, timeData, get countdownTimer() { return countdownTimer; }, set countdownTimer(v) { countdownTimer = v; }, get remainingSeconds() { return remainingSeconds; }, set remainingSeconds(v) { remainingSeconds = v; }, currentGame, currentPlayName, currentPlayId, lastDraw, isBallStyle, totalBets, totalAmount, onQuery, fetchBalance, initHowPlayData, handleGameClick, handlePlayClick, fetchPlayInfo, toggleSelect, quickSelectWave, randomSelect, clearSelect, removeSelected, applyBatchStake, validateAmount, changeAmount, openCartPopup, handleOneClickBet, confirmSubmitBet, goToOrder, startCountdown, calculateBallColor, getBgColorClass, getTextColorClass, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, watch: vue.watch, get useI18n() { return useI18n; }, get onShow() { return onShow; }, get getHowPlay() { return getHowPlay; }, get getLHCInfo() { return getLHCInfo; }, get getPlayInfo() { return getPlayInfo; }, get submitBetCart() { return submitBetCart; }, get getBalance() { return getBalance; }, get useWebsocketDataStore() { return useWebsocketDataStore; }, get gameLotteryStatus() { return gameLotteryStatus; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_popup = __unplugin_components_2$3; const _component_u_input = __unplugin_components_3$2; const _component_u_modal = __unplugin_components_4$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode( _component_PageContainer, { ref: "PageContainerRef", navTitle: "极速六合彩" }, { default: vue.withCtx(() => [ vue.createVNode( _component_z_paging, { ref: "pagingRef1", onQuery: $setup.onQuery, fixed: false, "refresher-only": true, "refresher-enabled": true, "loading-more-enabled": false, "auto-show-back-to-top": true }, { refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("获取最新数据...")), 1 /* TEXT */ ) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "app-digital-container" }, [ vue.createElementVNode("view", { class: "calc-card lottery-dashboard" }, [ vue.createElementVNode("view", { class: "dash-top" }, [ vue.createElementVNode("view", { class: "lottery-title" }, [ vue.createElementVNode("text", { class: "issue-text" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("距")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "highlight" }, vue.toDisplayString($setup.lhcGame.next_issue), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString($setup.t("期截止")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "timer-box" }, [ !$setup.isFengpan ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ $setup.timeData.days > 0 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.days), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "colon" }, vue.toDisplayString($setup.t("天")), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.hours), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "colon" }, ":"), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.minutes), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "colon" }, ":"), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.seconds), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "fengpan-text" }, vue.toDisplayString($setup.t("封盘中")), 1 /* TEXT */ )) ]) ]), $setup.lastDraw ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "dash-bottom" }, [ vue.createElementVNode("view", { class: "result-header" }, [ vue.createElementVNode( "text", { class: "r-title" }, vue.toDisplayString($setup.t("第")) + " " + vue.toDisplayString($setup.lhcGame.issue) + " " + vue.toDisplayString($setup.t("期开奖")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "actions" }, [ vue.createElementVNode( "text", { class: "action-btn tmc", onClick: _cache[0] || (_cache[0] = ($event) => $setup.historyPopupVisible = true) }, vue.toDisplayString($setup.t("近期开奖")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "action-divider" }, "|"), vue.createElementVNode( "text", { class: "action-btn tmc", onClick: $setup.goToOrder }, vue.toDisplayString($setup.t("购彩记录")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "balls-display" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.lastDraw.lottery_codes.slice(0, 6), (ball, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ball-group", key: "norm_" + idx }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball", $setup.getBgColorClass(ball.color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(ball.code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(ball.zodiac), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("text", { class: "plus-icon" }, "+"), $setup.lastDraw.lottery_codes[6] ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "ball-group special" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball special-ball", $setup.getBgColorClass($setup.lastDraw.lottery_codes[6].color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString($setup.lastDraw.lottery_codes[6].code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString($setup.lastDraw.lottery_codes[6].zodiac), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true) ]), $setup.gameList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "play-tabs-container" }, [ vue.createElementVNode("scroll-view", { "scroll-x": "", class: "scroll-x-box", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "main-tabs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameList, (game, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["play-tab", { "is-active": $setup.activeGameIndex === index }]), key: game.id, onClick: ($event) => $setup.handleGameClick(index) }, vue.toDisplayString(game.name), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), $setup.currentGame.gameplay && $setup.currentGame.gameplay.length > 1 ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, "scroll-x": "", class: "scroll-x-box", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "sub-tabs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.currentGame.gameplay, (play, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["sub-tab", { "is-active": $setup.activePlayIndex === index }]), key: play.id, onClick: ($event) => $setup.handlePlayClick(index) }, vue.toDisplayString(play.name), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "play-grid-wrap" }, [ vue.createElementVNode("view", { class: "play-group-card" }, [ [$setup.t("特码"), $setup.t("正码"), $setup.t("正码特")].includes($setup.currentGame.name) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "calc-tabs quick-actions" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab red", { "is-disabled": $setup.isFengpan }]), onClick: _cache[1] || (_cache[1] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("红"))) }, vue.toDisplayString($setup.t("红波")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab blue", { "is-disabled": $setup.isFengpan }]), onClick: _cache[2] || (_cache[2] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("蓝"))) }, vue.toDisplayString($setup.t("蓝波")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab green", { "is-disabled": $setup.isFengpan }]), onClick: _cache[3] || (_cache[3] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("绿"))) }, vue.toDisplayString($setup.t("绿波")), 3 /* TEXT, CLASS */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["number-grid", $setup.isBallStyle ? "is-ball-grid" : "is-box-grid"]) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.numberList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["rule-btn num-item", { "is-active": item.flag, "is-disabled": $setup.isFengpan }]), key: item.id, onClick: ($event) => !$setup.isFengpan && $setup.toggleSelect(index) }, [ $setup.isBallStyle ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["ball-wrapper", $setup.getBgColorClass(item.color)]) }, [ vue.createElementVNode( "text", { class: "ball-text" }, vue.toDisplayString(item.number), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "odds-text" }, vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createElementVNode("view", { class: "box-top" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["box-name", $setup.getTextColorClass(item.color)]) }, vue.toDisplayString(item.number), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "text", { class: "box-odds" }, vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ]), item.numbers && item.numbers.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "box-bottom" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.numbers, (numObj, nIdx) => { return vue.openBlock(), vue.createElementBlock( "text", { key: nIdx, class: vue.normalizeClass(["mini-num", $setup.getTextColorClass(numObj.color)]) }, vue.toDisplayString(numObj.number), 3 /* TEXT, CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 2 /* CLASS */ ) ]) ]), vue.createElementVNode("view", { style: { "height": "80px" } }) ]), vue.createElementVNode("view", { class: "digital-bottom" }) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), !$setup.cartPopupVisible ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "sticky-header-bar", onClick: $setup.openCartPopup }, [ vue.createElementVNode("view", { class: "betting-sheet-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.totalBets), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("已选注单")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-up", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right", style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["btn-action", { "is-disabled": $setup.isFengpan }]), style: { "margin-right": "10px", "background": "#6EC149", "color": "#fff" }, onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => !$setup.isFengpan && $setup.randomSelect(), ["stop"])) }, vue.toDisplayString($setup.t("机选")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["btn-action bet-btn", { "is-disabled": $setup.isFengpan }]), style: { "background-color": "#f8b932", "color": "#fff", "border-color": "#f8b932" }, onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => !$setup.isFengpan && $setup.openCartPopup(), ["stop"])) }, vue.toDisplayString($setup.t("下注")), 3 /* TEXT, CLASS */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_popup, { modelValue: $setup.cartPopupVisible, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.cartPopupVisible = $event), mode: "bottom", "border-radius": "24", mask: true, "mask-close-able": true, "z-index": 990, "safe-area-inset-bottom": true, height: "75%" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-cart-layout" }, [ vue.createElementVNode("view", { class: "popup-fixed-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header border-bottom", onClick: _cache[6] || (_cache[6] = ($event) => $setup.cartPopupVisible = false) }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.totalBets), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("已选注单明细")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-down", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right", style: { "display": "flex", "align-items": "center" } }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "settings-btn", onClick: vue.withModifiers($setup.clearSelect, ["stop"]) }, [ vue.createElementVNode( "text", { style: { "font-size": "12px" }, class: "tmc" }, vue.toDisplayString($setup.t("清空")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "batch-stake-box" }, [ vue.createElementVNode( "text", { class: "batch-label" }, vue.toDisplayString($setup.t("批量设置金额")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "batch-input-wrapper" }, [ vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.batchStakeValue = $event), class: "batch-input", placeholder: $setup.t("请输入金额"), type: "number" }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.batchStakeValue] ]) ]), vue.createVNode(_component_u_button, { size: "mini", type: "primary", style: { "margin-left": "10px" }, onClick: $setup.applyBatchStake }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("确定")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : vue.createCommentVNode("v-if", true) ]), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, "scroll-y": "true", class: "scroll-view-container" }, [ vue.createElementVNode("view", { class: "bet-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.selectedBets, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "bet-item", key: item.id }, [ vue.createElementVNode("view", { class: "item-header" }, [ vue.createElementVNode("text", { class: "team-names" }, [ vue.createTextVNode( vue.toDisplayString(item.playName) + " - ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: vue.normalizeClass($setup.getTextColorClass(item.color)) }, vue.toDisplayString(item.number), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "close-btn", onClick: vue.withModifiers(($event) => $setup.removeSelected(item.id), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#666", size: "16" }) ], 8, ["onClick"]) ]), vue.createElementVNode("view", { class: "item-info" }, [ vue.createElementVNode("view", { class: "bet-type" }, [ vue.createElementVNode( "text", { class: "type-name" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "limit-text", style: { "margin-left": "10px", "font-size": "12px", "color": "#999" } }, vue.toDisplayString($setup.t("单注限额")) + " " + vue.toDisplayString(item.mininum !== void 0 ? item.mininum : 10) + " ~ " + vue.toDisplayString(item.maxinum !== void 0 ? item.maxinum : 1e4), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "odds-box" }, [ vue.createElementVNode( "text", { class: "odds-val" }, "@" + vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["stake-input-box", { "error-border": item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 || item.mininum !== void 0 && item.amount !== "" && item.amount !== void 0 && Number(item.amount) < (item.mininum !== void 0 ? Number(item.mininum) : 10) || item.maxinum !== void 0 && Number(item.amount) > (item.maxinum !== void 0 ? Number(item.maxinum) : 1e4) || Number(item.amount) > $setup.userMoney }]) }, [ vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeAmount(item, -10), ["stop"]) }, "-", 8, ["onClick"]), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": ($event) => item.amount = $event, type: "number", class: "stake-input", placeholder: $setup.t("输入本金"), onBlur: ($event) => $setup.validateAmount(item) }, null, 40, ["onUpdate:modelValue", "placeholder", "onBlur"]), [ [vue.vModelText, item.amount] ]), vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeAmount(item, 10), ["stop"]) }, "+", 8, ["onClick"]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "item-footer" }, [ item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "err-msg" }, vue.toDisplayString($setup.t("金额不能小于等于0")), 1 /* TEXT */ )) : item.amount !== "" && item.amount !== void 0 && Number(item.amount) < (item.mininum !== void 0 ? Number(item.mininum) : 10) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "err-msg" }, vue.toDisplayString($setup.t("单注最低限制为")) + " " + vue.toDisplayString(item.mininum !== void 0 ? item.mininum : 10), 1 /* TEXT */ )) : Number(item.amount) > (item.maxinum !== void 0 ? Number(item.maxinum) : 1e4) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "err-msg" }, vue.toDisplayString($setup.t("单注最高限制为")) + " " + vue.toDisplayString(item.maxinum !== void 0 ? item.maxinum : 1e4), 1 /* TEXT */ )) : Number(item.amount) > $setup.userMoney ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "err-msg" }, vue.toDisplayString($setup.t("余额不足")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "potential-win" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("潜在赢利")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "win-amount" }, vue.toDisplayString((Number(item.amount) * Number(item.odds)).toFixed(2)), 1 /* TEXT */ ) ])) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { style: { "height": "100px" } }) ])) : vue.createCommentVNode("v-if", true), $setup.totalBets === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty-sheet" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("暂无投注项")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "sheet-action-bar popup-fixed-footer digital-cart-bottom" }, [ vue.createElementVNode("view", { class: "total-odds-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("总投注金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString($setup.totalAmount.toFixed(2)), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_button, { type: "primary", onClick: $setup.handleOneClickBet, disabled: $setup.isFengpan }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("立即投注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["disabled"]) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_u_modal, { ref: "safeModalRef", modelValue: $setup.showSafeModal, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.showSafeModal = $event), "async-close": true, title: $setup.t("安全验证"), "show-cancel-button": true, "confirm-text": $setup.t("确定投注"), "cancel-text": $setup.t("取消"), "confirm-color": "#f8b932", onConfirm: $setup.confirmSubmitBet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "safe-modal-content" }, [ vue.createElementVNode( "text", { class: "safe-tips" }, vue.toDisplayString($setup.t("为保障您的资金安全,请输入资金密码")), 1 /* TEXT */ ), vue.createVNode(_component_u_input, { modelValue: $setup.safeWord, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.safeWord = $event), type: "password", placeholder: $setup.t("请输入资金密码"), border: true, "border-color": "#e4e7ed", clearable: true, "input-align": "center" }, null, 8, ["modelValue", "placeholder"]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "title", "confirm-text", "cancel-text"]), vue.createVNode(_component_u_popup, { modelValue: $setup.historyPopupVisible, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $setup.historyPopupVisible = $event), mode: "center", "border-radius": "20", mask: true, "z-index": 990, width: "90%" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-wrapper history-popup" }, [ vue.createElementVNode( "view", { class: "p-title" }, vue.toDisplayString($setup.t("近期开奖记录")), 1 /* TEXT */ ), vue.createElementVNode("scroll-view", { "scroll-y": "true", class: "history-scroll-container" }, [ vue.createElementVNode("view", { class: "history-list-content" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.historyLotteryList, (item, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "history-item", key: idx }, [ vue.createElementVNode("view", { class: "h-top" }, [ vue.createElementVNode( "text", { class: "h-issue" }, vue.toDisplayString(item.issue) + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "h-time" }, vue.toDisplayString(item.open_time), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "balls-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.lottery_codes.slice(0, 6), (b, i) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ball-group", key: i }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball", $setup.getBgColorClass(b.color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(b.code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(b.zodiac), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("text", { class: "plus" }, "+"), vue.createElementVNode("view", { class: "ball-group" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball special-ball", $setup.getBgColorClass(item.lottery_codes[6].color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(item.lottery_codes[6].code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(item.lottery_codes[6].zodiac), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode( "view", { class: "close-btn-bottom", onClick: _cache[11] || (_cache[11] = ($event) => $setup.historyPopupVisible = false) }, vue.toDisplayString($setup.t("关闭")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]), _: 1 /* STABLE */ }); } const PagesTabbarEntertainmentViewSpeedDigitalIndex = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-7ae0ed69"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/view/SpeedDigital/index.vue"]]); const _sfc_main$6 = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const router2 = useRouter(); const { t: t2 } = useI18n(); const PageContainerRef = vue.ref(); const pagingRef1 = vue.ref(null); const safeModalRef = vue.ref(null); const cartPopupVisible = vue.ref(false); const showSafeModal = vue.ref(false); const historyPopupVisible = vue.ref(false); const safeWord = vue.ref(""); const batchStakeValue = vue.ref(uni.getStorageSync("hklhcBatchStakeCache") || ""); const userMoney = vue.ref(0); const WebsocketData = useWebsocketDataStore(); const isFengpan = vue.ref(false); const numberToZodiacMap = vue.ref({}); const zodiacToNumberMap = vue.ref({}); const currentIssue = vue.ref(""); const gameList = vue.ref([]); const historyLotteryList = vue.ref([]); const numberList = vue.ref([]); const lhcGame = vue.ref({}); const activeGameIndex = vue.ref(0); const activePlayIndex = vue.ref(0); const selectedBets = vue.ref(uni.getStorageSync("lhc_selected_bets_hk") || []); vue.watch(selectedBets, (newVal) => { uni.setStorageSync("lhc_selected_bets_hk", newVal); }, { deep: true }); const timeData = vue.ref({ days: 0, hours: "00", minutes: "00", seconds: "00" }); let countdownTimer = null; let remainingSeconds = 0; const currentGame = vue.computed(() => gameList.value[activeGameIndex.value] || {}); const currentPlayName = vue.computed(() => { var _a2, _b2; return ((_b2 = (_a2 = currentGame.value.gameplay) == null ? void 0 : _a2[activePlayIndex.value]) == null ? void 0 : _b2.name) || ""; }); const currentPlayId = vue.computed(() => { var _a2, _b2; return ((_b2 = (_a2 = currentGame.value.gameplay) == null ? void 0 : _a2[activePlayIndex.value]) == null ? void 0 : _b2.id) || ""; }); const lastDraw = vue.computed(() => historyLotteryList.value[0] || null); const isBallStyle = vue.computed(() => { const ballGames = [t2("特码"), t2("正码"), t2("正码特"), t2("正码1-6")]; return ballGames.includes(currentGame.value.name); }); const totalBets = vue.computed(() => selectedBets.value.length); const totalAmount = vue.computed(() => { return selectedBets.value.reduce((sum, item) => sum + (Number(item.amount) || 0), 0); }); const onQuery = async () => { var _a2; await initHowPlayData(); await fetchBalance(); (_a2 = pagingRef1.value) == null ? void 0 : _a2.complete([]); }; const fetchBalance = async () => { formatAppLog("log", "at pages/Tabbar/Entertainment/view/HKDigital/index.vue:367", uni.getStorageSync("token"), 367); if (uni.getStorageSync("token")) { try { const res = await getBalance(); if (res.code === 1 && res.data) { userMoney.value = Number(res.data.money) || 0; } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/HKDigital/index.vue:376", "获取余额失败", error); } } else { userMoney.value = 0; } }; const initHowPlayData = async () => { var _a2; try { const [infoRes, playRes] = await Promise.all([ getLHCInfo(), getHowPlay({ type: 2 }) ]); if (infoRes.code === 1 && infoRes.data) { numberToZodiacMap.value = infoRes.data.number_to_zodiac || {}; zodiacToNumberMap.value = infoRes.data.zodiac_to_number || {}; } if (playRes.code === 1 && playRes.data) { lhcGame.value = playRes.data; currentIssue.value = playRes.data.issue; gameList.value = playRes.data.games || []; if (playRes.data.history_lottery) { historyLotteryList.value = playRes.data.history_lottery.map((item) => ({ ...item, lottery_codes: item.lottery_codes.map((codeStr) => ({ code: codeStr, color: calculateBallColor(codeStr), zodiac: numberToZodiacMap.value[codeStr] || "" })) })); } if (((_a2 = playRes.data) == null ? void 0 : _a2.countdown) != 0) { startCountdown(Number(playRes.data.countdown || 0)); } await fetchPlayInfo(); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/HKDigital/index.vue:418", "获取数据失败", error); } }; vue.onMounted(() => { initHowPlayData(); fetchBalance(); }); onShow(() => { batchStakeValue.value = uni.getStorageSync("hklhcBatchStakeCache") || ""; fetchBalance(); }); vue.onUnmounted(() => { clearInterval(countdownTimer); }); const handleGameClick = (index) => { if (activeGameIndex.value === index) return; activeGameIndex.value = index; activePlayIndex.value = 0; fetchPlayInfo(); }; const handlePlayClick = (index) => { if (activePlayIndex.value === index) return; activePlayIndex.value = index; fetchPlayInfo(); }; const fetchPlayInfo = async () => { if (!currentPlayId.value) return; numberList.value = []; try { const res = await getPlayInfo({ id: currentPlayId.value }); if (res.code === 1 && res.data) { numberList.value = res.data.map((item) => { let color2 = ""; if (isBallStyle.value || !isNaN(item.number)) { color2 = calculateBallColor(item.number); } else { if (item.number.includes(t2("红"))) color2 = t2("红"); else if (item.number.includes(t2("蓝"))) color2 = t2("蓝"); else if (item.number.includes(t2("绿"))) color2 = t2("绿"); } let tinyNums = []; if (zodiacToNumberMap.value[item.number]) { tinyNums = zodiacToNumberMap.value[item.number].map((nStr) => ({ number: nStr, color: calculateBallColor(nStr) })); } const isSelected = selectedBets.value.some((b) => b.id === item.id); return { id: item.id, number: item.number, odds: item.odds, color: color2, flag: isSelected, numbers: tinyNums, mininum: item.mininum, maxinum: item.maxinum }; }); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/HKDigital/index.vue:493", "获取玩法失败", error); } finally { uni.hideLoading(); } }; const toggleSelect = (index) => { if (isFengpan.value) return; const item = numberList.value[index]; item.flag = !item.flag; if (item.flag) { const amountToSet = batchStakeValue.value !== "" ? Number(batchStakeValue.value) : item.mininum !== void 0 ? item.mininum : 10; selectedBets.value.push({ id: item.id, gameName: currentGame.value.name, playName: currentPlayName.value, number: item.number, odds: item.odds, color: item.color, mininum: item.mininum, maxinum: item.maxinum, amount: amountToSet }); } else { selectedBets.value = selectedBets.value.filter((b) => b.id !== item.id); } }; const quickSelectWave = (colorStr) => { if (isFengpan.value) return; numberList.value.forEach((item, index) => { const shouldSelect = item.color === colorStr; if (item.flag !== shouldSelect) { toggleSelect(index); } }); }; const randomSelect = () => { if (isFengpan.value) return; const unselectedIndices = []; numberList.value.forEach((item, index) => { if (!item.flag) { unselectedIndices.push(index); } }); if (unselectedIndices.length > 0) { const randomPos = Math.floor(Math.random() * unselectedIndices.length); const targetIndex = unselectedIndices[randomPos]; toggleSelect(targetIndex); } else { uni.showToast({ title: t2("所有选项已全选"), icon: "none" }); } }; const clearSelect = () => { numberList.value.forEach((item) => item.flag = false); selectedBets.value = []; cartPopupVisible.value = false; }; const removeSelected = (id) => { selectedBets.value = selectedBets.value.filter((b) => b.id !== id); const visibleItem = numberList.value.find((n) => n.id === id); if (visibleItem) { visibleItem.flag = false; } if (selectedBets.value.length === 0) { cartPopupVisible.value = false; } }; const applyBatchStake = () => { let val = batchStakeValue.value; uni.setStorageSync("hklhcBatchStakeCache", val); if (val === "") { selectedBets.value.forEach((item) => { item.amount = ""; }); return; } let numVal = Number(val); if (isNaN(numVal) || numVal <= 0) { return uni.showToast({ title: t2("请输入大于0的有效金额"), icon: "none" }); } selectedBets.value.forEach((item) => { let itemVal = numVal; const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (itemVal < min) { itemVal = min; } if (itemVal > max) { itemVal = max; } if (itemVal > userMoney.value) { itemVal = userMoney.value; uni.showToast({ title: t2("余额不足"), icon: "none" }); } item.amount = itemVal; }); }; const validateAmount = (item) => { const val = Number(item.amount); const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (isNaN(val) || val <= 0) { item.amount = ""; } else if (val < min) { uni.showToast({ title: t2("单注最低") + ` ${min}`, icon: "none" }); item.amount = min; } else if (val > max) { uni.showToast({ title: t2("单注最高") + ` ${max}`, icon: "none" }); item.amount = max; } else if (val > userMoney.value) { uni.showToast({ title: t2("余额不足"), icon: "none" }); item.amount = userMoney.value; } }; const changeAmount = (item, delta) => { let val = Number(item.amount) || 0; val += delta; const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; if (val < 0) { val = 0; item.amount = ""; return; } if (val > 0 && val < min) { val = min; uni.showToast({ title: t2("单注最低") + ` ${min}`, icon: "none" }); } else if (val > max) { val = max; uni.showToast({ title: t2("单注最高") + ` ${max}`, icon: "none" }); } else if (val > userMoney.value) { val = userMoney.value; uni.showToast({ title: t2("余额不足"), icon: "none" }); } item.amount = val || ""; }; const openCartPopup = () => { if (totalBets.value === 0) return uni.showToast({ title: t2("请先选择投注项"), icon: "none" }); cartPopupVisible.value = true; }; const handleOneClickBet = () => { if (!uni.getStorageSync("token")) { uni.showToast({ title: t2("请先登录"), icon: "none" }); return; } if (isFengpan.value) return; if (totalBets.value === 0) { return uni.showToast({ title: t2("请先选择投注项"), icon: "none" }); } if (totalAmount.value > userMoney.value) { return uni.showToast({ title: t2("总投注金额超过可用余额"), icon: "none" }); } const invalidItems = selectedBets.value.filter((item) => { const val = Number(item.amount); const min = item.mininum !== void 0 ? item.mininum : 10; const max = item.maxinum !== void 0 ? item.maxinum : 1e4; return !val || val <= 0 || val < min || val > max || val > userMoney.value; }); if (invalidItems.length > 0) { if (!cartPopupVisible.value) { cartPopupVisible.value = true; } return uni.showToast({ title: t2("请检查下注金额、限额及余额"), icon: "none" }); } safeWord.value = ""; cartPopupVisible.value = false; setTimeout(() => { confirmSubmitBet(); }, 300); }; const confirmSubmitBet = async () => { uni.showModal({ title: t2("提示"), content: t2("确认提交吗?"), success: async (res) => { var _a2, _b2, _c; if (res.confirm) { const payloadData = selectedBets.value.map((item) => ({ id: item.id, amount: Number(item.amount) })); try { const res2 = await submitBetCart({ data: payloadData, safe_word: safeWord.value, type: 2 }); if (res2.code === 1) { showSafeModal.value = false; clearSelect(); fetchBalance(); (_a2 = PageContainerRef.value) == null ? void 0 : _a2.getData(); } else { (_b2 = safeModalRef.value) == null ? void 0 : _b2.clearLoading(); } } catch (error) { (_c = safeModalRef.value) == null ? void 0 : _c.clearLoading(); } } } }); }; const goToOrder = () => { router2.push({ name: "AllHistory", query: { tab: 2 } }); }; const startCountdown = (seconds) => { remainingSeconds = seconds; clearInterval(countdownTimer); countdownTimer = setInterval(() => { if (remainingSeconds > 0) { remainingSeconds--; const d = Math.floor(remainingSeconds / 86400); const h = Math.floor(remainingSeconds % 86400 / 3600); const m = Math.floor(remainingSeconds % 3600 / 60); const s = remainingSeconds % 60; timeData.value.days = d; timeData.value.hours = h.toString().padStart(2, "0"); timeData.value.minutes = m.toString().padStart(2, "0"); timeData.value.seconds = s.toString().padStart(2, "0"); } else { clearInterval(countdownTimer); initHowPlayData(); } }, 1e3); }; const calculateBallColor = (numStr) => { const num = parseInt(numStr, 10); if (isNaN(num)) return ""; const reds = [1, 2, 7, 8, 12, 13, 18, 19, 23, 24, 29, 30, 34, 35, 40, 45, 46]; const blues = [3, 4, 9, 10, 14, 15, 20, 25, 26, 31, 36, 37, 41, 42, 47, 48]; const greens = [5, 6, 11, 16, 17, 21, 22, 27, 28, 32, 33, 38, 39, 43, 44, 49]; if (reds.includes(num)) return t2("红"); if (blues.includes(num)) return t2("蓝"); if (greens.includes(num)) return t2("绿"); return ""; }; const getBgColorClass = (colorName) => { if (colorName === t2("红")) return "bg-red"; if (colorName === t2("蓝")) return "bg-blue"; if (colorName === t2("绿")) return "bg-green"; return "bg-gray"; }; const getTextColorClass = (colorName) => { if (colorName === t2("红")) return "text-red"; if (colorName === t2("蓝")) return "text-blue"; if (colorName === t2("绿")) return "text-green"; return ""; }; vue.watch(() => WebsocketData.globalData, (data) => { const res = typeof data === "string" ? JSON.parse(data) : data; if (res && res.type === "hk_lhc_fengpan") { isFengpan.value = true; } else if (res && res.type === "hk_lhc_kaipan") { isFengpan.value = false; } }); gameLotteryStatus({ type: 4 }).then((res) => { if (res.data.is_kaipan == 0) { isFengpan.value = true; } else if (res.data.is_kaipan == 1) { isFengpan.value = false; } }); const __returned__ = { router: router2, t: t2, PageContainerRef, pagingRef1, safeModalRef, cartPopupVisible, showSafeModal, historyPopupVisible, safeWord, batchStakeValue, userMoney, WebsocketData, isFengpan, numberToZodiacMap, zodiacToNumberMap, currentIssue, gameList, historyLotteryList, numberList, lhcGame, activeGameIndex, activePlayIndex, selectedBets, timeData, get countdownTimer() { return countdownTimer; }, set countdownTimer(v) { countdownTimer = v; }, get remainingSeconds() { return remainingSeconds; }, set remainingSeconds(v) { remainingSeconds = v; }, currentGame, currentPlayName, currentPlayId, lastDraw, isBallStyle, totalBets, totalAmount, onQuery, fetchBalance, initHowPlayData, handleGameClick, handlePlayClick, fetchPlayInfo, toggleSelect, quickSelectWave, randomSelect, clearSelect, removeSelected, applyBatchStake, validateAmount, changeAmount, openCartPopup, handleOneClickBet, confirmSubmitBet, goToOrder, startCountdown, calculateBallColor, getBgColorClass, getTextColorClass, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, watch: vue.watch, get useI18n() { return useI18n; }, get onShow() { return onShow; }, get getHowPlay() { return getHowPlay; }, get getLHCInfo() { return getLHCInfo; }, get getPlayInfo() { return getPlayInfo; }, get submitBetCart() { return submitBetCart; }, get getBalance() { return getBalance; }, get useWebsocketDataStore() { return useWebsocketDataStore; }, get gameLotteryStatus() { return gameLotteryStatus; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_popup = __unplugin_components_2$3; const _component_u_input = __unplugin_components_3$2; const _component_u_modal = __unplugin_components_4$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode( _component_PageContainer, { ref: "PageContainerRef", navTitle: "香港六合彩" }, { default: vue.withCtx(() => [ vue.createVNode( _component_z_paging, { ref: "pagingRef1", onQuery: $setup.onQuery, fixed: false, "refresher-only": true, "refresher-enabled": true, "loading-more-enabled": false, "auto-show-back-to-top": true }, { refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("获取最新数据...")), 1 /* TEXT */ ) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "app-digital-container" }, [ vue.createElementVNode("view", { class: "calc-card lottery-dashboard" }, [ vue.createElementVNode("view", { class: "dash-top" }, [ vue.createElementVNode("view", { class: "lottery-title" }, [ vue.createElementVNode("text", { class: "issue-text" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("距")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "highlight" }, vue.toDisplayString($setup.lhcGame.next_issue), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString($setup.t("期截止")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "timer-box" }, [ !$setup.isFengpan ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ $setup.timeData.days > 0 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.days), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "colon" }, vue.toDisplayString($setup.t("天")), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.hours), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "colon" }, ":"), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.minutes), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "colon" }, ":"), vue.createElementVNode( "view", { class: "digit" }, vue.toDisplayString($setup.timeData.seconds), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "fengpan-text" }, vue.toDisplayString($setup.t("封盘中")), 1 /* TEXT */ )) ]) ]), $setup.lastDraw ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "dash-bottom" }, [ vue.createElementVNode("view", { class: "result-header" }, [ vue.createElementVNode( "text", { class: "r-title" }, vue.toDisplayString($setup.t("第")) + " " + vue.toDisplayString($setup.lhcGame.issue) + " " + vue.toDisplayString($setup.t("期开奖")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "actions" }, [ vue.createElementVNode( "text", { class: "action-btn tmc", onClick: _cache[0] || (_cache[0] = ($event) => $setup.historyPopupVisible = true) }, vue.toDisplayString($setup.t("近期开奖")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "action-divider" }, "|"), vue.createElementVNode( "text", { class: "action-btn tmc", onClick: $setup.goToOrder }, vue.toDisplayString($setup.t("购彩记录")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "balls-display" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.lastDraw.lottery_codes.slice(0, 6), (ball, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ball-group", key: "norm_" + idx }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball", $setup.getBgColorClass(ball.color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(ball.code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(ball.zodiac), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("text", { class: "plus-icon" }, "+"), $setup.lastDraw.lottery_codes[6] ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "ball-group special" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball special-ball", $setup.getBgColorClass($setup.lastDraw.lottery_codes[6].color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString($setup.lastDraw.lottery_codes[6].code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString($setup.lastDraw.lottery_codes[6].zodiac), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true) ]), $setup.gameList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "play-tabs-container" }, [ vue.createElementVNode("scroll-view", { "scroll-x": "", class: "scroll-x-box", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "main-tabs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameList, (game, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["play-tab", { "is-active": $setup.activeGameIndex === index }]), key: game.id, onClick: ($event) => $setup.handleGameClick(index) }, vue.toDisplayString(game.name), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), $setup.currentGame.gameplay && $setup.currentGame.gameplay.length > 1 ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, "scroll-x": "", class: "scroll-x-box", "show-scrollbar": false }, [ vue.createElementVNode("view", { class: "sub-tabs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.currentGame.gameplay, (play, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["sub-tab", { "is-active": $setup.activePlayIndex === index }]), key: play.id, onClick: ($event) => $setup.handlePlayClick(index) }, vue.toDisplayString(play.name), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "play-grid-wrap" }, [ vue.createElementVNode("view", { class: "play-group-card" }, [ [$setup.t("特码"), $setup.t("正码"), $setup.t("正码特")].includes($setup.currentGame.name) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "calc-tabs quick-actions" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab red", { "is-disabled": $setup.isFengpan }]), onClick: _cache[1] || (_cache[1] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("红"))) }, vue.toDisplayString($setup.t("红波")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab blue", { "is-disabled": $setup.isFengpan }]), onClick: _cache[2] || (_cache[2] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("蓝"))) }, vue.toDisplayString($setup.t("蓝波")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["c-tab green", { "is-disabled": $setup.isFengpan }]), onClick: _cache[3] || (_cache[3] = ($event) => !$setup.isFengpan && $setup.quickSelectWave($setup.t("绿"))) }, vue.toDisplayString($setup.t("绿波")), 3 /* TEXT, CLASS */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["number-grid", $setup.isBallStyle ? "is-ball-grid" : "is-box-grid"]) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.numberList, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["rule-btn num-item", { "is-active": item.flag, "is-disabled": $setup.isFengpan }]), key: item.id, onClick: ($event) => !$setup.isFengpan && $setup.toggleSelect(index) }, [ $setup.isBallStyle ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["ball-wrapper", $setup.getBgColorClass(item.color)]) }, [ vue.createElementVNode( "text", { class: "ball-text" }, vue.toDisplayString(item.number), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "odds-text" }, vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createElementVNode("view", { class: "box-top" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["box-name", $setup.getTextColorClass(item.color)]) }, vue.toDisplayString(item.number), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "text", { class: "box-odds" }, vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ]), item.numbers && item.numbers.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "box-bottom" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.numbers, (numObj, nIdx) => { return vue.openBlock(), vue.createElementBlock( "text", { key: nIdx, class: vue.normalizeClass(["mini-num", $setup.getTextColorClass(numObj.color)]) }, vue.toDisplayString(numObj.number), 3 /* TEXT, CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 2 /* CLASS */ ) ]) ]), vue.createElementVNode("view", { style: { "height": "80px" } }) ]), vue.createElementVNode("view", { class: "hkdigital-bottom" }) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), !$setup.cartPopupVisible ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "sticky-header-bar", onClick: $setup.openCartPopup }, [ vue.createElementVNode("view", { class: "betting-sheet-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.totalBets), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("已选注单")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-up", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right", style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["btn-action", { "is-disabled": $setup.isFengpan }]), style: { "margin-right": "10px", "background": "#6EC149", "color": "#fff" }, onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => !$setup.isFengpan && $setup.randomSelect(), ["stop"])) }, vue.toDisplayString($setup.t("机选")), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["btn-action bet-btn", { "is-disabled": $setup.isFengpan }]), style: { "background-color": "#f8b932", "color": "#fff", "border-color": "#f8b932" }, onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => !$setup.isFengpan && $setup.openCartPopup(), ["stop"])) }, vue.toDisplayString($setup.t("下注")), 3 /* TEXT, CLASS */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_popup, { modelValue: $setup.cartPopupVisible, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.cartPopupVisible = $event), mode: "bottom", "border-radius": "24", mask: true, "mask-close-able": true, "z-index": 990, "safe-area-inset-bottom": true, height: "75%" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-cart-layout" }, [ vue.createElementVNode("view", { class: "popup-fixed-header" }, [ vue.createElementVNode("view", { class: "betting-sheet-header border-bottom", onClick: _cache[6] || (_cache[6] = ($event) => $setup.cartPopupVisible = false) }, [ vue.createElementVNode("view", { class: "betting-sheet-header-left" }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "sheet-badge" }, vue.toDisplayString($setup.totalBets), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "header-text" }, vue.toDisplayString($setup.t("已选注单明细")), 1 /* TEXT */ ), vue.createVNode(_component_u_icon, { name: "arrow-down", color: "#666" }) ]), vue.createElementVNode("view", { class: "betting-sheet-header-right", style: { "display": "flex", "align-items": "center" } }, [ $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "settings-btn", onClick: vue.withModifiers($setup.clearSelect, ["stop"]) }, [ vue.createElementVNode( "text", { style: { "font-size": "12px" }, class: "tmc" }, vue.toDisplayString($setup.t("清空")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "batch-stake-box" }, [ vue.createElementVNode( "text", { class: "batch-label" }, vue.toDisplayString($setup.t("批量设置金额")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "batch-input-wrapper" }, [ vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.batchStakeValue = $event), class: "batch-input", placeholder: $setup.t("请输入金额"), type: "number" }, null, 8, ["placeholder"]), [ [vue.vModelText, $setup.batchStakeValue] ]) ]), vue.createVNode(_component_u_button, { size: "mini", type: "primary", style: { "margin-left": "10px" }, onClick: $setup.applyBatchStake }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("确定")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ])) : vue.createCommentVNode("v-if", true) ]), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, "scroll-y": "true", class: "scroll-view-container" }, [ vue.createElementVNode("view", { class: "bet-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.selectedBets, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "bet-item", key: item.id }, [ vue.createElementVNode("view", { class: "item-header" }, [ vue.createElementVNode("text", { class: "team-names" }, [ vue.createTextVNode( vue.toDisplayString(item.playName) + " - ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: vue.normalizeClass($setup.getTextColorClass(item.color)) }, vue.toDisplayString(item.number), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "close-btn", onClick: vue.withModifiers(($event) => $setup.removeSelected(item.id), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#666", size: "16" }) ], 8, ["onClick"]) ]), vue.createElementVNode("view", { class: "item-info" }, [ vue.createElementVNode("view", { class: "bet-type" }, [ vue.createElementVNode( "text", { class: "type-name" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "limit-text", style: { "margin-left": "10px", "font-size": "12px", "color": "#999" } }, vue.toDisplayString($setup.t("单注限额")) + " " + vue.toDisplayString(item.mininum !== void 0 ? item.mininum : 10) + " ~ " + vue.toDisplayString(item.maxinum !== void 0 ? item.maxinum : 1e4), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "odds-box" }, [ vue.createElementVNode( "text", { class: "odds-val" }, "@" + vue.toDisplayString($setup.isFengpan ? "--" : item.odds), 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["stake-input-box", { "error-border": item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 || item.mininum !== void 0 && item.amount !== "" && item.amount !== void 0 && Number(item.amount) < (item.mininum !== void 0 ? Number(item.mininum) : 10) || item.maxinum !== void 0 && Number(item.amount) > (item.maxinum !== void 0 ? Number(item.maxinum) : 1e4) || Number(item.amount) > $setup.userMoney }]) }, [ vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeAmount(item, -10), ["stop"]) }, "-", 8, ["onClick"]), vue.withDirectives(vue.createElementVNode("input", { "onUpdate:modelValue": ($event) => item.amount = $event, type: "number", class: "stake-input", placeholder: $setup.t("输入本金"), onBlur: ($event) => $setup.validateAmount(item) }, null, 40, ["onUpdate:modelValue", "placeholder", "onBlur"]), [ [vue.vModelText, item.amount] ]), vue.createElementVNode("view", { class: "stepper-btn", onClick: vue.withModifiers(($event) => $setup.changeAmount(item, 10), ["stop"]) }, "+", 8, ["onClick"]) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "item-footer" }, [ item.amount !== "" && item.amount !== void 0 && Number(item.amount) <= 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "err-msg" }, vue.toDisplayString($setup.t("金额不能小于等于0")), 1 /* TEXT */ )) : item.amount !== "" && item.amount !== void 0 && Number(item.amount) < (item.mininum !== void 0 ? Number(item.mininum) : 10) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "err-msg" }, vue.toDisplayString($setup.t("单注最低限制为")) + " " + vue.toDisplayString(item.mininum !== void 0 ? item.mininum : 10), 1 /* TEXT */ )) : Number(item.amount) > (item.maxinum !== void 0 ? Number(item.maxinum) : 1e4) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "err-msg" }, vue.toDisplayString($setup.t("单注最高限制为")) + " " + vue.toDisplayString(item.maxinum !== void 0 ? item.maxinum : 1e4), 1 /* TEXT */ )) : Number(item.amount) > $setup.userMoney ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "err-msg" }, vue.toDisplayString($setup.t("余额不足")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "potential-win" }, [ vue.createTextVNode( vue.toDisplayString($setup.t("潜在赢利")) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "win-amount" }, vue.toDisplayString((Number(item.amount) * Number(item.odds)).toFixed(2)), 1 /* TEXT */ ) ])) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { style: { "height": "100px" } }) ])) : vue.createCommentVNode("v-if", true), $setup.totalBets === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty-sheet" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("暂无投注项")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $setup.totalBets > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "sheet-action-bar popup-fixed-footer digital-cart-bottom" }, [ vue.createElementVNode("view", { class: "total-odds-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("总投注金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString($setup.totalAmount.toFixed(2)), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_button, { type: "primary", onClick: $setup.handleOneClickBet, disabled: $setup.isFengpan }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("立即投注")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["disabled"]) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_u_modal, { ref: "safeModalRef", modelValue: $setup.showSafeModal, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.showSafeModal = $event), "async-close": true, title: $setup.t("安全验证"), "show-cancel-button": true, "confirm-text": $setup.t("确定投注"), "cancel-text": $setup.t("取消"), "confirm-color": "#f8b932", onConfirm: $setup.confirmSubmitBet }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "safe-modal-content" }, [ vue.createElementVNode( "text", { class: "safe-tips" }, vue.toDisplayString($setup.t("为保障您的资金安全,请输入资金密码")), 1 /* TEXT */ ), vue.createVNode(_component_u_input, { modelValue: $setup.safeWord, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.safeWord = $event), type: "password", placeholder: $setup.t("请输入资金密码"), border: true, "border-color": "#e4e7ed", clearable: true, "input-align": "center" }, null, 8, ["modelValue", "placeholder"]) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "title", "confirm-text", "cancel-text"]), vue.createVNode(_component_u_popup, { modelValue: $setup.historyPopupVisible, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $setup.historyPopupVisible = $event), mode: "center", "border-radius": "20", mask: true, "z-index": 990, width: "90%" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-wrapper history-popup" }, [ vue.createElementVNode( "view", { class: "p-title" }, vue.toDisplayString($setup.t("近期开奖记录")), 1 /* TEXT */ ), vue.createElementVNode("scroll-view", { "scroll-y": "true", class: "history-scroll-container" }, [ vue.createElementVNode("view", { class: "history-list-content" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.historyLotteryList, (item, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "history-item", key: idx }, [ vue.createElementVNode("view", { class: "h-top" }, [ vue.createElementVNode( "text", { class: "h-issue" }, vue.toDisplayString(item.issue) + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "h-time" }, vue.toDisplayString(item.open_time), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "balls-grid" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.lottery_codes.slice(0, 6), (b, i) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ball-group", key: i }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball", $setup.getBgColorClass(b.color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(b.code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(b.zodiac), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("text", { class: "plus" }, "+"), vue.createElementVNode("view", { class: "ball-group" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["l-ball special-ball", $setup.getBgColorClass(item.lottery_codes[6].color)]) }, [ vue.createElementVNode( "view", { class: "ball-inner" }, vue.toDisplayString(item.lottery_codes[6].code), 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode( "text", { class: "l-zodiac" }, vue.toDisplayString(item.lottery_codes[6].zodiac), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode( "view", { class: "close-btn-bottom", onClick: _cache[11] || (_cache[11] = ($event) => $setup.historyPopupVisible = false) }, vue.toDisplayString($setup.t("关闭")), 1 /* TEXT */ ) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ) ]), _: 1 /* STABLE */ }); } const PagesTabbarEntertainmentViewHKDigitalIndex = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-7b9c5ce0"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/view/HKDigital/index.vue"]]); const _sfc_main$5 = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const pagingRef = vue.ref(null); const historyList = vue.ref([]); const currentTab = vue.ref(0); const calendarShow = vue.ref(false); const dateRange = vue.ref(""); const startTime = vue.ref(""); const endTime = vue.ref(""); onLoad((options) => { if (options.type === "newPc") { currentTab.value = 1; } else { currentTab.value = 0; } }); const getApiBasePath = () => { return currentTab.value === 0 ? "issue" : "newPc"; }; const isDrawn = (item) => { return item.winning_array && item.winning_array.length >= 4 || item.openCode1 !== void 0 && item.openCode1 !== null; }; const switchTab = (index) => { var _a2; if (currentTab.value === index) return; currentTab.value = index; (_a2 = pagingRef.value) == null ? void 0 : _a2.reload(); }; const getHistoryData = (params) => { return new Promise((resolve2, reject) => { uni.request({ // url: `https://api.f1bet.bet/api/${getApiBasePath()}`, url: `${apiUrl}${getApiBasePath()}`, method: "GET", data: params, success: (res) => resolve2(res.data), fail: (err) => reject(err), header: { lang: locale.value } }); }); }; const onQuery = async (pageNo, pageSize) => { try { const params = { page: pageNo, limit: 50 }; if (startTime.value) params.start_time = startTime.value; if (endTime.value) params.end_time = endTime.value; const res = await getHistoryData(params); if (res.code === 0 && res.data && res.data.data) { pagingRef.value.complete(res.data.data); } else { pagingRef.value.complete(false); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/history/index.vue:239", error); pagingRef.value.complete(false); } }; function onCalendarChange(e) { if (e.startDate && e.endDate) { startTime.value = e.startDate; endTime.value = e.endDate; dateRange.value = `${e.startDate} ~ ${e.endDate}`; handleQuery2(); } } function handleQuery2() { pagingRef.value.reload(); } function handleReset() { dateRange.value = ""; startTime.value = ""; endTime.value = ""; pagingRef.value.reload(); } const getTagColor = (text) => { if (["大", "双", "极大"].includes(text)) return "tag-red"; if (["小", "单", "极小"].includes(text)) return "tag-green"; return "tag-blue"; }; const __returned__ = { t: t2, locale, pagingRef, historyList, currentTab, calendarShow, dateRange, startTime, endTime, getApiBasePath, isDrawn, switchTab, getHistoryData, onQuery, onCalendarChange, handleQuery: handleQuery2, handleReset, getTagColor, ref: vue.ref, get onLoad() { return onLoad; }, get useI18n() { return useI18n; }, get apiUrl() { return apiUrl; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_empty = __unplugin_components_4$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_calendar = __unplugin_components_6; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("往期历史") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-content" }, [ vue.createVNode(_component_z_paging, { ref: "pagingRef", modelValue: $setup.historyList, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.historyList = $event), onQuery: $setup.onQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300 }, vue.createSlots({ refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("获取最新数据...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无历史记录"), mode: "list", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "history-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.historyList, (item) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: item.id }, [ $setup.isDrawn(item) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "history-item" }, [ vue.createElementVNode("view", { class: "h-header" }, [ vue.createElementVNode( "text", { class: "h-issue" }, vue.toDisplayString(item.issue_no || item.section) + " " + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "h-time" }, vue.toDisplayString(item.day), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "h-body" }, [ item.winning_array && item.winning_array.length >= 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "h-equation" }, [ vue.createElementVNode( "view", { class: "h-num" }, vue.toDisplayString(item.winning_array[0]), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "h-op" }, "+"), vue.createElementVNode( "view", { class: "h-num" }, vue.toDisplayString(item.winning_array[1]), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "h-op" }, "+"), vue.createElementVNode( "view", { class: "h-num" }, vue.toDisplayString(item.winning_array[2]), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "h-op" }, "="), vue.createElementVNode( "view", { class: "h-num res" }, vue.toDisplayString(item.winning_array[3]), 1 /* TEXT */ ) ])) : item.openCode1 !== void 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "h-equation" }, [ vue.createElementVNode( "view", { class: "h-num" }, vue.toDisplayString(item.openCode1), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "h-op" }, "+"), vue.createElementVNode( "view", { class: "h-num" }, vue.toDisplayString(item.openCode2), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "h-op" }, "+"), vue.createElementVNode( "view", { class: "h-num" }, vue.toDisplayString(item.openCode3), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "h-op" }, "="), vue.createElementVNode( "view", { class: "h-num res" }, vue.toDisplayString(Number(item.openCode1) + Number(item.openCode2) + Number(item.openCode3)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), item.combo || item.award ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "h-tags" }, [ item.combo ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(item.combo, (tag, i) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["tag", $setup.getTagColor(tag)]), key: "c" + i }, vue.toDisplayString(tag), 3 /* TEXT, CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) : item.award ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(item.award.slice(0, 3), (tag, i) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["tag", $setup.getTagColor(tag)]), key: "a" + i }, vue.toDisplayString(tag), 3 /* TEXT, CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 2 /* DYNAMIC */ }, [ { name: "top", fn: vue.withCtx(() => [ vue.createElementVNode("view", { class: "top-tabs" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["tab", { active: $setup.currentTab === 0 }]), onClick: _cache[0] || (_cache[0] = ($event) => $setup.switchTab(0)) }, vue.toDisplayString($setup.t("加拿大")) + "28 ", 3 /* TEXT, CLASS */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["tab", { active: $setup.currentTab === 1 }]), onClick: _cache[1] || (_cache[1] = ($event) => $setup.switchTab(1)) }, vue.toDisplayString($setup.t("极速")) + "28 ", 3 /* TEXT, CLASS */ ) ]), vue.createCommentVNode("v-if", true) ]), key: "0" } ]), 1032, ["modelValue"]) ]), vue.createVNode(_component_u_calendar, { modelValue: $setup.calendarShow, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.calendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", "start-text": $setup.t("开始"), "end-text": $setup.t("结束"), "btn-type": "primary", onChange: $setup.onCalendarChange }, null, 8, ["modelValue", "active-bg-color", "range-color", "start-text", "end-text"]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesTabbarEntertainmentViewHistoryIndex = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-1c04c3e9"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/view/history/index.vue"]]); const _sfc_main$4 = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const pagingRef = vue.ref(null); const betList = vue.ref([]); const statusPickerShow = vue.ref(false); const calendarShow = vue.ref(false); const currentStatus = vue.ref(""); const dateRange = vue.ref(""); const startTime = vue.ref(""); const endTime = vue.ref(""); const statusColumns = vue.computed(() => [ { label: t2("全部状态"), value: "" }, { label: t2("待开奖"), value: 1 }, { label: t2("已中奖"), value: 2 }, { label: t2("未中奖"), value: 3 }, { label: t2("已撤单"), value: 4 } ]); const statusText = vue.computed(() => { const target = statusColumns.value.find((item) => item.value === currentStatus.value); return target ? target.label : ""; }); const onQuery = async (pageNo, pageSize) => { try { const params = { page: pageNo, limit: pageSize, status: currentStatus.value, start_time: startTime.value, end_time: endTime.value }; const res = await getGameBetList(params); if (res.code === 1 && res.data && res.data.list) { pagingRef.value.complete(res.data.list); } else { pagingRef.value.complete(false); } } catch (error) { formatAppLog("error", "at pages/Tabbar/Entertainment/view/Pc28BettingHistory/index.vue:202", error); pagingRef.value.complete(false); } }; const onStatusConfirm = (e) => { currentStatus.value = e[0].value; handleQuery2(); }; const onCalendarChange = (e) => { if (e.startDate && e.endDate) { startTime.value = e.startDate; endTime.value = e.endDate; dateRange.value = `${e.startDate} ~ ${e.endDate}`; handleQuery2(); } }; const handleQuery2 = () => { pagingRef.value.reload(); }; const handleReset = () => { currentStatus.value = ""; dateRange.value = ""; startTime.value = ""; endTime.value = ""; pagingRef.value.reload(); }; const getStatusText = (status) => { const map = { 1: t2("待开奖"), 2: t2("已中奖"), 3: t2("未中奖"), 4: t2("已撤单") }; return map[status] || t2("未知"); }; const getStatusClass = (status) => { const map = { 1: "status-pending", // 橙色 2: "status-win", // 红色/绿色 3: "status-lose", // 灰色 4: "status-cancel" // 浅灰 }; return map[status] || "status-default"; }; const __returned__ = { t: t2, pagingRef, betList, statusPickerShow, calendarShow, currentStatus, dateRange, startTime, endTime, statusColumns, statusText, onQuery, onStatusConfirm, onCalendarChange, handleQuery: handleQuery2, handleReset, getStatusText, getStatusClass, ref: vue.ref, computed: vue.computed, get useI18n() { return useI18n; }, get getGameBetList() { return getGameBetList; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_empty = __unplugin_components_4$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_select = __unplugin_components_5$1; const _component_u_calendar = __unplugin_components_6; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("投注记录") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-content" }, [ vue.createVNode(_component_z_paging, { ref: "pagingRef", modelValue: $setup.betList, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.betList = $event), onQuery: $setup.onQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300 }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "filter-wrapper" }, [ vue.createElementVNode("view", { class: "filter-card" }, [ vue.createElementVNode("view", { class: "filter-header" }, [ vue.createElementVNode("view", { class: "title-line" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title-text" }, vue.toDisplayString($setup.t("条件筛选")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "reset-link", onClick: $setup.handleReset }, vue.toDisplayString($setup.t("重置全部")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "filter-body" }, [ vue.createElementVNode("view", { class: "filter-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[0] || (_cache[0] = ($event) => $setup.statusPickerShow = true) }, [ vue.createVNode(_component_u_icon, { name: "list-dot", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.statusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.statusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("全部状态")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.statusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "filter-item date-item", onClick: _cache[1] || (_cache[1] = ($event) => $setup.calendarShow = true) }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ $setup.dateRange ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "filter-value" }, vue.toDisplayString($setup.dateRange), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "filter-placeholder" }, vue.toDisplayString($setup.t("日期区间")), 1 /* TEXT */ )) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "button-group" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "search-btn", onClick: $setup.handleQuery }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "search", size: "32", color: "#fff", class: "mr-1" }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("立即查询")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("更新数据中...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无投注记录"), mode: "history", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bet-list-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.betList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.id, class: "bet-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "issue-box" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("期号")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "issue-no" }, vue.toDisplayString(item.issue_no), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["status-badge", $setup.getStatusClass(item.status)]) }, vue.toDisplayString($setup.getStatusText(item.status)), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "card-main" }, [ vue.createElementVNode("view", { class: "bet-content-box" }, [ vue.createElementVNode( "text", { class: "bet-label" }, vue.toDisplayString($setup.t("投注内容")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "bet-keywords" }, vue.toDisplayString(item.keywords), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-grid" }, [ vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "d-val" }, vue.toDisplayString(item.odds), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("投注本金")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "d-val" }, vue.toDisplayString(parseFloat(item.amount)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("盈亏/派彩")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: vue.normalizeClass(["d-val profit-val", Number(item.profit) > 0 ? "is-win" : ""]) }, vue.toDisplayString(Number(item.profit) > 0 ? "+" + parseFloat(item.profit) : parseFloat(item.profit)), 3 /* TEXT, CLASS */ ) ]) ]) ]), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString(item.created_at), 1 /* TEXT */ ), vue.createCommentVNode(' NO.{{ item.id }} ') ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), vue.createVNode(_component_u_select, { modelValue: $setup.statusPickerShow, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.statusPickerShow = $event), mode: "single-column", list: $setup.statusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.calendarShow, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.calendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", "start-text": $setup.t("开始"), "end-text": $setup.t("结束"), "btn-type": "primary", onChange: $setup.onCalendarChange }, null, 8, ["modelValue", "active-bg-color", "range-color", "start-text", "end-text"]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesTabbarEntertainmentViewPc28BettingHistoryIndex = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-7904c5d9"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/Tabbar/Entertainment/view/Pc28BettingHistory/index.vue"]]); const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2, locale } = useI18n(); const router2 = useRouter(); const mainTab = vue.ref(0); onLoad((options) => { if (options.tab !== void 0) { mainTab.value = Number(options.tab); onGameQuery(); } }); const switchMainTab = (index) => { if (mainTab.value === index) return; mainTab.value = index; }; const tabList = vue.computed(() => [ { name: t2("体育"), value: 1 }, { name: t2("彩票"), value: 0 }, { name: t2("六合彩"), value: 2 } ]); const gamePagingRef = vue.ref(null); const gameBetList = vue.ref([]); const gameStatusShow = vue.ref(false); const gameSettleStatusShow = vue.ref(false); const gameCalendarShow = vue.ref(false); const gameStatus = vue.ref(""); const gameSettleStatus = vue.ref(""); const gameDateRange = vue.ref(""); const gameStart = vue.ref(""); const gameEnd = vue.ref(""); const gameStatusColumns = vue.computed(() => [ { label: t2("中奖"), value: 1 }, { label: t2("未中奖"), value: 0 } ]); const gameSettleStatusColumns = vue.computed(() => [ { label: t2("待结算"), value: 1 }, { label: t2("已结算"), value: 2 } ]); const gameStatusText = vue.computed(() => { const target = gameStatusColumns.value.find((item) => item.value === gameStatus.value); return target ? target.label : ""; }); const gameSettleStatusText = vue.computed(() => { const target = gameSettleStatusColumns.value.find((item) => item.value === gameSettleStatus.value); return target ? target.label : ""; }); const onTabChange = (index) => { mainTab.value = index; }; const onGameQuery = async (pageNo, pageSize) => { try { const params = { page: pageNo, limit: pageSize, is_winner: gameStatus.value, status: gameSettleStatus.value, start_time: gameStart.value, end_time: gameEnd.value }; const res = await getGameBetList(params); if (res.code === 1 && res.data && res.data.list) { gamePagingRef.value.complete(res.data.list); } else { gamePagingRef.value.complete(false); } } catch (error) { gamePagingRef.value.complete(false); } }; const onGameStatusConfirm = (e) => { gameStatus.value = e[0].value; handleGameQuery(); }; const onGameSettleStatusConfirm = (e) => { gameSettleStatus.value = e[0].value; handleGameQuery(); }; const onGameCalendarChange = (e) => { if (e.startDate && e.endDate) { gameStart.value = e.startDate; gameEnd.value = e.endDate; gameDateRange.value = `${e.startDate} ~ ${e.endDate}`; handleGameQuery(); } }; const handleGameQuery = () => { var _a2; (_a2 = gamePagingRef.value) == null ? void 0 : _a2.reload(); }; const handleGameReset = () => { var _a2; gameStatus.value = ""; gameSettleStatus.value = ""; gameDateRange.value = ""; gameStart.value = ""; gameEnd.value = ""; (_a2 = gamePagingRef.value) == null ? void 0 : _a2.reload(); }; const getGameStatusText = (item) => { const status = Number(item.status); const isWinner = Number(item.profit) > 0; if (status === 1) return t2("待结算"); else if (status === 2) return isWinner ? t2("已中奖") : t2("未中奖"); return t2("未知"); }; const getGameStatusClass = (item) => { const status = Number(item.status); const isWinner = Number(item.profit) > 0; if (status === 1) return "status-pending"; else if (status === 2) return isWinner ? "status-win" : "status-lose"; return "status-default"; }; const sportPagingRef = vue.ref(null); const sportOrderList = vue.ref([]); const sportStatusShow = vue.ref(false); const sportSettleStatusShow = vue.ref(false); const sportCalendarShow = vue.ref(false); const sportStatus = vue.ref(""); const sportSettleStatus = vue.ref(""); const sportDateRange = vue.ref(""); const sportStart = vue.ref(""); const sportEnd = vue.ref(""); const sportStatusColumns = vue.computed(() => [ { label: t2("未中奖"), value: 0 }, { label: t2("中奖"), value: 1 }, { label: t2("和局"), value: 2 }, { label: t2("平手半"), value: 3 } ]); const sportSettleStatusColumns = vue.computed(() => [ { label: t2("未结算"), value: 0 }, { label: t2("已结算"), value: 1 }, { label: t2("结算待发放"), value: 2 } ]); const sportStatusText = vue.computed(() => { const target = sportStatusColumns.value.find((item) => item.value === sportStatus.value); return target ? target.label : ""; }); const sportSettleStatusText = vue.computed(() => { const target = sportSettleStatusColumns.value.find((item) => item.value === sportSettleStatus.value); return target ? target.label : ""; }); const onSportQuery = async (pageNo, pageSize) => { try { const params = { page: pageNo, limit: pageSize, is_win: sportStatus.value, settlement_status: sportSettleStatus.value, start_time: sportStart.value, end_time: sportEnd.value }; const res = await getOrderList(params); if (res.code === 1) { const list2 = (res.data.list || []).map((item) => { try { item.parsedDetail = item.detail ? JSON.parse(item.detail) : {}; } catch (e) { item.parsedDetail = {}; } return item; }); sportPagingRef.value.complete(list2); } else { sportPagingRef.value.complete(false); } } catch (e) { sportPagingRef.value.complete(false); } }; const getMarketName = (item) => { var _a2, _b2, _c; return ((_c = (_b2 = (_a2 = item.parsedDetail) == null ? void 0 : _a2.odds) == null ? void 0 : _b2[0]) == null ? void 0 : _c.name) || "-"; }; const getSelectionValue = (item) => { var _a2, _b2, _c, _d, _e; return ((_e = (_d = (_c = (_b2 = (_a2 = item.parsedDetail) == null ? void 0 : _a2.odds) == null ? void 0 : _b2[0]) == null ? void 0 : _c.values) == null ? void 0 : _d[0]) == null ? void 0 : _e.value) || "-"; }; const getSelectionHandicap = (item) => { var _a2, _b2, _c, _d, _e; return ((_e = (_d = (_c = (_b2 = (_a2 = item.parsedDetail) == null ? void 0 : _a2.odds) == null ? void 0 : _b2[0]) == null ? void 0 : _c.values) == null ? void 0 : _d[0]) == null ? void 0 : _e.handicap) || ""; }; const getSelectionOdd = (item) => { var _a2, _b2, _c, _d, _e; return ((_e = (_d = (_c = (_b2 = (_a2 = item.parsedDetail) == null ? void 0 : _a2.odds) == null ? void 0 : _b2[0]) == null ? void 0 : _c.values) == null ? void 0 : _d[0]) == null ? void 0 : _e.odd) || "0.00"; }; const onSportStatusConfirm = (e) => { sportStatus.value = e[0].value; handleSportQuery(); }; const onSportSettleStatusConfirm = (e) => { sportSettleStatus.value = e[0].value; handleSportQuery(); }; const onSportCalendarConfirm = (e) => { if (e.startDate && e.endDate) { sportStart.value = e.startDate; sportEnd.value = e.endDate; sportDateRange.value = `${e.startDate} ~ ${e.endDate}`; handleSportQuery(); } sportCalendarShow.value = false; }; const handleSportQuery = () => { var _a2; (_a2 = sportPagingRef.value) == null ? void 0 : _a2.reload(); }; const handleSportReset = () => { var _a2; sportStatus.value = ""; sportSettleStatus.value = ""; sportDateRange.value = ""; sportStart.value = ""; sportEnd.value = ""; (_a2 = sportPagingRef.value) == null ? void 0 : _a2.reload(); }; const getMatchStateText = (state) => { const map = { 0: t2("未开始"), 1: t2("进行中"), 2: t2("已完场"), 3: t2("延期"), 4: t2("取消") }; return map[Number(state)] || t2("未知"); }; const getMatchStateType = (state) => { const s = Number(state); if (s === 0) return "info"; if (s === 1) return "primary"; if (s === 2) return "success"; if (s === 3) return "warning"; if (s === 4) return "error"; return "info"; }; const getSportItemStatus = (item) => { const settleStatus = Number(item.status); const settlementStatus = Number(item.settlement_status); const isWin = Number(item.is_win); if (settlementStatus === 1) { switch (isWin) { case 1: return { text: t2("中奖"), type: "success" }; case 2: return { text: t2("和局"), type: "primary" }; case 0: default: return { text: t2("未中奖"), type: "error" }; } } if (settleStatus === 0) return { text: t2("下注中"), type: "warning" }; else if (settleStatus === 1) return { text: t2("下注成功"), type: "success" }; else if (settleStatus === -1) return { text: t2("订单已取消"), type: "error" }; }; const getSportProfitClass = (item) => { if (item.status !== 1) return ""; const profit = Number(item.profit_and_loss); if (profit > 0) return "text-success"; if (profit < 0) return "text-error"; return "text-gray"; }; const getRefundStatusText = (status) => { const map = { 1: t2("退款审核中"), 2: t2("已退款"), 3: t2("退款被驳回") }; return map[Number(status)] || ""; }; const getRefundStatusClass = (status) => { const map = { 1: "refund-pending", 2: "refund-success", 3: "refund-reject" }; return map[Number(status)] || ""; }; const copyText = (text) => { uni.setClipboardData({ data: text, success: () => uni.showToast({ title: t2("复制成功"), icon: "none" }) }); }; const handleSportDetail = (item) => { router2.push({ name: "bettingDetail", query: { order_id: item.order_id }, data: { order_id: item.order_id } }); }; const handleMatchDetail = (item) => { if (item.sport && item.sport.data_id) { uni.navigateTo({ url: `/pages/common/sportDetail/index?data_id=${item.sport.data_id}` }); } }; const lhcPagingRef = vue.ref(null); const lhcOrderList = vue.ref([]); const lhcStatusShow = vue.ref(false); const lhcCalendarShow = vue.ref(false); const lhcStatus = vue.ref(""); const lhcDateRange = vue.ref(""); const lhcStart = vue.ref(""); const lhcEnd = vue.ref(""); const getBallColorClass = (numStr) => { const num = parseInt(numStr, 10); if (isNaN(num)) return "bg-gray"; const reds = [1, 2, 7, 8, 12, 13, 18, 19, 23, 24, 29, 30, 34, 35, 40, 45, 46]; const blues = [3, 4, 9, 10, 14, 15, 20, 25, 26, 31, 36, 37, 41, 42, 47, 48]; const greens = [5, 6, 11, 16, 17, 21, 22, 27, 28, 32, 33, 38, 39, 43, 44, 49]; if (reds.includes(num)) return "bg-red"; if (blues.includes(num)) return "bg-blue"; if (greens.includes(num)) return "bg-green"; return "bg-gray"; }; const lhcStatusColumns = vue.computed(() => [ { value: 0, label: t2("待开奖") }, { value: 1, label: t2("未中奖") }, { value: 2, label: t2("已中奖") }, { value: 3, label: t2("合局") } // { value: 4, label: t('购物车') }, ]); const lhcStatusText = vue.computed(() => { const target = lhcStatusColumns.value.find((item) => item.value === lhcStatus.value); return target ? target.label : ""; }); const onLhcQuery = async (pageNo, pageSize) => { try { const params = { page: pageNo, limit: pageSize, lottery_status: lhcStatus.value, start_time: lhcStart.value, end_time: lhcEnd.value }; const res = await (typeof getDigitalOrderList === "function" ? getDigitalOrderList(params) : Promise.resolve({ code: 1, data: { list: [] } })); if (res.code === 1 && res.data && res.data.list) { lhcPagingRef.value.complete(res.data.list); } else { lhcPagingRef.value.complete(false); } } catch (error) { lhcPagingRef.value.complete(false); } }; const onLhcStatusConfirm = (e) => { lhcStatus.value = e[0].value; handleLhcQuery(); }; const onLhcCalendarChange = (e) => { if (e.startDate && e.endDate) { lhcStart.value = e.startDate; lhcEnd.value = e.endDate; lhcDateRange.value = `${e.startDate} ~ ${e.endDate}`; handleLhcQuery(); } }; const handleLhcQuery = () => { var _a2; (_a2 = lhcPagingRef.value) == null ? void 0 : _a2.reload(); }; const handleLhcReset = () => { var _a2; lhcStatus.value = ""; lhcDateRange.value = ""; lhcStart.value = ""; lhcEnd.value = ""; (_a2 = lhcPagingRef.value) == null ? void 0 : _a2.reload(); }; const getLhcStatusText = (status) => { const s = Number(status); if (s === 0) return t2("待开奖"); if (s === 1) return t2("未中奖"); if (s === 2) return t2("已中奖"); if (s === 3) return t2("合局"); if (s === 4) return t2("购物车"); return t2("未知"); }; const getLhcStatusClass = (status) => { const s = Number(status); if (s === 0) return "status-pending"; if (s === 1) return "status-lose"; if (s === 2) return "status-win"; if (s === 3) return "status-default"; if (s === 4) return "status-default"; return "status-default"; }; const getLhcProfitText = (data) => { const status = Number(data.lottery_status); if (status === 1) { return data.profit_and_loss || "--"; } else if (status === 2) { return data.win_amount || "--"; } else { return 0; } }; const getLhcProfitClass = (status) => { const s = Number(status); if (s === 1) return "is-lose"; if (s === 2) return "is-win"; return ""; }; const handleLhcDetail = (item) => { router2.push({ name: "DigitalDetail", query: { id: item.id } }); }; const __returned__ = { t: t2, locale, router: router2, mainTab, switchMainTab, tabList, gamePagingRef, gameBetList, gameStatusShow, gameSettleStatusShow, gameCalendarShow, gameStatus, gameSettleStatus, gameDateRange, gameStart, gameEnd, gameStatusColumns, gameSettleStatusColumns, gameStatusText, gameSettleStatusText, onTabChange, onGameQuery, onGameStatusConfirm, onGameSettleStatusConfirm, onGameCalendarChange, handleGameQuery, handleGameReset, getGameStatusText, getGameStatusClass, sportPagingRef, sportOrderList, sportStatusShow, sportSettleStatusShow, sportCalendarShow, sportStatus, sportSettleStatus, sportDateRange, sportStart, sportEnd, sportStatusColumns, sportSettleStatusColumns, sportStatusText, sportSettleStatusText, onSportQuery, getMarketName, getSelectionValue, getSelectionHandicap, getSelectionOdd, onSportStatusConfirm, onSportSettleStatusConfirm, onSportCalendarConfirm, handleSportQuery, handleSportReset, getMatchStateText, getMatchStateType, getSportItemStatus, getSportProfitClass, getRefundStatusText, getRefundStatusClass, copyText, handleSportDetail, handleMatchDetail, lhcPagingRef, lhcOrderList, lhcStatusShow, lhcCalendarShow, lhcStatus, lhcDateRange, lhcStart, lhcEnd, getBallColorClass, lhcStatusColumns, lhcStatusText, onLhcQuery, onLhcStatusConfirm, onLhcCalendarChange, handleLhcQuery, handleLhcReset, getLhcStatusText, getLhcStatusClass, getLhcProfitText, getLhcProfitClass, handleLhcDetail, get getLocale() { return getLocale; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = __unplugin_components_0$2; const _component_u_icon = __unplugin_components_0$5; const _component_u_button = __unplugin_components_2$1; const _component_u_tag = __unplugin_components_2$2; const _component_u_empty = __unplugin_components_4$2; const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_0$1); const _component_u_select = __unplugin_components_5$1; const _component_u_calendar = __unplugin_components_6; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.mainTab === 0 ? $setup.t("投注记录") : $setup.t("投注历史") }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-content" }, [ vue.createVNode(_component_u_tabs, { list: $setup.tabList, current: $setup.mainTab, onChange: $setup.onTabChange, "active-color": "#f8b932", "inactive-color": "#666", "line-color": "#f8b932", "is-scroll": $setup.getLocale() != "zh" }, null, 8, ["list", "current", "is-scroll"]), vue.createElementVNode("view", { class: "main-tabs-wrapper" }), vue.createElementVNode("view", { class: "paging-container" }, [ $setup.mainTab === 1 ? (vue.openBlock(), vue.createBlock(_component_z_paging, { key: 0, ref: "gamePagingRef", modelValue: $setup.gameBetList, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.gameBetList = $event), onQuery: $setup.onGameQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300, loadingMoreLoadingText: $setup.t("正在加载"), loadingMoreNoMoreText: $setup.t("没有更多了"), loadingMoreDefaultText: $setup.t("点击加载更多") }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "filter-wrapper" }, [ vue.createElementVNode("view", { class: "filter-card" }, [ vue.createElementVNode("view", { class: "filter-header" }, [ vue.createElementVNode("view", { class: "title-line" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title-text" }, vue.toDisplayString($setup.t("条件筛选")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "reset-link", onClick: $setup.handleGameReset }, vue.toDisplayString($setup.t("重置全部")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "filter-body" }, [ vue.createElementVNode("view", { class: "filter-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[0] || (_cache[0] = ($event) => $setup.gameStatusShow = true) }, [ vue.createVNode(_component_u_icon, { name: "list-dot", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.gameStatusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.gameStatusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("是否中奖")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.gameStatusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "filter-item date-item", onClick: _cache[1] || (_cache[1] = ($event) => $setup.gameCalendarShow = true) }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ $setup.gameDateRange ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "filter-value" }, vue.toDisplayString($setup.gameDateRange), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "filter-placeholder" }, vue.toDisplayString($setup.t("日期区间")), 1 /* TEXT */ )) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "filter-row action-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[2] || (_cache[2] = ($event) => $setup.gameSettleStatusShow = true) }, [ vue.createVNode(_component_u_icon, { name: "coupon", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.gameSettleStatusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.gameSettleStatusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("结算状态")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.gameSettleStatusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "button-group" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "search-btn", onClick: $setup.handleGameQuery, "custom-style": "width: 100%; height: 76rpx;" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "search", size: "32", color: "#fff", class: "mr-1" }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("立即查询")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("更新数据中...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无投注记录"), mode: "history", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bet-list-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameBetList, (item) => { var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j; return vue.openBlock(), vue.createElementBlock("view", { key: item.id, class: "bet-card", onClick: ($event) => $setup.router.push({ name: "EntertainmentDetail", query: { id: item.id } }) }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "issue-box" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("期号")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "issue-no" }, vue.toDisplayString(item.issue_no), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["status-badge", $setup.getGameStatusClass(item)]) }, vue.toDisplayString($setup.getGameStatusText(item)), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "card-main" }, [ vue.createElementVNode("view", { class: "bet-content-box", style: { "margin-bottom": "12rpx" } }, [ vue.createElementVNode( "text", { class: "bet-label" }, vue.toDisplayString($setup.t("彩票玩法")), 1 /* TEXT */ ), vue.createVNode(_component_u_tag, { text: Number(item.is_pc) === 1 ? $setup.t("极速") + 28 : $setup.t("加拿大") + "28", type: "primary", plain: "", size: "mini" }, null, 8, ["text"]) ]), vue.createElementVNode("view", { class: "bet-content-box" }, [ vue.createElementVNode( "text", { class: "bet-label" }, vue.toDisplayString($setup.t("投注内容")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "bet-keywords" }, vue.toDisplayString(item.keywords), 1 /* TEXT */ ) ]), item.issue && item.issue.winning_numbers ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "bet-content-box", style: { "align-items": "flex-start" } }, [ vue.createElementVNode( "text", { class: "bet-label", style: { "margin-top": "4rpx" } }, vue.toDisplayString($setup.t("开奖结果")), 1 /* TEXT */ ), vue.createElementVNode("view", { style: { "display": "flex", "flex-direction": "column", "gap": "8rpx" } }, [ vue.createElementVNode("text", { style: { "font-size": "28rpx", "font-weight": "bold", "color": "#ef4444", "letter-spacing": "2rpx" } }, [ ((_a2 = item.issue) == null ? void 0 : _a2.winning_numbers) && typeof ((_b2 = item.issue) == null ? void 0 : _b2.winning_numbers) === "string" ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0 }, vue.toDisplayString((_d = (_c = item.issue) == null ? void 0 : _c.winning_numbers) == null ? void 0 : _d.split(",")[0]) + " + " + vue.toDisplayString((_f = (_e = item.issue) == null ? void 0 : _e.winning_numbers) == null ? void 0 : _f.split(",")[1]) + " + " + vue.toDisplayString((_h = (_g = item.issue) == null ? void 0 : _g.winning_numbers) == null ? void 0 : _h.split(",")[2]) + " = " + vue.toDisplayString((_j = (_i = item.issue) == null ? void 0 : _i.winning_numbers) == null ? void 0 : _j.split(",").reduce((sum, val) => sum + Number(val), 0)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), item.issue.combo && item.issue.combo.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, style: { "display": "flex", "flex-wrap": "wrap", "gap": "8rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.issue.combo, (comboItem, cIndex) => { return vue.openBlock(), vue.createBlock(_component_u_tag, { key: cIndex, text: comboItem, type: "info", plain: "", size: "mini" }, null, 8, ["text"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "data-grid" }, [ vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "d-val" }, vue.toDisplayString(item.odds), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("投注本金")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "d-val" }, vue.toDisplayString(parseFloat(item.amount)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("盈亏")), 1 /* TEXT */ ), item.status === 2 && !Number(item.profit) > 0 ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0, class: "d-val profit-val is-lose" }, " - " + vue.toDisplayString(parseFloat(item.amount)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "span", { key: 1, class: vue.normalizeClass(["d-val profit-val", Number(item.profit) > 0 ? "is-win" : ""]) }, [ Number(item.profit) > 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, " +" + vue.toDisplayString(parseFloat(item.profit)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1 }, vue.toDisplayString(parseFloat(item.profit)), 1 /* TEXT */ )) ], 2 /* CLASS */ )) ]) ]) ]), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString(item.created_at), 1 /* TEXT */ ) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "loadingMoreLoadingText", "loadingMoreNoMoreText", "loadingMoreDefaultText"])) : vue.createCommentVNode("v-if", true), $setup.mainTab === 0 ? (vue.openBlock(), vue.createBlock(_component_z_paging, { key: 1, ref: "sportPagingRef", modelValue: $setup.sportOrderList, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.sportOrderList = $event), onQuery: $setup.onSportQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300, loadingMoreLoadingText: $setup.t("正在加载"), loadingMoreNoMoreText: $setup.t("没有更多了"), loadingMoreDefaultText: $setup.t("点击加载更多") }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "filter-wrapper" }, [ vue.createElementVNode("view", { class: "filter-card" }, [ vue.createElementVNode("view", { class: "filter-header" }, [ vue.createElementVNode("view", { class: "title-line" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title-text" }, vue.toDisplayString($setup.t("条件筛选")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "reset-link", onClick: $setup.handleSportReset }, vue.toDisplayString($setup.t("重置全部")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "filter-body" }, [ vue.createElementVNode("view", { class: "filter-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[4] || (_cache[4] = ($event) => $setup.sportStatusShow = true) }, [ vue.createVNode(_component_u_icon, { name: "list-dot", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.sportStatusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.sportStatusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("是否中奖")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.sportStatusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "filter-item date-item", onClick: _cache[5] || (_cache[5] = ($event) => $setup.sportCalendarShow = true) }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ $setup.sportDateRange ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "filter-value" }, vue.toDisplayString($setup.sportDateRange), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "filter-placeholder" }, vue.toDisplayString($setup.t("日期区间")), 1 /* TEXT */ )) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "filter-row action-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[6] || (_cache[6] = ($event) => $setup.sportSettleStatusShow = true) }, [ vue.createVNode(_component_u_icon, { name: "coupon", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.sportSettleStatusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.sportSettleStatusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("结算状态")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.sportSettleStatusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "button-group" }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "search-btn", onClick: $setup.handleSportQuery, "custom-style": "width: 100%; height: 76rpx;" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "search", size: "32", color: "#fff", class: "mr-1" }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("立即查询")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("加载最新记录...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无投注记录"), mode: "list", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.sportOrderList, (item, index) => { var _a2, _b2, _c, _d, _e; return vue.openBlock(), vue.createElementBlock("view", { key: item.id || index, class: "log-card", onClick: ($event) => $setup.handleSportDetail(item) }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode( "text", { class: "val" }, vue.toDisplayString(item.order_id), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: vue.withModifiers(($event) => $setup.copyText(item.order_id), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: "file-text", size: "24", color: "#999" }) ], 8, ["onClick"]) ]), vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString(item.create_time), 1 /* TEXT */ ) ]), item.sport ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "sport-match-info" }, [ vue.createElementVNode("view", { class: "league-row" }, [ item.sport.league_logo ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "league-logo", src: item.sport.league_logo, mode: "aspectFit" }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "league-name" }, vue.toDisplayString($setup.locale === "zh" ? item.sport.league : item.sport.league_en), 1 /* TEXT */ ), item.sport.state !== void 0 && item.sport.state !== null ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 1, text: $setup.getMatchStateText(item.sport.state), type: $setup.getMatchStateType(item.sport.state), plain: "", size: "mini", style: { "margin-left": "12rpx" } }, null, 8, ["text", "type"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "match-time" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(item.detail.game_time), 1 /* TEXT */ ), ((_a2 = item.detail) == null ? void 0 : _a2.fixture_status) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "fixture-status" }, [ item.detail.fixture_status.long ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "margin-left": "12rpx", "color": "#f8b932" } }, vue.toDisplayString(item.detail.fixture_status.long), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.detail.fixture_status.elapsed ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, style: { "margin-left": "6rpx", "color": "#f8b932" } }, vue.toDisplayString(item.detail.fixture_status.seconds) + "'", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "team-row" }, [ vue.createElementVNode("view", { class: "team" }, [ vue.createElementVNode( "text", { class: "team-name", style: { "text-align": "right", "flex": "1" } }, vue.toDisplayString($setup.locale === "zh" ? item.sport.home_team : item.sport.home_team_en), 1 /* TEXT */ ), item.sport.home_team_logo ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "team-logo", src: item.sport.home_team_logo, mode: "aspectFit" }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "vs-text" }, [ ((_b2 = item.detail) == null ? void 0 : _b2.score) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, vue.toDisplayString(item.detail.score), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "VS")) ]), vue.createElementVNode("view", { class: "team" }, [ item.sport.guest_team_logo ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "team-logo", src: item.sport.guest_team_logo, mode: "aspectFit" }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "team-name", style: { "flex": "1" } }, vue.toDisplayString($setup.locale === "zh" ? item.sport.guest_team : item.sport.guest_team_en), 1 /* TEXT */ ) ]) ]), ((_c = item.detail) == null ? void 0 : _c.half_score) || ((_d = item.detail) == null ? void 0 : _d.extra_score) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "score-detail-row" }, [ ((_e = item.detail) == null ? void 0 : _e.half_score) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "score-tag" }, vue.toDisplayString($setup.t("半场")) + ": " + vue.toDisplayString(item.detail.half_score), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), Number(item.sport.state) !== 0 && (item.sport.score || item.sport.half_score) ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "live-score-row" }, [ vue.createElementVNode( "text", { class: "live-label" }, vue.toDisplayString($setup.t("即时比分")) + ":", 1 /* TEXT */ ), item.sport.score ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "live-val" }, vue.toDisplayString(item.sport.score), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.sport.half_score && item.sport.half_score !== "-" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "live-half" }, "(" + vue.toDisplayString($setup.t("半场")) + ": " + vue.toDisplayString(item.sport.half_score) + ")", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "card-main" }, [ vue.createElementVNode("view", { class: "bet-info", style: { "width": "100%" } }, [ vue.createElementVNode("view", { class: "bet-type", style: { "display": "flex", "justify-content": "space-between" } }, [ vue.createElementVNode("text", { class: "type-name" }, [ vue.createTextVNode( vue.toDisplayString(item.odd_name) + " ", 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "color": "#64748b", "font-size": "26rpx", "margin-left": "8rpx", "font-weight": "normal" } }, " - " + vue.toDisplayString(item.odd_value), 1 /* TEXT */ ), $setup.getSelectionHandicap(item) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "color": "#f8b932", "margin-left": "6rpx" } }, " [" + vue.toDisplayString($setup.getSelectionHandicap(item)) + "] ", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["custom-sport-tag", "tag-" + $setup.getSportItemStatus(item).type]) }, vue.toDisplayString($setup.getSportItemStatus(item).text), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { style: { "margin-top": "8rpx", "margin-bottom": "8rpx", "display": "flex", "gap": "8rpx" } }, [ item.is_roll ? (vue.openBlock(), vue.createBlock(_component_u_tag, { key: 0, text: $setup.t("滚球"), size: "mini", type: "primary", plain: "" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "odds-row", style: { "display": "flex", "justify-content": "space-between" } }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "span", { style: { "color": "#f8b932", "font-size": "16px", "font-weight": "bold" } }, vue.toDisplayString(Number(item.odd)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "odds-row", style: { "margin-top": "4px" } }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("类型")), 1 /* TEXT */ ), vue.createTextVNode( ": " + vue.toDisplayString($setup.t("足球")), 1 /* TEXT */ ) ]) ]) ]), item.failure ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "odds-row" }, [ vue.createElementVNode( "span", { class: "label" }, vue.toDisplayString($setup.t("取消原因")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "span", { style: { "color": "#fa3534" } }, vue.toDisplayString(item.failure), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "divider" }), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode("view", { class: "info-column" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("投注金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value" }, vue.toDisplayString(item.amount), 1 /* TEXT */ ), Number(item.return_status) !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["refund-text", $setup.getRefundStatusClass(item.return_status)]) }, vue.toDisplayString($setup.getRefundStatusText(item.return_status)), 3 /* TEXT, CLASS */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "info-column" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("可赢金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "info-value", style: { "color": "#19be6b" } }, vue.toDisplayString(Number((Number(item.amount) * Number(item.odd) - Number(item.amount)).toFixed(2))), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info-column align-right" }, [ vue.createElementVNode( "text", { class: "info-label" }, vue.toDisplayString($setup.t("派彩金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: vue.normalizeClass(["info-value big-num", $setup.getSportProfitClass(item)]) }, [ item.is_win === 0 ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0 }, vue.toDisplayString(item.profit_and_loss), 1 /* TEXT */ )) : item.is_win === 1 ? (vue.openBlock(), vue.createElementBlock( "span", { key: 1 }, "+" + vue.toDisplayString(item.win_amount), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("span", { key: 2 }, "0.00")) ], 2 /* CLASS */ ) ]) ]), vue.createElementVNode("view", { style: { "margin-top": "24rpx", "border-top": "1rpx dashed #f1f5f9", "padding-top": "20rpx", "display": "flex", "justify-content": "center", "gap": "30rpx" } }, [ vue.createVNode(_component_u_button, { type: "primary", size: "mini", plain: "", shape: "circle", onClick: vue.withModifiers(($event) => $setup.handleSportDetail(item), ["stop"]), "custom-style": "margin: 0; padding: 0 30rpx;" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("查看订单详情")), 1 /* TEXT */ ) ]), _: 2 /* DYNAMIC */ }, 1032, ["onClick"]), vue.createVNode(_component_u_button, { type: "primary", size: "mini", plain: "", shape: "circle", onClick: vue.withModifiers(($event) => $setup.handleMatchDetail(item), ["stop"]), "custom-style": "margin: 0; padding: 0 30rpx;" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($setup.t("查看赛事详情")), 1 /* TEXT */ ) ]), _: 2 /* DYNAMIC */ }, 1032, ["onClick"]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "loadingMoreLoadingText", "loadingMoreNoMoreText", "loadingMoreDefaultText"])) : vue.createCommentVNode("v-if", true), $setup.mainTab === 2 ? (vue.openBlock(), vue.createBlock(_component_z_paging, { key: 2, ref: "lhcPagingRef", modelValue: $setup.lhcOrderList, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.lhcOrderList = $event), onQuery: $setup.onLhcQuery, fixed: false, "refresher-enabled": true, "loading-more-enabled": true, "auto-show-back-to-top": true, "back-to-top-threshold": 300, loadingMoreLoadingText: $setup.t("正在加载"), loadingMoreNoMoreText: $setup.t("没有更多了"), loadingMoreDefaultText: $setup.t("点击加载更多") }, { top: vue.withCtx(() => [ vue.createElementVNode("view", { class: "filter-wrapper" }, [ vue.createElementVNode("view", { class: "filter-card" }, [ vue.createElementVNode("view", { class: "filter-header" }, [ vue.createElementVNode("view", { class: "title-line" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title-text" }, vue.toDisplayString($setup.t("条件筛选")), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "reset-link", onClick: $setup.handleLhcReset }, vue.toDisplayString($setup.t("重置全部")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "filter-body" }, [ vue.createElementVNode("view", { class: "filter-row action-row" }, [ vue.createElementVNode("view", { class: "filter-item date-item", onClick: _cache[8] || (_cache[8] = ($event) => $setup.lhcCalendarShow = true), style: { "margin-bottom": "20rpx" } }, [ vue.createVNode(_component_u_icon, { name: "calendar", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ $setup.lhcDateRange ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "filter-value" }, vue.toDisplayString($setup.lhcDateRange), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "filter-placeholder" }, vue.toDisplayString($setup.t("日期区间")), 1 /* TEXT */ )) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]) ]), vue.createElementVNode("view", { class: "filter-row action-row" }, [ vue.createElementVNode("view", { class: "filter-item type-item", onClick: _cache[9] || (_cache[9] = ($event) => $setup.lhcStatusShow = true) }, [ vue.createVNode(_component_u_icon, { name: "list-dot", size: "32", color: _ctx.$mainColor }, null, 8, ["color"]), vue.createElementVNode("view", { class: "filter-content" }, [ vue.withDirectives(vue.createElementVNode( "text", { class: "filter-value" }, vue.toDisplayString($setup.lhcStatusText), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $setup.lhcStatusText] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "filter-placeholder" }, vue.toDisplayString($setup.t("状态")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, !$setup.lhcStatusText] ]) ]), vue.createVNode(_component_u_icon, { name: "arrow-down", size: "14", color: "#ccc" }) ]), vue.createElementVNode("view", { class: "button-group", style: { "margin-left": "20rpx" } }, [ vue.createVNode(_component_u_button, { type: "primary", shape: "circle", class: "search-btn", onClick: $setup.handleLhcQuery, "custom-style": "width: 100%; height: 76rpx;" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "search", size: "32", color: "#fff", style: { "margin-right": "20rpx" } }), vue.createTextVNode( " " + vue.toDisplayString($setup.t("查询")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]) ]) ]) ]) ]) ]), refresher: vue.withCtx(() => [ vue.createElementVNode("view", { class: "refresher-ui" }, [ vue.createElementVNode("view", { class: "spin-loader" }), vue.createElementVNode( "text", { class: "refresher-text" }, vue.toDisplayString($setup.t("更新数据中...")), 1 /* TEXT */ ) ]) ]), empty: vue.withCtx(() => [ vue.createElementVNode("view", { class: "empty-ui" }, [ vue.createVNode(_component_u_empty, { text: $setup.t("暂无投注记录"), mode: "history", "icon-size": "120" }, null, 8, ["text"]) ]) ]), default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "bet-list-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.lhcOrderList, (item) => { var _a2; return vue.openBlock(), vue.createElementBlock("view", { key: item.id, class: "bet-card lhc-card", onClick: ($event) => $setup.handleLhcDetail(item) }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "issue-box" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("期号")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "issue-no" }, vue.toDisplayString(item.issue), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: vue.normalizeClass(["status-badge", $setup.getLhcStatusClass(item.lottery_status)]) }, vue.toDisplayString($setup.getLhcStatusText(item.lottery_status)), 3 /* TEXT, CLASS */ ) ]), vue.createElementVNode("view", { class: "card-main" }, [ vue.createElementVNode("view", { class: "bet-content-box", style: { "margin-bottom": "12rpx" } }, [ item.type === 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "bet-label" }, vue.toDisplayString($setup.t("新澳门六合彩")), 1 /* TEXT */ )) : item.type === 2 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "bet-label" }, vue.toDisplayString($setup.t("香港六合彩")), 1 /* TEXT */ )) : item.type === 3 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "bet-label" }, vue.toDisplayString($setup.t("澳门六合彩")), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 3, class: "bet-label" }, vue.toDisplayString($setup.t("极速六合彩")), 1 /* TEXT */ )), vue.createVNode(_component_u_tag, { text: `[${item.game}] - ${item.gameplay}`, type: "primary", plain: "", size: "mini" }, null, 8, ["text"]) ]), vue.createElementVNode("view", { class: "bet-content-box" }, [ vue.createElementVNode( "text", { class: "bet-label" }, vue.toDisplayString($setup.t("投注内容")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "bet-keywords" }, vue.toDisplayString(item.number), 1 /* TEXT */ ) ]), item.lottery && item.lottery.open_code ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "bet-content-box", style: { "align-items": "flex-start" } }, [ vue.createElementVNode( "text", { class: "bet-label", style: { "margin-top": "8rpx" } }, vue.toDisplayString($setup.t("开奖结果")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "lhc-open-code-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.lottery.open_code.split(","), (code2, index) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: index }, [ index === item.lottery.open_code.split(",").length - 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "plus-sign" }, "+")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["lhc-ball", $setup.getBallColorClass(code2)]) }, vue.toDisplayString(code2), 3 /* TEXT, CLASS */ ) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), item.lottery && item.lottery.open_time ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "bet-content-box" }, [ vue.createElementVNode( "text", { class: "bet-label" }, vue.toDisplayString($setup.t("开奖时间")), 1 /* TEXT */ ), vue.createElementVNode( "text", { style: { "color": "#999", "font-size": "24rpx" } }, vue.toDisplayString((_a2 = item.lottery) == null ? void 0 : _a2.open_time), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "data-grid" }, [ vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "d-val" }, "@" + vue.toDisplayString(item.odds), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("投注本金")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "d-val" }, vue.toDisplayString(parseFloat(item.amount || 0).toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "data-item" }, [ vue.createElementVNode( "text", { class: "d-label" }, vue.toDisplayString($setup.t("盈亏")), 1 /* TEXT */ ), vue.createElementVNode( "span", { class: vue.normalizeClass(["d-val profit-val", $setup.getLhcProfitClass(item.lottery_status)]) }, vue.toDisplayString($setup.getLhcProfitText(item)), 3 /* TEXT, CLASS */ ) ]) ]) ]), vue.createElementVNode("view", { class: "card-footer" }, [ vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center", "gap": "8rpx", "color": "#94a3b8", "font-size": "22rpx" } }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("单号")) + ":", 1 /* TEXT */ ), vue.createTextVNode(), vue.createElementVNode( "text", { style: { "font-family": "monospace" } }, vue.toDisplayString(item.ordernum), 1 /* TEXT */ ) ]), vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString(item.created_at), 1 /* TEXT */ ) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["modelValue", "loadingMoreLoadingText", "loadingMoreNoMoreText", "loadingMoreDefaultText"])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createVNode(_component_u_select, { modelValue: $setup.gameStatusShow, "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $setup.gameStatusShow = $event), mode: "single-column", list: $setup.gameStatusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onGameStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_select, { modelValue: $setup.gameSettleStatusShow, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $setup.gameSettleStatusShow = $event), mode: "single-column", list: $setup.gameSettleStatusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onGameSettleStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.gameCalendarShow, "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $setup.gameCalendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", onChange: $setup.onGameCalendarChange }, null, 8, ["modelValue", "active-bg-color", "range-color"]), vue.createVNode(_component_u_select, { modelValue: $setup.sportStatusShow, "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $setup.sportStatusShow = $event), mode: "single-column", list: $setup.sportStatusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onSportStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_select, { modelValue: $setup.sportSettleStatusShow, "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $setup.sportSettleStatusShow = $event), mode: "single-column", list: $setup.sportSettleStatusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onSportSettleStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.sportCalendarShow, "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $setup.sportCalendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", onChange: $setup.onSportCalendarConfirm }, null, 8, ["modelValue", "active-bg-color", "range-color"]), vue.createVNode(_component_u_select, { modelValue: $setup.lhcStatusShow, "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => $setup.lhcStatusShow = $event), mode: "single-column", list: $setup.lhcStatusColumns, "confirm-color": _ctx.$mainColor, onConfirm: $setup.onLhcStatusConfirm }, null, 8, ["modelValue", "list", "confirm-color"]), vue.createVNode(_component_u_calendar, { modelValue: $setup.lhcCalendarShow, "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => $setup.lhcCalendarShow = $event), mode: "range", "active-bg-color": _ctx.$mainColor, "range-color": _ctx.$mainColor, "range-bg-color": "rgba(242, 186, 69, 0.1)", onChange: $setup.onLhcCalendarChange }, null, 8, ["modelValue", "active-bg-color", "range-color"]) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesCommonAllHistoryIndex = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-4115be14"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/common/AllHistory/index.vue"]]); const _sfc_main$2 = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const gameConfig = vue.reactive({ name: "加拿大", balls: ["2", "8"] }); const drawRules = vue.reactive({ title: "是根据什么开出的?", content: "加拿大公司BCLC每期共开出20个数字。加拿大28将这20个结果号码按照由小到大的顺序依次排列;取其第2/5/8/11/14/17位结果号码相加,和值的末位数作为加拿大28开出第一个数值;取其第3/6/9/12/15/18位开出号码相加,和值的末位数作为加拿大开出第二个数值,取其第4/7/10/13/16/19位开出号码相加,和值的末位数作为加拿大28开出第三个数值;三个数值相加即为加拿大28最终的开出结果。" }); const playInstructions = vue.reactive({ title: "玩法说明:", exampleLabel: "例如:", issueInfo: "加拿大BCLC第1749110期数据从小到大排序", rawNumbers: "7,8,14,16,17,22,26,34,39,41,42,48,54,58,63,64,69,72,73,79", zones: [ { name: "第一区", positions: "[第2/5/8/11/14/17位数字]", numbers: "8,17,34,42,58,69", calculation: "8+17+34+42+58+69", sum: 228, result: 8 }, { name: "第二区", positions: "[第3/6/9/12/15/18位数字]", numbers: "14,22,39,48,63,72", calculation: "14+22+39+48+63+72", sum: 258, result: 8 }, { name: "第三区", positions: "[第4/7/10/13/16/19位数字]", numbers: "16,26,41,54,64,73", calculation: "16+26+41+54+64+73", sum: 274, result: 4 } ], finalResultLabel: "最终游戏结果为:", finalResultStr: "8+8+4=20" }); const playModes = vue.reactive({ title: "共有以下玩法", list: [ "1、大,小,单,双", "2、小单,小双,大单,大双", "3、极小值(0-5),极大值(22-27)", "4、28个号码定位" ] }); const trendChart = vue.reactive({ title: "走势图怎么看?", description: "由于加拿大28为随机开出,为了方便蛋友分析加拿大28结果走势,特别针对近期开出结果进行走势分析展示,以供蛋友参考。", terms: [ { name: "统计数据:", desc: "统计多少期内的开出数据" }, { name: "标准间隔:", desc: "在标准概率下,间隔多少期会出现这个号码" }, { name: "当前间隔:", desc: "当前实际数据中,离最近一次出现该号码间隔了多少期" }, { name: "标准次数:", desc: "在统计期数内,标准概率下,出现该号码的次数" }, { name: "当前次数:", desc: "在统计期数内,实际出现该号码的次数" } ] }); const probabilityData = vue.reactive({ title: "标准概率", headers: ["中奖号码", "标准赔率", "中奖概率"], list: [ { number: 0, odds: 1e3, prob: "0.1%" }, { number: 1, odds: 333, prob: "0.3%" }, { number: 2, odds: 166, prob: "0.6%" }, { number: 3, odds: 100, prob: "1.0%" }, { number: 4, odds: 66, prob: "1.5%" }, { number: 5, odds: 48, prob: "2.1%" }, { number: 6, odds: 36, prob: "2.8%" }, { number: 7, odds: 28, prob: "3.6%" }, { number: 8, odds: 22, prob: "4.5%" }, { number: 9, odds: 18, prob: "5.5%" }, { number: 10, odds: 16, prob: "6.3%" }, { number: 11, odds: 15, prob: "6.9%" }, { number: 12, odds: 14, prob: "7.3%" }, { number: 13, odds: 13, prob: "7.5%" }, { number: 14, odds: 13, prob: "7.5%" }, { number: 15, odds: 14, prob: "7.3%" }, { number: 16, odds: 15, prob: "6.9%" }, { number: 17, odds: 16, prob: "6.3%" }, { number: 18, odds: 18, prob: "5.5%" }, { number: 19, odds: 22, prob: "4.5%" }, { number: 20, odds: 28, prob: "3.6%" }, { number: 21, odds: 36, prob: "2.8%" }, { number: 22, odds: 48, prob: "2.1%" }, { number: 23, odds: 66, prob: "1.5%" }, { number: 24, odds: 100, prob: "1.0%" }, { number: 25, odds: 166, prob: "0.6%" }, { number: 26, odds: 333, prob: "0.3%" }, { number: 27, odds: 1e3, prob: "0.1%" } ] }); const __returned__ = { gameConfig, drawRules, playInstructions, playModes, trendChart, probabilityData, reactive: vue.reactive }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": "开奖规则" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "page-container" }, [ vue.createElementVNode("view", { class: "section" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode( "text", { class: "theme-text" }, vue.toDisplayString($setup.gameConfig.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "balls" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameConfig.balls, (num, index) => { return vue.openBlock(), vue.createElementBlock( "text", { class: "ball", key: index }, vue.toDisplayString(num), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode( "text", null, vue.toDisplayString($setup.drawRules.title), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "content-text" }, vue.toDisplayString($setup.drawRules.content), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "section" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode( "text", { class: "theme-text" }, vue.toDisplayString($setup.gameConfig.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "balls" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameConfig.balls, (num, index) => { return vue.openBlock(), vue.createElementBlock( "text", { class: "ball", key: index }, vue.toDisplayString(num), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode( "text", null, vue.toDisplayString($setup.playInstructions.title), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "content-text" }, [ vue.createElementVNode("view", { class: "margin-bottom-sm" }, [ vue.createElementVNode( "text", { class: "font-bold" }, vue.toDisplayString($setup.playInstructions.exampleLabel), 1 /* TEXT */ ), vue.createElementVNode( "text", null, vue.toDisplayString($setup.playInstructions.issueInfo), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "margin-bottom-sm" }, vue.toDisplayString($setup.playInstructions.rawNumbers), 1 /* TEXT */ ), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.playInstructions.zones, (zone, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "zone-block", key: index }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "text", { class: "font-bold" }, vue.toDisplayString(zone.name), 1 /* TEXT */ ), vue.createElementVNode( "text", null, vue.toDisplayString(zone.positions), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "margin-left-sm" }, vue.toDisplayString(zone.numbers), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", null, "计算:" + vue.toDisplayString(zone.calculation) + " = " + vue.toDisplayString(zone.sum), 1 /* TEXT */ ), vue.createElementVNode( "view", null, "结果为:" + vue.toDisplayString(zone.result), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "final-result margin-top-sm" }, [ vue.createElementVNode( "text", { class: "theme-text" }, vue.toDisplayString($setup.playInstructions.finalResultLabel), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "font-bold" }, vue.toDisplayString($setup.playInstructions.finalResultStr), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "section" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode( "text", { class: "theme-text" }, vue.toDisplayString($setup.gameConfig.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "balls" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameConfig.balls, (num, index) => { return vue.openBlock(), vue.createElementBlock( "text", { class: "ball", key: index }, vue.toDisplayString(num), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode( "text", null, vue.toDisplayString($setup.playModes.title), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "content-text" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.playModes.list, (mode, index) => { return vue.openBlock(), vue.createElementBlock( "view", { key: index }, vue.toDisplayString(mode), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "section" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode( "text", { class: "theme-text" }, vue.toDisplayString($setup.gameConfig.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "balls" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameConfig.balls, (num, index) => { return vue.openBlock(), vue.createElementBlock( "text", { class: "ball", key: index }, vue.toDisplayString(num), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode( "text", null, vue.toDisplayString($setup.trendChart.title), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "content-text" }, [ vue.createElementVNode( "view", { class: "margin-bottom-sm" }, vue.toDisplayString($setup.trendChart.description), 1 /* TEXT */ ), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.trendChart.terms, (term, index) => { return vue.openBlock(), vue.createElementBlock("view", { key: index, class: "margin-bottom-xs" }, [ vue.createElementVNode( "text", { class: "font-bold" }, vue.toDisplayString(term.name), 1 /* TEXT */ ), vue.createElementVNode( "text", null, vue.toDisplayString(term.desc), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "section" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode( "text", { class: "theme-text" }, vue.toDisplayString($setup.gameConfig.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "balls" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.gameConfig.balls, (num, index) => { return vue.openBlock(), vue.createElementBlock( "text", { class: "ball", key: index }, vue.toDisplayString(num), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode( "text", null, vue.toDisplayString($setup.probabilityData.title), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "table" }, [ vue.createElementVNode("view", { class: "tr th" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.probabilityData.headers, (head, index) => { return vue.openBlock(), vue.createElementBlock( "view", { class: "td", key: index }, vue.toDisplayString(head), 1 /* TEXT */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.probabilityData.list, (row, index) => { return vue.openBlock(), vue.createElementBlock("view", { class: "tr", key: index }, [ vue.createElementVNode( "view", { class: "td" }, vue.toDisplayString(row.number), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "td" }, vue.toDisplayString(row.odds), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "td" }, vue.toDisplayString(row.prob), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "pc28-rule" }) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }); } const PagesCommonPC28RuleIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-9b0db2d6"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/common/PC28Rule/index.vue"]]); const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({ __name: "index", setup(__props, { expose: __expose }) { __expose(); const { t: t2 } = useI18n(); const orderInfo = vue.ref(null); const id = vue.ref(""); onLoad((options) => { if (options && options.id) { id.value = options.id; fetchDetail(); } }); const fetchDetail = async () => { try { uni.showLoading({ title: t2("加载中") }); const res = await betInfo({ id: id.value }); if (res.code === 1) { orderInfo.value = res.data; } else { uni.showToast({ title: res.msg || t2("获取详情失败"), icon: "none" }); } } catch (error) { formatAppLog("error", "at pages/WorkModule/Entertainment/Detail/index.vue:143", error); } finally { uni.hideLoading(); } }; const isWin = vue.computed(() => { if (!orderInfo.value) return false; return Number(orderInfo.value.profit) > 0 || orderInfo.value.is_winner === 1; }); const statusClass = vue.computed(() => { if (!orderInfo.value) return ""; const status = Number(orderInfo.value.status); if (status === 1) return "bg-pending"; if (status === 2) { return isWin.value ? "bg-win" : "bg-loss"; } return "bg-cancel"; }); const statusIcon = vue.computed(() => { if (!orderInfo.value) return ""; const status = Number(orderInfo.value.status); if (status === 1) return "clock"; if (status === 2) { return isWin.value ? "checkmark-circle" : "close-circle"; } return "info-circle"; }); const statusText = vue.computed(() => { if (!orderInfo.value) return ""; const status = Number(orderInfo.value.status); if (status === 1) return t2("待结算"); if (status === 2) { return isWin.value ? t2("已中奖") : t2("未中奖"); } return t2("未知"); }); const balls = vue.computed(() => { var _a2, _b2; if (!((_b2 = (_a2 = orderInfo.value) == null ? void 0 : _a2.issue) == null ? void 0 : _b2.winning_numbers)) return []; return orderInfo.value.issue.winning_numbers.split(","); }); const ballSum = vue.computed(() => { if (balls.value.length === 0) return 0; return balls.value.reduce((sum, val) => sum + Number(val), 0); }); const getTagColor = (text) => { if (["大", "双", "极大"].includes(text)) return "tag-red"; if (["小", "单", "极小"].includes(text)) return "tag-green"; return "tag-blue"; }; const previewImage = (url2) => { if (!url2) return; uni.previewImage({ urls: [url2] }); }; const copyText = (text) => { uni.setClipboardData({ data: text, success: () => uni.showToast({ title: t2("复制成功"), icon: "none" }) }); }; const __returned__ = { t: t2, orderInfo, id, fetchDetail, isWin, statusClass, statusIcon, statusText, balls, ballSum, getTagColor, previewImage, copyText }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }); function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = __unplugin_components_0$5; const _component_u_image = __unplugin_components_1$1; const _component_u_tag = __unplugin_components_2$2; const _component_u_loading = __unplugin_components_3$3; const _component_PageContainer = PageContainer; const _component_global_ku_root = vue.resolveComponent("global-ku-root"); return vue.openBlock(), vue.createBlock(_component_global_ku_root, null, { default: vue.withCtx(() => [ vue.createVNode(_component_PageContainer, { "nav-title": $setup.t("注单详情") }, { default: vue.withCtx(() => [ $setup.orderInfo ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "detail-content" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["status-card", $setup.statusClass]) }, [ vue.createElementVNode("view", { class: "status-top" }, [ vue.createElementVNode("view", { class: "status-icon-row" }, [ vue.createVNode(_component_u_icon, { name: $setup.statusIcon, size: "40", color: "#fff" }, null, 8, ["name"]), vue.createElementVNode( "text", { class: "status-text" }, vue.toDisplayString($setup.statusText), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "profit-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("盈亏金额")), 1 /* TEXT */ ), $setup.orderInfo.status === 2 && !Number($setup.orderInfo.profit) > 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "value" }, " -" + vue.toDisplayString(Number($setup.orderInfo.amount).toFixed(2)), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "value" }, " +" + vue.toDisplayString(Number($setup.orderInfo.profit).toFixed(2)), 1 /* TEXT */ )) ]) ], 2 /* CLASS */ ), $setup.orderInfo.issue ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "info-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString($setup.t("开奖信息")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "match-status-tag" }, [ vue.createElementVNode( "text", { class: "issue-text" }, vue.toDisplayString($setup.orderInfo.issue.issue_no) + " " + vue.toDisplayString($setup.t("期")), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "lottery-info-box" }, [ $setup.balls.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "draw-result" }, [ vue.createElementVNode("view", { class: "equation" }, [ vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.balls[0]), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "+"), vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.balls[1]), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "+"), vue.createElementVNode( "view", { class: "circle" }, vue.toDisplayString($setup.balls[2]), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "operator" }, "="), vue.createElementVNode( "view", { class: "circle result" }, vue.toDisplayString($setup.ballSum), 1 /* TEXT */ ) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "pending-draw" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.t("等待开奖中...")), 1 /* TEXT */ ) ])), $setup.orderInfo.issue.combo ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "draw-tags" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.orderInfo.issue.combo, (tag, i) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["tag", $setup.getTagColor(tag)]), key: i }, vue.toDisplayString(tag), 3 /* TEXT, CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), $setup.orderInfo.issue.image ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "draw-image" }, [ vue.createElementVNode( "text", { class: "img-label" }, vue.toDisplayString($setup.t("开奖截图")) + ":", 1 /* TEXT */ ), vue.createVNode(_component_u_image, { src: $setup.orderInfo.issue.image, width: "120rpx", height: "120rpx", "border-radius": "12rpx", onClick: _cache[0] || (_cache[0] = ($event) => $setup.previewImage($setup.orderInfo.issue.image)) }, null, 8, ["src"]) ])) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "info-card" }, [ vue.createElementVNode("view", { class: "card-header" }, [ vue.createElementVNode("view", { class: "title-row" }, [ vue.createElementVNode("view", { class: "blue-bar bmc" }), vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString($setup.t("投注内容")), 1 /* TEXT */ ) ]), vue.createVNode(_component_u_tag, { text: Number($setup.orderInfo.is_pc) === 1 ? $setup.t("加拿大") + 28 : $setup.t("极速") + 28, type: "primary", plain: "", size: "mini" }, null, 8, ["text"]) ]), vue.createElementVNode("view", { class: "bet-list-group" }, [ vue.createElementVNode("view", { class: "list-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("投注项")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val highlight-keyword" }, vue.toDisplayString($setup.orderInfo.keywords || "-"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "list-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("赔率")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val odds" }, "@" + vue.toDisplayString($setup.orderInfo.odds || "0.00"), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "list-row" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("下注金额")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val amount-val" }, vue.toDisplayString(parseFloat($setup.orderInfo.amount)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "list-row no-border" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString($setup.t("下注时间")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "val time-val" }, vue.toDisplayString($setup.orderInfo.created_at || "-"), 1 /* TEXT */ ) ]) ]) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "loading-container" }, [ vue.createVNode(_component_u_loading, { mode: "circle", size: "36" }), vue.createElementVNode( "text", { class: "loading-text" }, vue.toDisplayString($setup.t("加载中...")), 1 /* TEXT */ ) ])) ]), _: 1 /* STABLE */ }, 8, ["nav-title"]) ]), _: 1 /* STABLE */ }); } const PagesWorkModuleEntertainmentDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-3c052a28"], ["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/pages/WorkModule/Entertainment/Detail/index.vue"]]); __definePage("pages/Tabbar/Home/index", PagesTabbarHomeIndex); __definePage("pages/Tabbar/RollingBall/index", PagesTabbarRollingBallIndex); __definePage("pages/Tabbar/SportsBetting/index", PagesTabbarSportsBettingIndex); __definePage("pages/Tabbar/WorldCup/index", PagesTabbarWorldCupIndex); __definePage("pages/Tabbar/Entertainment/index", PagesTabbarEntertainmentIndex); __definePage("pages/Tabbar/BettingHistory/index", PagesTabbarBettingHistoryIndex); __definePage("pages/Tabbar/My/index", PagesTabbarMyIndex); __definePage("pages/Tabbar/Entertainment/components/Digital/detail", PagesTabbarEntertainmentComponentsDigitalDetail); __definePage("pages/login/index", PagesLoginIndex); __definePage("pages/register/index", PagesRegisterIndex); __definePage("pages/setAccount/index", PagesSetAccountIndex); __definePage("pages/index/example/index", PagesIndexExampleIndex); __definePage("pages/index/user/index", PagesIndexUserIndex); __definePage("pages/common/web-view/index", PagesCommonWebViewIndex); __definePage("pages/common/rich-view/index", PagesCommonRichViewIndex); __definePage("pages/tips/middleware/index", PagesTipsMiddlewareIndex); __definePage("pages/template/paging/index", PagesTemplatePagingIndex); __definePage("pages/oldPage/personal/index", PagesOldPagePersonalIndex); __definePage("pages/oldPage/contact/index", PagesOldPageContactIndex); __definePage("pages/oldPage/preference/index", PagesOldPagePreferenceIndex); __definePage("pages/oldPage/feedback/index", PagesOldPageFeedbackIndex); __definePage("pages/WorkModule/my/promotion/index", PagesWorkModuleMyPromotionIndex); __definePage("pages/WorkModule/my/promotion/detail/index", PagesWorkModuleMyPromotionDetailIndex); __definePage("pages/WorkModule/my/safety/index", PagesWorkModuleMySafetyIndex); __definePage("pages/WorkModule/my/userInfo/index", PagesWorkModuleMyUserInfoIndex); __definePage("pages/WorkModule/my/topUp/index", PagesWorkModuleMyTopUpIndex); __definePage("pages/WorkModule/my/rechargeRecord/index", PagesWorkModuleMyRechargeRecordIndex); __definePage("pages/WorkModule/my/withdraw/index", PagesWorkModuleMyWithdrawIndex); __definePage("pages/WorkModule/my/withdrawalHistory/index", PagesWorkModuleMyWithdrawalHistoryIndex); __definePage("pages/WorkModule/my/Yuebao/index", PagesWorkModuleMyYuebaoIndex); __definePage("pages/WorkModule/my/Yuebao/itemList", PagesWorkModuleMyYuebaoItemList); __definePage("pages/WorkModule/my/WalletManagement/index", PagesWorkModuleMyWalletManagementIndex); __definePage("pages/WorkModule/my/changePassword/index", PagesWorkModuleMyChangePasswordIndex); __definePage("pages/WorkModule/my/changeFundPassword/index", PagesWorkModuleMyChangeFundPasswordIndex); __definePage("pages/WorkModule/my/fundRecord/index", PagesWorkModuleMyFundRecordIndex); __definePage("pages/common/betSlip/index", PagesCommonBetSlipIndex); __definePage("pages/common/customerService/index", PagesCommonCustomerServiceIndex); __definePage("pages/WorkModule/bettingHistory/bettingDetail/index", PagesWorkModuleBettingHistoryBettingDetailIndex); __definePage("pages/common/sportDetail/index", PagesCommonSportDetailIndex); __definePage("pages/Tabbar/Entertainment/view/PC28/index", PagesTabbarEntertainmentViewPC28Index); __definePage("pages/Tabbar/Entertainment/view/ExtremeSpeed28/index", PagesTabbarEntertainmentViewExtremeSpeed28Index); __definePage("pages/Tabbar/Entertainment/view/Digital/index", PagesTabbarEntertainmentViewDigitalIndex); __definePage("pages/Tabbar/Entertainment/view/NewDigital/index", PagesTabbarEntertainmentViewNewDigitalIndex); __definePage("pages/Tabbar/Entertainment/view/SpeedDigital/index", PagesTabbarEntertainmentViewSpeedDigitalIndex); __definePage("pages/Tabbar/Entertainment/view/HKDigital/index", PagesTabbarEntertainmentViewHKDigitalIndex); __definePage("pages/Tabbar/Entertainment/view/history/index", PagesTabbarEntertainmentViewHistoryIndex); __definePage("pages/Tabbar/Entertainment/view/Pc28BettingHistory/index", PagesTabbarEntertainmentViewPc28BettingHistoryIndex); __definePage("pages/common/AllHistory/index", PagesCommonAllHistoryIndex); __definePage("pages/common/PC28Rule/index", PagesCommonPC28RuleIndex); __definePage("pages/WorkModule/Entertainment/Detail/index", PagesWorkModuleEntertainmentDetailIndex); const _sfc_main = { __name: "App", setup(__props, { expose: __expose }) { __expose(); onLaunch(() => { let token = uni.getStorageSync("token"); socket.connect(token); if (isAddedToHomeScreen && isAddedToHomeScreen()) { document.body.classList.add("is-standalone"); } }); onShow(() => { formatAppLog("log", "at App.vue:17", "App Show"); }); onHide(() => { formatAppLog("log", "at App.vue:20", "App Hide"); }); const appStore = useAppStore(); uni.onTabBarMidButtonTap(() => { uni.navigateTo({ url: "/pages/Tabbar/WorldCup/index" }); }); const __returned__ = { appStore, get socket() { return socket; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/Chad/Code/ViteMelBet/vite-melbet/src/App.vue"]]); function isObject(v) { return typeof v === "object" && v !== null; } function normalizeOptions(options, factoryOptions) { options = isObject(options) ? options : /* @__PURE__ */ Object.create(null); return new Proxy(options, { get(target, key, receiver) { if (key === "key") return Reflect.get(target, key, receiver); return Reflect.get(target, key, receiver) || Reflect.get(factoryOptions, key, receiver); } }); } function get(state, path) { return path.reduce((obj, p) => { return obj == null ? void 0 : obj[p]; }, state); } function set(state, path, val) { return path.slice(0, -1).reduce((obj, p) => { if (/^(__proto__)$/.test(p)) return {}; else return obj[p] = obj[p] || {}; }, state)[path[path.length - 1]] = val, state; } function pick(baseState, paths) { return paths.reduce((substate, path) => { const pathArray = path.split("."); return set(substate, pathArray, get(baseState, pathArray)); }, {}); } function parsePersistence(factoryOptions, store2) { return (o) => { var _a2; try { const { storage = localStorage, beforeRestore = void 0, afterRestore = void 0, serializer = { serialize: JSON.stringify, deserialize: JSON.parse }, key = store2.$id, paths = null, debug = false } = o; return { storage, beforeRestore, afterRestore, serializer, key: ((_a2 = factoryOptions.key) != null ? _a2 : (k) => k)(typeof key == "string" ? key : key(store2.$id)), paths, debug }; } catch (e) { if (o.debug) console.error("[pinia-plugin-persistedstate]", e); return null; } }; } function hydrateStore(store2, { storage, serializer, key, debug }) { try { const fromStorage = storage == null ? void 0 : storage.getItem(key); if (fromStorage) store2.$patch(serializer == null ? void 0 : serializer.deserialize(fromStorage)); } catch (e) { if (debug) console.error("[pinia-plugin-persistedstate]", e); } } function persistState(state, { storage, serializer, key, paths, debug }) { try { const toStore = Array.isArray(paths) ? pick(state, paths) : state; storage.setItem(key, serializer.serialize(toStore)); } catch (e) { if (debug) console.error("[pinia-plugin-persistedstate]", e); } } function createPersistedState(factoryOptions = {}) { return (context) => { const { auto = false } = factoryOptions; const { options: { persist = auto }, store: store2, pinia } = context; if (!persist) return; if (!(store2.$id in pinia.state.value)) { const original_store = pinia._s.get(store2.$id.replace("__hot:", "")); if (original_store) Promise.resolve().then(() => original_store.$persist()); return; } const persistences = (Array.isArray(persist) ? persist.map((p) => normalizeOptions(p, factoryOptions)) : [normalizeOptions(persist, factoryOptions)]).map(parsePersistence(factoryOptions, store2)).filter(Boolean); store2.$persist = () => { persistences.forEach((persistence) => { persistState(store2.$state, persistence); }); }; store2.$hydrate = ({ runHooks = true } = {}) => { persistences.forEach((persistence) => { const { beforeRestore, afterRestore } = persistence; if (runHooks) beforeRestore == null ? void 0 : beforeRestore(context); hydrateStore(store2, persistence); if (runHooks) afterRestore == null ? void 0 : afterRestore(context); }); }; persistences.forEach((persistence) => { const { beforeRestore, afterRestore } = persistence; beforeRestore == null ? void 0 : beforeRestore(context); hydrateStore(store2, persistence); afterRestore == null ? void 0 : afterRestore(context); store2.$subscribe( (_mutation, state) => { persistState(state, persistence); }, { detached: true } ); }); }; } const store = createPinia(); store.use( createPersistedState({ storage: { getItem: uni.getStorageSync, setItem: uni.setStorageSync } }) ); function createApp() { const app = vue.createVueApp(App); app.use(uViewPro, { theme }); app.config.globalProperties.$t = i18n.global.t; app.config.globalProperties.$currency = "RMB"; uni.$t = i18n.global.t; uni.$currency = "RMB"; app.config.globalProperties.$mainColor = "#f8b932"; app.config.globalProperties.$mainBgColor = "#212121"; app.config.globalProperties.$mainTextColor = "#9ca3af"; app.component("PageContainer", PageContainer); app.use(router); app.use(store); app.use(i18n); app.component("global-ku-root", GlobalKuRoot); return { app }; } const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp(); uni.Vuex = __Vuex__; uni.Pinia = __Pinia__; __app__.provide("__globalStyles", __uniConfig.styles); __app__._component.mpType = "app"; __app__._component.render = () => { }; __app__.mount("#app"); })(Vue);