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) { var _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R; "use strict"; 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 baseUrl = "https://app.chienxutech.com:30443"; function dorequest(method2, url2, data, header = {}) { return uni.request({ method: method2, url: url2, data }); } function addlog(data, e, callback = null) { let url2 = baseUrl + "/index.php/index/Logmanger/addlog"; dorequest("post", url2, data).then((res) => { if (callback) { callback(res); } else { res = res.data; if (0 == res.code) { e.$refs.toast.show({ type: "error", message: res.errmsg }); } } }); } function islogin() { let userinfo = uni.getStorageSync("userinfo"); if (!userinfo) { return false; } return true; } function saveuserinfo(info) { uni.setStorage({ key: "userinfo", data: info, success: function() { }, fail: function(error2) { formatAppLog("log", "at common/js/common.js:42", "error"); addlog({ json: "用户信息保存失败", type: "uniapp错误" }); } }); } function tostemlistnext(startindex, next = 0, scaleid_1 = false, srid_1 = false) { startindex = parseInt(startindex) + next; let stemlist = uni.getStorageSync("stemlist"); if (!stemlist) { return false; } let item = stemlist[startindex]; if (!item) { return false; } uni.setStorage({ key: "stemitem", data: item }); if (item == void 0) { return false; } if (scaleid_1 !== false && srid_1 !== false) { if (item.stemtype < 101) { uni.navigateTo({ url: "/pages/topic/common?scaleid=" + scaleid_1 + "&srid=" + srid_1 + `&sindex=` + startindex }); } else { let url2 = "/pages/topic/" + item.stemdefinepage + "?scaleid=" + scaleid_1 + "&srid=" + srid_1 + `&sindex=` + startindex; uni.navigateTo({ url: url2 }); } } else { let scaleid = 4; let srid = uni.getStorageSync("srid"); if (item.stemtype < 101) { uni.navigateTo({ url: "/pages/topic/common?scaleid=" + scaleid + "&srid=" + srid + `&sindex=` + startindex }); } else { let url2 = "/pages/topic/" + item.stemdefinepage + "?scaleid=" + scaleid + "&srid=" + srid + `&sindex=` + startindex; uni.navigateTo({ url: url2 }); } } return true; } function tohome() { uni.redirectTo({ url: "/pages/index/index" }); } const _export_sfc = (sfc, props2) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props2) { target[key] = val; } return target; }; if (islogin()) { uni.redirectTo({ url: "/pages/index/index" }); } else { uni.redirectTo({ url: "/pages/login/login" }); } const _sfc_main$D = {}; function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) { return null; } const PagesIndexShow = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__file", "D:/workspace/uniapp/health2/pages/index/show.vue"]]); const mpMixin = {}; function email(value2) { return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2); } function mobile(value2) { return /^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/.test(value2); } function url(value2) { return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value2); } function date$1(value2) { if (!value2) return false; if (number$2(value2)) value2 = +value2; return !/Invalid|NaN/.test(new Date(value2).toString()); } function dateISO(value2) { return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2); } function number$2(value2) { return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2); } function string$1(value2) { return typeof value2 === "string"; } function digits(value2) { return /^\d+$/.test(value2); } function idCard(value2) { 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( value2 ); } function carNo(value2) { 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 (value2.length === 7) { return creg.test(value2); } if (value2.length === 8) { return xreg.test(value2); } return false; } function amount(value2) { return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2); } function chinese(value2) { const reg = /^[\u4e00-\u9fa5]+$/gi; return reg.test(value2); } function letter(value2) { return /^[a-zA-Z]*$/.test(value2); } function enOrNum(value2) { const reg = /^[0-9a-zA-Z]*$/g; return reg.test(value2); } function contains(value2, param) { return value2.indexOf(param) >= 0; } function range$2(value2, param) { return value2 >= param[0] && value2 <= param[1]; } function rangeLength(value2, param) { return value2.length >= param[0] && value2.length <= param[1]; } function landline(value2) { const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/; return reg.test(value2); } function empty(value2) { switch (typeof value2) { case "undefined": return true; case "string": if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0) return true; break; case "boolean": if (!value2) return true; break; case "number": if (value2 === 0 || isNaN(value2)) return true; break; case "object": if (value2 === null || value2.length === 0) return true; for (const i in value2) { return false; } return true; } return false; } function jsonString(value2) { if (typeof value2 === "string") { try { const obj = JSON.parse(value2); if (typeof obj === "object" && obj) { return true; } return false; } catch (e) { return false; } } return false; } function array$1(value2) { if (typeof Array.isArray === "function") { return Array.isArray(value2); } return Object.prototype.toString.call(value2) === "[object Array]"; } function object$1(value2) { return Object.prototype.toString.call(value2) === "[object Object]"; } function code(value2, len = 6) { return new RegExp(`^\\d{${len}}$`).test(value2); } function func(value2) { return typeof value2 === "function"; } function promise(value2) { return object$1(value2) && func(value2.then) && func(value2.catch); } function image(value2) { const newValue = value2.split("?")[0]; const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i; return IMAGE_REGEXP.test(newValue); } function video(value2) { const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i; return VIDEO_REGEXP.test(value2); } function regExp(o) { return o && Object.prototype.toString.call(o) === "[object RegExp]"; } const test = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, amount, array: array$1, carNo, chinese, code, contains, date: date$1, dateISO, digits, email, empty, enOrNum, func, idCard, image, jsonString, landline, letter, mobile, number: number$2, object: object$1, promise, range: range$2, rangeLength, regExp, string: string$1, url, video }, Symbol.toStringTag, { value: "Module" })); function strip(num, precision = 15) { return +parseFloat(Number(num).toPrecision(precision)); } function digitLength(num) { const eSplit = num.toString().split(/[eE]/); const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0); return len > 0 ? len : 0; } function float2Fixed(num) { if (num.toString().indexOf("e") === -1) { return Number(num.toString().replace(".", "")); } const dLen = digitLength(num); return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num); } function checkBoundary(num) { { if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) { formatAppLog("warn", "at uni_modules/uv-ui-tools/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`); } } } function iteratorOperation(arr, operation) { const [num1, num2, ...others] = arr; let res = operation(num1, num2); others.forEach((num) => { res = operation(res, num); }); return res; } function times(...nums) { if (nums.length > 2) { return iteratorOperation(nums, times); } const [num1, num2] = nums; const num1Changed = float2Fixed(num1); const num2Changed = float2Fixed(num2); const baseNum = digitLength(num1) + digitLength(num2); const leftValue = num1Changed * num2Changed; checkBoundary(leftValue); return leftValue / Math.pow(10, baseNum); } function divide(...nums) { if (nums.length > 2) { return iteratorOperation(nums, divide); } const [num1, num2] = nums; const num1Changed = float2Fixed(num1); const num2Changed = float2Fixed(num2); checkBoundary(num1Changed); checkBoundary(num2Changed); return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1)))); } function round(num, ratio2) { const base = Math.pow(10, ratio2); let result = divide(Math.round(Math.abs(times(num, base))), base); if (num < 0 && result !== 0) { result = times(result, -1); } return result; } function range$1(min = 0, max = 0, value2 = 0) { return Math.max(min, Math.min(max, Number(value2))); } function getPx(value2, unit = false) { if (number$2(value2)) { return unit ? `${value2}px` : Number(value2); } if (/(rpx|upx)$/.test(value2)) { return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2))); } return unit ? `${parseInt(value2)}px` : parseInt(value2); } function sleep(value2 = 30) { return new Promise((resolve) => { setTimeout(() => { resolve(); }, value2); }); } function os() { return uni.getSystemInfoSync().platform.toLowerCase(); } function sys() { return uni.getSystemInfoSync(); } function random(min, max) { if (min >= 0 && max > 0 && max >= min) { const gab = max - min + 1; return Math.floor(Math.random() * gab + min); } return 0; } function guid(len = 32, firstU = true, radix = null) { const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""); const uuid = []; radix = radix || chars.length; if (len) { for (let i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix]; } 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("")}`; } return uuid.join(""); } function $parent(name = void 0) { let parent = this.$parent; while (parent) { if (parent.$options && parent.$options.name !== name) { parent = parent.$parent; } else { return parent; } } return false; } function addStyle(customStyle, target = "object") { if (empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") { return customStyle; } if (target === "object") { customStyle = trim(customStyle); const styleArray = customStyle.split(";"); const style = {}; for (let i = 0; i < styleArray.length; i++) { if (styleArray[i]) { const item = styleArray[i].split(":"); style[trim(item[0])] = trim(item[1]); } } return style; } let string2 = ""; for (const i in customStyle) { const key = i.replace(/([A-Z])/g, "-$1").toLowerCase(); string2 += `${key}:${customStyle[i]};`; } return trim(string2); } function addUnit(value2 = "auto", unit = ((_b) => (_b = ((_a) => (_a = uni == null ? void 0 : uni.$uv) == null ? void 0 : _a.config)()) == null ? void 0 : _b.unit)() ? ((_d) => (_d = ((_c) => (_c = uni == null ? void 0 : uni.$uv) == null ? void 0 : _c.config)()) == null ? void 0 : _d.unit)() : "px") { value2 = String(value2); return number$2(value2) ? `${value2}${unit}` : value2; } 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, value2]) => [key, deepClone(value2, cache2)])); } else if (obj instanceof Set) { clone = new Set(Array.from(obj, (value2) => deepClone(value2, cache2))); } else if (Array.isArray(obj)) { clone = obj.map((value2) => deepClone(value2, cache2)); } else if (Object.prototype.toString.call(obj) === "[object Object]") { clone = Object.create(Object.getPrototypeOf(obj)); cache2.set(obj, clone); for (const [key, value2] of Object.entries(obj)) { clone[key] = deepClone(value2, 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 (!source.hasOwnProperty(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 error(err) { { formatAppLog("error", "at uni_modules/uv-ui-tools/libs/function/index.js:250", `uvui提示:${err}`); } } function randomArray(array2 = []) { return array2.sort(() => Math.random() - 0.5); } if (!String.prototype.padStart) { String.prototype.padStart = function(maxLength, fillString = " ") { if (Object.prototype.toString.call(fillString) !== "[object String]") { throw new TypeError( "fillString must be String" ); } const str = this; if (str.length >= maxLength) return String(str); const fillLength = maxLength - str.length; let times2 = Math.ceil(fillLength / fillString.length); while (times2 >>= 1) { fillString += fillString; if (times2 === 1) { fillString += fillString; } } return fillString.slice(0, fillLength) + str; }; } function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") { let date2; if (!dateTime) { date2 = /* @__PURE__ */ new Date(); } else if (/^\d{10}$/.test(dateTime == null ? void 0 : dateTime.toString().trim())) { date2 = new Date(dateTime * 1e3); } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) { date2 = new Date(Number(dateTime)); } else if (typeof dateTime === "string" && dateTime.includes("-") && !dateTime.includes("T")) { date2 = new Date(dateTime.replace(/-/g, "/")); } else { date2 = new Date(dateTime); } const timeSource = { "y": date2.getFullYear().toString(), // 年 "m": (date2.getMonth() + 1).toString().padStart(2, "0"), // 月 "d": date2.getDate().toString().padStart(2, "0"), // 日 "h": date2.getHours().toString().padStart(2, "0"), // 时 "M": date2.getMinutes().toString().padStart(2, "0"), // 分 "s": date2.getSeconds().toString().padStart(2, "0") // 秒 // 有其他格式化字符需求可以继续添加,必须转化成字符串 }; for (const key in timeSource) { const [ret] = new RegExp(`${key}+`).exec(formatStr) || []; if (ret) { const beginIndex = key === "y" && ret.length === 2 ? 2 : 0; formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex)); } } return formatStr; } function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") { if (timestamp == null) timestamp = Number(/* @__PURE__ */ new Date()); timestamp = parseInt(timestamp); if (timestamp.toString().length == 10) timestamp *= 1e3; let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp; timer = parseInt(timer / 1e3); let tips = ""; switch (true) { case timer < 300: tips = "刚刚"; break; case (timer >= 300 && timer < 3600): tips = `${parseInt(timer / 60)}分钟前`; break; case (timer >= 3600 && timer < 86400): tips = `${parseInt(timer / 3600)}小时前`; break; case (timer >= 86400 && timer < 2592e3): tips = `${parseInt(timer / 86400)}天前`; break; default: if (format2 === false) { if (timer >= 2592e3 && timer < 365 * 86400) { tips = `${parseInt(timer / (86400 * 30))}个月前`; } else { tips = `${parseInt(timer / (86400 * 365))}年前`; } } else { tips = timeFormat(timestamp, format2); } } return tips; } function trim(str, pos = "both") { str = String(str); if (pos == "both") { return str.replace(/^\s+|\s+$/g, ""); } if (pos == "left") { return str.replace(/^\s*/, ""); } if (pos == "right") { return str.replace(/(\s*$)/g, ""); } if (pos == "all") { return str.replace(/\s+/g, ""); } return str; } function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") { const prefix = isPrefix ? "?" : ""; const _result = []; if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1) arrayFormat = "brackets"; for (const key in data) { const value2 = data[key]; if (["", void 0, null].indexOf(value2) >= 0) { continue; } if (value2.constructor === Array) { switch (arrayFormat) { case "indices": for (let i = 0; i < value2.length; i++) { _result.push(`${key}[${i}]=${value2[i]}`); } break; case "brackets": value2.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); break; case "repeat": value2.forEach((_value) => { _result.push(`${key}=${_value}`); }); break; case "comma": let commaStr = ""; value2.forEach((_value) => { commaStr += (commaStr ? "," : "") + _value; }); _result.push(`${key}=${commaStr}`); break; default: value2.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); } } else { _result.push(`${key}=${value2}`); } } return _result.length ? prefix + _result.join("&") : ""; } function toast(title, duration = 2e3) { uni.showToast({ title: String(title), icon: "none", duration }); } function type2icon(type2 = "success", fill = false) { if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1) 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 priceFormat(number2, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") { number2 = `${number2}`.replace(/[^0-9+-Ee.]/g, ""); const n2 = !isFinite(+number2) ? 0 : +number2; const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals); const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator; const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint; let s = ""; s = (prec ? round(n2, prec) + "" : `${Math.round(n2)}`).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] += new Array(prec - s[1].length + 1).join("0"); } return s.join(dec); } function getDuration(value2, unit = true) { const valueNum = parseInt(value2); if (unit) { if (/s$/.test(value2)) return value2; return value2 > 30 ? `${value2}ms` : `${value2}s`; } if (/ms$/.test(value2)) return valueNum; if (/s$/.test(value2)) return valueNum > 30 ? valueNum : valueNum * 1e3; return valueNum; } function padZero(value2) { return `00${value2}`.slice(-2); } function formValidate(instance, event) { const formItem = $parent.call(instance, "uv-form-item"); const form = $parent.call(instance, "uv-form"); if (formItem && form) { form.validateField(formItem.prop, () => { }, event); } } function getProperty(obj, key) { if (!obj) { return; } if (typeof key !== "string" || key === "") { return ""; } if (key.indexOf(".") !== -1) { const keys = key.split("."); let firstObj = obj[keys[0]] || {}; for (let i = 1; i < keys.length; i++) { if (firstObj) { firstObj = firstObj[keys[i]]; } } return firstObj; } return obj[key]; } function setProperty(obj, key, value2) { if (!obj) { return; } const inFn = function(_obj, keys, v) { if (keys.length === 1) { _obj[keys[0]] = v; return; } while (keys.length > 1) { const k = keys[0]; if (!_obj[k] || typeof _obj[k] !== "object") { _obj[k] = {}; } keys.shift(); inFn(_obj[k], keys, v); } }; if (typeof key !== "string" || key === "") ; else if (key.indexOf(".") !== -1) { const keys = key.split("."); inFn(obj, keys, value2); } else { obj[key] = value2; } } function page() { var _a; const pages2 = getCurrentPages(); const route2 = (_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route; return `/${route2 ? route2 : ""}`; } function pages() { const pages2 = getCurrentPages(); return pages2; } function getHistoryPage(back = 0) { const pages2 = getCurrentPages(); const len = pages2.length; return pages2[len - 1 + back]; } function setConfig({ props: props2 = {}, config: config2 = {}, color = {}, zIndex = {} }) { const { deepMerge: deepMerge2 } = uni.$uv; uni.$uv.config = deepMerge2(uni.$uv.config, config2); uni.$uv.props = deepMerge2(uni.$uv.props, props2); uni.$uv.color = deepMerge2(uni.$uv.color, color); uni.$uv.zIndex = deepMerge2(uni.$uv.zIndex, zIndex); } const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, $parent, addStyle, addUnit, deepClone, deepMerge: deepMerge$1, error, formValidate, getDuration, getHistoryPage, getProperty, getPx, guid, os, padZero, page, pages, priceFormat, queryParams, random, randomArray, range: range$1, setConfig, setProperty, sleep, sys, timeFormat, timeFrom, toast, trim, type2icon }, Symbol.toStringTag, { value: "Module" })); class Router { constructor() { this.config = { type: "navigateTo", url: "", delta: 1, // navigateBack页面后退时,回退的层数 params: {}, // 传递的参数 animationType: "pop-in", // 窗口动画,只在APP有效 animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效 intercept: false, // 是否需要拦截 events: {} // 页面间通信接口,用于监听被打开页面发送到当前页面的数据。hbuilderx 2.8.9+ 开始支持。 }; 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 = queryParams(params, false); return url2 += `&${query}`; } query = queryParams(params); return url2 += query; } // 对外的方法名称 async route(options = {}, params = {}) { let mergeConfig = {}; if (typeof options === "string") { mergeConfig.url = this.mixinParam(options, params); mergeConfig.type = "navigateTo"; } else { mergeConfig = deepMerge$1(this.config, options); mergeConfig.url = this.mixinParam(options.url, options.params); } if (mergeConfig.url === page()) return; if (params.intercept) { mergeConfig.intercept = params.intercept; } mergeConfig.params = params; mergeConfig = deepMerge$1(this.config, mergeConfig); if (typeof mergeConfig.intercept === "function") { const isNext = await new Promise((resolve, reject) => { mergeConfig.intercept(mergeConfig, resolve); }); isNext && this.openPage(mergeConfig); } else { this.openPage(mergeConfig); } } // 执行路由跳转 openPage(config2) { const { url: url2, type: type2, delta, animationType, animationDuration, events } = config2; if (config2.type == "navigateTo" || config2.type == "to") { uni.navigateTo({ url: url2, animationType, animationDuration, events }); } if (config2.type == "redirectTo" || config2.type == "redirect") { uni.redirectTo({ url: url2 }); } if (config2.type == "switchTab" || config2.type == "tab") { uni.switchTab({ url: url2 }); } if (config2.type == "reLaunch" || config2.type == "launch") { uni.reLaunch({ url: url2 }); } if (config2.type == "navigateBack" || config2.type == "back") { uni.navigateBack({ delta }); } } } const route = new Router().route; let timeout = null; function debounce(func2, wait = 500, immediate = false) { if (timeout !== null) clearTimeout(timeout); if (immediate) { const callNow = !timeout; timeout = setTimeout(() => { timeout = null; }, wait); if (callNow) typeof func2 === "function" && func2(); } else { timeout = setTimeout(() => { typeof func2 === "function" && func2(); }, wait); } } let flag; function throttle(func2, wait = 500, immediate = true) { if (immediate) { if (!flag) { flag = true; typeof func2 === "function" && func2(); setTimeout(() => { flag = false; }, wait); } } else if (!flag) { flag = true; setTimeout(() => { flag = false; typeof func2 === "function" && func2(); }, wait); } } const mixin = { // 定义每个组件都可能需要用到的外部样式以及类名 props: { // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式 customStyle: { type: [Object, String], default: () => ({}) }, customClass: { type: String, default: "" }, // 跳转的页面路径 url: { type: String, default: "" }, // 页面跳转的类型 linkType: { type: String, default: "navigateTo" } }, data() { return {}; }, onLoad() { this.$uv.getRect = this.$uvGetRect; }, created() { this.$uv.getRect = this.$uvGetRect; }, computed: { $uv() { var _a, _b; return { ...index, test, route, debounce, throttle, unit: (_b = (_a = uni == null ? void 0 : uni.$uv) == null ? void 0 : _a.config) == null ? void 0 : _b.unit }; }, /** * 生成bem规则类名 * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用 * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式 * @param {String} name 组件名称 * @param {Array} fixed 一直会存在的类名 * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名 * @returns {Array|string} */ bem() { return function(name, fixed, change) { const prefix = `uv-${name}--`; const classes = {}; if (fixed) { fixed.map((item) => { classes[prefix + this[item]] = true; }); } if (change) { change.map((item) => { this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item]; }); } return Object.keys(classes); }; } }, methods: { // 跳转某一个页面 openPage(urlKey = "url") { const url2 = this[urlKey]; if (url2) { uni[this.linkType]({ url: url2 }); } }, // 查询节点信息 // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21) // 解决办法为在组件根部再套一个没有任何作用的view元素 $uvGetRect(selector, all) { return new Promise((resolve) => { uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => { if (all && Array.isArray(rect) && rect.length) { resolve(rect); } if (!all && rect) { resolve(rect); } }).exec(); }); }, getParentData(parentName = "") { if (!this.parent) this.parent = {}; this.parent = this.$uv.$parent.call(this, parentName); if (this.parent.children) { this.parent.children.indexOf(this) === -1 && this.parent.children.push(this); } if (this.parent && this.parentData) { Object.keys(this.parentData).map((key) => { this.parentData[key] = this.parent[key]; }); } }, // 阻止事件冒泡 preventEvent(e) { e && typeof e.stopPropagation === "function" && e.stopPropagation(); }, // 空操作 noop(e) { this.preventEvent(e); } }, onReachBottom() { uni.$emit("uvOnReachBottom"); }, beforeDestroy() { if (this.parent && array$1(this.parent.children)) { const childrenList = this.parent.children; childrenList.map((child, index2) => { if (child === this) { childrenList.splice(index2, 1); } }); } }, // 兼容vue3 unmounted() { if (this.parent && array$1(this.parent.children)) { const childrenList = this.parent.children; childrenList.map((child, index2) => { if (child === this) { childrenList.splice(index2, 1); } }); } } }; class MPAnimation { constructor(options, _this) { this.options = options; this.animation = uni.createAnimation({ ...options }); this.currentStepAnimates = {}; this.next = 0; this.$ = _this; } _nvuePushAnimates(type2, args) { let aniObj = this.currentStepAnimates[this.next]; let styles = {}; if (!aniObj) { styles = { styles: {}, config: {} }; } else { styles = aniObj; } if (animateTypes1.includes(type2)) { if (!styles.styles.transform) { styles.styles.transform = ""; } let unit = ""; if (type2 === "rotate") { unit = "deg"; } styles.styles.transform += `${type2}(${args + unit}) `; } else { styles.styles[type2] = `${args}`; } this.currentStepAnimates[this.next] = styles; } _animateRun(styles = {}, config2 = {}) { let ref = this.$.$refs["ani"].ref; if (!ref) return; return new Promise((resolve, reject) => { nvueAnimation.transition(ref, { styles, ...config2 }, (res) => { resolve(); }); }); } _nvueNextAnimate(animates, step = 0, fn) { let obj = animates[step]; if (obj) { let { styles, config: config2 } = obj; this._animateRun(styles, config2).then(() => { step += 1; this._nvueNextAnimate(animates, step, fn); }); } else { this.currentStepAnimates = {}; typeof fn === "function" && fn(); this.isEnd = true; } } step(config2 = {}) { this.animation.step(config2); return this; } run(fn) { this.$.animationData = this.animation.export(); this.$.timer = setTimeout(() => { typeof fn === "function" && fn(); }, this.$.durationTime); } } const animateTypes1 = [ "matrix", "matrix3d", "rotate", "rotate3d", "rotateX", "rotateY", "rotateZ", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "skew", "skewX", "skewY", "translate", "translate3d", "translateX", "translateY", "translateZ" ]; const animateTypes2 = ["opacity", "backgroundColor"]; const animateTypes3 = ["width", "height", "left", "right", "top", "bottom"]; animateTypes1.concat(animateTypes2, animateTypes3).forEach((type2) => { MPAnimation.prototype[type2] = function(...args) { this.animation[type2](...args); return this; }; }); function createAnimation(option, _this) { if (!_this) return; clearTimeout(_this.timer); return new MPAnimation(option, _this); } const _sfc_main$C = { name: "uv-transition", mixins: [mpMixin, mixin], emits: ["click", "change"], props: { // 是否展示组件 show: { type: Boolean, default: false }, // 使用的动画模式 mode: { type: [Array, String, null], default() { return "fade"; } }, // 动画的执行时间,单位ms duration: { type: [String, Number], default: 300 }, // 使用的动画过渡函数 timingFunction: { type: String, default: "ease-out" }, customClass: { type: String, default: "" }, // nvue模式下 是否直接显示,在uv-list等cell下面使用就需要设置 cellChild: { type: Boolean, default: false } }, data() { return { isShow: false, transform: "", opacity: 1, animationData: {}, durationTime: 300, config: {} }; }, watch: { show: { handler(newVal) { if (newVal) { this.open(); } else { if (this.isShow) { this.close(); } } }, immediate: true } }, computed: { // 初始化动画条件 transformStyles() { const style = { transform: this.transform, opacity: this.opacity, ...this.$uv.addStyle(this.customStyle), "transition-duration": `${this.duration / 1e3}s` }; return this.$uv.addStyle(style, "string"); } }, created() { this.config = { duration: this.duration, timingFunction: this.timingFunction, transformOrigin: "50% 50%", delay: 0 }; this.durationTime = this.duration; }, methods: { /** * ref 触发 初始化动画 */ init(obj = {}) { if (obj.duration) { this.durationTime = obj.duration; } this.animation = createAnimation(Object.assign(this.config, obj), this); }, /** * 点击组件触发回调 */ onClick() { this.$emit("click", { detail: this.isShow }); }, /** * ref 触发 动画分组 * @param {Object} obj */ step(obj, config2 = {}) { if (!this.animation) return; for (let i in obj) { try { if (typeof obj[i] === "object") { this.animation[i](...obj[i]); } else { this.animation[i](obj[i]); } } catch (e) { formatAppLog("error", "at uni_modules/uv-transition/components/uv-transition/uv-transition.vue:166", `方法 ${i} 不存在`); } } this.animation.step(config2); return this; }, /** * ref 触发 执行动画 */ run(fn) { if (!this.animation) return; this.animation.run(fn); }, // 开始过度动画 open() { clearTimeout(this.timer); this.transform = ""; this.isShow = true; let { opacity, transform } = this.styleInit(false); if (typeof opacity !== "undefined") { this.opacity = opacity; } this.transform = transform; this.$nextTick(() => { this.timer = setTimeout(() => { this.animation = createAnimation(this.config, this); this.tranfromInit(false).step(); this.animation.run(); this.$emit("change", { detail: this.isShow }); }, 20); }); }, // 关闭过渡动画 close(type2) { if (!this.animation) return; this.tranfromInit(true).step().run(() => { this.isShow = false; this.animationData = null; this.animation = null; let { opacity, transform } = this.styleInit(false); this.opacity = opacity || 1; this.transform = transform; this.$emit("change", { detail: this.isShow }); }); }, // 处理动画开始前的默认样式 styleInit(type2) { let styles = { transform: "" }; let buildStyle = (type3, mode) => { if (mode === "fade") { styles.opacity = this.animationType(type3)[mode]; } else { styles.transform += this.animationType(type3)[mode] + " "; } }; if (typeof this.mode === "string") { buildStyle(type2, this.mode); } else { this.mode.forEach((mode) => { buildStyle(type2, mode); }); } return styles; }, // 处理内置组合动画 tranfromInit(type2) { let buildTranfrom = (type3, mode) => { let aniNum = null; if (mode === "fade") { aniNum = type3 ? 0 : 1; } else { aniNum = type3 ? "-100%" : "0"; if (mode === "zoom-in") { aniNum = type3 ? 0.8 : 1; } if (mode === "zoom-out") { aniNum = type3 ? 1.2 : 1; } if (mode === "slide-right") { aniNum = type3 ? "100%" : "0"; } if (mode === "slide-bottom") { aniNum = type3 ? "100%" : "0"; } } this.animation[this.animationMode()[mode]](aniNum); }; if (typeof this.mode === "string") { buildTranfrom(type2, this.mode); } else { this.mode.forEach((mode) => { buildTranfrom(type2, mode); }); } return this.animation; }, animationType(type2) { return { fade: type2 ? 1 : 0, "slide-top": `translateY(${type2 ? "0" : "-100%"})`, "slide-right": `translateX(${type2 ? "0" : "100%"})`, "slide-bottom": `translateY(${type2 ? "0" : "100%"})`, "slide-left": `translateX(${type2 ? "0" : "-100%"})`, "zoom-in": `scaleX(${type2 ? 1 : 0.8}) scaleY(${type2 ? 1 : 0.8})`, "zoom-out": `scaleX(${type2 ? 1 : 1.2}) scaleY(${type2 ? 1 : 1.2})` }; }, // 内置动画类型与实际动画对应字典 animationMode() { return { fade: "opacity", "slide-top": "translateY", "slide-right": "translateX", "slide-bottom": "translateY", "slide-left": "translateX", "zoom-in": "scale", "zoom-out": "scale" }; }, // 驼峰转中横线 toLine(name) { return name.replace(/([A-Z])/g, "-$1").toLowerCase(); } } }; function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) { return $data.isShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, ref: "ani", animation: $data.animationData, class: vue.normalizeClass($props.customClass), style: vue.normalizeStyle($options.transformStyles), onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "default") ], 14, ["animation"])) : vue.createCommentVNode("v-if", true); } const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-transition/components/uv-transition/uv-transition.vue"]]); const props$i = { props: { // 是否显示遮罩 show: { type: Boolean, default: false }, // 层级z-index zIndex: { type: [String, Number], default: 10070 }, // 遮罩的过渡时间,单位为ms duration: { type: [String, Number], default: 300 }, // 不透明度值,当做rgba的第四个参数 opacity: { type: [String, Number], default: 0.5 }, ...(_f = (_e = uni.$uv) == null ? void 0 : _e.props) == null ? void 0 : _f.overlay } }; const _sfc_main$B = { name: "uv-overlay", emits: ["click"], mixins: [mpMixin, mixin, props$i], watch: { show(newVal) { } }, computed: { overlayStyle() { const style = { position: "fixed", top: 0, left: 0, right: 0, zIndex: this.zIndex, bottom: 0, "background-color": `rgba(0, 0, 0, ${this.opacity})` }; return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); } }, methods: { clickHandler() { this.$emit("click"); }, clear() { } } }; function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_transition = resolveEasycom(vue.resolveDynamicComponent("uv-transition"), __easycom_4$1); return vue.openBlock(), vue.createBlock(_component_uv_transition, { show: _ctx.show, mode: "fade", "custom-class": "uv-overlay", duration: _ctx.duration, "custom-style": $options.overlayStyle, onClick: $options.clickHandler, onTouchmove: vue.withModifiers($options.clear, ["stop", "prevent"]) }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), _: 3 /* FORWARDED */ }, 8, ["show", "duration", "custom-style", "onClick", "onTouchmove"]); } const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-7303e1aa"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-overlay/components/uv-overlay/uv-overlay.vue"]]); function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) { const startRGB = hexToRgb(startColor, false); const startR = startRGB[0]; const startG = startRGB[1]; const startB = startRGB[2]; const endRGB = hexToRgb(endColor, false); const endR = endRGB[0]; const endG = endRGB[1]; const endB = endRGB[2]; const sR = (endR - startR) / step; const sG = (endG - startG) / step; const sB = (endB - startB) / step; const colorArr = []; for (let i = 0; i < step; i++) { let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`); if (i === 0) hex = rgbToHex(startColor); if (i === step - 1) hex = rgbToHex(endColor); colorArr.push(hex); } return colorArr; } function hexToRgb(sColor, str = true) { const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; sColor = String(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 = []; for (let i = 1; i < 7; i += 2) { sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`)); } if (!str) { return sColorChange; } return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`; } if (/^(rgb|RGB)/.test(sColor)) { const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); return arr.map((val) => Number(val)); } return sColor; } function rgbToHex(rgb) { const _this = rgb; const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; if (/^(rgb|RGB)/.test(_this)) { const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); let strHex = "#"; for (let i = 0; i < aColor.length; i++) { let hex = Number(aColor[i]).toString(16); hex = String(hex).length == 1 ? `${0}${hex}` : hex; if (hex === "0") { hex += hex; } strHex += hex; } if (strHex.length !== 7) { strHex = _this; } return strHex; } if (reg.test(_this)) { const aNum = _this.replace(/#/, "").split(""); if (aNum.length === 6) { return _this; } if (aNum.length === 3) { let numHex = "#"; for (let i = 0; i < aNum.length; i += 1) { numHex += aNum[i] + aNum[i]; } return numHex; } } else { return _this; } } const props$h = { props: { // 是否显示组件 show: { type: Boolean, default: true }, // 颜色 color: { type: String, default: "#909193" }, // 提示文字颜色 textColor: { type: String, default: "#909193" }, // 文字和图标是否垂直排列 vertical: { type: Boolean, default: false }, // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 mode: { type: String, default: "spinner" }, // 图标大小,单位默认px size: { type: [String, Number], default: 24 }, // 文字大小 textSize: { type: [String, Number], default: 15 }, // 文字样式 textStyle: { type: Object, default() { return {}; } }, // 文字内容 text: { type: [String, Number], default: "" }, // 动画模式 https://www.runoob.com/cssref/css3-pr-animation-timing-function.html timingFunction: { type: String, default: "linear" }, // 动画执行周期时间 duration: { type: [String, Number], default: 1200 }, // mode=circle时的暗边颜色 inactiveColor: { type: String, default: "" }, ...(_h = (_g = uni.$uv) == null ? void 0 : _g.props) == null ? void 0 : _h.loadingIcon } }; const _sfc_main$A = { name: "uv-loading-icon", mixins: [mpMixin, mixin, props$h], data() { return { // Array.form可以通过一个伪数组对象创建指定长度的数组 // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from array12: Array.from({ length: 12 }), // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行 // 在iOS nvue上,则会一开始默认执行两个周期的动画 aniAngel: 360, // 动画旋转角度 webviewHide: false, // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗 loading: false // 是否运行中,针对nvue使用 }; }, computed: { // 当为circle类型时,给其另外三边设置一个更轻一些的颜色 // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色 // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好) otherBorderColor() { const lightColor = colorGradient(this.color, "#ffffff", 100)[80]; if (this.mode === "circle") { return this.inactiveColor ? this.inactiveColor : lightColor; } else { return "transparent"; } } }, watch: { show(n2) { } }, mounted() { this.init(); }, methods: { init() { setTimeout(() => { this.show && this.addEventListenerToWebview(); }, 20); }, // 监听webview的显示与隐藏 addEventListenerToWebview() { const pages2 = getCurrentPages(); const page2 = pages2[pages2.length - 1]; const currentWebview = page2.$getAppWebview(); currentWebview.addEventListener("hide", () => { this.webviewHide = true; }); currentWebview.addEventListener("show", () => { this.webviewHide = false; }); } } }; function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uv-loading-icon", [_ctx.vertical && "uv-loading-icon--vertical"]]), style: vue.normalizeStyle([_ctx.$uv.addStyle(_ctx.customStyle)]) }, [ !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uv-loading-icon__spinner", [`uv-loading-icon__spinner--${_ctx.mode}`]]), ref: "ani", style: vue.normalizeStyle({ color: _ctx.color, width: _ctx.$uv.addUnit(_ctx.size), height: _ctx.$uv.addUnit(_ctx.size), borderTopColor: _ctx.color, borderBottomColor: $options.otherBorderColor, borderLeftColor: $options.otherBorderColor, borderRightColor: $options.otherBorderColor, "animation-duration": `${_ctx.duration}ms`, "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : "" }) }, [ _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.array12, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "uv-loading-icon__dot" }); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "uv-loading-icon__text", style: vue.normalizeStyle([{ fontSize: _ctx.$uv.addUnit(_ctx.textSize), color: _ctx.textColor }, _ctx.$uv.addStyle(_ctx.textStyle)]) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-29b619ea"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.vue"]]); const icons = { "uvicon-level": "e68f", "uvicon-checkbox-mark": "e659", "uvicon-folder": "e694", "uvicon-movie": "e67c", "uvicon-star-fill": "e61e", "uvicon-star": "e618", "uvicon-phone-fill": "e6ac", "uvicon-phone": "e6ba", "uvicon-apple-fill": "e635", "uvicon-backspace": "e64d", "uvicon-attach": "e640", "uvicon-empty-data": "e671", "uvicon-empty-address": "e68a", "uvicon-empty-favor": "e662", "uvicon-empty-car": "e657", "uvicon-empty-order": "e66b", "uvicon-empty-list": "e672", "uvicon-empty-search": "e677", "uvicon-empty-permission": "e67d", "uvicon-empty-news": "e67e", "uvicon-empty-history": "e685", "uvicon-empty-coupon": "e69b", "uvicon-empty-page": "e60e", "uvicon-empty-wifi-off": "e6cc", "uvicon-reload": "e627", "uvicon-order": "e695", "uvicon-server-man": "e601", "uvicon-search": "e632", "uvicon-more-dot-fill": "e66f", "uvicon-scan": "e631", "uvicon-map": "e665", "uvicon-map-fill": "e6a8", "uvicon-tags": "e621", "uvicon-tags-fill": "e613", "uvicon-eye": "e664", "uvicon-eye-fill": "e697", "uvicon-eye-off": "e69c", "uvicon-eye-off-outline": "e688", "uvicon-mic": "e66d", "uvicon-mic-off": "e691", "uvicon-calendar": "e65c", "uvicon-trash": "e623", "uvicon-trash-fill": "e6ce", "uvicon-play-left": "e6bf", "uvicon-play-right": "e6b3", "uvicon-minus": "e614", "uvicon-plus": "e625", "uvicon-info-circle": "e69f", "uvicon-info-circle-fill": "e6a7", "uvicon-question-circle": "e622", "uvicon-question-circle-fill": "e6bc", "uvicon-close": "e65a", "uvicon-checkmark": "e64a", "uvicon-checkmark-circle": "e643", "uvicon-checkmark-circle-fill": "e668", "uvicon-setting": "e602", "uvicon-setting-fill": "e6d0", "uvicon-heart": "e6a2", "uvicon-heart-fill": "e68b", "uvicon-camera": "e642", "uvicon-camera-fill": "e650", "uvicon-more-circle": "e69e", "uvicon-more-circle-fill": "e684", "uvicon-chat": "e656", "uvicon-chat-fill": "e63f", "uvicon-bag": "e647", "uvicon-error-circle": "e66e", "uvicon-error-circle-fill": "e655", "uvicon-close-circle": "e64e", "uvicon-close-circle-fill": "e666", "uvicon-share": "e629", "uvicon-share-fill": "e6bb", "uvicon-share-square": "e6c4", "uvicon-shopping-cart": "e6cb", "uvicon-shopping-cart-fill": "e630", "uvicon-bell": "e651", "uvicon-bell-fill": "e604", "uvicon-list": "e690", "uvicon-list-dot": "e6a9", "uvicon-zhifubao-circle-fill": "e617", "uvicon-weixin-circle-fill": "e6cd", "uvicon-weixin-fill": "e620", "uvicon-qq-fill": "e608", "uvicon-qq-circle-fill": "e6b9", "uvicon-moments-circel-fill": "e6c2", "uvicon-moments": "e6a0", "uvicon-car": "e64f", "uvicon-car-fill": "e648", "uvicon-warning-fill": "e6c7", "uvicon-warning": "e6c1", "uvicon-clock-fill": "e64b", "uvicon-clock": "e66c", "uvicon-edit-pen": "e65d", "uvicon-edit-pen-fill": "e679", "uvicon-email": "e673", "uvicon-email-fill": "e683", "uvicon-minus-circle": "e6a5", "uvicon-plus-circle": "e603", "uvicon-plus-circle-fill": "e611", "uvicon-file-text": "e687", "uvicon-file-text-fill": "e67f", "uvicon-pushpin": "e6d1", "uvicon-pushpin-fill": "e6b6", "uvicon-grid": "e68c", "uvicon-grid-fill": "e698", "uvicon-play-circle": "e6af", "uvicon-play-circle-fill": "e62a", "uvicon-pause-circle-fill": "e60c", "uvicon-pause": "e61c", "uvicon-pause-circle": "e696", "uvicon-gift-fill": "e6b0", "uvicon-gift": "e680", "uvicon-kefu-ermai": "e660", "uvicon-server-fill": "e610", "uvicon-coupon-fill": "e64c", "uvicon-coupon": "e65f", "uvicon-integral": "e693", "uvicon-integral-fill": "e6b1", "uvicon-home-fill": "e68e", "uvicon-home": "e67b", "uvicon-account": "e63a", "uvicon-account-fill": "e653", "uvicon-thumb-down-fill": "e628", "uvicon-thumb-down": "e60a", "uvicon-thumb-up": "e612", "uvicon-thumb-up-fill": "e62c", "uvicon-lock-fill": "e6a6", "uvicon-lock-open": "e68d", "uvicon-lock-opened-fill": "e6a1", "uvicon-lock": "e69d", "uvicon-red-packet": "e6c3", "uvicon-photo-fill": "e6b4", "uvicon-photo": "e60d", "uvicon-volume-off-fill": "e6c8", "uvicon-volume-off": "e6bd", "uvicon-volume-fill": "e624", "uvicon-volume": "e605", "uvicon-download": "e670", "uvicon-arrow-up-fill": "e636", "uvicon-arrow-down-fill": "e638", "uvicon-play-left-fill": "e6ae", "uvicon-play-right-fill": "e6ad", "uvicon-arrow-downward": "e634", "uvicon-arrow-leftward": "e63b", "uvicon-arrow-rightward": "e644", "uvicon-arrow-upward": "e641", "uvicon-arrow-down": "e63e", "uvicon-arrow-right": "e63c", "uvicon-arrow-left": "e646", "uvicon-arrow-up": "e633", "uvicon-skip-back-left": "e6c5", "uvicon-skip-forward-right": "e61f", "uvicon-arrow-left-double": "e637", "uvicon-man": "e675", "uvicon-woman": "e626", "uvicon-en": "e6b8", "uvicon-twitte": "e607", "uvicon-twitter-circle-fill": "e6cf" }; const props$g = { props: { // 图标类名 name: { type: String, default: "" }, // 图标颜色,可接受主题色 color: { type: String, default: "#606266" }, // 字体大小,单位px size: { type: [String, Number], default: "16px" }, // 是否显示粗体 bold: { type: Boolean, default: false }, // 点击图标的时候传递事件出去的index(用于区分点击了哪一个) index: { type: [String, Number], default: null }, // 触摸图标时的类名 hoverClass: { type: String, default: "" }, // 自定义扩展前缀,方便用户扩展自己的图标库 customPrefix: { type: String, default: "uvicon" }, // 图标右边或者下面的文字 label: { type: [String, Number], default: "" }, // label的位置,只能右边或者下边 labelPos: { type: String, default: "right" }, // label的大小 labelSize: { type: [String, Number], default: "15px" }, // label的颜色 labelColor: { type: String, default: "#606266" }, // label与图标的距离 space: { type: [String, Number], default: "3px" }, // 图片的mode imgMode: { type: String, default: "aspectFit" }, // 用于显示图片小图标时,图片的宽度 width: { type: [String, Number], default: "" }, // 用于显示图片小图标时,图片的高度 height: { type: [String, Number], default: "" }, // 用于解决某些情况下,让图标垂直居中的用途 top: { type: [String, Number], default: 0 }, // 是否阻止事件传播 stop: { type: Boolean, default: false }, ...(_j = (_i = uni.$uv) == null ? void 0 : _i.props) == null ? void 0 : _j.icon } }; const _sfc_main$z = { name: "uv-icon", emits: ["click"], mixins: [mpMixin, mixin, props$g], data() { return { colorType: [ "primary", "success", "info", "error", "warning" ] }; }, computed: { uClasses() { let classes = []; classes.push(this.customPrefix); classes.push(this.customPrefix + "-" + this.name); if (this.color && this.colorType.includes(this.color)) classes.push("uv-icon__icon--" + this.color); return classes; }, iconStyle() { let style = {}; style = { fontSize: this.$uv.addUnit(this.size), lineHeight: this.$uv.addUnit(this.size), fontWeight: this.bold ? "bold" : "normal", // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中 top: this.$uv.addUnit(this.top) }; if (this.color && !this.colorType.includes(this.color)) style.color = this.color; return style; }, // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式 isImg() { const isBase64 = this.name.indexOf("data:") > -1 && this.name.indexOf("base64") > -1; return this.name.indexOf("/") !== -1 || isBase64; }, imgStyle() { let style = {}; style.width = this.width ? this.$uv.addUnit(this.width) : this.$uv.addUnit(this.size); style.height = this.height ? this.$uv.addUnit(this.height) : this.$uv.addUnit(this.size); return style; }, // 通过图标名,查找对应的图标 icon() { const code2 = icons["uvicon-" + this.name]; return code2 ? unescape(`%u${code2}`) : ["uvicon"].indexOf(this.customPrefix) > -1 ? this.name : ""; } }, methods: { clickHandler(e) { this.$emit("click", this.index); this.stop && this.preventEvent(e); } } }; function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uv-icon", ["uv-icon--" + _ctx.labelPos]]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "uv-icon__img", src: _ctx.name, mode: _ctx.imgMode, style: vue.normalizeStyle([$options.imgStyle, _ctx.$uv.addStyle(_ctx.customStyle)]) }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: vue.normalizeClass(["uv-icon__icon", $options.uClasses]), style: vue.normalizeStyle([$options.iconStyle, _ctx.$uv.addStyle(_ctx.customStyle)]), "hover-class": _ctx.hoverClass }, vue.toDisplayString($options.icon), 15, ["hover-class"])), vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '), _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "uv-icon__label", style: vue.normalizeStyle({ color: _ctx.labelColor, fontSize: _ctx.$uv.addUnit(_ctx.labelSize), marginLeft: _ctx.labelPos == "right" ? _ctx.$uv.addUnit(_ctx.space) : 0, marginTop: _ctx.labelPos == "bottom" ? _ctx.$uv.addUnit(_ctx.space) : 0, marginRight: _ctx.labelPos == "left" ? _ctx.$uv.addUnit(_ctx.space) : 0, marginBottom: _ctx.labelPos == "top" ? _ctx.$uv.addUnit(_ctx.space) : 0 }) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); } const __easycom_3$4 = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-b7a6dd5d"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-icon/components/uv-icon/uv-icon.vue"]]); const props$f = { props: { // 背景颜色(默认transparent) bgColor: { type: String, default: "transparent" }, // 分割槽高度,单位px(默认20) height: { type: [String, Number], default: 20 }, // 与上一个组件的距离 marginTop: { type: [String, Number], default: 0 }, // 与下一个组件的距离 marginBottom: { type: [String, Number], default: 0 }, ...(_l = (_k = uni.$uv) == null ? void 0 : _k.props) == null ? void 0 : _l.gap } }; const _sfc_main$y = { name: "uv-gap", mixins: [mpMixin, mixin, props$f], computed: { gapStyle() { const style = { backgroundColor: this.bgColor, height: this.$uv.addUnit(this.height), marginTop: this.$uv.addUnit(this.marginTop), marginBottom: this.$uv.addUnit(this.marginBottom) }; return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); } } }; function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "uv-gap", style: vue.normalizeStyle([$options.gapStyle]) }, null, 4 /* STYLE */ ); } const __easycom_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-gap/components/uv-gap/uv-gap.vue"]]); const _sfc_main$x = { name: "uv-toast", mixins: [mpMixin, mixin], data() { return { isShow: false, timer: null, // 定时器 config: { message: "", // 显示文本 type: "", // 主题类型,primary,success,error,warning,black duration: 2e3, // 显示的时间,毫秒 icon: true, // 显示的图标 position: "center", // toast出现的位置 complete: null, // 执行完后的回调函数 overlay: true, // 是否防止触摸穿透 loading: false, // 是否加载中状态 zIndex: 10090 //弹出的层级 }, tmpConfig: {}, // 将用户配置和内置配置合并后的临时配置变量 rect: {}, opacity: 0 }; }, computed: { iconName() { if (!this.tmpConfig.icon || this.tmpConfig.icon == "none") { return ""; } if (["error", "warning", "success", "primary"].includes(this.tmpConfig.type)) { return this.$uv.type2icon(this.tmpConfig.type); } else { return ""; } }, overlayStyle() { const style = { justifyContent: "center", alignItems: "center", display: "flex", zIndex: this.tmpConfig.zIndex }; style.backgroundColor = "rgba(0, 0, 0, 0)"; return style; }, iconStyle() { const style = {}; style.marginRight = "4px"; return style; }, aniStyle() { const style = { position: "fixed", zIndex: this.tmpConfig.zIndex }; return style; }, // 内容盒子的样式 contentStyle() { this.$uv.sys(); const style = { position: "fixed", top: "50%", left: "50%" }; let value2 = 0; if (this.tmpConfig.position === "top") { style.top = "25%"; } else if (this.tmpConfig.position === "bottom") { style.top = "75%"; } else { value2 = "-50%"; } style.transform = `translate(-50%,${value2})`; return style; } }, created() { ["primary", "success", "error", "warning", "default", "loading"].map((item) => { this[item] = (message) => this.show({ type: item, message }); }); }, methods: { // 显示toast组件,由父组件通过this.$refs.xxx.show(options)形式调用 show(options) { this.tmpConfig = this.$uv.deepMerge(this.config, options); this.clearTimer(); this.isShow = true; this.timer = setTimeout(() => { this.clearTimer(); typeof this.tmpConfig.complete === "function" && this.tmpConfig.complete(); }, this.tmpConfig.duration); }, // 查询内容高度 queryRect() { return new Promise((resolve) => { const ref = this.$refs["uvToastContent"]; dom.getComponentRect(ref, (res) => { resolve(res.size); }); }); }, // 隐藏toast组件,由父组件通过this.$refs.xxx.hide()形式调用 hide() { this.clearTimer(); }, clearTimer() { this.isShow = false; clearTimeout(this.timer); this.timer = null; } }, unmounted() { this.clearTimer(); } }; function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_overlay = resolveEasycom(vue.resolveDynamicComponent("uv-overlay"), __easycom_0$3); const _component_uv_loading_icon = resolveEasycom(vue.resolveDynamicComponent("uv-loading-icon"), __easycom_1$4); const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_3$4); const _component_uv_gap = resolveEasycom(vue.resolveDynamicComponent("uv-gap"), __easycom_3$3); const _component_uv_transition = resolveEasycom(vue.resolveDynamicComponent("uv-transition"), __easycom_4$1); return vue.openBlock(), vue.createElementBlock("view", { class: "uv-toast" }, [ vue.createVNode(_component_uv_overlay, { show: $data.isShow && $data.tmpConfig.overlay, "custom-style": $options.overlayStyle }, null, 8, ["show", "custom-style"]), vue.createVNode(_component_uv_transition, { show: $data.isShow, mode: "fade", "custom-style": $options.aniStyle }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uv-toast__content", ["uv-type-" + $data.tmpConfig.type, $data.tmpConfig.type === "loading" || $data.tmpConfig.loading ? "uv-toast__content--loading" : ""]]), ref: "uvToastContent", style: vue.normalizeStyle([$options.contentStyle]) }, [ $data.tmpConfig.type === "loading" ? (vue.openBlock(), vue.createBlock(_component_uv_loading_icon, { key: 0, mode: "circle", color: "rgb(255, 255, 255)", inactiveColor: "rgb(120, 120, 120)", size: "25" })) : $data.tmpConfig.type !== "defalut" && $options.iconName ? (vue.openBlock(), vue.createBlock(_component_uv_icon, { key: 1, name: $options.iconName, size: "17", color: $data.tmpConfig.type, customStyle: $options.iconStyle }, null, 8, ["name", "color", "customStyle"])) : vue.createCommentVNode("v-if", true), $data.tmpConfig.type === "loading" || $data.tmpConfig.loading ? (vue.openBlock(), vue.createBlock(_component_uv_gap, { key: 2, height: "12", bgColor: "transparent" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: vue.normalizeClass(["uv-toast__content__text", ["uv-toast__content__text--" + $data.tmpConfig.type]]), style: { "max-width": "400rpx" } }, vue.toDisplayString($data.tmpConfig.message), 3 /* TEXT, CLASS */ ) ], 6 /* CLASS, STYLE */ ) ]), _: 1 /* STABLE */ }, 8, ["show", "custom-style"]) ]); } const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-70f56d7c"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-toast/components/uv-toast/uv-toast.vue"]]); const props$e = { props: { // 文字颜色 color: { type: String, default: "" }, // 字体大小,单位px fontSize: { type: [String, Number], default: 14 }, // 是否显示下划线 underLine: { type: Boolean, default: false }, // 要跳转的链接 href: { type: String, default: "" }, // 小程序中复制到粘贴板的提示语 mpTips: { type: String, default: "链接已复制,请在浏览器打开" }, // 下划线颜色 lineColor: { type: String, default: "" }, // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色 text: { type: String, default: "" }, ...(_n = (_m = uni.$uv) == null ? void 0 : _m.props) == null ? void 0 : _n.link } }; const _sfc_main$w = { name: "uv-link", emits: ["click"], mixins: [mpMixin, mixin, props$e], computed: { linkStyle() { const style = { color: this.color, fontSize: this.$uv.addUnit(this.fontSize), // line-height设置为比字体大小多2px lineHeight: this.$uv.addUnit(this.$uv.getPx(this.fontSize) + 2), textDecoration: this.underLine ? "underline" : "none" }; return style; } }, methods: { openLink() { plus.runtime.openURL(this.href); this.$emit("click"); } } }; function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "text", { class: "uv-link", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])), style: vue.normalizeStyle([$options.linkStyle, _ctx.$uv.addStyle(_ctx.customStyle)]) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ ); } const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-86e87617"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-link/components/uv-link/uv-link.vue"]]); const value$1 = { computed: { // 经处理后需要显示的值 value() { const { text, mode, format: format2, href } = this; if (mode === "price") { if (!/^\d+(\.\d+)?$/.test(text)) { error("金额模式下,text参数需要为金额格式"); } if (func(format2)) { return format2(text); } return priceFormat(text, 2); } if (mode === "date") { !date$1(text) && error("日期模式下,text参数需要为日期或时间戳格式"); if (func(format2)) { return format2(text); } if (format2) { return timeFormat(text, format2); } return timeFormat(text, "yyyy-mm-dd"); } if (mode === "phone") { if (func(format2)) { return format2(text); } if (format2 === "encrypt") { return `${text.substr(0, 3)}****${text.substr(7)}`; } return text; } if (mode === "name") { !(typeof text === "string") && error("姓名模式下,text参数需要为字符串格式"); if (func(format2)) { return format2(text); } if (format2 === "encrypt") { return this.formatName(text); } return text; } if (mode === "link") { !url(href) && error("超链接模式下,href参数需要为URL格式"); return text; } return text; } }, methods: { // 默认的姓名脱敏规则 formatName(name) { let value2 = ""; if (name.length === 2) { value2 = name.substr(0, 1) + "*"; } else if (name.length > 2) { let char = ""; for (let i = 0, len = name.length - 2; i < len; i++) { char += "*"; } value2 = name.substr(0, 1) + char + name.substr(-1, 1); } else { value2 = name; } return value2; } } }; const props$d = { props: { // 主题颜色 type: { type: String, default: "" }, // 是否显示 show: { type: Boolean, default: true }, // 显示的值 text: { type: [String, Number], default: "" }, // 前置图标 prefixIcon: { type: String, default: "" }, // 后置图标 suffixIcon: { type: String, default: "" }, // 文本处理的匹配模式 // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接 mode: { type: String, default: "" }, // mode=link下,配置的链接 href: { type: String, default: "" }, // 格式化规则 format: { type: [String, Function], default: "" }, // mode=phone时,点击文本是否拨打电话 call: { type: Boolean, default: true }, // 小程序的打开方式 openType: { type: String, default: "" }, // 是否粗体,默认normal bold: { type: Boolean, default: false }, // 是否块状 block: { type: Boolean, default: false }, // 文本显示的行数,如果设置,超出此行数,将会显示省略号 lines: { type: [String, Number], default: "" }, // 文本颜色 color: { type: String, default: "#303133" }, // 字体大小 size: { type: [String, Number], default: 15 }, // 图标的样式 iconStyle: { type: [Object, String], default: () => ({ fontSize: "15px" }) }, // 文字装饰,下划线,中划线等,可选值 none|underline|line-through decoration: { type: String, default: "none" }, // 外边距,对象、字符串,数值形式均可 margin: { type: [Object, String, Number], default: 0 }, // 文本行高 lineHeight: { type: [String, Number], default: "" }, // 文本对齐方式,可选值left|center|right align: { type: String, default: "left" }, // 文字换行,可选值break-word|normal|anywhere wordWrap: { type: String, default: "normal" }, ...(_p = (_o = uni.$uv) == null ? void 0 : _o.props) == null ? void 0 : _p.text } }; const _sfc_main$v = { name: "uv-text", emits: ["click"], mixins: [mpMixin, mixin, value$1, props$d], computed: { valueStyle() { const style = { textDecoration: this.decoration, fontWeight: this.bold ? "bold" : "normal", wordWrap: this.wordWrap, fontSize: this.$uv.addUnit(this.size) }; !this.type && (style.color = this.color); this.isNvue && this.lines && (style.lines = this.lines); if (this.isNvue && this.mode != "price" && !this.prefixIcon && !this.suffixIcon) { style.flex = 1; style.textAlign = this.align === "left" ? "flex-start" : this.align === "center" ? "center" : "right"; } this.lineHeight && (style.lineHeight = this.$uv.addUnit(this.lineHeight)); !this.isNvue && this.block && (style.display = "block"); return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); }, isNvue() { let nvue = false; return nvue; }, isMp() { let mp = false; return mp; } }, data() { return {}; }, methods: { clickHandler() { if (this.call && this.mode === "phone") { uni.makePhoneCall({ phoneNumber: this.text }); } this.$emit("click"); } } }; function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_3$4); const _component_uv_link = resolveEasycom(vue.resolveDynamicComponent("uv-link"), __easycom_1$3); return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uv-text", []]), style: vue.normalizeStyle({ margin: _ctx.margin, justifyContent: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end" }), onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["uv-text__price", _ctx.type && `uv-text__value--${_ctx.type}`]), style: vue.normalizeStyle([$options.valueStyle]) }, "¥", 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uv-text__prefix-icon" }, [ vue.createVNode(_component_uv_icon, { name: _ctx.prefixIcon, customStyle: _ctx.$uv.addStyle(_ctx.iconStyle) }, null, 8, ["name", "customStyle"]) ])) : vue.createCommentVNode("v-if", true), _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_uv_link, { key: 2, text: _ctx.value, href: _ctx.href, underLine: "" }, null, 8, ["text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", { key: 3, class: "uv-reset-button uv-text__value", style: vue.normalizeStyle([$options.valueStyle]), openType: _ctx.openType, onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)), onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)), onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)), onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)), onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)), onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)), lang: _ctx.lang, "session-from": _ctx.sessionFrom, "send-message-title": _ctx.sendMessageTitle, "send-message-path": _ctx.sendMessagePath, "send-message-img": _ctx.sendMessageImg, "show-message-card": _ctx.showMessageCard, "app-parameter": _ctx.appParameter }, vue.toDisplayString(_ctx.value), 45, ["openType", "lang", "session-from", "send-message-title", "send-message-path", "send-message-img", "show-message-card", "app-parameter"])) : (vue.openBlock(), vue.createElementBlock( "text", { key: 4, class: vue.normalizeClass(["uv-text__value", [ _ctx.type && `uv-text__value--${_ctx.type}`, _ctx.lines && `uv-line-${_ctx.lines}` ]]), style: vue.normalizeStyle([$options.valueStyle]) }, vue.toDisplayString(_ctx.value), 7 /* TEXT, CLASS, STYLE */ )), _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "uv-text__suffix-icon" }, [ vue.createVNode(_component_uv_icon, { name: _ctx.suffixIcon, customStyle: _ctx.$uv.addStyle(_ctx.iconStyle) }, null, 8, ["name", "customStyle"]) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true); } const __easycom_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-8da47eb3"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-text/components/uv-text/uv-text.vue"]]); const props$c = { props: { // 图片地址 src: { type: String, default: "" }, // 裁剪模式 mode: { type: String, default: "aspectFill" }, // 宽度,单位任意 width: { type: [String, Number], default: "300" }, // 高度,单位任意 height: { type: [String, Number], default: "225" }, // 图片形状,circle-圆形,square-方形 shape: { type: String, default: "square" }, // 圆角,单位任意 radius: { type: [String, Number], default: 0 }, // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序 lazyLoad: { type: Boolean, default: true }, // 是否开启observer懒加载,nvue不生效 observeLazyLoad: { type: Boolean, default: false }, // 开启长按图片显示识别微信小程序码菜单 showMenuByLongpress: { type: Boolean, default: true }, // 加载中的图标,或者小图片 loadingIcon: { type: String, default: "photo" }, // 加载失败的图标,或者小图片 errorIcon: { type: String, default: "error-circle" }, // 是否显示加载中的图标或者自定义的slot showLoading: { type: Boolean, default: true }, // 是否显示加载错误的图标或者自定义的slot showError: { type: Boolean, default: true }, // 是否需要淡入效果 fade: { type: Boolean, default: true }, // 只支持网络资源,只对微信小程序有效 webp: { type: Boolean, default: false }, // 过渡时间,单位ms duration: { type: [String, Number], default: 500 }, // 背景颜色,用于深色页面加载图片时,为了和背景色融合 bgColor: { type: String, default: "#f3f4f6" }, // nvue模式下 是否直接显示,在uv-list等cell下面使用就需要设置 cellChild: { type: Boolean, default: false }, ...(_r = (_q = uni.$uv) == null ? void 0 : _q.props) == null ? void 0 : _r.image } }; const _sfc_main$u = { name: "uv-image", emits: ["click", "load", "error"], mixins: [mpMixin, mixin, props$c], data() { return { // 图片是否加载错误,如果是,则显示错误占位图 isError: false, // 初始化组件时,默认为加载中状态 loading: true, // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景 backgroundStyle: {}, // 用于fade模式的控制组件显示与否 show: false, // 是否开启图片出现在可视范围进行加载(另一种懒加载) observeShow: !this.observeLazyLoad, elIndex: "", // 因为props的值无法修改,故需要一个中间值 imgWidth: this.width, // 因为props的值无法修改,故需要一个中间值 imgHeight: this.height, thresholdValue: 50 }; }, watch: { src: { immediate: true, handler(n2) { if (!n2) { this.isError = true; } else { this.isError = false; this.loading = true; } } }, width(newVal) { this.show = false; this.$uv.sleep(2).then((res) => { this.show = true; }); this.imgWidth = newVal; }, height(newVal) { this.show = false; this.$uv.sleep(2).then((res) => { this.show = true; }); this.imgHeight = newVal; } }, computed: { wrapStyle() { let style = {}; if (this.mode !== "heightFix") { style.width = this.$uv.addUnit(this.imgWidth); } if (this.mode !== "widthFix") { style.height = this.$uv.addUnit(this.imgHeight); } style.borderRadius = this.shape == "circle" ? "10000px" : this.$uv.addUnit(this.radius); style.overflow = this.radius > 0 ? "hidden" : "visible"; return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); }, imageStyle() { let style = {}; style.borderRadius = this.shape == "circle" ? "10000px" : this.$uv.addUnit(this.radius); return style; } }, created() { this.elIndex = this.$uv.guid(); this.observer = {}; this.observerName = "lazyLoadContentObserver"; }, mounted() { this.show = true; this.$nextTick(() => { if (this.observeLazyLoad) this.observerFn(); }); }, methods: { // 点击图片 onClick() { this.$emit("click"); }, // 图片加载失败 onErrorHandler(err) { this.loading = false; this.isError = true; this.$emit("error", err); }, // 图片加载完成,标记loading结束 onLoadHandler(event) { if (this.mode == "widthFix") this.imgHeight = "auto"; if (this.mode == "heightFix") this.imgWidth = "auto"; this.loading = false; this.isError = false; this.$emit("load", event); this.removeBgColor(); }, // 移除图片的背景色 removeBgColor() { this.backgroundStyle = { backgroundColor: "transparent" }; }, // 观察图片是否在可见视口 observerFn() { this.$nextTick(() => { uni.$once("onLazyLoadReachBottom", () => { if (!this.observeShow) this.observeShow = true; }); }); setTimeout(() => { this.disconnectObserver(this.observerName); const contentObserver = uni.createIntersectionObserver(this); contentObserver.relativeToViewport({ bottom: this.thresholdValue }).observe(`.uv-image--${this.elIndex}`, (res) => { if (res.intersectionRatio > 0) { this.observeShow = true; this.disconnectObserver(this.observerName); } }); this[this.observerName] = contentObserver; }, 50); }, disconnectObserver(observerName) { const observer = this[observerName]; observer && observer.disconnect(); } } }; function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_3$4); const _component_uv_transition = resolveEasycom(vue.resolveDynamicComponent("uv-transition"), __easycom_4$1); return $data.show ? (vue.openBlock(), vue.createBlock(_component_uv_transition, { key: 0, show: $data.show, mode: "fade", duration: _ctx.fade ? _ctx.duration : 0, "cell-child": _ctx.cellChild, "custom-style": $options.wrapStyle }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uv-image", [`uv-image--${$data.elIndex}`]]), onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)), style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle]) }, [ !$data.isError && $data.observeShow ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _ctx.src, mode: _ctx.mode, onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)), onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)), "show-menuv-by-longpress": _ctx.showMenuByLongpress, "lazy-load": _ctx.lazyLoad, class: "uv-image__image", style: vue.normalizeStyle([$options.imageStyle]), webp: _ctx.webp }, null, 44, ["src", "mode", "show-menuv-by-longpress", "lazy-load", "webp"])) : vue.createCommentVNode("v-if", true), _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "uv-image__loading", style: vue.normalizeStyle({ borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$uv.addUnit(_ctx.radius), backgroundColor: _ctx.bgColor, width: _ctx.$uv.addUnit(_ctx.width), height: _ctx.$uv.addUnit(_ctx.height) }) }, [ vue.renderSlot(_ctx.$slots, "loading", {}, () => [ vue.createVNode(_component_uv_icon, { name: _ctx.loadingIcon, width: _ctx.width, height: _ctx.height }, null, 8, ["name", "width", "height"]) ], true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "uv-image__error", style: vue.normalizeStyle({ borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$uv.addUnit(_ctx.radius), width: _ctx.$uv.addUnit(_ctx.width), height: _ctx.$uv.addUnit(_ctx.height) }) }, [ vue.renderSlot(_ctx.$slots, "error", {}, () => [ vue.createVNode(_component_uv_icon, { name: _ctx.errorIcon, width: _ctx.width, height: _ctx.height }, null, 8, ["name", "width", "height"]) ], true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["show", "duration", "cell-child", "custom-style"])) : vue.createCommentVNode("v-if", true); } const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-8fe9e33e"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-image/components/uv-image/uv-image.vue"]]); const props$b = { props: { // 指示器的整体宽度 indicatorWidth: { type: [String, Number], default: 50 }, // 滑块的宽度 indicatorBarWidth: { type: [String, Number], default: 20 }, // 是否显示面板指示器 indicator: { type: Boolean, default: true }, // 指示器非激活颜色 indicatorColor: { type: String, default: "#f2f2f2" }, // 指示器的激活颜色 indicatorActiveColor: { type: String, default: "#3c9cff" }, // 指示器样式,可通过bottom,left,right进行定位 indicatorStyle: { type: [String, Object], default: "" }, ...(_t = (_s = uni.$uv) == null ? void 0 : _s.props) == null ? void 0 : _t.scrollList } }; const block0 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("wxs"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "1f01b1f2"; }; const _sfc_main$t = { name: "uv-scroll-list", mixins: [mpMixin, mixin, props$b], data() { return { scrollInfo: { scrollLeft: 0, scrollWidth: 0 }, scrollWidth: 0 }; }, computed: { // 指示器为线型的样式 barStyle() { const style = {}; style.width = this.$uv.addUnit(this.indicatorBarWidth); style.backgroundColor = this.indicatorActiveColor; return style; }, lineStyle() { const style = {}; style.width = this.$uv.addUnit(this.indicatorWidth); style.backgroundColor = this.indicatorColor; return style; } }, mounted() { this.init(); }, methods: { init() { this.getComponentWidth(); }, scrollEvent(status) { this.$emit(status); }, // 获取组件的宽度 async getComponentWidth() { await this.$uv.sleep(30); this.$uvGetRect(".uv-scroll-list").then((size) => { this.scrollWidth = size.width; }); } } }; function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "uv-scroll-list", ref: "uv-scroll-list" }, [ vue.createCommentVNode(" 以上平台,支持wxs "), vue.createElementVNode("scroll-view", { class: "uv-scroll-list__scroll-view", "scroll-x": "", onScroll: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.scroll && _ctx.wxs.scroll(...args)), onScrolltoupper: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.scrolltoupper && _ctx.wxs.scrolltoupper(...args)), onScrolltolower: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.scrolltolower && _ctx.wxs.scrolltolower(...args)), "data-scrollWidth": $data.scrollWidth, "data-barWidth": _ctx.$uv.getPx(_ctx.indicatorBarWidth), "data-indicatorWidth": _ctx.$uv.getPx(_ctx.indicatorWidth), "show-scrollbar": false, "upper-threshold": 0, "lower-threshold": 0, "data-unit": _ctx.$uv.unit }, [ vue.createElementVNode("view", { class: "uv-scroll-list__scroll-view__content" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]) ], 40, ["data-scrollWidth", "data-barWidth", "data-indicatorWidth", "data-unit"]), _ctx.indicator ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "uv-scroll-list__indicator", style: vue.normalizeStyle([_ctx.$uv.addStyle(_ctx.indicatorStyle)]) }, [ vue.createElementVNode( "view", { class: "uv-scroll-list__indicator__line", style: vue.normalizeStyle([$options.lineStyle]) }, [ vue.createElementVNode( "view", { class: "uv-scroll-list__indicator__line__bar", style: vue.normalizeStyle([$options.barStyle]), ref: "uv-scroll-list__indicator__line__bar" }, null, 4 /* STYLE */ ) ], 4 /* STYLE */ ) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 避免报错 ") ], 512 /* NEED_PATCH */ ); } if (typeof block0 === "function") block0(_sfc_main$t); const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-145f8032"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-scroll-list/components/uv-scroll-list/uv-scroll-list.vue"]]); const props$a = { props: { // 占父容器宽度的多少等分,总分为12份 span: { type: [String, Number], default: 12 }, // 指定栅格左侧的间隔数(总12栏) offset: { type: [String, Number], default: 0 }, // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`) justify: { type: String, default: "start" }, // 垂直对齐方式,可选值为top、center、bottom、stretch align: { type: String, default: "stretch" }, // 文字对齐方式 textAlign: { type: String, default: "left" }, ...(_v = (_u = uni.$uv) == null ? void 0 : _u.props) == null ? void 0 : _v.col } }; const _sfc_main$s = { name: "uv-col", emits: ["click"], mixins: [mpMixin, mixin, props$a], data() { return { width: 0, parentData: { gutter: 0 }, gridNum: 12 }; }, computed: { uJustify() { if (this.justify == "end" || this.justify == "start") return "flex-" + this.justify; else if (this.justify == "around" || this.justify == "between") return "space-" + this.justify; else return this.justify; }, uAlignItem() { if (this.align == "top") return "flex-start"; if (this.align == "bottom") return "flex-end"; else return this.align; }, colStyle() { const style = { // 这里写成"padding: 0 10px"的形式是因为nvue的需要 paddingLeft: this.$uv.addUnit(this.$uv.getPx(this.parentData.gutter) / 2), paddingRight: this.$uv.addUnit(this.$uv.getPx(this.parentData.gutter) / 2), alignItems: this.uAlignItem, justifyContent: this.uJustify, textAlign: this.textAlign, // 在非nvue上,使用百分比形式 flex: `0 0 ${100 / this.gridNum * this.span}%`, marginLeft: 100 / 12 * this.offset + "%" }; return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); } }, mounted() { this.init(); }, methods: { async init() { this.updateParentData(); this.width = await this.parent.getComponentWidth(); }, updateParentData() { this.getParentData("uv-row"); }, clickHandler(e) { this.$emit("click"); } } }; function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uv-col", [ "uv-col-" + _ctx.span ]]), ref: "uv-col", style: vue.normalizeStyle([$options.colStyle]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ); } const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-d2bffd23"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-row/components/uv-col/uv-col.vue"]]); const props$9 = { props: { // 给col添加间距,左右边距各占一半 gutter: { type: [String, Number], default: 0 }, // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`) justify: { type: String, default: "start" }, // 垂直对齐方式,可选值为top、center、bottom align: { type: String, default: "center" }, ...(_x = (_w = uni.$uv) == null ? void 0 : _w.props) == null ? void 0 : _x.row } }; const _sfc_main$r = { name: "uv-row", emits: ["click"], mixins: [mpMixin, mixin, props$9], data() { return {}; }, computed: { uJustify() { if (this.justify == "end" || this.justify == "start") return "flex-" + this.justify; else if (this.justify == "around" || this.justify == "between") return "space-" + this.justify; else return this.justify; }, uAlignItem() { if (this.align == "top") return "flex-start"; if (this.align == "bottom") return "flex-end"; else return this.align; }, rowStyle() { const style = { alignItems: this.uAlignItem, justifyContent: this.uJustify }; if (this.gutter) { style.marginLeft = this.$uv.addUnit(-Number(this.gutter) / 2); style.marginRight = this.$uv.addUnit(-Number(this.gutter) / 2); } return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); } }, methods: { clickHandler(e) { this.$emit("click"); }, async getComponentWidth() { await this.$uv.sleep(); return new Promise((resolve) => { this.$uvGetRect(".uv-row").then((res) => { resolve(res.width); }); }); } } }; function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "uv-row", ref: "uv-row", style: vue.normalizeStyle([$options.rowStyle]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ); } const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-692ff899"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-row/components/uv-row/uv-row.vue"]]); function getlist(data) { let url2 = baseUrl + "/index.php/index/Fmember/queryfmemberlistbyuserid"; return dorequest("post", url2, data); } function submembergenderbyuserid(data) { let url2 = baseUrl + "/index.php/index/Fmember/submembergenderbyuserid"; return dorequest("post", url2, data); } function subfmemberlistbyuserid(data) { let url2 = baseUrl + "/index.php/index/Fmember/subfmemberlistbyuserid"; return dorequest("post", url2, data); } function submembergenderwithuid(data) { let url2 = baseUrl + "/index.php/index/Fmember/subgenderbyuserid"; let usedata = { userid: data.userid, fmemberid: data.fmemberid, gender: data.gender }; return dorequest("post", url2, usedata); } function querymergescalebyuserid(data) { let url2 = baseUrl + "/index.php/index/Scale/querymergescalebyuserid"; return dorequest("post", url2, data); } function subanswerbyuserid(answer, data) { let url2 = baseUrl + "/index.php/index/Scale/subanswerbyuserid"; let list = []; if (!(answer instanceof Array)) { let item = { userid: data.userid, fmemberid: data.fmemberid, stemid: answer.stemid, answertype: answer.answertype, answervalue: answer.answervalue }; if (answer.answeroptionid) { item.answeroptionid = answer.answeroptionid; } if (answer.answeroption) { item.answeroption = answer.answeroption; } list.push(item); } else { list = answer; } let usedata = { answer: JSON.stringify(list), userid: data.userid, fmemberid: data.fmemberid, srid: data.srid, scaleid: data.scaleid }; return dorequest("post", url2, usedata); } function subcomstatus(srid) { let url2 = baseUrl + "/index.php/index/Scale/subcomstatus"; let usedata = { srid }; return dorequest("post", url2, usedata); } const _sfc_main$q = { data() { return { shareimg: "https://backup-1306866048.cos.ap-nanjing.myqcloud.com/workercard/20231228/658d1042e1395.jpg" }; }, methods: { showshare() { }, dosharewechat() { this.$emit("dosharewechat", { shareimg: this.shareimg }); } } }; function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_col = resolveEasycom(vue.resolveDynamicComponent("uv-col"), __easycom_2$3); const _component_uv_image = resolveEasycom(vue.resolveDynamicComponent("uv-image"), __easycom_1$2); const _component_uv_row = resolveEasycom(vue.resolveDynamicComponent("uv-row"), __easycom_3$1); return vue.openBlock(), vue.createElementBlock("view", { class: "share_div" }, [ vue.createVNode(_component_uv_row, null, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "10", class: "text", align: "center" }, { default: vue.withCtx(() => [ vue.createTextVNode(" 心脑血管早期筛查,简单易得,有利无害,分享给朋友家人。 ") ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "2" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "", onClick: _cache[0] || (_cache[0] = (...args) => $options.dosharewechat && $options.dosharewechat(...args)), align: "center" }, [ vue.createVNode(_component_uv_image, { class: "img", src: "/static/image/wxfriend.png", mode: "aspectFill", shape: "circle", "lazy-load": true, width: "50", height: "50" }), vue.createCommentVNode(' ') ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]); } const share$3 = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__scopeId", "data-v-11758b78"], ["__file", "D:/workspace/uniapp/health2/components/share/share.vue"]]); const _sfc_main$p = { data() { return { userinfo: {}, userlist: [], reportinfo: {}, selectuser: false }; }, components: { share: share$3 }, methods: { getlist() { let data = { userid: this.userinfo.id }; getlist(data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); } if (200 == res.code) { let userlist = res.resultData; let fmemberid = this.selectuser ? this.selectuser.fmemberid : this.userinfo.fmemberid; if (this.selectuser) { userlist.map((item, index2) => { item.selected = 0; if (item.fmemberid == fmemberid) { item.selected = 1; return; } }); } else { userlist[0].selected = 1; uni.setStorage({ key: "selectuser", data: userlist[0] }); this.selectuser = userlist[0]; uni.setStorage({ key: "selectuser", data: this.selectuser }); } userlist.map((item, index2) => { if (!item.gender) { item.photourl = "/static/image/member.svg"; } else { switch (item.gender) { case "1": item.photourl = "/static/image/selecttype/man.png"; break; case "2": item.photourl = "/static/image/selecttype/woman.png"; break; } } }); this.userlist = userlist; uni.setStorage({ key: "memberlist", data: this.userlist }); } }); }, selected(index2) { let that = this; this.userlist.map((item, index1) => { if (index1 == index2) { item.selected = 1; that.selectuser = item; } else { item.selected = 0; } }); uni.setStorage({ key: "selectuser", data: this.selectuser }); this.querymergescalebyuserid(); }, insertmembe() { let count = this.userlist.length - 1; if (count >= this.userinfo.fmembercount) { this.$refs.toast.show({ type: "error", message: this.$t("member_num_than_max") }); } else { uni.navigateTo({ url: "/pages/member/add" }); } }, querymergescalebyuserid() { let userid = this.userinfo.id; let fmemberid = this.selectuser.fmemberid ? this.selectuser.fmemberid : 0; let data = { userid, fmemberid }; querymergescalebyuserid(data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); return false; } if (200 == res.code) { this.reportinfo = res.resultData; } }); }, showreport() { uni.navigateTo({ url: "/pages/report/report" }); }, init() { this.userinfo = uni.getStorageSync("userinfo"); this.selectuser = uni.getStorageSync("selectuser"); this.getlist(); this.querymergescalebyuserid(); }, tostem() { if (this.reportinfo.stemlist == void 0) { return; } uni.setStorage({ key: "stemlist", data: this.reportinfo.stemlist }); if (this.reportinfo.srid == void 0) { this.reportinfo.srid = 0; } this.reportinfo.stemlist; let srid = this.reportinfo.srid; uni.setStorage({ key: "srid", data: srid }); let stepprogress = this.reportinfo.stepprogress; tostemlistnext(stepprogress); }, restem() { uni.setStorage({ key: "stemlist", data: this.reportinfo.stemlist }); if (this.reportinfo.srid == void 0) { this.reportinfo.srid = 0; } this.reportinfo.stemlist; let srid = 0; uni.setStorage({ key: "srid", data: srid }); let stepprogress = 0; var scaleid = 4; tostemlistnext(stepprogress, 0, scaleid, srid); }, share(data) { uni.share({ provider: "weixin", scene: "WXSceneSession", type: 0, href: "testapp://", //title: this.$t('navigationBarTitleText')+"分享", title: this.$t("share"), summary: this.$t("share_text"), imageUrl: data.shareimg, success: function(res) { addlog({ json: JSON.stringify(res), type: "uniapp信息" }); formatAppLog("log", "at pages/index/index.vue:348", "success:" + JSON.stringify(res)); }, fail: function(err) { addlog({ json: JSON.stringify(err), type: "uniapp错误" }); formatAppLog("log", "at pages/index/index.vue:355", "fail:" + JSON.stringify(err)); } }); } }, mounted() { this.init(); }, onPullDownRefresh() { this.init(); setTimeout(function() { uni.stopPullDownRefresh(); }, 1e3); } }; function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_uv_text = resolveEasycom(vue.resolveDynamicComponent("uv-text"), __easycom_2$4); const _component_uv_image = resolveEasycom(vue.resolveDynamicComponent("uv-image"), __easycom_1$2); const _component_uv_scroll_list = resolveEasycom(vue.resolveDynamicComponent("uv-scroll-list"), __easycom_3$2); const _component_uv_col = resolveEasycom(vue.resolveDynamicComponent("uv-col"), __easycom_2$3); const _component_uv_row = resolveEasycom(vue.resolveDynamicComponent("uv-row"), __easycom_3$1); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(` \r {{$t('navigationBarTitleText')}}\r `), vue.createCommentVNode(` \r \r `), vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "page" }, [ vue.createElementVNode("view", { class: "bar" }, [ vue.createVNode(_component_uv_text, { text: _ctx.$t("navigationBarTitleText"), align: "center", color: "#fff", size: "20" }, null, 8, ["text"]) ]), vue.createElementVNode("view", { class: "bottomarc" }), vue.createElementVNode("view", null, [ vue.createVNode(_component_uv_row, { justify: "space-between", customStyle: "margin-top: 6%" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "10", offset: "1", class: "box1" }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "hometitle" }, vue.toDisplayString(_ctx.$t("index_text_1")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "userlist" }, [ vue.createVNode(_component_uv_row, null, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "10", class: "scroll_div" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_scroll_list, { indicator: false }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.userlist, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item" }, [ vue.createVNode(_component_uv_image, { class: vue.normalizeClass(["img", { memberphoto_select: item.selected }]), src: item.photourl, mode: "aspectFill", shape: "circle", "lazy-load": true, width: "60", height: "60", onClick: ($event) => $options.selected(index2) }, null, 8, ["src", "class", "onClick"]), vue.createVNode(_component_uv_text, { text: item.membername, align: "center", customStyle: "margin-top:0.3rem" }, null, 8, ["text"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "2" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "addmember" }, [ vue.createVNode(_component_uv_image, { class: "img", src: "/static/image/fabu1.png", mode: "aspectFill", shape: "circle", "lazy-load": true, width: "50", height: "50", onClick: $options.insertmembe }, null, 8, ["onClick"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("new_member"), align: "center", customStyle: "margin-top:0.3rem" }, null, 8, ["text"]) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_uv_row, { justify: "space-between", customStyle: "margin-top: 2rem" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "box2" }, [ vue.createElementVNode( "view", { class: "scalename" }, vue.toDisplayString(_ctx.$t("index_text_2")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "div1" }, [ vue.createVNode(_component_uv_row, null, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "6" }, { default: vue.withCtx(() => [ vue.createElementVNode("image", { class: "img", src: "http://qiniusave.chienxutech.com/sdzyy/img/xgng3.png" }) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "6" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_uv_text, { text: _ctx.$t("index_text_3") }, null, 8, ["text"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("index_text_4"), align: "center", customStyle: "margin-top:30px;margin-bottom:40px" }, null, 8, ["text"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("index_text_5"), align: "center", size: "12", color: "#1a1a1a" }, null, 8, ["text"]) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), vue.createElementVNode( "view", { class: "scalename" }, vue.toDisplayString(_ctx.$t("index_text_6")), 1 /* TEXT */ ), $data.selectuser ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btns" }, [ vue.createCommentVNode(' '), vue.createElementVNode("view", null, [ vue.withDirectives(vue.createVNode( _component_uv_row, null, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "6", offset: "3" }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "mybtn", onClick: _cache[0] || (_cache[0] = (...args) => $options.tostem && $options.tostem(...args)) }, vue.toDisplayString(_ctx.$t("index_btn_1")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), [ [vue.vShow, 0 == $data.reportinfo.comstatus] ]), vue.withDirectives(vue.createVNode( _component_uv_row, { gutter: "20" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "6" }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "mybtn", onClick: _cache[1] || (_cache[1] = (...args) => $options.showreport && $options.showreport(...args)) }, vue.toDisplayString(_ctx.$t("index_btn_2")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "6" }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "mybtn", onClick: _cache[2] || (_cache[2] = (...args) => $options.restem && $options.restem(...args)) }, vue.toDisplayString(_ctx.$t("index_btn_3")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 512 /* NEED_PATCH */ ), [ [vue.vShow, 1 == $data.reportinfo.comstatus] ]) ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [ vue.createElementVNode( "p", null, vue.toDisplayString(_ctx.$t("not_selected")), 1 /* TEXT */ ) ])), vue.createCommentVNode(" mergerscale.comstatus ") ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(' \r\n \r\n \r\n \r\n ') ]) ]) ]) ], 64 /* STABLE_FRAGMENT */ ); } const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-1cf27b2a"], ["__file", "D:/workspace/uniapp/health2/pages/index/index.vue"]]); const props$8 = { props: { value: { type: [String, Number], default: "" }, modelValue: { type: [String, Number], default: "" }, // 输入框类型 // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数 // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序 // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序 // text-文本输入键盘 type: { type: String, default: "text" }, // 是否禁用输入框 disabled: { type: Boolean, default: false }, // 禁用状态时的背景色 disabledColor: { type: String, default: "#f5f7fa" }, // 是否显示清除控件 clearable: { type: Boolean, default: false }, // 是否密码类型 password: { type: Boolean, default: false }, // 最大输入长度,设置为 -1 的时候不限制最大长度 maxlength: { type: [String, Number], default: -1 }, // 输入框为空时的占位符 placeholder: { type: String, default: null }, // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ placeholderClass: { type: String, default: "input-placeholder" }, // 指定placeholder的样式 placeholderStyle: { type: [String, Object], default: "color: #c0c4cc" }, // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档 // https://uniapp.dcloud.io/component/input // https://uniapp.dcloud.io/component/textarea confirmType: { type: String, default: "done" }, // 点击键盘右下角按钮时是否保持键盘不收起,H5无效 confirmHold: { type: Boolean, default: false }, // focus时,点击页面的时候不收起键盘,微信小程序有效 holdKeyboard: { type: Boolean, default: false }, // 自动获取焦点 // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点 focus: { type: Boolean, default: false }, // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效 autoBlur: { type: Boolean, default: false }, // 指定focus时光标的位置 cursor: { type: [String, Number], default: -1 }, // 输入框聚焦时底部与键盘的距离 cursorSpacing: { type: [String, Number], default: 30 }, // 光标起始位置,自动聚集时有效,需与selection-end搭配使用 selectionStart: { type: [String, Number], default: -1 }, // 光标结束位置,自动聚集时有效,需与selection-start搭配使用 selectionEnd: { type: [String, Number], default: -1 }, // 键盘弹起时,是否自动上推页面 adjustPosition: { type: Boolean, default: true }, // 输入框内容对齐方式,可选值为:left|center|right inputAlign: { type: String, default: "left" }, // 输入框字体的大小 fontSize: { type: [String, Number], default: "14px" }, // 输入框字体颜色 color: { type: String, default: "#303133" }, // 输入框前置图标 prefixIcon: { type: String, default: "" }, // 前置图标样式,对象或字符串 prefixIconStyle: { type: [String, Object], default: "" }, // 输入框后置图标 suffixIcon: { type: String, default: "" }, // 后置图标样式,对象或字符串 suffixIconStyle: { type: [String, Object], default: "" }, // 边框类型,surround-四周边框,bottom-底部边框,none-无边框 border: { type: String, default: "surround" }, // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会 readonly: { type: Boolean, default: false }, // 输入框形状,circle-圆形,square-方形 shape: { type: String, default: "square" }, // 用于处理或者过滤输入框内容的方法 formatter: { type: [Function, null], default: null }, // 是否忽略组件内对文本合成系统事件的处理 ignoreCompositionEvent: { type: Boolean, default: true }, ...(_z = (_y = uni.$uv) == null ? void 0 : _y.props) == null ? void 0 : _z.input } }; const _sfc_main$o = { name: "uv-input", mixins: [mpMixin, mixin, props$8], data() { return { // 输入框的值 innerValue: "", // 是否处于获得焦点状态 focused: false, // 过滤处理方法 innerFormatter: (value2) => value2 }; }, created() { this.innerValue = this.modelValue; }, watch: { value(newVal) { this.innerValue = newVal; }, modelValue(newVal) { this.innerValue = newVal; } }, computed: { // 是否显示清除控件 isShowClear() { const { clearable, readonly, focused, innerValue } = this; return !!clearable && !readonly && !!focused && innerValue !== ""; }, // 组件的类名 inputClass() { let classes = [], { border, disabled, shape } = this; border === "surround" && (classes = classes.concat(["uv-border", "uv-input--radius"])); classes.push(`uv-input--${shape}`); border === "bottom" && (classes = classes.concat([ "uv-border-bottom", "uv-input--no-radius" ])); return classes.join(" "); }, // 组件的样式 wrapperStyle() { const style = {}; if (this.disabled) { style.backgroundColor = this.disabledColor; } if (this.border === "none") { style.padding = "0"; } else { style.paddingTop = "6px"; style.paddingBottom = "6px"; style.paddingLeft = "9px"; style.paddingRight = "9px"; } return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); }, // 输入框的样式 inputStyle() { const style = { color: this.color, fontSize: this.$uv.addUnit(this.fontSize), textAlign: this.inputAlign }; if (this.disabled || this.readonly) { style["pointer-events"] = "none"; } return style; } }, methods: { // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用 setFormatter(e) { this.innerFormatter = e; }, // 当键盘输入时,触发input事件 onInput(e) { let { value: value2 = "" } = e.detail || {}; const formatter = this.formatter || this.innerFormatter; const formatValue = formatter(value2); this.innerValue = value2; this.$nextTick(() => { this.innerValue = formatValue; this.valueChange(); }); }, // 输入框失去焦点时触发 onBlur(event) { this.$emit("blur", event.detail.value); this.$uv.sleep(100).then(() => { this.focused = false; }); this.$uv.formValidate(this, "blur"); }, // 输入框聚焦时触发 onFocus(event) { this.focused = true; this.$emit("focus"); }, // 点击完成按钮时触发 onConfirm(event) { this.$emit("confirm", this.innerValue); }, // 键盘高度发生变化的时候触发此事件 // 兼容性:微信小程序2.7.0+、App 3.1.0+ onkeyboardheightchange(e) { this.$emit("keyboardheightchange", e); }, // 内容发生变化,进行处理 valueChange() { if (this.isClear) this.innerValue = ""; const value2 = this.innerValue; this.$nextTick(() => { this.$emit("input", value2); this.$emit("update:modelValue", value2); this.$emit("change", value2); this.$uv.formValidate(this, "change"); }); }, // 点击清除控件 onClear() { this.innerValue = ""; this.isClear = true; this.$uv.sleep(200).then((res) => { this.isClear = false; }); this.$nextTick(() => { this.$emit("clear"); this.valueChange(); }); }, /** * 在安卓nvue上,事件无法冒泡 * 在某些时间,我们希望监听uv-from-item的点击事件,此时会导致点击uv-form-item内的uv-input后 * 无法触发uv-form-item的点击事件,这里通过手动调用uv-form-item的方法进行触发 */ clickHandler() { } } }; function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_3$4); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uv-input", $options.inputClass]), style: vue.normalizeStyle([$options.wrapperStyle]) }, [ vue.createElementVNode("view", { class: "uv-input__content" }, [ vue.createElementVNode("view", { class: "uv-input__content__prefix-icon" }, [ vue.renderSlot(_ctx.$slots, "prefix", {}, () => [ _ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(_component_uv_icon, { key: 0, name: _ctx.prefixIcon, size: "18", customStyle: _ctx.prefixIconStyle }, null, 8, ["name", "customStyle"])) : vue.createCommentVNode("v-if", true) ], true) ]), vue.createElementVNode("view", { class: "uv-input__content__field-wrapper", onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\r\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\r\n "), vue.createElementVNode("input", { class: "uv-input__content__field-wrapper__field", style: vue.normalizeStyle([$options.inputStyle]), type: _ctx.type, focus: _ctx.focus, cursor: _ctx.cursor, value: $data.innerValue, "auto-blur": _ctx.autoBlur, disabled: _ctx.disabled || _ctx.readonly, maxlength: _ctx.maxlength, placeholder: _ctx.placeholder, "placeholder-style": _ctx.placeholderStyle, "placeholder-class": _ctx.placeholderClass, "confirm-type": _ctx.confirmType, "confirm-hold": _ctx.confirmHold, "hold-keyboard": _ctx.holdKeyboard, "cursor-spacing": _ctx.cursorSpacing, "adjust-position": _ctx.adjustPosition, "selection-end": _ctx.selectionEnd, "selection-start": _ctx.selectionStart, password: _ctx.password || _ctx.type === "password" || void 0, ignoreCompositionEvent: _ctx.ignoreCompositionEvent, onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)), onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)), onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)), onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)), onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args)) }, null, 44, ["type", "focus", "cursor", "value", "auto-blur", "disabled", "maxlength", "placeholder", "placeholder-style", "placeholder-class", "confirm-type", "confirm-hold", "hold-keyboard", "cursor-spacing", "adjust-position", "selection-end", "selection-start", "password", "ignoreCompositionEvent"]) ]), $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uv-input__content__clear", onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args)) }, [ vue.createVNode(_component_uv_icon, { name: "close", size: "11", color: "#ffffff", customStyle: "line-height: 12px" }) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "uv-input__content__subfix-icon" }, [ vue.renderSlot(_ctx.$slots, "suffix", {}, () => [ _ctx.suffixIcon ? (vue.openBlock(), vue.createBlock(_component_uv_icon, { key: 0, name: _ctx.suffixIcon, size: "18", customStyle: _ctx.suffixIconStyle }, null, 8, ["name", "customStyle"])) : vue.createCommentVNode("v-if", true) ], true) ]) ]) ], 6 /* CLASS, STYLE */ ); } const __easycom_6$1 = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-651602aa"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-input/components/uv-input/uv-input.vue"]]); const props$7 = { props: { color: { type: String, default: "#d6d7d9" }, // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 length: { type: [String, Number], default: "100%" }, // 线条方向,col-竖向,row-横向 direction: { type: String, default: "row" }, // 是否显示细边框 hairline: { type: Boolean, default: true }, // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px" margin: { type: [String, Number], default: 0 }, // 是否虚线,true-虚线,false-实线 dashed: { type: Boolean, default: false }, ...(_B = (_A = uni.$uv) == null ? void 0 : _A.props) == null ? void 0 : _B.line } }; const _sfc_main$n = { name: "uv-line", mixins: [mpMixin, mixin, props$7], computed: { lineStyle() { const style = {}; style.margin = this.margin; if (this.direction === "row") { style.borderBottomWidth = "1px"; style.borderBottomStyle = this.dashed ? "dashed" : "solid"; style.width = this.$uv.addUnit(this.length); if (this.hairline) style.transform = "scaleY(0.5)"; } else { style.borderLeftWidth = "1px"; style.borderLeftStyle = this.dashed ? "dashed" : "solid"; style.height = this.$uv.addUnit(this.length); if (this.hairline) style.transform = "scaleX(0.5)"; } style.borderColor = this.color; return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); } } }; function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "uv-line", style: vue.normalizeStyle([$options.lineStyle]) }, null, 4 /* STYLE */ ); } const __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__scopeId", "data-v-dcf8cb8f"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-line/components/uv-line/uv-line.vue"]]); const props$6 = { props: { // input的label提示语 label: { type: String, default: "" }, // 绑定的值 prop: { type: String, default: "" }, // 是否显示表单域的下划线边框 borderBottom: { type: [Boolean], default: false }, // label的位置,left-左边,top-上边 labelPosition: { type: String, default: "" }, // label的宽度,单位px labelWidth: { type: [String, Number], default: "" }, // 右侧图标 rightIcon: { type: String, default: "" }, // 左侧图标 leftIcon: { type: String, default: "" }, // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置 required: { type: Boolean, default: false }, leftIconStyle: { type: [String, Object], default: "" }, ...(_D = (_C = uni.$uv) == null ? void 0 : _C.props) == null ? void 0 : _D.formItem } }; const _sfc_main$m = { name: "uv-form-item", emits: ["click"], mixins: [mpMixin, mixin, props$6], data() { return { // 错误提示语 message: "", parentData: { // 提示文本的位置 labelPosition: "left", // 提示文本对齐方式 labelAlign: "left", // 提示文本的样式 labelStyle: {}, // 提示文本的宽度 labelWidth: 45, // 错误提示方式 errorType: "message" } }; }, created() { this.init(); }, methods: { init() { this.updateParentData(); if (!this.parent) { this.$uv.error("uv-form-item需要结合uv-form组件使用"); } }, // 获取父组件的参数 updateParentData() { this.getParentData("uv-form"); }, // 移除uv-form-item的校验结果 clearValidate() { this.message = null; }, // 清空当前的组件的校验结果,并重置为初始值 resetField() { const value2 = this.$uv.getProperty(this.parent.originalModel, this.prop); this.$uv.setProperty(this.parent.model, this.prop, value2); this.message = null; }, // 点击组件 clickHandler() { this.$emit("click"); } } }; function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_3$4); const _component_uv_transition = resolveEasycom(vue.resolveDynamicComponent("uv-transition"), __easycom_4$1); const _component_uv_line = resolveEasycom(vue.resolveDynamicComponent("uv-line"), __easycom_5); return vue.openBlock(), vue.createElementBlock("view", { class: "uv-form-item" }, [ vue.createElementVNode( "view", { class: "uv-form-item__body", onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)), style: vue.normalizeStyle([_ctx.$uv.addStyle(_ctx.customStyle), { flexDirection: (_ctx.labelPosition || $data.parentData.labelPosition) === "left" ? "row" : "column" }]) }, [ vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '), vue.renderSlot(_ctx.$slots, "label", {}, () => [ _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "uv-form-item__body__left", style: vue.normalizeStyle({ width: _ctx.$uv.addUnit(_ctx.labelWidth || $data.parentData.labelWidth), marginBottom: $data.parentData.labelPosition === "left" ? 0 : "5px" }) }, [ vue.createCommentVNode(" 为了块对齐 "), vue.createElementVNode("view", { class: "uv-form-item__body__left__content" }, [ vue.createCommentVNode(" nvue不支持伪元素before "), _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "uv-form-item__body__left__content__required" }, "*")) : vue.createCommentVNode("v-if", true), _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uv-form-item__body__left__content__icon" }, [ vue.createVNode(_component_uv_icon, { name: _ctx.leftIcon, "custom-style": _ctx.leftIconStyle }, null, 8, ["name", "custom-style"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "uv-form-item__body__left__content__label", style: vue.normalizeStyle([$data.parentData.labelStyle, { justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end" }]) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ ) ]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], true), vue.createElementVNode("view", { class: "uv-form-item__body__right" }, [ vue.createElementVNode("view", { class: "uv-form-item__body__right__content" }, [ vue.createElementVNode("view", { class: "uv-form-item__body__right__content__slot" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), vue.createElementVNode("view", { class: "item__body__right__content__icon" }, [ vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ]) ]) ]) ], 4 /* STYLE */ ), vue.renderSlot(_ctx.$slots, "error", {}, () => [ !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createBlock(_component_uv_transition, { key: 0, show: true, duration: 100, mode: "fade" }, { default: vue.withCtx(() => [ vue.createElementVNode( "text", { class: "uv-form-item__body__right__message", style: vue.normalizeStyle({ marginLeft: _ctx.$uv.addUnit($data.parentData.labelPosition === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth) }) }, vue.toDisplayString($data.message), 5 /* TEXT, STYLE */ ) ]), _: 1 /* STABLE */ })) : vue.createCommentVNode("v-if", true) ], true), _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_uv_line, { key: 0, color: $data.message && $data.parentData.errorType === "border-bottom" ? "#f56c6c" : "#d6d7d9" }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ]); } const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-d1e73275"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-form/components/uv-form-item/uv-form-item.vue"]]); const props$5 = { props: { // 是否细边框 hairline: { type: Boolean, default: true }, // 按钮的预置样式,info,primary,error,warning,success type: { type: String, default: "info" }, // 按钮尺寸,large,normal,small,mini size: { type: String, default: "normal" }, // 按钮形状,circle(两边为半圆),square(带圆角) shape: { type: String, default: "square" }, // 按钮是否镂空 plain: { type: Boolean, default: false }, // 是否禁止状态 disabled: { type: Boolean, default: false }, // 是否加载中 loading: { type: Boolean, default: false }, // 加载中提示文字 loadingText: { type: [String, Number], default: "" }, // 加载状态图标类型 loadingMode: { type: String, default: "spinner" }, // 加载图标大小 loadingSize: { type: [String, Number], default: 14 }, // 开放能力,具体请看uniapp稳定关于button组件部分说明 // https://uniapp.dcloud.io/component/button openType: { type: String, default: "" }, // 用于
组件,点击分别会触发 组件的 submit/reset 事件 // 取值为submit(提交表单),reset(重置表单) formType: { type: String, default: "" }, // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 // 只微信小程序、QQ小程序有效 appParameter: { type: String, default: "" }, // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效 hoverStopPropagation: { type: Boolean, default: true }, // 指定返回用户信息的语言,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: "" }, // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示, // 用户点击后可以快速发送小程序消息,open-type="contact"时有效 showMessageCard: { type: Boolean, default: true }, // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取 dataName: { type: String, default: "" }, // 节流,一定时间内只能触发一次 throttleTime: { type: [String, Number], default: 0 }, // 按住后多久出现点击态,单位毫秒 hoverStartTime: { type: [String, Number], default: 0 }, // 手指松开后点击态保留时间,单位毫秒 hoverStayTime: { type: [String, Number], default: 200 }, // 按钮文字,之所以通过props传入,是因为slot传入的话 // nvue中无法控制文字的样式 text: { type: [String, Number], default: "" }, // 按钮图标 icon: { type: String, default: "" }, // 按钮图标大小 iconSize: { type: [String, Number], default: "" }, // 按钮图标颜色 iconColor: { type: String, default: "#000000" }, // 按钮颜色,支持传入linear-gradient渐变色 color: { type: String, default: "" }, // 自定义按钮文本样式 customTextStyle: { type: [Object, String], default: () => { } }, ...(_F = (_E = uni.$uv) == null ? void 0 : _E.props) == null ? void 0 : _F.button } }; const _sfc_main$l = { name: "uv-button", mixins: [mpMixin, mixin, props$5], emits: ["click"], data() { return {}; }, computed: { // 生成bem风格的类名 bemClass() { if (!this.color) { return this.bem( "button", ["type", "shape", "size"], ["disabled", "plain", "hairline"] ); } else { return this.bem( "button", ["shape", "size"], ["disabled", "plain", "hairline"] ); } }, loadingColor() { if (this.plain) { return this.color ? this.color : "#3c9cff"; } if (this.type === "info") { return "#c9c9c9"; } return "rgb(200, 200, 200)"; }, iconColorCom() { if (this.iconColor) return this.iconColor; if (this.plain) { return this.color ? this.color : this.type; } else { return this.type === "info" ? "#000000" : "#ffffff"; } }, baseColor() { let style = {}; if (this.color) { style.color = this.plain ? this.color : "white"; if (!this.plain) { style["background-color"] = this.color; } if (this.color.indexOf("gradient") !== -1) { style.borderTopWidth = 0; style.borderRightWidth = 0; style.borderBottomWidth = 0; style.borderLeftWidth = 0; if (!this.plain) { style.backgroundImage = this.color; } } else { style.borderColor = this.color; style.borderWidth = "1px"; style.borderStyle = "solid"; } } return style; }, // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置 nvueTextStyle() { let style = {}; if (this.type === "info") { style.color = "#323233"; } if (this.color) { style.color = this.plain ? this.color : "white"; } style.fontSize = this.textSize + "px"; return style; }, // 字体大小 textSize() { let fontSize2 = 14, { size } = this; if (size === "large") fontSize2 = 16; if (size === "normal") fontSize2 = 14; if (size === "small") fontSize2 = 12; if (size === "mini") fontSize2 = 10; return fontSize2; }, // 设置图标大小 getIconSize() { const size = this.iconSize ? this.iconSize : this.textSize * 1.35; return this.$uv.addUnit(size); }, // 设置外层盒子的宽度,其他样式不需要 btnWrapperStyle() { const style = {}; const customStyle = this.$uv.addStyle(this.customStyle); if (customStyle.width) style.width = customStyle.width; return style; } }, methods: { clickHandler() { if (!this.disabled && !this.loading) { throttle(() => { this.$emit("click"); }, this.throttleTime); } } } }; function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_loading_icon = resolveEasycom(vue.resolveDynamicComponent("uv-loading-icon"), __easycom_1$4); const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_3$4); return vue.openBlock(), vue.createElementBlock( "view", { class: "uv-button-wrapper", style: vue.normalizeStyle([$options.btnWrapperStyle]) }, [ vue.createElementVNode("button", { "hover-start-time": Number(_ctx.hoverStartTime), "hover-stay-time": Number(_ctx.hoverStayTime), "form-type": _ctx.formType, "open-type": _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, "hover-class": !_ctx.disabled && !_ctx.loading ? "uv-button--active" : "", class: vue.normalizeClass(["uv-button uv-reset-button", $options.bemClass]), style: vue.normalizeStyle([$options.baseColor, _ctx.$uv.addStyle(_ctx.customStyle)]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ _ctx.loading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createVNode(_component_uv_loading_icon, { mode: _ctx.loadingMode, size: _ctx.loadingSize * 1.15, color: $options.loadingColor }, null, 8, ["mode", "size", "color"]), vue.createElementVNode( "text", { class: "uv-button__loading-text", style: vue.normalizeStyle([ { fontSize: $options.textSize + "px" }, _ctx.$uv.addStyle(_ctx.customTextStyle) ]) }, vue.toDisplayString(_ctx.loadingText || _ctx.text), 5 /* TEXT, STYLE */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_uv_icon, { key: 0, name: _ctx.icon, color: $options.iconColorCom, size: $options.getIconSize, customStyle: { marginRight: "2px" } }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "text", { class: "uv-button__text", style: vue.normalizeStyle([ { fontSize: $options.textSize + "px" }, _ctx.$uv.addStyle(_ctx.customTextStyle) ]) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ ) ], true), vue.renderSlot(_ctx.$slots, "suffix", {}, void 0, true) ], 64 /* STABLE_FRAGMENT */ )) ], 14, ["hover-start-time", "hover-stay-time", "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"]) ], 4 /* STYLE */ ); } const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-ae8e42c7"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-button/components/uv-button/uv-button.vue"]]); const props$4 = { props: { // 当前form的需要验证字段的集合 model: { type: Object, default: () => ({}) }, // 验证规则 rules: { type: [Object, Function, Array], default: () => ({}) }, // 有错误时的提示方式,message-提示信息,toast-进行toast提示 // border-bottom-下边框呈现红色,none-无提示 errorType: { type: String, default: "message" }, // 是否显示表单域的下划线边框 borderBottom: { type: Boolean, default: true }, // label的位置,left-左边,top-上边 labelPosition: { type: String, default: "left" }, // label的宽度,单位px labelWidth: { type: [String, Number], default: 45 }, // lable字体的对齐方式 labelAlign: { type: String, default: "left" }, // lable的样式,对象形式 labelStyle: { type: Object, default: () => ({}) }, ...(_H = (_G = uni.$uv) == null ? void 0 : _G.props) == null ? void 0 : _H.form } }; const formatRegExp = /%[sdj%]/g; let warning = function warning2() { }; if (typeof process !== "undefined" && process.env && true && typeof window !== "undefined" && typeof document !== "undefined") { warning = function warning2(type2, errors) { if (typeof console !== "undefined" && console.warn) { if (errors.every((e) => typeof e === "string")) { formatAppLog("warn", "at uni_modules/uv-form/components/uv-form/valid.js:28", type2, errors); } } }; } function convertFieldsError(errors) { if (!errors || !errors.length) return null; const fields = {}; errors.forEach((error2) => { const { field } = error2; fields[field] = fields[field] || []; fields[field].push(error2); }); return fields; } function format$1() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } let i = 1; const f = args[0]; const len = args.length; if (typeof f === "function") { return f.apply(null, args.slice(1)); } if (typeof f === "string") { let str = String(f).replace(formatRegExp, (x) => { if (x === "%%") { return "%"; } if (i >= len) { return x; } switch (x) { case "%s": return String(args[i++]); case "%d": return Number(args[i++]); case "%j": try { return JSON.stringify(args[i++]); } catch (_) { return "[Circular]"; } break; default: return x; } }); for (let arg = args[i]; i < len; arg = args[++i]) { str += ` ${arg}`; } return str; } return f; } function isNativeStringType(type2) { return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern"; } function isEmptyValue(value2, type2) { if (value2 === void 0 || value2 === null) { return true; } if (type2 === "array" && Array.isArray(value2) && !value2.length) { return true; } if (isNativeStringType(type2) && typeof value2 === "string" && !value2) { return true; } return false; } function asyncParallelArray(arr, func2, callback) { const results = []; let total = 0; const arrLength = arr.length; function count(errors) { results.push.apply(results, errors); total++; if (total === arrLength) { callback(results); } } arr.forEach((a) => { func2(a, count); }); } function asyncSerialArray(arr, func2, callback) { let index2 = 0; const arrLength = arr.length; function next(errors) { if (errors && errors.length) { callback(errors); return; } const original = index2; index2 += 1; if (original < arrLength) { func2(arr[original], next); } else { callback([]); } } next([]); } function flattenObjArr(objArr) { const ret = []; Object.keys(objArr).forEach((k) => { ret.push.apply(ret, objArr[k]); }); return ret; } function asyncMap(objArr, option, func2, callback) { if (option.first) { const _pending = new Promise((resolve, reject) => { const next = function next2(errors) { callback(errors); return errors.length ? reject({ errors, fields: convertFieldsError(errors) }) : resolve(); }; const flattenArr = flattenObjArr(objArr); asyncSerialArray(flattenArr, func2, next); }); _pending.catch((e) => e); return _pending; } let firstFields = option.firstFields || []; if (firstFields === true) { firstFields = Object.keys(objArr); } const objArrKeys = Object.keys(objArr); const objArrLength = objArrKeys.length; let total = 0; const results = []; const pending = new Promise((resolve, reject) => { const next = function next2(errors) { results.push.apply(results, errors); total++; if (total === objArrLength) { callback(results); return results.length ? reject({ errors: results, fields: convertFieldsError(results) }) : resolve(); } }; if (!objArrKeys.length) { callback(results); resolve(); } objArrKeys.forEach((key) => { const arr = objArr[key]; if (firstFields.indexOf(key) !== -1) { asyncSerialArray(arr, func2, next); } else { asyncParallelArray(arr, func2, next); } }); }); pending.catch((e) => e); return pending; } function complementError(rule) { return function(oe) { if (oe && oe.message) { oe.field = oe.field || rule.fullField; return oe; } return { message: typeof oe === "function" ? oe() : oe, field: oe.field || rule.fullField }; }; } function deepMerge(target, source) { if (source) { for (const s in source) { if (source.hasOwnProperty(s)) { const value2 = source[s]; if (typeof value2 === "object" && typeof target[s] === "object") { target[s] = { ...target[s], ...value2 }; } else { target[s] = value2; } } } } return target; } function required(rule, value2, source, errors, options, type2) { if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) { errors.push(format$1(options.messages.required, rule.fullField)); } } function whitespace(rule, value2, source, errors, options) { if (/^\s+$/.test(value2) || value2 === "") { errors.push(format$1(options.messages.whitespace, rule.fullField)); } } const pattern = { // http://emailregex.com/ 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 }; var types = { integer: function integer2(value2) { return /^(-)?\d+$/.test(value2); }, float: function float(value2) { return /^(-)?\d+(\.\d+)?$/.test(value2); }, array: function array2(value2) { return Array.isArray(value2); }, regexp: function regexp2(value2) { if (value2 instanceof RegExp) { return true; } try { return !!new RegExp(value2); } catch (e) { return false; } }, date: function date2(value2) { return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function"; }, number: function number2(value2) { if (isNaN(value2)) { return false; } return typeof +value2 === "number"; }, object: function object2(value2) { return typeof value2 === "object" && !types.array(value2); }, method: function method2(value2) { return typeof value2 === "function"; }, email: function email2(value2) { return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255; }, url: function url2(value2) { return typeof value2 === "string" && !!value2.match(pattern.url); }, hex: function hex(value2) { return typeof value2 === "string" && !!value2.match(pattern.hex); } }; function type(rule, value2, source, errors, options) { if (rule.required && value2 === void 0) { required(rule, value2, source, errors, options); return; } const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"]; const ruleType = rule.type; if (custom.indexOf(ruleType) > -1) { if (!types[ruleType](value2)) { errors.push(format$1(options.messages.types[ruleType], rule.fullField, rule.type)); } } else if (ruleType && typeof value2 !== rule.type) { errors.push(format$1(options.messages.types[ruleType], rule.fullField, rule.type)); } } function range(rule, value2, source, errors, options) { const len = typeof rule.len === "number"; const min = typeof rule.min === "number"; const max = typeof rule.max === "number"; const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; let val = value2; let key = null; const num = typeof value2 === "number"; const str = typeof value2 === "string"; const arr = Array.isArray(value2); if (num) { key = "number"; } else if (str) { key = "string"; } else if (arr) { key = "array"; } if (!key) { return false; } if (arr) { val = value2.length; } if (str) { val = value2.replace(spRegexp, "_").length; } if (len) { if (val !== rule.len) { errors.push(format$1(options.messages[key].len, rule.fullField, rule.len)); } } else if (min && !max && val < rule.min) { errors.push(format$1(options.messages[key].min, rule.fullField, rule.min)); } else if (max && !min && val > rule.max) { errors.push(format$1(options.messages[key].max, rule.fullField, rule.max)); } else if (min && max && (val < rule.min || val > rule.max)) { errors.push(format$1(options.messages[key].range, rule.fullField, rule.min, rule.max)); } } const ENUM = "enum"; function enumerable(rule, value2, source, errors, options) { rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : []; if (rule[ENUM].indexOf(value2) === -1) { errors.push(format$1(options.messages[ENUM], rule.fullField, rule[ENUM].join(", "))); } } function pattern$1(rule, value2, source, errors, options) { if (rule.pattern) { if (rule.pattern instanceof RegExp) { rule.pattern.lastIndex = 0; if (!rule.pattern.test(value2)) { errors.push(format$1(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern)); } } else if (typeof rule.pattern === "string") { const _pattern = new RegExp(rule.pattern); if (!_pattern.test(value2)) { errors.push(format$1(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern)); } } } } const rules = { required, whitespace, type, range, enum: enumerable, pattern: pattern$1 }; function string(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2, "string") && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options, "string"); if (!isEmptyValue(value2, "string")) { rules.type(rule, value2, source, errors, options); rules.range(rule, value2, source, errors, options); rules.pattern(rule, value2, source, errors, options); if (rule.whitespace === true) { rules.whitespace(rule, value2, source, errors, options); } } } callback(errors); } function method(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options); } } callback(errors); } function number$1(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (value2 === "") { value2 = void 0; } if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options); rules.range(rule, value2, source, errors, options); } } callback(errors); } function _boolean(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options); } } callback(errors); } function regexp(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); if (!isEmptyValue(value2)) { rules.type(rule, value2, source, errors, options); } } callback(errors); } function integer(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options); rules.range(rule, value2, source, errors, options); } } callback(errors); } function floatFn(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options); rules.range(rule, value2, source, errors, options); } } callback(errors); } function array(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2, "array") && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options, "array"); if (!isEmptyValue(value2, "array")) { rules.type(rule, value2, source, errors, options); rules.range(rule, value2, source, errors, options); } } callback(errors); } function object(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options); } } callback(errors); } const ENUM$1 = "enum"; function enumerable$1(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); if (value2 !== void 0) { rules[ENUM$1](rule, value2, source, errors, options); } } callback(errors); } function pattern$2(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2, "string") && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); if (!isEmptyValue(value2, "string")) { rules.pattern(rule, value2, source, errors, options); } } callback(errors); } function date(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); if (!isEmptyValue(value2)) { let dateObject; if (typeof value2 === "number") { dateObject = new Date(value2); } else { dateObject = value2; } rules.type(rule, dateObject, source, errors, options); if (dateObject) { rules.range(rule, dateObject.getTime(), source, errors, options); } } } callback(errors); } function required$1(rule, value2, callback, source, options) { const errors = []; const type2 = Array.isArray(value2) ? "array" : typeof value2; rules.required(rule, value2, source, errors, options, type2); callback(errors); } function type$1(rule, value2, callback, source, options) { const ruleType = rule.type; const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2, ruleType) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options, ruleType); if (!isEmptyValue(value2, ruleType)) { rules.type(rule, value2, source, errors, options); } } callback(errors); } function any(rule, value2, callback, source, options) { const errors = []; const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); } callback(errors); } const validators = { string, method, number: number$1, 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 clone() { const cloned = JSON.parse(JSON.stringify(this)); cloned.clone = this.clone; return cloned; } }; } const messages$1 = newMessages(); function Schema(descriptor) { this.rules = null; this._messages = messages$1; this.define(descriptor); } Schema.prototype = { messages: function messages2(_messages) { if (_messages) { this._messages = deepMerge(newMessages(), _messages); } return this._messages; }, define: function define(rules2) { if (!rules2) { throw new Error("Cannot configure a schema with no rules"); } if (typeof rules2 !== "object" || Array.isArray(rules2)) { throw new Error("Rules must be an object"); } this.rules = {}; let z; let item; for (z in rules2) { if (rules2.hasOwnProperty(z)) { item = rules2[z]; this.rules[z] = Array.isArray(item) ? item : [item]; } } }, validate: function validate(source_, o, oc) { const _this = this; if (o === void 0) { o = {}; } if (oc === void 0) { oc = function oc2() { }; } let source = source_; let options = o; let callback = oc; if (typeof options === "function") { callback = options; options = {}; } if (!this.rules || Object.keys(this.rules).length === 0) { if (callback) { callback(); } return Promise.resolve(); } function complete(results) { let i; let errors = []; let fields = {}; function add(e) { if (Array.isArray(e)) { let _errors; errors = (_errors = errors).concat.apply(_errors, e); } else { errors.push(e); } } for (i = 0; i < results.length; i++) { add(results[i]); } if (!errors.length) { errors = null; fields = null; } else { fields = convertFieldsError(errors); } callback(errors, fields); } if (options.messages) { let messages$1$1 = this.messages(); if (messages$1$1 === messages$1) { messages$1$1 = newMessages(); } deepMerge(messages$1$1, options.messages); options.messages = messages$1$1; } else { options.messages = this.messages(); } let arr; let value2; const series = {}; const keys = options.keys || Object.keys(this.rules); keys.forEach((z) => { arr = _this.rules[z]; value2 = source[z]; arr.forEach((r) => { let rule = r; if (typeof rule.transform === "function") { if (source === source_) { source = { ...source }; } value2 = source[z] = rule.transform(value2); } if (typeof rule === "function") { rule = { validator: rule }; } else { rule = { ...rule }; } rule.validator = _this.getValidationMethod(rule); rule.field = z; rule.fullField = rule.fullField || z; rule.type = _this.getType(rule); if (!rule.validator) { return; } series[z] = series[z] || []; series[z].push({ rule, value: value2, source, field: z }); }); }); const errorFields = {}; return asyncMap(series, options, (data, doIt) => { const { rule } = data; let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object"); deep = deep && (rule.required || !rule.required && data.value); rule.field = data.field; function addFullfield(key, schema) { return { ...schema, fullField: `${rule.fullField}.${key}` }; } function cb(e) { if (e === void 0) { e = []; } let errors = e; if (!Array.isArray(errors)) { errors = [errors]; } if (!options.suppressWarning && errors.length) { Schema.warning("async-validator:", errors); } if (errors.length && rule.message) { errors = [].concat(rule.message); } errors = errors.map(complementError(rule)); if (options.first && errors.length) { errorFields[rule.field] = 1; return doIt(errors); } if (!deep) { doIt(errors); } else { if (rule.required && !data.value) { if (rule.message) { errors = [].concat(rule.message).map(complementError(rule)); } else if (options.error) { errors = [options.error(rule, format$1(options.messages.required, rule.field))]; } else { errors = []; } return doIt(errors); } let fieldsSchema = {}; if (rule.defaultField) { for (const k in data.value) { if (data.value.hasOwnProperty(k)) { fieldsSchema[k] = rule.defaultField; } } } fieldsSchema = { ...fieldsSchema, ...data.rule.fields }; for (const f in fieldsSchema) { if (fieldsSchema.hasOwnProperty(f)) { const fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]]; fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f)); } } const schema = new Schema(fieldsSchema); schema.messages(options.messages); if (data.rule.options) { data.rule.options.messages = options.messages; data.rule.options.error = options.error; } schema.validate(data.value, data.rule.options || options, (errs) => { const finalErrors = []; if (errors && errors.length) { finalErrors.push.apply(finalErrors, errors); } if (errs && errs.length) { finalErrors.push.apply(finalErrors, errs); } doIt(finalErrors.length ? finalErrors : null); }); } } let res; if (rule.asyncValidator) { res = rule.asyncValidator(rule, data.value, cb, data.source, options); } else if (rule.validator) { res = rule.validator(rule, data.value, cb, data.source, options); if (res === true) { cb(); } else if (res === false) { cb(rule.message || `${rule.field} fails`); } else if (res instanceof Array) { cb(res); } else if (res instanceof Error) { cb(res.message); } } if (res && res.then) { res.then(() => cb(), (e) => cb(e)); } }, (results) => { complete(results); }); }, getType: function getType(rule) { if (rule.type === void 0 && rule.pattern instanceof RegExp) { rule.type = "pattern"; } if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) { throw new Error(format$1("Unknown rule type %s", rule.type)); } return rule.type || "string"; }, getValidationMethod: function getValidationMethod(rule) { if (typeof rule.validator === "function") { return rule.validator; } const keys = Object.keys(rule); const messageIndex = keys.indexOf("message"); if (messageIndex !== -1) { keys.splice(messageIndex, 1); } if (keys.length === 1 && keys[0] === "required") { return validators.required; } return validators[this.getType(rule)] || false; } }; Schema.register = function register2(type2, validator) { if (typeof validator !== "function") { throw new Error("Cannot register a validator by type, validator is not a function"); } validators[type2] = validator; }; Schema.warning = warning; Schema.messages = messages$1; Schema.warning = function() { }; const _sfc_main$k = { name: "uv-form", mixins: [mpMixin, mixin, props$4], provide() { return { uForm: this }; }, data() { return { formRules: {}, // 规则校验器 validator: {}, // 原始的model快照,用于resetFields方法重置表单时使用 originalModel: null }; }, watch: { // 监听规则的变化 rules: { immediate: true, handler(n2) { this.setRules(n2); } }, // 监听属性的变化,通知子组件uv-form-item重新获取信息 propsChange(n2) { var _a; if ((_a = this.children) == null ? void 0 : _a.length) { this.children.map((child) => { typeof child.updateParentData == "function" && child.updateParentData(); }); } }, // 监听model的初始值作为重置表单的快照 model: { immediate: true, handler(n2) { if (!this.originalModel) { this.originalModel = this.$uv.deepClone(n2); } } } }, computed: { propsChange() { return [ this.errorType, this.borderBottom, this.labelPosition, this.labelWidth, this.labelAlign, this.labelStyle ]; } }, created() { this.children = []; }, methods: { // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则 setRules(rules2) { if (Object.keys(rules2).length === 0) return; if (Object.keys(this.model).length === 0) { this.$uv.error("设置rules,model必须设置!如果已经设置,请刷新页面。"); return; } this.formRules = rules2; this.validator = new Schema(rules2); }, // 清空所有uv-form-item组件的内容,本质上是调用了uv-form-item组件中的resetField()方法 resetFields() { this.resetModel(); }, // 重置model为初始值的快照 resetModel(obj) { this.children.map((child) => { const prop = child == null ? void 0 : child.prop; const value2 = this.$uv.getProperty(this.originalModel, prop); this.$uv.setProperty(this.model, prop, value2); }); }, // 清空校验结果 clearValidate(props2) { props2 = [].concat(props2); this.children.map((child) => { if (props2[0] === void 0 || props2.includes(child.prop)) { child.message = null; } }); }, // 对部分表单字段进行校验 async validateField(value2, callback, event = null) { this.$nextTick(() => { const errorsRes = []; value2 = [].concat(value2); this.children.map((child) => { const childErrors = []; if (value2.includes(child.prop)) { const propertyVal = this.$uv.getProperty( this.model, child.prop ); const propertyChain = child.prop.split("."); const propertyName = propertyChain[propertyChain.length - 1]; const rule = this.formRules[child.prop]; if (!rule) return; const rules2 = [].concat(rule); for (let i = 0; i < rules2.length; i++) { const ruleItem = rules2[i]; const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger); if (event && !trigger.includes(event)) continue; const validator = new Schema({ [propertyName]: ruleItem }); validator.validate( { [propertyName]: propertyVal }, (errors, fields) => { if (this.$uv.test.array(errors)) { errorsRes.push(...errors); childErrors.push(...errors); } this.$nextTick(() => { var _a, _b; child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ? (_b = childErrors[0]) == null ? void 0 : _b.message : null; }); } ); } } }); typeof callback === "function" && callback(errorsRes); }); }, // 校验全部数据 validate(callback) { return new Promise((resolve, reject) => { this.$nextTick(() => { const formItemProps = this.children.map( (item) => item.prop ); this.validateField(formItemProps, (errors) => { if (errors.length) { this.errorType === "toast" && this.$uv.toast(errors[0].message); reject(errors); } else { resolve(true); } }); }); }); } } }; function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uv-form" }, [ vue.renderSlot(_ctx.$slots, "default") ]); } const __easycom_6 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-form/components/uv-form/uv-form.vue"]]); function login$3(data, e) { let url2 = baseUrl + "/index.php/index/Me/subuserloginbytelno"; dorequest( "post", url2, { telno: data.telno, pw: data.pw } ).then((res) => { res = res.data; if (0 == res.code) { e.$refs.toast.show({ type: "error", message: res.errmsg }); } if (200 == res.code) { let userinfo = res.resultData; userinfo.fmembercount = 4; userinfo.fmemberid = 0; saveuserinfo(userinfo); uni.redirectTo({ url: "/pages/index/index" }); } }); } function register$3(data, e, callback = null) { let url2 = baseUrl + "/index.php/index/Me/subnewusername"; return dorequest( "post", url2, { telno: data.telno, userpw: data.userpw } ); } const _sfc_main$j = { data() { return { throttleTime: 1, logininfo: { telno: "", pw: "" }, rules: { "telno": [ { type: "string", required: true, message: this.$t("telno_null"), trigger: ["blur", "change"] }, { pattern: /\d{5,}/, message: this.$t("telno_error"), trigger: ["blur", "change"] } ], "pw": { type: "string", required: true, message: this.$t("password_null"), trigger: ["blur", "change"] } }, showpasswod: false, passwordtype: "password" }; }, methods: { submit() { var that = this; this.$refs.form.validate().then((res) => { login$3(this.logininfo, that); }).catch((errors) => { formatAppLog("log", "at pages/login/login.vue:77", errors); }); }, setshowpasswod() { this.showpasswod = !this.showpasswod; if (this.showpasswod) { this.passwordtype = "text"; } else { this.passwordtype = "password"; } }, toregister() { uni.navigateTo({ url: "/pages/register/register" }); } }, mounted() { uni.setNavigationBarTitle({ title: this.$t("login") }); this.throttleTime = getApp().globalData.throttleTime; }, created() { } }; function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_uv_col = resolveEasycom(vue.resolveDynamicComponent("uv-col"), __easycom_2$3); const _component_uv_input = resolveEasycom(vue.resolveDynamicComponent("uv-input"), __easycom_6$1); const _component_uv_form_item = resolveEasycom(vue.resolveDynamicComponent("uv-form-item"), __easycom_3); const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_3$4); const _component_uv_button = resolveEasycom(vue.resolveDynamicComponent("uv-button"), __easycom_2$2); const _component_uv_form = resolveEasycom(vue.resolveDynamicComponent("uv-form"), __easycom_6); const _component_uv_row = resolveEasycom(vue.resolveDynamicComponent("uv-row"), __easycom_3$1); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "page" }, [ vue.createVNode(_component_uv_row, { justify: "space-between", customStyle: "margin-top: 35%", class: "form" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_form, { labelPosition: "left", model: $data.logininfo, rules: $data.rules, ref: "form" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("telno")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_form_item, { prop: "telno", borderBottom: "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_input, { modelValue: $data.logininfo.telno, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.logininfo.telno = $event), modelModifiers: { trim: true }, border: "none" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "10", offset: "1", customStyle: "margin-top: 20px" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("password")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_form_item, { prop: "pw", borderBottom: "" }, { right: vue.withCtx(() => [ vue.withDirectives(vue.createVNode(_component_uv_icon, { name: "eye-off-outline", color: "#2979ff", size: "18", onClick: $options.setshowpasswod }, null, 8, ["onClick"]), [ [vue.vShow, !$data.showpasswod] ]), vue.withDirectives(vue.createVNode(_component_uv_icon, { name: "eye", color: "#2979ff", size: "18", onClick: $options.setshowpasswod }, null, 8, ["onClick"]), [ [vue.vShow, $data.showpasswod] ]) ]), default: vue.withCtx(() => [ vue.createVNode(_component_uv_input, { modelValue: $data.logininfo.pw, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.logininfo.pw = $event), modelModifiers: { trim: true }, type: $data.passwordtype, border: "none" }, null, 8, ["modelValue", "type"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_button, { type: "primary", throttleTime: $data.throttleTime, text: _ctx.$t("login"), customStyle: "margin-top: 2rem", onClick: $options.submit }, null, 8, ["throttleTime", "text", "onClick"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 8, ["model", "rules"]), vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_button, { type: "primary", plain: true, text: _ctx.$t("register"), customStyle: "margin-top: 20px", onClick: $options.toregister }, null, 8, ["text", "onClick"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]) ], 64 /* STABLE_FRAGMENT */ ); } const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__file", "D:/workspace/uniapp/health2/pages/login/login.vue"]]); const _sfc_main$i = { data() { return { throttleTime: 1, logininfo: { telno: "", pw1: "", pw2: "" }, rules: { "telno": [ { type: "string", required: true, message: this.$t("telno_null"), trigger: ["blur"] }, { pattern: /\d{5,}/, message: this.$t("telno_error"), trigger: ["blur"] } ], "pw1": { type: "string", required: true, message: this.$t("password_null"), trigger: ["blur"] }, "pw2": [{ type: "string", required: true, message: this.$t("password_null"), trigger: ["blur"] }, { validator: (rule, value2, callback) => { if (value2 != this.logininfo.pw1) { return false; } return true; }, message: this.$t("password_repeat_error"), trigger: ["blur"] }] }, showpasswod1: false, passwordtype1: "password", showpasswod2: false, passwordtype2: "password" }; }, methods: { submit() { var that = this; this.$refs.form.validate().then((res) => { let data = { telno: that.logininfo.telno, userpw: that.logininfo.pw1 }; register$3(data).then((res2) => { res2 = res2.data; if (0 == res2.code) { that.$refs.toast.show({ type: "error", message: that.$t("register_error") }); } if (200 == res2.code) { let data2 = { telno: that.logininfo.telno, pw: that.logininfo.pw1 }; login$3(data2, that); } }); }).catch((errors) => { formatAppLog("log", "at pages/register/register.vue:123", errors); }); }, setshowpasswod1() { this.showpasswod1 = !this.showpasswod1; if (this.showpasswod1) { this.passwordtype1 = "text"; } else { this.passwordtype1 = "password"; } }, setshowpasswod2() { this.showpasswod2 = !this.showpasswod2; if (this.showpasswod2) { this.passwordtype2 = "text"; } else { this.passwordtype2 = "password"; } }, tolgoin() { uni.navigateTo({ url: "/pages/login/login" }); } }, mounted() { uni.setNavigationBarTitle({ title: this.$t("register") }); this.throttleTime = getApp().globalData.throttleTime; } }; function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_uv_col = resolveEasycom(vue.resolveDynamicComponent("uv-col"), __easycom_2$3); const _component_uv_input = resolveEasycom(vue.resolveDynamicComponent("uv-input"), __easycom_6$1); const _component_uv_form_item = resolveEasycom(vue.resolveDynamicComponent("uv-form-item"), __easycom_3); const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_3$4); const _component_uv_button = resolveEasycom(vue.resolveDynamicComponent("uv-button"), __easycom_2$2); const _component_uv_form = resolveEasycom(vue.resolveDynamicComponent("uv-form"), __easycom_6); const _component_uv_row = resolveEasycom(vue.resolveDynamicComponent("uv-row"), __easycom_3$1); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "page" }, [ vue.createVNode(_component_uv_row, { justify: "space-between", customStyle: "margin-top: 35%", class: "form" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_form, { labelPosition: "left", model: $data.logininfo, rules: $data.rules, ref: "form" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("telno")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_form_item, { prop: "telno", borderBottom: "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_input, { modelValue: $data.logininfo.telno, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.logininfo.telno = $event), modelModifiers: { trim: true }, border: "none" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "10", offset: "1", customStyle: "margin-top: 20px" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("password")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_form_item, { prop: "pw1", borderBottom: "" }, { right: vue.withCtx(() => [ vue.withDirectives(vue.createVNode(_component_uv_icon, { name: "eye-off-outline", color: "#2979ff", size: "18", onClick: $options.setshowpasswod1 }, null, 8, ["onClick"]), [ [vue.vShow, !$data.showpasswod1] ]), vue.withDirectives(vue.createVNode(_component_uv_icon, { name: "eye", color: "#2979ff", size: "18", onClick: $options.setshowpasswod1 }, null, 8, ["onClick"]), [ [vue.vShow, $data.showpasswod1] ]) ]), default: vue.withCtx(() => [ vue.createVNode(_component_uv_input, { modelValue: $data.logininfo.pw1, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.logininfo.pw1 = $event), modelModifiers: { trim: true }, type: $data.passwordtype1, border: "none" }, null, 8, ["modelValue", "type"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "10", offset: "1", customStyle: "margin-top: 20px" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("password_repeat")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_form_item, { prop: "pw2", borderBottom: "" }, { right: vue.withCtx(() => [ vue.withDirectives(vue.createVNode(_component_uv_icon, { name: "eye-off-outline", color: "#2979ff", size: "18", onClick: $options.setshowpasswod2 }, null, 8, ["onClick"]), [ [vue.vShow, !$data.showpasswod2] ]), vue.withDirectives(vue.createVNode(_component_uv_icon, { name: "eye", color: "#2979ff", size: "18", onClick: $options.setshowpasswod2 }, null, 8, ["onClick"]), [ [vue.vShow, $data.showpasswod2] ]) ]), default: vue.withCtx(() => [ vue.createVNode(_component_uv_input, { modelValue: $data.logininfo.pw2, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.logininfo.pw2 = $event), modelModifiers: { trim: true }, type: $data.passwordtype2, border: "none" }, null, 8, ["modelValue", "type"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_button, { type: "primary", text: _ctx.$t("register"), customStyle: "margin-top: 20px", onClick: $options.submit }, null, 8, ["text", "onClick"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 8, ["model", "rules"]), vue.createVNode(_component_uv_col, { span: "10", offset: "1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_button, { type: "primary", plain: true, throttleTime: $data.throttleTime, text: _ctx.$t("login"), customStyle: "margin-top: 2rem", onClick: _ctx.toregister }, null, 8, ["throttleTime", "text", "onClick"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]) ]); } const PagesRegisterRegister = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__file", "D:/workspace/uniapp/health2/pages/register/register.vue"]]); const _sfc_main$h = { data() { return {}; }, methods: {} }; function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view"); } const PagesMemberMember = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__file", "D:/workspace/uniapp/health2/pages/member/member.vue"]]); const _sfc_main$g = { data() { return { userinfo: {}, selectuser_list: [ { title: this.$t("father"), gender: "1", selected: false }, { title: this.$t("mother"), gender: "2", selected: false }, { title: this.$t("husband"), gender: "1", selected: false }, { title: this.$t("wife"), gender: "2", selected: false }, { title: "", gender: "1", selected: false }, { title: "", gender: "2", selected: false } ], other_member_1: "", other_member_2: "", showdiv: false, memberlist: [], letcount: 0 }; }, methods: { adduser() { }, itemselect(index2) { this.selectuser_list[index2 - 1].selected = !this.selectuser_list[index2 - 1].selected; if (index2 == 5) { this.selectuser_list[index2 - 1].title = other_member_1; } if (index2 == 6) { this.selectuser_list[index2 - 1].title = other_member_2; } }, addother(gender) { let title = ""; let fmemberid = this.memberlist.length + 1; let subanswerinfo = { userid: this.userinfo.id, fmemberid, stemid: 3, answertype: 1 }; if (1 == gender) { if (this.other_member_1.length <= 0) { this.$refs.toast.show({ type: "error", message: this.$t("member_title_null") }); return false; } title = this.other_member_1; subanswerinfo.answeroption = this.$t("man"); subanswerinfo.answeroptionid = 64; } if (2 == gender) { formatAppLog("log", "at pages/member/add.vue:219", this.other_member_2, this.other_member_2.length); if (this.other_member_2.length <= 0) { this.$refs.toast.show({ type: "error", message: this.$t("member_title_null") }); return false; } title = this.other_member_2; subanswerinfo.answeroption = this.$t("female"); subanswerinfo.answeroptionid = 65; } let subanswerlist = []; subanswerlist.push(subanswerinfo); var subinfo = { answer: JSON.stringify(subanswerlist), userid: this.userinfo.id, fmemberid: this.memberlist.length, srid: 0, scaleid: 1, membername: title, gender }; submembergenderbyuserid(subinfo).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); } if (200 == res.code) { this.$refs.toast.show({ type: "success", message: this.$t("do_success") }); uni.navigateTo({ url: "/pages/index/index" }); } }); }, setshowdiv() { this.showdiv = !this.showdiv; }, addmemberbylist() { let selectlist = []; this.selectuser_list.map((item) => { if (item.selected) { selectlist.push(item); } }); this.letcount = this.memberlist.length - 2 + selectlist.length; if (this.letcount > this.userinfo.fmembercount) { this.$refs.toast.show({ type: "error", message: this.$t("member_num_than_max") }); return false; } selectlist.map((item, index2) => { item.fmemberid = this.selectuser_list.length + index2; var answerinfo = { userid: this.userinfo.id, fmemberid: item.fmemberid, stemid: 3, answertype: 1 }; if (item.gender == 1) { answerinfo.answeroption = this.$t("man"); answerinfo.answeroptionid = 64; } else { answerinfo.answeroption = this.$t("female"); answerinfo.answeroptionid = 65; } item.answer = JSON.stringify([answerinfo]); }); let data = { memberlist: selectlist, mcount: selectlist.length, userid: this.userinfo.id }; subfmemberlistbyuserid(data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); } if (200 == res.code) { this.$refs.toast.show({ type: "success", message: this.$t("do_success") }); uni.navigateTo({ url: "/pages/index/index" }); } }); } }, mounted() { uni.setNavigationBarTitle({ title: this.$t("add_member") }); this.userinfo = uni.getStorageSync("userinfo"); this.memberlist = uni.getStorageSync("memberlist"); } }; function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_uv_text = resolveEasycom(vue.resolveDynamicComponent("uv-text"), __easycom_2$4); const _component_uv_col = resolveEasycom(vue.resolveDynamicComponent("uv-col"), __easycom_2$3); const _component_uv_image = resolveEasycom(vue.resolveDynamicComponent("uv-image"), __easycom_1$2); const _component_uv_row = resolveEasycom(vue.resolveDynamicComponent("uv-row"), __easycom_3$1); const _component_uv_line = resolveEasycom(vue.resolveDynamicComponent("uv-line"), __easycom_5); const _component_uv_input = resolveEasycom(vue.resolveDynamicComponent("uv-input"), __easycom_6$1); const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_3$4); const _component_uv_button = resolveEasycom(vue.resolveDynamicComponent("uv-button"), __easycom_2$2); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "titlearea" }, [ vue.createElementVNode( "view", { class: "firsttitle" }, vue.toDisplayString(_ctx.$t("member_add_text_1")), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "title_2" }, vue.toDisplayString(_ctx.$t("member_add_text_2")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "memberarea2" }, [ vue.createVNode(_component_uv_row, { class: "item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "7" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { text: _ctx.$t("add_member_text1") }, null, 8, ["text"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("add_member_text2") }, null, 8, ["text"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("add_member_text3") }, null, 8, ["text"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "5" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_row, { justify: "around" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "6", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_image, { src: "/static/image/selecttype/man.png", shape: "circle", width: "60", height: "60" }), vue.createElementVNode( "view", { class: vue.normalizeClass({ paretareabutton_select: $data.selectuser_list[0].selected, addbtn: !$data.selectuser_list[0].selected }), onClick: _cache[0] || (_cache[0] = ($event) => $options.itemselect(1)) }, vue.toDisplayString(_ctx.$t("father")), 3 /* TEXT, CLASS */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "6", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_image, { src: "/static/image/selecttype/woman.png", shape: "circle", width: "60", height: "60" }), vue.createElementVNode( "view", { class: vue.normalizeClass({ paretareabutton_select: $data.selectuser_list[1].selected, addbtn: !$data.selectuser_list[1].selected }), onClick: _cache[1] || (_cache[1] = ($event) => $options.itemselect(2)) }, vue.toDisplayString(_ctx.$t("mother")), 3 /* TEXT, CLASS */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_line, { length: "80%" }), vue.createVNode(_component_uv_row, { class: "item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "7" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { text: _ctx.$t("add_member_text4") }, null, 8, ["text"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("add_member_text5") }, null, 8, ["text"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("add_member_text6") }, null, 8, ["text"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "5" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_row, { justify: "around" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "6", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_image, { src: "/static/image/selecttype/man.png", shape: "circle", width: "60", height: "60" }), vue.createElementVNode( "view", { class: vue.normalizeClass({ paretareabutton_select: $data.selectuser_list[2].selected, addbtn: !$data.selectuser_list[2].selected }), onClick: _cache[2] || (_cache[2] = ($event) => $options.itemselect(3)) }, vue.toDisplayString(_ctx.$t("husband")), 3 /* TEXT, CLASS */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "6", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_image, { src: "/static/image/selecttype/woman.png", shape: "circle", width: "60", height: "60" }), vue.createElementVNode( "view", { class: vue.normalizeClass({ paretareabutton_select: $data.selectuser_list[3].selected, addbtn: !$data.selectuser_list[3].selected }), onClick: _cache[3] || (_cache[3] = ($event) => $options.itemselect(4)) }, vue.toDisplayString(_ctx.$t("wife")), 3 /* TEXT, CLASS */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), vue.createCommentVNode(` \r \r \r \r \r \r \r \r \r \r \r \r \r {{ $t('father') }}\r \r \r \r \r \r {{ $t('mother') }}\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r {{ $t('husband') }}\r \r \r \r \r \r {{ $t('wife') }}\r \r \r \r \r \r \r `), vue.createElementVNode("view", { class: "othermember" }, [ vue.createElementVNode( "view", { class: "show_view", onClick: _cache[4] || (_cache[4] = (...args) => $options.setshowdiv && $options.setshowdiv(...args)) }, vue.toDisplayString(_ctx.$t("other_member")), 1 /* TEXT */ ) ]), vue.withDirectives(vue.createElementVNode( "view", { class: "selectarea" }, [ vue.createVNode(_component_uv_row, { justify: "around" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "6", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_image, { src: "/static/image/selecttype/man.png", shape: "circle", width: "100", height: "100" }), vue.createVNode(_component_uv_text, { text: _ctx.$t("add_member_text7"), align: "center" }, null, 8, ["text"]), vue.createVNode(_component_uv_input, { placeholder: _ctx.$t("add_member_text9"), border: "bottom", modelValue: $data.other_member_1, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.other_member_1 = $event), customStyle: "width:80px" }, null, 8, ["placeholder", "modelValue"]), vue.createElementVNode("view", { class: "paretareabutton_select", onClick: _cache[6] || (_cache[6] = ($event) => $options.addother(1)) }, [ vue.createVNode(_component_uv_icon, { name: "plus", color: "#fff", size: "10" }) ]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "6", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_image, { src: "/static/image/selecttype/woman.png", shape: "circle", width: "100", height: "100" }), vue.createVNode(_component_uv_text, { text: _ctx.$t("add_member_text8"), align: "center" }, null, 8, ["text"]), vue.createVNode(_component_uv_input, { placeholder: _ctx.$t("add_member_text9"), border: "bottom", modelValue: $data.other_member_2, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.other_member_2 = $event), customStyle: "width:80px" }, null, 8, ["placeholder", "modelValue"]), vue.createElementVNode("view", { class: "paretareabutton_select", onClick: _cache[8] || (_cache[8] = ($event) => $options.addother(2)) }, [ vue.createVNode(_component_uv_icon, { name: "plus", color: "#fff", size: "10" }) ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $data.showdiv] ]), vue.createElementVNode("view", { class: "buttonarea" }, [ vue.createVNode(_component_uv_button, { type: "primary", shape: "square", text: _ctx.$t("submit"), customStyle: "background:#648EB8;width:80%", onClick: $options.addmemberbylist }, null, 8, ["text", "onClick"]) ]), vue.createElementVNode("br") ], 64 /* STABLE_FRAGMENT */ ); } const PagesMemberAdd = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-154867a4"], ["__file", "D:/workspace/uniapp/health2/pages/member/add.vue"]]); const uvBadgeProps = { props: { // 是否显示圆点 isDot: { type: Boolean, default: false }, // 显示的内容 value: { type: [Number, String], default: "" }, // 是否显示 show: { type: Boolean, default: true }, // 最大值,超过最大值会显示 '{max}+' max: { type: [Number, String], default: 999 }, // 主题类型,error|warning|success|primary type: { type: [String, void 0, null], default: "error" }, // 当数值为 0 时,是否展示 Badge showZero: { type: Boolean, default: false }, // 背景颜色,优先级比type高,如设置,type参数会失效 bgColor: { type: [String, null], default: null }, // 字体颜色 color: { type: [String, null], default: null }, // 徽标形状,circle-四角均为圆角,horn-左下角为直角 shape: { type: [String, void 0, null], default: "circle" }, // 设置数字的显示方式,overflow|ellipsis|limit // overflow会根据max字段判断,超出显示`${max}+` // ellipsis会根据max判断,超出显示`${max}...` // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数 numberType: { type: [String, void 0, null], default: "overflow" }, // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效 offset: { type: Array, default: () => [] }, // 是否反转背景和字体颜色 inverted: { type: Boolean, default: false }, // 是否绝对定位 absolute: { type: Boolean, default: false }, ...(_J = (_I = uni.$uv) == null ? void 0 : _I.props) == null ? void 0 : _J.badge } }; const _sfc_main$f = { name: "uv-badge", mixins: [mpMixin, mixin, uvBadgeProps], computed: { // 是否将badge中心与父组件右上角重合 boxStyle() { let style = {}; return style; }, // 整个组件的样式 badgeStyle() { const style = {}; if (this.color) { style.color = this.color; } if (this.bgColor && !this.inverted) { style.backgroundColor = this.bgColor; } if (this.absolute) { style.position = "absolute"; if (this.offset.length) { const top = this.offset[0]; const right = this.offset[1] || top; style.top = this.$uv.addUnit(top); style.right = this.$uv.addUnit(right); } } return style; }, showValue() { switch (this.numberType) { case "overflow": return Number(this.value) > Number(this.max) ? this.max + "+" : this.value; case "ellipsis": return Number(this.value) > Number(this.max) ? "..." : this.value; case "limit": return Number(this.value) > 999 ? Number(this.value) >= 9999 ? Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / 1e3 * 100) / 100 + "k" : this.value; default: return Number(this.value); } }, propsType() { return this.type || "error"; } } }; function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass([[_ctx.isDot ? "uv-badge--dot" : "uv-badge--not-dot", _ctx.inverted && "uv-badge--inverted", _ctx.shape === "horn" && "uv-badge--horn", `uv-badge--${$options.propsType}${_ctx.inverted ? "--inverted" : ""}`], "uv-badge"]), style: vue.normalizeStyle([_ctx.$uv.addStyle(_ctx.customStyle), $options.badgeStyle]) }, vue.toDisplayString(_ctx.isDot ? "" : $options.showValue), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-91e4945b"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-badge/components/uv-badge/uv-badge.vue"]]); const props$3 = { props: { // 滑块的移动过渡时间,单位ms duration: { type: Number, default: 300 }, // tabs标签数组 list: { type: Array, default: () => [] }, // 滑块颜色 lineColor: { type: String, default: "#3c9cff" }, // 菜单选择中时的样式 activeStyle: { type: [String, Object], default: () => ({ color: "#303133" }) }, // 菜单非选中时的样式 inactiveStyle: { type: [String, Object], default: () => ({ color: "#606266" }) }, // 滑块长度 lineWidth: { type: [String, Number], default: 20 }, // 滑块高度 lineHeight: { type: [String, Number], default: 3 }, // 滑块背景显示大小,当滑块背景设置为图片时使用 lineBgSize: { type: String, default: "cover" }, // 菜单item的样式 itemStyle: { type: [String, Object], default: () => ({ height: "44px", fontSize: "15px" }) }, // 菜单是否可滚动 scrollable: { type: Boolean, default: true }, // 当前选中标签的索引 current: { type: [Number, String], default: 0 }, // 默认读取的键名 keyName: { type: String, default: "name" }, ...(_L = (_K = uni.$uv) == null ? void 0 : _K.props) == null ? void 0 : _L.tabs } }; const _sfc_main$e = { name: "uv-tabs", emits: ["click", "change"], mixins: [mpMixin, mixin, props$3], data() { return { firstTime: true, scrollLeft: 0, scrollViewWidth: 0, lineOffsetLeft: 0, tabsRect: { left: 0 }, innerCurrent: 0, moving: false }; }, watch: { current: { immediate: true, handler(newValue, oldValue) { if (newValue !== this.innerCurrent) { this.innerCurrent = newValue; this.$nextTick(() => { this.resize(); }); } } }, // list变化时,重新渲染list各项信息 list(newValue, oldValue) { formatAppLog("log", "at uni_modules/uv-tabs/components/uv-tabs/uv-tabs.vue:149", newValue, oldValue); this.$nextTick(() => { this.resize(); }); } }, computed: { textStyle() { return (index2) => { const style = {}; const customeStyle = index2 == this.innerCurrent ? this.$uv.addStyle(this.activeStyle) : this.$uv.addStyle( this.inactiveStyle ); if (this.list[index2].disabled) { style.color = "#c8c9cc"; } return this.$uv.deepMerge(customeStyle, style); }; }, propsBadge() { return uvBadgeProps; } }, async mounted() { this.init(); }, methods: { setLineLeft() { const tabItem = this.list[this.innerCurrent]; if (!tabItem) { return; } let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0); let lineWidth = this.$uv.getPx(this.lineWidth); if (this.$uv.test.number(this.lineWidth) && this.$uv.unit) { lineWidth = this.$uv.getPx(`${this.lineWidth}${this.$uv.unit}`); } this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2; if (this.firstTime) { setTimeout(() => { this.firstTime = false; }, 20); } }, // nvue下设置滑块的位置 animation(x, duration = 0) { }, // 点击某一个标签 clickHandler(item, index2) { this.$emit("click", { ...item, index: index2 }); if (item.disabled) return; if (this.innerCurrent != index2) { this.$emit("change", { ...item, index: index2 }); } this.innerCurrent = index2; this.$nextTick(() => { this.resize(); }); }, init() { this.$uv.sleep().then(() => { this.resize(); }); }, setScrollLeft() { const tabRect = this.list[this.innerCurrent]; const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => { return total + curr.rect.width; }, 0); const windowWidth = this.$uv.sys().windowWidth; let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2; scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width); this.scrollLeft = Math.max(0, scrollLeft); }, // 获取所有标签的尺寸 resize() { if (this.list.length === 0) { return; } Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => { this.tabsRect = tabsRect; this.scrollViewWidth = 0; itemRect.map((item, index2) => { this.scrollViewWidth += item.width; this.list[index2].rect = item; }); this.setLineLeft(); this.setScrollLeft(); }); }, // 获取导航菜单的尺寸 getTabsRect() { return new Promise((resolve) => { this.queryRect("uv-tabs__wrapper__scroll-view").then((size) => resolve(size)); }); }, // 获取所有标签的尺寸 getAllItemRect() { return new Promise((resolve) => { const promiseAllArr = this.list.map((item, index2) => this.queryRect( `uv-tabs__wrapper__nav__item-${index2}`, true )); Promise.all(promiseAllArr).then((sizes) => resolve(sizes)); }); }, // 获取各个标签的尺寸 queryRect(el, item) { return new Promise((resolve) => { this.$uvGetRect(`.${el}`).then((size) => { resolve(size); }); }); } } }; function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_badge = resolveEasycom(vue.resolveDynamicComponent("uv-badge"), __easycom_0$1); return vue.openBlock(), vue.createElementBlock( "view", { class: "uv-tabs", style: vue.normalizeStyle([_ctx.$uv.addStyle(_ctx.customStyle)]) }, [ vue.createElementVNode("view", { class: "uv-tabs__wrapper" }, [ vue.renderSlot(_ctx.$slots, "left", {}, void 0, true), vue.createElementVNode("view", { class: "uv-tabs__wrapper__scroll-view-wrapper" }, [ vue.createElementVNode("scroll-view", { "scroll-x": _ctx.scrollable, "scroll-left": $data.scrollLeft, "scroll-with-animation": "", class: "uv-tabs__wrapper__scroll-view", "show-scrollbar": false, ref: "uv-tabs__wrapper__scroll-view" }, [ vue.createElementVNode( "view", { class: "uv-tabs__wrapper__nav", ref: "uv-tabs__wrapper__nav", style: vue.normalizeStyle({ flex: _ctx.scrollable ? "" : 1 }) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["uv-tabs__wrapper__nav__item", [`uv-tabs__wrapper__nav__item-${index2}`, item.disabled && "uv-tabs__wrapper__nav__item--disabled"]]), key: index2, onClick: ($event) => $options.clickHandler(item, index2), ref_for: true, ref: `uv-tabs__wrapper__nav__item-${index2}`, style: vue.normalizeStyle([{ flex: _ctx.scrollable ? "" : 1 }, _ctx.$uv.addStyle(_ctx.itemStyle)]) }, [ vue.createElementVNode( "text", { class: vue.normalizeClass([[item.disabled && "uv-tabs__wrapper__nav__item__text--disabled"], "uv-tabs__wrapper__nav__item__text"]), style: vue.normalizeStyle([$options.textStyle(index2)]) }, vue.toDisplayString(item[_ctx.keyName]), 7 /* TEXT, CLASS, STYLE */ ), vue.createVNode(_component_uv_badge, { show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)), isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot, value: item.badge && item.badge.value || $options.propsBadge.value, max: item.badge && item.badge.max || $options.propsBadge.max, type: item.badge && item.badge.type || $options.propsBadge.type, showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero, bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor, color: item.badge && item.badge.color || $options.propsBadge.color, shape: item.badge && item.badge.shape || $options.propsBadge.shape, numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType, inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted, customStyle: "margin-left: 4px;" }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"]) ], 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode( "view", { class: "uv-tabs__wrapper__nav__line", ref: "uv-tabs__wrapper__nav__line", style: vue.normalizeStyle([{ width: _ctx.$uv.addUnit(_ctx.lineWidth), transform: `translate(${$data.lineOffsetLeft}px)`, transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`, height: $data.firstTime ? 0 : _ctx.$uv.addUnit(_ctx.lineHeight), background: _ctx.lineColor, backgroundSize: _ctx.lineBgSize }]) }, null, 4 /* STYLE */ ) ], 4 /* STYLE */ ) ], 8, ["scroll-x", "scroll-left"]) ]), vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ]) ], 4 /* STYLE */ ); } const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-fd5fcf14"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-tabs/components/uv-tabs/uv-tabs.vue"]]); function queryuserhealthinfobyuid(data, e, callback = null) { let url2 = baseUrl + "/index.php/index/Healthmanger/queryuserhealthinfobyuid"; return dorequest("post", url2, data, function(res) { if (callback) { callback(res); } else { if (0 == res.code) { e.$refs.toast.show({ type: "error", message: res.errmsg }); } } }); } function querymergereportlistbyuserid(data) { let url2 = baseUrl + "/index.php/index/Scale/querymergereportlistbyuserid"; return dorequest( "post", url2, { userid: data.userid, fmemberid: data.fmemberid } ); } function querystemperinfobyuserid(data) { let url2 = baseUrl + "/index.php/index/Healthmanger/querystemperinfobyuserid"; return dorequest( "post", url2, { userid: data.userid, fmemberid: data.fmemberid } ); } function querybmipercentage(bmi) { let url2 = baseUrl + "/index.php/index/Healthmanger/querybimpercentage"; return dorequest( "post", url2, { bmi } ); } function querypercentagebystemid(data) { let url2 = baseUrl + "/index.php/index/Healthmanger/querypercentagebystemid"; return dorequest( "post", url2, { stemid: data.stemid, answeroptionid: data.answeroptionid } ); } const _sfc_main$d = { data() { return { list: [], healthlist: [], info: {}, userinfo: {}, selectuser: {}, labellist: [], activeStyle: { color: "#648EB8", fontWeight: "bold", transform: "scale(1.05)" // borderBottom:"2rpx double #648eb8" }, selectitem: false, customStyleRiskmsg: { fontSize: "20px", marginBottom: "10rpx" }, customStyleErrorText: { fontSize: "18px", marginBottom: "10rpx", color: "#648eb8" }, share_userid: false, share_fmemberid: false }; }, methods: { getlist() { let data = { userid: this.share_userid ? this.share_userid : this.userinfo.id, fmemberid: this.share_fmemberid ? this.share_fmemberid : this.selectuser.fmemberid }; querymergereportlistbyuserid(data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); return false; } let list = res.resultData; list.map((item, index2) => { item.noticelist = []; item.advicelist = []; if (parseInt(item.scoreresult) > parseInt(item.risklimit)) { item.havrisk = 1; item.answerlist.map((alitem, alindex) => { if (alitem.noticememo != "") { if (alitem.noticetype == 1) { item.noticelist.push(alitem.noticememo); } if (alitem.noticetype == 2) { item.advicelist.push(alitem.noticememo); } } }); } else { item.havrisk = 0; } this.labellist.push({ name: item.diseasename }); }); this.list = list; this.selectitem = list[0]; }); }, getinfo() { let data = { userid: this.share_userid ? this.share_userid : this.userinfo.id, fmemberid: this.share_fmemberid ? this.share_fmemberid : this.selectuser.fmemberid }; queryuserhealthinfobyuid(data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); return false; } if (200 == res.code) { this.info = res.resultData; } }); }, gethealthlist() { let data = { userid: this.share_userid ? this.share_userid : this.userinfo.id, fmemberid: this.share_fmemberid ? this.share_fmemberid : this.selectuser.fmemberid }; querystemperinfobyuserid(data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); return false; } if (200 == res.code) { let list = res.resultData; list.map((item) => { if (item.hvalue == 1) { item.strvalue = this.$t("y"); } else { item.strvalue = this.$t("n"); } }); this.healthlist = list; } }); }, click(item) { let index2 = item.index; this.selectitem = this.list[index2]; }, change() { }, share(data) { uni.share({ provider: "weixin", scene: "WXSceneSession", type: 0, href: "testapp://pages/report/report?userid=" + this.userid + "&fmemberid=" + this.selectuser.fmemberid, //title: this.$t('navigationBarTitleText')+"分享", title: "分享", summary: "心脑血管早期筛查,简单易得,有利无害,分享给朋友家人。", imageUrl: data.shareimg, success: function(res) { addlog({ json: JSON.stringify(res), type: "uniapp信息" }); formatAppLog("log", "at pages/report/report.vue:298", "success:" + JSON.stringify(res)); }, fail: function(err) { addlog({ json: JSON.stringify(err), type: "uniapp错误" }); formatAppLog("log", "at pages/report/report.vue:305", "fail:" + JSON.stringify(err)); } }); } }, mounted() { this.userinfo = uni.getStorageSync("userinfo"); this.selectuser = uni.getStorageSync("selectuser"); uni.setNavigationBarTitle({ title: this.$t("show_report") }); this.getlist(); this.getinfo(); this.gethealthlist(); }, onLoad: function(option) { this.share_userid = option.userid; this.share_fmemberid = option.fmemberid; }, onBackPress: function(option) { if (this.share_userid) { uni.redirectTo({ url: "/pages/index/show" }); } else { tohome(); } return true; } }; function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_uv_col = resolveEasycom(vue.resolveDynamicComponent("uv-col"), __easycom_2$3); const _component_uv_row = resolveEasycom(vue.resolveDynamicComponent("uv-row"), __easycom_3$1); const _component_uv_text = resolveEasycom(vue.resolveDynamicComponent("uv-text"), __easycom_2$4); const _component_uv_tabs = resolveEasycom(vue.resolveDynamicComponent("uv-tabs"), __easycom_4); const _component_uv_line = resolveEasycom(vue.resolveDynamicComponent("uv-line"), __easycom_5); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "page" }, [ vue.createElementVNode("view", { class: "bottomarc" }), vue.createVNode(_component_uv_row, { justify: "space-between", customStyle: "margin-top: 6%" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "10", offset: "1", class: "box1" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_row, { justify: "space-between", class: "item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "4", align: "center" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("illness_title")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "4", align: "center" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("report_score")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "4", align: "center" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("report_result")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.list, (item, index2) => { return vue.openBlock(), vue.createBlock( _component_uv_row, { justify: "space-between", key: index2, class: "item" }, { default: vue.withCtx(() => [ vue.createVNode( _component_uv_col, { span: "4", align: "center" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(item.diseasename), 1 /* TEXT */ ) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ), vue.createVNode( _component_uv_col, { span: "4" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { type: item.havrisk > 0 ? "error" : "success", text: item.scoreresult ? item.scoreresult : 0, align: "center" }, null, 8, ["type", "text"]) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ), vue.createVNode( _component_uv_col, { span: "4" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { type: item.havrisk > 0 ? "error" : "success", text: item.havrisk > 0 ? _ctx.$t("risk") : _ctx.$t("low_risk"), align: "center" }, null, 8, ["type", "text"]) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createElementVNode("view", { class: "advicearea" }, [ vue.createVNode(_component_uv_row, { justify: "space-between", class: "item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "12", align: "center" }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "advicelabel" }, vue.toDisplayString(_ctx.$t("report_detail")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), $data.labellist.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createVNode(_component_uv_tabs, { list: $data.labellist, onClick: $options.click, customStyle: "align-items: center", itemStyle: "font-size:20px;height:40px;", current: "0", onChange: $options.change, activeStyle: $data.activeStyle, lineWidth: "30" }, null, 8, ["list", "onClick", "onChange", "activeStyle"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "info_div" }, [ $data.selectitem ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ vue.createElementVNode( "view", { class: "diseasetitlestr" }, vue.toDisplayString($data.selectitem.titlestr), 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode( "view", null, [ vue.createVNode(_component_uv_text, { text: _ctx.$t("report_text_1") + $data.selectitem.risklimit + _ctx.$t("report_text_1_1"), align: "center", type: "success" }, null, 8, ["text"]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $data.selectitem.havrisk == 0] ]), $data.selectitem.havrisk == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createVNode(_component_uv_text, { text: $data.selectitem.riskmsg, align: "center", type: "error", customStyle: $data.customStyleRiskmsg }, null, 8, ["text", "customStyle"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("report_error_text_1"), align: "center", customStyle: $data.customStyleErrorText }, null, 8, ["text", "customStyle"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("report_error_text_2"), align: "center", customStyle: $data.customStyleErrorText }, null, 8, ["text", "customStyle"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("report_error_text_3"), align: "center", customStyle: $data.customStyleErrorText }, null, 8, ["text", "customStyle"]), vue.createVNode(_component_uv_row, { customStyle: "margin-top:20rpx" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "12" }, { default: vue.withCtx(() => [ vue.withDirectives(vue.createElementVNode( "view", null, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.selectitem.noticelist, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ vue.createVNode(_component_uv_text, { text: index2 + 1 + "、" + item }, null, 8, ["text"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $data.selectitem.noticelist.length > 0] ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ])) : vue.createCommentVNode("v-if", true), vue.withDirectives(vue.createElementVNode( "view", { class: "noticearea" }, [ vue.createVNode(_component_uv_row, { customStyle: "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "12", align: "center" }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "noticelabel" }, vue.toDisplayString(_ctx.$t("health_advice")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_row, { customStyle: "" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "12" }, { default: vue.withCtx(() => [ vue.withDirectives(vue.createElementVNode( "view", null, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.selectitem.advicelist, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ vue.createVNode(_component_uv_text, { text: index2 + 1 + "、" + item }, null, 8, ["text"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $data.selectitem.advicelist.length > 0] ]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $data.selectitem.havrisk == 1] ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "report_explain" }, [ vue.createElementVNode("view", { class: "advicearea" }, [ vue.createVNode(_component_uv_row, { justify: "space-between", class: "item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "12", align: "center" }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "advicelabel" }, vue.toDisplayString(_ctx.$t("report_explain")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]), vue.createElementVNode("view", { class: "info_div1" }, [ $data.info.age >= 40 ? (vue.openBlock(), vue.createBlock(_component_uv_text, { key: 0, text: _ctx.$t("report_explain_text_1"), type: "info", align: "center" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), $data.info.gender == "男" ? (vue.openBlock(), vue.createBlock(_component_uv_text, { key: 1, text: _ctx.$t("report_explain_text_2"), type: "info", align: "center" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), $data.info.bmi > 24 ? (vue.openBlock(), vue.createBlock(_component_uv_text, { key: 2, text: _ctx.$t("report_explain_text_3") + $data.info.bmi + _ctx.$t("report_explain_text_3_1") + $data.info.height + _ctx.$t("report_explain_text_3_2") + $data.info.weightbmi24 + _ctx.$t("report_explain_text_3_3"), type: "info", align: "center" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), $data.info.sbp >= 140 ? (vue.openBlock(), vue.createBlock(_component_uv_text, { key: 3, text: _ctx.$t("report_explain_text_4"), type: "info" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "info_div1" }, [ $data.info.fhstroke > 0 || $data.info.fhheart > 0 ? (vue.openBlock(), vue.createBlock(_component_uv_text, { key: 0, text: _ctx.$t("report_explain_text_5"), type: "info", align: "center" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), $data.info.issmoke > 0 || $data.info.isdrink > 0 || $data.info.isunsport > 0 ? (vue.openBlock(), vue.createBlock(_component_uv_text, { key: 1, text: _ctx.$t("report_explain_text_6"), type: "info", align: "center" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), $data.info.age >= 40 && $data.info.issmoke > 0 ? (vue.openBlock(), vue.createBlock(_component_uv_text, { key: 2, text: _ctx.$t("report_explain_text_7"), type: "info", align: "center" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), $data.info.isinspectabodomen > 0 || $data.info.isteghtness > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "" }, [ $data.info.isinspectabodomen > 1 ? (vue.openBlock(), vue.createBlock(_component_uv_text, { key: 0, text: _ctx.$t("report_explain_text_8"), type: "info", align: "center" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true), $data.info.isteghtness > 1 ? (vue.openBlock(), vue.createBlock(_component_uv_text, { key: 1, text: _ctx.$t("report_explain_text_9"), type: "info", align: "center" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createVNode(_component_uv_line, { color: "#933333" }), vue.createElementVNode("view", { class: "healthinfolist" }, [ vue.createElementVNode("view", { class: "grid" }, [ vue.createVNode(_component_uv_row, { justify: "space-between", class: "item" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "3", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { text: _ctx.$t("healthy_habits"), bold: true, align: "center" }, null, 8, ["text"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "2", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { text: _ctx.$t("y_n"), bold: true, align: "center" }, null, 8, ["text"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "7", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { text: _ctx.$t("healthy_personal_ratios"), bold: true, align: "center" }, null, 8, ["text"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.healthlist, (item, index2) => { return vue.openBlock(), vue.createBlock( _component_uv_row, { justify: "space-between", class: "item", key: index2 }, { default: vue.withCtx(() => [ vue.createVNode( _component_uv_col, { span: "3", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { text: item.disstr, align: "center", size: "12" }, null, 8, ["text"]) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ), vue.createVNode( _component_uv_col, { span: "2", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { text: item.strvalue, align: "center", size: "12" }, null, 8, ["text"]) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ), vue.createVNode( _component_uv_col, { span: "4", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { text: _ctx.$t("all_people") + item.allpre + "%", align: "center", size: "12" }, null, 8, ["text"]) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ), vue.createVNode( _component_uv_col, { span: "3", align: "center" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_text, { text: _ctx.$t("group_people") + item.agepre + "%", align: "center", size: "12" }, null, 8, ["text"]) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createVNode(_component_uv_text, { text: _ctx.$t("report_text_4"), align: "center", type: "info", bold: true }, null, 8, ["text"]) ]), vue.createCommentVNode(` \r \r \r
\r \r \r \r
`), vue.createVNode(_component_uv_line, { color: "#933333" }), vue.createElementVNode("view", { class: "info_div1" }, [ vue.createVNode(_component_uv_text, { text: _ctx.$t("report_text_9"), bold: true, align: "center" }, null, 8, ["text"]) ]), vue.createVNode(_component_uv_line, { color: "#933333" }), vue.createElementVNode("br"), vue.createCommentVNode(' '), vue.createElementVNode("br") ]) ]) ], 64 /* STABLE_FRAGMENT */ ); } const PagesReportReport = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-12a8021c"], ["__file", "D:/workspace/uniapp/health2/pages/report/report.vue"]]); const props$2 = { props: { bgColor: { type: String, default: "transparent" } } }; const _sfc_main$c = { name: "uv-status-bar", mixins: [mpMixin, mixin, props$2], data() { return {}; }, computed: { style() { const style = {}; style.height = this.$uv.addUnit(this.$uv.sys().statusBarHeight, "px"); if (this.bgColor) { if (this.bgColor.indexOf("gradient") > -1) { style.backgroundImage = this.bgColor; } else { style.background = this.bgColor; } } return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); } } }; function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { style: vue.normalizeStyle([$options.style]), class: "uv-status-bar" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ); } const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-f5bd6f5a"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-status-bar/components/uv-status-bar/uv-status-bar.vue"]]); const _sfc_main$b = { name: "uv-safe-bottom", mixins: [mpMixin, mixin], data() { return { safeAreaBottomHeight: 0, isNvue: false }; }, computed: { style() { const style = {}; return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); } }, mounted() { } }; function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uv-safe-bottom", [!$data.isNvue && "uv-safe-area-inset-bottom"]]), style: vue.normalizeStyle([$options.style]) }, null, 6 /* CLASS, STYLE */ ); } const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-560f16b2"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-safe-bottom/components/uv-safe-bottom/uv-safe-bottom.vue"]]); const _sfc_main$a = { name: "uv-popup", components: {}, mixins: [mpMixin, mixin], emits: ["change", "maskClick"], props: { // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层 // message: 消息提示 ; dialog : 对话框 mode: { type: String, default: "center" }, // 动画时长,单位ms duration: { type: [String, Number], default: 300 }, // 层级 zIndex: { type: [String, Number], default: 10075 }, bgColor: { type: String, default: "#ffffff" }, safeArea: { type: Boolean, default: true }, // 是否显示遮罩 overlay: { type: Boolean, default: true }, // 点击遮罩是否关闭弹窗 closeOnClickOverlay: { type: Boolean, default: true }, // 遮罩的透明度,0-1之间 overlayOpacity: { type: [Number, String], default: 0.4 }, // 自定义遮罩的样式 overlayStyle: { type: [Object, String], default: "" }, // 是否为iPhoneX留出底部安全距离 safeAreaInsetBottom: { type: Boolean, default: true }, // 是否留出顶部安全距离(状态栏高度) safeAreaInsetTop: { type: Boolean, default: false }, // 是否显示关闭图标 closeable: { type: Boolean, default: false }, // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角 closeIconPos: { type: String, default: "top-right" }, // mode=center,也即中部弹出时,是否使用缩放模式 zoom: { type: Boolean, default: true }, round: { type: [Number, String], default: 0 }, ...(_N = (_M = uni.$uv) == null ? void 0 : _M.props) == null ? void 0 : _N.popup }, watch: { /** * 监听type类型 */ type: { handler: function(type2) { if (!this.config[type2]) return; this[this.config[type2]](true); }, immediate: true }, isDesktop: { handler: function(newVal) { if (!this.config[newVal]) return; this[this.config[this.mode]](true); }, immediate: true }, // H5 下禁止底部滚动 showPopup(show) { } }, data() { return { ani: [], showPopup: false, showTrans: false, popupWidth: 0, popupHeight: 0, config: { top: "top", bottom: "bottom", center: "center", left: "left", right: "right", message: "top", dialog: "center", share: "bottom" }, transitionStyle: { position: "fixed", left: 0, right: 0 }, maskShow: true, mkclick: true, popupClass: this.isDesktop ? "fixforpc-top" : "top", direction: "" }; }, computed: { isDesktop() { return this.popupWidth >= 500 && this.popupHeight >= 500; }, bg() { if (this.bgColor === "" || this.bgColor === "none" || this.$uv.getPx(this.round) > 0) { return "transparent"; } return this.bgColor; }, contentStyle() { const style = {}; if (this.bgColor) { style.backgroundColor = this.bg; } if (this.round) { const value2 = this.$uv.addUnit(this.round); const mode = this.direction ? this.direction : this.mode; style.backgroundColor = this.bgColor; if (mode === "top") { style.borderBottomLeftRadius = value2; style.borderBottomRightRadius = value2; } else if (mode === "bottom") { style.borderTopLeftRadius = value2; style.borderTopRightRadius = value2; } else if (mode === "center") { style.borderRadius = value2; } } return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)); } }, // TODO vue3 unmounted() { this.setH5Visible(); }, created() { this.messageChild = null; this.clearPropagation = false; }, methods: { setH5Visible() { }, /** * 公用方法,不显示遮罩层 */ closeMask() { this.maskShow = false; }, // TODO nvue 取消冒泡 clear(e) { e.stopPropagation(); this.clearPropagation = true; }, open(direction) { if (this.showPopup) { return; } let innerType = ["top", "center", "bottom", "left", "right", "message", "dialog", "share"]; if (!(direction && innerType.indexOf(direction) !== -1)) { direction = this.mode; } else { this.direction = direction; } if (!this.config[direction]) { return this.$uv.error(`缺少类型:${direction}`); } this[this.config[direction]](); this.$emit("change", { show: true, type: direction }); }, close(type2) { this.showTrans = false; this.$emit("change", { show: false, type: this.mode }); clearTimeout(this.timer); this.timer = setTimeout(() => { this.showPopup = false; }, 300); }, // TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容 touchstart() { this.clearPropagation = false; }, onTap() { if (this.clearPropagation) { this.clearPropagation = false; return; } this.$emit("maskClick"); if (!this.closeOnClickOverlay) return; this.close(); }, /** * 顶部弹出样式处理 */ top(type2) { this.popupClass = this.isDesktop ? "fixforpc-top" : "top"; this.ani = ["slide-top"]; this.transitionStyle = { position: "fixed", zIndex: this.zIndex, left: 0, right: 0, backgroundColor: this.bg }; if (type2) return; this.showPopup = true; this.showTrans = true; this.$nextTick(() => { if (this.messageChild && this.mode === "message") { this.messageChild.timerClose(); } }); }, /** * 底部弹出样式处理 */ bottom(type2) { this.popupClass = "bottom"; this.ani = ["slide-bottom"]; this.transitionStyle = { position: "fixed", zIndex: this.zIndex, left: 0, right: 0, bottom: 0, backgroundColor: this.bg }; if (type2) return; this.showPopup = true; this.showTrans = true; }, /** * 中间弹出样式处理 */ center(type2) { this.popupClass = "center"; this.ani = this.zoom ? ["zoom-in", "fade"] : ["fade"]; this.transitionStyle = { position: "fixed", zIndex: this.zIndex, display: "flex", flexDirection: "column", bottom: 0, left: 0, right: 0, top: 0, justifyContent: "center", alignItems: "center" }; if (type2) return; this.showPopup = true; this.showTrans = true; }, left(type2) { this.popupClass = "left"; this.ani = ["slide-left"]; this.transitionStyle = { position: "fixed", zIndex: this.zIndex, left: 0, bottom: 0, top: 0, backgroundColor: this.bg, display: "flex", flexDirection: "column" }; if (type2) return; this.showPopup = true; this.showTrans = true; }, right(type2) { this.popupClass = "right"; this.ani = ["slide-right"]; this.transitionStyle = { position: "fixed", zIndex: this.zIndex, bottom: 0, right: 0, top: 0, backgroundColor: this.bg, display: "flex", flexDirection: "column" }; if (type2) return; this.showPopup = true; this.showTrans = true; } } }; function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_overlay = resolveEasycom(vue.resolveDynamicComponent("uv-overlay"), __easycom_0$3); const _component_uv_status_bar = resolveEasycom(vue.resolveDynamicComponent("uv-status-bar"), __easycom_1$1); const _component_uv_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("uv-safe-bottom"), __easycom_2$1); const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_3$4); const _component_uv_transition = resolveEasycom(vue.resolveDynamicComponent("uv-transition"), __easycom_4$1); return $data.showPopup ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uv-popup", [$data.popupClass, $options.isDesktop ? "fixforpc-z-index" : ""]]), style: vue.normalizeStyle([{ zIndex: $props.zIndex }]) }, [ vue.createElementVNode( "view", { onTouchstart: _cache[2] || (_cache[2] = (...args) => $options.touchstart && $options.touchstart(...args)) }, [ vue.createCommentVNode(" 遮罩层 "), $data.maskShow && $props.overlay ? (vue.openBlock(), vue.createBlock(_component_uv_overlay, { key: "1", show: $data.showTrans, duration: $props.duration, "custom-style": $props.overlayStyle, opacity: $props.overlayOpacity, zIndex: $props.zIndex, onClick: $options.onTap }, null, 8, ["show", "duration", "custom-style", "opacity", "zIndex", "onClick"])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_uv_transition, { key: "2", mode: $data.ani, name: "content", "custom-style": $data.transitionStyle, duration: $props.duration, show: $data.showTrans, onClick: $options.onTap }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uv-popup__content", [$data.popupClass]]), style: vue.normalizeStyle([$options.contentStyle]), onClick: _cache[1] || (_cache[1] = (...args) => $options.clear && $options.clear(...args)) }, [ $props.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_uv_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), $props.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_uv_safe_bottom, { key: 1 })) : vue.createCommentVNode("v-if", true), $props.closeable ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])), class: vue.normalizeClass(["uv-popup__content__close", ["uv-popup__content__close--" + $props.closeIconPos]]), "hover-class": "uv-popup__content__close--hover", "hover-stay-time": "150" }, [ vue.createVNode(_component_uv_icon, { name: "close", color: "#909399", size: "18", bold: "" }) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["mode", "custom-style", "duration", "show", "onClick"]) ], 32 /* NEED_HYDRATION */ ) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-01a3ad6e"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-popup/components/uv-popup/uv-popup.vue"]]); const _sfc_main$9 = { name: "radio", props: { //值 selectvalue: { type: String, required: true, validator: function(value2) { return value2.length > 0; } }, //标签 label: { type: String, required: true, validator: function(value2) { return value2.length > 0; } }, checked: { type: Boolean } }, data() { return {}; } }; function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "row" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "label", { for: "" }, vue.toDisplayString($props.label), 1 /* TEXT */ ) ]), vue.createElementVNode("view", null, [ vue.createElementVNode("radio", { value: $props.selectvalue, checked: $props.checked, color: "rgb(100, 142, 184)", style: { "border-radius": "0" } }, null, 8, ["value", "checked"]) ]) ]); } const Radio = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-b6b9d1fa"], ["__file", "D:/workspace/uniapp/health2/components/radio.vue"]]); const _sfc_main$8 = { components: { Radio }, data() { return { userinfo: {}, selectuser: {}, stemitem: {}, scaleid: 0, srid: 0, sindex: 0, stemindexlabel: 1, selectanswer: "", answeroptionid: "", customStyle: { fontSize: "30px", width: "100%" }, selectbutton2: { fontSize: "30px", width: "500rpx", background: "#648EB8", border: "0px" }, selectbutton3: { fontSize: "20px", fontWeight: "bold", letterSpacing: "0.5em" }, percent: 0, timer: false }; }, computed: { surplusstems() { let stemlist = uni.getStorageSync("stemlist"); let value2 = 1; stemlist.map((item, index2) => { if (item.id == this.stemitem.id) { value2 = stemlist.length - index2; } }); return value2; }, comstatus() { let stemlist = uni.getStorageSync("stemlist"); let sindex = parseInt(this.sindex); let count = stemlist.length - 2; if (sindex + 1 == count) { return true; } else { return false; } } }, methods: { init() { this.userinfo = uni.getStorageSync("userinfo"); this.selectuser = uni.getStorageSync("selectuser"); this.stemitem = uni.getStorageSync("stemitem"); }, change(e) { let value2 = e.detail.value; let list = this.stemitem.alist; this.selectanswer = list[value2]; }, donext() { if ("" == this.selectanswer) { this.$refs.toast.show({ type: "error", message: this.$t("please_completion_problem") }); return false; } var answer = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, stemid: this.stemitem.id, answertype: 1, answeroptionid: this.selectanswer.id, answeroption: this.selectanswer.option }; let data = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, srid: this.srid, scaleid: this.scaleid }; subanswerbyuserid(answer, data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); return false; } if (200 == res.code) { uni.setStorage({ key: "srid", data: res.resultData }); let data2 = { stemid: this.stemitem.id, answeroptionid: this.selectanswer.id }; formatAppLog("log", "at pages/topic/common.vue:181", this.comstatus); if (this.comstatus) { let srid = this.srid; subcomstatus(srid).then(); uni.removeStorage({ key: "stemitem" }); uni.redirectTo({ url: "/pages/report/report" }); } else { querypercentagebystemid(data2).then((res2) => { res2 = res2.data; if (0 == res2.code) { let result = tostemlistnext(this.sindex, 1); if (!result) { this.$refs.toast.show({ type: "error", message: this.$t("system_error") }); return false; } } if (200 == res2.code) { this.percent = res2.resultData + "%"; this.showinfo(); let that = this; this.timer = setTimeout(function() { that.closeinfo(); tostemlistnext(that.sindex, 1); }, 3e3); } }); } } }); }, showinfo() { this.$refs.popup.open(); }, closeinfo() { this.$refs.popup.close(); }, maskClick() { clearTimeout(this.timer); this.$refs.popup.close(); tostemlistnext(this.sindex, 1); } }, mounted() { uni.setNavigationBarTitle({ title: this.$t("scale_evaluation") }); this.init(); }, onLoad: function(option) { this.scaleid = option.scaleid; this.srid = option.srid; this.sindex = option.sindex; }, onBackPress: function(option) { tohome(); return true; } }; function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_Radio = vue.resolveComponent("Radio"); const _component_uv_button = resolveEasycom(vue.resolveDynamicComponent("uv-button"), __easycom_2$2); const _component_uv_text = resolveEasycom(vue.resolveDynamicComponent("uv-text"), __easycom_2$4); const _component_uv_popup = resolveEasycom(vue.resolveDynamicComponent("uv-popup"), __easycom_2); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "titlearea" }, [ vue.createElementVNode( "text", { class: "title_2" }, vue.toDisplayString(_ctx.$t("completion_problem_for_valuating_people")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_member" }, vue.toDisplayString(_ctx.$t("valuating_people")) + ":" + vue.toDisplayString($data.selectuser.membername), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info_div" }, [ vue.createElementVNode("view", { class: "text_div" }, [ vue.createElementVNode( "text", { class: "title1" }, vue.toDisplayString($data.stemitem.stem), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "text_div" }, [ vue.createElementVNode( "text", { class: "title2" }, vue.toDisplayString($data.stemitem.disstr), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "info_div" }, [ 1 == $data.stemitem.stemtype ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ vue.createCommentVNode(" 单选 ") ])) : vue.createCommentVNode("v-if", true), 2 == $data.stemitem.stemtype ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "" }, [ vue.createCommentVNode(" 多选 ") ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(` \r \r \r {{item.option}} 1\r \r \r `), vue.createElementVNode( "radio-group", { onChange: _cache[0] || (_cache[0] = (...args) => $options.change && $options.change(...args)), style: { "width": "90%" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.stemitem.alist, (item, index2) => { return vue.openBlock(), vue.createBlock(_component_Radio, { selectvalue: index2, label: item.option, key: index2 }, null, 8, ["selectvalue", "label"]); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ]), vue.createElementVNode("view", { class: "donext_div" }, [ vue.createVNode(_component_uv_button, { type: "primary", text: _ctx.$t("next_step"), onClick: $options.donext, customStyle: $data.selectbutton2, customTextStyle: $data.selectbutton3 }, null, 8, ["text", "onClick", "customStyle", "customTextStyle"]) ]), $data.sindex == 11 && $data.scaleid == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "completedis" }, [ vue.createElementVNode( "text", { class: "pregresstext" }, vue.toDisplayString(_ctx.$t("completion_text_1")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "pregresstext" }, vue.toDisplayString(_ctx.$t("completion_text_2")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $options.surplusstems < 9 && $options.surplusstems > 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "progressarea" }, [ vue.createElementVNode( "text", { class: "pregresstext" }, vue.toDisplayString($options.surplusstems - 1) + vue.toDisplayString(_ctx.$t("questions_remaining")), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", null, [ vue.createVNode(_component_uv_popup, { ref: "popup", mode: "bottom", onMaskClick: $options.maskClick }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "over_percent_div" }, [ vue.createElementVNode("view", { class: "content" }, [ vue.createVNode(_component_uv_text, { text: $data.stemitem.stem, align: "center", size: "25" }, null, 8, ["text"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("have") + $data.percent, type: "success", bold: "true", align: "center", size: "30" }, null, 8, ["text"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("same_as_you"), align: "center", size: "25" }, null, 8, ["text"]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["onMaskClick"]) ]) ], 64 /* STABLE_FRAGMENT */ ); } const PagesTopicCommon = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "D:/workspace/uniapp/health2/pages/topic/common.vue"]]); function isString$1(value2) { return "string" == typeof value2; } function isObject$2(value2) { return "object" == typeof value2; } function isArray$1(value2) { return "array" == typeof value2; } function isLawfulType(type2, value2) { let valye_type = typeof value2; if (isString$1(type2)) { type2 = type2.toLowerCase(); return type2 == valye_type; } if (isArray$1(type2)) { return type2.indexOf(valye_type) ? true : false; } return false; } function isFunction$1(value2) { return "function" == typeof value2; } let config = { canvasid: { type: "string", required: true, validator: function(value2) { return value2.length > 0; }, value: "" }, canvascursorid: { type: "string", required: true, validator: function(value2) { return value2.length > 0; }, value: "" }, minvalue: { type: "number", required: true, validator: function(value2) { return value2 > 0; }, value: 0 }, maxvalue: { type: "number", required: true, validator: function(value2) { return value2 > 0; }, value: 0 }, interval: { type: "number", required: true, validator: function(value2) { return value2 > 0; }, value: 0 }, defaultvalue: { type: "number", required: true, validator: function(value2) { return value2 > 0; }, value: 0 }, precision: { //小数点位数 type: "number", validator: function(value2) { let values = [0, 1, 2]; return values.indexOf(value2) >= 0; }, value: 0 } }; let screenWidth = 0; let screenHeight = 0; let heightDecimal = 50; let heightDigit = 25; let ratio = 10; let fontSize = 20; let canvasHeight = 80; let harfline = 5; let lineWidth1 = 1; let lineWidth2 = 2; let rulecolor1 = "#FFA500"; let rulecolor2 = "#FF8C00"; let cursorcolor = "#0000FF"; let canvasWidth = 0; let value = 0; let scroll_left = 0; function getvalue(key) { return typeof config[key].value != "undefined" ? config[key].value : false; } function setconfig(param) { if (!isObject$2(param)) { throw new Error("drawruler param error"); } Object.entries(config).forEach(([k, v]) => { if (v.required) { if (!param[k]) { throw new Error("param " + k + " required"); } } let value2 = param[k]; if (v.type) { if (!isLawfulType(v.type, value2)) { throw new Error("param " + k + " type error"); } } if (isFunction$1(v.validator)) { if (!v.validator(value2)) { throw new Error("param " + k + " value error"); } } v.value = value2; config[k] = v; }); } function dodrawruler() { var context = uni.createCanvasContext(getvalue("canvasid")); let minvalue = getvalue("minvalue"); let maxvalue = getvalue("maxvalue"); let interval = getvalue("interval"); let origionX = 0; origionX = screenWidth / 2; let origion = { x: origionX, y: 0 }; let i = minvalue; while (i <= maxvalue) { context.beginPath(); let movetoX = origion.x + (i - minvalue) * ratio; let movetoY = 0; context.moveTo(movetoX, movetoY); let linetoX = origion.x + (i - minvalue) * ratio; let linetoY = i % ratio == 0 ? heightDecimal : heightDigit; context.lineTo(linetoX, linetoY); context.setLineWidth(lineWidth2); context.setStrokeStyle(i % ratio == 0 ? rulecolor1 : rulecolor2); context.stroke(); context.setFillStyle("gray"); if (i % ratio == 0) { context.setFontSize(fontSize); context.fillText(i == 0 ? " " + i : i, origion.x + (i - minvalue) * ratio - fontSize / 2, heightDecimal + 5 + fontSize); } context.closePath(); i += interval; } setTimeout(() => { context.draw(); }, 50); } function setCanvasConfig() { uni.getSystemInfo({ success: (res) => { screenWidth = res.windowWidth; screenHeight = res.windowHeight; } }); canvasWidth = (getvalue("maxvalue") - getvalue("minvalue")) * ratio + screenWidth; config["canvasWidth"] = { value: canvasWidth }; config["canvasHeight"] = { value: canvasHeight }; } function getCanvasConfig() { let use_config = { canvasWidth: getvalue("canvasWidth"), canvasHeight: getvalue("canvasHeight"), screenWidth, screenHeight }; return use_config; } function drowncursor() { var context = uni.createCanvasContext(getvalue("canvascursorid")); var center = { x: screenWidth / 2, y: 0 }; center.y = harfline * Math.sqrt(3); var right = { x: center.x - harfline, y: 0 }; var left = { x: center.x + harfline, y: 0 }; context.beginPath(); context.moveTo(right.x, 0); context.lineTo(left.x, 0); context.lineTo(center.x, center.y); context.closePath(); context.setFillStyle(cursorcolor); context.fill(); context.moveTo(center.x, 0); context.lineTo(center.x, 50); context.setLineWidth(lineWidth1); context.setStrokeStyle(cursorcolor); context.stroke(); context.draw(true); let defaultvalue = getvalue("defaultvalue"); if (defaultvalue > 0) { let minvalue = getvalue("minvalue"); value = defaultvalue; scroll_left = (value - minvalue) * 10; } else { let midvalue = (getvalue("maxvalue") - getvalue("minvalue")) / 2; value = midvalue + getvalue("minvalue"); scroll_left = canvasWidth / 2 - screenWidth / 2; } } function getcursorvalue() { return value; } function getscrollleft() { return scroll_left; } function drawruler(param) { setconfig(param); setCanvasConfig(); dodrawruler(); drowncursor(); } function setcursorvalue(scrollLeft, minvalue = 0) { if (minvalue <= 0) { minvalue = getvalue("minvalue"); } let precision = getvalue("precision"); let value2 = 0; if (precision == 0) { value2 = Math.round(scrollLeft / 10) + minvalue; } else { value2 = parseFloat((scrollLeft / 10).toFixed(precision)) + minvalue; } return value2; } const _sfc_main$7 = { data() { return { minage: 18, maxage: 80, userinfo: {}, selectuser: {}, viewage: 35, selectbutton1: { fontSize: "30px", width: "500rpx", borderColor: "#648EB8", color: "#648EB8" }, selectbutton2: { fontSize: "30px", width: "500rpx", background: "#648EB8", border: "0px" }, selectbutton3: { fontSize: "20px", fontWeight: "bold", letterSpacing: "0.5em" }, scaleid: 0, srid: 0, sindex: 0, stemid: 1, answertype: 0, canvasHeight: 80, canvasWidth: 1e3, scroll_left: 0 }; }, computed: { columns() { let list = []; for (var i = this.minage; i <= this.maxage; i++) { let label = i + this.$t("select_age_1"); if (i <= this.minage) { label = i + this.$t("select_age_3"); } if (i >= this.maxage) { label = i + this.$t("select_age_2"); } let item = { label, value: i }; list.push(item); } return [list]; }, style() { let value2 = { canvasHeight: this.canvasHeight + "px", canvasWidth: this.canvasWidth + "px", screenWidth: this.screenWidth + "px" }; return value2; } }, methods: { init() { this.userinfo = uni.getStorageSync("userinfo"); this.selectuser = uni.getStorageSync("selectuser"); }, showselectage() { this.$refs.picker.open(); let index2 = this.viewage - this.minage; this.$refs.picker.setIndexs([index2], true); }, confirm(e) { let value2 = e.value[0].value; this.viewage = value2; }, change(e) { let value2 = e.value[0].value; this.viewage = value2; }, donext() { let answer = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, stemid: this.stemid, answertype: this.answertype, answervalue: this.viewage }; let data = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, srid: this.srid, scaleid: this.scaleid }; subanswerbyuserid(answer, data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); return false; } if (200 == res.code) { uni.setStorage({ key: "srid", data: res.resultData }); tostemlistnext(this.sindex, 1); } }); }, drawruler() { let param = { canvasid: "canvas_ruler", canvascursorid: "canvas-cursor", minvalue: this.minage, maxvalue: this.maxage, interval: 1, defaultvalue: this.viewage, precision: 0 }; drawruler(param); this.viewage = getcursorvalue(); this.canvasHeight = getCanvasConfig().canvasHeight; this.canvasWidth = getCanvasConfig().canvasWidth; this.screenWidth = getCanvasConfig().screenWidth; this.scroll_left = getscrollleft(); }, scroll(e) { this.viewage = setcursorvalue(e.detail.scrollLeft); } }, mounted() { uni.setNavigationBarTitle({ title: this.$t("select_age") }); this.init(); }, onLoad: function(option) { this.scaleid = option.scaleid; this.srid = option.srid; this.sindex = option.sindex; }, onBackPress: function(option) { tohome(); return true; }, onReady() { this.drawruler(); } }; function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_uv_button = resolveEasycom(vue.resolveDynamicComponent("uv-button"), __easycom_2$2); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "titlearea" }, [ vue.createElementVNode( "text", { class: "title_2" }, vue.toDisplayString(_ctx.$t("selectage_test1")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_member" }, vue.toDisplayString(_ctx.$t("report_user")) + ":" + vue.toDisplayString($data.selectuser.membername), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, vue.toDisplayString(_ctx.$t("selectage_test2")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "agevalue" }, [ vue.createElementVNode("view", { class: "" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("select_age")) + ": ", 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode( "text", { class: "strage" }, "29" + vue.toDisplayString(_ctx.$t("select_age_3")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $data.viewage <= 29] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "strage" }, vue.toDisplayString($data.viewage) + vue.toDisplayString(_ctx.$t("select_age_1")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $data.viewage > 29 && $data.viewage < 70] ]), vue.withDirectives(vue.createElementVNode( "text", { class: "strage" }, "70" + vue.toDisplayString(_ctx.$t("select_age_2")), 513 /* TEXT, NEED_PATCH */ ), [ [vue.vShow, $data.viewage >= 70] ]) ]), vue.createCommentVNode(` `) ]), vue.createCommentVNode(' \r\n \r\n '), vue.createElementVNode( "view", { class: "showdiv", id: "showdiv", style: vue.normalizeStyle({ height: $options.style.canvasHeight }) }, [ vue.createElementVNode("scroll-view", { style: { "width": "100%", "height": "100%" }, "scroll-x": true, onScroll: _cache[0] || (_cache[0] = (...args) => $options.scroll && $options.scroll(...args)), "scroll-left": $data.scroll_left, "show-scrollbar": false }, [ vue.createElementVNode("canvas", { style: vue.normalizeStyle({ width: $options.style.canvasWidth, height: $options.style.canvasHeight }), "canvas-id": "canvas_ruler", id: "canvas_ruler", width: $data.canvasWidth }, null, 12, ["width"]) ], 40, ["scroll-left"]), vue.createElementVNode( "canvas", { style: vue.normalizeStyle({ width: $options.style.screenWidth, height: $options.style.canvasHeight }), "canvas-id": "canvas-cursor", id: "canvas-cursor" }, null, 4 /* STYLE */ ) ], 4 /* STYLE */ ), vue.createElementVNode("view", { class: "donext_div" }, [ vue.createVNode(_component_uv_button, { type: "primary", text: _ctx.$t("next_step"), onClick: $options.donext, customStyle: $data.selectbutton2, customTextStyle: $data.selectbutton3 }, null, 8, ["text", "onClick", "customStyle", "customTextStyle"]) ]) ], 64 /* STABLE_FRAGMENT */ ); } const PagesTopicSelectage = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-f28d192f"], ["__file", "D:/workspace/uniapp/health2/pages/topic/selectage.vue"]]); const _sfc_main$6 = { data() { return { userinfo: {}, selectuser: {}, scaleid: 0, srid: 0, scaleid: 0, stemid: 3, answertype: 1 }; }, methods: { init() { this.userinfo = uni.getStorageSync("userinfo"); this.selectuser = uni.getStorageSync("selectuser"); }, selectsex(sex) { let answervalue = false; let answeroptionid = false; switch (sex) { case 1: answervalue = this.$t("man"); answeroptionid = 64; break; case 2: answervalue = this.$t("female"); answeroptionid = 65; break; default: return; } let answer = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, stemid: this.stemid, answertype: this.answertype, answervalue, answeroptionid }; let data = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, srid: this.srid, scaleid: this.scaleid }; subanswerbyuserid(answer, data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); return false; } if (200 == res.code) { uni.setStorage({ key: "srid", data: res.resultData }); let data1 = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, gender: sex }; submembergenderwithuid(data1); tostemlistnext(this.sindex, 1); } }); } }, mounted() { uni.setNavigationBarTitle({ title: this.$t("select_sex") }); this.init(); }, onLoad: function(option) { this.scaleid = option.scaleid; this.srid = option.srid; this.sindex = option.sindex; }, onBackPress: function(option) { tohome(); return true; } }; function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_uv_image = resolveEasycom(vue.resolveDynamicComponent("uv-image"), __easycom_1$2); const _component_uv_col = resolveEasycom(vue.resolveDynamicComponent("uv-col"), __easycom_2$3); const _component_uv_row = resolveEasycom(vue.resolveDynamicComponent("uv-row"), __easycom_3$1); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "titlearea" }, [ vue.createElementVNode( "text", { class: "title_2" }, vue.toDisplayString(_ctx.$t("select_gender_for_valuating_people")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_member" }, vue.toDisplayString(_ctx.$t("valuating_people")) + ":" + vue.toDisplayString($data.selectuser.membername), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, "      " + vue.toDisplayString(_ctx.$t("select_gender_text_1")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_uv_row, { justify: "space-between", customStyle: "margin-top: 6%" }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_col, { span: "6", align: "center", onClick: _cache[0] || (_cache[0] = ($event) => $options.selectsex(1)) }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_image, { class: "img", src: "/static/image/selecttype/man.png", mode: "aspectFill", shape: "circle", "lazy-load": true, width: "150", height: "150" }), vue.createElementVNode( "view", { class: "mybtn" }, vue.toDisplayString(_ctx.$t("is_man")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uv_col, { span: "6", align: "center", onClick: _cache[1] || (_cache[1] = ($event) => $options.selectsex(2)) }, { default: vue.withCtx(() => [ vue.createVNode(_component_uv_image, { class: "img", src: "/static/image/selecttype/woman.png", mode: "aspectFill", shape: "circle", "lazy-load": true, width: "150", height: "150" }), vue.createElementVNode( "view", { class: "mybtn" }, vue.toDisplayString(_ctx.$t("is_female")), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }) ]) ], 64 /* STABLE_FRAGMENT */ ); } const PagesTopicSelectsex = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-08ad11aa"], ["__file", "D:/workspace/uniapp/health2/pages/topic/selectsex.vue"]]); const _sfc_main$5 = { data() { return { columns: [], userinfo: {}, selectuser: {}, scaleid: 0, srid: 0, sindex: 0, heightvalue: 170, weightvalue: 50, minheight: 90, maxheight: 210, minweight: 35, maxweight: 125, selecttype: "height", selectbutton2: { fontSize: "30px", width: "500rpx", background: "#648EB8", border: "0px" }, selectbutton3: { fontSize: "20px", fontWeight: "bold", letterSpacing: "0.5em" }, over_percent: "11%", timer: false, canvasHeight: 80, canvasWidth_1: 1e3, canvasWidth_2: 1e3, scroll_left_1: 0, scroll_left_2: 0 }; }, methods: { init() { this.userinfo = uni.getStorageSync("userinfo"); this.selectuser = uni.getStorageSync("selectuser"); }, setheight() { this.columns = this.heightlist; this.$refs.picker.open(); let index2 = this.heightvalue - this.minheight; this.$refs.picker.setIndexs([index2], true); this.selecttype = "height"; }, setweight() { this.columns = this.weightlist; this.$refs.picker.open(); let index2 = (this.weightvalue - this.minweight) * 2; this.$refs.picker.setIndexs([index2], true); this.selecttype = "weight"; }, change(e) { let value2 = e.value[0].value; switch (this.selecttype) { case "height": this.heightvalue = value2; break; case "weight": this.weightvalue = value2; break; } }, donext() { var usrBMI = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, stemid: 2, answertype: 0, answervalue: this.bmi }; var userheight = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, stemid: 27, answertype: 0, answervalue: this.heightvalue }; var userweight = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, stemid: 28, answertype: 0, answervalue: this.weightvalue }; let answer = []; answer.push(usrBMI); answer.push(userheight); answer.push(userweight); let data = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, srid: this.srid, scaleid: this.scaleid }; subanswerbyuserid(answer, data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); return false; } if (200 == res.code) { uni.setStorage({ key: "srid", data: res.resultData }); querybmipercentage(this.bmi).then((res2) => { res2 = res2.data; if (0 == res2.code) { this.$refs.toast.show({ type: "error", message: res2.errmsg }); return false; } if (200 == res2.code) { this.over_percent = res2.resultData + "%"; this.showinfo(); let that = this; this.timer = setTimeout(function() { that.closeinfo(); formatAppLog("log", "at pages/topic/selectcanvas.vue:205", 123); tostemlistnext(that.sindex, 1); }, 3e3); } }); } }); }, showinfo() { this.$refs.popup.open(); }, closeinfo() { this.$refs.popup.close(); }, maskClick() { clearTimeout(this.timer); this.$refs.popup.close(); tostemlistnext(this.sindex, 1); }, drawruler1() { let param = { canvasid: "canvas_ruler", canvascursorid: "canvas-cursor", minvalue: this.minheight, maxvalue: this.maxheight, interval: 1, defaultvalue: this.heightvalue, precision: 0 }; drawruler(param); this.heightvalue = getcursorvalue(); this.canvasHeight = getCanvasConfig().canvasHeight; this.canvasWidth_1 = getCanvasConfig().canvasWidth; this.screenWidth = getCanvasConfig().screenWidth; this.scroll_left_1 = getscrollleft(); }, scroll1(e) { this.heightvalue = setcursorvalue(e.detail.scrollLeft, this.minheight); }, drawruler2() { let param = { canvasid: "canvas_ruler_2", canvascursorid: "canvas-cursor_2", minvalue: this.minweight, maxvalue: this.maxweight, interval: 1, defaultvalue: this.weightvalue, precision: 0 }; drawruler(param); this.weightvalue = getcursorvalue(); this.canvasHeight = getCanvasConfig().canvasHeight; this.canvasWidth_2 = getCanvasConfig().canvasWidth; this.screenWidth = getCanvasConfig().screenWidth; this.scroll_left_2 = getscrollleft(); }, scroll2(e) { this.weightvalue = setcursorvalue(e.detail.scrollLeft); } }, mounted() { uni.setNavigationBarTitle({ title: this.$t("calculate_BMI") }); this.init(); }, computed: { bmi() { var value2 = (this.weightvalue / (this.heightvalue / 100 * (this.heightvalue / 100))).toFixed(1); return value2; }, heightlist() { let list = []; for (var i = this.minheight; i <= this.maxheight; i++) { let item = { label: i, value: i }; list.push(item); } return [list]; }, weightlist() { let list = []; for (var i = this.minweight; i <= this.maxweight; i += 0.5) { let item = { label: i, value: i }; list.push(item); } return [list]; }, style() { let value2 = { canvasHeight: this.canvasHeight + "px", canvasWidth_1: this.canvasWidth_1 + "px", canvasWidth_2: this.canvasWidth_2 + "px", screenWidth: this.screenWidth + "px" }; return value2; } }, onLoad: function(option) { this.scaleid = option.scaleid; this.srid = option.srid; this.sindex = option.sindex; }, onBackPress: function(option) { tohome(); return true; }, onReady() { this.drawruler1(); this.drawruler2(); } }; function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_uv_button = resolveEasycom(vue.resolveDynamicComponent("uv-button"), __easycom_2$2); const _component_uv_text = resolveEasycom(vue.resolveDynamicComponent("uv-text"), __easycom_2$4); const _component_uv_popup = resolveEasycom(vue.resolveDynamicComponent("uv-popup"), __easycom_2); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "titlearea" }, [ vue.createElementVNode( "text", { class: "title_2" }, vue.toDisplayString(_ctx.$t("selectcanvas_text1")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_member" }, vue.toDisplayString(_ctx.$t("report_user")) + ":" + vue.toDisplayString($data.selectuser.membername), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, vue.toDisplayString(_ctx.$t("selectcanvas_text2")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, vue.toDisplayString(_ctx.$t("selectcanvas_text3")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info_div" }, [ vue.createElementVNode("view", { class: "text_div" }, [ vue.createElementVNode("text", { class: "title1" }, "BMI:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($options.bmi), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "info_div" }, [ vue.createElementVNode("view", { class: "text_div" }, [ vue.createElementVNode( "text", { class: "title3" }, vue.toDisplayString(_ctx.$t("height")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, " " + vue.toDisplayString($data.heightvalue), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "title2" }, " CM") ]), vue.createCommentVNode(` {{$t('select')}} `), vue.createElementVNode( "view", { class: "showdiv", id: "showdiv", style: vue.normalizeStyle({ height: $options.style.canvasHeight }) }, [ vue.createElementVNode("scroll-view", { style: { "width": "100%", "height": "100%" }, "scroll-x": true, onScroll: _cache[0] || (_cache[0] = (...args) => $options.scroll1 && $options.scroll1(...args)), "scroll-left": $data.scroll_left_1, "show-scrollbar": false }, [ vue.createElementVNode("canvas", { style: vue.normalizeStyle({ width: $options.style.canvasWidth_1, height: $options.style.canvasHeight }), "canvas-id": "canvas_ruler", id: "canvas_ruler", width: $data.canvasWidth_1 }, null, 12, ["width"]) ], 40, ["scroll-left"]), vue.createElementVNode( "canvas", { style: vue.normalizeStyle({ width: $options.style.screenWidth_1, height: $options.style.canvasHeight }), "canvas-id": "canvas-cursor", id: "canvas-cursor" }, null, 4 /* STYLE */ ) ], 4 /* STYLE */ ) ]), vue.createElementVNode("view", { class: "info_div" }, [ vue.createElementVNode("view", { class: "text_div" }, [ vue.createElementVNode( "text", { class: "title3" }, vue.toDisplayString(_ctx.$t("weight")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, " " + vue.toDisplayString($data.weightvalue), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "title2" }, " KG") ]), vue.createCommentVNode(` {{$t('select')}} `), vue.createElementVNode( "view", { class: "showdiv", id: "showdiv", style: vue.normalizeStyle({ height: $options.style.canvasHeight }) }, [ vue.createElementVNode("scroll-view", { style: { "width": "100%", "height": "100%" }, "scroll-x": true, onScroll: _cache[1] || (_cache[1] = (...args) => $options.scroll2 && $options.scroll2(...args)), "scroll-left": $data.scroll_left_2, "show-scrollbar": false }, [ vue.createElementVNode("canvas", { style: vue.normalizeStyle({ width: $options.style.canvasWidth_2, height: $options.style.canvasHeight }), "canvas-id": "canvas_ruler_2", id: "canvas_ruler_2", width: $data.canvasWidth_2 }, null, 12, ["width"]) ], 40, ["scroll-left"]), vue.createElementVNode( "canvas", { style: vue.normalizeStyle({ width: $options.style.screenWidth_2, height: $options.style.canvasHeight }), "canvas-id": "canvas-cursor_2", id: "canvas-cursor_2" }, null, 4 /* STYLE */ ) ], 4 /* STYLE */ ) ]), vue.createCommentVNode(' \r\n \r\n '), vue.createElementVNode("view", { class: "donext_div" }, [ vue.createVNode(_component_uv_button, { type: "primary", text: _ctx.$t("next_step"), onClick: $options.donext, customStyle: $data.selectbutton2, customTextStyle: $data.selectbutton3 }, null, 8, ["text", "onClick", "customStyle", "customTextStyle"]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_uv_popup, { ref: "popup", mode: "bottom", onMaskClick: $options.maskClick }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "over_percent_div" }, [ vue.createElementVNode("view", { class: "content" }, [ vue.createVNode(_component_uv_text, { text: _ctx.$t("show_info_text1"), align: "center", size: "25" }, null, 8, ["text"]), vue.createVNode(_component_uv_text, { text: $data.over_percent, type: "success", bold: "true", align: "center", size: "30" }, null, 8, ["text"]), vue.createVNode(_component_uv_text, { text: _ctx.$t("show_info_text2"), align: "center", size: "25" }, null, 8, ["text"]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["onMaskClick"]) ]) ], 64 /* STABLE_FRAGMENT */ ); } const PagesTopicSelectcanvas = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-b2d22efc"], ["__file", "D:/workspace/uniapp/health2/pages/topic/selectcanvas.vue"]]); const props$1 = { props: { // 是否展示工具条 show: { type: Boolean, default: true }, // 是否显示下边框 showBorder: { type: Boolean, default: false }, // 取消按钮的文字 cancelText: { type: String, default: "取消" }, // 确认按钮的文字 confirmText: { type: String, default: "确认" }, // 取消按钮的颜色 cancelColor: { type: String, default: "#909193" }, // 确认按钮的颜色 confirmColor: { type: String, default: "#3c9cff" }, // 标题文字 title: { type: String, default: "" }, ...(_P = (_O = uni.$uv) == null ? void 0 : _O.props) == null ? void 0 : _P.toolbar } }; const _sfc_main$4 = { name: "uv-toolbar", emits: ["confirm", "cancel"], mixins: [mpMixin, mixin, props$1], methods: { // 点击取消按钮 cancel() { this.$emit("cancel"); }, // 点击确定按钮 confirm() { this.$emit("confirm"); } } }; function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uv-toolbar", { "uv-border-bottom": _ctx.showBorder }]), onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"])) }, [ vue.createElementVNode("view", { class: "uv-toolbar__cancel__wrapper", "hover-class": "uv-hover-class" }, [ vue.createElementVNode( "text", { class: "uv-toolbar__wrapper__cancel", onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)), style: vue.normalizeStyle({ color: _ctx.cancelColor }) }, vue.toDisplayString(_ctx.cancelText), 5 /* TEXT, STYLE */ ) ]), _ctx.title ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "uv-toolbar__title uv-line-1" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "uv-toolbar__confirm__wrapper", "hover-class": "uv-hover-class" }, [ vue.createElementVNode( "text", { class: "uv-toolbar__wrapper__confirm", onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)), style: vue.normalizeStyle({ color: _ctx.confirmColor }) }, vue.toDisplayString(_ctx.confirmText), 5 /* TEXT, STYLE */ ) ]) ], 34 /* CLASS, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-298cf9e4"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-toolbar/components/uv-toolbar/uv-toolbar.vue"]]); const props = { props: { // 是否展示顶部的操作栏 showToolbar: { type: Boolean, default: true }, // 顶部标题 title: { type: String, default: "" }, // 弹窗圆角 round: { type: [String, Number], default: 0 }, // 对象数组,设置每一列的数据 columns: { type: Array, default: () => [] }, // 是否显示加载中状态 loading: { type: Boolean, default: false }, // 各列中,单个选项的高度 itemHeight: { type: [String, Number], default: 44 }, // 取消按钮的文字 cancelText: { type: String, default: "取消" }, // 确认按钮的文字 confirmText: { type: String, default: "确定" }, // 取消按钮的颜色 cancelColor: { type: String, default: "#909193" }, // 确认按钮的颜色 confirmColor: { type: String, default: "#3c9cff" }, // 文字颜色 color: { type: String, default: "" }, // 选中文字的颜色 activeColor: { type: String, default: "" }, // 每列中可见选项的数量 visibleItemCount: { type: [String, Number], default: 5 }, // 选项对象中,需要展示的属性键名 keyName: { type: String, default: "text" }, // 是否允许点击遮罩关闭选择器 closeOnClickOverlay: { type: Boolean, default: true }, // 是否允许点击确认关闭选择器 closeOnClickConfirm: { type: Boolean, default: true }, // 各列的默认索引 defaultIndex: { type: Array, default: () => [] }, // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效 immediateChange: { type: Boolean, default: true }, fontSize: { type: String, default: "16px" }, ...(_R = (_Q = uni.$uv) == null ? void 0 : _Q.props) == null ? void 0 : _R.picker } }; const _sfc_main$3 = { name: "uv-picker", emits: ["confirm", "cancel", "close", "change"], mixins: [mpMixin, mixin, props], computed: { // 为了解决支付宝不生效 textStyle() { return (index2, index1) => { const style = {}; style.display = "block"; if (this.color) { style.color = this.color; } if (this.activeColor && index1 === this.innerIndex[index2]) { style.color = this.activeColor; } return style; }; } }, data() { return { // 上一次选择的列索引 lastIndex: [], // 索引值 ,对应picker-view的value innerIndex: [], // 各列的值 innerColumns: [], // 上一次的变化列索引 columnIndex: 0 }; }, watch: { // 监听默认索引的变化,重新设置对应的值 defaultIndex: { immediate: true, handler(n2) { this.setIndexs(n2, true); } }, // 监听columns参数的变化 columns: { deep: true, immediate: true, handler(n2) { this.setColumns(n2); } } }, methods: { open() { this.$refs.pickerPopup.open(); }, close() { this.$refs.pickerPopup.close(); }, popupChange(e) { if (!e.show) this.$emit("close"); }, // 获取item需要显示的文字,判别为对象还是文本 getItemText(item) { if (this.$uv.test.object(item)) { return item[this.keyName]; } else { return item; } }, // 点击工具栏的取消按钮 cancel() { this.$emit("cancel"); this.close(); }, // 点击工具栏的确定按钮 confirm() { this.$emit("confirm", this.$uv.deepClone({ indexs: this.innerIndex, value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]), values: this.innerColumns })); if (this.closeOnClickConfirm) { this.close(); } }, // 选择器某一列的数据发生变化时触发 changeHandler(e) { const { value: value2 } = e.detail; let index2 = 0, columnIndex = 0; for (let i = 0; i < value2.length; i++) { let item = value2[i]; if (item !== (this.lastIndex[i] || 0)) { columnIndex = i; index2 = item; break; } } this.columnIndex = columnIndex; const values = this.innerColumns; this.setLastIndex(value2); this.setIndexs(value2); this.$emit("change", { value: this.innerColumns.map((item, index3) => item[value2[index3]]), index: index2, indexs: value2, // values为当前变化列的数组内容 values, columnIndex }); }, // 设置index索引,此方法可被外部调用设置 setIndexs(index2, setLastIndex) { this.innerIndex = this.$uv.deepClone(index2); if (setLastIndex) { this.setLastIndex(index2); } }, // 记录上一次的各列索引位置 setLastIndex(index2) { this.lastIndex = this.$uv.deepClone(index2); }, // 设置对应列选项的所有值 setColumnValues(columnIndex, values) { this.innerColumns.splice(columnIndex, 1, values); let tmpIndex = this.$uv.deepClone(this.innerIndex); for (let i = 0; i < this.innerColumns.length; i++) { if (i > this.columnIndex) { tmpIndex[i] = 0; } } this.setIndexs(tmpIndex); }, // 获取对应列的所有选项 getColumnValues(columnIndex) { (async () => { await this.$uv.sleep(); })(); return this.innerColumns[columnIndex]; }, // 设置整体各列的columns的值 setColumns(columns) { this.innerColumns = this.$uv.deepClone(columns); if (this.innerIndex.length === 0) { this.innerIndex = new Array(columns.length).fill(0); } }, // 获取各列选中值对应的索引 getIndexs() { return this.innerIndex; }, // 获取各列选中的值 getValues() { (async () => { await this.$uv.sleep(); })(); return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]); } } }; function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toolbar = resolveEasycom(vue.resolveDynamicComponent("uv-toolbar"), __easycom_0); const _component_uv_loading_icon = resolveEasycom(vue.resolveDynamicComponent("uv-loading-icon"), __easycom_1$4); const _component_uv_popup = resolveEasycom(vue.resolveDynamicComponent("uv-popup"), __easycom_2); return vue.openBlock(), vue.createBlock(_component_uv_popup, { ref: "pickerPopup", mode: "bottom", round: _ctx.round, "close-on-click-overlay": _ctx.closeOnClickOverlay, onChange: $options.popupChange }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "uv-picker" }, [ _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_uv_toolbar, { key: 0, cancelColor: _ctx.cancelColor, confirmColor: _ctx.confirmColor, cancelText: _ctx.cancelText, confirmText: _ctx.confirmText, title: _ctx.title, onCancel: $options.cancel, onConfirm: $options.confirm }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("picker-view", { class: "uv-picker__view", indicatorStyle: `height: ${_ctx.$uv.addUnit(_ctx.itemHeight)}`, value: $data.innerIndex, immediateChange: _ctx.immediateChange, style: vue.normalizeStyle({ height: `${_ctx.$uv.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}` }), onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args)) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.innerColumns, (item, index2) => { return vue.openBlock(), vue.createElementBlock("picker-view-column", { key: index2, class: "uv-picker__view__column" }, [ _ctx.$uv.test.array(item) ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(item, (item1, index1) => { return vue.openBlock(), vue.createElementBlock( "text", { class: "uv-picker__view__column__item uv-line-1", key: index1, style: vue.normalizeStyle([{ height: _ctx.$uv.addUnit(_ctx.itemHeight), lineHeight: _ctx.$uv.addUnit(_ctx.itemHeight), fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal", fontSize: _ctx.$uv.addUnit(_ctx.fontSize) }, $options.textStyle(index2, index1)]) }, vue.toDisplayString($options.getItemText(item1)), 5 /* TEXT, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 44, ["indicatorStyle", "value", "immediateChange"]), _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "uv-picker--loading" }, [ vue.createVNode(_component_uv_loading_icon, { mode: "circle" }) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["round", "close-on-click-overlay", "onChange"]); } const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-f74a1703"], ["__file", "D:/workspace/uniapp/health2/uni_modules/uv-picker/components/uv-picker/uv-picker.vue"]]); const _sfc_main$2 = { data() { return { userinfo: {}, selectuser: {}, minhm: 60, maxhm: 210, value: 110, label: "", label_text: "", scaleid: 0, srid: 0, sindex: 0, answertype: 0, stemid: 6, columns_limit_list: [ { uplimit: 119, dowlimit: 60, viewstr: "110", sbpstr: this.$t("hg_text1") }, { uplimit: 110, dowlimit: 110, viewstr: "110", sbpstr: this.$t("hg_text2") }, { uplimit: 119, dowlimit: 111, viewstr: "110~120", sbpstr: this.$t("hg_text3") }, { uplimit: 129, dowlimit: 120, viewstr: "120~130", sbpstr: this.$t("hg_text3") }, { uplimit: 139, dowlimit: 130, viewstr: "130~140", sbpstr: this.$t("hg_text3") }, { uplimit: 219, dowlimit: 140, viewstr: "140", sbpstr: this.$t("hg_text4") } ], selectbutton1: { fontSize: "30px", width: "500rpx", borderColor: "#648EB8", color: "#648EB8" }, selectbutton2: { fontSize: "30px", width: "500rpx", background: "#648EB8", border: "0px" }, selectbutton3: { fontSize: "20px", fontWeight: "bold", letterSpacing: "0.5em" }, canvasHeight: 80, canvasWidth: 1e3, scroll_left: 0 }; }, computed: { columns() { let list = []; for (var i = this.minhm; i <= this.maxhm; i++) { let label = i + this.$t("hg_text2"); this.columns_limit_list.map((item2, index2) => { if (i >= item2.dowlimit && i <= item2.uplimit) { label = item2.viewstr + item2.sbpstr; return label; } }); let item = { label, value: i }; list.push(item); } return [list]; }, style() { let value2 = { canvasHeight: this.canvasHeight + "px", canvasWidth: this.canvasWidth + "px", screenWidth: this.screenWidth + "px" }; return value2; } }, methods: { init() { this.userinfo = uni.getStorageSync("userinfo"); this.selectuser = uni.getStorageSync("selectuser"); this.showlabel(); }, change(e) { let value2 = e.value[0].value; this.value = value2; this.label = e.value[0].label; }, showselectage() { this.$refs.picker.open(); let index2 = this.value - this.minhm; this.$refs.picker.setIndexs([index2], true); }, // showlabel(){ // let index = this.value-this.minhm // this.label = this.columns[0][index].label // }, showlabel() { if (this.value < 110) { this.label = 110; this.label_text = this.$t("hg_text1"); } for (let i = 0; i < 3; i++) { let min = 110 + i * 10; let max = 110 + (i + 1) * 10; if (this.value < max && this.value >= min) { this.label = min + "~" + max; this.label_text = this.$t("hg_text3"); } } if (this.value >= 140) { this.label = 140; this.label_text = this.$t("hg_text4"); } if (this.value == 110) { this.label = 110; this.label_text = this.$t("hg_text2"); } }, donext() { let answer = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, stemid: this.stemid, answertype: this.answertype, answervalue: this.value }; let data = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, srid: this.srid, scaleid: this.scaleid }; subanswerbyuserid(answer, data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); return false; } if (200 == res.code) { uni.setStorage({ key: "srid", data: res.resultData }); tostemlistnext(this.sindex, 1); } }); }, drawruler() { let param = { canvasid: "canvas_ruler", canvascursorid: "canvas-cursor", minvalue: this.minhm, maxvalue: this.maxhm, interval: 1, defaultvalue: this.value, precision: 0 }; drawruler(param); this.value = getcursorvalue(); this.canvasHeight = getCanvasConfig().canvasHeight; this.canvasWidth = getCanvasConfig().canvasWidth; this.screenWidth = getCanvasConfig().screenWidth; this.scroll_left = getscrollleft(); }, scroll(e) { this.value = setcursorvalue(e.detail.scrollLeft); this.showlabel(); } }, mounted() { uni.setNavigationBarTitle({ title: this.$t("blood_pressure") }); this.init(); }, onLoad: function(option) { this.scaleid = option.scaleid; this.srid = option.srid; this.sindex = option.sindex; }, onBackPress: function(option) { tohome(); return true; }, onReady() { this.drawruler(); } }; function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_uv_picker = resolveEasycom(vue.resolveDynamicComponent("uv-picker"), __easycom_1); const _component_uv_button = resolveEasycom(vue.resolveDynamicComponent("uv-button"), __easycom_2$2); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "titlearea" }, [ vue.createElementVNode( "text", { class: "title_2" }, vue.toDisplayString(_ctx.$t("selectsbp_text1")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_member" }, vue.toDisplayString(_ctx.$t("report_user")) + ":" + vue.toDisplayString($data.selectuser.membername), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, vue.toDisplayString(_ctx.$t("selectsbp_text2")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, vue.toDisplayString(_ctx.$t("selectsbp_text3")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, vue.toDisplayString(_ctx.$t("selectsbp_text4")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "agevalue" }, [ vue.createElementVNode("view", { class: "" }, [ vue.createTextVNode( vue.toDisplayString(_ctx.$t("blood_pressure")) + ":  " + vue.toDisplayString($data.label) + "  ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title2" }, vue.toDisplayString($data.label_text), 1 /* TEXT */ ) ]), vue.createCommentVNode(` `), vue.createElementVNode( "view", { class: "showdiv", id: "showdiv", style: vue.normalizeStyle({ height: $options.style.canvasHeight }) }, [ vue.createElementVNode("scroll-view", { style: { "width": "100%", "height": "100%" }, "scroll-x": true, onScroll: _cache[0] || (_cache[0] = (...args) => $options.scroll && $options.scroll(...args)), "scroll-left": $data.scroll_left, "show-scrollbar": false }, [ vue.createElementVNode("canvas", { style: vue.normalizeStyle({ width: $options.style.canvasWidth, height: $options.style.canvasHeight }), "canvas-id": "canvas_ruler", id: "canvas_ruler", width: $data.canvasWidth }, null, 12, ["width"]) ], 40, ["scroll-left"]), vue.createElementVNode( "canvas", { style: vue.normalizeStyle({ width: $options.style.screenWidth, height: $options.style.canvasHeight }), "canvas-id": "canvas-cursor", id: "canvas-cursor" }, null, 4 /* STYLE */ ) ], 4 /* STYLE */ ) ]), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_uv_picker, { ref: "picker", columns: $options.columns, onChange: $options.change, keyName: "value", showToolbar: false, fontSize: "25px" }, null, 8, ["columns", "onChange"]) ]), vue.createElementVNode("view", { class: "donext_div" }, [ vue.createVNode(_component_uv_button, { type: "primary", text: _ctx.$t("next_step"), onClick: $options.donext, customStyle: $data.selectbutton2, customTextStyle: $data.selectbutton3 }, null, 8, ["text", "onClick", "customStyle", "customTextStyle"]) ]) ], 64 /* STABLE_FRAGMENT */ ); } const PagesTopicSelectsbp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-7cfdaaac"], ["__file", "D:/workspace/uniapp/health2/pages/topic/selectsbp.vue"]]); const _sfc_main$1 = { data() { return { userinfo: {}, selectuser: {}, scaleid: 0, srid: 0, sindex: 0, value: 80, minvalue: 40, maxvalue: 120, selectbutton2: { fontSize: "30px", width: "500rpx", background: "#648EB8", border: "0px" }, selectbutton3: { fontSize: "20px", fontWeight: "bold", letterSpacing: "0.5em" }, canvasHeight: 80, canvasWidth: 1e3, scroll_left: 0 }; }, computed: { columns() { let list = []; for (var i = this.minvalue; i <= this.maxvalue; i++) { let label = i; if (i == this.minvalue) { label = this.$t("less_than") + i; } if (i == this.maxvalue) { label = this.$t("greater_than") + i; } let item = { label, value: i }; list.push(item); } return [list]; }, chi() { var chicun = Math.round(this.value * 0.3); let value2 = parseInt(chicun / 10); return value2; }, cun() { var chicun = Math.round(this.value * 0.3); let value2 = chicun % 10; return value2; }, style() { let value2 = { canvasHeight: this.canvasHeight + "px", canvasWidth: this.canvasWidth + "px", screenWidth: this.screenWidth + "px" }; return value2; } }, methods: { init() { this.userinfo = uni.getStorageSync("userinfo"); this.selectuser = uni.getStorageSync("selectuser"); }, change(e) { let value2 = e.value[0].value; this.value = value2; }, donext() { let answer = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, stemid: 30, answertype: 0, answervalue: this.value }; let data = { userid: this.userinfo.id, fmemberid: this.selectuser.fmemberid, srid: this.srid, scaleid: this.scaleid }; subanswerbyuserid(answer, data).then((res) => { res = res.data; if (0 == res.code) { this.$refs.toast.show({ type: "error", message: res.errmsg }); return false; } if (200 == res.code) { uni.setStorage({ key: "srid", data: res.resultData }); tostemlistnext(this.sindex, 1); } }); }, setvalue() { this.$refs.picker.open(); let index2 = this.value - this.minvalue; this.$refs.picker.setIndexs([index2], true); }, drawruler() { let param = { canvasid: "canvas_ruler", canvascursorid: "canvas-cursor", minvalue: this.minvalue, maxvalue: this.maxvalue, interval: 1, defaultvalue: this.value, precision: 0 }; drawruler(param); this.value = getcursorvalue(); this.canvasHeight = getCanvasConfig().canvasHeight; this.canvasWidth = getCanvasConfig().canvasWidth; this.screenWidth = getCanvasConfig().screenWidth; this.scroll_left = getscrollleft(); }, scroll(e) { this.value = setcursorvalue(e.detail.scrollLeft); } }, mounted() { uni.setNavigationBarTitle({ title: this.$t("waistline") }); this.init(); }, onLoad: function(option) { this.scaleid = option.scaleid; this.srid = option.srid; this.sindex = option.sindex; }, onBackPress: function(option) { tohome(); return true; }, onReady() { this.drawruler(); } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_toast = resolveEasycom(vue.resolveDynamicComponent("uv-toast"), __easycom_0$2); const _component_uv_picker = resolveEasycom(vue.resolveDynamicComponent("uv-picker"), __easycom_1); const _component_uv_button = resolveEasycom(vue.resolveDynamicComponent("uv-button"), __easycom_2$2); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode( _component_uv_toast, { ref: "toast" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "titlearea" }, [ vue.createElementVNode( "text", { class: "title_2" }, vue.toDisplayString(_ctx.$t("selectwaistline_text1")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_member" }, vue.toDisplayString(_ctx.$t("report_user")) + ":" + vue.toDisplayString($data.selectuser.membername), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, vue.toDisplayString(_ctx.$t("selectwaistline_text2")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, vue.toDisplayString(_ctx.$t("selectwaistline_text3")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, vue.toDisplayString(_ctx.$t("selectwaistline_text4")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "title_desstr", decode: "true" }, vue.toDisplayString(_ctx.$t("selectwaistline_text5")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "info_div info_div_1" }, [ vue.createElementVNode("view", { class: "text_div" }, [ vue.createElementVNode( "text", { class: "title3" }, vue.toDisplayString(_ctx.$t("waistline")) + ":", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.value), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "title3" }, "CM") ]), vue.createCommentVNode(` \r {{chi}}\r {{$t('waistline_text1')}}\r {{cun}}\r {{$t('waistline_text2')}}\r `) ]), vue.createCommentVNode(` \r {{$t('select')}}\r `), vue.createElementVNode( "view", { class: "showdiv", id: "showdiv", style: vue.normalizeStyle({ height: $options.style.canvasHeight }) }, [ vue.createElementVNode("scroll-view", { style: { "width": "100%", "height": "100%" }, "scroll-x": true, onScroll: _cache[0] || (_cache[0] = (...args) => $options.scroll && $options.scroll(...args)), "scroll-left": $data.scroll_left, "show-scrollbar": false }, [ vue.createElementVNode("canvas", { style: vue.normalizeStyle({ width: $options.style.canvasWidth, height: $options.style.canvasHeight }), "canvas-id": "canvas_ruler", id: "canvas_ruler", width: $data.canvasWidth }, null, 12, ["width"]) ], 40, ["scroll-left"]), vue.createElementVNode( "canvas", { style: vue.normalizeStyle({ width: $options.style.screenWidth, height: $options.style.canvasHeight }), "canvas-id": "canvas-cursor", id: "canvas-cursor" }, null, 4 /* STYLE */ ) ], 4 /* STYLE */ ), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_uv_picker, { ref: "picker", columns: $options.columns, onChange: $options.change, keyName: "label", showToolbar: false, fontSize: "25px" }, null, 8, ["columns", "onChange"]) ]), vue.createElementVNode("view", { class: "donext_div" }, [ vue.createVNode(_component_uv_button, { type: "primary", text: _ctx.$t("next_step"), onClick: $options.donext, customStyle: $data.selectbutton2, customTextStyle: $data.selectbutton3 }, null, 8, ["text", "onClick", "customStyle", "customTextStyle"]) ]) ], 64 /* STABLE_FRAGMENT */ ); } const PagesTopicSelectwaistline = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "D:/workspace/uniapp/health2/pages/topic/selectwaistline.vue"]]); __definePage("pages/index/show", PagesIndexShow); __definePage("pages/index/index", PagesIndexIndex); __definePage("pages/login/login", PagesLoginLogin); __definePage("pages/register/register", PagesRegisterRegister); __definePage("pages/member/member", PagesMemberMember); __definePage("pages/member/add", PagesMemberAdd); __definePage("pages/report/report", PagesReportReport); __definePage("pages/topic/common", PagesTopicCommon); __definePage("pages/topic/selectage", PagesTopicSelectage); __definePage("pages/topic/selectsex", PagesTopicSelectsex); __definePage("pages/topic/selectcanvas", PagesTopicSelectcanvas); __definePage("pages/topic/selectsbp", PagesTopicSelectsbp); __definePage("pages/topic/selectwaistline", PagesTopicSelectwaistline); const _sfc_main = { globalData: { throttleTime: 1e3 //节流时间 毫秒 }, onLaunch: function() { }, onShow: function() { formatAppLog("log", "at App.vue:20", "App Show"); }, onHide: function() { formatAppLog("log", "at App.vue:23", "App Hide"); } }; const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/workspace/uniapp/health2/App.vue"]]); /*! * @intlify/shared v9.1.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const inBrowser = typeof window !== "undefined"; let mark; let measure; { const perf = inBrowser && window.performance; if (perf && perf.mark && perf.measure && perf.clearMarks && perf.clearMeasures) { mark = (tag) => perf.mark(tag); measure = (name, startTag, endTag) => { perf.measure(name, startTag, endTag); perf.clearMarks(startTag); perf.clearMarks(endTag); }; } } const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g; function format(message, ...args) { if (args.length === 1 && isObject$1(args[0])) { args = args[0]; } if (!args || !args.hasOwnProperty) { args = {}; } return message.replace(RE_ARGS, (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 = (val) => typeof val === "number" && isFinite(val); const isDate = (val) => toTypeString(val) === "[object Date]"; const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0; function warn(msg, err) { if (typeof console !== "undefined") { console.warn(`[intlify] ` + msg); if (err) { console.warn(err.stack); } } } const assign = 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$1 = Object.prototype.hasOwnProperty; function hasOwn$1(obj, key) { return hasOwnProperty$1.call(obj, key); } const isArray = Array.isArray; const isFunction = (val) => typeof val === "function"; const isString = (val) => typeof val === "string"; const isBoolean = (val) => typeof val === "boolean"; const isObject$1 = (val) => ( // eslint-disable-line val !== null && typeof val === "object" ); const objectToString = Object.prototype.toString; const toTypeString = (value2) => objectToString.call(value2); const isPlainObject = (val) => toTypeString(val) === "[object Object]"; const toDisplayString = (val) => { return val == null ? "" : isArray(val) || isPlainObject(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val); }; 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.9 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ const hasOwnProperty = Object.prototype.hasOwnProperty; function hasOwn(obj, key) { return hasOwnProperty.call(obj, key); } const isObject = (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(path) { const keys = []; let index2 = -1; let mode = 0; let subPathDepth = 0; let c; 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[index2 + 1]; if (mode === 5 && nextChar === "'" || mode === 6 && nextChar === '"') { index2++; newChar = "\\" + nextChar; actions[ 0 /* APPEND */ ](); return true; } } while (mode !== null) { index2++; c = path[index2]; if (c === "\\" && maybeUnescapeQuote()) { continue; } type2 = getPathCharType(c); 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 = c; if (action() === false) { return; } } } if (mode === 7) { return keys; } } } const cache = /* @__PURE__ */ new Map(); function resolveValue(obj, path) { if (!isObject(obj)) { return null; } let hit = cache.get(path); if (!hit) { hit = parse(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(obj)) { return obj; } for (const key in obj) { if (!hasOwn(obj, key)) { continue; } if (!key.includes( "." /* DOT */ )) { if (isObject(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(currentObj[subKeys[lastIndex]])) { handleFlatJson(currentObj[subKeys[lastIndex]]); } } } return obj; } /*! * @intlify/runtime v9.1.9 * (c) 2021 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 index2 = 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 : index2 : index2; } function normalizeNamed(pluralIndex, props2) { if (!props2.count) { props2.count = pluralIndex; } if (!props2.n) { props2.n = pluralIndex; } } function createMessageContext(options = {}) { const locale = options.locale; const pluralIndex = getPluralIndex(options); const pluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? options.pluralRules[locale] : pluralDefault; const orgPluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? pluralDefault : void 0; const plural = (messages2) => messages2[pluralRule(pluralIndex, messages2.length, orgPluralRule)]; const _list = options.list || []; const list = (index2) => _list[index2]; const _named = options.named || {}; isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named); const named = (key) => _named[key]; function message(key) { const msg = isFunction(options.messages) ? options.messages(key) : isObject$1(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(options.processor) && isFunction(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE; const interpolate = isPlainObject(options.processor) && isFunction(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE; const type2 = isPlainObject(options.processor) && isString(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE; const ctx = { [ "list" /* LIST */ ]: list, [ "named" /* NAMED */ ]: named, [ "plural" /* PLURAL */ ]: plural, [ "linked" /* LINKED */ ]: (key, modifier) => { const msg = message(key)(ctx); return isString(modifier) ? _modifier(modifier)(msg) : msg; }, [ "message" /* MESSAGE */ ]: message, [ "type" /* TYPE */ ]: type2, [ "interpolate" /* INTERPOLATE */ ]: interpolate, [ "normalize" /* NORMALIZE */ ]: normalize }; return ctx; } /*! * @intlify/message-compiler v9.1.9 * (c) 2021 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((messages2 || errorMessages$2)[code2] || "", ...args || []); const error2 = new SyntaxError(String(msg)); error2.code = code2; if (loc) { error2.location = loc; } error2.domain = domain; return error2; } /*! * @intlify/devtools-if v9.1.9 * (c) 2021 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, version, meta) { devtools && devtools.emit(IntlifyDevToolsHooks.I18nInit, { timestamp: Date.now(), i18n: i18n2, version, 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(warnMessages$1[code2], ...args); } const VERSION$1 = "9.1.9"; const NOT_REOSLVED = -1; const MISSING_RESOLVE_VALUE = ""; function getDefaultLinkedModifiers() { return { upper: (val) => isString(val) ? val.toUpperCase() : val, lower: (val) => isString(val) ? val.toLowerCase() : val, // prettier-ignore capitalize: (val) => isString(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 version = isString(options.version) ? options.version : VERSION$1; const locale = isString(options.locale) ? options.locale : "en-US"; const fallbackLocale = isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || isString(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale; const messages2 = isPlainObject(options.messages) ? options.messages : { [locale]: {} }; const datetimeFormats = isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [locale]: {} }; const numberFormats = isPlainObject(options.numberFormats) ? options.numberFormats : { [locale]: {} }; const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers()); const pluralRules = options.pluralRules || {}; const missing = isFunction(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(options.postTranslation) ? options.postTranslation : null; const processor = isPlainObject(options.processor) ? options.processor : null; const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true; const escapeParameter = !!options.escapeParameter; const messageCompiler = isFunction(options.messageCompiler) ? options.messageCompiler : _compiler; const onWarn = isFunction(options.onWarn) ? options.onWarn : warn; const internalOptions = options; const __datetimeFormatters = isObject$1(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map(); const __numberFormatters = isObject$1(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map(); const __meta = isObject$1(internalOptions.__meta) ? internalOptions.__meta : {}; _cid++; const context = { version, 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, version, __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(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(block)) { block = appendBlockToChain(chain, block, fallback); } const defaults = isArray(fallback) ? fallback : isPlainObject(fallback) ? fallback["default"] ? fallback["default"] : null : fallback; block = isString(defaults) ? [defaults] : defaults; if (isArray(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(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(blocks) || isPlainObject(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(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(options.default) || isBoolean(options.default) ? !isBoolean(options.default) ? options.default : key : fallbackFormat ? key : ""; const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== ""; const locale = isString(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(format2) || isMessageFunction(format2))) { if (enableDefaultMsg) { format2 = defaultMsgOrKey; cacheBaseKey = format2; } } if (!resolvedMessage && (!(isString(format2) || isMessageFunction(format2)) || !isString(targetLocale))) { return unresolving ? NOT_REOSLVED : key; } if (isString(format2) && context.messageCompiler == null) { warn(`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(key) ? key : isMessageFunction(format2) ? format2.key : "", locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""), format: isString(format2) ? format2 : isMessageFunction(format2) ? format2.source : "", message: ret }; payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {}); translateDevTools(payloads); } return ret; } function escapeParams(options) { if (isArray(options.list)) { options.list = options.list.map((item) => isString(item) ? escapeHtml(item) : item); } else if (isObject$1(options.named)) { Object.keys(options.named).forEach((key) => { if (isString(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(format2) || isFunction(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(arg1) && !isNumber(arg1) && !isMessageFunction(arg1)) { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } const key = isNumber(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1; if (isNumber(arg2)) { options.plural = arg2; } else if (isString(arg2)) { options.default = arg2; } else if (isPlainObject(arg2) && !isEmptyObject(arg2)) { options.named = arg2; } else if (isArray(arg2)) { options.list = arg2; } if (isNumber(arg3)) { options.plural = arg3; } else if (isString(arg3)) { options.default = arg3; } else if (isPlainObject(arg3)) { assign(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(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(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, value2, 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(options.locale) ? options.locale : context.locale; const locales = getLocaleChain(context, fallbackLocale, locale); if (!isString(key) || key === "") { return new Intl.DateTimeFormat(locale).format(value2); } 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(format2)) break; handleMissing(context, key, targetLocale, missingWarn, type2); from = to; } if (!isPlainObject(format2) || !isString(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({}, format2, overrides)); __datetimeFormatters.set(id, formatter); } return !part ? formatter.format(value2) : formatter.formatToParts(value2); } function parseDateTimeArgs(...args) { const [arg1, arg2, arg3, arg4] = args; let options = {}; let overrides = {}; let value2; if (isString(arg1)) { if (!/\d{4}-\d{2}-\d{2}(T.*)?/.test(arg1)) { throw createCoreError( 16 /* INVALID_ISO_DATE_ARGUMENT */ ); } value2 = new Date(arg1); try { value2.toISOString(); } catch (e) { throw createCoreError( 16 /* INVALID_ISO_DATE_ARGUMENT */ ); } } else if (isDate(arg1)) { if (isNaN(arg1.getTime())) { throw createCoreError( 15 /* INVALID_DATE_ARGUMENT */ ); } value2 = arg1; } else if (isNumber(arg1)) { value2 = arg1; } else { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } if (isString(arg2)) { options.key = arg2; } else if (isPlainObject(arg2)) { options = arg2; } if (isString(arg3)) { options.locale = arg3; } else if (isPlainObject(arg3)) { overrides = arg3; } if (isPlainObject(arg4)) { overrides = arg4; } return [options.key || "", value2, 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(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, value2, 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(options.locale) ? options.locale : context.locale; const locales = getLocaleChain(context, fallbackLocale, locale); if (!isString(key) || key === "") { return new Intl.NumberFormat(locale).format(value2); } 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(format2)) break; handleMissing(context, key, targetLocale, missingWarn, type2); from = to; } if (!isPlainObject(format2) || !isString(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({}, format2, overrides)); __numberFormatters.set(id, formatter); } return !part ? formatter.format(value2) : formatter.formatToParts(value2); } function parseNumberArgs(...args) { const [arg1, arg2, arg3, arg4] = args; let options = {}; let overrides = {}; if (!isNumber(arg1)) { throw createCoreError( 14 /* INVALID_ARGUMENT */ ); } const value2 = arg1; if (isString(arg2)) { options.key = arg2; } else if (isPlainObject(arg2)) { options = arg2; } if (isString(arg3)) { options.locale = arg3; } else if (isPlainObject(arg3)) { overrides = arg3; } if (isPlainObject(arg4)) { overrides = arg4; } return [options.key || "", value2, 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() { return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__; } function getTarget() { return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; } const isProxyAvailable = typeof Proxy === "function"; const HOOK_SETUP = "devtools-plugin:setup"; const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set"; 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 = { ...defaultSettings }; try { const raw = localStorage.getItem(localSettingsSaveId); const data = JSON.parse(raw); Object.assign(currentSettings, data); } catch (e) { } this.fallbacks = { getSettings() { return currentSettings; }, setSettings(value2) { try { localStorage.setItem(localSettingsSaveId, JSON.stringify(value2)); } catch (e) { } currentSettings = value2; } }; hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value2) => { if (pluginId === this.plugin.id) { this.fallbacks.setSettings(value2); } }); 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((resolve) => { this.targetQueue.push({ method: prop, args, resolve }); }); }; } } }); } 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 target = getTarget(); const hook = getDevtoolsGlobalHook(); const enableProxy = isProxyAvailable && pluginDescriptor.enableEarlyProxy; if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { hook.emit(HOOK_SETUP, pluginDescriptor, setupFn); } else { const proxy = enableProxy ? new ApiProxy(pluginDescriptor, hook) : null; const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; list.push({ pluginDescriptor, 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(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"); makeSymbol("__intlifyMeta"); 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(messages2) ? messages2 : isArray(__i18n) ? {} : { [locale]: {} }; if (isArray(__i18n)) { __i18n.forEach(({ locale: locale2, resource }) => { if (locale2) { ret[locale2] = ret[locale2] || {}; deepCopy(resource, ret[locale2]); } else { deepCopy(resource, ret); } }); } if (options.flatJson) { for (const key in ret) { if (hasOwn$1(ret, key)) { handleFlatJson(ret[key]); } } } return ret; } const isNotObjectOrIsArray = (val) => !isObject$1(val) || isArray(val); function deepCopy(src, des) { if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) { throw createI18nError( 20 /* INVALID_VALUE */ ); } for (const key in src) { if (hasOwn$1(src, key)) { if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) { des[key] = src[key]; } else { deepCopy(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(options.locale) ? options.locale : "en-US" ); const _fallbackLocale = vue.ref( // prettier-ignore __root && _inheritLocale ? __root.fallbackLocale.value : isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value ); const _messages = vue.ref(getLocaleMessages(_locale.value, options)); const _datetimeFormats = vue.ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} }); const _numberFormats = vue.ref(isPlainObject(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(options.missing) ? options.missing : null; let _runtimeMissing = isFunction(options.missing) ? defineCoreMissingHandler(options.missing) : null; let _postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null; let _warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true; let _escapeParameter = !!options.escapeParameter; const _modifiers = __root ? __root.modifiers : isPlainObject(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(_context) ? _context.__datetimeFormatters : void 0, __numberFormatters: isPlainObject(_context) ? _context.__numberFormatters : void 0, __v_emitter: isPlainObject(_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(_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(ret) && ret === NOT_REOSLVED) { const [key, arg2] = argumentParser(); if (__root && isString(key) && isResolvedTranslateMessage(warnType, arg2)) { if (_fallbackRoot && (isTranslateFallbackWarn(_fallbackWarn, key) || isTranslateMissingWarn(_missingWarn, key))) { warn(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 t(...args) { return wrapWithDeps((context) => translate(context, ...args), () => parseTranslateArgs(...args), "translate", (root) => root.t(...args), (key) => key, (val) => isString(val)); } function rt(...args) { const [arg1, arg2, arg3] = args; if (arg3 && !isObject$1(arg3)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } return t(...[arg1, arg2, assign({ 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(val)); } function n2(...args) { return wrapWithDeps((context) => number(context, ...args), () => parseNumberArgs(...args), "number format", (root) => root.n(...args), () => MISSING_RESOLVE_VALUE, (val) => isString(val)); } function normalize(values) { return values.map((val) => isString(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(val) ); } function numberParts(...args) { return wrapWithDeps( (context) => number(context, ...args), () => parseNumberArgs(...args), "number format", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[NumberPartsSymbol](...args), () => [], (val) => isString(val) || isArray(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(val) || isArray(val) ); } function setPluralRules(rules2) { _pluralRules = rules2; _context.pluralRules = _pluralRules; } function te(key, locale2) { const targetLocale = isString(locale2) ? locale2 : _locale.value; const message = getLocaleMessage(targetLocale); return resolveValue(message, key) !== null; } function resolveMessages(key) { let messages3 = 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) { messages3 = messageValue; break; } } return messages3; } function tm(key) { const messages3 = resolveMessages(key); return messages3 != null ? messages3 : __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(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(_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(_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, rt, d, n: n2, 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(options.locale) ? options.locale : "en-US"; const fallbackLocale = isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale; const missing = isFunction(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(options.modifiers) ? options.modifiers : {}; const pluralizationRules = options.pluralizationRules; const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : void 0; const warnHtmlMessage = isString(options.warnHtmlInMessage) ? options.warnHtmlInMessage !== "off" : true; const escapeParameter = !!options.escapeParameterHtml; const inheritLocale = isBoolean(options.sync) ? options.sync : true; if (options.formatter) { warn(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); } if (options.preserveDirectiveContent) { warn(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); } let messages2 = options.messages; if (isPlainObject(options.sharedMessages)) { const sharedMessages = options.sharedMessages; const locales = Object.keys(sharedMessages); messages2 = locales.reduce((messages3, locale2) => { const message = messages3[locale2] || (messages3[locale2] = {}); assign(message, sharedMessages[locale2]); return messages3; }, 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(getWarnMessage( 8 /* NOT_SUPPORTED_FORMATTER */ )); return { interpolate() { return []; } }; }, set formatter(val) { warn(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(getWarnMessage( 9 /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */ )); return true; }, set preserveDirectiveContent(val) { warn(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 list = null; let named = null; if (!isString(arg1)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } const key = arg1; if (isString(arg2)) { options2.locale = arg2; } else if (isArray(arg2)) { list = arg2; } else if (isPlainObject(arg2)) { named = arg2; } if (isArray(arg3)) { list = arg3; } else if (isPlainObject(arg3)) { named = arg3; } return composer.t(key, list || named || {}, options2); }, rt(...args) { return composer.rt(...args); }, // tc tc(...args) { const [arg1, arg2, arg3] = args; const options2 = { plural: 1 }; let list = null; let named = null; if (!isString(arg1)) { throw createI18nError( 15 /* INVALID_ARGUMENT */ ); } const key = arg1; if (isString(arg2)) { options2.locale = arg2; } else if (isNumber(arg2)) { options2.plural = arg2; } else if (isArray(arg2)) { list = arg2; } else if (isPlainObject(arg2)) { named = arg2; } if (isString(arg3)) { options2.locale = arg3; } else if (isArray(arg3)) { list = arg3; } else if (isPlainObject(arg3)) { named = arg3; } return composer.t(key, list || 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(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({ keypath: { type: String, required: true }, plural: { type: [Number, String], // eslint-disable-next-line @typescript-eslint/no-explicit-any validator: (val) => isNumber(val) || !isNaN(val) } }, baseFormatProps), /* eslint-enable */ setup(props2, context) { const { slots, attrs } = context; const i18n2 = props2.i18n || useI18n({ useScope: props2.scope, __useComponent: true }); const keys = Object.keys(slots).filter((key) => key !== "_"); return () => { const options = {}; if (props2.locale) { options.locale = props2.locale; } if (props2.plural !== void 0) { options.plural = isString(props2.plural) ? +props2.plural : props2.plural; } const arg = getInterpolateArg(context, keys); const children = i18n2[TransrateVNodeSymbol](props2.keypath, arg, options); const assignedAttrs = assign({}, attrs); return isString(props2.tag) ? vue.h(props2.tag, assignedAttrs, children) : isObject$1(props2.tag) ? vue.h(props2.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(props2, context, slotKeys, partFormatter) { const { slots, attrs } = context; return () => { const options = { part: true }; let overrides = {}; if (props2.locale) { options.locale = props2.locale; } if (isString(props2.format)) { options.key = props2.format; } else if (isObject$1(props2.format)) { if (isString(props2.format.key)) { options.key = props2.format.key; } overrides = Object.keys(props2.format).reduce((options2, prop) => { return slotKeys.includes(prop) ? assign({}, options2, { [prop]: props2.format[prop] }) : options2; }, {}); } const parts = partFormatter(...[props2.value, options, overrides]); let children = [options.key]; if (isArray(parts)) { children = parts.map((part, index2) => { const slot = slots[part.type]; return slot ? slot({ [part.type]: part.value, index: index2, parts }) : [part.value]; }); } else if (isString(parts)) { children = [parts]; } const assignedAttrs = assign({}, attrs); return isString(props2.tag) ? vue.h(props2.tag, assignedAttrs, children) : isObject$1(props2.tag) ? vue.h(props2.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({ value: { type: Number, required: true }, format: { type: [String, Object] } }, baseFormatProps), /* eslint-enable */ setup(props2, context) { const i18n2 = props2.i18n || useI18n({ useScope: "parent", __useComponent: true }); return renderFormatter(props2, 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({ value: { type: [Number, Date], required: true }, format: { type: [String, Object] } }, baseFormatProps), /* eslint-enable */ setup(props2, context) { const i18n2 = props2.i18n || useI18n({ useScope: "parent", __useComponent: true }); return renderFormatter(props2, 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: value2, modifiers }) => { if (!instance || !instance.$) { throw createI18nError( 22 /* UNEXPECTED_ERROR */ ); } const composer = getComposer$2(i18n2, instance.$); if (modifiers.preserve) { warn(getWarnMessage( 7 /* NOT_SUPPORTED_PRESERVE */ )); } const parsedValue = parseValue(value2); el.textContent = composer.t(...makeParams(parsedValue)); }; return { beforeMount: bind, beforeUpdate: bind }; } function parseValue(value2) { if (isString(value2)) { return { path: value2 }; } else if (isPlainObject(value2)) { if (!("path" in value2)) { throw createI18nError(19, "path"); } return value2; } else { throw createI18nError( 20 /* INVALID_VALUE */ ); } } function makeParams(value2) { const { path, locale, args, choice, plural } = value2; const options = {}; const named = args || {}; if (isString(locale)) { options.locale = locale; } if (isNumber(choice)) { options.plural = choice; } if (isNumber(plural)) { options.plural = plural; } return [path, named, options]; } function apply(app, i18n2, ...options) { const pluginOptions = isPlainObject(options[0]) ? options[0] : {}; const useI18nComponentName = !!pluginOptions.useI18nComponentName; const globalInstall = isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true; if (globalInstall && useI18nComponentName) { warn(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((resolve, reject) => { try { setupDevtoolsPlugin({ 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 */ ] }); resolve(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 value2 = {}; Object.keys(messages2).forEach((key) => { const v = messages2[key]; if (isFunction(v) && "source" in v) { value2[key] = getMessageFunctionDetails(v); } else if (isObject$1(v)) { value2[key] = getLocaleMessageValue(v); } else { value2[key] = v; } }); return value2; } 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(payload.state.value)) { composer.locale.value = payload.state.value; } else if (field === "fallbackLocale" && (isString(payload.state.value) || isArray(payload.state.value) || isObject$1(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$1(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$1(options.datetimeFormats)) { const locales2 = Object.keys(options.datetimeFormats); if (locales2.length) { locales2.forEach((locale) => { global2.mergeDateTimeFormat(locale, options.datetimeFormats[locale]); }); } } if (isObject$1(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(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({}, 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 hello$2 = "你好"; const login$2 = "登录"; const register$2 = "注册"; const password$2 = "密码"; const password_repeat$2 = "重复密码"; const telno$2 = "手机号"; const new_member$2 = "新成员"; const navigationBarTitleText$2 = "心脑检测"; const add_member$2 = "添加家庭成员"; const father$2 = "爸爸"; const mother$2 = "妈妈"; const husband$2 = "老公"; const wife$2 = "老婆"; const other_member$2 = "其它亲友"; const add_member_text1$2 = "父母有没有"; const add_member_text2$2 = "心梗脑梗的风险?"; const add_member_text3$2 = "帮他们评测!"; const add_member_text4$2 = "爱人工作繁忙"; const add_member_text5$2 = "应酬多,压力大,常喝酒"; const add_member_text6$2 = "有没有心脑血管的隐患?"; const add_member_text7$2 = "其它男性亲友"; const add_member_text8$2 = "其它女性亲友"; const add_member_text9$2 = "请自行输入"; const submit$2 = "提交"; const show_report$2 = "评测结果"; const do_success$2 = "操作成功"; const illness_title$2 = "病名"; const report_score$2 = "评测分数"; const report_result$2 = "筛查结果"; const report_error_text_1$2 = "หากโรคอยู่แค่ชั้นผิวหนัง เพียงประคบร้อนก็รักษาได้! ก่อนหน้าคุณเราได้ช่วยให้ผู้ใช้มากมายค้นพบกับความเสี่ยง ขอเพียงให้ความสำคัญและสื่อสารกับแพทย์อย่างกระตือรือร้น ก็จะสามารถหลีกเลี่ยงความเสี่ยงต่อสุขภาพและชีวิตที่แท้จริงได้"; const report_error_text_2$2 = "เผชิญหน้าด้วยความคิดบวก ไปเข้ารับการตรวจที่เกี่ยวข้อง ณ โรงพยาบาลที่ได้มาตรฐานในพื้นที่!"; const report_error_text_3$2 = "ปรับพฤติกรรมการดำเนินชีวิตตามคำแนะนำด้านสุขภาพ เพื่อลดความเสี่ยง"; const report_text_1$2 = "คะแนนยังไม่เกิน"; const report_text_1_1$2 = "คะแนน ปัจจุบันความเสี่ยงต่อการเกิดโรคยังไม่สูง"; const health_advice$2 = "คำแนะนำด้านสุขภาพ"; const report_explain$2 = "评测说明"; const report_detail$2 = "รายละเอียดการตรวจคัดกรอง"; const report_explain_text_1$2 = "您已超过40岁,进入心脑血管的风险人群,此外,患糖尿病的机率也大大增加。"; const report_explain_text_2$2 = "男性的糖尿病风险高于女性,您更加要注意健康。"; const report_explain_text_3$2 = "您的BMI:"; const report_explain_text_3_1$2 = ",体型偏胖,您的身高"; const report_explain_text_3_2$2 = "厘米,您减重到"; const report_explain_text_3_3$2 = "公斤会更健康。"; const report_explain_text_4$2 = "您的血压也偏高,这将引发更多的健康问题,您需要与医生沟通,将血压降低。"; const report_explain_text_5$2 = "您有心脑血管家庭史,在生活习惯上要更加注意。"; const report_explain_text_6$2 = "您在烟酒、运动等方面有不良的生活习惯,建议调整。"; const report_explain_text_7$2 = "现在您已超过40岁,为健康着想,如果不能戒烟,也建议逐步减少吸烟量。"; const report_explain_text_8$2 = "您有上腹部疼痛并呕吐的风险症状,建议去正规医院检查。"; const report_explain_text_9$2 = "您有心前区疼痛且不缓解的症状,建议去正规医院检查。"; const report_explain_text_10$2 = "上方评分是根据国家糖尿病防治指南及中国心肌梗塞风险评分等心脑血管早期筛查标准为您做的评分,评分体系不同,后面是具体的解读,供您参考。"; const healthy_habits$2 = "健康习惯"; const y_n$2 = "是/否"; const healthy_personal_ratios$2 = "健康人员比例"; const all_people$2 = "全员"; const group_people$2 = "分组"; const report_text_4$2 = "分组是指同性别、同年龄段(不满40,40~49,超过50)用户的统计数据。"; const report_text_5$2 = "您已是会员,您享有如下权益。"; const report_text_6$2 = "在一年期内可以无限次评测。"; const report_text_7$2 = "同时可以给3位亲属无限次评测。"; const report_text_8$2 = "如果您第一次评测的结果显示您三项均无风险,系统将会您增加1-2位亲属名额,同时您第一次分享本报告页,进来的朋友可以成为免费会员,免费会员数量和您的年龄相关。"; const report_text_9$2 = "已完成,返回首页为家人评测,开启健康管理。"; const y$2 = "是"; const n$2 = "否"; const select_age$2 = "อายุ"; const select_age_1$2 = "岁"; const select_age_2$2 = "岁以上"; const select_age_3$2 = "岁以下"; const select_sex$2 = "เพศ"; const calculate_BMI$2 = "计算BMI"; const select$2 = "选择"; const height$2 = "ส่วนสูง"; const weight$2 = "น้ำหนัก"; const selectcanvas_text1$2 = "请输入被评测人身高体重"; const selectcanvas_text2$2 = "BMI是人体的胖瘦程度的量化指标,其大小与许多疾病风险程度相关联。"; const selectcanvas_text3$2 = "身高取整数,体重按0.5公斤选取即可。"; const report_user$2 = "ผู้รับการประเมินผล"; const selectage_test1$2 = "请选择被评测人年龄"; const selectage_test2$2 = "从29岁开始,一些对健康影响较大的慢性病的风险就开始增加,年龄无法改变,但可以改变生活习惯。"; const next_step$2 = "下一步"; const show_info_text1$2 = "您的BMI已超过"; const show_info_text2$2 = "ผู้ใช้"; const less_than$2 = "小于"; const greater_than$2 = "大于"; const selectwaistline_text1$2 = "请左右滑动选择被评测人腰围"; const selectwaistline_text2$2 = "腰围是内脏脂肪含量是否过多体现,内脏脂肪过多是多种疾病的诱因。"; const selectwaistline_text3$2 = "JAMA最新发表的研究指出,腰臀比超过一定数值,并且收缩压过高的人群,心血管死亡风险明显上升,所以,保持腰臀比不仅仅是爱美的需求,对身体健康也非常重要。"; const selectwaistline_text4$2 = "关于腰臀比的研究有定量的研究结果时,我们也会更新评测内容。"; const selectwaistline_text5$2 = "评测只需要您正确提供腰围的范围即可,如果不清楚,提交你合身的裤子的尺码即可,坐标下方有尺码值供参考。"; const waistline$2 = "เส้นรอบเอว"; const waistline_text1$2 = "尺"; const waistline_text2$2 = "寸"; const scale_evaluation$2 = "量表评测"; const selectsbp_text1$2 = "请输入评测对象血压所在范围"; const selectsbp_text2$2 = "与疾病相关的主要指标是高压,您只需提供高压数据,选择范围正确即可"; const selectsbp_text3$2 = "如果有服降压药,请提供矫治前的高压数据,高血压患者一般在140以上"; const selectsbp_text4$2 = "如果你确认不知道血压,没有高血压,你可以填写常规范围,110-120,如果当评测结果在合格线左右3分范围内,您需要测量血压重新评估"; const hg_text1$2 = "mmHg以下"; const hg_text2$2 = "mmHg"; const hg_text3$2 = "mmHg之间"; const hg_text4$2 = "mmHg之上"; const blood_pressure$2 = "ความดันโลหิต"; const low_risk$2 = "低风险"; const risk$2 = "有风险"; const valuating_people$2 = "ผู้รับการประเมินผล"; const completion_text_1$2 = "糖尿病、脑梗的风险筛查已完成!"; const completion_text_2$2 = "请继续完成余下问题。"; const questions_remaining$2 = "个问题剩余"; const have$2 = "有"; const same_as_you$2 = "用户和您相同"; const select_gender_for_valuating_people$2 = "请选择评测对象性别"; const select_gender_text_1$2 = "研究表明,针对某一疾病,男女两性风险不同。例如糖尿病,男性患病风险更高,需要更加注意饮食习惯与控制腰围。"; const is_man$2 = "เป็นเพศชาย"; const is_female$2 = "เป็นเพศหญิง"; const man$2 = "男"; const female$2 = "女"; const index_text_1$2 = "给爸爸、妈妈、爱人测一测"; const index_text_2$2 = "健康的生活习惯是预防心脑血管疾病最好的策略!"; const index_text_3$2 = "早期筛检"; const index_text_4$2 = "主动预防"; const index_text_5$2 = "保家人健康 保家庭平安"; const index_text_6$2 = "排除风险 安心!放心"; const index_btn_1$2 = "เริ่มประเมินผล"; const index_btn_2$2 = "ตรวจดูรายงาน"; const index_btn_3$2 = "ประเมินผลใหม่"; const share$2 = "分享"; const share_text$2 = "心脑血管早期筛查,简单易得,有利无害,分享给朋友家人。"; const member_add_text_1$2 = "每个人都关心家人健康"; const member_add_text_2$2 = "但我们可以做得更多"; const telno_null$2 = "手机号必填"; const password_null$2 = "密码必填"; const telno_error$2 = "手机号错误"; const password_repeat_error$2 = "重复密码不相同"; const register_error$2 = "注册失败"; const member_num_than_max$2 = "家人不能超过上限"; const member_title_null$2 = "亲友名未填"; const completion_problem_for_valuating_people$2 = "请为评测对象完成问题"; const please_completion_problem$2 = "请填写完内容"; const system_error$2 = "系统错误"; const not_selected$2 = "未选择"; const EN = { hello: hello$2, login: login$2, register: register$2, password: password$2, password_repeat: password_repeat$2, telno: telno$2, new_member: new_member$2, navigationBarTitleText: navigationBarTitleText$2, add_member: add_member$2, father: father$2, mother: mother$2, husband: husband$2, wife: wife$2, other_member: other_member$2, add_member_text1: add_member_text1$2, add_member_text2: add_member_text2$2, add_member_text3: add_member_text3$2, add_member_text4: add_member_text4$2, add_member_text5: add_member_text5$2, add_member_text6: add_member_text6$2, add_member_text7: add_member_text7$2, add_member_text8: add_member_text8$2, add_member_text9: add_member_text9$2, submit: submit$2, show_report: show_report$2, do_success: do_success$2, illness_title: illness_title$2, report_score: report_score$2, report_result: report_result$2, report_error_text_1: report_error_text_1$2, report_error_text_2: report_error_text_2$2, report_error_text_3: report_error_text_3$2, report_text_1: report_text_1$2, report_text_1_1: report_text_1_1$2, health_advice: health_advice$2, report_explain: report_explain$2, report_detail: report_detail$2, report_explain_text_1: report_explain_text_1$2, report_explain_text_2: report_explain_text_2$2, report_explain_text_3: report_explain_text_3$2, report_explain_text_3_1: report_explain_text_3_1$2, report_explain_text_3_2: report_explain_text_3_2$2, report_explain_text_3_3: report_explain_text_3_3$2, report_explain_text_4: report_explain_text_4$2, report_explain_text_5: report_explain_text_5$2, report_explain_text_6: report_explain_text_6$2, report_explain_text_7: report_explain_text_7$2, report_explain_text_8: report_explain_text_8$2, report_explain_text_9: report_explain_text_9$2, report_explain_text_10: report_explain_text_10$2, healthy_habits: healthy_habits$2, y_n: y_n$2, healthy_personal_ratios: healthy_personal_ratios$2, all_people: all_people$2, group_people: group_people$2, report_text_4: report_text_4$2, report_text_5: report_text_5$2, report_text_6: report_text_6$2, report_text_7: report_text_7$2, report_text_8: report_text_8$2, report_text_9: report_text_9$2, y: y$2, n: n$2, select_age: select_age$2, select_age_1: select_age_1$2, select_age_2: select_age_2$2, select_age_3: select_age_3$2, select_sex: select_sex$2, calculate_BMI: calculate_BMI$2, select: select$2, height: height$2, weight: weight$2, selectcanvas_text1: selectcanvas_text1$2, selectcanvas_text2: selectcanvas_text2$2, selectcanvas_text3: selectcanvas_text3$2, report_user: report_user$2, selectage_test1: selectage_test1$2, selectage_test2: selectage_test2$2, next_step: next_step$2, show_info_text1: show_info_text1$2, show_info_text2: show_info_text2$2, less_than: less_than$2, greater_than: greater_than$2, selectwaistline_text1: selectwaistline_text1$2, selectwaistline_text2: selectwaistline_text2$2, selectwaistline_text3: selectwaistline_text3$2, selectwaistline_text4: selectwaistline_text4$2, selectwaistline_text5: selectwaistline_text5$2, waistline: waistline$2, waistline_text1: waistline_text1$2, waistline_text2: waistline_text2$2, scale_evaluation: scale_evaluation$2, selectsbp_text1: selectsbp_text1$2, selectsbp_text2: selectsbp_text2$2, selectsbp_text3: selectsbp_text3$2, selectsbp_text4: selectsbp_text4$2, hg_text1: hg_text1$2, hg_text2: hg_text2$2, hg_text3: hg_text3$2, hg_text4: hg_text4$2, blood_pressure: blood_pressure$2, low_risk: low_risk$2, risk: risk$2, valuating_people: valuating_people$2, completion_text_1: completion_text_1$2, completion_text_2: completion_text_2$2, questions_remaining: questions_remaining$2, have: have$2, same_as_you: same_as_you$2, select_gender_for_valuating_people: select_gender_for_valuating_people$2, select_gender_text_1: select_gender_text_1$2, is_man: is_man$2, is_female: is_female$2, man: man$2, female: female$2, index_text_1: index_text_1$2, index_text_2: index_text_2$2, index_text_3: index_text_3$2, index_text_4: index_text_4$2, index_text_5: index_text_5$2, index_text_6: index_text_6$2, index_btn_1: index_btn_1$2, index_btn_2: index_btn_2$2, index_btn_3: index_btn_3$2, share: share$2, share_text: share_text$2, member_add_text_1: member_add_text_1$2, member_add_text_2: member_add_text_2$2, telno_null: telno_null$2, password_null: password_null$2, telno_error: telno_error$2, password_repeat_error: password_repeat_error$2, register_error: register_error$2, member_num_than_max: member_num_than_max$2, member_title_null: member_title_null$2, completion_problem_for_valuating_people: completion_problem_for_valuating_people$2, please_completion_problem: please_completion_problem$2, system_error: system_error$2, not_selected: not_selected$2 }; const hello$1 = "你好"; const login$1 = "登录"; const register$1 = "注册"; const password$1 = "密码"; const password_repeat$1 = "重复密码"; const telno$1 = "手机号"; const new_member$1 = "新成员"; const navigationBarTitleText$1 = "心脑检测"; const add_member$1 = "添加家庭成员"; const father$1 = "爸爸"; const mother$1 = "妈妈"; const husband$1 = "老公"; const wife$1 = "老婆"; const other_member$1 = "其它亲友"; const add_member_text1$1 = "父母有没有"; const add_member_text2$1 = "心梗脑梗的风险?"; const add_member_text3$1 = "帮他们评测!"; const add_member_text4$1 = "爱人工作繁忙"; const add_member_text5$1 = "应酬多,压力大,常喝酒"; const add_member_text6$1 = "有没有心脑血管的隐患?"; const add_member_text7$1 = "其它男性亲友"; const add_member_text8$1 = "其它女性亲友"; const add_member_text9$1 = "请自行输入"; const submit$1 = "提交"; const show_report$1 = "评测结果"; const do_success$1 = "操作成功"; const illness_title$1 = "病名"; const report_score$1 = "评测分数"; const report_result$1 = "筛查结果"; const report_error_text_1$1 = "疾在腠理,汤熨之所及也!在您之前我们已经帮很多位用户发现了风险,只要重视并积极与医生沟通,就能避免真正的健康和生命风险。"; const report_error_text_2$1 = "积极面对,去当地正规医院做相应检查!"; const report_error_text_3$1 = "按健康建议调整生活习惯,降低风险。"; const report_text_1$1 = "评分未超过"; const report_text_1_1$1 = "分,目前患病风险不高。"; const health_advice$1 = "健康建议"; const report_explain$1 = "评测说明"; const report_detail$1 = "筛查详情"; const report_explain_text_1$1 = "您已超过40岁,进入心脑血管的风险人群,此外,患糖尿病的机率也大大增加。"; const report_explain_text_2$1 = "男性的糖尿病风险高于女性,您更加要注意健康。"; const report_explain_text_3$1 = "您的BMI:"; const report_explain_text_3_1$1 = ",体型偏胖,您的身高"; const report_explain_text_3_2$1 = "厘米,您减重到"; const report_explain_text_3_3$1 = "公斤会更健康。"; const report_explain_text_4$1 = "您的血压也偏高,这将引发更多的健康问题,您需要与医生沟通,将血压降低。"; const report_explain_text_5$1 = "您有心脑血管家庭史,在生活习惯上要更加注意。"; const report_explain_text_6$1 = "您在烟酒、运动等方面有不良的生活习惯,建议调整。"; const report_explain_text_7$1 = "现在您已超过40岁,为健康着想,如果不能戒烟,也建议逐步减少吸烟量。"; const report_explain_text_8$1 = "您有上腹部疼痛并呕吐的风险症状,建议去正规医院检查。"; const report_explain_text_9$1 = "您有心前区疼痛且不缓解的症状,建议去正规医院检查。"; const report_explain_text_10$1 = "上方评分是根据国家糖尿病防治指南及中国心肌梗塞风险评分等心脑血管早期筛查标准为您做的评分,评分体系不同,后面是具体的解读,供您参考。"; const healthy_habits$1 = "健康习惯"; const y_n$1 = "是/否"; const healthy_personal_ratios$1 = "健康人员比例"; const all_people$1 = "全员"; const group_people$1 = "分组"; const report_text_4$1 = "分组是指同性别、同年龄段(不满40,40~49,超过50)用户的统计数据。"; const report_text_5$1 = "您已是会员,您享有如下权益。"; const report_text_6$1 = "在一年期内可以无限次评测。"; const report_text_7$1 = "同时可以给3位亲属无限次评测。"; const report_text_8$1 = "如果您第一次评测的结果显示您三项均无风险,系统将会您增加1-2位亲属名额,同时您第一次分享本报告页,进来的朋友可以成为免费会员,免费会员数量和您的年龄相关。"; const report_text_9$1 = "已完成,返回首页为家人评测,开启健康管理。"; const y$1 = "是"; const n$1 = "否"; const select_age$1 = "年龄"; const select_age_1$1 = "岁"; const select_age_2$1 = "岁以上"; const select_age_3$1 = "岁以下"; const select_sex$1 = "性别"; const calculate_BMI$1 = "计算BMI"; const select$1 = "选择"; const height$1 = "身高"; const weight$1 = "体重"; const selectcanvas_text1$1 = "请输入被评测人身高体重"; const selectcanvas_text2$1 = "BMI是人体的胖瘦程度的量化指标,其大小与许多疾病风险程度相关联。"; const selectcanvas_text3$1 = "身高取整数,体重按0.5公斤选取即可。"; const report_user$1 = "评测对象"; const selectage_test1$1 = "请选择被评测人年龄"; const selectage_test2$1 = "从29岁开始,一些对健康影响较大的慢性病的风险就开始增加,年龄无法改变,但可以改变生活习惯。"; const next_step$1 = "下一步"; const show_info_text1$1 = "您的BMI已超过"; const show_info_text2$1 = "用户"; const less_than$1 = "小于"; const greater_than$1 = "大于"; const selectwaistline_text1$1 = "请左右滑动选择被评测人腰围"; const selectwaistline_text2$1 = "腰围是内脏脂肪含量是否过多体现,内脏脂肪过多是多种疾病的诱因。"; const selectwaistline_text3$1 = "JAMA最新发表的研究指出,腰臀比超过一定数值,并且收缩压过高的人群,心血管死亡风险明显上升,所以,保持腰臀比不仅仅是爱美的需求,对身体健康也非常重要。"; const selectwaistline_text4$1 = "关于腰臀比的研究有定量的研究结果时,我们也会更新评测内容。"; const selectwaistline_text5$1 = "评测只需要您正确提供腰围的范围即可,如果不清楚,提交你合身的裤子的尺码即可,坐标下方有尺码值供参考。"; const waistline$1 = "腰围"; const waistline_text1$1 = "尺"; const waistline_text2$1 = "寸"; const scale_evaluation$1 = "量表评测"; const selectsbp_text1$1 = "请输入评测对象血压所在范围"; const selectsbp_text2$1 = "与疾病相关的主要指标是高压,您只需提供高压数据,选择范围正确即可"; const selectsbp_text3$1 = "如果有服降压药,请提供矫治前的高压数据,高血压患者一般在140以上"; const selectsbp_text4$1 = "如果你确认不知道血压,没有高血压,你可以填写常规范围,110-120,如果当评测结果在合格线左右3分范围内,您需要测量血压重新评估"; const hg_text1$1 = "mmHg以下"; const hg_text2$1 = "mmHg"; const hg_text3$1 = "mmHg之间"; const hg_text4$1 = "mmHg之上"; const blood_pressure$1 = "血压"; const low_risk$1 = "低风险"; const risk$1 = "有风险"; const valuating_people$1 = "评测对象"; const completion_text_1$1 = "糖尿病、脑梗的风险筛查已完成!"; const completion_text_2$1 = "请继续完成余下问题。"; const questions_remaining$1 = "个问题剩余"; const have$1 = "有"; const same_as_you$1 = "用户和您相同"; const select_gender_for_valuating_people$1 = "请选择评测对象性别"; const select_gender_text_1$1 = "研究表明,针对某一疾病,男女两性风险不同。例如糖尿病,男性患病风险更高,需要更加注意饮食习惯与控制腰围。"; const is_man$1 = "是男性"; const is_female$1 = "是女性"; const man$1 = "男"; const female$1 = "女"; const index_text_1$1 = "给爸爸、妈妈、爱人测一测"; const index_text_2$1 = "健康的生活习惯是预防心脑血管疾病最好的策略!"; const index_text_3$1 = "早期筛检"; const index_text_4$1 = "主动预防"; const index_text_5$1 = "保家人健康 保家庭平安"; const index_text_6$1 = "排除风险 安心!放心"; const index_btn_1$1 = "开始评测"; const index_btn_2$1 = "查看报告"; const index_btn_3$1 = "重新评测"; const share$1 = "分享"; const share_text$1 = "心脑血管早期筛查,简单易得,有利无害,分享给朋友家人。"; const member_add_text_1$1 = "每个人都关心家人健康"; const member_add_text_2$1 = "但我们可以做得更多"; const telno_null$1 = "手机号必填"; const password_null$1 = "密码必填"; const telno_error$1 = "手机号错误"; const password_repeat_error$1 = "重复密码不相同"; const register_error$1 = "注册失败"; const member_num_than_max$1 = "家人不能超过上限"; const member_title_null$1 = "亲友名未填"; const completion_problem_for_valuating_people$1 = "请为评测对象完成问题"; const please_completion_problem$1 = "请填写完内容"; const system_error$1 = "系统错误"; const not_selected$1 = "未选择"; const ZH = { hello: hello$1, login: login$1, register: register$1, password: password$1, password_repeat: password_repeat$1, telno: telno$1, new_member: new_member$1, navigationBarTitleText: navigationBarTitleText$1, add_member: add_member$1, father: father$1, mother: mother$1, husband: husband$1, wife: wife$1, other_member: other_member$1, add_member_text1: add_member_text1$1, add_member_text2: add_member_text2$1, add_member_text3: add_member_text3$1, add_member_text4: add_member_text4$1, add_member_text5: add_member_text5$1, add_member_text6: add_member_text6$1, add_member_text7: add_member_text7$1, add_member_text8: add_member_text8$1, add_member_text9: add_member_text9$1, submit: submit$1, show_report: show_report$1, do_success: do_success$1, illness_title: illness_title$1, report_score: report_score$1, report_result: report_result$1, report_error_text_1: report_error_text_1$1, report_error_text_2: report_error_text_2$1, report_error_text_3: report_error_text_3$1, report_text_1: report_text_1$1, report_text_1_1: report_text_1_1$1, health_advice: health_advice$1, report_explain: report_explain$1, report_detail: report_detail$1, report_explain_text_1: report_explain_text_1$1, report_explain_text_2: report_explain_text_2$1, report_explain_text_3: report_explain_text_3$1, report_explain_text_3_1: report_explain_text_3_1$1, report_explain_text_3_2: report_explain_text_3_2$1, report_explain_text_3_3: report_explain_text_3_3$1, report_explain_text_4: report_explain_text_4$1, report_explain_text_5: report_explain_text_5$1, report_explain_text_6: report_explain_text_6$1, report_explain_text_7: report_explain_text_7$1, report_explain_text_8: report_explain_text_8$1, report_explain_text_9: report_explain_text_9$1, report_explain_text_10: report_explain_text_10$1, healthy_habits: healthy_habits$1, y_n: y_n$1, healthy_personal_ratios: healthy_personal_ratios$1, all_people: all_people$1, group_people: group_people$1, report_text_4: report_text_4$1, report_text_5: report_text_5$1, report_text_6: report_text_6$1, report_text_7: report_text_7$1, report_text_8: report_text_8$1, report_text_9: report_text_9$1, y: y$1, n: n$1, select_age: select_age$1, select_age_1: select_age_1$1, select_age_2: select_age_2$1, select_age_3: select_age_3$1, select_sex: select_sex$1, calculate_BMI: calculate_BMI$1, select: select$1, height: height$1, weight: weight$1, selectcanvas_text1: selectcanvas_text1$1, selectcanvas_text2: selectcanvas_text2$1, selectcanvas_text3: selectcanvas_text3$1, report_user: report_user$1, selectage_test1: selectage_test1$1, selectage_test2: selectage_test2$1, next_step: next_step$1, show_info_text1: show_info_text1$1, show_info_text2: show_info_text2$1, less_than: less_than$1, greater_than: greater_than$1, selectwaistline_text1: selectwaistline_text1$1, selectwaistline_text2: selectwaistline_text2$1, selectwaistline_text3: selectwaistline_text3$1, selectwaistline_text4: selectwaistline_text4$1, selectwaistline_text5: selectwaistline_text5$1, waistline: waistline$1, waistline_text1: waistline_text1$1, waistline_text2: waistline_text2$1, scale_evaluation: scale_evaluation$1, selectsbp_text1: selectsbp_text1$1, selectsbp_text2: selectsbp_text2$1, selectsbp_text3: selectsbp_text3$1, selectsbp_text4: selectsbp_text4$1, hg_text1: hg_text1$1, hg_text2: hg_text2$1, hg_text3: hg_text3$1, hg_text4: hg_text4$1, blood_pressure: blood_pressure$1, low_risk: low_risk$1, risk: risk$1, valuating_people: valuating_people$1, completion_text_1: completion_text_1$1, completion_text_2: completion_text_2$1, questions_remaining: questions_remaining$1, have: have$1, same_as_you: same_as_you$1, select_gender_for_valuating_people: select_gender_for_valuating_people$1, select_gender_text_1: select_gender_text_1$1, is_man: is_man$1, is_female: is_female$1, man: man$1, female: female$1, index_text_1: index_text_1$1, index_text_2: index_text_2$1, index_text_3: index_text_3$1, index_text_4: index_text_4$1, index_text_5: index_text_5$1, index_text_6: index_text_6$1, index_btn_1: index_btn_1$1, index_btn_2: index_btn_2$1, index_btn_3: index_btn_3$1, share: share$1, share_text: share_text$1, member_add_text_1: member_add_text_1$1, member_add_text_2: member_add_text_2$1, telno_null: telno_null$1, password_null: password_null$1, telno_error: telno_error$1, password_repeat_error: password_repeat_error$1, register_error: register_error$1, member_num_than_max: member_num_than_max$1, member_title_null: member_title_null$1, completion_problem_for_valuating_people: completion_problem_for_valuating_people$1, please_completion_problem: please_completion_problem$1, system_error: system_error$1, not_selected: not_selected$1 }; const hello = "สวัสดี"; const login = "เข้าสู่ระบบ"; const register = "ลงทะเบียน"; const password = "รหัสผ่าน"; const password_repeat = "ทำซ้ำรหัสผ่าน"; const telno = "หมายเลขโทรศัพท์มือถือ"; const new_member = "สมาชิกใหม่"; const navigationBarTitleText = "การตรวจหัวใจและสมอง"; const add_member = "เพิ่มสมาชิกในครอบครัว"; const father = "พ่อ"; const mother = "แม่จ๋า"; const husband = "สามี"; const wife = "ภรรยา"; const other_member = "ญาติและเพื่อนอื่น ๆ"; const add_member_text1 = "พ่อแม่เสี่ยงเป็นโรคกล้ามเนื้อหัวใจตายหรือไม่"; const add_member_text2 = "ความเสี่ยงในการควบคุมจิตใจ"; const add_member_text3 = "ช่วยให้พวกเขาประเมิน!"; const add_member_text4 = "งานยุ่ง"; const add_member_text5 = "ดื่มเป็นประจำ"; const add_member_text6 = "มีอันตรายที่ซ่อนอยู่หรือไม่มีหัวใจและหลอดเลือดสมอง?"; const add_member_text7 = "ญาติและเพื่อนชายอื่น ๆ"; const add_member_text8 = "ญาติและเพื่อนหญิงอื่น ๆ"; const add_member_text9 = "กรุณากรอกข้อมูลด้วยตัวเอง"; const submit = "ส่ง"; const show_report = "ผลการประเมิน"; const do_success = "ความสำเร็จในการดำเนินงาน"; const illness_title = "ชนิดโรค"; const report_score = "คะแนนประเมินผล"; const report_result = "ผลการตรวจคัดกรอง"; const report_error_text_1 = "หากโรคอยู่แค่ชั้นผิวหนัง เพียงประคบร้อนก็รักษาได้! ก่อนหน้าคุณเราได้ช่วยให้ผู้ใช้มากมายค้นพบกับความเสี่ยง ขอเพียงให้ความสำคัญและสื่อสารกับแพทย์อย่างกระตือรือร้น ก็จะสามารถหลีกเลี่ยงความเสี่ยงต่อสุขภาพและชีวิตที่แท้จริงได้。"; const report_error_text_2 = "เผชิญหน้าด้วยความคิดบวก ไปเข้ารับการตรวจที่เกี่ยวข้อง ณ โรงพยาบาลที่ได้มาตรฐานในพื้นที่!"; const report_error_text_3 = "ปรับพฤติกรรมการดำเนินชีวิตตามคำแนะนำด้านสุขภาพ เพื่อลดความเสี่ยง。"; const report_text_1 = "คะแนนยังไม่เกิน "; const report_text_1_1 = "คะแนน ปัจจุบันความเสี่ยงต่อการเกิดโรคยังไม่สูง。"; const health_advice = "คำแนะนำด้านสุขภาพ"; const report_explain = "หมายเหตุการประเมิน"; const report_detail = "รายละเอียดการตรวจคัดกรอง"; const report_explain_text_1 = "คุณอายุเกิน 40 ปี กลุ่มเสี่ยงที่เข้าสู่หลอดเลือดหัวใจและสมอง นอกจากนี้ โอกาสในการเป็นโรคเบาหวานก็เพิ่มขึ้นอย่างมาก。"; const report_explain_text_2 = "ผู้ชายมีความเสี่ยงต่อโรคเบาหวานสูงกว่าผู้หญิง, คุณควรดูแลสุขภาพมากขึ้น。"; const report_explain_text_3 = "BMI ของคุณ:"; const report_explain_text_3_1 = ",รูปร่างค่อนข้างอ้วน,ความสูงของคุณ"; const report_explain_text_3_2 = "เซนติเมตร,คุณลดน้ำหนักถึง"; const report_explain_text_3_3 = "กิโลกรัม,จะมีสุขภาพที่ดีขึ้น。"; const report_explain_text_4 = "ความดันโลหิตของคุณยังสูงซึ่งจะก่อให้เกิดปัญหาสุขภาพมากขึ้นคุณจำเป็นต้องสื่อสารกับแพทย์ของคุณเพื่อลดความดันโลหิต。"; const report_explain_text_5 = "คุณมีประวัติครอบครัวเกี่ยวกับหัวใจและหลอดเลือดสมอง,ให้ความสำคัญกับพฤติกรรมการใช้ชีวิตมากขึ้น。"; const report_explain_text_6 = "คุณมีนิสัยการใช้ชีวิตที่ไม่ดีเช่นบุหรี่และเหล้าขาดการออกกำลังกาย,แนะนำการปรับ。"; const report_explain_text_7 = "ตอนนี้คุณอายุเกิน 40 ปีแล้ว,คิดถึงสุขภาพ,หากไม่สามารถเลิกบุหรี่ได้ก็แนะนำให้ค่อยๆ ลดปริมาณ。"; const report_explain_text_8 = "มีอาการเสี่ยงปวดท้องส่วนบน อาเจียน จึงแนะนำให้ไปตรวจที่โรงพยาบาลปกติ。"; const report_explain_text_9 = "หากคุณมีอาการเจ็บปวดและไม่บรรเทาในบริเวณก่อนหัวใจแนะนำให้ไปตรวจที่โรงพยาบาลปกติ。"; const report_explain_text_10 = "การให้คะแนนด้านบนเป็นการให้คะแนนสำหรับคุณตามเกณฑ์การตรวจคัดกรองโรคหัวใจและหลอดเลือดหัวใจและหลอดเลือดในช่วงต้นเช่นคู่มือการป้องกันโรคเบาหวานและการให้คะแนนความเสี่ยงของกล้ามเนื้อกล้ามเนื้อ, ระบบการให้คะแนนที่แตกต่างกัน, ตามด้วยการตีความที่เฉพาะเจาะจงสำหรับการอ้างอิงของคุณ。"; const healthy_habits = "พฤติกรรมสุขภาพ"; const y_n = "ใช่ / ไม่"; const healthy_personal_ratios = "สัดส่วนบุคลากรด้านสุขภาพ"; const all_people = "ทั้งหมด"; const group_people = "กลุ่มย่อย"; const report_text_4 = "การจัดกลุ่ม หมายถึงสถิติของผู้ใช้ที่เป็นเพศเดียวกันและอายุเดียวกัน (น้อยกว่า 40,40 ~ 49, มากกว่า 50)。"; const report_text_5 = "คุณเป็นสมาชิกแล้วและคุณมีสิทธิประโยชน์ดังต่อไปนี้。"; const report_text_6 = "สามารถประเมินได้ไม่จำกัดจำนวนครั้งตลอดระยะเวลา 1 ปี。"; const report_text_7 = "สามารถรีวิวได้ไม่จำกัดจำนวนครั้งภายในระยะเวลาหนึ่งปี สามารถให้ญาติ 3 คนได้ไม่จำกัดครั้ง。"; const report_text_8 = "หากผลการตรวจสอบครั้งแรกของคุณแสดงให้เห็นว่า คุณไม่มีความเสี่ยงทั้งสามระบบจะเพิ่มญาติ 1-2 คนในเวลาเดียวกันคุณจะแบ่งปันหน้ารายงานนี้ เป็นครั้งแรกเพื่อนของคุณ ที่เข้ามาจะเป็นสมาชิกฟรีจำนวนสมาชิก และอายุของคุณ ที่เกี่ยวข้อง"; const report_text_9 = "ทำมาแล้ว กลับไปที่หน้าแรก ประเมินผลครอบครัว เปิดการจัดการสุขภาพ。"; const y = "ใช่"; const n = "ไม่"; const select_age = "อายุ"; const select_age_1 = "อายุ"; const select_age_2 = "อายุมากกว่า"; const select_age_3 = "อายุต่ำกว่า"; const select_sex = "เพศ"; const calculate_BMI = "คำนวณค่าดัชนีมวลกาย"; const select = "เลือก"; const height = "ส่วนสูง"; const weight = "น้ำหนักตัว"; const selectcanvas_text1 = "กรุณาใส่ส่วนสูง น้ำหนัก"; const selectcanvas_text2 = "ดัชนีมวลกายเป็นตัวบ่งชี้เชิงปริมาณของระดับความอ้วนและความผอมของร่างกายมนุษย์และมีขนาดที่เชื่อมโยงกับระดับความเสี่ยงของโรคต่างๆ。"; const selectcanvas_text3 = "ความสูงใช้จำนวนเต็มน้ำหนักที่เลือกโดย 0.5 กิโลกรัมก็โอเค。"; const report_user = "วัตถุประเมิน"; const selectage_test1 = "โปรดเลือกอายุของผู้ที่ได้รับการประเมิน"; const selectage_test2 = "ความเสี่ยงต่อการเกิดโรคเรื้อรังบางชนิดที่ส่งผลกระทบต่อสุขภาพมากเริ่มเพิ่มขึ้นตั้งแต่อายุ 29 ปี,ไม่สามารถเปลี่ยนอายุได้ แต่สามารถเปลี่ยนพฤติกรรมการใช้ชีวิตได้。"; const next_step = "ขั้นตอนต่อไป"; const show_info_text1 = "BMI ของคุณเกินเกณฑ์แล้ว"; const show_info_text2 = "ผู้ใช้"; const less_than = "น้อยกว่า"; const greater_than = "มากกว่า"; const selectwaistline_text1 = "โปรดเลื่อนไปทางซ้ายหรือขวาเพื่อเลือกเส้นรอบเอวของผู้รับการประเมินผล"; const selectwaistline_text2 = "เส้นรอบเอว คือสิ่งสะท้อนว่าปริมาณไขมันในช่องท้องมากเกินไปหรือไม่ โดยปริมาณไขมันในช่องท้องที่มากเกินไปเป็นสาเหตุที่ก่อให้เกิดโรคต่าง ๆ"; const selectwaistline_text3 = "งานวิจัยที่ตีพิมพ์ล่าสุดในวารสาร JAMA ชี้ว่า กลุ่มบุคคลที่มีอัตราส่วนรอบเอวต่อรอบสะโพกเกินค่าที่กำหนด อีกทั้งค่าความดันโลหิตตัวบนสูงเกินไป ความเสี่ยงต่อการเสียชีวิตจากโรคหัวใจและหลอดเลือดจะเพิ่มขึ้นอย่างเห็นได้ชัด ด้วยเหตุนี้ การคงอัตราส่วนรอบเอวต่อรอบสะโพกจึงไม่เพียงเป็นสิ่งจำเป็นต่อความรักสวยรักงามเท่านั้น ยังมีความสำคัญมากต่อสุขภาพร่างกายอีกด้วย"; const selectwaistline_text4 = "เมื่อมีผลการวิจัยเชิงปริมาณที่เกี่ยวข้องกับงานวิจัยอัตราส่วนรอบเอวต่อรอบสะโพก เราจะอัปเดตเนื้อหาการประเมินผลด้วยเช่นกัน。"; const selectwaistline_text5 = "ในการประเมินผล ขอเพียงคุณระบุช่วงของเส้นรอบเอวที่ถูกต้องเท่านั้นเป็นพอ หากไม่แน่ใจ สามารถส่งเป็นขนาดกางเกงที่พอดีกับตัวคุณได้ ทั้งนี้มีค่าขนาดสำหรับใช้ประกอบการพิจารณาอยู่ที่ด้านล่างพิกัด。"; const waistline = "เส้นรอบเอว"; const waistline_text1 = "尺"; const waistline_text2 = "寸"; const scale_evaluation = "การประเมินผล"; const selectsbp_text1 = "โปรดกรอกช่วงความดันโลหิตของผู้รับการประเมินผล"; const selectsbp_text2 = "ดัชนีหลักที่มีความเกี่ยวข้องกับโรคคือความดันโลหิตสูง คุณแค่ต้องระบุข้อมูลความดันโลหิตสูง และเลือกช่วงให้ถูกต้องเท่านั้น"; const selectsbp_text3 = "หากมีการทานยาลดความดัน โปรดระบุข้อมูลความดันโลหิตสูงก่อนที่จะเข้ารับการรักษา ผู้ป่วยโรคความดันโลหิตสูงโดยทั่วไปค่าจะสูงกว่า 140 ขึ้นไป"; const selectsbp_text4 = "หากคุณยืนยันว่าไม่รู้ค่าความดันโลหิต ไม่มีความดันโลหิตสูง คุณสามารถกรอกช่วงปกติได้ คือ 110-120 หากผลการประเมินผลอยู่ในช่วง 3 คะแนน ทางด้านซ้ายหรือขวาของเส้นเกณฑ์มาตรฐาน คุณต้องวัดความดันโลหิตเพื่อประเมินผลใหม่"; const hg_text1 = "mmHgต่อไปนี้"; const hg_text2 = "mmHg"; const hg_text3 = "mmHgภายใน"; const hg_text4 = "mmHgมากกว่า"; const blood_pressure = "ความดันโลหิต"; const low_risk = "ความเสี่ยงต่ำ"; const risk = "มีความเสี่ยง"; const valuating_people = "ผู้รับการประเมินผล"; const completion_text_1 = "การประเมินความเสี่ยงของโรคเบาหวานและโรคหลอดเลือดสมองเสร็จสมบูรณ์!"; const completion_text_2 = "กรุณาดำเนินการต่อให้เสร็จสิ้น。"; const questions_remaining = "คำถามที่เหลือ"; const have = "มี"; const same_as_you = "ผู้ใช้เช่นเดียวกับคุณ"; const select_gender_for_valuating_people = "โปรดเลือกเพศของผู้รับการประเมินผล"; const select_gender_text_1 = "งานวิจัยชี้ว่า ความเสี่ยงต่อโรคบางชนิดในเพศชายและเพศหญิงจะแตกต่างกัน เช่น โรคเบาหวาน ความเสี่ยงต่อการเกิดโรคในเพศชายจะสูงกว่า จึงต้องใส่ใจพฤติกรรมการบริโภคอาหารให้มากขึ้นและควบคุมเส้นรอบเอว。"; const is_man = "เป็นเพศชาย"; const is_female = "เป็นเพศหญิง"; const man = "ชาย"; const female = "ผู้หญิง"; const index_text_1 = "ทำแบบประเมินให้บิดา มารดา และบุคคลในครอบครัว"; const index_text_2 = "พฤติกรรมการดำเนินชีวิตที่ดีต่อสุขภาพ คือกลยุทธ์ที่ดีที่สุดในการป้องกันโรคหลอดเลือดหัวใจและสมอง!!"; const index_text_3 = "ตรวจคัดกรองระยะเริ่มต้น"; const index_text_4 = "ป้องกันเชิงรุก"; const index_text_5 = "รักษาสุขภาพบุคคลในครอบครัวให้แข็งแรง ปกป้องครอบครัวให้ปลอดภัย"; const index_text_6 = "ขจัดความเสี่ยง สบายใจ! ไร้กังวล!"; const index_btn_1 = "เริ่มประเมินผล"; const index_btn_2 = "ตรวจดูรายงาน"; const index_btn_3 = "ประเมินผลใหม่"; const share = "แบ่งปัน"; const share_text = "การตรวจคัดกรองโรคหัวใจและหลอดเลือดสมองในระยะแรกง่ายและง่ายมีประโยชน์และไม่เป็นอันตรายแบ่งปันให้เพื่อนและครอบครัว。"; const member_add_text_1 = "ทุกคนห่วงใยครอบครัว"; const member_add_text_2 = "แต่เราทำได้มากกว่านี้"; const telno_null = "หมายเลขโทรศัพท์มือถือ จำเป็น"; const password_null = "รหัสผ่าน จำเป็น"; const telno_error = "หมายเลขโทรศัพท์มือถือไม่ถูกต้อง"; const password_repeat_error = "รหัสผ่านซ้ำไม่ตรงกัน"; const register_error = "ลงทะเบียนไม่สำเร็จ"; const member_num_than_max = "ปริมาณต้องไม่เกินเพดานที่กำหนด"; const member_title_null = "ชื่อญาติและเพื่อนยังไม่ได้กรอก"; const completion_problem_for_valuating_people = "กรุณากรอกคำตอบของวัตถุประเมิน"; const please_completion_problem = "กรุณากรอกข้อมูลให้ครบถ้วน"; const system_error = "ข้อผิดพลาดของระบบ"; const not_selected = "ไม่มีตัวเลือก"; const TH = { hello, login, register, password, password_repeat, telno, new_member, navigationBarTitleText, add_member, father, mother, husband, wife, other_member, add_member_text1, add_member_text2, add_member_text3, add_member_text4, add_member_text5, add_member_text6, add_member_text7, add_member_text8, add_member_text9, submit, show_report, do_success, illness_title, report_score, report_result, report_error_text_1, report_error_text_2, report_error_text_3, report_text_1, report_text_1_1, health_advice, report_explain, report_detail, report_explain_text_1, report_explain_text_2, report_explain_text_3, report_explain_text_3_1, report_explain_text_3_2, report_explain_text_3_3, report_explain_text_4, report_explain_text_5, report_explain_text_6, report_explain_text_7, report_explain_text_8, report_explain_text_9, report_explain_text_10, healthy_habits, y_n, healthy_personal_ratios, all_people, group_people, report_text_4, report_text_5, report_text_6, report_text_7, report_text_8, report_text_9, y, n, select_age, select_age_1, select_age_2, select_age_3, select_sex, calculate_BMI, select, height, weight, selectcanvas_text1, selectcanvas_text2, selectcanvas_text3, report_user, selectage_test1, selectage_test2, next_step, show_info_text1, show_info_text2, less_than, greater_than, selectwaistline_text1, selectwaistline_text2, selectwaistline_text3, selectwaistline_text4, selectwaistline_text5, waistline, waistline_text1, waistline_text2, scale_evaluation, selectsbp_text1, selectsbp_text2, selectsbp_text3, selectsbp_text4, hg_text1, hg_text2, hg_text3, hg_text4, blood_pressure, low_risk, risk, valuating_people, completion_text_1, completion_text_2, questions_remaining, have, same_as_you, select_gender_for_valuating_people, select_gender_text_1, is_man, is_female, man, female, index_text_1, index_text_2, index_text_3, index_text_4, index_text_5, index_text_6, index_btn_1, index_btn_2, index_btn_3, share, share_text, member_add_text_1, member_add_text_2, telno_null, password_null, telno_error, password_repeat_error, register_error, member_num_than_max, member_title_null, completion_problem_for_valuating_people, please_completion_problem, system_error, not_selected }; const messages = { zh: { ...ZH }, en: { ...EN }, th: { ...TH } }; const i18n = createI18n({ locale: "th", legacy: false, globalInjection: true, messages }); function createApp() { const app = vue.createVueApp(App); app.use(i18n); 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);