if (typeof Promise !== "undefined" && !Promise.prototype.finally) { Promise.prototype.finally = function(callback) { const promise = this.constructor; return this.then( (value) => promise.resolve(callback()).then(() => value), (reason) => promise.resolve(callback()).then(() => { throw reason; }) ); }; } ; if (typeof uni !== "undefined" && uni && uni.requireGlobal) { const global2 = uni.requireGlobal(); ArrayBuffer = global2.ArrayBuffer; Int8Array = global2.Int8Array; Uint8Array = global2.Uint8Array; Uint8ClampedArray = global2.Uint8ClampedArray; Int16Array = global2.Int16Array; Uint16Array = global2.Uint16Array; Int32Array = global2.Int32Array; Uint32Array = global2.Uint32Array; Float32Array = global2.Float32Array; Float64Array = global2.Float64Array; BigInt64Array = global2.BigInt64Array; BigUint64Array = global2.BigUint64Array; } ; if (uni.restoreGlobal) { uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval); } (function(vue) { "use strict"; const _export_sfc = (sfc, props2) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props2) { target[key] = val; } return target; }; const _sfc_main$2y = { data() { return {}; }, onLoad() { this.navigatHandler(); }, methods: { navigatHandler: function() { uni.reLaunch({ url: "/pages/index/index", animationType: "pop-in", animationDuration: 100 }); } } }; function _sfc_render$2L(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view") ]); } const PagesCommonLaunch = /* @__PURE__ */ _export_sfc(_sfc_main$2y, [["render", _sfc_render$2L], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/common/launch.vue"]]); const ON_SHOW = "onShow"; const ON_LOAD = "onLoad"; const ON_READY = "onReady"; const ON_UNLOAD = "onUnload"; const ON_NAVIGATION_BAR_BUTTON_TAP = "onNavigationBarButtonTap"; function requireNativePlugin(name) { return weex.requireModule(name); } function formatAppLog(type2, filename, ...args) { if (uni.__log__) { uni.__log__(type2, filename, ...args); } else { console[type2].apply(console, [...args, filename]); } } function resolveEasycom(component, easycom) { return typeof component === "string" ? easycom : component; } const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => { !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target); }; const onShow = /* @__PURE__ */ createHook(ON_SHOW); const onLoad = /* @__PURE__ */ createHook(ON_LOAD); const onReady = /* @__PURE__ */ createHook(ON_READY); const onUnload = /* @__PURE__ */ createHook(ON_UNLOAD); const onNavigationBarButtonTap = /* @__PURE__ */ createHook(ON_NAVIGATION_BAR_BUTTON_TAP); let Request$1 = class Request { http(router, data = {}, method, contentType) { let path = "https://userapp.his.cdwjyyh.com"; uni.setStorageSync("requestPath", path); return new Promise((resolve, reject2) => { let token = uni.getStorageSync("AppToken"); let CompanyUserToken = uni.getStorageSync("CompanyUserToken"); var httpContentType = "application/x-www-form-urlencoded"; if (contentType != void 0) { httpContentType = contentType; } uni.request({ header: { // 'Content-Type': 'application/x-www-form-urlencoded', "Content-Type": httpContentType, "AppToken": token, "CompanyUserToken": CompanyUserToken }, url: `${path}${router}`, data, method, success: (res) => { if (res.data.code == 401) { let pages2 = getCurrentPages(); let url2 = pages2[pages2.length - 1]; formatAppLog("log", "at common/request.js:37", url2); if (url2 != void 0 && url2.route == "pages/auth/login") { resolve(res.data); return; } uni.navigateTo({ url: "/pages/auth/login", success: () => { }, fail: () => { } }); return; } if (res.data.token) { uni.setStorageSync("AppToken", res.data.token); } resolve(res.data); }, fail: (res) => { }, complete: (res) => { if (res.data.code == 401) { return false; } } }); }); } }; let request$n = new Request$1().http; function wxLogin(data) { return request$n("/app/wx/login", data, "POST", "application/json;charset=UTF-8"); } function loginByMiniApp(data) { return request$n("/app/wx/loginByMiniApp", data, "POST", "application/json;charset=UTF-8"); } function getUserInfo$1() { return request$n("/app/user/getUserInfo", null, "GET"); } function checkLogin() { return request$n("/app/user/checkLogin", null, "GET"); } function editUser(data) { return request$n("/app/user/editUser", data, "POST", "application/json;charset=UTF-8"); } function registerDoctor(data) { return request$n("/app/user/registerDoctor", data, "POST", "application/json;charset=UTF-8"); } function getMyCouponList(data) { return request$n("/app/user/getMyCouponList", data, "GET"); } function getMyEnableCouponList(data) { return request$n("/app/user/getMyEnableCouponList", data, "GET"); } const _sfc_main$2x = { data() { return { isAgreement: false, code: null }; }, computed: {}, onLoad(option) { uni.$on("refreshLogin", () => { uni.navigateBack({ delta: 1 }); }); this.getCode(); }, onUnload() { }, mounted() { }, methods: { wxLogin() { var that = this; if (!this.isAgreement) { uni.showToast({ icon: "none", title: "请先同意协议后再登录" }); return false; } uni.showLoading({ title: "处理中..." }); that.$getProvider().then((provider) => { formatAppLog("log", "at pages/auth/login.vue:78", "当前的环境商", provider); if (!provider) { reject(); } uni.login({ provider, success: async (loginRes) => { formatAppLog("log", "at pages/auth/login.vue:86", loginRes); let code2 = loginRes.code; var tuiUserId = uni.getStorageSync("tuiUserId"); loginByMiniApp({ // encryptedData: e.mp.detail.encryptedData, // iv: e.mp.detail.iv, code: code2, tuiUserId }).then((res) => { uni.hideLoading(); if (res.code == 200) { uni.showToast({ icon: "none", title: "登录成功" }); uni.setStorageSync("AppToken", res.token); uni.setStorageSync("userId", res.user.userId); uni.setStorageSync("avatar", res.user.avatar); uni.setStorageSync("nickName", res.user.nickName); uni.$emit("refreshLogin"); } else { uni.showToast({ icon: "none", title: "授权登录失败,请重新登录" }); } }).catch((error2) => { formatAppLog("log", "at pages/auth/login.vue:119", error2); uni.hideLoading(); uni.showToast({ icon: "none", title: "登录接口调用失败" }); }); } }); }).catch((err) => { uni.showToast({ icon: "none", title: err }); }); }, handleAgree() { if (!this.isAgreement) { uni.showToast({ icon: "none", title: "请先同意协议后再登录" }); } }, openContent(type2) { formatAppLog("log", "at pages/auth/login.vue:146", type2); uni.navigateTo({ url: "/pages_user/agreement?type=" + type2 }); }, handleAgreement() { this.isAgreement = !this.isAgreement; }, getCode() { var that = this; that.$getProvider().then((provider) => { if (!provider) { reject(); } uni.login({ provider, success: async (loginRes) => { that.code = loginRes.code; } }); }).catch((err) => { }); }, // 微信用户手机号登录 phoneLogin(e) { uni.showLoading({ title: "处理中" }); formatAppLog("log", "at pages/auth/login.vue:181", e); if (e.detail.errMsg == "getPhoneNumber:ok") { this.$getProvider().then((provider) => { formatAppLog("log", "at pages/auth/login.vue:185", "当前的环境商", provider); if (!provider) { reject(); } uni.login({ provider, success: async (loginRes) => { formatAppLog("log", "at pages/auth/login.vue:193", loginRes); let code2 = loginRes.code; var tuiUserId = uni.getStorageSync("tuiUserId"); wxLogin({ encryptedData: e.detail.encryptedData, iv: e.detail.iv, code: code2, tuiUserId }).then((res) => { uni.hideLoading(); if (res.code == 200) { uni.showToast({ icon: "none", title: "登录成功" }); uni.setStorageSync("AppToken", res.token); uni.setStorageSync("userId", res.user.userId); uni.setStorageSync("avatar", res.user.avatar); uni.setStorageSync("nickName", res.user.nickName); uni.$emit("refreshLogin"); uni.$emit("refreshIM"); } else { uni.showToast({ icon: "none", title: "授权登录失败,请重新登录" }); } }).catch((error2) => { formatAppLog("log", "at pages/auth/login.vue:226", error2); uni.hideLoading(); uni.showToast({ icon: "none", title: "授权登录失败,请重新登录" }); }); } }); }).catch((err) => { }); } else { uni.showToast({ title: "已拒绝授权", icon: "none", duration: 2e3 }); } }, back() { uni.reLaunch({ url: "/pages/index/index", animationType: "pop-in", animationDuration: 100 }); } } }; function _sfc_render$2K(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "force-login-wrap" }, [ vue.createElementVNode("view", { class: "force-login__content y-f" }, [ vue.createElementVNode("view", { class: "logo" }, [ vue.createElementVNode("view", { class: "logo-img" }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/1287b2bf7c944538905f5092e8ff7db9.png" }) ]), vue.createElementVNode("view", { class: "title" }, "芸医汇互联网医院") ]), vue.createElementVNode("view", { class: "login-notice" }, "为了提供更优质的服务,请先登录"), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode( "button", { class: "author-btn", "open-type": "getPhoneNumber", onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.phoneLogin && $options.phoneLogin(...args)) }, "一键授权手机号登录", 32 /* NEED_HYDRATION */ ), $data.isAgreement == false ? (vue.openBlock(), vue.createElementBlock("button", { key: 0, class: "author-btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.handleAgree()) }, "一键授权手机号登录")) : vue.createCommentVNode("v-if", true) ]), vue.createCommentVNode(' 微信授权登录 '), vue.createElementVNode("button", { class: "close-btn", onClick: _cache[2] || (_cache[2] = (...args) => $options.back && $options.back(...args)) }, "暂不登录"), vue.createElementVNode("view", { class: "tips" }, [ vue.createElementVNode("checkbox", { checked: $data.isAgreement, onClick: _cache[3] || (_cache[3] = ($event) => $options.handleAgreement()) }, null, 8, ["checked"]), vue.createElementVNode("view", { onClick: _cache[4] || (_cache[4] = ($event) => $options.handleAgreement()) }, "您同意并接受"), vue.createElementVNode("view", { class: "btn", onClick: _cache[5] || (_cache[5] = ($event) => $options.openContent("userRegister")) }, "《用户协议》"), vue.createElementVNode("view", { class: "btn", onClick: _cache[6] || (_cache[6] = ($event) => $options.openContent("userPrivacy")) }, "《隐私保护》") ]) ]) ]) ]); } const PagesAuthLogin = /* @__PURE__ */ _export_sfc(_sfc_main$2x, [["render", _sfc_render$2K], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/auth/login.vue"]]); const version = "3"; { formatAppLog("log", "at uni_modules/uview-plus/libs/config/config.js:5", ` %c uview-plus V${version} %c https://ijry.github.io/uview-plus/ `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;"); } const config$2 = { v: version, version, // 主题名称 type: [ "primary", "success", "info", "error", "warning" ], // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持 color: { "u-primary": "#2979ff", "u-warning": "#ff9900", "u-success": "#19be6b", "u-error": "#fa3534", "u-info": "#909399", "u-main-color": "#303133", "u-content-color": "#606266", "u-tips-color": "#909399", "u-light-color": "#c0c4cc" }, // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx unit: "px" }; const ActionSheet = { // action-sheet组件 actionSheet: { show: false, title: "", description: "", actions: () => [], index: "", cancelText: "", closeOnClickAction: true, safeAreaInsetBottom: true, openType: "", closeOnClickOverlay: true, round: 0 } }; const Album = { // album 组件 album: { urls: () => [], keyName: "", singleSize: 180, multipleSize: 70, space: 6, singleMode: "scaleToFill", multipleMode: "aspectFill", maxCount: 9, previewFullImage: true, rowCount: 3, showMore: true } }; const Alert = { // alert警告组件 alert: { title: "", type: "warning", description: "", closable: false, showIcon: false, effect: "light", center: false, fontSize: 14 } }; const Avatar = { // avatar 组件 avatar: { src: "", shape: "circle", size: 40, mode: "scaleToFill", text: "", bgColor: "#c0c4cc", color: "#ffffff", fontSize: 18, icon: "", mpAvatar: false, randomBgColor: false, defaultUrl: "", colorIndex: "", name: "" } }; const AvatarGroup = { // avatarGroup 组件 avatarGroup: { urls: () => [], maxCount: 5, shape: "circle", mode: "scaleToFill", showMore: true, size: 40, keyName: "", gap: 0.5, extraValue: 0 } }; const Backtop = { // backtop组件 backtop: { mode: "circle", icon: "arrow-upward", text: "", duration: 100, scrollTop: 0, top: 400, bottom: 100, right: 20, zIndex: 9, iconStyle: () => ({ color: "#909399", fontSize: "19px" }) } }; const Badge = { // 徽标数组件 badge: { isDot: false, value: "", show: true, max: 999, type: "error", showZero: false, bgColor: null, color: null, shape: "circle", numberType: "overflow", offset: () => [], inverted: false, absolute: false } }; const Button = { // button组件 button: { hairline: false, type: "info", size: "normal", shape: "square", plain: false, disabled: false, loading: false, loadingText: "", loadingMode: "spinner", loadingSize: 15, openType: "", formType: "", appParameter: "", hoverStopPropagation: true, lang: "en", sessionFrom: "", sendMessageTitle: "", sendMessagePath: "", sendMessageImg: "", showMessageCard: false, dataName: "", throttleTime: 0, hoverStartTime: 0, hoverStayTime: 200, text: "", icon: "", iconColor: "", color: "" } }; const Calendar = { // calendar 组件 calendar: { title: "日期选择", showTitle: true, showSubtitle: true, mode: "single", startText: "开始", endText: "结束", customList: () => [], color: "#3c9cff", minDate: 0, maxDate: 0, defaultDate: null, maxCount: Number.MAX_SAFE_INTEGER, // Infinity rowHeight: 56, formatter: null, showLunar: false, showMark: true, confirmText: "确定", confirmDisabledText: "确定", show: false, closeOnClickOverlay: false, readonly: false, showConfirm: true, maxRange: Number.MAX_SAFE_INTEGER, // Infinity rangePrompt: "", showRangePrompt: true, allowSameDay: false, round: 0, monthNum: 3 } }; const CarKeyboard = { // 车牌号键盘 carKeyboard: { random: false } }; const Cell = { // cell组件的props cell: { customClass: "", title: "", label: "", value: "", icon: "", disabled: false, border: true, center: false, url: "", linkType: "navigateTo", clickable: false, isLink: false, required: false, arrowDirection: "", iconStyle: {}, rightIconStyle: {}, rightIcon: "arrow-right", titleStyle: {}, size: "", stop: true, name: "" } }; const CellGroup = { // cell-group组件的props cellGroup: { title: "", border: true, customStyle: {} } }; const Checkbox = { // checkbox组件 checkbox: { name: "", shape: "", size: "", checkbox: false, disabled: "", activeColor: "", inactiveColor: "", iconSize: "", iconColor: "", label: "", labelSize: "", labelColor: "", labelDisabled: "" } }; const CheckboxGroup = { // checkbox-group组件 checkboxGroup: { name: "", value: () => [], shape: "square", disabled: false, activeColor: "#2979ff", inactiveColor: "#c8c9cc", size: 18, placement: "row", labelSize: 14, labelColor: "#303133", labelDisabled: false, iconColor: "#ffffff", iconSize: 12, iconPlacement: "left", borderBottom: false } }; const CircleProgress = { // circleProgress 组件 circleProgress: { percentage: 30 } }; const Code = { // code 组件 code: { seconds: 60, startText: "获取验证码", changeText: "X秒重新获取", endText: "重新获取", keepRunning: false, uniqueKey: "" } }; const CodeInput = { // codeInput 组件 codeInput: { adjustPosition: true, maxlength: 6, dot: false, mode: "box", hairline: false, space: 10, value: "", focus: false, bold: false, color: "#606266", fontSize: 18, size: 35, disabledKeyboard: false, borderColor: "#c9cacc", disabledDot: true } }; const Col = { // col 组件 col: { span: 12, offset: 0, justify: "start", align: "stretch", textAlign: "left" } }; const Collapse = { // collapse 组件 collapse: { value: null, accordion: false, border: true } }; const CollapseItem = { // collapseItem 组件 collapseItem: { title: "", value: "", label: "", disabled: false, isLink: true, clickable: true, border: true, align: "left", name: "", icon: "", duration: 300 } }; const ColumnNotice = { // columnNotice 组件 columnNotice: { text: "", icon: "volume", mode: "", color: "#f9ae3d", bgColor: "#fdf6ec", fontSize: 14, speed: 80, step: false, duration: 1500, disableTouch: true } }; const CountDown = { // u-count-down 计时器组件 countDown: { time: 0, format: "HH:mm:ss", autoStart: true, millisecond: false } }; const CountTo = { // countTo 组件 countTo: { startVal: 0, endVal: 0, duration: 2e3, autoplay: true, decimals: 0, useEasing: true, decimal: ".", color: "#606266", fontSize: 22, bold: false, separator: "" } }; const DatetimePicker = { // datetimePicker 组件 datetimePicker: { show: false, showToolbar: true, value: "", title: "", mode: "datetime", maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(), minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(), minHour: 0, maxHour: 23, minMinute: 0, maxMinute: 59, filter: null, formatter: null, loading: false, itemHeight: 44, cancelText: "取消", confirmText: "确认", cancelColor: "#909193", confirmColor: "#3c9cff", visibleItemCount: 5, closeOnClickOverlay: false, defaultIndex: () => [] } }; const Divider = { // divider组件 divider: { dashed: false, hairline: true, dot: false, textPosition: "center", text: "", textSize: 14, textColor: "#909399", lineColor: "#dcdfe6" } }; const Empty = { // empty组件 empty: { icon: "", text: "", textColor: "#c0c4cc", textSize: 14, iconColor: "#c0c4cc", iconSize: 90, mode: "data", width: 160, height: 160, show: true, marginTop: 0 } }; const Form = { // form 组件 form: { model: () => ({}), rules: () => ({}), errorType: "message", borderBottom: true, labelPosition: "left", labelWidth: 45, labelAlign: "left", labelStyle: () => ({}) } }; const GormItem = { // formItem 组件 formItem: { label: "", prop: "", borderBottom: "", labelWidth: "", rightIcon: "", leftIcon: "", required: false, leftIconStyle: "" } }; const Gap = { // gap组件 gap: { bgColor: "transparent", height: 20, marginTop: 0, marginBottom: 0, customStyle: {} } }; const Grid = { // grid组件 grid: { col: 3, border: false, align: "left" } }; const GridItem = { // grid-item组件 gridItem: { name: null, bgColor: "transparent" } }; const { color: color$3 } = config$2; const Icon = { // icon组件 icon: { name: "", color: color$3["u-content-color"], size: "16px", bold: false, index: "", hoverClass: "", customPrefix: "uicon", label: "", labelPos: "right", labelSize: "15px", labelColor: color$3["u-content-color"], space: "3px", imgMode: "", width: "", height: "", top: 0, stop: false } }; const Image$1 = { // image组件 image: { src: "", mode: "aspectFill", width: "300", height: "225", shape: "square", radius: 0, lazyLoad: true, showMenuByLongpress: true, loadingIcon: "photo", errorIcon: "error-circle", showLoading: true, showError: true, fade: true, webp: false, duration: 500, bgColor: "#f3f4f6" } }; const IndexAnchor = { // indexAnchor 组件 indexAnchor: { text: "", color: "#606266", size: 14, bgColor: "#dedede", height: 32 } }; const IndexList = { // indexList 组件 indexList: { inactiveColor: "#606266", activeColor: "#5677fc", indexList: () => [], sticky: true, customNavHeight: 0 } }; const Input = { // index 组件 input: { value: "", type: "text", fixed: false, disabled: false, disabledColor: "#f5f7fa", clearable: false, password: false, maxlength: -1, placeholder: null, placeholderClass: "input-placeholder", placeholderStyle: "color: #c0c4cc", showWordLimit: false, confirmType: "done", confirmHold: false, holdKeyboard: false, focus: false, autoBlur: false, disableDefaultPadding: false, cursor: -1, cursorSpacing: 30, selectionStart: -1, selectionEnd: -1, adjustPosition: true, inputAlign: "left", fontSize: "15px", color: "#303133", prefixIcon: "", prefixIconStyle: "", suffixIcon: "", suffixIconStyle: "", border: "surround", readonly: false, shape: "square", formatter: null } }; const Keyboard = { // 键盘组件 keyboard: { mode: "number", dotDisabled: false, tooltip: true, showTips: true, tips: "", showCancel: true, showConfirm: true, random: false, safeAreaInsetBottom: true, closeOnClickOverlay: true, show: false, overlay: true, zIndex: 10075, cancelText: "取消", confirmText: "确定", autoChange: false } }; const Line = { // line组件 line: { color: "#d6d7d9", length: "100%", direction: "row", hairline: true, margin: 0, dashed: false } }; const LineProgress = { // lineProgress 组件 lineProgress: { activeColor: "#19be6b", inactiveColor: "#ececec", percentage: 0, showText: true, height: 12 } }; const { color: color$2 } = config$2; const Link = { // link超链接组件props参数 link: { color: color$2["u-primary"], fontSize: 15, underLine: false, href: "", mpTips: "链接已复制,请在浏览器打开", lineColor: "", text: "" } }; const List = { // list 组件 list: { showScrollbar: false, lowerThreshold: 50, upperThreshold: 0, scrollTop: 0, offsetAccuracy: 10, enableFlex: false, pagingEnabled: false, scrollable: true, scrollIntoView: "", scrollWithAnimation: false, enableBackToTop: false, height: 0, width: 0, preLoadScreen: 1 } }; const ListItem = { // listItem 组件 listItem: { anchor: "" } }; const { color: color$1 } = config$2; const LoadingIcon = { // loading-icon加载中图标组件 loadingIcon: { show: true, color: color$1["u-tips-color"], textColor: color$1["u-tips-color"], vertical: false, mode: "spinner", size: 24, textSize: 15, text: "", timingFunction: "ease-in-out", duration: 1200, inactiveColor: "" } }; const LoadingPage = { // loading-page组件 loadingPage: { loadingText: "正在加载", image: "", loadingMode: "circle", loading: false, bgColor: "#ffffff", color: "#C8C8C8", fontSize: 19, iconSize: 28, loadingColor: "#C8C8C8" } }; const Loadmore = { // loadmore 组件 loadmore: { status: "loadmore", bgColor: "transparent", icon: true, fontSize: 14, iconSize: 17, color: "#606266", loadingIcon: "spinner", loadmoreText: "加载更多", loadingText: "正在加载...", nomoreText: "没有更多了", isDot: false, iconColor: "#b7b7b7", marginTop: 10, marginBottom: 10, height: "auto", line: false, lineColor: "#E6E8EB", dashed: false } }; const Modal = { // modal 组件 modal: { show: false, title: "", content: "", confirmText: "确认", cancelText: "取消", showConfirmButton: true, showCancelButton: false, confirmColor: "#2979ff", cancelColor: "#606266", buttonReverse: false, zoom: true, asyncClose: false, closeOnClickOverlay: false, negativeTop: 0, width: "650rpx", confirmButtonShape: "" } }; const color = { primary: "#3c9cff", info: "#909399", default: "#909399", warning: "#f9ae3d", error: "#f56c6c", success: "#5ac725", mainColor: "#303133", contentColor: "#606266", tipsColor: "#909399", lightColor: "#c0c4cc", borderColor: "#e4e7ed" }; const Navbar = { // navbar 组件 navbar: { safeAreaInsetTop: true, placeholder: false, fixed: true, border: false, leftIcon: "arrow-left", leftText: "", rightText: "", rightIcon: "", title: "", bgColor: "#ffffff", titleWidth: "400rpx", height: "44px", leftIconSize: 20, leftIconColor: color.mainColor, autoBack: false, titleStyle: "" } }; const NoNetwork = { // noNetwork noNetwork: { tips: "哎呀,网络信号丢失", zIndex: "", image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaD8E9PbrkvRopSMwMBBYRs+5O/yJS68cPnzYXel4tFP/jXbqjPRFEAiCQNe6Bw/6gdFn9Oy9Q90LLG2DgBBW2wyldIQIPPPCte2a5q3jtR+4ff/4wuBuXotrDwSEsNpjHKUXQODppy+udYJMEUEZgbd94DvnNwlA7YGAEFZ7jOOK78Xp06eTTkq7sxwQhmXuf/754VXl4iSstRAQwmqt8ZLWlkHg0UcD49qYfUjXfLtMtOZ7npExJu4iqZWLl7DWQUAIq3XGSlpaAYHD77q8xwuCOSUoXw8Sl0eMux977DGzQjES3AIICGG1wCBJEysj8PXnz230XXdr5RQFMYbRvWnv6w8UhMhliyGwYghr4Pjg3oEXL34ey9zyC9tiD2ml5h47dr1LN7S6CMjz/A3PvHh1Z6UyJby5EVgRhKUe7Kz/JU0LfvrJo5f+Y3MPibSuFgQGBgasYSd9l6GDsup0WS/T/9RTp9fXmU2SNwECdQ92E7S57iaMeJnPQLK6ixkDLfjlb7546RfrLkQyNBcC3dsP6oHWMd9G+V3JgwPHh7rnm1/yLQ8CbU9Y33zp0j+nZFUMb/DHmB7+SHGY3LUKAk8cObtD00xlHDrfNge+Z2ozU3c9dvx4Yr5lSL6lR6CtCWvg6OAPw9z538ZhhZRl6XrwhW8du1KX/iNejtwvPQIDR8+vSRqJ/obU7GupjdNdh2gW0ZDypJBFR6BtB2rg2OVtuub9JcmpHIpBoK1xfffLzx4f7C0XL2HNiYDp6bs9z23Ypn1fC1Y/9PCFDc3ZW2lVHIG2JKzTp4Ok7nv/G6Q054MIvda+bNb74pEgKGtwGAdL7pcfAa8vOKEZ2kyjWuLr7uDh+/qvN6o8KWdxEWhLwroyeek/g4zuqwU6kNrhyZcu/UktaSXN8iNwuL9/RuvVXtJ9PbPQ1vhmcP6t9+47u9ByJP/SIdB2hDVw9MJHQFYfrQdCph84evFX68kjaZcPAZJWwjMXRFpJ2zr91tfuvrh8vZCa54NA2xGWrunvmg8QWCJ/N4ir7fCYDxatkOeBB7an501agXbygVdvv9IK/ZQ2FiPQdi9osGbH+zRNf7y4m9Xu9Me7N9nv0HXdr5ZS4psHgXpJC9P/wDRTx0Vn1TxjWG9LGrbaUm/Fi5meSvcrkxf/Cg/ow9XqAUk91v3qHT97r6471dJKfHMi8Oyzgx1Z03t1YAQVT2MwgsC3u+yXHzi0faQ5eyGtqgWBtpOw2Ol9+/TM+sTOn8L08MtzgQCy+tOHXr3jA0JWc6HU/HF5Scssr4jXcYqfP6V/T8iq+ceyWgvbUsKKOn38eJAYyl56TAuCEr2WYei//9Crd/5GlFb81kdASVopSFrerKRlaoZj9HR+700H10+0fg+lB21NWBxe2lhNHsUpDZr27mi4dV379R9+za4/iO7Fbx8ECknLCPTsTDJ17O33bJpqnx6u7J60PWFxeAcCbMV56dJfQKf1bkMLfuGh1+76zMoe9vbuPUnLsb2DtmOe5HSxvXsrvWtLBEhaTx29+Ma27Jx0ShAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaEsEVoQdVluO3BJ06ptHL34b1XRjp4Ch6Rq24+kmjG4Nwwg+9uA9u/73EjRBqhAEihAoe3xwUQq5WTYEzp0b3ZnV/Ncf6O/9AvY9wlh/6dy3X7ncN512Zw9BVLXjuAP4np44vnQtkZoEgVkEhLBmsWiKqwsXpjbPBOn3gRfenwnc+7GBe+zsjclvonFDS9nA9Iy/u3x9+vAP3735VPk4CRUEFhcBIazFxbfm0k9fHD7k+v4nQFaPQIrx8Gmyx/GJ0J/t7ez7mw0b9MmaC2pQQgh0/ZSm4g5TwueWWtqLt0HuVy4CQljLPPYnB0depTn+b3t+8B4t0AdBUv93h2H9xc6da0aXs2m+r1WQsLRnl7NdUvfKRkAIa5nG//r1oGtsZvjTgev/kqYHF/TA+AXoqv4npJemOEiQU1Eo2l+G0movBK1UBBPU7s9E1+ILAkuNgKwSLjXiqO/khVtvARH8dxDBRkMzPrF/V+9/BlG5y9CUqlXinHv9mRPXtvuus88L9H3JPv2zD2yXExCqAicJBIFWRwAvv3Xqwq0/Pnn+lv/K+ZvfPH3p9p5W75O0fxaBp793ce3AwIDMWmYhafiVgNtwSMsXeHp4eNXJC8Nf0PAdRCiuf/XgrnWUqsqotcvnl9DmRkCdweX4b9N7+m/ih+mbMraLM14yJVwcXItKpT1VRve+ArC3Qqn+3gM7132jKEGZm6tXg86J7OhDfuA/iHwPUpfUZSfu2L59tXxEoQxeyxkEgjKeOnLxHb4RqC+NY5H3+2953d4XlrNN7Vq3ENYij+yZwbG9jpt9GkBPQ5H9zgP9607OVeWp87cOQtn9zwJf+xDMNFfj+jryPqXpxj8c2Nn7P+SXey70lidu4IXzb0DNB4tr9751+HV7zxSHyd1CERDCWiiCc+QPjUCnsaqmZ62O5IN7N/VUNP48ee7mAZDTf4Tt049iUG4Guv4ZfNLos9UIbo7qJWoJEHjy+bP7fNsoOcnW0A0/aacef8PdG28sQTNWTBVCWIs01OfPj66BpfqTmq732UnjgT1bei+Vq4pTv7HM8Ceg2/o1qLQug7T+FaaM3IqTLZdewpoHgYEjV9fphvOj+OShWa5V+CxvZtpzv/LwG/aNl4uXsPoRwI+4uEYjAJ2GmdG8L0FK2mYa+tsrkdXZy+P7x2ZuHdW14P+BLdank9q6Qwd3rf+ckFWjR6Tx5Q2cP58K9Jm3VCIr1ogt48lO237r3//96YofeG18y9q7RFklXITxPXV+5DchKb3ZDMy37Nu5tuxG4R9cHH6b42QfAzlds+3EPXu2rfrBIjRFilwkBIIR7SHoJDurFU89ZOd680Gke6JaWomvjoBIWNUxqivFD87fej0e0n8Fwvr0/t1rnyqX+QfnRz7g+8FX8Rv8vL3auF/IqhxKzR2WCPxXqKeq3krDTdj2ierpJEUtCIgOqxaUakwzNBR0D09yiqePHOjveyOkpxLr9VMXb73V97S/h3nDXx7Y2fdPkAYbncW1IgIDxy5vM7LZt/hgrnLtxyaBrJNxv/72N+6tuNhSLp+EVUZACKsyNnXHvHL+1qcgNf2KbSXu2bt9dcmS9qlzo/fARgcmCtpzB3b1/Vg5QiuslLowENyDWDn8cSjl98PgdBviu03N+rl9/WufLEwr18uDwLdevLTF1YK3xnVZ2HI1bUxrT7z5zTuXdRP78qCyeLUKYTUI25OXbm4JPO00TBj+6I7+db8ZL3ZwMOiYdG4dA1lN9HWte2iuI2NAVPapC8O/CGPR34Ip/AZIbIMo7yX8G9QMbcS09P+2b1vf5XgdrXaPfiYns9oeLLEd8D1/B7Dp0E1jGP042pXQj7RKf546cmGzp+tv1TRf6YQD35/QO3seP3xow5IfC9QqmM23naJ0ny9ysXwgq98BWc0kVhv/Nhalbqe8kd/Fr8MOSEr3zEVWrwyO3I29hl+E9LUHGf+nAXI6sGPdd8uV2YphIKnE5IyL6bLxk7cn3bdkHHefrpvJAExMZ1uBZmqeNzXtfzUzk/m/ens7LjV7Px+8d9e1579/44l0duZtge+Np5zEEw8c2pBu9na3YvtEwmrAqNE8IZvNHsep5//yjl3r/0O8yFOXbv0QCO05gP0JGIL+fjw+uj91YeRh/Dp/PtCDM7Zpfmjvjt6Xo7hW9ycmJjaYduf7Hdf/8HTGfa3rG9rYxLSWnsloPg7fijZV8oFM2Ja2a9t6EJd7bCztvHP7us4rrdD/r3/7ct9I99jEI4cOiQ3dIg2YEFYDgOUJDFj1e8TqX7cT4kImXuQr5279A4DeBEX8ayvprU4N3rovcALot/TH13T0fXDTJn0qXk4r3k9OTm4y7a6PzjjORzOOvn1kbEqbnEprPhRzwAKzwFLHk05hv6Yd6N+o3R6beG50aPSdr3qV6IJKkVp5ITIlXOCYn4Yexr0w/DO6YXymHFlR0e5r7tsM3fxgJbI6fW1ivTeT+SsYmr54cFff+5Cu5X+hb94Merp6/J/PusGvTE6724eGJ7RpSFOkKPCUZvBPBccoHBet3Rwe13rX9tw/PjXzZ5hKvr8SfhWKkeA2REAIa4GD6p0feRdWBnvxjv2PckVhVfBf4A29uG/X2i+Ui2eYn8n8NryuDr3jPfWSFV5k44UT137eshIP2K7/64cObbheqZ6lCp+Ydt8TBO7vTM5od1+/NR4SFVhoLpKKt410lnE8LTMzo3V2dLznxLkhYgQ9obiVjEDln7mVjEodfYcpw+MAsftg/7qSDbAnb97sCSb0Yei2fqOcbovVqKNnNO8HmAE9Cv3Wp+uoWjt27HpXNqH9WTKR+kBHKqEFbvo5y3N/avfu4g23R45f3WGa1k9ZicTd0zPTf/f6O7f8dT311Jp2fHzmgJlI/N70jPPe4bEZ6Kg4qw0lqlrLiNKBiLWerpTW25PUbkPXZViW62ecHz+4d8PXojTirzwEyhq8rTwYFtRjvpX/rlwJ+iSXugPbMuyKBOHo3geRJtuT7PujcmVUCuPJlhnL/9NUqvMD2eyM5sxMaIlE4n7XML907tyNjcxHQjty4sZv66Z1xEok/xNW5n4uZSf+8sT5m++vVO58wkEu5sR09pd9w/rWyET2vReujiqygrSopn/zKZN5qMeirotKeTyolm7p/+X06Wvr51ue5Gt9BISwFjiGsLl6N6SrvylXDNTK70D4mX071pwtF88w6Jd/DG/1E1u26NOV0pQL71y3/8PJVOcHMzPTWkcCH2YGOaTTaS2RTN6f1fQvvvDK1bdnbO2JZCr1SeRfn05Pa1PTU0gXJBKW+ecnzlxvCGndhFQ1NRP8bcY1/vjS9bF1V26MwHwsVKiXa3etYVw1TNhYJ3TDjQCO42jJVMcez7J+t9YyJF37ISCEtahjGjxkGDr2DJZ31D8h5vUQJL5RPkXlUMM07u3qSGidICvkzzuSlmlZb0olrK9hD9v9JCrPC196JoPMAolFg6CV+PPj54YeyWecx8Vk2v1Q0rSfhFT18LnBmzBRyNalp5qrSuq7kiAsh4SFa7oZ9M0wzI+cPHOjZPo9V1kS1z4ICGEt4lhiCvZrSa2jol7qzPXJPk6nIGbVbWfUvcr7hO9MP97ZVXpggOu6ajplYStj7l1XvbRMXbPAbp6HzSSBlkraNknrvfVCcPt2sHYi7f3pTDb47KUbYxuvKqkKpYBXKBnV869c3WgbDEixAck0FGFFfEzJzbIsO9C1TyrcymWWsLZGIHoW2rqTzdo5dXyykz0NC8l779i5vu4zwM+eHVntGP5jqVTq/6AkVc5NZ3wNH2lVxNWZNIukMSjiNd9z0+CHp5DXAdX4SAg203w8GB5IATtODHzdK8C15kEjhXvNS9rWA11dnfcMDY9prscss48RySakrOLWqODCoIKAgkuVgsS0urtD60haeV1YYVbbtjUn6/74HXvW/11huFy3PwKzT1r797Upe3jq4sib9u9Y+wxe+vh7W1N7jx49v6ZzbffnQD4/Cj1Pfjx54XiBls6GVuTUc9mQsOIO9mPQFdkIRlz4fy5JLm2ZMOqTcJaXIqpcqnixVe+rdbZ3dbc2OT0D0wZIibHSksmklslknvx+//q3PiKnXcTQae/b+LPQ3r1t0969cOL6G7o6E09qgZegdMJBpVQ1DbKCpyUt6oPKz/4NEJalCAuZFIuEVBJd+jgLh4rvAiFqUVGkhJZMWFp3Z0obGSu/d5gSnWmavuO6h+/cvYHSobgVgoAYjrb4QPMUiGtj1/79jBMkLBwiTlMASlYzTkhWCJyTrGAyMOFkst/BoYMmuIIyGJYcMXMMdNwHPhYN1qWS1t6ZLGaKZL8yzFXTr15BooLLMugHMBRNKgW+It8y9TEcJGt4rvcRFCCEVQbFdg0Swmrxkb0+cf2XOzq73kgdFieEXF2jdEUJKQH6SVWQrNjtZDKlpTPp38U58iUbthk/Ph7sN6zg/xudSGvD4xkq6otcnnjyF0XRRTflkyC0IIJE1JG0QbqGNpMNp5xFhRTcZDNoj66988SFm5vv3LX+WkGUXLYxAuXnCW3c4XbqGs9hwjv+a9lsuN+ahOJSCoLjNDAFvVUll0p1aNPp6adTweSflEszPO48oFn+4yOTmR+6enOshKyYhzWpf/jDuuf6x2aV/qNRaPG/1d0gUXWCA0uu7GhMmkqmerEc8KOVU0lMuyFQ+Ylut562YX9Sncmf7Ojo3BDZWbGLtMkiUVXSWTFNuMqWuYG530f7+/tnGFboxsfdd9mm8XdDo9O7rg6NFq0CFqZr5DWlK9qV0fZqGvZchSuPlevB2VmG/hOV4yWm3RAQwmrhEcW64qu4ykfJho52Vp3J8quBYQooqWDKADftBd6HD+5efyoKj/zR8ew/hWXY56/cnFh7a3RCTTGjuMX0SVB9qzu1qfQM+jO3dBW1g6uVSHv/qVNX10Vh4rc3AkJYLTy+WA/8ou9kJjo7bOh+DLVFZ64TEbCyBktxI5PJZj56R//Gx+NdH5vM4vuI+p8NXh9LjU1iw3EZhXc8TyPuuV9wDaaCfBjTM06N0hVWQmHBDzvSDZ5tvqYR7ZAymh8BIazmH6OKLbzv0KZvJEz3ZzEFnEolaEtV2XEaCLKadrIz//TQnk1/EU85NuH8th8Yf4j9gMZUOrNkZEVZCnsbtTU9KW18GqcKFyjh420sd2+j33pg3F8uTsLaDwEhrBYf04O7N/2t7/o/C2FoGnsIy/YGlvAwSfCvZzLOe+8oR1ZT3u/5uvHJC9dGtJlMrfqjslXVHwjpat2aLi2rjFFLjUSrFUjlO0juddXSSXx7ICCE1QbjiHO0/hofbPgwpnDTOR2V6hWNQqGUx34890noet5yaO+Gko3Y45PO7/uB/lvnrwxrWdha1absbgxo1FWtwplXqYSJY5Nn5lU3bLHQmGA/yko0plVSSjMjIITVzKNTR9sO7dv8RSeb/T9BWmMkKv4D+YzBXuljV7yxd+zfte6VeHGKrHTz4+cv38JWmyUmKzSGG5z7VndoE7kz3uPtq+Welvhwm39weVjOyaoFsBZPI4TV4gNY2Pw79mz8KyebeRIH+VEZTaX0sf27+v794TKmCxNTzr/2NOPj5wZBVjjdYSklq6jN69dyKuhqmWztivYob+RTSkPbe/xMdlMUJn77IiCE1W5jq+s4dYEO6mzsYAmvi/+CrH7LDYxPcBq4HGTFVcG1ULLT5orS1ULIkoSFI2cMHKG8obiXcteOCAhhtdmo6gaOh4EWWlkyYU9gvHswXfgV19d/7+LVkSWfBrItJJhObL/p7elQR8fUZnEV70XxPc01sM+xrzhU7toRgZIHuh07uZL6xA3LBaYB+Ar8rBsfz34YX1j+D5eu317QNGy2xPquSE4mDuXb2IujY2AgytNE67RiKFshzuwCR5s9ZSMlsK0QEMJqq+GkBKOF5yFzRoidK5BoFCeMjM/8mG+a//Xy0Li55KYLBRiTrGjwOQ1br4VMBQuKVJeQKVPxMLlvPwSEsNpsTEECmBLSgbHUpwD1YGwse59l2p+9fmuig4fiNZIowrqq/6Xeqm9Vh9JbjcOKvqFtACX7gV8kTVZvkaRoRQSEsFpx1OZoM2iKxxuHLtDcsZlgLzYZfv7m7XSv+r7fIm234XSP/8o5ktWqzqSyZr89PoXPYDTYkZvziw0NLluKayoEyq4iNVULpTF1IaDjHHZmoAW4aep9geN8fiLt998cGYdtVp7K6iqzXGJFUCAi7jdkuapsBJKcPBwgyP8YRyV7B04Q3dDbpY3jg6gupoMNla5U41BbUN9n0sr1ScKaHwEhrOYfo7paCAW0WiWknihhW/0Tabf/6tDtxpIVSIhGnz1dSXUkDL8fSHKi4/lWPId9Kp3Vxqegp8J/m9f14D6DQ/nmb281FwgkZ1Dj7bnSSFx7ICCE1R7jmO8FJJr8jCvjeNrIxFjDJBpKVaSlXhwDw384MyucBoLAGEfHI5ptO6n1YAq4FjorH9IWjUOnFlF3pj62aui3whbI33ZGQAir/UY3XCVEvzgdw/8NcSyGUhSlpVWQrFg2p39xp0JYLyIohaXxdZ2FGofG6yi85/QS32F0Asu8URgu1+2JgCjd22xcsVElPC85169Gaa1YTkRWJKpSqooBiQQzONvq9sRULKKxtzzAEJw1api2EFZjoW3K0oSwmnJY5tcoSD09HanEDztubnfO/IopyUWC6sUmZUpW5aSqkgwgK04DxxaZrFivacCaIdAuH9zaM1rSDgloOwSEsNpoSMenvU93dXb+EE5taFivKElRqd67qrNmsqIF+yjMF/i56MV2JqadYKxXMDXM6+4Wu04pf/kQEMJaPuwbWvPticwj4Il/NnTrdl7JrqaDC5wTUle1GmdWWVCw1+JotjA6PgnThsIdQrXknF8arkJi/+R355dbcrUaArU9ha3WqxXW3tHR9C5dN//T9eEJ3aGdUwP7T0V7F86Mr0VW4mF6o2NTS/ilaB2HDmb8wA2+08AuS1FNjIAQVhMPTi1NgwRkGKbxRxMz3uaJSRzVUkumOtLwo6Zc7aOkVdEhynN9NQ1cyuNqeEqD67mX9TXGyxXbJhFthYAQVosP58S0909czfqJqzdGODVqaG/IUbCWr2p0yukfp4FUtDfeir1yl8IPUGjPHFy/fqJyKolpJwSEsFp4NEfT6Z3YBvOp8MvMc0hAi9hHNQ1cBrJil5TUZxhfXsTuSdFNhoAQVpMNSD3NMTzzU1PZYAM/ProYkg3UV5rHT8lXmA7SwnwEq4FLLVkRI04HM+n0LdvzvlEPZpK2tREQwmrR8ZucCd7hePr7rw2N5PfxLUZXON1zHKz4kb0KnIttP6Njk8tyaimbwXPrsW/yq3v3bhoqaJZctjkCQlgtOMCYCnU4GedTI+NpQ32XbxH7QOmKG5nzdIWZJz8HNkKygqI9TmSL2JSiovGVn0A39c8WBcpN2yMghNWCQ4zPc0HRbr6GEs6chJFnmfl3knZO4/hmII1B6fiFG9br0s6qAeXPp2WUrhzHeXH/jr6n5pNf8rQuAkJYLTZ2kK7Wul7w6zeGx9DyUsZovOodOizosTg1TM9k1Wogpa7lIisOF+w48E/7E5B1Y/cgtdizsBKbK6c1tNioT6X9n3MDcyePOo7OoJqrC6S0+ZIYV+GSOHxvc18PJCxXG4ed13I727axqTp9yk9rX1jutkj9S4+ASFhLj/m8axwdDdbgELxfGsLpoZyqVXPVU1QugVJUV0dC27p+FaaBWWxknq6ceAljTNMiAf/BoUMbJpewWqmqSRAQCatJBqKWZpgJ731Zx9pJM4aK0hXe5vlKVFEbKFlxs3PvqpSSqpbzKztRm+gnEkktnU6/2GFMfa4wXK5XDgJCWC0y1iAR6/Z49iOjY7C5qkG6mk+3SFQGlEP8FFdnygrNFqBsn1OxP5+K5pGHbcBhqhT8fqu/v39mHkVIljZAQAirRQYx7Wj3Zj3tddQjVVJ4l50CMjHe8mqOTJCCvmoTyIrENXx7Uinbm4Gs2PZUqkObnp76i0N7N36tWl8kvn0RaGnCGhgILKPn3B3+xKVXDh8+nPseX3sOlpt13+P4uonv71WeDqLr1ampFB8S1JrulNaHc9rTMxltcpofOeWns0rTLkeIZUHRnpm5YibMf7kc9UudzYNAyyrd8ZLpWvfgQT8w+oyevXeo++bBtaEtQd9s1/ffRsV3I6eDJCp+nourgH04UZQnhIYfWm1o8xdUGCU8/E/bil89sH3dlQUVJplbHoGWJaxnXri2HTvd1nEEcCBS3z++MLi75UejQgcmJjL92ax/gNJPo6QekhVXAbdvXI3D+XQ1Bcxiu02zTAEjKFIdHTQS/S8Hd2/4YhQm/spFoCUJ6+mnL651gkwRQRmBt33gO+c3teNQYin/oG6aKX5rcKEukqqoWN+Ij5vy81v8UATDG0WGC21jlJ96K6wKPpWd8H8jChN/ZSPQcoR1+vTppJPS7iw3bIZl7n/++eFV5eJaOczX9Z2YvM1LPxWpocBHKv8qHHdMqSphGUqqahaThfj40ITBcbLnsDj6oXvu2bS4n96JVy73TYtASxHWo48GxrUx+5Cu+XY5RH3PMzLGxF0ktXLxrRoGNVPPfNtOolIrgElLGYH2wbZqcipdIFVFlDbfGhqfj9bskCaHHS/7gTt3r73Y+BqkxFZFoKUI6/C7Lu/Bl1jmlKB8PUhcHjHufuyxx/g5lbZw+BL7bX4EoiZqyS0T0uM0j1+82QSl+ua+bhxj7GjD2LicwWkLzaarigbKsmDJ7gcTmezMBw/t3ixntUfAiK8QaBmzhq8/f26j77pbaxo3w+jetPf1B5D2RE3pmzyR4/nH+Mti4Wx1dUrCHO0lSVGqskFUnakkpn6mhu086jgYHkWTW3Wbo4Tli6L5gqYHE47vfeDufVv+YflaIjU3KwItIWEdO3a9Szc0ElDNDqcLbHjmxas7a87QxAnX9ljfxcr+Mzs29ykpi1O8iJjoR/cm5o7dnUl89LRLW93dyWmVIip+Kp7pmlWqIvQ8Mga9Gslm3Efu3LX+K008HNK0ZUSgplnGMrZPGxgYsIKeXa/TA61jPu0w0+7xBx/cd3M+eZspD0wbDgWm+RXP13cODY/jWGKuGAb48jG+agNpilbqlKZoWDqDY2AyjtNUlupzYZlKpXgaxIVMNv0zd+/d+uxcaSVuZSPQ/IT13TN34QRvZW81n6HSDdMLUqmjh9tgd//Fi8OHEl3JL3Z2dh3MzGA7XU664llVWRz/QhLjNYmsmaWp/DjCjqIDdlaZTOZZ1/A+fGj7hjP5OLkQBMog0NSE9cSRszuswNhdpt31BRnazM3U9IuPHDrUuG+419eChqU+cvzqjp7u5P9KJpMPpqc51Zv9QntLkFQBEqZluVCw/7nhaP9i376+8YIouRQEyiLQtIQ1cPT8GjOw7vE8tyFtxBrb2MBXdh579FF99g0vC0nzB548ebNHT2l/aFmJj1BPBYyav9EFLaQ+jdPAVNL8/pZ13a8qiJLLOhAAjvrTRy/d0enbF+69d0tzHFhWR/vnk7Rple6mp+9uFFkRGF8LVj/08IUN8wGp2fIcPLh+4sCu9R+F3ucj0MLf4vaVVnChqYWmdaQS2jpY2vd0djh86Vqh7c3Yxm8dudTPxaW0lrn7yJEjZW0Tm7HdC2lT0xKW1xecgHE3FDWNcb7uDh6+r/96Y0prjlIO7ur7TOD5b3ayzt9ylY0Gl83qKFXZsCXrXdOlrV3djf2LBr556JOshLDmMWhPPXV6vav5O5jVxYLUhNl3iIbV8yiqpbI0bQcP85C2Xu0l3dczC0XUN4Pzb71339mFltOM+Q/0rzu5f2fvu1zH+QDOt3uZ0pbVRMRFouJK5qqeTkhVqyBdtdUmhGV5JI4cudrpd5kHiyp3tTU/8s6r+4rC2vCmaQmLWJO0Ep65INJK2tbpt75298U2HLuiLh3oX/95L+0/kHUyvwTieiUJHVEimVzy1UKeWMqv2pCoKEVFRNXT1aHawnBx80eAZj7TwcxdAc5Gi5fiaNnNT37nCk4xaV/X1IRF2B94YHt63qQVaCcfePX2K+07fMU9U7qtHev+xE/7r3cc70O+6w1gxuV0dHZiusgvJS/O7IskRXLs6KCxqj+B26t9a3uUREWi4plbQlTFYzXvu+7tB3EIUGel/L6e3TNw5NS8zYAqldss4YvzBC9C7559drAja3qvDoyg6pwCP+KBZaVOPPjazS1vMLpQKE9fuPnawDB+EqehPwzWuAuSl8LPg90WVxhJJPWQCUmPBAWTBEz1TFUGpqO3wYYvIPgr2az35a2b1/50V6f1e1NTlVcvEzB0xRekj67usu5FmS2/crvQcaol/zeeObfTSOj91dIq28PxiaOHDx9quy8LtQxhcZBqIS0Dhkl2l/3yA4e2j1Qb2JUUD1Iyz1waOQib0vsxKXsAFvH3wMB0JySwtZC+DBPTN5BOCEnhrI1BuKe9l6tIzsVCiD6E0DOabrwI2elZ09aP7N3aNxjheXvK+a1OENa0EFYEyYL9rz072Ju03ZpNQKj7Xd899cKhNrA9LASvZTY/s9GcHoK0XsrakLS8UklLxyl+/rj+/Qfu2367sJNyTS7SuZfneO7ffweBGScu3NwAqWgrTvTc5jjBZmw87tMCfRXYKQWOgula4OiBOQUZ7DZuhrAGdQXxV0zPuCaGnkv3VPGHOpPw7+QPR62OM5HhdNddGOeX2kmCbSnC4mDlSStVTFr4eLljdHV+702vWz9R66Cu5HS5h5hmHvz3QiOxwJTRo2BGgY06dm7OVhewYGAY6s75oD+ZDs4JPY9JyqSCQ7ABqftd5VFM3/j2Ja4mtsWpJQSq6ZXu5UZTKeJnsHpohiYPRqBn04nkS2+CQWW59BK2dAjwS0Y4IHDz2ERWG8Gnwm7iK9W3sFmbvrqGPzw6gW8eTmvTM07XmTPX28KYd7EQ3rjnvv1QFHbPt3zT9DcMPHd+13zzN1s+/hC2rKOo7NjeQdsxT5LEWrYjbdLw05eHtwWe9jl0542u62HZHZIVpalY/yIlP5X3MHYddLLZfy4fmYiBhNuB509vw+rG3tKY+kOwGHLi7W/cS91jS7v4s9TSnZHGLx8CICH9lXNDX+zpWfXuycnaBV2e3e567nAm4973qv0bzy1fD5qr5oEB7KXt0u7B3Loh7yhWVfypbOalh9+wr6U3mbfklLC5Hi1pDRE4ef7Wj+EEiZ+amqpvJT2bzWjJRLIPR3n9riA5i4DZg720DSIrlsrvHXSZ9p7ZGlrzSgirNcetqVp9/vz5FJTqj6JRejTdq6eBMzNpHP9s//QrF4bvrydfO6f1JrCX1mvcXlo98Kembjotr3wXwmrnp36J+pYNeh5JdqRem83O77gxkpxtW3bgOZ/g1HKJmt3U1Rw+3D+zrc89aunagnWzpq6PdxujLz388L4F78tdbtCEsJZ7BFq8/sHBoMPX/I9hyrGgnuDUUZzrnnz7yQu3HlxQQW2Ued++fZmJ1e5LoPB5k5ZpWCPXz+08du+99zrtAI0QVjuM4jL2YcIZeh+2+9wF49MFtYJSlgmHE0g/JlLWLJQPg7RmhtyXsJ18eja0tivsXhj6xy9ve/mRR5TRcG2ZmjyViN9NPkDN3Dz1FW5z9XM4i+s1ME1YcFNpUIrVLHzJzHnwjl0bn1twgW1UwPHjxxPXpztejR0HFTc+F3YXRwxdfdM9W08D0zrs4wtLaM5rkbCac1xaolWOvurhZIPIih0OdVm2haNTfqUlAFjCRnJP4HBn+iUqz6tVa2nGpTe/etsP2o2s2G8hrGqjL/FlEQC5GHghfplSUSMdvwaEA/9+4vjpa3c2stx2KIsfUek2dr+EuXNF2xEjSJx98w/tbFt7NiGsdniSl6EPp84O3W/Z1oPzXRms1GRKWdCJdeCIlJ+vlGYlh997r+70+EPH8NHJEtLCauCph+7bmj81ox1xEsJqx1Fdij4Zxi9AT2KSYBrtslgxhOD2gWOyz7AstFzx6zFHj1mGobYUYAgC9cHge3ddK5uhjQKFsNpoMJeqK6+8cm0X6noXiWUxHA8WxAdWNyQM45HFKL8dyiRpueM7jllmMGpnjO+1w9fNaxmXxiogaqlR0jQdAkeOBPjczrnOiQ6jw88ESSOA6KT7iQzOHEvavu1pZsLQg4QPP/DdZG9Xx/vWrOr+mfR03SvtNffdxleAQIgvTzjBT0w409Mpu2faufZy+vDhw5WPMa25dEnYqggIYbXqyNXY7i/jCyvdfmaVb5hdVsLp9LJGp43j1/1A7/RdvdMwPRzEboRnLVHe9vEvL3eXBOB4ZMta22H+TiqV2LJQ26u5u6Bju44Z3J7O/Lvp6cwPmBanOwQ4uNHRTWMK21bSvh1Mm642nTWCtKkH07rnTE72aOO0XZq7bIltVQSEsFp15HLthg5J/+aJE12m3tVjOPYq1/dW4cTjHnwMYhXOce8xDd3y/PJW6OpMdsTRVy4iK/rKMR/jwvz825VIHFzT3fkx13UW/dnhRy3GJyeeHEs7n1XNibUPFvY6vtGDw5vV9w0Vofn81qGhZfDhi3HX8SfQ/3HPMse9CWcCX0gel2OIFJIt+2fRH7qWRaYJG85NxldGzV4tGayFSLQ24+q9ULyu9gJfMU5ELTn6wUISTl03NHz1KzyiJLqmX657OLLdSJgoXTO7cBxyN172blier4YCvBsFdSNXV2dC35tKJrbzfPfFdjwvC/qs9MSMxxNRsSqmT6LhUDQHE+jUBE7UnATXTuLsrRn01K2l/x6+qItiR3TNG8V59KNB0DGSfNXGUXwJY2Gm+osNhpSvEBDCasIHgVLTt75/aQ0MnXpBNb2QgNYEntfr4wu/nBYpKQLtxtdwAh0SBX3VDe7nM/Ha5vf1Fb/CURS2bCTAWWuxR229qRsbQQQbUed61LfW14JVKKsTJ5sk8WUcHbtlNANyTOhgcmAGKH7p3m1FWpqtuZCu+LByVdKHVMjpKEQrBwIW9tnpXOIH+QTDSH/D9f0bmCLewDn1I4HmwtAypPDZ/oe9oXKf/aMPsWxSs/RR13FHrURiZE1gDR86tKHEdCDMKX+XCwEhrOVCvqBeHNaW6ui11/mWDtLQ1kEiWodXE4rwYgepAPssTPCMOjIdAk94TZ8pMZjch8HjDorGFUTUAwlkh64be0A9/ZCatiDZWtOyE7ClQmIdJICJFYhA+TRV4Fo5/QIHiUvrTEbkVRCxiJfsSBbfYk87OTExXxdazY5yUgiRKfpHQ1YSkONmAZY+gV4NIeVFfCXoLNA5h/Plb5LzWAyzF+IVXdNnvO/6GcsyhjC1vmWZ7s2pO3fdOqzriy9asnJxZREoerDLppDAhiIAEtCfO3F5rW0a6z1PX4/nf53nG5RqqrpieSnULEVh8cx4E7ugH78H8tG9eP/24oVezY+pkpA8b/abhPF8le75BqdsXUtaFeaTlTI2IByEoU1l8oq1mkokcZHElIRoWmpejMMCMyCvQXyy7JjjuUcgOl4tLCzCMpTHgFpcgkViX/dH/ax2Szf8m2Yqc/MN+1r7BM/C/rfCtRDWEozSkbMjq7NTY5t13dqE6dhG3wsSqlp+C9DDi0ifLrqmT1f6BgUaPjiHN0lJAGAfvpWcI4XjiHIMF6ocO/EjmMa9HeelQ1LT1PRpoce/sJwOTCQtc+kfGQp6Uxl+9JWtmL+jNEaJ0gKBgbsygR58B4sHfwV5aliVWg3vCHv6ymHcdG868IzrVsK6pnd71+/dsmXxbD3m3/W2ybn0T1/bQFe5I8euX+9ybuqbXMPbDA7ZCKV4uMOecyz+9OfmWvj9x9zEw6JW+JuOX298WhE6qtwLEV3TL1tb/AWj7sqwfqaro/sdmcyM+vBp2XzzDEzaBiQsNH+e+eeTjQ+ohwqnG0BYhfVzNYKrkOmpyauYYH8KvD8G6RPBszrC6Jq+ystl0ghzXEZjR5+O4+iZwTh+eG7Yqa5rq/3hGzzTSkXKn4YgIITVABjBP+ZzP7i8ydasrZCetuCHvIvFRs92SEdlpnCYE2LOQi12OA7RNf1yjrphHIyE9yOXPnfNMDg70DpdTf8DWDKs5rRvMVwChAWrUgh21HzllD0NrigqlxKVC7bKQuOOWeGiuI7OTkhb6T8C/Xw3xkel9cXxj6eIxiY3Hhx3X9dHsWJwDaa3l1+zd9Mt/F4tUk/ijWnP+/DBb8++LWqvnh0c7NDGta0pO7kl6zpb8AJzEUr91kYEFdeBRCt69Nm4+AsSl6jwjVGckY6VwPwUpLhLURx9xliWvxFHi/w+zB0SWCnLsVpxnoXesSI2ngp4zmRJXPgf/0IleGH51R6uwjeX5MR76qtITh7+8N9Cp4GF7Sm8Zl1s35pVXVomm/5c1vG+Wm284njHJeJq44/FjixUAld8w7uijW6+xo3MhW2S6+oIVHumqpewglJ87+LFtcFUcqur+1vxwPcZJqYPMOyhXw6GKI4+4/GwQpjCBhe+6XDIpFb06PM+np5hhS5eXzw9bLJ2pBLGv4Fe36BU4kA6IQGw8MUY6MJywVeqDs54Z69zrWdY7jI3G1ZtUiSV6zzDI3IqLLew/wu9jspl+yywrA1pEed5QceXPT3jBb/DLrA5ua5UHZ/4eMTbFx+fwvE3DJO8fANrjlctL7giJhRx9MrfR89R+VgJ1Y6currONuwd0FNsxwtV02mPlWGLy1TxlPHf6Hh8PH9xesvw9yRM+5PIRT2ZIgVKKZxWUY/PT8aTFPji0i3m4Ed1hDWV/7uY9bNGtiGqAyorJRWSqCgdkrQiR5KddrwPlsq8xfhG6efvx8dvtiQczDdmmPaldDBxSVYeZ3GJXxUMWzxq5d4fPz7Ym7X1HTAL2A7NqtJHEQ3qtCPjw3LoxB/v+OMZ5VVzR5aHWRuErYA+y4uu6fM+Xl9J/lh7bFvbY+vmv0bWos9tsXAWSLIiaSnyApHxJz6SbFSFuXTw8i86r5vVRW1m+6IHmUREAuI0lcREP5q2ztWPrO9/YK54xsXHI56+cePvj3qBfimZNS+J5FWMcrjptThsRd4dPX9+DcwEd5iQphwozfkCwJKaLv9ewHYKeicfSudwShcnJDBBOD3MTwGRO0cqLIj73jQTaejDBYaPHTBgJ/i5+HyYijd95sFhRzkzB7yL2IrCtGwezj9nOQVTUlfPwiicifnu5J0qHHd8mXHIG6ZD7JQqIk9kJK6QwAokMWRUhMaSeJ0vcfaiXNhs7PyuwpYV51Vh+EM/Pu2M9GckpyiOuZm2Wvtom+Y4me8xPbvIIujzPu6Wbvyt1ejL3U7Sv/v754ZHsORwaX3KGdwiJhO5pzY+Mivk/urVq52jTnIXlEc78LKu8qAMx/G8kHhyOicosz0ovM3IrIDKb15HSvDoOoqv+hMLYCOWI8ash0vmufryZVcqLz4u8fym3ov1xT/EVp4UDUTn4/iS0xW+sZTMojASmLqGp64iH4FRXJQ2TKj+lv7JVRTVxwQkm9APyaboGnGMzSVR6VR87ipsVT645ovOzi5tamb6zzB1/nqzjz+s9YetwLioZW5C8jq08K9+1IxS8yQsfF6ap1WL2BK8VOaJc6NbPcPrx7wJ++hmHQUPvOaQgMJ3ETtVlERDP0wVsQ19uPgcLQyt/Dc+p4jlL6k/1xa2qVyh5ApEzEoErm/DsPOTXV3de6anq36roFyRdYWVbVSshHJEMt98saIXfIu9koplYZL6m/hUz7kS/Jt0/PE8+Jj6X/Y6k+fv2tA1BKIvB/OC8WnGAmp5dpqx3XW36fjgYK/upXbhFd+BrRlqn16MfkrspkoC4hnirYjbUVWzs4rHx8uL3cerjwt0TA4RcBcsuX8Rn97q54okVsCKJJ9YkSvy1gJR4aOtnAr6OJP+L13d+BKBKMEzHhAfgDh6yzD+vqHjTDDvYpAxLqwEfVdbE9bpIEi6V27tdLP+LnzPrWS/XrRTnz5d4e79+LNY7r4kP+Z7Jv7z1LyPL0B4Tb+ci9cXLy+eJ54e8Rw//rqqcUR+HOrgYVprJbBl5E2w63oI64J7k8mUDZLGhmAXs19ucVkxP8gKQu4ptCxbMy2TW3KAGI4u1P207ztH3CDx/7bL+Cdse8h1Zy5ev7Dp8uHD7blJuy0J69TV8XW6l92Dl3cbLG6g98idbhDgdANcY1ZY9o2N4mpNr96GRf1Da3Wui0RW69F1bWslvp81LD2xDTOGu9DhQzBc7AcYfYlkAqo6A6ozqHNBYJTESGitTGShsp0qQSxT4AcoPJQw0LBlEPhBFakHDjoLvY+XgVIyg7WK77tG8n9pvpHXBbXL+OMBd7FN6KLu+uf27esbX9RHdIkLbxvCGhgYsDb3v2a7obt7YHakpKmYiqgE2ioqJbzIOszXcSov/DAzRRNehyJKvPx4+igv/ZLKEaCkoZxUFMYXE1I8f7Xyq/UHp9CkAlfbCF3NdlhS7IQguA0N2wiJYy1ktC5IISb1Okr5jSYruy2SGlYkIkKLSC3yy/WrUWGzSnjaTUX/QEhYQuNewLCdwBFKRkpOuAfr4sBnwwfDg6B0MHagORhBHNqHw5WxTwYav6lAt/42MBLfrYZXHO9w3Ftr/B0Hp0pY+tkD29ddAz5ln8NGjddSlNPyhHV8aKjbzAS7Dd3egRcvgRHJWyrHASw9Pyp+vlSxEluH0jWAGQF9VVZMpxHVRZ/xSKQU4PR5Xy0+/sLQZCFS9DN/XKtSeh5WrL2x+sMyZv+W67+vwz5eC7oDx12rm9pakNg639B68XL3Qh+2Bm94DySxHhg0daBHSQhiCbyyyMS9SDi8RhEHyYP1qD9qak0S4VGn5VYrSTRKEkKHWYYiHuQmCYb/YKYLqS+3H5LYckxJmz6qhSYJ5yNgzgtuclESpncBfN8Fj3lgJdCSGpHcGECoxrouMoHjzO+4evLLMB1VKxJV8Wyj8Q80Ix043jnTu32hlTdkh08Yn7UWcnio9Qs3pzZm0lN7LCOxIdIZxbuQ1+lAVFFxJB7aMeUIiPkiPRPjo2v6dPF4FVjHnxi/oQK0Az/bymf5uI7ayGLj6eM63nrbF5VNXzV7nv3HViQL3JAEaSV1z0iBNJIgJBCYkSKJYbdjEiSHw7a0BI5s6QBBbINUswMUsQ6E11UojZGccA9dcZDBdQY+TgyFTgkiEKYyIBvstAQzIRk8cBJ+A2j4gZFDFWAqjAp3V5IhQYYwwUJ57ByS0QINzMYK8FyrRxt3KNbXb2qG/UVNT5wDyCt6/A0boGbdqzPA4tD21SPquWihPy1FWHjQzYs3xnZkM95ePIZd8RccBx1xez/UPowp46I4+uVcLD9/8Plq0Gfy6Jp+uez5uqPyY+UtNN5DuVQc06drpv4bIDXsjtsMpdkOSC79QK4Xog3PzwF4IBNCBiIhpBSpoE8jioqWaM2KCRuOqwLXgIQItKIe0lCYD/lZjoqgGIo0+J++SsmMKA8eqQ21qHuUh2PfzQHN6vgG6vVK8GfmQhcbr3Yff+AEi3rtdCtNF8u/eIWD2ATXx4Mg0XH1Vr/hm7sDQw8PvyvTrriKWocEE0C6oM/kJRJHrAykgj6WGlq+JUifu6YfS6pu4/UVa6AgQcXKi78ApekhcWFBwMstEkTX9MvVHw+Lt2ex+4+Pg62CxgsHEwZbAdgWIJfA+ICkfDRYtyAwWWB7Ay8F8VT/KB0bOJ4Gx/CQfUKSwZGrJJs8iZHYgB0zMB+zk8hopQ8hEcEog2ERASIBAOL5fIrVIKLxXKtzKPZLgZUckvGf+/nH5HsK0+Uz3316zeAjj3D23Lwu90w0ZwNpiZ72UnvwfO/AXIFnXfLBxLOsHn6yiLqmr3oQ04LHX9hq6TFHI6txrlYWkHj98UT1lh8vryR/rIKq6aO204drdP8hRWF3itmLUw42QnW1CSTSA2IAIXkWOBYKLWw8wjVqNkEaFqjFwLQNJhWI4ZiFoiq6QX0SbsEo6HMoWVFCYprwjw6FP65BXCSoXJwiOwpnFK9A6yiWkQhRDwA9XAfpwLS/AqnqSKP7jwapquiznXFXMn6x8Yg/X/HySvLHKqiaPlZfvf0H6BloAM/v3tpzHkJwUx59Uxb4GE5Lfnt2ZGS16SX3+F5mq4llfegtwnaSR6J5EC8hPUV6IDaS6aDnoZ5DpYe6AtdgOr4pyhXLNPH0KKCo/DDP7N+S+mI6qHzbQr7AbdgW+iylWn0l5cf6E29ftfSN6L9lGl04x30tOtMHklmLhxpClW9BL4S1T+i2uNPRp+0FflD0AN9A9LHnmHGBBfJCE3QL9ALiguoJqiu+64gDzWGIIAlhzhaSDsMV/yjJi3BxyY9khP9BXBSzEMY/AFORGMmM1yyKZfmm+ZKuJf4uMHV1THEj+o+S864E7zYd/8Dliqp2MamvPbt9uw4dY/M4DnXTuMuXx/scK9iHLcbryzfKwvOJBSGNPl10Tb8WV0xYyMFymDdXXv46Kq+ueChJQI4WlSUqf8StOf5CNdXqr9afxe8/Gm6AoLAqGKyCGLSG350ACFzKM2FvaeOseEhFOsjItdQ2S6wYYmkOdl2+CfLBvmpIV55vYY2Qn6uAxAWC40zbhxSmWArcQj0TSIiSU37mx0kgVesgLereOSz8E5EWJa6Qzyh1hZEcO7xY4Ct9WLfNvwa+5xA2h6uGP6vMPxMsZ8WNf0Gf+cOCw9usq51a5+kNG9Sn1IjJsjoO0LI7EpVra/vxhPdFs7JyjYriohlbTAKGxO1C6oJEljseOLqmTxfPX66OucJK66OUNzuDjK7p05UIbGwX25I/vrj4BYrnD0uZ/Rtvfzz9fPsPIkgkbL0DZNMFRVEHFEY2ZCBTcwMLdfCsCCVN4SwpE9YG+ARNgD24IDHYSYB1yNCYDkLRFoC8oOUG40AKQx5IYyAmlQ6SF7dDoSof0hbJiApzqLs43aPc5UG+AvVQ/4T7nGQFQiJ5kdbAkmgH2Sz0FaWB4gLrad22v4nmuvPt/yzCc1+V4t0e4z93r8PYwDCvNANxLSthkai0jmCf5+jq6y6Y4SkjTfoKprgWufj9Dg3AozBmiK7pl3H8WDH3u0YfLY6u6c/HVS2vSvsxoygyTF2q/qNenEyjJ5NJPYGPRidME1M1/JYqwyoNq32Ihu4J0z5M+WA2DoqwEI9wfmEaEhQJzPNsKNOh0jJwrfRVJqbnNOrC6IGwQFzgHiKrpCuq2kE+FizrMXWE7IWCEKemg7hSiimOQchNIC3EchqpHlBO95TshQThkwF5TL9k+Mm/MZLGzVo3AlQdLzagDle1vCYd/wU9/5Z5ZcyZPnNow/J8ZHZZCGtsbKw3rdn7nIzTx42o0WfP1cPKuYJ6XPFs5q7p8zmKx5v8cdcxDeMPOR1fj+gh4X10TV/dukiC+nJPeLy8eH1hrtm/UVvpKxcrP2oL/dlcs1eQ9PCeo73wGcp+R2Xyvlp74vH19B9EkoA2CYKUlcQqJCQj6vkoyBjh/IurcJiy4Zxy2FMptRBO7sK3kClR0UYUZAX+wMqfC1ICiYHMYBsKSQsSFKaAUEqZLoiK00ASFsgpN0UEUWE6yOkiiArE6NmUb91OWwAAEuNJREFUszCNxA0c/uBoF04W86YOarWQAYjGmHBBEIkUiXEqib025hNmInWknv6zKo77Sh3/RvcfSx5Xl4O4yr5Y7NxiuEEQFT4uvs8yrF5VvosX28LLS185vsiRHkc9YPiJtrCbJIzHyx3gJdfpl80flZWPR6qIxJghus7xjSqj4E9UNn2VvN76Csqq6XIR+48OYEeGlcAaXhLfQwxNQcgQEI9IErOOxBUuCuDLz9Arm5iyOTaYy7Jty8hAb2VCm43ZmwnwQTbgFpAWyA4SGEKhaMdgYNpngKAcpeMCAfFjYGE4yAqco3RZ0LorUqOkxVkf6AgzvFBPFbISSsOUD+WRrWijpcwbmI4Gomj4yxAIv4bPVU+q9sfxk/EP36UlfP49N3vNWr/m9CZdX/zzjDDofAoW3XHVr9NPHdB8p2+uORl/mjFLUktMbBTtkSJbpLCRxYyD5OpJps/4+DJuvq5IIgoLqfi3pLzcRuloM7QSzKImsBSWG80LVKkxkSvOkFHaCjL5QvrPN9rwvaSVtEg2ICmQCNRQkGjwnlOpNktMxdds+GxcRFrIyCmhTQMEUJjl4qwtzPbAOVC8o0DUZroGiMmBpEUfRBZ4DvRUJC4/1GOpij1ML9XU0PJdFxIZGsOpJkkOQ0YdFh5CPodKl0WfRqQkVUhTIEf1iN4GkdJU4Rx/xsJfHkpfMv4cd+IAUJb1+YdkfSU7NXp6+/bti7qquKiEdfVq0Gl2TO2DonYzAcUTCv0slCB8FuGia/q8j7iAPl30aNIPHVKq55w+00MvjFLo05WmV8H5P9XLzydVF/H0xbGl9UGfjm226B98po2u6fO+0f3H9M7SbT1h+FoS00ybSmm+5/RZHxzbwWvVHtSvNuLRR4BKl0vPtHRhWh1SESUsNBkH0qjvNiAx4MA1JDBc4yBmTPmwJArJCFM+dA1SE5XsmFIqRTzKUrZYkMio78IUkauFoW6Mcbin1GWrOR8nqOEUEUQFmuK3ZdEw6NFg92s9j3XLp0CIsAuS8VdPkcKhCZ9/KAc81x/c3NdzFjy6KHZc0YPNh7VhDg9jYnh4co9n2dvx1nLalys7Rimx2xLGigfEJBQ0Xr149FkBVb04BQiTlPAFbTiDxRGKM1pJf5AgarPKG0sQu413N07hkCANO5m0fSebtCwziW5DqMISHTRMJCDF23inYbmsauNCHq+Vn1ta5dErzKN8psP/RiIXVpAegKJQ30Y06AQSEXdAIpdL0wbTNsLpoSIeCwRJHZYBpTusIFAIlPC0iqL5AxoCcmLPQkkLdITRCc0dSFqQD1A51g4pLOXmhZCwDMO2BpH9q6ZtDoU4oKQIy5yEynFnv+mzw+0+/q3Sf5yT4aYs89zq1alLIK7wYeQANcCpgW5AOaqIARzxcudrXrMTz+cuFAxBI1Rw06eLKz3xsnDikt+Mmr9mWBlXrbySeJAlTt8MXJImXHRNv0zx2GpWZ3r0KKqzXHlRHH26+fQf+mkbg56ADjppUuihMJl7BEhGtmnj+4Phj1lEUAzjaQcgJkzcqPPmlI/yjdJV8Trf/+hbeYyP0uMS0zSVF8SEaSELxkhR6a7IC1IVHkNMBWEkCljxYQ7YXgWKrDCHw2ohJDDKSkr5Tst3TANBp7DdgkTFKSOpxYMtV2i3hXQoJjwbBo3L4oibAajdXmSbCl01PEvi6x3PetMvwfi3cv+xHpPRk8GZvo6Oq5y5FvZlvtfqQZ5v5igfH7iRdHqrn/H24McyEb6ejCUxkCwqEATi8JDNKtWRIxI6wrLj+aOyQgIqLT/KTZ+OLYnCFGHE60PdSgzIgVmcfrbt5evjYkB97VeNyv8plx/UYoChElhYgB7KtD3PAUWRpejIVNzNAjNzyDuYRqnrMF5dIx4CkTrlAJQRps2FhZIX5lqYwfFLOygTBeSmkUhDEgNvIC7MR5ML6JhozoCpn+858G1utbH4j7BRT0Z9VlZzbTyOKJCKeCjkqYbkFBJh+DXCPVcKuXKIFURlm8WBoZSFOBCYmk6i33ioT+Kw1CegEMspcFfe+M8+rRySNum/YUwm9I7TPT04NWOBDg/nwtz16xMbEp3mPswIOuI6G7wBSlynz1pQWZEIP0smIcEEWN3QsfJDn+nj9FFSPh73wilgdE2f+eOumo4pPqWI2kI/LKu4RVXLq7H/kJopRUFhnkj4joNT9KC/BlZgAIVD1I+cwASVUBgCIsF1KEQxJLpGPKHGP5LYrAs5ikREnmJ61KF4K5cG1+REVS6HC1JauGroYYcOrLWUEp6MSF0UpoZgK5hV2dgEzeNLYbMBnRQZEUPnOwGMT6GOp57Kg/0WTCMYjnsQHpDmlJFTR5IcNt/alvV1PdF5NsKcLSpGG03L6QcjnWDpeIXqgFYb//A9wGi1+fMPDeqY7nae6uvT530KKp+JebkhHJyX6Fqz33X83tCgRr1d6gXBH+XnFtEwDmEVMBfAtbK7UvHxVTb1gGLQokbFVBZMDtUJHmT+dsPxmqSRU2nkrxkWxhfbOfEVwLov4sIaonSRr1qZy6vy8xliPbn+qPjYHxSm6mJwdB357DfaVtJ/BMLeW0/ayVQSR6TA5AB7h8kwmFeRrFBUSFYkJk7GsM+F5SuiCQmFBEriCskHYcxfEM9ozBjBS/yaKD//rBzndjD3BHswAcmqwFdhOWGugCw5owwpEt9sxMlVGWQEK4GlcAOi1XAcL6eLICfdcMFmNDnH7xdO/YTCHTkxM2B6EiSPbuXmHrZO5eJy4Iu6lfo2Gu8orFfA+PM9UMjnHpBIx9v+/Q9Wm8nMfcMTE1d7u7vP4Ec6fzy1wqOGP3xI63JHjgT2/rsy/boTbMP0pe78dVUWS5wjK0VUjIqNN3kA62ZYeIcfxofXDFNFUZBTT4W6m71mWBlXrb4yWSoEYWh0jVIUdJEmzA6o18mRDN7dCplCEkK8IiP4WRAU9OO8j5wimZB3SAhKYlJEphLkJCaSEP7PEdxsfVG5UWFxP6qPPngTlvBED6IWLN8dTPmg8ocFPPRXWBdlFWqqCEmLlhAgLRtKdLaAkpQNfRUM6DUQGOUiTimNEaT7FvRVw/F6K91XG4/mHf9KPaovvJ36jzfSS1mpc6mUdhnvhZL4a0GjZsKBKK+n0+kt0AHvztCAsIzjeeAeUKVPF1l101cBWCICxcGmcPalUeHRnyguIsJYej79fFnpKxdjrKhu+spVK69Ke+OW6SXlh7Xk/8b7D5umJKY6nUiQAEmp5ZKoD5Ay8kTFzcAsJIrL+ZREYCWAaU4ubXRNP8wfpuSuGubHMwCJhSuGPCiYJIMw5GV6xkfY0Wd+WoPiBAlEhvnzNluw3SKZYTkQHIQ5J1RQDg7Lw/QQGUIdFp4wcC9KgQ/7KkxjucEHROVmc3ZaCFfEjMxUvlPvBZ0WhT1Q1zG06hQKyGPA9qEh4bPRJuO/0p//WvoPyXpa77BPr9L1mn64QiJRT0vlP3jg1oyn0/th1dnN6VOkQyh8wVRuPpLUH9GHi+sckD4vLaj43NSHLwfv8cKjbGxdgc97JUpFpIRbpovKYHTUltkpHYkyEqNYf1gWfZU+Vn+JiMZERS4qKyTAMv1hmwoItLT/aL6OL9cn8A4mknhDkR5CUuh43ExhAXjnIQVxRQ9UwnU1JM73meHISINzlY/1Ir3jwNQBtui5IpU3K2mFZbEUEhgJiHlZhkqI8rws7hPFxBHlZ5romu1CGRSv2HyQEQiLPkwefJcSk2o0mU+F8Z46KswbKd8qvRUWiq7BsuoYlF/q+Jd839p4/KNnFHhw+Fbc819r/y3dHO7qsk9D2lLPBvEq59SLXC6CYSCq1OTk5F48g+FxLyQSvvyzhFK8taaYL1ACiYdkkSOg/HVO4irmAySLlR8+yHy5wnaWysTF7YmnRxdyecMXFDcxx3KjNCUEGUtb2r4Iixwh5qebxEG58v2Hkh0ERqlLp5kClNLkngLSyF8XExrZi089SYbFm9DRg1FCbEKyoxQE8sqFkTOgTwrDVIPCP/k8qpRcGrxMEXmxnpwjUeXbhjpgA2bBNsp0HPQWOiwNOnddw5YcNIdSFyzTlUKehEbrLDxDNn7osjCXPw5FO22qgPfKHn/pf8XxxxetvSvYlX8BxBVKCdGDmPPDhz0W+Oijjxof//jHt+Hh2oko/qKqFx4l0BJQmQIwS3RNn/fxZXqGFbq4nQzimI9tKFs+S1S1KJ9XoQkEfUQwtKg98fSzefMMwmx5F28/IqK2RLjM2b54/gX0H0v6+IiDZSVgHJogfYWNzDMUpCtsUkKg4pKIUJAsnNTlkjNWzfBCPMOhi8JAiCSqPBmyMFVQ1OdctQwLywNZ5cPCpDl80D6IhjzBASQF0sUeREpSJCyE4ceSpJXbEO2612AHepaTSRn/YrtEAD3n8xV/ntv4+S96nyGRO9gccQZmEPiBK3bRi5kPHcG+v2T32n2+53bxNY8oQyWIB0SR9OmqxMeTh5lm/8azx8srEbCQNSqTpUTX+eagwCiPqiWeQAXO/olHV2tPaYUFjWCxsQJjt7MV564K6iOB2Xj1adNGa3PqDMFl4XwSSnAQCUIibqFPlwtTwbiOkoSR+JvLx3KYv9BXaSrlLyifSegQBNMFTAWhiIeFArRZnoX+8Y2EzKhbnuNlYO9wFpZXkwoH5Kmj/6qOFTz+0n8+Y4Y/2pVIcJqY35+YJ6wjEN33ZzL9kPY3hWjx6Sv+RcByLIQAZZYQJSn2C944FRF/QkvjQ31XZDcV04GVPOGl+WdJEhVGbaNPV3d7Va7ZP83U/1ACgzTjkg4gjUFvHhGWkrPAPnnBLNeFSEKKfAbzOu9yBAUdVj6cZURpZuU3XOUILioD93x2IEnxxFGc9c6M+M93cHSNZVzHquBQDeMn4x898wQ2us7pgGvAbyU8/z5e5EupVEqtJirCgp4KHxVI7sbrQIYKHyKF3+yvIvEEX8FsQNk9qXwgBpgQwNo7p9OKrukzfdzF08+WTmYrV35YF+tU8bEpYImInGtLVH+8PkzZ8iQcVpjrawXCLOHH5uo/9JmWjbXHJMQcNhVW8bOklbsumnJw7Q+cgtVK2mJxAUNNKKncp54KHuzAwnjCE01B1UIHA1A80ik/IkdIfTj6mE8MXh2sSKZhdHUd+IcDykwFLj4eMv7Fv+il75c8/xEmeHaojD+jZ4LgbsPVVvO5iutg4oSAFCCiAqVp/jrUKRU8mzVexsube05ff3tiD0Q1wkP/ojrYgeiaftiheHsjLKL4GrudTxYvb0H9h94bpzeAwCD4cAqJf5SmlBjFH5D8ChVC1Q8KyIkrjtgbE64y4lqtINJHel5Hq4q4ZdsYzsWBWaU+rkFWtFzQbiNNnWciNbT/qD4+Hitq/FdE/3mWzmvQU+W4hZZPenQuRHRNfylcvfVjpUqz0Tj6dNE1/fm4euufTx1z5am3/hr6z6lj9A9ElneKwPJ3IYEVEpqKys0YFeUhoDBP4TV/+bjVIkfqKuu8/ixC/+tqR73111V4DYnrrb+G8a+h1tkk9dY/m7MxV7XUzwdP3ApBgCYG6Co+L6/+kcB4X0g0ERFFzwXjojBc5q8ZhqOKtWEoROmLEwSWBIHowVySyqSS5kIABEYhisRFEov8SgRWGD6K9OMgq8IwBIkTBBYXASGsxcW3pUoHgfF5iIiLPv9x+03kuLxMqaqsUj1KJL4gsFgICGEtFrJtUG6OwDhtJHHhqLOl+dBAG0AnXRAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC" } }; const NoticeBar = { // noticeBar noticeBar: { text: () => [], direction: "row", step: false, icon: "volume", mode: "", color: "#f9ae3d", bgColor: "#fdf6ec", speed: 80, fontSize: 14, duration: 2e3, disableTouch: true, url: "", linkType: "navigateTo" } }; const Notify = { // notify组件 notify: { top: 0, type: "primary", color: "#ffffff", bgColor: "", message: "", duration: 3e3, fontSize: 15, safeAreaInsetTop: false } }; const NumberBox = { // 步进器组件 numberBox: { name: "", value: 0, min: 1, max: Number.MAX_SAFE_INTEGER, step: 1, integer: false, disabled: false, disabledInput: false, asyncChange: false, inputWidth: 35, showMinus: true, showPlus: true, decimalLength: null, longPress: true, color: "#323233", buttonSize: 30, bgColor: "#EBECEE", cursorSpacing: 100, disableMinus: false, disablePlus: false, iconStyle: "" } }; const NumberKeyboard = { // 数字键盘 numberKeyboard: { mode: "number", dotDisabled: false, random: false } }; const Overlay = { // overlay组件 overlay: { show: false, zIndex: 10070, duration: 300, opacity: 0.5 } }; const Parse = { // parse parse: { copyLink: true, errorImg: "", lazyLoad: false, loadingImg: "", pauseVideo: true, previewImg: true, setTitle: true, showImgMenu: true } }; const Picker = { // picker picker: { show: false, showToolbar: true, title: "", columns: () => [], loading: false, itemHeight: 44, cancelText: "取消", confirmText: "确定", cancelColor: "#909193", confirmColor: "#3c9cff", visibleItemCount: 5, keyName: "text", closeOnClickOverlay: false, defaultIndex: () => [], immediateChange: false } }; const Popup = { // popup组件 popup: { show: false, overlay: true, mode: "bottom", duration: 300, closeable: false, overlayStyle: () => { }, closeOnClickOverlay: true, zIndex: 10075, safeAreaInsetBottom: true, safeAreaInsetTop: false, closeIconPos: "top-right", round: 0, zoom: true, bgColor: "", overlayOpacity: 0.5 } }; const Radio = { // radio组件 radio: { name: "", shape: "", disabled: "", labelDisabled: "", activeColor: "", inactiveColor: "", iconSize: "", labelSize: "", label: "", labelColor: "", size: "", iconColor: "", placement: "" } }; const RadioGroup = { // radio-group组件 radioGroup: { value: "", disabled: false, shape: "circle", activeColor: "#2979ff", inactiveColor: "#c8c9cc", name: "", size: 18, placement: "row", label: "", labelColor: "#303133", labelSize: 14, labelDisabled: false, iconColor: "#ffffff", iconSize: 12, borderBottom: false, iconPlacement: "left" } }; const Rate = { // rate组件 rate: { value: 1, count: 5, disabled: false, size: 18, inactiveColor: "#b2b2b2", activeColor: "#FA3534", gutter: 4, minCount: 1, allowHalf: false, activeIcon: "star-fill", inactiveIcon: "star", touchable: true } }; const ReadMore = { // readMore readMore: { showHeight: 400, toggle: false, closeText: "展开阅读全文", openText: "收起", color: "#2979ff", fontSize: 14, textIndent: "2em", name: "" } }; const Row = { // row row: { gutter: 0, justify: "start", align: "center" } }; const RowNotice = { // rowNotice rowNotice: { text: "", icon: "volume", mode: "", color: "#f9ae3d", bgColor: "#fdf6ec", fontSize: 14, speed: 80 } }; const ScrollList = { // scrollList scrollList: { indicatorWidth: 50, indicatorBarWidth: 20, indicator: true, indicatorColor: "#f2f2f2", indicatorActiveColor: "#3c9cff", indicatorStyle: "" } }; const Search = { // search search: { shape: "round", bgColor: "#f2f2f2", placeholder: "请输入关键字", clearabled: true, focus: false, showAction: true, actionStyle: () => ({}), actionText: "搜索", inputAlign: "left", inputStyle: () => ({}), disabled: false, borderColor: "transparent", searchIconColor: "#909399", searchIconSize: 22, color: "#606266", placeholderColor: "#909399", searchIcon: "search", margin: "0", animation: false, value: "", maxlength: "-1", height: 32, label: null } }; const Section = { // u-section组件 section: { title: "", subTitle: "更多", right: true, fontSize: 15, bold: true, color: "#303133", subColor: "#909399", showLine: true, lineColor: "", arrow: true } }; const Skeleton = { // skeleton skeleton: { loading: true, animate: true, rows: 0, rowsWidth: "100%", rowsHeight: 18, title: true, titleWidth: "50%", titleHeight: 18, avatar: false, avatarSize: 32, avatarShape: "circle" } }; const Slider = { // slider组件 slider: { value: 0, blockSize: 18, min: 0, max: 100, step: 1, activeColor: "#2979ff", inactiveColor: "#c0c4cc", blockColor: "#ffffff", showValue: false, disabled: false, blockStyle: () => { } } }; const StatusBar = { // statusBar statusBar: { bgColor: "transparent" } }; const Steps = { // steps组件 steps: { direction: "row", current: 0, activeColor: "#3c9cff", inactiveColor: "#969799", activeIcon: "", inactiveIcon: "", dot: false } }; const StepsItem = { // steps-item组件 stepsItem: { title: "", desc: "", iconSize: 17, error: false } }; const Sticky = { // sticky组件 sticky: { offsetTop: 0, customNavHeight: 0, disabled: false, bgColor: "transparent", zIndex: "", index: "" } }; const Subsection = { // subsection组件 subsection: { list: [], current: 0, activeColor: "#3c9cff", inactiveColor: "#303133", mode: "button", fontSize: 12, bold: true, bgColor: "#eeeeef", keyName: "name" } }; const SwipeAction = { // swipe-action组件 swipeAction: { autoClose: true } }; const SwipeActionItem = { // swipeActionItem 组件 swipeActionItem: { show: false, name: "", disabled: false, threshold: 20, autoClose: true, options: [], duration: 300 } }; const Swiper = { // swiper 组件 swiper: { list: () => [], indicator: false, indicatorActiveColor: "#FFFFFF", indicatorInactiveColor: "rgba(255, 255, 255, 0.35)", indicatorStyle: "", indicatorMode: "line", autoplay: true, current: 0, currentItemId: "", interval: 3e3, duration: 300, circular: false, previousMargin: 0, nextMargin: 0, acceleration: false, displayMultipleItems: 1, easingFunction: "default", keyName: "url", imgMode: "aspectFill", height: 130, bgColor: "#f3f4f6", radius: 4, loading: false, showTitle: false } }; const SwipterIndicator = { // swiperIndicator 组件 swiperIndicator: { length: 0, current: 0, indicatorActiveColor: "", indicatorInactiveColor: "", indicatorMode: "line" } }; const Switch = { // switch switch: { loading: false, disabled: false, size: 25, activeColor: "#2979ff", inactiveColor: "#ffffff", value: false, activeValue: true, inactiveValue: false, asyncChange: false, space: 0 } }; const Tabbar = { // tabbar tabbar: { value: null, safeAreaInsetBottom: true, border: true, zIndex: 1, activeColor: "#1989fa", inactiveColor: "#7d7e80", fixed: true, placeholder: true } }; const TabbarItem = { // tabbarItem: { name: null, icon: "", badge: null, dot: false, text: "", badgeStyle: "top: 6px;right:2px;" } }; const Tabs = { // tabs: { duration: 300, list: () => [], lineColor: "#3c9cff", activeStyle: () => ({ color: "#303133" }), inactiveStyle: () => ({ color: "#606266" }), lineWidth: 20, lineHeight: 3, lineBgSize: "cover", itemStyle: () => ({ height: "44px" }), scrollable: true, current: 0, keyName: "name" } }; const Tag = { // tag 组件 tag: { type: "primary", disabled: false, size: "medium", shape: "square", text: "", bgColor: "", color: "", borderColor: "", closeColor: "#C6C7CB", name: "", plainFill: false, plain: false, closable: false, show: true, icon: "" } }; const Text = { // text 组件 text: { type: "", show: true, text: "", prefixIcon: "", suffixIcon: "", mode: "", href: "", format: "", call: false, openType: "", bold: false, block: false, lines: "", color: "#303133", size: 15, iconStyle: () => ({ fontSize: "15px" }), decoration: "none", margin: 0, lineHeight: "", align: "left", wordWrap: "normal" } }; const Textarea = { // textarea 组件 textarea: { value: "", placeholder: "", placeholderClass: "textarea-placeholder", placeholderStyle: "color: #c0c4cc", height: 70, confirmType: "done", disabled: false, count: false, focus: false, autoHeight: false, fixed: false, cursorSpacing: 0, cursor: "", showConfirmBar: true, selectionStart: -1, selectionEnd: -1, adjustPosition: true, disableDefaultPadding: false, holdKeyboard: false, maxlength: 140, border: "surround", formatter: null } }; const Toast = { // toast组件 toast: { zIndex: 10090, loading: false, text: "", icon: "", type: "", loadingMode: "", show: "", overlay: false, position: "center", params: () => { }, duration: 2e3, isTab: false, url: "", callback: null, back: false } }; const Toolbar = { // toolbar 组件 toolbar: { show: true, cancelText: "取消", confirmText: "确认", cancelColor: "#909193", confirmColor: "#3c9cff", title: "" } }; const Tooltip = { // tooltip 组件 tooltip: { text: "", copyText: "", size: 14, color: "#606266", bgColor: "transparent", direction: "top", zIndex: 10071, showCopy: true, buttons: () => [], overlay: true, showToast: true } }; const Transition = { // transition动画组件的props transition: { show: false, mode: "fade", duration: "300", timingFunction: "ease-out" } }; const Upload = { // upload组件 upload: { accept: "image", capture: () => ["album", "camera"], compressed: true, camera: "back", maxDuration: 60, uploadIcon: "camera-fill", uploadIconColor: "#D3D4D6", useBeforeRead: false, previewFullImage: true, maxCount: 52, disabled: false, imageMode: "aspectFill", name: "", sizeType: () => ["original", "compressed"], multiple: false, deletable: true, maxSize: Number.MAX_VALUE, fileList: () => [], uploadText: "", width: 80, height: 80, previewImage: true } }; const drawer = { // 抽屉组件 drawer: { // 是否显示 show: false, // 点击遮罩是否关闭 mask: true, // // 是否显示关闭按钮 // closeBtn:true, // 抽屉宽度 width: "40%", // 抽屉位置 placement: "left", // 权重 zIndex: 100 } }; const props$y = { ...ActionSheet, ...Album, ...Alert, ...Avatar, ...AvatarGroup, ...Backtop, ...Badge, ...Button, ...Calendar, ...CarKeyboard, ...Cell, ...CellGroup, ...Checkbox, ...CheckboxGroup, ...CircleProgress, ...Code, ...CodeInput, ...Col, ...Collapse, ...CollapseItem, ...ColumnNotice, ...CountDown, ...CountTo, ...DatetimePicker, ...Divider, ...Empty, ...Form, ...GormItem, ...Gap, ...Grid, ...GridItem, ...Icon, ...Image$1, ...IndexAnchor, ...IndexList, ...Input, ...Keyboard, ...Line, ...LineProgress, ...Link, ...List, ...ListItem, ...LoadingIcon, ...LoadingPage, ...Loadmore, ...Modal, ...Navbar, ...NoNetwork, ...NoticeBar, ...Notify, ...NumberBox, ...NumberKeyboard, ...Overlay, ...Parse, ...Picker, ...Popup, ...Radio, ...RadioGroup, ...Rate, ...ReadMore, ...Row, ...RowNotice, ...ScrollList, ...Search, ...Section, ...Skeleton, ...Slider, ...StatusBar, ...Steps, ...StepsItem, ...Sticky, ...Subsection, ...SwipeAction, ...SwipeActionItem, ...Swiper, ...SwipterIndicator, ...Switch, ...Tabbar, ...TabbarItem, ...Tabs, ...Tag, ...Text, ...Textarea, ...Toast, ...Toolbar, ...Tooltip, ...Transition, ...Upload, ...drawer }; const props$x = { props: { // 是否显示组件 show: { type: Boolean, default: props$y.loadingIcon.show }, // 颜色 color: { type: String, default: props$y.loadingIcon.color }, // 提示文字颜色 textColor: { type: String, default: props$y.loadingIcon.textColor }, // 文字和图标是否垂直排列 vertical: { type: Boolean, default: props$y.loadingIcon.vertical }, // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 mode: { type: String, default: props$y.loadingIcon.mode }, // 图标大小,单位默认px size: { type: [String, Number], default: props$y.loadingIcon.size }, // 文字大小 textSize: { type: [String, Number], default: props$y.loadingIcon.textSize }, // 文字内容 text: { type: [String, Number], default: props$y.loadingIcon.text }, // 动画模式 timingFunction: { type: String, default: props$y.loadingIcon.timingFunction }, // 动画执行周期时间 duration: { type: [String, Number], default: props$y.loadingIcon.duration }, // mode=circle时的暗边颜色 inactiveColor: { type: String, default: props$y.loadingIcon.inactiveColor } } }; const mpMixin = {}; 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.$u.getRect = this.$uGetRect; }, created() { this.$u.getRect = this.$uGetRect; }, computed: { // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式 // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大) $u() { return uni.$u.deepMerge(uni.$u, { props: void 0, http: void 0, mixin: void 0 }); }, /** * 生成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 = `u-${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) { this.$u.route({ type: this.linkType, url: url2 }); } }, // 查询节点信息 // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21) // 解决办法为在组件根部再套一个没有任何作用的view元素 $uGetRect(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 = uni.$u.$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("uOnReachBottom"); }, beforeDestroy() { if (this.parent && uni.$u.test.array(this.parent.children)) { const childrenList = this.parent.children; childrenList.map((child, index2) => { if (child === this) { childrenList.splice(index2, 1); } }); } } }; const _sfc_main$2w = { name: "u-loading-icon", mixins: [mpMixin, mixin, props$x], 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 = uni.$u.colorGradient(this.color, "#ffffff", 100)[80]; if (this.mode === "circle") { return this.inactiveColor ? this.inactiveColor : lightColor; } else { return "transparent"; } } }, watch: { show(n) { } }, 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$2J(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]), style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]) }, [ !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]), ref: "ani", style: vue.normalizeStyle({ color: _ctx.color, width: _ctx.$u.addUnit(_ctx.size), height: _ctx.$u.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: "u-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: "u-loading-icon__text", style: vue.normalizeStyle({ fontSize: _ctx.$u.addUnit(_ctx.textSize), color: _ctx.textColor }) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0$f = /* @__PURE__ */ _export_sfc(_sfc_main$2w, [["render", _sfc_render$2J], ["__scopeId", "data-v-2af81691"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]); const props$w = { props: { // 轮播的长度 length: { type: [String, Number], default: props$y.swiperIndicator.length }, // 当前处于活动状态的轮播的索引 current: { type: [String, Number], default: props$y.swiperIndicator.current }, // 指示器非激活颜色 indicatorActiveColor: { type: String, default: props$y.swiperIndicator.indicatorActiveColor }, // 指示器的激活颜色 indicatorInactiveColor: { type: String, default: props$y.swiperIndicator.indicatorInactiveColor }, // 指示器模式,line-线型,dot-点型 indicatorMode: { type: String, default: props$y.swiperIndicator.indicatorMode } } }; const _sfc_main$2v = { name: "u-swiper-indicator", mixins: [mpMixin, mixin, props$w], data() { return { lineWidth: 22 }; }, computed: { // 指示器为线型的样式 lineStyle() { let style = {}; style.width = uni.$u.addUnit(this.lineWidth); style.transform = `translateX(${uni.$u.addUnit(this.current * this.lineWidth)})`; style.backgroundColor = this.indicatorActiveColor; return style; }, // 指示器为点型的样式 dotStyle() { return (index2) => { let style = {}; style.backgroundColor = index2 === this.current ? this.indicatorActiveColor : this.indicatorInactiveColor; return style; }; } } }; function _sfc_render$2I(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-swiper-indicator" }, [ _ctx.indicatorMode === "line" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-swiper-indicator__wrapper", [`u-swiper-indicator__wrapper--${_ctx.indicatorMode}`]]), style: vue.normalizeStyle({ width: _ctx.$u.addUnit($data.lineWidth * _ctx.length), backgroundColor: _ctx.indicatorInactiveColor }) }, [ vue.createElementVNode( "view", { class: "u-swiper-indicator__wrapper--line__bar", style: vue.normalizeStyle([$options.lineStyle]) }, null, 4 /* STYLE */ ) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.indicatorMode === "dot" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-swiper-indicator__wrapper" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.length, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-swiper-indicator__wrapper__dot", [index2 === _ctx.current && "u-swiper-indicator__wrapper__dot--active"]]), key: index2, style: vue.normalizeStyle([$options.dotStyle(index2)]) }, null, 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]); } const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$2v, [["render", _sfc_render$2I], ["__scopeId", "data-v-7b7c7ea6"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue"]]); const props$v = { props: { // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名 list: { type: Array, default: props$y.swiper.list }, // 是否显示面板指示器 indicator: { type: Boolean, default: props$y.swiper.indicator }, // 指示器非激活颜色 indicatorActiveColor: { type: String, default: props$y.swiper.indicatorActiveColor }, // 指示器的激活颜色 indicatorInactiveColor: { type: String, default: props$y.swiper.indicatorInactiveColor }, // 指示器样式,可通过bottom,left,right进行定位 indicatorStyle: { type: [String, Object], default: props$y.swiper.indicatorStyle }, // 指示器模式,line-线型,dot-点型 indicatorMode: { type: String, default: props$y.swiper.indicatorMode }, // 是否自动切换 autoplay: { type: Boolean, default: props$y.swiper.autoplay }, // 当前所在滑块的 index current: { type: [String, Number], default: props$y.swiper.current }, // 当前所在滑块的 item-id ,不能与 current 被同时指定 currentItemId: { type: String, default: props$y.swiper.currentItemId }, // 滑块自动切换时间间隔 interval: { type: [String, Number], default: props$y.swiper.interval }, // 滑块切换过程所需时间 duration: { type: [String, Number], default: props$y.swiper.duration }, // 播放到末尾后是否重新回到开头 circular: { type: Boolean, default: props$y.swiper.circular }, // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持 previousMargin: { type: [String, Number], default: props$y.swiper.previousMargin }, // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持 nextMargin: { type: [String, Number], default: props$y.swiper.nextMargin }, // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持 acceleration: { type: Boolean, default: props$y.swiper.acceleration }, // 同时显示的滑块数量,nvue、支付宝小程序不支持 displayMultipleItems: { type: Number, default: props$y.swiper.displayMultipleItems }, // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic // 只对微信小程序有效 easingFunction: { type: String, default: props$y.swiper.easingFunction }, // list数组中指定对象的目标属性名 keyName: { type: String, default: props$y.swiper.keyName }, // 图片的裁剪模式 imgMode: { type: String, default: props$y.swiper.imgMode }, // 组件高度 height: { type: [String, Number], default: props$y.swiper.height }, // 背景颜色 bgColor: { type: String, default: props$y.swiper.bgColor }, // 组件圆角,数值或带单位的字符串 radius: { type: [String, Number], default: props$y.swiper.radius }, // 是否加载中 loading: { type: Boolean, default: props$y.swiper.loading }, // 是否显示标题,要求数组对象中有title属性 showTitle: { type: Boolean, default: props$y.swiper.showTitle } } }; const _sfc_main$2u = { name: "u-swiper", mixins: [mpMixin, mixin, props$v], data() { return { currentIndex: 0 }; }, watch: { current(val, preVal) { if (val === preVal) return; this.currentIndex = val; } }, computed: { itemStyle() { return (index2) => { const style = {}; if (this.nextMargin && this.previousMargin) { style.borderRadius = uni.$u.addUnit(this.radius); if (index2 !== this.currentIndex) style.transform = "scale(0.92)"; } return style; }; } }, methods: { getItemType(item) { if (typeof item === "string") return uni.$u.test.video(this.getSource(item)) ? "video" : "image"; if (typeof item === "object" && this.keyName) { if (!item.type) return uni.$u.test.video(this.getSource(item)) ? "video" : "image"; if (item.type === "image") return "image"; if (item.type === "video") return "video"; return "image"; } }, // 获取目标路径,可能数组中为字符串,对象的形式,额外可指定对象的目标属性名keyName getSource(item) { if (typeof item === "string") return item; if (typeof item === "object" && this.keyName) return item[this.keyName]; else uni.$u.error("请按格式传递列表参数"); return ""; }, // 轮播切换事件 change(e) { const { current } = e.detail; this.pauseVideo(this.currentIndex); this.currentIndex = current; this.$emit("change", e.detail); }, // 切换轮播时,暂停视频播放 pauseVideo(index2) { const lastItem = this.getSource(this.list[index2]); if (uni.$u.test.video(lastItem)) { const video2 = uni.createVideoContext(`video-${index2}`, this); video2.pause(); } }, // 当一个轮播item为视频时,获取它的视频海报 getPoster(item) { return typeof item === "object" && item.poster ? item.poster : ""; }, // 点击某个item clickHandler(index2) { this.$emit("click", index2); } } }; function _sfc_render$2H(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f); const _component_u_swiper_indicator = resolveEasycom(vue.resolveDynamicComponent("u-swiper-indicator"), __easycom_1$7); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-swiper", style: vue.normalizeStyle({ backgroundColor: _ctx.bgColor, height: _ctx.$u.addUnit(_ctx.height), borderRadius: _ctx.$u.addUnit(_ctx.radius) }) }, [ _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-swiper__loading" }, [ vue.createVNode(_component_u_loading_icon, { mode: "circle" }) ])) : (vue.openBlock(), vue.createElementBlock("swiper", { key: 1, class: "u-swiper__wrapper", style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }), onChange: _cache[0] || (_cache[0] = (...args) => $options.change && $options.change(...args)), circular: _ctx.circular, interval: _ctx.interval, duration: _ctx.duration, autoplay: _ctx.autoplay, current: _ctx.current, currentItemId: _ctx.currentItemId, previousMargin: _ctx.$u.addUnit(_ctx.previousMargin), nextMargin: _ctx.$u.addUnit(_ctx.nextMargin), acceleration: _ctx.acceleration, displayMultipleItems: _ctx.displayMultipleItems, easingFunction: _ctx.easingFunction }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { class: "u-swiper__wrapper__item", key: index2 }, [ vue.createElementVNode( "view", { class: "u-swiper__wrapper__item__wrapper", style: vue.normalizeStyle([$options.itemStyle(index2)]) }, [ vue.createCommentVNode(" 在nvue中,image图片的宽度默认为屏幕宽度,需要通过flex:1撑开,另外必须设置高度才能显示图片 "), $options.getItemType(item) === "image" ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "u-swiper__wrapper__item__wrapper__image", src: $options.getSource(item), mode: _ctx.imgMode, onClick: ($event) => $options.clickHandler(index2), style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height), borderRadius: _ctx.$u.addUnit(_ctx.radius) }) }, null, 12, ["src", "mode", "onClick"])) : vue.createCommentVNode("v-if", true), $options.getItemType(item) === "video" ? (vue.openBlock(), vue.createElementBlock("video", { key: 1, class: "u-swiper__wrapper__item__wrapper__video", id: `video-${index2}`, "enable-progress-gesture": false, src: $options.getSource(item), poster: $options.getPoster(item), title: _ctx.showTitle && _ctx.$u.test.object(item) && item.title ? item.title : "", style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }), controls: "", onClick: ($event) => $options.clickHandler(index2) }, null, 12, ["id", "src", "poster", "title", "onClick"])) : vue.createCommentVNode("v-if", true), _ctx.showTitle && _ctx.$u.test.object(item) && item.title && _ctx.$u.test.image($options.getSource(item)) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "u-swiper__wrapper__item__wrapper__title u-line-1" }, vue.toDisplayString(item.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 44, ["circular", "interval", "duration", "autoplay", "current", "currentItemId", "previousMargin", "nextMargin", "acceleration", "displayMultipleItems", "easingFunction"])), vue.createElementVNode( "view", { class: "u-swiper__indicator", style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.indicatorStyle)]) }, [ vue.renderSlot(_ctx.$slots, "indicator", {}, () => [ !_ctx.loading && _ctx.indicator && !_ctx.showTitle ? (vue.openBlock(), vue.createBlock(_component_u_swiper_indicator, { key: 0, indicatorActiveColor: _ctx.indicatorActiveColor, indicatorInactiveColor: _ctx.indicatorInactiveColor, length: _ctx.list.length, current: $data.currentIndex, indicatorMode: _ctx.indicatorMode }, null, 8, ["indicatorActiveColor", "indicatorInactiveColor", "length", "current", "indicatorMode"])) : vue.createCommentVNode("v-if", true) ], true) ], 4 /* STYLE */ ) ], 4 /* STYLE */ ); } const __easycom_0$e = /* @__PURE__ */ _export_sfc(_sfc_main$2u, [["render", _sfc_render$2H], ["__scopeId", "data-v-4e7d0c90"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-swiper/u-swiper.vue"]]); let request$m = new Request$1().http; function getCitys(data) { return request$m("/app/common/getCitys", data, "GET"); } function getTlsSig(data) { return request$m("/app/common/getTlsSig", data, "GET"); } function getDictByKey(data) { return request$m("/app/common/getDictByKey", data, "GET"); } function getConfigByKey(data) { return request$m("/app/common/getConfigByKey", data, "GET"); } function getHospitalList$1(data) { return request$m("/app/common/getHospitalList", data, "GET"); } function getDepartmentList$1(data) { return request$m("/app/common/getDepartmentList", data, "GET"); } let request$l = new Request$1().http; function getPackagCateList(data) { return request$l("/app/package/getPackagCateList", data, "GET"); } function getPackageList(data) { return request$l("/app/package/getPackageList", data, "GET"); } function getPackageById(data) { return request$l("/app/package/getPackageById", data, "GET"); } function getPackageDoctorList(data) { return request$l("/app/package/getPackageDoctorList", data, "GET"); } let request$k = new Request$1().http; function getDoctorArticleCateList(data) { return request$k("/app/doctorArticle/getDoctorArticleCateList", data, "GET"); } function getDoctorArticleList(data) { return request$k("/app/doctorArticle/getDoctorArticleList", data, "GET"); } function getDoctorArticleById(data) { return request$k("/app/doctorArticle/getDoctorArticleById", data, "GET"); } let request$j = new Request$1().http; function getMyDoctorList(data) { return request$j("/app/doctor/getMyDoctorList", data, "GET"); } function getDoctorDetails(data) { return request$j("/app/doctor/getDoctorDetails", data, "GET"); } function getDoctorPingList(data) { return request$j("/app/doctor/getDoctorPingList", data, "GET"); } function getDoctorList(data) { return request$j("/app/doctor/getDoctorList", data, "GET"); } function checkFollow(data) { return request$j("/app/doctor/checkFollow", data, "GET"); } function doFollow$1(data) { return request$j("/app/doctor/doFollow", data, "POST", "application/json;charset=UTF-8"); } let request$i = new Request$1().http; function getArticleList(data) { return request$i("/app/article/getArticleList", data, "GET"); } function getArticleById(data) { return request$i("/app/article/getArticleById", data, "GET"); } function getArticleCateList$1(data) { return request$i("/app/article/getArticleCateList", data, "GET"); } let request$h = new Request$1().http; function getAdvList(data) { return request$h("/app/adv/getAdvList", data, "GET"); } let request$g = new Request$1().http; function getDepartmentList(data) { return request$g("/app/department/getDepartmentList", data, "GET"); } const _sfc_main$2t = { data() { return { layouts: [], yangshengs: [ { id: "1", title: "药膳食疗", page: "/pages_index/medicatedFoodList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3cfbd47911cf4753aa9497eac500728d.png" }, { id: "2", title: "经络穴位", page: "/pages_index/vesselList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e93536a9dc1a4f8ca09545097b12fdea.png" }, { id: "3", title: "问答专区", page: "/pages_index/questionsList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e896972bd56f4e358188af36f2c5af42.png" }, { id: "4", title: "疾病", page: "/pages_index/diseaseList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d6f1851cccae414b8baf2ba07782f91b.png" }, { id: "5", title: "中药图解", page: "/pages_index/chineseMedicineList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/ff43572d0d004285b5a3b0ef2663c471.png" }, { id: "6", title: "名方今用", page: "/pages_index/famousPrescribeList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/45db770e58c34963b0d2ba24a958b617.png" }, { id: "7", title: "康复医案", page: "/pages_doctor/doctorArticleList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e793942797b24035b51f94d894bdfa0b.png" }, { id: "8", title: "更多", page: "", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3ee6160289914ee4a8126573fe4dc0ae.png" } ], isTop: false, titleColor: "#2A2B2E", descColor: "#626468", top: 0, // 状态栏的高度 statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, advImgs: [], doctors: [], advs: [], articles: [], depts: [], doctocArticles: [], hosLevelOptions: [], packages: [] }; }, onLoad() { this.getDictByKey("sys_hospital_level"); uni.$on("refreshMsgCount", () => { try { let totalUnreadCount = uni.$TUIKit.getTotalUnreadMessageCount(); if (totalUnreadCount > 0) { try { uni.setTabBarBadge({ //显示数字 index: 1, //tabbar下标 text: totalUnreadCount + "" //数字 }); } catch (e) { } } else { try { uni.hideTabBarRedDot({ //隐藏红点 index: 1 //tabbar下标 }); } catch (e) { } } } catch (e) { } }); }, onShow() { this.getDoctorList(); this.getArticleList(); this.getAdvList(); this.getDepartmentList(); this.getDoctorArticleList(); this.getPackageList(); this.getConfigByKey("his.appShow"); uni.$emit("refreshMsgCount"); }, onPageScroll(e) { this.top = e.scrollTop; }, //发送给朋友 onShareAppMessage(res) { if (this.$isLogin()) { return { title: "御君方互联网医院", path: "/pages/index/index", imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, //分享到朋友圈 onShareTimeline(res) { if (this.utils.isLogin()) { return { title: "御君方互联网医院", imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, computed: { bg: function() { var top = this.top / 120; formatAppLog("log", "at pages/index/index.vue:371", top); if (top > 0) { this.isTop = true; this.titleColor = "#fff"; this.descColor = "#fff"; } else { this.isTop = false; this.titleColor = "#2A2B2E"; this.descColor = "#626468"; } return "rgba(195,154,88, " + top + ")"; } }, methods: { dev() { uni.showToast({ icon: "none", title: "敬请期待" }); }, getConfigByKey(key) { var that = this; var data = { key }; getConfigByKey(data).then( (res) => { if (res.code == 200) { this.layouts = JSON.parse(res.data); this.layouts.sort((a, b) => a.sort - b.sort); formatAppLog("log", "at pages/index/index.vue:400", this.layouts); this.layouts.forEach(function(element) { if (element.id == "4") { if (!element.isShow) { that.yangshengs.splice(6, 1); } } }); } }, (rej) => { } ); }, yangshengClick(item) { if (item.page == "") { uni.showToast({ icon: "none", title: "暂无更多" }); return; } uni.navigateTo({ url: item.page }); }, switchTab(url2) { uni.switchTab({ url: url2 }); }, navToMiniProgram() { uni.navigateToMiniProgram({ // appid 写你要跳转的小程序的 appid appId: "wx45cf09091aead547", // 路径写 src下的路径,假如你跳转的是pages下的页面,就可以写pages/index path: "/pages/common/launch", extraData: { // 'type': 'out' }, // 这个不写的话会显示开发环境,不能正常跳转,写上就能正常跳转了 envVersion: "develop", success(res) { }, fail(err) { } }); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_hospital_level") { this.hosLevelOptions = res.data; } } }, (err) => { } ); }, getDoctorArticleList(page2) { var data = { pageNum: 1, pageSize: 10 }; getDoctorArticleList(data).then((res) => { if (res.code == 200) { this.doctocArticles = res.data.list; } }); }, getDepartmentList(page2) { var data = { isTui: 1 }; getDepartmentList(data).then((res) => { if (res.code == 200) { this.depts = res.data; } }); }, handleAdvClick(index2) { var ad = this.advs[index2]; formatAppLog("log", "at pages/index/index.vue:498", ad.advUrl); if (ad.showType == 1) { uni.setStorageSync("url", ad.advUrl); uni.navigateTo({ url: "h5" }); } else if (ad.showType == 2) { uni.navigateTo({ url: ad.advUrl }); } else if (ad.showType == 3) { uni.setStorageSync("content", ad.content); uni.navigateTo({ url: "content" }); } }, getAdvList() { var that = this; var data = { advType: 1 }; getAdvList(data).then((res) => { if (res.code == 200) { that.advImgs = []; that.advs = []; res.data.forEach(function(element) { if (element.imageUrl != null && element.imageUrl != "") { that.advs.push(element); that.advImgs.push(element.imageUrl); } }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getArticleList() { var data = { isTui: 1, pageNum: 1, pageSize: 10 }; getArticleList(data).then((res) => { if (res.code == 200) { this.articles = res.data.list; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getDoctorList() { var data = { isTui: 1, pageNum: 1, pageSize: 10 }; getDoctorList(data).then((res) => { if (res.code == 200) { this.doctors = res.data.list; this.doctors.forEach(function(value2, index2, array3) { value2.prices = JSON.parse(value2.priceJson); }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getPackageList() { var data = { isShow: 1, pageNum: 1, pageSize: 10 }; getPackageList(data).then((res) => { if (res.code == 200) { this.packages = res.data.list; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, loginNavTo(url2) { this.$isLogin().then( (res) => { if (res) { formatAppLog("log", "at pages/index/index.vue:607", res); uni.navigateTo({ url: url2 }); } else { uni.navigateTo({ url: "/pages/auth/login" }); } } ); }, navTo(url2) { if (url2 == "dev") { uni.showToast({ icon: "none", title: "尽情期待..." }); return; } formatAppLog("log", "at pages/index/index.vue:629", url2); uni.navigateTo({ url: url2 }); } } }; function _sfc_render$2G(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "bg" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/4e7d59d18291491a81c67ed2cfd95a4c.png" }) ]), vue.createElementVNode( "view", { class: "top-box", style: vue.normalizeStyle({ background: $options.bg }) }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "top-title" }, [ vue.createElementVNode( "view", { class: "name", style: vue.normalizeStyle({ color: $data.titleColor }) }, "芸医汇互联网医院", 4 /* STYLE */ ), vue.createElementVNode("view", { class: "desc-box" }, [ !$data.isTop ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: "/static/images/dui.png" })) : vue.createCommentVNode("v-if", true), $data.isTop ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: "/static/images/dui1.png" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "desc", style: vue.normalizeStyle({ color: $data.descColor }) }, "国家卫健委权威认证机构、世界各地千万用户健康选择", 4 /* STYLE */ ) ]) ]), vue.createElementVNode("view", { class: "search" }, [ vue.createElementVNode("view", { class: "search-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_index/search")) }, [ vue.createElementVNode("image", { class: "img", src: "/static/images/icon_search.png", mode: "" }), vue.createElementVNode("input", { disabled: "", type: "text", placeholder: "搜索医生/疾病/知识", "placeholder-class": "input-place" }) ]), vue.createElementVNode("view", { class: "msg" }, [ !$data.isTop ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "msg", src: "/static/images/msg.png" })) : vue.createCommentVNode("v-if", true), $data.isTop ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: "msg", src: "/static/images/msg1.png" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("button", { class: "contact-btn", "open-type": "contact" }) ]) ]) ], 4 /* STYLE */ ), vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { style: { "padding-bottom": "178rpx" } }), $data.advImgs.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "banner" }, [ vue.createVNode(_component_u_swiper, { list: $data.advImgs, indicator: "", indicatorMode: "line", circular: "", onClick: $options.handleAdvClick }, null, 8, ["list", "onClick"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode("view", { class: "btn1", onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_doctor/doctorList")) }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title" }, "专家问诊"), vue.createElementVNode("view", { class: "desc" }, "名医问诊处方") ]), vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/4c28bef97d714e569e672e006ee471e2.png" }), vue.createElementVNode("image", { class: "mask", src: "/static/images/mask.png" }) ]), vue.createElementVNode("view", { class: "btn2", onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_order/inquirySelectType")) }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title" }, "健康会诊"), vue.createElementVNode("view", { class: "desc" }, "快速会诊咨询") ]), vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/86e6f39efbc54d2dadf058dde269e573.png" }), vue.createElementVNode("image", { class: "mask", src: "/static/images/mask.png" }) ]) ]), vue.createElementVNode("view", { class: "modules" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.layouts, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "module" }, [ item.id == 1 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "menus" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "menu-box" }, [ vue.createElementVNode("view", { class: "menu", onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_index/testList")) }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6104b270481040dd8340859c9d901c09.png" }) ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[4] || (_cache[4] = ($event) => $options.loginNavTo("/pages_user/integralGoodsList")) }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f9f2f6c6b4d24f1ba9a637dfed74f8c3.png" }) ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_order/inquirySelect?inquiryType=3")) }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/76f15105ebe442398da1fe57e080bcd4.png" }) ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab("/pages/store/index")) }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240509/908255a8d8134a5482f0314bfbb42c02.png" }) ]) ]) ])) : vue.createCommentVNode("v-if", true), item.id == 2 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "depts" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "dept-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.depts, (item2, index3) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.navTo("/pages_doctor/doctorList?deptId=" + item2.deptId), class: "dept" }, [ vue.createElementVNode("image", { class: "icon", src: item2.iconUrl }, null, 8, ["src"]), vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item2.deptName), 1 /* TEXT */ ) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )), vue.createElementVNode("view", { onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("/pages_doctor/doctorList?deptId=0")), class: "dept" }, [ vue.createElementVNode("image", { class: "icon", src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/acbb520df8284c6aaff601cb06411c2a.png" }), vue.createElementVNode("view", { class: "title" }, "更多科室") ]) ]) ])) : vue.createCommentVNode("v-if", true), item.id == 3 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "depts" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "dept-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.yangshengs, (item2, index3) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.yangshengClick(item2), class: "dept" }, [ vue.createElementVNode("image", { class: "icon", src: item2.icon }, null, 8, ["src"]), vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item2.title) + vue.toDisplayString(item2.isShow), 1 /* TEXT */ ) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), item.id == 4 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "doctor-articles" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "more", onClick: _cache[8] || (_cache[8] = ($event) => $options.navTo("/pages_doctor/doctorArticleList")) }, [ vue.createElementVNode("view", { class: "text" }, "更多"), vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" }) ]) ]), vue.createElementVNode("scroll-view", { "scroll-x": true, style: { "white-space": "nowrap" } }, [ vue.createElementVNode("view", { class: "article-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.doctocArticles, (item2, index3) => { return vue.openBlock(), vue.createElementBlock("view", { class: "article", onClick: ($event) => $options.navTo("/pages_doctor/doctorArticleDetails?articleId=" + item2.articleId) }, [ vue.createElementVNode("view", { class: "image-box" }, [ vue.createElementVNode("image", { mode: "aspectFill", src: item2.imageUrl }, null, 8, ["src"]), vue.createElementVNode( "view", { class: "views" }, vue.toDisplayString(item2.views) + "人观看 ", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "doctor" }, [ vue.createElementVNode("image", { mode: "aspectFill", src: item2.avatar }, null, 8, ["src"]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "doc-name ellipsis" }, vue.toDisplayString(item2.doctorName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-position ellipsis" }, vue.toDisplayString(item2.position), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "article-title-box" }, [ vue.createElementVNode( "view", { class: "article-title ellipsis" }, vue.toDisplayString(item2.title), 1 /* TEXT */ ) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ])) : vue.createCommentVNode("v-if", true), item.id == 5 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "doctors" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "more", onClick: _cache[9] || (_cache[9] = ($event) => $options.navTo("/pages_doctor/doctorList")) }, [ vue.createElementVNode("view", { class: "text" }, "更多"), vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" }) ]) ]), $data.doctors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "doctor-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.doctors, (item2, index3) => { return vue.openBlock(), vue.createElementBlock("view", { class: "doctor", onClick: ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + item2.doctorId) }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "head-box" }, [ vue.createElementVNode("image", { mode: "aspectFill", class: "doc-img", src: item2.avatar }, null, 8, ["src"]), item2.workStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "isline" }, [ vue.createElementVNode("view", { class: "img" }, [ vue.createElementVNode("image", { src: "/static/images/isline.png" }), vue.createElementVNode("view", { class: "name" }, "在线") ]) ])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString(item2.doctorName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-position" }, vue.toDisplayString(item2.position), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-dept" }, vue.toDisplayString(item2.deptName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "hospital-box" }, [ item2.hospitalLevel != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "tag" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.$getDictLabelName($data.hosLevelOptions, item2.hospitalLevel)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(item2.hospitalName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-spec" }, [ vue.createElementVNode( "view", { class: "spec ellipsis2" }, vue.toDisplayString(item2.speciality), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-count" }, [ vue.createElementVNode("view", { class: "name" }, "好评:"), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item2.pingStar) + "分", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "name" }, "接诊量:"), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item2.orderNumber), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "name" }, "平均响应:"), vue.createElementVNode("view", { class: "count" }) ]), vue.createElementVNode("view", { class: "doc-price" }, [ vue.createElementVNode("view", { class: "btn" }, [ vue.createTextVNode(" 咨询医生¥ "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item2.prices, (price, index4) => { return vue.openBlock(), vue.createElementBlock("text", null, [ vue.createTextVNode( vue.toDisplayString(price.price.toFixed(2)) + " ", 1 /* TEXT */ ), index4 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), item.id == 6 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "articles" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "more", onClick: _cache[10] || (_cache[10] = ($event) => $options.navTo("/pages_index/articleList")) }, [ vue.createElementVNode("view", { class: "text" }, "更多"), vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" }) ]) ]), $data.articles.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "article-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.articles, (item2, index3) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", onClick: ($event) => $options.navTo("/pages_index/articleDetails?articleId=" + item2.articleId) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item2.title), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "views" }, " 浏览量 " + vue.toDisplayString(item2.views), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: item2.imageUrl }, null, 8, ["src"]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), item.id == 7 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 6, class: "packages" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "more", onClick: _cache[11] || (_cache[11] = ($event) => $options.navTo("/pages_index/packageList")) }, [ vue.createElementVNode("view", { class: "text" }, "更多"), vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" }) ]) ]), vue.createElementVNode("view", { class: "package-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.packages, (item2, index3) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", onClick: ($event) => $options.navTo("/pages_index/packageDetails?packageId=" + item2.packageId) }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { src: item2.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "bottom" }, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(item2.packageName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode( "view", { class: "price" }, "¥" + vue.toDisplayString(item2.price.toFixed(2)) + "元/日", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item2.sales) + "人已购", 1 /* TEXT */ ) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]) ]); } const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2t, [["render", _sfc_render$2G], ["__scopeId", "data-v-1cf27b2a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/index/index.vue"]]); const _sfc_main$2s = { data() { return { url: "" }; }, onLoad(val) { this.url = uni.getStorageSync("url"); formatAppLog("log", "at pages/index/h5.vue:17", this.url); } }; function _sfc_render$2F(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("web-view", { src: $data.url }, null, 8, ["src"]) ]); } const PagesIndexH5 = /* @__PURE__ */ _export_sfc(_sfc_main$2s, [["render", _sfc_render$2F], ["__scopeId", "data-v-41e99781"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/index/h5.vue"]]); const _sfc_main$2r = { data() { return { content: "" }; }, onLoad(val) { uni.getStorageSync("content"); formatAppLog("log", "at pages/index/content.vue:16", this.content); } }; function _sfc_render$2E(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { innerHTML: $data.content }, null, 8, ["innerHTML"]) ]); } const PagesIndexContent = /* @__PURE__ */ _export_sfc(_sfc_main$2r, [["render", _sfc_render$2E], ["__scopeId", "data-v-a27a44e8"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/index/content.vue"]]); const _sfc_main$2q = { data() { return { depts: [], doctors: [] }; }, onShow() { this.getDepartmentList(); this.getDoctorList(); }, methods: { getDoctorList() { var data = { isTui: 1, pageNum: 1, pageSize: 10 }; getDoctorList(data).then((res) => { if (res.code == 200) { res.data.list.forEach(function(value2, index2, array3) { value2.prices = JSON.parse(value2.priceJson); }); this.doctors = res.data.list; formatAppLog("log", "at pages/doctor/index.vue:102", this.doctors); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getDepartmentList(page2) { var data = {}; getDepartmentList(data).then((res) => { if (res.code == 200) { this.depts = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, navTo(url2) { uni.navigateTo({ url: url2 }); } } }; function _sfc_render$2D(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "search" }, [ vue.createElementVNode("view", { class: "search-box" }, [ vue.createElementVNode("image", { class: "img", src: "/static/images/icon_search.png", mode: "" }), vue.createElementVNode("input", { disabled: "", type: "text", placeholder: "搜索医院/医生/疾病/知识", "placeholder-class": "input-place" }) ]) ]), vue.createElementVNode("view", { class: "depts" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "全部科室") ]), vue.createElementVNode("view", { class: "dept-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.depts, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "dept", onClick: ($event) => $options.navTo("./doctorList?deptId=" + item.deptId) }, [ vue.createElementVNode("image", { src: item.iconUrl }, null, 8, ["src"]), vue.createElementVNode( "view", { class: "dept-name" }, vue.toDisplayString(item.deptName), 1 /* TEXT */ ) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "doctors" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "专家推荐") ]), vue.createElementVNode("view", { class: "doctor-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.doctors, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "doctor", onClick: ($event) => $options.navTo("./doctorDetails?doctorId=" + item.doctorId) }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("image", { mode: "aspectFill", class: "doc-img", src: item.avatar }, null, 8, ["src"]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString(item.doctorName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-position" }, vue.toDisplayString(item.position), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "hospital" }, vue.toDisplayString(item.hospitalName) + " " + vue.toDisplayString(item.deptName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "doc-spec" }, [ vue.createElementVNode("view", { class: "title" }, "擅长:"), vue.createElementVNode( "view", { class: "spec ellipsis" }, vue.toDisplayString(item.speciality), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-ping" }, [ vue.createElementVNode( "view", { class: "ping" }, "好评:" + vue.toDisplayString(item.pingStar) + "分", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "count" }, "咨询量:" + vue.toDisplayString(item.orderNumber), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-price" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createTextVNode("¥ "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.prices, (price, index3) => { return vue.openBlock(), vue.createElementBlock("text", null, [ vue.createTextVNode( vue.toDisplayString(price.price.toFixed(2)) + " ", 1 /* TEXT */ ), index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode("view", { class: "btn" }, " 咨询医生 ") ]) ]) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]); } const PagesDoctorIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2q, [["render", _sfc_render$2D], ["__scopeId", "data-v-43416ddf"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/doctor/index.vue"]]); const GlobalOption = { down: { // 其他down的配置参数也可以写,这里只展示了常用的配置: offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调 native: false // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例) }, up: { // 其他up的配置参数也可以写,这里只展示了常用的配置: offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance ) toTop: { // 回到顶部按钮,需配置src才显示 src: "https://www.mescroll.com/img/mescroll-totop.png", // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png ) offset: 1e3, // 列表滚动多少距离才显示回到顶部按钮,默认1000px right: 20, // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx) bottom: 120, // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx) width: 72 // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx) }, empty: { use: true, // 是否显示空布局 icon: "https://www.mescroll.com/img/mescroll-empty.png" // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png ) } }, // 国际化配置 i18n: { // 中文 zh: { down: { textInOffset: "下拉刷新", // 下拉的距离在offset范围内的提示文本 textOutOffset: "释放更新", // 下拉的距离大于offset范围的提示文本 textLoading: "加载中 ...", // 加载中的提示文本 textSuccess: "加载成功", // 加载成功的文本 textErr: "加载失败" // 加载失败的文本 }, up: { textLoading: "加载中 ...", // 加载中的提示文本 textNoMore: "-- END --", // 没有更多数据的提示文本 empty: { tip: "~ 空空如也 ~" // 空提示 } } }, // 英文 en: { down: { textInOffset: "drop down refresh", textOutOffset: "release updates", textLoading: "loading ...", textSuccess: "loaded successfully", textErr: "loading failed" }, up: { textLoading: "loading ...", textNoMore: "-- END --", empty: { tip: "~ absolutely empty ~" } } } } }; const mescrollI18n = { // 默认语言 def: "zh", // 获取当前语言类型 getType() { return uni.getStorageSync("mescroll-i18n") || this.def; }, // 设置当前语言类型 setType(type2) { uni.setStorageSync("mescroll-i18n", type2); } }; const _sfc_main$2p = { props: { // empty的配置项: 默认为GlobalOption.up.empty option: { type: Object, default() { return {}; } } }, // 使用computed获取配置,用于支持option的动态配置 computed: { // 图标 icon() { if (this.option.icon != null) { return this.option.icon; } else { let i18nType = mescrollI18n.getType(); if (this.option.i18n) { return this.option.i18n[i18nType].icon; } else { return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon; } } }, // 文本提示 tip() { if (this.option.tip != null) { return this.option.tip; } else { let i18nType = mescrollI18n.getType(); if (this.option.i18n) { return this.option.i18n[i18nType].tip; } else { return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip; } } }, // 按钮文本 btnText() { if (this.option.i18n) { let i18nType = mescrollI18n.getType(); return this.option.i18n[i18nType].btnText; } else { return this.option.btnText; } } }, methods: { // 点击按钮 emptyClick() { this.$emit("emptyclick"); } } }; function _sfc_render$2C(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["mescroll-empty", { "empty-fixed": $props.option.fixed }]), style: vue.normalizeStyle({ "z-index": $props.option.zIndex, top: $props.option.top }) }, [ vue.createElementVNode("view", null, [ $options.icon ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "empty-icon", src: $options.icon, mode: "widthFix" }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true) ]), $options.tip ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "empty-tip" }, vue.toDisplayString($options.tip), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $options.btnText ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "empty-btn", onClick: _cache[0] || (_cache[0] = (...args) => $options.emptyClick && $options.emptyClick(...args)) }, vue.toDisplayString($options.btnText), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$d = /* @__PURE__ */ _export_sfc(_sfc_main$2p, [["render", _sfc_render$2C], ["__scopeId", "data-v-7cefd855"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue"]]); function MeScroll(options, isScrollBody) { let me = this; me.version = "1.3.7"; me.options = options || {}; me.isScrollBody = isScrollBody || false; me.isDownScrolling = false; me.isUpScrolling = false; let hasDownCallback = me.options.down && me.options.down.callback; me.initDownScroll(); me.initUpScroll(); setTimeout(function() { if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) { if (me.optDown.autoShowLoading) { me.triggerDownScroll(); } else { me.optDown.callback && me.optDown.callback(me); } } if (!me.isUpAutoLoad) { setTimeout(function() { me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll(); }, 100); } }, 30); } MeScroll.prototype.extendDownScroll = function(optDown) { MeScroll.extend(optDown, { use: true, // 是否启用下拉刷新; 默认true auto: true, // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true native: false, // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例) autoShowLoading: false, // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false isLock: false, // 是否锁定下拉刷新,默认false; offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调 startTop: 100, // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差 inOffsetRate: 1, // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉 outOffsetRate: 0.2, // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉 bottomOffset: 20, // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行 minAngle: 45, // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突; textInOffset: "下拉刷新", // 下拉的距离在offset范围内的提示文本 textOutOffset: "释放更新", // 下拉的距离大于offset范围的提示文本 textLoading: "加载中 ...", // 加载中的提示文本 textSuccess: "加载成功", // 加载成功的文本 textErr: "加载失败", // 加载失败的文本 beforeEndDelay: 0, // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试) bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop) textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色) inited: null, // 下拉刷新初始化完毕的回调 inOffset: null, // 下拉的距离进入offset范围内那一刻的回调 outOffset: null, // 下拉的距离大于offset那一刻的回调 onMoving: null, // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度 beforeLoading: null, // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】 showLoading: null, // 显示下拉刷新进度的回调 afterLoading: null, // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用) beforeEndDownScroll: null, // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】 endDownScroll: null, // 结束下拉刷新的回调 afterEndDownScroll: null, // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用) callback: function(mescroll) { mescroll.resetUpScroll(); } }); }; MeScroll.prototype.extendUpScroll = function(optUp) { MeScroll.extend(optUp, { use: true, // 是否启用上拉加载; 默认true auto: true, // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true isLock: false, // 是否锁定上拉加载,默认false; isBoth: true, // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发; callback: null, // 上拉加载的回调;function(page,mescroll){ } page: { num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10, // 每页数据的数量 time: null // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复; }, noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看 offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance ) textLoading: "加载中 ...", // 加载中的提示文本 textNoMore: "-- END --", // 没有更多数据的提示文本 bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom) textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色) inited: null, // 初始化完毕的回调 showLoading: null, // 显示加载中的回调 showNoMore: null, // 显示无更多数据的回调 hideUpScroll: null, // 隐藏上拉加载的回调 errDistance: 60, // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效 toTop: { // 回到顶部按钮,需配置src才显示 src: null, // 图片路径,默认null (绝对路径或网络图) offset: 1e3, // 列表滚动多少距离才显示回到顶部按钮,默认1000 duration: 300, // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项) btnClick: null, // 点击按钮的回调 onShow: null, // 是否显示的回调 zIndex: 9990, // fixed定位z-index值 left: null, // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx) right: 20, // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx) bottom: 120, // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx) safearea: false, // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值) width: 72, // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx) radius: "50%" // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx) }, empty: { use: true, // 是否显示空布局 icon: null, // 图标路径 tip: "~ 暂无相关数据 ~", // 提示 btnText: "", // 按钮 btnClick: null, // 点击按钮的回调 onShow: null, // 是否显示的回调 fixed: false, // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute) top: "100rpx", // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx") zIndex: 99 // fixed定位z-index值 }, onScroll: false // 是否监听滚动事件 }); }; MeScroll.extend = function(userOption, defaultOption) { if (!userOption) return defaultOption; for (let key in defaultOption) { if (userOption[key] == null) { let def = defaultOption[key]; if (def != null && typeof def === "object") { userOption[key] = MeScroll.extend({}, def); } else { userOption[key] = def; } } else if (typeof userOption[key] === "object") { MeScroll.extend(userOption[key], defaultOption[key]); } } return userOption; }; MeScroll.prototype.hasColor = function(color2) { if (!color2) return false; let c = color2.toLowerCase(); return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white"; }; MeScroll.prototype.initDownScroll = function() { let me = this; me.optDown = me.options.down || {}; if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor)) me.optDown.textColor = "#fff"; me.extendDownScroll(me.optDown); if (me.isScrollBody && me.optDown.native) { me.optDown.use = false; } else { me.optDown.native = false; } me.downHight = 0; if (me.optDown.use && me.optDown.inited) { setTimeout(function() { me.optDown.inited(me); }, 0); } }; MeScroll.prototype.touchstartEvent = function(e) { if (!this.optDown.use) return; this.startPoint = this.getPoint(e); this.startTop = this.getScrollTop(); this.startAngle = 0; this.lastPoint = this.startPoint; this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset; this.inTouchend = false; }; MeScroll.prototype.touchmoveEvent = function(e) { if (!this.optDown.use) return; let me = this; let scrollTop = me.getScrollTop(); let curPoint = me.getPoint(e); let moveY = curPoint.y - me.startPoint.y; if (moveY > 0 && (me.isScrollBody && scrollTop <= 0 || !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop))) { if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling && me.optUp.isBoth)) { if (!me.startAngle) me.startAngle = me.getAngle(me.lastPoint, curPoint); if (me.startAngle < me.optDown.minAngle) return; if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) { me.inTouchend = true; me.touchendEvent(); return; } me.preventDefault(e); let diff = curPoint.y - me.lastPoint.y; if (me.downHight < me.optDown.offset) { if (me.movetype !== 1) { me.movetype = 1; me.isDownEndSuccess = null; me.optDown.inOffset && me.optDown.inOffset(me); me.isMoveDown = true; } me.downHight += diff * me.optDown.inOffsetRate; } else { if (me.movetype !== 2) { me.movetype = 2; me.optDown.outOffset && me.optDown.outOffset(me); me.isMoveDown = true; } if (diff > 0) { me.downHight += diff * me.optDown.outOffsetRate; } else { me.downHight += diff; } } me.downHight = Math.round(me.downHight); let rate = me.downHight / me.optDown.offset; me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight); } } me.lastPoint = curPoint; }; MeScroll.prototype.touchendEvent = function(e) { if (!this.optDown.use) return; if (this.isMoveDown) { if (this.downHight >= this.optDown.offset) { this.triggerDownScroll(); } else { this.downHight = 0; this.endDownScrollCall(this); } this.movetype = 0; this.isMoveDown = false; } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) { let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0; if (isScrollUp) { let angle = this.getAngle(this.getPoint(e), this.startPoint); if (angle > 80) { this.triggerUpScroll(true); } } } }; MeScroll.prototype.getPoint = function(e) { if (!e) { return { x: 0, y: 0 }; } if (e.touches && e.touches[0]) { return { x: e.touches[0].pageX, y: e.touches[0].pageY }; } else if (e.changedTouches && e.changedTouches[0]) { return { x: e.changedTouches[0].pageX, y: e.changedTouches[0].pageY }; } else { return { x: e.clientX, y: e.clientY }; } }; MeScroll.prototype.getAngle = function(p1, p2) { let x = Math.abs(p1.x - p2.x); let y = Math.abs(p1.y - p2.y); let z = Math.sqrt(x * x + y * y); let angle = 0; if (z !== 0) { angle = Math.asin(y / z) / Math.PI * 180; } return angle; }; MeScroll.prototype.triggerDownScroll = function() { if (this.optDown.beforeLoading && this.optDown.beforeLoading(this)) ; else { this.showDownScroll(); !this.optDown.native && this.optDown.callback && this.optDown.callback(this); } }; MeScroll.prototype.showDownScroll = function() { this.isDownScrolling = true; if (this.optDown.native) { uni.startPullDownRefresh(); this.showDownLoadingCall(0); } else { this.downHight = this.optDown.offset; this.showDownLoadingCall(this.downHight); } }; MeScroll.prototype.showDownLoadingCall = function(downHight) { this.optDown.showLoading && this.optDown.showLoading(this, downHight); this.optDown.afterLoading && this.optDown.afterLoading(this, downHight); }; MeScroll.prototype.onPullDownRefresh = function() { this.isDownScrolling = true; this.showDownLoadingCall(0); this.optDown.callback && this.optDown.callback(this); }; MeScroll.prototype.endDownScroll = function() { if (this.optDown.native) { this.isDownScrolling = false; this.endDownScrollCall(this); uni.stopPullDownRefresh(); return; } let me = this; let endScroll = function() { me.downHight = 0; me.isDownScrolling = false; me.endDownScrollCall(me); if (!me.isScrollBody) { me.setScrollHeight(0); me.scrollTo(0, 0); } }; let delay = 0; if (me.optDown.beforeEndDownScroll) { delay = me.optDown.beforeEndDownScroll(me); if (me.isDownEndSuccess == null) delay = 0; } if (typeof delay === "number" && delay > 0) { setTimeout(endScroll, delay); } else { endScroll(); } }; MeScroll.prototype.endDownScrollCall = function() { this.optDown.endDownScroll && this.optDown.endDownScroll(this); this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this); }; MeScroll.prototype.lockDownScroll = function(isLock) { if (isLock == null) isLock = true; this.optDown.isLock = isLock; }; MeScroll.prototype.lockUpScroll = function(isLock) { if (isLock == null) isLock = true; this.optUp.isLock = isLock; }; MeScroll.prototype.initUpScroll = function() { let me = this; me.optUp = me.options.up || { use: false }; if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor)) me.optUp.textColor = "#fff"; me.extendUpScroll(me.optUp); if (me.optUp.use === false) return; me.optUp.hasNext = true; me.startNum = me.optUp.page.num + 1; if (me.optUp.inited) { setTimeout(function() { me.optUp.inited(me); }, 0); } }; MeScroll.prototype.onReachBottom = function() { if (this.isScrollBody && !this.isUpScrolling) { if (!this.optUp.isLock && this.optUp.hasNext) { this.triggerUpScroll(); } } }; MeScroll.prototype.onPageScroll = function(e) { if (!this.isScrollBody) return; this.setScrollTop(e.scrollTop); if (e.scrollTop >= this.optUp.toTop.offset) { this.showTopBtn(); } else { this.hideTopBtn(); } }; MeScroll.prototype.scroll = function(e, onScroll) { this.setScrollTop(e.scrollTop); this.setScrollHeight(e.scrollHeight); if (this.preScrollY == null) this.preScrollY = 0; this.isScrollUp = e.scrollTop - this.preScrollY > 0; this.preScrollY = e.scrollTop; this.isScrollUp && this.triggerUpScroll(true); if (e.scrollTop >= this.optUp.toTop.offset) { this.showTopBtn(); } else { this.hideTopBtn(); } this.optUp.onScroll && onScroll && onScroll(); }; MeScroll.prototype.triggerUpScroll = function(isCheck) { if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) { if (isCheck === true) { let canUp = false; if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) { if (this.getScrollBottom() <= this.optUp.offset) { canUp = true; } } if (canUp === false) return; } this.showUpScroll(); this.optUp.page.num++; this.isUpAutoLoad = true; this.num = this.optUp.page.num; this.size = this.optUp.page.size; this.time = this.optUp.page.time; this.optUp.callback(this); } }; MeScroll.prototype.showUpScroll = function() { this.isUpScrolling = true; this.optUp.showLoading && this.optUp.showLoading(this); }; MeScroll.prototype.showNoMore = function() { this.optUp.hasNext = false; this.optUp.showNoMore && this.optUp.showNoMore(this); }; MeScroll.prototype.hideUpScroll = function() { this.optUp.hideUpScroll && this.optUp.hideUpScroll(this); }; MeScroll.prototype.endUpScroll = function(isShowNoMore) { if (isShowNoMore != null) { if (isShowNoMore) { this.showNoMore(); } else { this.hideUpScroll(); } } this.isUpScrolling = false; }; MeScroll.prototype.resetUpScroll = function(isShowLoading) { if (this.optUp && this.optUp.use) { let page2 = this.optUp.page; this.prePageNum = page2.num; this.prePageTime = page2.time; page2.num = this.startNum; page2.time = null; if (!this.isDownScrolling && isShowLoading !== false) { if (isShowLoading == null) { this.removeEmpty(); this.showUpScroll(); } else { this.showDownScroll(); } } this.isUpAutoLoad = true; this.num = page2.num; this.size = page2.size; this.time = page2.time; this.optUp.callback && this.optUp.callback(this); } }; MeScroll.prototype.setPageNum = function(num) { this.optUp.page.num = num - 1; }; MeScroll.prototype.setPageSize = function(size) { this.optUp.page.size = size; }; MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) { let hasNext; if (this.optUp.use && totalPage != null) hasNext = this.optUp.page.num < totalPage; this.endSuccess(dataSize, hasNext, systime); }; MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) { let hasNext; if (this.optUp.use && totalSize != null) { let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize; hasNext = loadSize < totalSize; } this.endSuccess(dataSize, hasNext, systime); }; MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) { let me = this; if (me.isDownScrolling) { me.isDownEndSuccess = true; me.endDownScroll(); } if (me.optUp.use) { let isShowNoMore; if (dataSize != null) { let pageNum = me.optUp.page.num; let pageSize = me.optUp.page.size; if (pageNum === 1) { if (systime) me.optUp.page.time = systime; } if (dataSize < pageSize || hasNext === false) { me.optUp.hasNext = false; if (dataSize === 0 && pageNum === 1) { isShowNoMore = false; me.showEmpty(); } else { let allDataSize = (pageNum - 1) * pageSize + dataSize; if (allDataSize < me.optUp.noMoreSize) { isShowNoMore = false; } else { isShowNoMore = true; } me.removeEmpty(); } } else { isShowNoMore = false; me.optUp.hasNext = true; me.removeEmpty(); } } me.endUpScroll(isShowNoMore); } }; MeScroll.prototype.endErr = function(errDistance) { if (this.isDownScrolling) { this.isDownEndSuccess = false; let page2 = this.optUp.page; if (page2 && this.prePageNum) { page2.num = this.prePageNum; page2.time = this.prePageTime; } this.endDownScroll(); } if (this.isUpScrolling) { this.optUp.page.num--; this.endUpScroll(false); if (this.isScrollBody && errDistance !== 0) { if (!errDistance) errDistance = this.optUp.errDistance; this.scrollTo(this.getScrollTop() - errDistance, 0); } } }; MeScroll.prototype.showEmpty = function() { this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true); }; MeScroll.prototype.removeEmpty = function() { this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false); }; MeScroll.prototype.showTopBtn = function() { if (!this.topBtnShow) { this.topBtnShow = true; this.optUp.toTop.onShow && this.optUp.toTop.onShow(true); } }; MeScroll.prototype.hideTopBtn = function() { if (this.topBtnShow) { this.topBtnShow = false; this.optUp.toTop.onShow && this.optUp.toTop.onShow(false); } }; MeScroll.prototype.getScrollTop = function() { return this.scrollTop || 0; }; MeScroll.prototype.setScrollTop = function(y) { this.scrollTop = y; }; MeScroll.prototype.scrollTo = function(y, t) { this.myScrollTo && this.myScrollTo(y, t); }; MeScroll.prototype.resetScrollTo = function(myScrollTo) { this.myScrollTo = myScrollTo; }; MeScroll.prototype.getScrollBottom = function() { return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop(); }; MeScroll.prototype.getStep = function(star, end, callback, t, rate) { let diff = end - star; if (t === 0 || diff === 0) { callback && callback(end); return; } t = t || 300; rate = rate || 30; let count = t / rate; let step = diff / count; let i = 0; let timer = setInterval(function() { if (i < count - 1) { star += step; callback && callback(star, timer); i++; } else { callback && callback(end, timer); clearInterval(timer); } }, rate); }; MeScroll.prototype.getClientHeight = function(isReal) { let h = this.clientHeight || 0; if (h === 0 && isReal !== true) { h = this.getBodyHeight(); } return h; }; MeScroll.prototype.setClientHeight = function(h) { this.clientHeight = h; }; MeScroll.prototype.getScrollHeight = function() { return this.scrollHeight || 0; }; MeScroll.prototype.setScrollHeight = function(h) { this.scrollHeight = h; }; MeScroll.prototype.getBodyHeight = function() { return this.bodyHeight || 0; }; MeScroll.prototype.setBodyHeight = function(h) { this.bodyHeight = h; }; MeScroll.prototype.preventDefault = function(e) { if (e && e.cancelable && !e.defaultPrevented) e.preventDefault(); }; const _sfc_main$2o = { props: { // up.toTop的配置项 option: Object, // 是否显示 value: false }, computed: { // 支付宝小程序需写成计算属性,prop定义default仍报错 mOption() { return this.option || {}; }, // 优先显示左边 left() { return this.mOption.left ? this.addUnit(this.mOption.left) : "auto"; }, // 右边距离 (优先显示左边) right() { return this.mOption.left ? "auto" : this.addUnit(this.mOption.right); } }, methods: { addUnit(num) { if (!num) return 0; if (typeof num === "number") return num + "rpx"; return num; }, toTopClick() { this.$emit("input", false); this.$emit("click"); } } }; function _sfc_render$2B(_ctx, _cache, $props, $setup, $data, $options) { return $options.mOption.src ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: vue.normalizeClass(["mescroll-totop", [$props.value ? "mescroll-totop-in" : "mescroll-totop-out", { "mescroll-totop-safearea": $options.mOption.safearea }]]), style: vue.normalizeStyle({ "z-index": $options.mOption.zIndex, "left": $options.left, "right": $options.right, "bottom": $options.addUnit($options.mOption.bottom), "width": $options.addUnit($options.mOption.width), "border-radius": $options.addUnit($options.mOption.radius) }), src: $options.mOption.src, mode: "widthFix", onClick: _cache[0] || (_cache[0] = (...args) => $options.toTopClick && $options.toTopClick(...args)) }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true); } const MescrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$2o, [["render", _sfc_render$2B], ["__scopeId", "data-v-49fff3a8"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/mescroll-uni/components/mescroll-uni/components/mescroll-top.vue"]]); const WxsMixin = { data() { return { // 传入wxs视图层的数据 (响应式) wxsProp: { optDown: {}, // 下拉刷新的配置 scrollTop: 0, // 滚动条的距离 bodyHeight: 0, // body的高度 isDownScrolling: false, // 是否正在下拉刷新中 isUpScrolling: false, // 是否正在上拉加载中 isScrollBody: true, // 是否为mescroll-body滚动 isUpBoth: true, // 上拉加载时,是否同时可以下拉刷新 t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer) }, // 标记调用wxs视图层的方法 callProp: { callType: "", // 方法名 t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer) } // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs) // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js) }; }, methods: { // wxs视图层调用逻辑层的回调 wxsCall(msg) { if (msg.type === "setWxsProp") { this.wxsProp = { optDown: this.mescroll.optDown, scrollTop: this.mescroll.getScrollTop(), bodyHeight: this.mescroll.getBodyHeight(), isDownScrolling: this.mescroll.isDownScrolling, isUpScrolling: this.mescroll.isUpScrolling, isUpBoth: this.mescroll.optUp.isBoth, isScrollBody: this.mescroll.isScrollBody, t: Date.now() }; } else if (msg.type === "setLoadType") { this.downLoadType = msg.downLoadType; this.$set(this.mescroll, "downLoadType", this.downLoadType); this.$set(this.mescroll, "isDownEndSuccess", null); } else if (msg.type === "triggerDownScroll") { this.mescroll.triggerDownScroll(); } else if (msg.type === "endDownScroll") { this.mescroll.endDownScroll(); } else if (msg.type === "triggerUpScroll") { this.mescroll.triggerUpScroll(true); } } }, mounted() { this.mescroll.optDown.afterLoading = () => { this.callProp = { callType: "showLoading", t: Date.now() }; }; this.mescroll.optDown.afterEndDownScroll = () => { this.callProp = { callType: "endDownScroll", t: Date.now() }; let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0); setTimeout(() => { if (this.downLoadType === 4 || this.downLoadType === 0) { this.callProp = { callType: "clearTransform", t: Date.now() }; } this.$set(this.mescroll, "downLoadType", this.downLoadType); }, delay); }; this.wxsCall({ type: "setWxsProp" }); } }; const block0$1 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("wxsBiz"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxsBiz"] = "30f4e25a"; }; const block1 = (Comp) => { (Comp.$renderjs || (Comp.$renderjs = [])).push("renderBiz"); (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["renderBiz"] = "1ca30ca9"; }; const _sfc_main$2n = { name: "mescroll-body", mixins: [WxsMixin], components: { MescrollTop }, props: { down: Object, up: Object, i18n: Object, top: [String, Number], topbar: [Boolean, String], bottom: [String, Number], safearea: Boolean, height: [String, Number], bottombar: { type: Boolean, default: true }, sticky: Boolean }, data() { return { mescroll: { optDown: {}, optUp: {} }, // mescroll实例 downHight: 0, //下拉刷新: 容器高度 downRate: 0, // 下拉比率(inOffset: rate<1; outOffset: rate>=1) downLoadType: 0, // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll) upLoadType: 0, // 上拉加载状态:0(loading前),1(loading中),2(没有更多了,显示END文本提示),3(没有更多了,不显示END文本提示) isShowEmpty: false, // 是否显示空布局 isShowToTop: false, // 是否显示回到顶部按钮 windowHeight: 0, // 可使用窗口的高度 windowBottom: 0, // 可使用窗口的底部位置 statusBarHeight: 0 // 状态栏高度 }; }, computed: { // mescroll最小高度,默认windowHeight,使列表不满屏仍可下拉 minHeight() { return this.toPx(this.height || "100%") + "px"; }, // 下拉布局往下偏移的距离 (px) numTop() { return this.toPx(this.top); }, padTop() { return this.numTop + "px"; }, // 上拉布局往上偏移 (px) numBottom() { return this.toPx(this.bottom); }, padBottom() { return this.numBottom + "px"; }, // 是否为重置下拉的状态 isDownReset() { return this.downLoadType === 3 || this.downLoadType === 4; }, // 过渡 transition() { return this.isDownReset ? "transform 300ms" : ""; }, translateY() { return this.downHight > 0 ? "translateY(" + this.downHight + "px)" : ""; }, // 是否在加载中 isDownLoading() { return this.downLoadType === 3; }, // 旋转的角度 downRotate() { return "rotate(" + 360 * this.downRate + "deg)"; }, // 文本提示 downText() { if (!this.mescroll) return ""; switch (this.downLoadType) { case 1: return this.mescroll.optDown.textInOffset; case 2: return this.mescroll.optDown.textOutOffset; case 3: return this.mescroll.optDown.textLoading; case 4: return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess == false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset; default: return this.mescroll.optDown.textInOffset; } } }, methods: { //number,rpx,upx,px,% --> px的数值 toPx(num) { if (typeof num === "string") { if (num.indexOf("px") !== -1) { if (num.indexOf("rpx") !== -1) { num = num.replace("rpx", ""); } else if (num.indexOf("upx") !== -1) { num = num.replace("upx", ""); } else { return Number(num.replace("px", "")); } } else if (num.indexOf("%") !== -1) { let rate = Number(num.replace("%", "")) / 100; return this.windowHeight * rate; } } return num ? uni.upx2px(Number(num)) : 0; }, // 点击空布局的按钮回调 emptyClick() { this.$emit("emptyclick", this.mescroll); }, // 点击回到顶部的按钮回调 toTopClick() { this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration); this.$emit("topclick", this.mescroll); } }, // 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效 created() { let vm = this; let diyOption = { // 下拉刷新的配置 down: { inOffset() { vm.downLoadType = 1; }, outOffset() { vm.downLoadType = 2; }, onMoving(mescroll, rate, downHight) { vm.downHight = downHight; vm.downRate = rate; }, showLoading(mescroll, downHight) { vm.downLoadType = 3; vm.downHight = downHight; }, beforeEndDownScroll(mescroll) { vm.downLoadType = 4; return mescroll.optDown.beforeEndDelay; }, endDownScroll() { vm.downLoadType = 4; vm.downHight = 0; if (vm.downResetTimer) { clearTimeout(vm.downResetTimer); vm.downResetTimer = null; } vm.downResetTimer = setTimeout(() => { if (vm.downLoadType === 4) vm.downLoadType = 0; }, 300); }, // 派发下拉刷新的回调 callback: function(mescroll) { vm.$emit("down", mescroll); } }, // 上拉加载的配置 up: { // 显示加载中的回调 showLoading() { vm.upLoadType = 1; }, // 显示无更多数据的回调 showNoMore() { vm.upLoadType = 2; }, // 隐藏上拉加载的回调 hideUpScroll(mescroll) { vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3; }, // 空布局 empty: { onShow(isShow) { vm.isShowEmpty = isShow; } }, // 回到顶部 toTop: { onShow(isShow) { vm.isShowToTop = isShow; } }, // 派发上拉加载的回调 callback: function(mescroll) { vm.$emit("up", mescroll); } } }; let i18nType = mescrollI18n.getType(); let i18nOption = { type: i18nType }; MeScroll.extend(i18nOption, vm.i18n); MeScroll.extend(i18nOption, GlobalOption.i18n); MeScroll.extend(diyOption, i18nOption[i18nType]); MeScroll.extend(diyOption, { down: GlobalOption.down, up: GlobalOption.up }); let myOption = JSON.parse(JSON.stringify({ down: vm.down, up: vm.up })); MeScroll.extend(myOption, diyOption); vm.mescroll = new MeScroll(myOption, true); vm.mescroll.i18n = i18nOption; vm.$emit("init", vm.mescroll); const sys2 = uni.getSystemInfoSync(); if (sys2.windowHeight) vm.windowHeight = sys2.windowHeight; if (sys2.windowBottom) vm.windowBottom = sys2.windowBottom; if (sys2.statusBarHeight) vm.statusBarHeight = sys2.statusBarHeight; vm.mescroll.setBodyHeight(sys2.windowHeight); vm.mescroll.resetScrollTo((y, t) => { if (typeof y === "string") { setTimeout(() => { let selector; if (y.indexOf("#") == -1 && y.indexOf(".") == -1) { selector = "#" + y; } else { selector = y; if (y.indexOf(">>>") != -1) { selector = y.split(">>>")[1].trim(); } } uni.createSelectorQuery().select(selector).boundingClientRect(function(rect) { if (rect) { let top = rect.top; top += vm.mescroll.getScrollTop(); uni.pageScrollTo({ scrollTop: top, duration: t }); } else { formatAppLog("error", "at uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.vue:352", selector + " does not exist"); } }).exec(); }, 30); } else { uni.pageScrollTo({ scrollTop: y, duration: t }); } }); if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null) ; else { vm.mescroll.optUp.toTop.safearea = vm.safearea; } uni.$on("setMescrollGlobalOption", (options) => { if (!options) return; let i18nType2 = options.i18n ? options.i18n.type : null; if (i18nType2 && vm.mescroll.i18n.type != i18nType2) { vm.mescroll.i18n.type = i18nType2; mescrollI18n.setType(i18nType2); MeScroll.extend(options, vm.mescroll.i18n[i18nType2]); } if (options.down) { let down = MeScroll.extend({}, options.down); vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown); } if (options.up) { let up = MeScroll.extend({}, options.up); vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp); } }); }, destroyed() { uni.$off("setMescrollGlobalOption"); } }; function _sfc_render$2A(_ctx, _cache, $props, $setup, $data, $options) { const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$d); const _component_mescroll_top = vue.resolveComponent("mescroll-top"); return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["mescroll-body mescroll-render-touch", { "mescorll-sticky": $props.sticky }]), style: vue.normalizeStyle({ "minHeight": $options.minHeight, "padding-top": $options.padTop, "padding-bottom": $options.padBottom }), onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.wxsBiz.touchstartEvent && _ctx.wxsBiz.touchstartEvent(...args)), onTouchmove: _cache[2] || (_cache[2] = (...args) => _ctx.wxsBiz.touchmoveEvent && _ctx.wxsBiz.touchmoveEvent(...args)), onTouchend: _cache[3] || (_cache[3] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)), onTouchcancel: _cache[4] || (_cache[4] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)), "change:prop": _ctx.wxsBiz.propObserver, prop: vue.wp(_ctx.wxsProp) }, [ vue.createCommentVNode(" 状态栏 "), $props.topbar && $data.statusBarHeight ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "mescroll-topbar", style: vue.normalizeStyle({ height: $data.statusBarHeight + "px", background: $props.topbar }) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "mescroll-body-content mescroll-wxs-content", style: vue.normalizeStyle({ transform: $options.translateY, transition: $options.transition }), "change:prop": _ctx.wxsBiz.callObserver, prop: vue.wp(_ctx.callProp) }, [ vue.createCommentVNode(" 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)"), vue.createCommentVNode(' '), $data.mescroll.optDown.use ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "mescroll-downwarp", style: vue.normalizeStyle({ "background": $data.mescroll.optDown.bgColor, "color": $data.mescroll.optDown.textColor }) }, [ vue.createElementVNode("view", { class: "downwarp-content" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["downwarp-progress mescroll-wxs-progress", { "mescroll-rotate": $options.isDownLoading }]), style: vue.normalizeStyle({ "border-color": $data.mescroll.optDown.textColor, "transform": $options.downRotate }) }, null, 6 /* CLASS, STYLE */ ), vue.createElementVNode( "view", { class: "downwarp-tip" }, vue.toDisplayString($options.downText), 1 /* TEXT */ ) ]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 列表内容 "), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), vue.createCommentVNode(" 空布局 "), $data.isShowEmpty ? (vue.openBlock(), vue.createBlock(_component_mescroll_empty, { key: 1, option: $data.mescroll.optUp.empty, onEmptyclick: $options.emptyClick }, null, 8, ["option", "onEmptyclick"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)"), vue.createCommentVNode(' '), $data.mescroll.optUp.use && !$options.isDownLoading && $data.upLoadType !== 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "mescroll-upwarp", style: vue.normalizeStyle({ "background": $data.mescroll.optUp.bgColor, "color": $data.mescroll.optUp.textColor }) }, [ vue.createCommentVNode(" 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) "), vue.withDirectives(vue.createElementVNode( "view", null, [ vue.createElementVNode( "view", { class: "upwarp-progress mescroll-rotate", style: vue.normalizeStyle({ "border-color": $data.mescroll.optUp.textColor }) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "upwarp-tip" }, vue.toDisplayString($data.mescroll.optUp.textLoading), 1 /* TEXT */ ) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $data.upLoadType === 1] ]), vue.createCommentVNode(" 无数据 "), $data.upLoadType === 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "upwarp-nodata" }, vue.toDisplayString($data.mescroll.optUp.textNoMore), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 12, ["change:prop", "prop"]), vue.createCommentVNode(" 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) "), vue.createCommentVNode(" 适配iPhoneX "), $props.safearea ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "mescroll-safearea" })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 回到顶部按钮 (fixed元素需写在transform外面,防止降级为absolute)"), vue.createVNode(_component_mescroll_top, { modelValue: $data.isShowToTop, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.isShowToTop = $event), option: $data.mescroll.optUp.toTop, onClick: $options.toTopClick }, null, 8, ["modelValue", "option", "onClick"]), vue.createCommentVNode(" renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 "), vue.createElementVNode("view", { "change:prop": _ctx.renderBiz.propObserver, prop: vue.wp(_ctx.wxsProp) }, null, 8, ["change:prop", "prop"]) ], 46, ["change:prop", "prop"]); } if (typeof block0$1 === "function") block0$1(_sfc_main$2n); if (typeof block1 === "function") block1(_sfc_main$2n); const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$2n, [["render", _sfc_render$2A], ["__scopeId", "data-v-151374fc"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.vue"]]); const _sfc_main$2m = { components: {}, data() { return { cateId: 0, menuCurrent: 0 //轮播下标 }; }, props: { list: { type: Array, default: [] }, menu: { default: 4 }, imgW: { type: Number, default: 88 } }, computed: { carousel() { if (this.list) { let data = this.sortData(this.list, this.menu * 2); return data; } } }, created() { }, methods: { // 数据分层 sortData(oArr, length) { let arr = []; let minArr = []; oArr.forEach((c) => { if (minArr.length === length) { minArr = []; } if (minArr.length === 0) { arr.push(minArr); } minArr.push(c); }); return arr; }, // 轮播 onSwiper(e) { this.menuCurrent = e.detail.current; }, routerTo(item) { this.cateId = item.cateId; this.$emit("menuClick", item); } } }; function _sfc_render$2z(_ctx, _cache, $props, $setup, $data, $options) { return $options.carousel ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "menu-list-box", style: vue.normalizeStyle($props.list.length <= $props.menu ? `height:160rpx` : `height:320rpx`) }, [ vue.createElementVNode( "swiper", { class: "menu-swiper-box", style: vue.normalizeStyle($props.list.length <= $props.menu ? `height:160rpx` : `height:320rpx`), onChange: _cache[0] || (_cache[0] = (...args) => $options.onSwiper && $options.onSwiper(...args)), circular: "", autoplay: false, interval: 3e3, duration: 1e3 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.carousel, (itemList, index2) => { return vue.openBlock(), vue.createElementBlock( "swiper-item", { class: "menu-swiper-item", key: index2, style: vue.normalizeStyle($props.list.length <= $props.menu ? `height:200rpx` : `height:340rpx`) }, [ vue.createElementVNode("view", { class: "menu-tab-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(itemList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "tab-list", key: item.cateId, onClick: ($event) => $options.routerTo(item) }, [ vue.createElementVNode("image", { class: "tab-img", style: vue.normalizeStyle({ width: $props.imgW + "rpx", height: $props.imgW + "rpx" }), src: item.imgUrl }, null, 12, ["src"]), vue.createElementVNode( "text", { class: vue.normalizeClass($data.cateId == item.cateId ? "tab-title active" : "tab-title") }, vue.toDisplayString(item.cateName), 3 /* TEXT, CLASS */ ) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 4 /* STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 36 /* STYLE, NEED_HYDRATION */ ), $options.carousel.length > 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "menu-dots" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.carousel.length, (dot, index2) => { return vue.openBlock(), vue.createElementBlock( "text", { class: vue.normalizeClass($data.menuCurrent === index2 ? "dot-active" : "dot"), key: index2 }, null, 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true); } const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$2m, [["render", _sfc_render$2z], ["__scopeId", "data-v-758a2c95"], ["__file", "E:/Project/2023/问诊平台/his_user_app/components/Menu.vue"]]); const MescrollMixin = { data() { return { mescroll: null //mescroll实例对象 }; }, // 注册系统自带的下拉刷新 (配置down.native为true时生效, 还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例) onPullDownRefresh() { this.mescroll && this.mescroll.onPullDownRefresh(); }, // 注册列表滚动事件,用于判定在顶部可下拉刷新,在指定位置可显示隐藏回到顶部按钮 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效) onPageScroll(e) { this.mescroll && this.mescroll.onPageScroll(e); }, // 注册滚动到底部的事件,用于上拉加载 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效) onReachBottom() { this.mescroll && this.mescroll.onReachBottom(); }, methods: { // mescroll组件初始化的回调,可获取到mescroll对象 mescrollInit(mescroll) { this.mescroll = mescroll; this.mescrollInitByRef(); }, // 以ref的方式初始化mescroll对象 (兼容字节跳动小程序) mescrollInitByRef() { if (!this.mescroll || !this.mescroll.resetUpScroll) { let mescrollRef = this.$refs.mescrollRef; if (mescrollRef) this.mescroll = mescrollRef.mescroll; } }, // 下拉刷新的回调 (mixin默认resetUpScroll) downCallback() { if (this.mescroll.optUp.use) { this.mescroll.resetUpScroll(); } else { setTimeout(() => { this.mescroll.endSuccess(); }, 500); } }, // 上拉加载的回调 upCallback() { setTimeout(() => { this.mescroll.endErr(); }, 500); } }, mounted() { this.mescrollInitByRef(); } }; const _sfc_main$2l = { components: { Menu }, mixins: [MescrollMixin], // 使用mixin data() { return { top: null, cates: [], diseaseType: 0, keyword: "", mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad() { this.getPackagCateList(1); }, methods: { menuClick(item) { this.diseaseType = item.cateId; this.mescroll.resetUpScroll(); }, getPackagCateList(type2) { var data = { type: type2 }; var that = this; getPackagCateList(data).then( (res) => { if (res.code == 200) { this.cates = res.data; var query = uni.createSelectorQuery().in(that); setTimeout(function() { query.select(".top-content").boundingClientRect((data2) => { if (data2) { formatAppLog("log", "at pages/store/index.vue:91", "View height:", data2.height + "px"); that.top = data2.height + "px"; } }).exec(); }, 500); } }, (err) => { } ); }, doSearch() { this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { isShow: 1, diseaseType: this.diseaseType, keyword: this.keyword, pageNum: page2.num, pageSize: page2.size }; getPackageList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$2y(_ctx, _cache, $props, $setup, $data, $options) { const _component_Menu = vue.resolveComponent("Menu"); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-content" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入关键字搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "cate-list" }, [ $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, { key: 0, list: $data.cates, onMenuClick: $options.menuClick, style: { "width": "100%" } }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true) ]) ]), $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, { key: 0, top: $data.top, bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: $data.downOption, up: $data.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "package-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", onClick: ($event) => $options.navTo("/pages_index/packageDetails?packageId=" + item.packageId) }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { src: item.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "bottom" }, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(item.packageName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode( "view", { class: "price" }, "¥" + vue.toDisplayString(item.price.toFixed(2)) + "元/日", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item.sales) + "人已购", 1 /* TEXT */ ) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["top", "onInit", "down", "up", "onDown", "onUp"])) : vue.createCommentVNode("v-if", true) ]); } const PagesStoreIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2l, [["render", _sfc_render$2y], ["__scopeId", "data-v-f73eb578"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/store/index.vue"]]); const props$u = { props: { color: { type: String, default: props$y.line.color }, // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 length: { type: [String, Number], default: props$y.line.length }, // 线条方向,col-竖向,row-横向 direction: { type: String, default: props$y.line.direction }, // 是否显示细边框 hairline: { type: Boolean, default: props$y.line.hairline }, // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px" margin: { type: [String, Number], default: props$y.line.margin }, // 是否虚线,true-虚线,false-实线 dashed: { type: Boolean, default: props$y.line.dashed } } }; const _sfc_main$2k = { name: "u-line", mixins: [mpMixin, mixin, props$u], computed: { lineStyle() { const style = {}; style.margin = this.margin; if (this.direction === "row") { style.borderBottomWidth = "1px"; style.borderBottomStyle = this.dashed ? "dashed" : "solid"; style.width = uni.$u.addUnit(this.length); if (this.hairline) style.transform = "scaleY(0.5)"; } else { style.borderLeftWidth = "1px"; style.borderLeftStyle = this.dashed ? "dashed" : "solid"; style.height = uni.$u.addUnit(this.length); if (this.hairline) style.transform = "scaleX(0.5)"; } style.borderColor = this.color; return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } } }; function _sfc_render$2x(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-line", style: vue.normalizeStyle([$options.lineStyle]) }, null, 4 /* STYLE */ ); } const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["render", _sfc_render$2x], ["__scopeId", "data-v-72791e59"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-line/u-line.vue"]]); const props$t = { props: { // 是否展示组件 show: { type: Boolean, default: props$y.transition.show }, // 使用的动画模式 mode: { type: String, default: props$y.transition.mode }, // 动画的执行时间,单位ms duration: { type: [String, Number], default: props$y.transition.duration }, // 使用的动画过渡函数 timingFunction: { type: String, default: props$y.transition.timingFunction } } }; const getClassNames = (name) => ({ enter: `u-${name}-enter u-${name}-enter-active`, "enter-to": `u-${name}-enter-to u-${name}-enter-active`, leave: `u-${name}-leave u-${name}-leave-active`, "leave-to": `u-${name}-leave-to u-${name}-leave-active` }); const transition = { methods: { // 组件被点击发出事件 clickHandler() { this.$emit("click"); }, // vue版本的组件进场处理 vueEnter() { const classNames = getClassNames(this.mode); this.status = "enter"; this.$emit("beforeEnter"); this.inited = true; this.display = true; this.classes = classNames.enter; this.$nextTick(async () => { this.$emit("enter"); this.transitionEnded = false; this.$emit("afterEnter"); this.classes = classNames["enter-to"]; }); }, // 动画离场处理 vueLeave() { if (!this.display) return; const classNames = getClassNames(this.mode); this.status = "leave"; this.$emit("beforeLeave"); this.classes = classNames.leave; this.$nextTick(() => { this.transitionEnded = false; this.$emit("leave"); setTimeout(this.onTransitionEnd, this.duration); this.classes = classNames["leave-to"]; }); }, // 完成过渡后触发 onTransitionEnd() { if (this.transitionEnded) return; this.transitionEnded = true; this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter"); if (!this.show && this.display) { this.display = false; this.inited = false; } } } }; const _sfc_main$2j = { name: "u-transition", data() { return { inited: false, // 是否显示/隐藏组件 viewStyle: {}, // 组件内部的样式 status: "", // 记录组件动画的状态 transitionEnded: false, // 组件是否结束的标记 display: false, // 组件是否展示 classes: "" // 应用的类名 }; }, computed: { mergeStyle() { const { viewStyle, customStyle } = this; return { transitionDuration: `${this.duration}ms`, // display: `${this.display ? '' : 'none'}`, transitionTimingFunction: this.timingFunction, // 避免自定义样式影响到动画属性,所以写在viewStyle前面 ...uni.$u.addStyle(customStyle), ...viewStyle }; } }, // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象 mixins: [mpMixin, mixin, transition, props$t], watch: { show: { handler(newVal) { newVal ? this.vueEnter() : this.vueLeave(); }, // 表示同时监听初始化时的props的show的意思 immediate: true } } }; function _sfc_render$2w(_ctx, _cache, $props, $setup, $data, $options) { return $data.inited ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-transition", $data.classes]), ref: "u-transition", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)), style: vue.normalizeStyle([$options.mergeStyle]), onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$2j, [["render", _sfc_render$2w], ["__scopeId", "data-v-5cec8177"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]); const props$s = { props: { // 是否显示遮罩 show: { type: Boolean, default: props$y.overlay.show }, // 层级z-index zIndex: { type: [String, Number], default: props$y.overlay.zIndex }, // 遮罩的过渡时间,单位为ms duration: { type: [String, Number], default: props$y.overlay.duration }, // 不透明度值,当做rgba的第四个参数 opacity: { type: [String, Number], default: props$y.overlay.opacity } } }; const _sfc_main$2i = { name: "u-overlay", mixins: [mpMixin, mixin, props$s], 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 uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } }, methods: { clickHandler() { this.$emit("click"); } } }; function _sfc_render$2v(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4); return vue.openBlock(), vue.createBlock(_component_u_transition, { show: _ctx.show, "custom-class": "u-overlay", duration: _ctx.duration, "custom-style": $options.overlayStyle, onClick: $options.clickHandler }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), _: 3 /* FORWARDED */ }, 8, ["show", "duration", "custom-style", "onClick"]); } const __easycom_0$c = /* @__PURE__ */ _export_sfc(_sfc_main$2i, [["render", _sfc_render$2v], ["__scopeId", "data-v-9112bed9"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]); const props$r = { props: { bgColor: { type: String, default: props$y.statusBar.bgColor } } }; const _sfc_main$2h = { name: "u-status-bar", mixins: [mpMixin, mixin, props$r], data() { return {}; }, computed: { style() { const style = {}; style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px"); style.backgroundColor = this.bgColor; return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } } }; function _sfc_render$2u(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { style: vue.normalizeStyle([$options.style]), class: "u-status-bar" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ); } const __easycom_0$b = /* @__PURE__ */ _export_sfc(_sfc_main$2h, [["render", _sfc_render$2u], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]); const icons = { "uicon-level": "", "uicon-column-line": "", "uicon-checkbox-mark": "", "uicon-folder": "", "uicon-movie": "", "uicon-star-fill": "", "uicon-star": "", "uicon-phone-fill": "", "uicon-phone": "", "uicon-apple-fill": "", "uicon-chrome-circle-fill": "", "uicon-backspace": "", "uicon-attach": "", "uicon-cut": "", "uicon-empty-car": "", "uicon-empty-coupon": "", "uicon-empty-address": "", "uicon-empty-favor": "", "uicon-empty-permission": "", "uicon-empty-news": "", "uicon-empty-search": "", "uicon-github-circle-fill": "", "uicon-rmb": "", "uicon-person-delete-fill": "", "uicon-reload": "", "uicon-order": "", "uicon-server-man": "", "uicon-search": "", "uicon-fingerprint": "", "uicon-more-dot-fill": "", "uicon-scan": "", "uicon-share-square": "", "uicon-map": "", "uicon-map-fill": "", "uicon-tags": "", "uicon-tags-fill": "", "uicon-bookmark-fill": "", "uicon-bookmark": "", "uicon-eye": "", "uicon-eye-fill": "", "uicon-mic": "", "uicon-mic-off": "", "uicon-calendar": "", "uicon-calendar-fill": "", "uicon-trash": "", "uicon-trash-fill": "", "uicon-play-left": "", "uicon-play-right": "", "uicon-minus": "", "uicon-plus": "", "uicon-info": "", "uicon-info-circle": "", "uicon-info-circle-fill": "", "uicon-question": "", "uicon-error": "", "uicon-close": "", "uicon-checkmark": "", "uicon-android-circle-fill": "", "uicon-android-fill": "", "uicon-ie": "", "uicon-IE-circle-fill": "", "uicon-google": "", "uicon-google-circle-fill": "", "uicon-setting-fill": "", "uicon-setting": "", "uicon-minus-square-fill": "", "uicon-plus-square-fill": "", "uicon-heart": "", "uicon-heart-fill": "", "uicon-camera": "", "uicon-camera-fill": "", "uicon-more-circle": "", "uicon-more-circle-fill": "", "uicon-chat": "", "uicon-chat-fill": "", "uicon-bag-fill": "", "uicon-bag": "", "uicon-error-circle-fill": "", "uicon-error-circle": "", "uicon-close-circle": "", "uicon-close-circle-fill": "", "uicon-checkmark-circle": "", "uicon-checkmark-circle-fill": "", "uicon-question-circle-fill": "", "uicon-question-circle": "", "uicon-share": "", "uicon-share-fill": "", "uicon-shopping-cart": "", "uicon-shopping-cart-fill": "", "uicon-bell": "", "uicon-bell-fill": "", "uicon-list": "", "uicon-list-dot": "", "uicon-zhihu": "", "uicon-zhihu-circle-fill": "", "uicon-zhifubao": "", "uicon-zhifubao-circle-fill": "", "uicon-weixin-circle-fill": "", "uicon-weixin-fill": "", "uicon-twitter-circle-fill": "", "uicon-twitter": "", "uicon-taobao-circle-fill": "", "uicon-taobao": "", "uicon-weibo-circle-fill": "", "uicon-weibo": "", "uicon-qq-fill": "", "uicon-qq-circle-fill": "", "uicon-moments-circel-fill": "", "uicon-moments": "", "uicon-qzone": "", "uicon-qzone-circle-fill": "", "uicon-baidu-circle-fill": "", "uicon-baidu": "", "uicon-facebook-circle-fill": "", "uicon-facebook": "", "uicon-car": "", "uicon-car-fill": "", "uicon-warning-fill": "", "uicon-warning": "", "uicon-clock-fill": "", "uicon-clock": "", "uicon-edit-pen": "", "uicon-edit-pen-fill": "", "uicon-email": "", "uicon-email-fill": "", "uicon-minus-circle": "", "uicon-minus-circle-fill": "", "uicon-plus-circle": "", "uicon-plus-circle-fill": "", "uicon-file-text": "", "uicon-file-text-fill": "", "uicon-pushpin": "", "uicon-pushpin-fill": "", "uicon-grid": "", "uicon-grid-fill": "", "uicon-play-circle": "", "uicon-play-circle-fill": "", "uicon-pause-circle-fill": "", "uicon-pause": "", "uicon-pause-circle": "", "uicon-eye-off": "", "uicon-eye-off-outline": "", "uicon-gift-fill": "", "uicon-gift": "", "uicon-rmb-circle-fill": "", "uicon-rmb-circle": "", "uicon-kefu-ermai": "", "uicon-server-fill": "", "uicon-coupon-fill": "", "uicon-coupon": "", "uicon-integral": "", "uicon-integral-fill": "", "uicon-home-fill": "", "uicon-home": "", "uicon-hourglass-half-fill": "", "uicon-hourglass": "", "uicon-account": "", "uicon-plus-people-fill": "", "uicon-minus-people-fill": "", "uicon-account-fill": "", "uicon-thumb-down-fill": "", "uicon-thumb-down": "", "uicon-thumb-up": "", "uicon-thumb-up-fill": "", "uicon-lock-fill": "", "uicon-lock-open": "", "uicon-lock-opened-fill": "", "uicon-lock": "", "uicon-red-packet-fill": "", "uicon-photo-fill": "", "uicon-photo": "", "uicon-volume-off-fill": "", "uicon-volume-off": "", "uicon-volume-fill": "", "uicon-volume": "", "uicon-red-packet": "", "uicon-download": "", "uicon-arrow-up-fill": "", "uicon-arrow-down-fill": "", "uicon-play-left-fill": "", "uicon-play-right-fill": "", "uicon-rewind-left-fill": "", "uicon-rewind-right-fill": "", "uicon-arrow-downward": "", "uicon-arrow-leftward": "", "uicon-arrow-rightward": "", "uicon-arrow-upward": "", "uicon-arrow-down": "", "uicon-arrow-right": "", "uicon-arrow-left": "", "uicon-arrow-up": "", "uicon-skip-back-left": "", "uicon-skip-forward-right": "", "uicon-rewind-right": "", "uicon-rewind-left": "", "uicon-arrow-right-double": "", "uicon-arrow-left-double": "", "uicon-wifi-off": "", "uicon-wifi": "", "uicon-empty-data": "", "uicon-empty-history": "", "uicon-empty-list": "", "uicon-empty-page": "", "uicon-empty-order": "", "uicon-man": "", "uicon-woman": "", "uicon-man-add": "", "uicon-man-add-fill": "", "uicon-man-delete": "", "uicon-man-delete-fill": "", "uicon-zh": "", "uicon-en": "" }; const props$q = { props: { // 图标类名 name: { type: String, default: props$y.icon.name }, // 图标颜色,可接受主题色 color: { type: String, default: props$y.icon.color }, // 字体大小,单位px size: { type: [String, Number], default: props$y.icon.size }, // 是否显示粗体 bold: { type: Boolean, default: props$y.icon.bold }, // 点击图标的时候传递事件出去的index(用于区分点击了哪一个) index: { type: [String, Number], default: props$y.icon.index }, // 触摸图标时的类名 hoverClass: { type: String, default: props$y.icon.hoverClass }, // 自定义扩展前缀,方便用户扩展自己的图标库 customPrefix: { type: String, default: props$y.icon.customPrefix }, // 图标右边或者下面的文字 label: { type: [String, Number], default: props$y.icon.label }, // label的位置,只能右边或者下边 labelPos: { type: String, default: props$y.icon.labelPos }, // label的大小 labelSize: { type: [String, Number], default: props$y.icon.labelSize }, // label的颜色 labelColor: { type: String, default: props$y.icon.labelColor }, // label与图标的距离 space: { type: [String, Number], default: props$y.icon.space }, // 图片的mode imgMode: { type: String, default: props$y.icon.imgMode }, // 用于显示图片小图标时,图片的宽度 width: { type: [String, Number], default: props$y.icon.width }, // 用于显示图片小图标时,图片的高度 height: { type: [String, Number], default: props$y.icon.height }, // 用于解决某些情况下,让图标垂直居中的用途 top: { type: [String, Number], default: props$y.icon.top }, // 是否阻止事件传播 stop: { type: Boolean, default: props$y.icon.stop } } }; const _sfc_main$2g = { name: "u-icon", data() { return {}; }, emits: ["click"], mixins: [mpMixin, mixin, props$q], computed: { uClasses() { let classes = []; classes.push(this.customPrefix + "-" + this.name); if (this.color && uni.$u.config.type.includes(this.color)) classes.push("u-icon__icon--" + this.color); return classes; }, iconStyle() { let style = {}; style = { fontSize: uni.$u.addUnit(this.size), lineHeight: uni.$u.addUnit(this.size), fontWeight: this.bold ? "bold" : "normal", // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中 top: uni.$u.addUnit(this.top) }; if (this.color && !uni.$u.config.type.includes(this.color)) style.color = this.color; return style; }, // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式 isImg() { return this.name.indexOf("/") !== -1; }, imgStyle() { let style = {}; style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size); style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size); return style; }, // 通过图标名,查找对应的图标 icon() { return icons["uicon-" + this.name] || this.name; } }, methods: { clickHandler(e) { this.$emit("click", this.index); this.stop && this.preventEvent(e); } } }; function _sfc_render$2t(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "u-icon__img", src: _ctx.name, mode: _ctx.imgMode, style: vue.normalizeStyle([$options.imgStyle, _ctx.$u.addStyle(_ctx.customStyle)]) }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: vue.normalizeClass(["u-icon__icon", $options.uClasses]), style: vue.normalizeStyle([$options.iconStyle, _ctx.$u.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: "u-icon__label", style: vue.normalizeStyle({ color: _ctx.labelColor, fontSize: _ctx.$u.addUnit(_ctx.labelSize), marginLeft: _ctx.labelPos == "right" ? _ctx.$u.addUnit(_ctx.space) : 0, marginTop: _ctx.labelPos == "bottom" ? _ctx.$u.addUnit(_ctx.space) : 0, marginRight: _ctx.labelPos == "left" ? _ctx.$u.addUnit(_ctx.space) : 0, marginBottom: _ctx.labelPos == "top" ? _ctx.$u.addUnit(_ctx.space) : 0 }) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); } const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$2g, [["render", _sfc_render$2t], ["__scopeId", "data-v-ac70166d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]); const props$p = { props: {} }; const _sfc_main$2f = { name: "u-safe-bottom", mixins: [mpMixin, mixin, props$p], data() { return { safeAreaBottomHeight: 0, isNvue: false }; }, computed: { style() { const style = {}; return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } }, mounted() { } }; function _sfc_render$2s(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]), style: vue.normalizeStyle([$options.style]) }, null, 6 /* CLASS, STYLE */ ); } const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2f, [["render", _sfc_render$2s], ["__scopeId", "data-v-f3d22cfe"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]); const props$o = { props: { // 是否展示弹窗 show: { type: Boolean, default: props$y.popup.show }, // 是否显示遮罩 overlay: { type: Boolean, default: props$y.popup.overlay }, // 弹出的方向,可选值为 top bottom right left center mode: { type: String, default: props$y.popup.mode }, // 动画时长,单位ms duration: { type: [String, Number], default: props$y.popup.duration }, // 是否显示关闭图标 closeable: { type: Boolean, default: props$y.popup.closeable }, // 自定义遮罩的样式 overlayStyle: { type: [Object, String], default: props$y.popup.overlayStyle }, // 点击遮罩是否关闭弹窗 closeOnClickOverlay: { type: Boolean, default: props$y.popup.closeOnClickOverlay }, // 层级 zIndex: { type: [String, Number], default: props$y.popup.zIndex }, // 是否为iPhoneX留出底部安全距离 safeAreaInsetBottom: { type: Boolean, default: props$y.popup.safeAreaInsetBottom }, // 是否留出顶部安全距离(状态栏高度) safeAreaInsetTop: { type: Boolean, default: props$y.popup.safeAreaInsetTop }, // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角 closeIconPos: { type: String, default: props$y.popup.closeIconPos }, // 是否显示圆角 round: { type: [Boolean, String, Number], default: props$y.popup.round }, // mode=center,也即中部弹出时,是否使用缩放模式 zoom: { type: Boolean, default: props$y.popup.zoom }, // 弹窗背景色,设置为transparent可去除白色背景 bgColor: { type: String, default: props$y.popup.bgColor }, // 遮罩的透明度,0-1之间 overlayOpacity: { type: [Number, String], default: props$y.popup.overlayOpacity } } }; const _sfc_main$2e = { name: "u-popup", mixins: [mpMixin, mixin, props$o], data() { return { overlayDuration: this.duration + 50 }; }, watch: { show(newValue, oldValue) { } }, computed: { transitionStyle() { const style = { zIndex: this.zIndex, position: "fixed", display: "flex" }; style[this.mode] = 0; if (this.mode === "left") { return uni.$u.deepMerge(style, { bottom: 0, top: 0 }); } else if (this.mode === "right") { return uni.$u.deepMerge(style, { bottom: 0, top: 0 }); } else if (this.mode === "top") { return uni.$u.deepMerge(style, { left: 0, right: 0 }); } else if (this.mode === "bottom") { return uni.$u.deepMerge(style, { left: 0, right: 0 }); } else if (this.mode === "center") { return uni.$u.deepMerge(style, { alignItems: "center", "justify-content": "center", top: 0, left: 0, right: 0, bottom: 0 }); } }, contentStyle() { const style = {}; uni.$u.sys(); if (this.mode !== "center") { style.flex = 1; } if (this.bgColor) { style.backgroundColor = this.bgColor; } if (this.round) { const value2 = uni.$u.addUnit(this.round); if (this.mode === "top") { style.borderBottomLeftRadius = value2; style.borderBottomRightRadius = value2; } else if (this.mode === "bottom") { style.borderTopLeftRadius = value2; style.borderTopRightRadius = value2; } else if (this.mode === "center") { style.borderRadius = value2; } } return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); }, position() { if (this.mode === "center") { return this.zoom ? "fade-zoom" : "fade"; } if (this.mode === "left") { return "slide-left"; } if (this.mode === "right") { return "slide-right"; } if (this.mode === "bottom") { return "slide-up"; } if (this.mode === "top") { return "slide-down"; } } }, methods: { // 点击遮罩 overlayClick() { if (this.closeOnClickOverlay) { this.$emit("close"); } }, close(e) { this.$emit("close"); }, afterEnter() { this.$emit("open"); }, clickHandler() { if (this.mode === "center") { this.overlayClick(); } this.$emit("click"); } } }; function _sfc_render$2r(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$c); const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$b); const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$2); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4); return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [ _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, { key: 0, show: _ctx.show, onClick: $options.overlayClick, duration: $data.overlayDuration, customStyle: _ctx.overlayStyle, opacity: _ctx.overlayOpacity }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_transition, { show: _ctx.show, customStyle: $options.transitionStyle, mode: $options.position, duration: _ctx.duration, onAfterEnter: $options.afterEnter, onClick: $options.clickHandler }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "u-popup__content", style: vue.normalizeStyle([$options.contentStyle]), onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"])) }, [ _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), _ctx.closeable ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])), class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]), "hover-class": "u-popup__content__close--hover", "hover-stay-time": "150" }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#909399", size: "18", bold: "" }) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"]) ]); } const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$2e, [["render", _sfc_render$2r], ["__scopeId", "data-v-05c24e9b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]); const props$n = { props: { // 是否展示modal show: { type: Boolean, default: props$y.modal.show }, // 标题 title: { type: [String], default: props$y.modal.title }, // 弹窗内容 content: { type: String, default: props$y.modal.content }, // 确认文案 confirmText: { type: String, default: props$y.modal.confirmText }, // 取消文案 cancelText: { type: String, default: props$y.modal.cancelText }, // 是否显示确认按钮 showConfirmButton: { type: Boolean, default: props$y.modal.showConfirmButton }, // 是否显示取消按钮 showCancelButton: { type: Boolean, default: props$y.modal.showCancelButton }, // 确认按钮颜色 confirmColor: { type: String, default: props$y.modal.confirmColor }, // 取消文字颜色 cancelColor: { type: String, default: props$y.modal.cancelColor }, // 对调确认和取消的位置 buttonReverse: { type: Boolean, default: props$y.modal.buttonReverse }, // 是否开启缩放效果 zoom: { type: Boolean, default: props$y.modal.zoom }, // 是否异步关闭,只对确定按钮有效 asyncClose: { type: Boolean, default: props$y.modal.asyncClose }, // 是否允许点击遮罩关闭modal closeOnClickOverlay: { type: Boolean, default: props$y.modal.closeOnClickOverlay }, // 给一个负的margin-top,往上偏移,避免和键盘重合的情况 negativeTop: { type: [String, Number], default: props$y.modal.negativeTop }, // modal宽度,不支持百分比,可以数值,px,rpx单位 width: { type: [String, Number], default: props$y.modal.width }, // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮 confirmButtonShape: { type: String, default: props$y.modal.confirmButtonShape } } }; const _sfc_main$2d = { name: "u-modal", mixins: [mpMixin, mixin, props$n], data() { return { loading: false }; }, watch: { show(n) { if (n && this.loading) this.loading = false; } }, methods: { // 点击确定按钮 confirmHandler() { if (this.asyncClose) { this.loading = true; } this.$emit("confirm"); }, // 点击取消按钮 cancelHandler() { this.$emit("cancel"); }, // 点击遮罩 // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩 // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中 // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在 // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发 clickHandler() { if (this.closeOnClickOverlay) { this.$emit("close"); } } } }; function _sfc_render$2q(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$5); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); return vue.openBlock(), vue.createBlock(_component_u_popup, { mode: "center", zoom: _ctx.zoom, show: _ctx.show, customStyle: { borderRadius: "6px", overflow: "hidden", marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}` }, closeOnClickOverlay: _ctx.closeOnClickOverlay, safeAreaInsetBottom: false, duration: 400, onClick: $options.clickHandler }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "u-modal", style: vue.normalizeStyle({ width: _ctx.$u.addUnit(_ctx.width) }) }, [ _ctx.title ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-modal__title" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-modal__content", style: vue.normalizeStyle({ paddingTop: `${_ctx.title ? 12 : 25}px` }) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "text", { class: "u-modal__content__text" }, vue.toDisplayString(_ctx.content), 1 /* TEXT */ ) ], true) ], 4 /* STYLE */ ), _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-modal__button-group--confirm-button" }, [ vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true) ])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ vue.createVNode(_component_u_line), vue.createElementVNode( "view", { class: "u-modal__button-group", style: vue.normalizeStyle({ flexDirection: _ctx.buttonReverse ? "row-reverse" : "row" }) }, [ _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel", [_ctx.showCancelButton && !_ctx.showConfirmButton && "u-modal__button-group__wrapper--only-cancel"]]), "hover-stay-time": 150, "hover-class": "u-modal__button-group__wrapper--hover", onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args)) }, [ vue.createElementVNode( "text", { class: "u-modal__button-group__wrapper__text", style: vue.normalizeStyle({ color: _ctx.cancelColor }) }, vue.toDisplayString(_ctx.cancelText), 5 /* TEXT, STYLE */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 1, direction: "column" })) : vue.createCommentVNode("v-if", true), _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm", [!_ctx.showCancelButton && _ctx.showConfirmButton && "u-modal__button-group__wrapper--only-confirm"]]), "hover-stay-time": 150, "hover-class": "u-modal__button-group__wrapper--hover", onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args)) }, [ $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-modal__button-group__wrapper__text", style: vue.normalizeStyle({ color: _ctx.confirmColor }) }, vue.toDisplayString(_ctx.confirmText), 5 /* TEXT, STYLE */ )) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 64 /* STABLE_FRAGMENT */ )) ], 4 /* STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]); } const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$2d, [["render", _sfc_render$2q], ["__scopeId", "data-v-f667648f"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]); 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); } } /*! * vuex v4.1.0 * (c) 2022 Evan You * @license MIT */ var storeKey = "store"; function forEachValue(obj, fn) { Object.keys(obj).forEach(function(key) { return fn(obj[key], key); }); } function isObject$1(obj) { return obj !== null && typeof obj === "object"; } function isPromise(val) { return val && typeof val.then === "function"; } function assert(condition, msg) { if (!condition) { throw new Error("[vuex] " + msg); } } function partial(fn, arg) { return function() { return fn(arg); }; } function genericSubscribe(fn, subs, options) { if (subs.indexOf(fn) < 0) { options && options.prepend ? subs.unshift(fn) : subs.push(fn); } return function() { var i = subs.indexOf(fn); if (i > -1) { subs.splice(i, 1); } }; } function resetStore(store2, hot) { store2._actions = /* @__PURE__ */ Object.create(null); store2._mutations = /* @__PURE__ */ Object.create(null); store2._wrappedGetters = /* @__PURE__ */ Object.create(null); store2._modulesNamespaceMap = /* @__PURE__ */ Object.create(null); var state2 = store2.state; installModule(store2, state2, [], store2._modules.root, true); resetStoreState(store2, state2, hot); } function resetStoreState(store2, state2, hot) { var oldState = store2._state; var oldScope = store2._scope; store2.getters = {}; store2._makeLocalGettersCache = /* @__PURE__ */ Object.create(null); var wrappedGetters = store2._wrappedGetters; var computedObj = {}; var computedCache = {}; var scope = vue.effectScope(true); scope.run(function() { forEachValue(wrappedGetters, function(fn, key) { computedObj[key] = partial(fn, store2); computedCache[key] = vue.computed(function() { return computedObj[key](); }); Object.defineProperty(store2.getters, key, { get: function() { return computedCache[key].value; }, enumerable: true // for local getters }); }); }); store2._state = vue.reactive({ data: state2 }); store2._scope = scope; if (store2.strict) { enableStrictMode(store2); } if (oldState) { if (hot) { store2._withCommit(function() { oldState.data = null; }); } } if (oldScope) { oldScope.stop(); } } function installModule(store2, rootState, path, module, hot) { var isRoot = !path.length; var namespace = store2._modules.getNamespace(path); if (module.namespaced) { if (store2._modulesNamespaceMap[namespace] && true) { console.error("[vuex] duplicate namespace " + namespace + " for the namespaced module " + path.join("/")); } store2._modulesNamespaceMap[namespace] = module; } if (!isRoot && !hot) { var parentState = getNestedState(rootState, path.slice(0, -1)); var moduleName = path[path.length - 1]; store2._withCommit(function() { { if (moduleName in parentState) { console.warn( '[vuex] state field "' + moduleName + '" was overridden by a module with the same name at "' + path.join(".") + '"' ); } } parentState[moduleName] = module.state; }); } var local = module.context = makeLocalContext(store2, namespace, path); module.forEachMutation(function(mutation, key) { var namespacedType = namespace + key; registerMutation(store2, namespacedType, mutation, local); }); module.forEachAction(function(action, key) { var type2 = action.root ? key : namespace + key; var handler = action.handler || action; registerAction(store2, type2, handler, local); }); module.forEachGetter(function(getter, key) { var namespacedType = namespace + key; registerGetter(store2, namespacedType, getter, local); }); module.forEachChild(function(child, key) { installModule(store2, rootState, path.concat(key), child, hot); }); } function makeLocalContext(store2, namespace, path) { var noNamespace = namespace === ""; var local = { dispatch: noNamespace ? store2.dispatch : function(_type, _payload, _options) { var args = unifyObjectStyle(_type, _payload, _options); var payload = args.payload; var options = args.options; var type2 = args.type; if (!options || !options.root) { type2 = namespace + type2; if (!store2._actions[type2]) { console.error("[vuex] unknown local action type: " + args.type + ", global type: " + type2); return; } } return store2.dispatch(type2, payload); }, commit: noNamespace ? store2.commit : function(_type, _payload, _options) { var args = unifyObjectStyle(_type, _payload, _options); var payload = args.payload; var options = args.options; var type2 = args.type; if (!options || !options.root) { type2 = namespace + type2; if (!store2._mutations[type2]) { console.error("[vuex] unknown local mutation type: " + args.type + ", global type: " + type2); return; } } store2.commit(type2, payload, options); } }; Object.defineProperties(local, { getters: { get: noNamespace ? function() { return store2.getters; } : function() { return makeLocalGetters(store2, namespace); } }, state: { get: function() { return getNestedState(store2.state, path); } } }); return local; } function makeLocalGetters(store2, namespace) { if (!store2._makeLocalGettersCache[namespace]) { var gettersProxy = {}; var splitPos = namespace.length; Object.keys(store2.getters).forEach(function(type2) { if (type2.slice(0, splitPos) !== namespace) { return; } var localType = type2.slice(splitPos); Object.defineProperty(gettersProxy, localType, { get: function() { return store2.getters[type2]; }, enumerable: true }); }); store2._makeLocalGettersCache[namespace] = gettersProxy; } return store2._makeLocalGettersCache[namespace]; } function registerMutation(store2, type2, handler, local) { var entry = store2._mutations[type2] || (store2._mutations[type2] = []); entry.push(function wrappedMutationHandler(payload) { handler.call(store2, local.state, payload); }); } function registerAction(store2, type2, handler, local) { var entry = store2._actions[type2] || (store2._actions[type2] = []); entry.push(function wrappedActionHandler(payload) { var res = handler.call(store2, { dispatch: local.dispatch, commit: local.commit, getters: local.getters, state: local.state, rootGetters: store2.getters, rootState: store2.state }, payload); if (!isPromise(res)) { res = Promise.resolve(res); } if (store2._devtoolHook) { return res.catch(function(err) { store2._devtoolHook.emit("vuex:error", err); throw err; }); } else { return res; } }); } function registerGetter(store2, type2, rawGetter, local) { if (store2._wrappedGetters[type2]) { { console.error("[vuex] duplicate getter key: " + type2); } return; } store2._wrappedGetters[type2] = function wrappedGetter(store22) { return rawGetter( local.state, // local state local.getters, // local getters store22.state, // root state store22.getters // root getters ); }; } function enableStrictMode(store2) { vue.watch(function() { return store2._state.data; }, function() { { assert(store2._committing, "do not mutate vuex store state outside mutation handlers."); } }, { deep: true, flush: "sync" }); } function getNestedState(state2, path) { return path.reduce(function(state22, key) { return state22[key]; }, state2); } function unifyObjectStyle(type2, payload, options) { if (isObject$1(type2) && type2.type) { options = payload; payload = type2; type2 = type2.type; } { assert(typeof type2 === "string", "expects string as the type, but found " + typeof type2 + "."); } return { type: type2, payload, options }; } var LABEL_VUEX_BINDINGS = "vuex bindings"; var MUTATIONS_LAYER_ID = "vuex:mutations"; var ACTIONS_LAYER_ID = "vuex:actions"; var INSPECTOR_ID = "vuex"; var actionId = 0; function addDevtools(app, store2) { setupDevtoolsPlugin( { id: "org.vuejs.vuex", app, label: "Vuex", homepage: "https://next.vuex.vuejs.org/", logo: "https://vuejs.org/images/icons/favicon-96x96.png", packageName: "vuex", componentStateTypes: [LABEL_VUEX_BINDINGS] }, function(api) { api.addTimelineLayer({ id: MUTATIONS_LAYER_ID, label: "Vuex Mutations", color: COLOR_LIME_500 }); api.addTimelineLayer({ id: ACTIONS_LAYER_ID, label: "Vuex Actions", color: COLOR_LIME_500 }); api.addInspector({ id: INSPECTOR_ID, label: "Vuex", icon: "storage", treeFilterPlaceholder: "Filter stores..." }); api.on.getInspectorTree(function(payload) { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { if (payload.filter) { var nodes = []; flattenStoreForInspectorTree(nodes, store2._modules.root, payload.filter, ""); payload.rootNodes = nodes; } else { payload.rootNodes = [ formatStoreForInspectorTree(store2._modules.root, "") ]; } } }); api.on.getInspectorState(function(payload) { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { var modulePath = payload.nodeId; makeLocalGetters(store2, modulePath); payload.state = formatStoreForInspectorState( getStoreModule(store2._modules, modulePath), modulePath === "root" ? store2.getters : store2._makeLocalGettersCache, modulePath ); } }); api.on.editInspectorState(function(payload) { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { var modulePath = payload.nodeId; var path = payload.path; if (modulePath !== "root") { path = modulePath.split("/").filter(Boolean).concat(path); } store2._withCommit(function() { payload.set(store2._state.data, path, payload.state.value); }); } }); store2.subscribe(function(mutation, state2) { var data = {}; if (mutation.payload) { data.payload = mutation.payload; } data.state = state2; api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: Date.now(), title: mutation.type, data } }); }); store2.subscribeAction({ before: function(action, state2) { var data = {}; if (action.payload) { data.payload = action.payload; } action._id = actionId++; action._time = Date.now(); data.state = state2; api.addTimelineEvent({ layerId: ACTIONS_LAYER_ID, event: { time: action._time, title: action.type, groupId: action._id, subtitle: "start", data } }); }, after: function(action, state2) { var data = {}; var duration = Date.now() - action._time; data.duration = { _custom: { type: "duration", display: duration + "ms", tooltip: "Action duration", value: duration } }; if (action.payload) { data.payload = action.payload; } data.state = state2; api.addTimelineEvent({ layerId: ACTIONS_LAYER_ID, event: { time: Date.now(), title: action.type, groupId: action._id, subtitle: "end", data } }); } }); } ); } var COLOR_LIME_500 = 8702998; var COLOR_DARK = 6710886; var COLOR_WHITE = 16777215; var TAG_NAMESPACED = { label: "namespaced", textColor: COLOR_WHITE, backgroundColor: COLOR_DARK }; function extractNameFromPath(path) { return path && path !== "root" ? path.split("/").slice(-2, -1)[0] : "Root"; } function formatStoreForInspectorTree(module, path) { return { id: path || "root", // all modules end with a `/`, we want the last segment only // cart/ -> cart // nested/cart/ -> cart label: extractNameFromPath(path), tags: module.namespaced ? [TAG_NAMESPACED] : [], children: Object.keys(module._children).map( function(moduleName) { return formatStoreForInspectorTree( module._children[moduleName], path + moduleName + "/" ); } ) }; } function flattenStoreForInspectorTree(result, module, filter, path) { if (path.includes(filter)) { result.push({ id: path || "root", label: path.endsWith("/") ? path.slice(0, path.length - 1) : path || "Root", tags: module.namespaced ? [TAG_NAMESPACED] : [] }); } Object.keys(module._children).forEach(function(moduleName) { flattenStoreForInspectorTree(result, module._children[moduleName], filter, path + moduleName + "/"); }); } function formatStoreForInspectorState(module, getters, path) { getters = path === "root" ? getters : getters[path]; var gettersKeys = Object.keys(getters); var storeState = { state: Object.keys(module.state).map(function(key) { return { key, editable: true, value: module.state[key] }; }) }; if (gettersKeys.length) { var tree = transformPathsToObjectTree(getters); storeState.getters = Object.keys(tree).map(function(key) { return { key: key.endsWith("/") ? extractNameFromPath(key) : key, editable: false, value: canThrow(function() { return tree[key]; }) }; }); } return storeState; } function transformPathsToObjectTree(getters) { var result = {}; Object.keys(getters).forEach(function(key) { var path = key.split("/"); if (path.length > 1) { var target = result; var leafKey = path.pop(); path.forEach(function(p) { if (!target[p]) { target[p] = { _custom: { value: {}, display: p, tooltip: "Module", abstract: true } }; } target = target[p]._custom.value; }); target[leafKey] = canThrow(function() { return getters[key]; }); } else { result[key] = canThrow(function() { return getters[key]; }); } }); return result; } function getStoreModule(moduleMap, path) { var names = path.split("/").filter(function(n) { return n; }); return names.reduce( function(module, moduleName, i) { var child = module[moduleName]; if (!child) { throw new Error('Missing module "' + moduleName + '" for path "' + path + '".'); } return i === names.length - 1 ? child : child._children; }, path === "root" ? moduleMap : moduleMap.root._children ); } function canThrow(cb) { try { return cb(); } catch (e) { return e; } } var Module = function Module2(rawModule, runtime) { this.runtime = runtime; this._children = /* @__PURE__ */ Object.create(null); this._rawModule = rawModule; var rawState = rawModule.state; this.state = (typeof rawState === "function" ? rawState() : rawState) || {}; }; var prototypeAccessors$1 = { namespaced: { configurable: true } }; prototypeAccessors$1.namespaced.get = function() { return !!this._rawModule.namespaced; }; Module.prototype.addChild = function addChild(key, module) { this._children[key] = module; }; Module.prototype.removeChild = function removeChild(key) { delete this._children[key]; }; Module.prototype.getChild = function getChild(key) { return this._children[key]; }; Module.prototype.hasChild = function hasChild(key) { return key in this._children; }; Module.prototype.update = function update(rawModule) { this._rawModule.namespaced = rawModule.namespaced; if (rawModule.actions) { this._rawModule.actions = rawModule.actions; } if (rawModule.mutations) { this._rawModule.mutations = rawModule.mutations; } if (rawModule.getters) { this._rawModule.getters = rawModule.getters; } }; Module.prototype.forEachChild = function forEachChild(fn) { forEachValue(this._children, fn); }; Module.prototype.forEachGetter = function forEachGetter(fn) { if (this._rawModule.getters) { forEachValue(this._rawModule.getters, fn); } }; Module.prototype.forEachAction = function forEachAction(fn) { if (this._rawModule.actions) { forEachValue(this._rawModule.actions, fn); } }; Module.prototype.forEachMutation = function forEachMutation(fn) { if (this._rawModule.mutations) { forEachValue(this._rawModule.mutations, fn); } }; Object.defineProperties(Module.prototype, prototypeAccessors$1); var ModuleCollection = function ModuleCollection2(rawRootModule) { this.register([], rawRootModule, false); }; ModuleCollection.prototype.get = function get(path) { return path.reduce(function(module, key) { return module.getChild(key); }, this.root); }; ModuleCollection.prototype.getNamespace = function getNamespace(path) { var module = this.root; return path.reduce(function(namespace, key) { module = module.getChild(key); return namespace + (module.namespaced ? key + "/" : ""); }, ""); }; ModuleCollection.prototype.update = function update$1(rawRootModule) { update2([], this.root, rawRootModule); }; ModuleCollection.prototype.register = function register(path, rawModule, runtime) { var this$1$1 = this; if (runtime === void 0) runtime = true; { assertRawModule(path, rawModule); } var newModule = new Module(rawModule, runtime); if (path.length === 0) { this.root = newModule; } else { var parent = this.get(path.slice(0, -1)); parent.addChild(path[path.length - 1], newModule); } if (rawModule.modules) { forEachValue(rawModule.modules, function(rawChildModule, key) { this$1$1.register(path.concat(key), rawChildModule, runtime); }); } }; ModuleCollection.prototype.unregister = function unregister(path) { var parent = this.get(path.slice(0, -1)); var key = path[path.length - 1]; var child = parent.getChild(key); if (!child) { { console.warn( "[vuex] trying to unregister module '" + key + "', which is not registered" ); } return; } if (!child.runtime) { return; } parent.removeChild(key); }; ModuleCollection.prototype.isRegistered = function isRegistered(path) { var parent = this.get(path.slice(0, -1)); var key = path[path.length - 1]; if (parent) { return parent.hasChild(key); } return false; }; function update2(path, targetModule, newModule) { { assertRawModule(path, newModule); } targetModule.update(newModule); if (newModule.modules) { for (var key in newModule.modules) { if (!targetModule.getChild(key)) { { console.warn( "[vuex] trying to add a new module '" + key + "' on hot reloading, manual reload is needed" ); } return; } update2( path.concat(key), targetModule.getChild(key), newModule.modules[key] ); } } } var functionAssert = { assert: function(value2) { return typeof value2 === "function"; }, expected: "function" }; var objectAssert = { assert: function(value2) { return typeof value2 === "function" || typeof value2 === "object" && typeof value2.handler === "function"; }, expected: 'function or object with "handler" function' }; var assertTypes = { getters: functionAssert, mutations: functionAssert, actions: objectAssert }; function assertRawModule(path, rawModule) { Object.keys(assertTypes).forEach(function(key) { if (!rawModule[key]) { return; } var assertOptions = assertTypes[key]; forEachValue(rawModule[key], function(value2, type2) { assert( assertOptions.assert(value2), makeAssertionMessage(path, key, type2, value2, assertOptions.expected) ); }); }); } function makeAssertionMessage(path, key, type2, value2, expected) { var buf = key + " should be " + expected + ' but "' + key + "." + type2 + '"'; if (path.length > 0) { buf += ' in module "' + path.join(".") + '"'; } buf += " is " + JSON.stringify(value2) + "."; return buf; } function createStore(options) { return new Store(options); } var Store = function Store2(options) { var this$1$1 = this; if (options === void 0) options = {}; { assert(typeof Promise !== "undefined", "vuex requires a Promise polyfill in this browser."); assert(this instanceof Store2, "store must be called with the new operator."); } var plugins2 = options.plugins; if (plugins2 === void 0) plugins2 = []; var strict = options.strict; if (strict === void 0) strict = false; var devtools = options.devtools; this._committing = false; this._actions = /* @__PURE__ */ Object.create(null); this._actionSubscribers = []; this._mutations = /* @__PURE__ */ Object.create(null); this._wrappedGetters = /* @__PURE__ */ Object.create(null); this._modules = new ModuleCollection(options); this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null); this._subscribers = []; this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null); this._scope = null; this._devtools = devtools; var store2 = this; var ref = this; var dispatch2 = ref.dispatch; var commit2 = ref.commit; this.dispatch = function boundDispatch(type2, payload) { return dispatch2.call(store2, type2, payload); }; this.commit = function boundCommit(type2, payload, options2) { return commit2.call(store2, type2, payload, options2); }; this.strict = strict; var state2 = this._modules.root.state; installModule(this, state2, [], this._modules.root); resetStoreState(this, state2); plugins2.forEach(function(plugin) { return plugin(this$1$1); }); }; var prototypeAccessors = { state: { configurable: true } }; Store.prototype.install = function install2(app, injectKey) { app.provide(injectKey || storeKey, this); app.config.globalProperties.$store = this; var useDevtools = this._devtools !== void 0 ? this._devtools : true; if (useDevtools) { addDevtools(app, this); } }; prototypeAccessors.state.get = function() { return this._state.data; }; prototypeAccessors.state.set = function(v) { { assert(false, "use store.replaceState() to explicit replace store state."); } }; Store.prototype.commit = function commit(_type, _payload, _options) { var this$1$1 = this; var ref = unifyObjectStyle(_type, _payload, _options); var type2 = ref.type; var payload = ref.payload; var options = ref.options; var mutation = { type: type2, payload }; var entry = this._mutations[type2]; if (!entry) { { console.error("[vuex] unknown mutation type: " + type2); } return; } this._withCommit(function() { entry.forEach(function commitIterator(handler) { handler(payload); }); }); this._subscribers.slice().forEach(function(sub) { return sub(mutation, this$1$1.state); }); if (options && options.silent) { console.warn( "[vuex] mutation type: " + type2 + ". Silent option has been removed. Use the filter functionality in the vue-devtools" ); } }; Store.prototype.dispatch = function dispatch(_type, _payload) { var this$1$1 = this; var ref = unifyObjectStyle(_type, _payload); var type2 = ref.type; var payload = ref.payload; var action = { type: type2, payload }; var entry = this._actions[type2]; if (!entry) { { console.error("[vuex] unknown action type: " + type2); } return; } try { this._actionSubscribers.slice().filter(function(sub) { return sub.before; }).forEach(function(sub) { return sub.before(action, this$1$1.state); }); } catch (e) { { console.warn("[vuex] error in before action subscribers: "); console.error(e); } } var result = entry.length > 1 ? Promise.all(entry.map(function(handler) { return handler(payload); })) : entry[0](payload); return new Promise(function(resolve, reject2) { result.then(function(res) { try { this$1$1._actionSubscribers.filter(function(sub) { return sub.after; }).forEach(function(sub) { return sub.after(action, this$1$1.state); }); } catch (e) { { console.warn("[vuex] error in after action subscribers: "); console.error(e); } } resolve(res); }, function(error2) { try { this$1$1._actionSubscribers.filter(function(sub) { return sub.error; }).forEach(function(sub) { return sub.error(action, this$1$1.state, error2); }); } catch (e) { { console.warn("[vuex] error in error action subscribers: "); console.error(e); } } reject2(error2); }); }); }; Store.prototype.subscribe = function subscribe(fn, options) { return genericSubscribe(fn, this._subscribers, options); }; Store.prototype.subscribeAction = function subscribeAction(fn, options) { var subs = typeof fn === "function" ? { before: fn } : fn; return genericSubscribe(subs, this._actionSubscribers, options); }; Store.prototype.watch = function watch$1(getter, cb, options) { var this$1$1 = this; { assert(typeof getter === "function", "store.watch only accepts a function."); } return vue.watch(function() { return getter(this$1$1.state, this$1$1.getters); }, cb, Object.assign({}, options)); }; Store.prototype.replaceState = function replaceState(state2) { var this$1$1 = this; this._withCommit(function() { this$1$1._state.data = state2; }); }; Store.prototype.registerModule = function registerModule(path, rawModule, options) { if (options === void 0) options = {}; if (typeof path === "string") { path = [path]; } { assert(Array.isArray(path), "module path must be a string or an Array."); assert(path.length > 0, "cannot register the root module by using registerModule."); } this._modules.register(path, rawModule); installModule(this, this.state, path, this._modules.get(path), options.preserveState); resetStoreState(this, this.state); }; Store.prototype.unregisterModule = function unregisterModule(path) { var this$1$1 = this; if (typeof path === "string") { path = [path]; } { assert(Array.isArray(path), "module path must be a string or an Array."); } this._modules.unregister(path); this._withCommit(function() { var parentState = getNestedState(this$1$1.state, path.slice(0, -1)); delete parentState[path[path.length - 1]]; }); resetStore(this); }; Store.prototype.hasModule = function hasModule(path) { if (typeof path === "string") { path = [path]; } { assert(Array.isArray(path), "module path must be a string or an Array."); } return this._modules.isRegistered(path); }; Store.prototype.hotUpdate = function hotUpdate(newOptions) { this._modules.update(newOptions); resetStore(this, true); }; Store.prototype._withCommit = function _withCommit(fn) { var committing = this._committing; this._committing = true; fn(); this._committing = committing; }; Object.defineProperties(Store.prototype, prototypeAccessors); const state = { isLogin: false, conversationList: [], messageList: [], conversation: {}, conversationID: "", scrollTop: 0 }; const timStore = { namespaced: true, state, getters: { userInfo: (state2) => { return state2.userInfo; } }, mutations: { setscrollTop(state2, payload) { state2.scrollTop = payload; }, setImType(state2, payload) { state2.imType = payload; }, setType(state2, payload) { state2.type = payload; }, setOrderId(state2, payload) { state2.orderId = payload; }, setFollowId(state2, payload) { state2.followId = payload; }, setOrderType(state2, payload) { state2.orderType = payload; }, setConversationList(state2, payload) { state2.conversationList = payload; }, setConversation(state2, payload) { state2.conversation = payload; }, setConversationID(state2, payload) { state2.conversationID = payload; }, resetConversationID(state2) { state2.conversationID = ""; }, setMessageList(state2, payload) { state2.messageList = payload; }, resetChat(state2) { state2.messageList = []; } }, actions: { // } }; const modules = { timStore }; const store = createStore({ modules }); let request$f = new Request$1().http; function getUserFollowDoctor() { return request$f("/app/drugReport/getUserFollowDoctor", null, "GET"); } function getDrugReportList(data) { return request$f("/app/drugReport/getDrugReportList", data, "GET"); } function getDrugReportById(data) { return request$f("/app/drugReport/getDrugReportById", data, "GET"); } function pingReport(data) { return request$f("/app/drugReport/pingReport", data, "POST", "application/json;charset=UTF-8"); } function startDrugReport(data) { return request$f("/app/drugReport/startDrugReport", data, "POST", "application/json;charset=UTF-8"); } const _sfc_main$2c = { data() { return { isLogin: false, show: false, statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, user: { nickName: "登录/注册", phone: "", integral: 0, balance: 0 } }; }, onLoad() { }, onShow() { this.$isLogin().then( (res) => { if (res) { this.getUserInfo(); } }, (rej) => { } ); }, onReachBottom() { }, onPageScroll(e) { }, methods: { doIM() { formatAppLog("log", "at pages/user/index.vue:204", 110); getUserFollowDoctor().then( (res) => { if (res.code == 200) { if (res.data != null) { var data = { followId: res.data.followId }; startDrugReport(data).then( (res2) => { uni.switchTab({ url: "/pages/TUIKit/TUIPages/TUIConversation/index" }); }, (rej) => { } ); } else { uni.showToast({ icon: "none", title: "当前没有药师为您服务" }); } } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, toIM() { var that = this; this.$isLogin().then( (res) => { formatAppLog("log", "at pages/user/index.vue:273", res); if (res) { that.doIM(); } else { uni.navigateTo({ url: "/pages/auth/login" }); } } ); }, callPhone() { uni.makePhoneCall({ phoneNumber: "18696558100" }); }, toCompany() { this.$isLogin().then( (res) => { formatAppLog("log", "at pages/user/index.vue:293", res); if (res) { var token = uni.getStorageSync("CompanyUserToken"); if (token) { uni.navigateTo({ url: "/pages_company/index" }); } else { uni.navigateTo({ url: "/pages_company/login" }); } } else { uni.navigateTo({ url: "/pages/auth/login" }); } } ); }, showLogout() { this.show = true; }, hideLogout() { this.show = false; }, logout() { this.$logout(); uni.$TUIKit.logout(); if (uni.$TUICallKit != null) { uni.$TUICallKit.logout(); } uni.reLaunch({ url: "/pages/index/index", animationType: "pop-in", animationDuration: 100 }); this.isLogin = false; }, getUserInfo() { getUserInfo$1().then( (res) => { if (res.code == 200) { if (res.user != null) { this.isLogin = true; this.user = res.user; } } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, navTo(url2) { this.$isLogin().then( (res) => { formatAppLog("log", "at pages/user/index.vue:354", res); if (res) { uni.navigateTo({ url: url2 }); } else { uni.navigateTo({ url: "/pages/auth/login" }); } } ); } } }; function _sfc_render$2p(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_0$9); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "bg" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/bbe743373f4d4b78852ea5fd9824ade4.png" }) ]), vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "top-title" }), vue.createElementVNode("view", { class: "user", onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.navTo("/pages_user/personInfo"), ["stop"])) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: $data.user.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/90d9eb0f8f87482b977611eb36b66d82.jpg" : $data.user.avatar }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "name-box" }, [ vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString($data.user.nickName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode("image", { src: "/static/images/icon_set.png" }) ]) ]), $data.user.phone != "" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "phone" }, vue.toDisplayString(_ctx.$parsePhone($data.user.phone)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "counts" }, [ vue.createElementVNode( "view", { class: "count", onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_user/integral")) }, "积分 " + vue.toDisplayString($data.user.integral), 1 /* TEXT */ ), vue.createCommentVNode(' 我的健康金 {{user.balance}} ') ]) ]) ]), vue.createElementVNode("view", { class: "menus" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "我的订单") ]), vue.createElementVNode("view", { class: "menu-box" }, [ vue.createElementVNode("view", { class: "menu", onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_order/inquiryOrderList")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_inquiry_order.png" }), vue.createElementVNode("view", { class: "title" }, "问诊订单") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/storeOrderList")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_store_order.png" }), vue.createElementVNode("view", { class: "title" }, "处方订单") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("/pages_order/packageOrderList")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_qianyue.png" }), vue.createElementVNode("view", { class: "title" }, "服务包") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_order/storeOrderRefundList")) }, [ vue.createElementVNode("image", { src: "/static/images/sales_orders_icon.png" }), vue.createElementVNode("view", { class: "title" }, "售后服务") ]) ]) ]), vue.createElementVNode("view", { class: "menus" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "医疗服务") ]), vue.createElementVNode("view", { class: "menu-box" }, [ vue.createElementVNode("view", { class: "menu", onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("/pages_user/myDoctorList")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_my_doctor.png" }), vue.createElementVNode("view", { class: "title" }, "我的医生") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("/pages_order/prescribeList")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_my_prescription.png" }), vue.createElementVNode("view", { class: "title" }, "我的处方") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[8] || (_cache[8] = ($event) => $options.navTo("/pages_user/followList")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_my_follow.png" }), vue.createElementVNode("view", { class: "title" }, "我的随访") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[9] || (_cache[9] = ($event) => $options.toIM()) }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240429/6e68b42d9d824532945a1dda73350576.png" }), vue.createElementVNode("view", { class: "title" }, "用药咨询") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[10] || (_cache[10] = ($event) => $options.navTo("/pages_user/drugReportList")) }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240429/6b9f340b16e74fa2bc095265d525769e.png" }), vue.createElementVNode("view", { class: "title" }, "用药报告") ]) ]) ]), vue.createElementVNode("view", { class: "menus" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "常用应用") ]), vue.createElementVNode("view", { class: "menu-box" }, [ vue.createElementVNode("view", { class: "menu", onClick: _cache[11] || (_cache[11] = ($event) => $options.navTo("/pages_user/patient")) }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/icon_visitor_management.png" }), vue.createElementVNode("view", { class: "title" }, "就诊人管理") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[12] || (_cache[12] = ($event) => $options.navTo("/pages_user/address")) }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/icon_address_management.png" }), vue.createElementVNode("view", { class: "title" }, "地址管理") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[13] || (_cache[13] = ($event) => $options.navTo("/pages_order/inquiryOrderPingList")) }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/icon_my_comments.png" }), vue.createElementVNode("view", { class: "title" }, "我的评论") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[14] || (_cache[14] = ($event) => $options.navTo("/pages_user/myCouponList")) }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/icon_my_coupon.png" }), vue.createElementVNode("view", { class: "title" }, "我的优惠卷") ]) ]), vue.createElementVNode("view", { class: "menu-box" }, [ vue.createElementVNode("view", { class: "menu", onClick: _cache[15] || (_cache[15] = ($event) => $options.navTo("/pages_company/couponList?couponType=6")) }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/icon_coupon.png" }), vue.createElementVNode("view", { class: "title" }, "领券中心") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[16] || (_cache[16] = ($event) => $options.navTo("/pages_user/cert")) }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/cert.png" }), vue.createElementVNode("view", { class: "title" }, "资质证书") ]), vue.createElementVNode("view", { class: "menu" }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/icon_service_center.png" }), vue.createElementVNode("view", { class: "title" }, "客服中心"), vue.createElementVNode("button", { class: "contact-btn", "open-type": "contact" }) ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[17] || (_cache[17] = ($event) => $options.navTo("/pages_user/about")) }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/icon_feedback.png" }), vue.createElementVNode("view", { class: "title" }, "关于我们") ]) ]) ]), vue.createElementVNode("view", { class: "menus" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "管理端") ]), vue.createElementVNode("view", { class: "menu-box" }, [ vue.createElementVNode("view", { class: "menu", onClick: _cache[18] || (_cache[18] = ($event) => $options.navTo("/pages_user/registerDoctor?type=1")) }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/doctor_reg.png" }), vue.createElementVNode("view", { class: "title" }, "医生入驻") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[19] || (_cache[19] = ($event) => $options.navTo("/pages_user/registerDoctor?type=2")) }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/doctor_reg.png" }), vue.createElementVNode("view", { class: "title" }, "药师入驻") ]), vue.createElementVNode("view", { class: "menu", onClick: _cache[20] || (_cache[20] = ($event) => $options.toCompany()) }, [ vue.createElementVNode("image", { class: "min-image", src: "/static/images/sales.png" }), vue.createElementVNode("view", { class: "title" }, "客服端") ]) ]) ]), $data.isLogin ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn-box" }, [ vue.createElementVNode("view", { class: "sub-btn", onClick: _cache[21] || (_cache[21] = ($event) => $options.showLogout()) }, "退出登录") ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "tip" }, [ vue.createElementVNode("view", { class: "title" }, "技术支持 重庆云联融智科技有限公司 "), vue.createCommentVNode(' 联系电话 18696558100 ') ]) ]) ]), vue.createVNode(_component_u_modal, { show: $data.show, title: "提示", showCancelButton: true, onCancel: _cache[22] || (_cache[22] = ($event) => $options.hideLogout()), onConfirm: _cache[23] || (_cache[23] = ($event) => $options.logout()), content: "确认退出吗?" }, null, 8, ["show"]) ]); } const PagesUserIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2c, [["render", _sfc_render$2p], ["__scopeId", "data-v-79e6a490"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/user/index.vue"]]); function formatTime(secondTime) { const time = secondTime; let newTime; let hour; let minite; let seconds; if (time >= 3600) { hour = parseInt(`${time / 3600}`, 10) < 10 ? `0${parseInt(`${time / 3600}`, 10)}` : parseInt(`${time / 3600}`, 10); minite = parseInt(`${time % 60 / 60}`, 10) < 10 ? `0${parseInt(`${time % 60 / 60}`, 10)}` : parseInt(`${time % 60 / 60}`, 10); seconds = time % 3600 < 10 ? `0${time % 3600}` : time % 3600; if (seconds > 60) { minite = parseInt(`${seconds / 60}`, 10) < 10 ? `0${parseInt(`${seconds / 60}`, 10)}` : parseInt(`${seconds / 60}`, 10); seconds = seconds % 60 < 10 ? `0${seconds % 60}` : seconds % 60; } newTime = `${hour}:${minite}:${seconds}`; } else if (time >= 60 && time < 3600) { minite = parseInt(`${time / 60}`, 10) < 10 ? `0${parseInt(`${time / 60}`, 10)}` : parseInt(`${time / 60}`, 10); seconds = time % 60 < 10 ? `0${time % 60}` : time % 60; newTime = `00:${minite}:${seconds}`; } else if (time < 60) { seconds = time < 10 ? `0${time}` : time; newTime = `00:00:${seconds}`; } return newTime; } function caculateTimeago(dateTimeStamp) { const minute = 1e3 * 60; const hour = minute * 60; const day = hour * 24; const week = day * 7; const now = (/* @__PURE__ */ new Date()).getTime(); const diffValue = now - dateTimeStamp; let result = ""; if (diffValue < 0) { return; } const minC = diffValue / minute; const hourC = diffValue / hour; const dayC = diffValue / day; const weekC = diffValue / week; if (weekC >= 1 && weekC <= 4) { result = ` ${parseInt(`${weekC}`, 10)}周前`; } else if (dayC >= 1 && dayC <= 6) { result = ` ${parseInt(`${dayC}`, 10)}天前`; } else if (hourC >= 1 && hourC <= 23) { result = ` ${parseInt(`${hourC}`, 10)}小时前`; } else if (minC >= 1 && minC <= 59) { result = ` ${parseInt(`${minC}`, 10)}分钟前`; } else if (diffValue >= 0 && diffValue <= minute) { result = "刚刚"; } else { const datetime = /* @__PURE__ */ new Date(); datetime.setTime(dateTimeStamp); const Nyear = datetime.getFullYear(); const Nmonth = datetime.getMonth() + 1 < 10 ? `0${datetime.getMonth() + 1}` : datetime.getMonth() + 1; const Ndate = datetime.getDate() < 10 ? `0${datetime.getDate()}` : datetime.getDate(); result = `${Nyear}-${Nmonth}-${Ndate}`; } return result; } const TUIConversationList$1 = vue.defineComponent({ props: { conversationList: { type: Array, default: () => { return []; } }, currentID: { type: String, default: () => { return ""; } } }, setup(props2, ctx) { const obj = vue.reactive({ conversationList: [], currentID: "", isOpened: "none", currentConversation: {}, dialogID: "" }); vue.watchEffect(() => { obj.conversationList = props2.conversationList; obj.currentID = props2.currentID; }); const handleItemAvator = (item) => { var _a, _b, _c; let avatar = ""; switch (item.type) { case uni.$TIM.TYPES.CONV_C2C: avatar = ((_a = item == null ? void 0 : item.userProfile) == null ? void 0 : _a.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png"; break; case uni.$TIM.TYPES.CONV_GROUP: avatar = ((_b = item == null ? void 0 : item.groupProfile) == null ? void 0 : _b.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png"; break; case uni.$TIM.TYPES.CONV_SYSTEM: avatar = ((_c = item == null ? void 0 : item.groupProfile) == null ? void 0 : _c.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png"; break; } return avatar; }; const handleItemName = (item) => { var _a, _b; let name = ""; switch (item.type) { case uni.$TIM.TYPES.CONV_C2C: name = (item == null ? void 0 : item.userProfile.nick) || ((_a = item == null ? void 0 : item.userProfile) == null ? void 0 : _a.userID) || ""; break; case uni.$TIM.TYPES.CONV_GROUP: name = item.groupProfile.name || ((_b = item == null ? void 0 : item.groupProfile) == null ? void 0 : _b.groupID) || ""; break; case uni.$TIM.TYPES.CONV_SYSTEM: name = "系统通知"; break; } return name; }; const handleItemTime = (time) => { if (time > 0) { return caculateTimeago(time * 1e3); } return ""; }; const handleItemMessage = (message) => { switch (message.type) { case uni.$TIM.TYPES.MSG_TEXT: return message.payload.text; default: return message.messageForShow; } }; const handleGotoItem = (item) => { ctx.emit("handleGotoItem", item); }; const handleItemLongpress = (item) => { obj.currentConversation = item; obj.dialogID = item.conversationID; if (item.type === "C2C") { obj.currentuserID = item.userProfile.userID; } else if (item.type === "GROUP") { obj.currentuserID = item.groupProfile.groupID; } obj.conversationType = item.type; }; const handlerIsOpened = (item) => { if (item.conversationID === obj.doalogID) { return "right"; } else { return "none"; } }; const handleConversation = (type2) => { switch (type2) { case "delete": uni.$TUIKit.TUIConversationServer.deleteConversation( obj.dialogID ).then((imResponse) => { imResponse.data; }); obj.dialogID = ""; break; case "ispinned": if (type2 === "ispinned") { const options = { conversationID: obj.dialogID, isPinned: true }; uni.$TUIKit.TUIConversationServer.pinConversation(options).then( (imResponse) => { formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:239", imResponse); } ); } obj.dialogID = ""; break; case "dispinned": if (type2 === "dispinned") { const options = { conversationID: obj.dialogID, isPinned: false }; uni.$TUIKit.TUIConversationServer.pinConversation(options).then( (imResponse) => { } ); } obj.dialogID = ""; break; case "mute": if (type2 === "mute" && obj.conversationType === "C2C") { const options = { userIDList: [obj.currentuserID], messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_NOT_NOTE }; uni.$TUIKit.TUIConversationServer.muteConversation(options).then( (imResponse) => { formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:265", imResponse); } ); } else if (type2 === "mute" && obj.conversationType === "GROUP") { const options = { groupID: obj.currentuserID, messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_NOT_NOTE }; uni.$TUIKit.TUIConversationServer.muteConversation(options).then( (imResponse) => { formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:275", imResponse); } ); } obj.dialogID = ""; break; case "notMute": if (type2 === "notMute" && obj.conversationType === "C2C") { const options = { userIDList: [obj.currentuserID], messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_AND_NOTE }; uni.$TUIKit.TUIConversationServer.muteConversation(options).then( (imResponse) => { formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:289", imResponse); } ); } else if (type2 === "notMute" && obj.conversationType === "GROUP") { const options = { groupID: obj.currentuserID, messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_AND_NOTE }; uni.$TUIKit.TUIConversationServer.muteConversation(options).then( (imResponse) => { formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:299", imResponse); } ); } obj.dialogID = ""; break; } }; return { ...vue.toRefs(obj), handleGotoItem, handleItemAvator, handleItemTime, handleItemMessage, handleItemName, handleItemLongpress, handleConversation, handlerIsOpened }; } }); const _imports_0$6 = "/assets/mute.7e6900f5.svg"; function _sfc_render$2o(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "TUI-conversation-list", onClick: _cache[5] || (_cache[5] = ($event) => _ctx.dialogID = "") }, [ _ctx.conversationList.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "no-data-box" }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" }), vue.createElementVNode("view", { class: "empty-title" }, "暂无数据") ])) : vue.createCommentVNode("v-if", true), _ctx.conversationList.length > 0 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(_ctx.conversationList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ vue.createElementVNode("view", { class: vue.normalizeClass(["TUI-conversation-item", [ _ctx.dialogID === item.conversationID && "selected", item.isPinned && "pinned" ]]), onClick: ($event) => _ctx.handleGotoItem(item), onLongpress: ($event) => _ctx.handleItemLongpress(item) }, [ vue.createElementVNode("aside", { class: "left" }, [ vue.createElementVNode("image", { mode: "aspectFill", class: "avatar", src: _ctx.handleItemAvator(item) }, null, 8, ["src"]), item.unreadCount > 0 && item.messageRemindType !== "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0, class: "num" }, vue.toDisplayString(item.unreadCount > 99 ? "99+" : item.unreadCount), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.unreadCount > 0 && item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock("span", { key: 1, class: "num-notNotify" })) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("main", { class: "content" }, [ vue.createElementVNode("header", { class: "content-header" }, [ vue.createElementVNode("label", null, [ vue.createElementVNode( "p", { class: "name" }, vue.toDisplayString(_ctx.handleItemName(item)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("footer", { class: "content-footer" }, [ item.unreadCount > 0 && item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0, class: "content-footer-unread" }, "[" + vue.toDisplayString(item.unreadCount > 99 ? "99+" : item.unreadCount) + "条]", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "span", { class: "message-text" }, vue.toDisplayString(_ctx.handleItemMessage(item.lastMessage)), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "conversation-line" }) ]), vue.createElementVNode("view", { class: "item-footer" }, [ vue.createElementVNode( "span", { class: "time" }, vue.toDisplayString(_ctx.handleItemTime(item.lastMessage.lastTime)), 1 /* TEXT */ ), item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "mute-icon", src: _imports_0$6 })) : vue.createCommentVNode("v-if", true) ]) ]), item.conversationID === _ctx.dialogID ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "dialog-box dialog-item" }, [ vue.createElementVNode("view", { class: "conversation-options", onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => _ctx.handleConversation("delete", _ctx.dialogID), ["stop"])) }, "删除会话"), !item.isPinned ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "conversation-options", onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => _ctx.handleConversation("ispinned", _ctx.dialogID), ["stop"])) }, "置顶会话")) : vue.createCommentVNode("v-if", true), item.isPinned ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "conversation-options", onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => _ctx.handleConversation("dispinned", _ctx.dialogID), ["stop"])) }, "取消置顶")) : vue.createCommentVNode("v-if", true), item.messageRemindType === "" || item.messageRemindType === "AcceptAndNotify" ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "conversation-options", onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => _ctx.handleConversation("mute", _ctx.dialogID), ["stop"])) }, "消息免打扰")) : vue.createCommentVNode("v-if", true), item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "conversation-options", onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => _ctx.handleConversation("notMute", _ctx.dialogID), ["stop"])) }, "取消免打扰")) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ], 42, ["onClick", "onLongpress"]) ]); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]); } const TUIConversationList = /* @__PURE__ */ _export_sfc(TUIConversationList$1, [["render", _sfc_render$2o], ["__scopeId", "data-v-9a62e141"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue"]]); const _sfc_main$2b = vue.defineComponent({ name: "dialog", props: { visible: { type: Boolean, default: () => { return false; } }, styleConfig: { type: Object, default: () => { return { width: "240px", // height: '120px', padding: "16px", top: "10px", right: "10px" }; } }, handleClose: { type: Function, default: () => { } } }, setup(props2, context) { } }); function _sfc_render$2n(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.visible ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "dialog", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClose && _ctx.handleClose(...args)) }, [ vue.createElementVNode( "view", { class: "dialog-container", style: vue.normalizeStyle(_ctx.styleConfig) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ) ])) : vue.createCommentVNode("v-if", true); } const Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$2b, [["render", _sfc_render$2n], ["__scopeId", "data-v-842d67a9"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIConversation/components/dialog.vue"]]); const TUIConversation = vue.defineComponent({ name: "TUIConversation", components: { TUIConversationList, Dialog }, setup(props2) { const timStore2 = store.state.timStore; const data = vue.reactive({ conversationList: vue.computed(() => timStore2.conversationList), currrentConversationID: "", open: false, searchUserID: "", selectedList: [], searchUserList: [], step: 1, showDialog: false, item: { flow: "out", status: "success" }, styleConfig: { width: "150px", // height: '160px', padding: "16px 16px 0px", top: "8px", right: "8px" }, chatList: [ { imgType: "SINGLE", type: uni.$TIM.TYPES.CONV_C2C, id: 1, content: "发起会话" }, { imgType: "GROUP", type: uni.$TIM.TYPES.GRP_WORK, id: 1, content: "工作群" }, { imgType: "GROUP", type: uni.$TIM.TYPES.GRP_PUBLIC, id: 2, content: "社交群" }, { imgType: "GROUP", type: uni.$TIM.TYPES.GRP_MEETING, id: 3, content: "会议群" } ] }); onUnload(() => { uni.$TUIKit.TUIConversationServer.destroyed(); }); onNavigationBarButtonTap(() => { data.showDialog = !data.showDialog; }); onShow(() => { uni.$emit("refreshIM"); store.commit("timStore/setConversationID", ""); }); const handleCurrrentConversation = (value2) => { if (value2.lastMessage.cloudCustomData != null) { try { var json = JSON.parse(value2.lastMessage.cloudCustomData); store.commit("timStore/setImType", json.imType); store.commit("timStore/setOrderType", json.orderType); store.commit("timStore/setOrderId", json.orderId); store.commit("timStore/setFollowId", json.followId); store.commit("timStore/setType", json.type); } catch (e) { } } data.currrentConversationID = value2.conversationID; store.commit("timStore/setConversationID", value2.conversationID); uni.navigateTo({ url: `../TUIChat/index?conversationName=${handleItemName(value2)}` }); uni.$TUIKit.TUIConversationServer.setMessageRead(value2.conversationID); const curConversation = data.conversationList.filter((item) => { return item.conversationID === value2.conversationID; }); store.commit("timStore/setConversation", curConversation); uni.$TUIKit.TUIConversationServer.getConversationProfile( value2.conversationID ).then((res) => { store.commit("timStore/setConversation", res.data.conversation); }); }; const handleShow = () => { data.showDialog = true; }; const handleContentClick = (item) => { data.showDialog = false; uni.navigateTo({ url: `../TUIConversation/create?title=${item.content}&type=${item.type}` }); }; const handleClose = () => { data.showDialog = false; }; const handleItemName = (item) => { var _a, _b; let name = ""; switch (item.type) { case uni.$TIM.TYPES.CONV_C2C: name = (item == null ? void 0 : item.userProfile.nick) || ((_a = item == null ? void 0 : item.userProfile) == null ? void 0 : _a.userID) || ""; break; case uni.$TIM.TYPES.CONV_GROUP: name = item.groupProfile.name || ((_b = item == null ? void 0 : item.groupProfile) == null ? void 0 : _b.groupID) || ""; break; case uni.$TIM.TYPES.CONV_SYSTEM: name = "系统通知"; break; } return name; }; return { ...vue.toRefs(data), handleCurrrentConversation, handleContentClick, handleItemName, handleClose, handleShow }; } }); const _imports_0$5 = "/assets/singlePerson.59f1319b.svg"; const _imports_1$2 = "/assets/multiPerson.63026248.svg"; function _sfc_render$2m(_ctx, _cache, $props, $setup, $data, $options) { const _component_Dialog = vue.resolveComponent("Dialog"); const _component_TUIConversationList = vue.resolveComponent("TUIConversationList"); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode(_component_Dialog, { visible: _ctx.showDialog, styleConfig: _ctx.styleConfig, handleClose: _ctx.handleClose }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.chatList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "chat-container", onClick: vue.withModifiers(($event) => _ctx.handleContentClick(item), ["stop"]) }, [ item.imgType === "SINGLE" ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "item-icon", src: _imports_0$5 })) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: "item-icon", src: _imports_1$2 })), vue.createElementVNode( "view", null, vue.toDisplayString(item.content), 1 /* TEXT */ ) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["visible", "styleConfig", "handleClose"]), vue.createElementVNode("view", { class: "TUI-conversation" }, [ vue.createCommentVNode(' + 发起聊天 '), vue.createVNode(_component_TUIConversationList, { currentID: _ctx.currrentConversationID, conversationList: _ctx.conversationList, onHandleGotoItem: _ctx.handleCurrrentConversation }, null, 8, ["currentID", "conversationList", "onHandleGotoItem"]) ]) ], 64 /* STABLE_FRAGMENT */ ); } const PagesTUIKitTUIPagesTUIConversationIndex = /* @__PURE__ */ _export_sfc(TUIConversation, [["render", _sfc_render$2m], ["__scopeId", "data-v-653b394a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIConversation/index.vue"]]); const _imports_0$4 = "/assets/selected.2c312a9c.svg"; const _sfc_main$2a = vue.defineComponent({ name: "Create", props: {}, setup(props2, context) { const TUIConversationServer2 = uni.$TUIKit.TUIConversationServer; const { userInfo } = store.state.timStore; const data = vue.reactive({ userID: (userInfo == null ? void 0 : userInfo.userID) || "", inputUserID: "", chooseUserList: [], title: "发起会话", myProfile: {}, type: uni.$TIM.TYPES.CONV_C2C }); onLoad((options) => { data.title = options && options.title || "发起会话"; data.type = options && options.type || uni.$TIM.TYPES.CONV_C2C; }); const handleUserIdInput = (e) => { data.inputUserID = e.detail.value; uni.$TUIKit.getMyProfile().then((imResponse) => { data.myProfile = imResponse.data; }).catch((imError) => { formatAppLog("warn", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:90", "getMyProfile error:", imError); }); }; const handleGetUserProfileInfo = () => { if (!data.inputUserID) return; const userIDList = [data.inputUserID]; uni.$TUIKit.getUserProfile({ userIDList }).then((imRes) => { uni.hideLoading(); if (imRes.data.length > 0) { const userInfo2 = { ...imRes.data[0], isChoose: false }; if (data.chooseUserList.filter( (obj) => userInfo2.userID === obj.userID ).length === 0) { data.chooseUserList.push(userInfo2); } } else { uni.showToast({ title: "搜索用户不存在", icon: "error" }); data.inputUserID = ""; } }).catch((err) => { uni.hideLoading(); }); }; const handleChoose = (item) => { const list = data.chooseUserList.map((obj) => { if (item.userID == obj.userID) { return { ...obj, isChoose: !obj.isChoose }; } else { return obj; } }); data.chooseUserList = list; }; const handleCreateGroup = () => { var _a, _b; const chooseList = data.chooseUserList.filter((obj) => obj.isChoose); if (chooseList.length > 0) { switch (data.type) { case uni.$TIM.TYPES.CONV_C2C: { if (chooseList.length > 1) { uni.showToast({ title: `“发起会话”仅能选择一个用户`, icon: "none" }); return; } else { const conversationId = `C2C${chooseList[0].userID}`; formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:154", conversationId); handleJumpToChat(conversationId); } break; } case uni.$TIM.TYPES.GRP_WORK: case uni.$TIM.TYPES.GRP_PUBLIC: case uni.$TIM.TYPES.GRP_MEETING: { let name = ""; if (chooseList.length > 2) { name = chooseList.slice(0, 3).map((obj) => obj.nick || obj.userID).join(",") || ""; } else { name = chooseList.map((obj) => obj.nick || obj.userID).join(",") + "、" + (((_a = data.myProfile) == null ? void 0 : _a.nick) || ((_b = data.myProfile) == null ? void 0 : _b.userID)); } const groupOptions = { avatar: "https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png", type: data.type, name, memberList: chooseList.map((obj) => ({ userID: obj.userID, role: obj.role, memberCustomField: obj.memberCustomField })) }; uni.showLoading({ title: "群组创建中…" }); uni.$TUIKit.createGroup(groupOptions).then((imResponse) => { uni.hideLoading(); const { groupID } = imResponse.data && imResponse.data.group; if (groupID) { const conversationId = `GROUP${groupID}`; handleJumpToChat(conversationId); } }).catch((err) => { uni.showToast({ title: "群组创建失败!" }); uni.hideLoading(); }); break; } } } else { uni.showToast({ title: "请选择相关用户", icon: "none" }); } }; const handleJumpToChat = (conversationId) => { store.commit("timStore/setConversationID", conversationId); TUIConversationServer2.setMessageRead(conversationId); TUIConversationServer2.getConversationProfile(conversationId).then((res) => { var _a; const { conversation } = res.data; formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:221", "create conversation response = ", res); store.commit("timStore/setConversation", conversation); let url2 = "../TUIChat/index"; if (conversationId.slice(0, 5) === "GROUP") { const { name } = conversation.groupProfile; url2 = `${url2}?conversationName=${name}`; } else if (conversationId.slice(0, 3) === "C2C") { conversation.userProfile; url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`; } uni.redirectTo({ url: url2 }); }).catch((err) => { formatAppLog("warn", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:237", "获取 group profile 异常 = ", err); }); }; return { ...vue.toRefs(data), handleUserIdInput, handleGetUserProfileInfo, handleChoose, handleCreateGroup }; } }); function _sfc_render$2l(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "TUI-Create-conversation-container" }, [ vue.createElementVNode("view", { class: "tui-search-area" }, [ vue.createElementVNode("view", { class: "tui-search-bar" }, [ vue.createCommentVNode(' '), vue.createElementVNode("input", { class: "tui-search-bar-input", value: _ctx.inputUserID, placeholder: "请输入用户ID", onInput: _cache[0] || (_cache[0] = (...args) => _ctx.handleUserIdInput && _ctx.handleUserIdInput(...args)), onConfirm: _cache[1] || (_cache[1] = (...args) => _ctx.handleGetUserProfileInfo && _ctx.handleGetUserProfileInfo(...args)), onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.handleGetUserProfileInfo && _ctx.handleGetUserProfileInfo(...args)) }, null, 40, ["value"]) ]), vue.createElementVNode("view", { class: "tui-showID" }) ]), vue.createCommentVNode(" 用户列表 "), vue.createElementVNode("view", { class: "tui-person-list-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.chooseUserList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "tui-person-to-invite", key: index2, onClick: ($event) => _ctx.handleChoose(item) }, [ vue.createElementVNode("view", { class: "tui-person-choose-container" }, [ item.isChoose ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "tui-normal-choose", src: _imports_0$4 })) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "tui-normal-unchoose" })) ]), vue.createElementVNode("view", { class: "tui-person-profile" }, [ vue.createElementVNode("image", { class: "tui-person-profile-avatar", src: item.avatar || "https://sdk-web-1252463788.cos.ap-hongkong.myqcloud.com/component/TUIKit/assets/avatar_21.png" }, null, 8, ["src"]), vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "tui-person-profile-nick" }, vue.toDisplayString(item.nick), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "tui-person-profile-userID" }, "用户ID:" + vue.toDisplayString(item.userID), 1 /* TEXT */ ) ]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "tui-confirm-btn-container" }, [ vue.createElementVNode("view", { class: "tui-confirm-btn", onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleCreateGroup && _ctx.handleCreateGroup(...args)) }, "确认创建") ]) ]); } const PagesTUIKitTUIPagesTUIConversationCreate = /* @__PURE__ */ _export_sfc(_sfc_main$2a, [["render", _sfc_render$2l], ["__scopeId", "data-v-d9bc6912"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIConversation/create.vue"]]); const messageBubble = vue.defineComponent({ props: { data: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const data = vue.reactive({ message: {}, show: false }); vue.watchEffect(() => { data.message = props2.data; }); const toggleDialog = () => { data.show = !data.show; }; return { ...vue.toRefs(data), toggleDialog }; } }); function _sfc_render$2k(_ctx, _cache, $props, $setup, $data, $options) { var _a; return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["message-bubble", [_ctx.message.flow === "in" ? "" : "reverse"]]) }, [ vue.createElementVNode("image", { class: "avatar", src: ((_a = _ctx.message) == null ? void 0 : _a.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png", alt: "" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "message-area" }, [ _ctx.message.flow === "in" ? (vue.openBlock(), vue.createElementBlock( "label", { key: 0, class: "name" }, vue.toDisplayString(_ctx.message.nick), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "div", { class: vue.normalizeClass(["content content-" + _ctx.message.flow]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 2 /* CLASS */ ) ]), _ctx.message.status === "fail" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "message-label fail" }, "!")) : vue.createCommentVNode("v-if", true), _ctx.message.conversationType === "C2C" && _ctx.message.flow == "out" && _ctx.message.status !== "fail" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["message-label", [!_ctx.message.isPeerRead && "unRead"]]) }, [ !_ctx.message.isPeerRead ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, "未读")) : (vue.openBlock(), vue.createElementBlock("span", { key: 1 }, "已读")) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); } const MessageBubble = /* @__PURE__ */ _export_sfc(messageBubble, [["render", _sfc_render$2k], ["__scopeId", "data-v-bdaa27cd"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-bubble.vue"]]); const MessageText$1 = vue.defineComponent({ props: { data: { type: Object, default: () => { return {}; } }, messageData: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const data = vue.reactive({ data: {}, message: {} }); vue.watchEffect(() => { data.data = props2.data; data.message = props2.messageData; }); return { ...vue.toRefs(data) }; } }); function _sfc_render$2j(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["content content-" + _ctx.message.flow]) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.data.text, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ item.name === "text" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(item.text), 1 /* TEXT */ )) : item.name === "img" ? (vue.openBlock(), vue.createElementBlock("img", { key: 1, class: "text-img", src: item.src }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 2 /* CLASS */ ); } const MessageText = /* @__PURE__ */ _export_sfc(MessageText$1, [["render", _sfc_render$2j], ["__scopeId", "data-v-8469577b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-text.vue"]]); const _sfc_main$29 = vue.defineComponent({ props: { data: { type: Array, default: () => { return []; } }, messageData: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const data = vue.reactive({ imageInfo: [], imageHeight: 0, imageWidth: 0, message: {} }); vue.watchEffect(() => { const DEFAULT_MAX_SIZE = 155; let imageWidth = 0; let imageHeight = 0; data.message = props2.messageData; data.imageInfo = props2.data.info[1]; if (data.imageInfo.width >= data.imageInfo.height) { imageWidth = DEFAULT_MAX_SIZE; imageHeight = DEFAULT_MAX_SIZE * data.imageInfo.height / data.imageInfo.width; } else { imageWidth = DEFAULT_MAX_SIZE * data.imageInfo.width / data.imageInfo.height; imageHeight = DEFAULT_MAX_SIZE; } data.imageWidth = imageWidth + "px"; data.imageHeight = imageHeight + "px"; }); const handlePreviewImage = () => { formatAppLog("error", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-image.vue:59", props2.data.info[0].url, "----linda"); uni.previewImage({ current: props2.data.info[0].url, // 当前显示图片的http链接 urls: [props2.data.info[0].url] }); }; return { ...vue.toRefs(data), handlePreviewImage }; } }); function _sfc_render$2i(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "message-image", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handlePreviewImage && _ctx.handlePreviewImage(...args)) }, [ vue.createElementVNode("image", { src: _ctx.data.info[1].url, style: vue.normalizeStyle({ height: _ctx.imageHeight, width: _ctx.imageWidth }), class: vue.normalizeClass(["content-" + _ctx.message.flow]) }, null, 14, ["src"]), vue.createCommentVNode('
\n \n
') ]); } const MessageImage = /* @__PURE__ */ _export_sfc(_sfc_main$29, [["render", _sfc_render$2i], ["__scopeId", "data-v-d71110be"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-image.vue"]]); const MessageOperate$1 = vue.defineComponent({ props: { data: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const TUIServer = uni.$TUIKit.TUIChatServer; const data = vue.reactive({ message: {} }); vue.watchEffect(() => { data.message = props2.data; }); const handleMseeage = async (type2) => { switch (type2) { case "revoke": await TUIServer.revokeMessage(data.message).catch((error2) => { if (error2.code = 20016) uni.showToast({ title: "消息超过了 2 分钟", icon: "error" }); }); data.dialogID = ""; break; case "delete": await TUIServer.deleteMessage([data.message]); data.dialogID = ""; break; case "resend": await TUIServer.resendMessage(data.message); data.dialogID = ""; break; } }; return { ...vue.toRefs(data), handleMseeage }; } }); const _imports_0$3 = "/assets/revoked.7c9df1a1.svg"; const _imports_1$1 = "/assets/delete.f7e3358f.svg"; const _imports_2$1 = "/assets/forword.ae89e5df.svg"; function _sfc_render$2h(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "dialog-container" }, [ _ctx.message.flow === "out" && _ctx.message.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "item-box", onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleMseeage("revoke")) }, [ vue.createElementVNode("image", { class: "item-icon", src: _imports_0$3 }), vue.createElementVNode("view", null, "撤回") ])) : vue.createCommentVNode("v-if", true), _ctx.message.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "item-box", onClick: _cache[1] || (_cache[1] = ($event) => _ctx.handleMseeage("delete")) }, [ vue.createElementVNode("image", { class: "item-icon", src: _imports_1$1 }), vue.createElementVNode("view", null, "删除") ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(` 转发 `), _ctx.message.flow === "out" && _ctx.message.status === "fail" ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "item-box", onClick: _cache[2] || (_cache[2] = ($event) => _ctx.handleMseeage("resend")) }, [ vue.createElementVNode("image", { class: "item-icon", src: _imports_2$1 }), vue.createElementVNode("view", null, "重发") ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(' 打开 ') ]); } const MessageOperate = /* @__PURE__ */ _export_sfc(MessageOperate$1, [["render", _sfc_render$2h], ["__scopeId", "data-v-928c104b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-operate.vue"]]); const _sfc_main$28 = vue.defineComponent({ props: { data: { type: Object, default: () => { return {}; } }, messageData: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const data = vue.reactive({ video: {}, message: {}, show: false, videoContext: null }); vue.watchEffect(() => { data.video = props2.data; data.message = props2.messageData; }); const toggleShow = () => { uni.navigateTo({ url: `./components/message-elements/video-play?videoMessage=${data.video.url}` }); }; return { ...vue.toRefs(data), toggleShow }; } }); const _imports_0$2 = "/assets/play_normal@2x.58b451c9.png"; function _sfc_render$2g(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("div", { class: "message-video" }, [ vue.createElementVNode( "div", { class: vue.normalizeClass(["message-video-box", [!_ctx.video.progress && "message-video-cover"]]), onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleShow && _ctx.toggleShow(...args)) }, [ vue.createElementVNode("image", { src: _ctx.video.snapshotUrl, class: vue.normalizeClass(["message-video-box", ["content-" + _ctx.message.flow]]) }, null, 10, ["src"]), vue.createElementVNode("image", { src: _imports_0$2, class: "video-play" }) ], 2 /* CLASS */ ) ]); } const MessageVideo = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["render", _sfc_render$2g], ["__scopeId", "data-v-0e400482"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-video.vue"]]); const audio = uni.createInnerAudioContext(); const MessageAudio$1 = vue.defineComponent({ props: { data: { type: Object, default: () => { return {}; } }, messageData: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const data = vue.reactive({ data: {}, message: {}, isPlay: false }); vue.watchEffect(() => { data.data = props2.data; data.message = props2.messageData; }); vue.onMounted(() => { audio.onPlay(() => { formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue:43", "开始播放"); }); audio.onEnded(() => { formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue:46", "停止播放"); }); audio.onError((e) => { formatAppLog("error", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue:49", e, "onError"); }); }); const handlePlay = () => { if (data.data.url) { audio.src = data.data.url; audio.play(); } data.isPlay = true; }; return { ...vue.toRefs(data), audio, handlePlay }; } }); const _imports_0$1 = "/assets/audio-play.949caa88.svg"; function _sfc_render$2f(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["message-audio", ["content content-" + _ctx.message.flow]]), onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handlePlay && _ctx.handlePlay(...args)) }, [ _ctx.message.flow === "in" ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "audio-icon audio-icon-in", src: _imports_0$1 })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", null, vue.toDisplayString(_ctx.data.second) + "s", 1 /* TEXT */ ), _ctx.message.flow === "out" ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: "audio-icon", src: _imports_0$1 })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(` `) ], 2 /* CLASS */ ); } const MessageAudio = /* @__PURE__ */ _export_sfc(MessageAudio$1, [["render", _sfc_render$2f], ["__scopeId", "data-v-53eee9af"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue"]]); const MessageFace$1 = vue.defineComponent({ props: { data: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const data = vue.reactive({ data: {} }); vue.watchEffect(() => { data.data = props2.data; }); return { ...vue.toRefs(data) }; } }); function _sfc_render$2e(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("image", { class: "message-image", src: _ctx.data.url }, null, 8, ["src"]); } const MessageFace = /* @__PURE__ */ _export_sfc(MessageFace$1, [["render", _sfc_render$2e], ["__scopeId", "data-v-579879ce"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-face.vue"]]); const MessageCustom$1 = vue.defineComponent({ props: { data: { type: Object, default: () => { return {}; } }, messageData: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const data = vue.reactive({ data: {}, extension: {}, isCustom: "", payload: {}, message: {} }); vue.watchEffect(() => { data.data = props2.data; data.message = props2.messageData; data.isCustom = props2.data.message.payload.data; data.payload = props2.data.message.payload; data.extension = JSON.parse(props2.data.message.payload.extension); }); return { ...vue.toRefs(data) }; } }); function _sfc_render$2d(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "custom" }, [ _ctx.isCustom === "order" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createCommentVNode("
\n

\n {{extension.title}}\n
"), vue.createElementVNode("view", { class: "order-item" }, [ vue.createElementVNode("view", { class: "title" }, "问诊订单 "), vue.createElementVNode( "view", { class: "text" }, "患者:" + vue.toDisplayString(_ctx.extension.patientName) + " " + vue.toDisplayString(_ctx.extension.sex) + " " + vue.toDisplayString(_ctx.extension.mobile), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "text" }, "患病时间:" + vue.toDisplayString(_ctx.extension.duration), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "text" }, "就诊情况:" + vue.toDisplayString(_ctx.extension.isVisit), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "text" }, "病情描述:" + vue.toDisplayString(_ctx.extension.title), 1 /* TEXT */ ) ]) ], 64 /* STABLE_FRAGMENT */ )) : _ctx.isCustom === "prescribe" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "prescribe-item" }, [ vue.createElementVNode("view", { class: "title" }, "电子处方单 "), vue.createElementVNode( "view", { class: "text" }, "诊断:" + vue.toDisplayString(_ctx.extension.diagnose), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode("view", { class: "btn" }, "查看处方") ]) ])) : _ctx.isCustom === "report" ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "report-item" }, [ vue.createElementVNode("view", { class: "title" }, "问诊报告单 "), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode("view", { class: "btn" }, "查看报告单") ]) ])) : _ctx.isCustom === "follow" ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "prescribe-item" }, [ vue.createElementVNode("view", { class: "title" }, "随访单 "), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode("view", { class: "btn" }, "查看随访") ]) ])) : _ctx.isCustom === "drugReport" ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "report-item" }, [ vue.createElementVNode("view", { class: "title" }, "用药报告单 "), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode("view", { class: "btn" }, "查看报告单") ]) ])) : _ctx.isCustom === "startInquiry" ? (vue.openBlock(), vue.createElementBlock( "span", { key: 5, class: vue.normalizeClass(["content content-" + _ctx.message.flow]) }, vue.toDisplayString(_ctx.extension.title), 3 /* TEXT, CLASS */ )) : _ctx.isCustom === "finishInquiry" ? (vue.openBlock(), vue.createElementBlock( "span", { key: 6, class: vue.normalizeClass(["content content-" + _ctx.message.flow]) }, vue.toDisplayString(_ctx.extension.title), 3 /* TEXT, CLASS */ )) : (vue.openBlock(), vue.createElementBlock( "span", { key: 7, class: vue.normalizeClass(["content content-" + _ctx.message.flow]) }, vue.toDisplayString(_ctx.data.custom), 3 /* TEXT, CLASS */ )) ]); } const MessageCustom = /* @__PURE__ */ _export_sfc(MessageCustom$1, [["render", _sfc_render$2d], ["__scopeId", "data-v-2acfb6b8"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-custom.vue"]]); const MessageTip$1 = vue.defineComponent({ props: { data: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const data = vue.reactive({ message: {} }); vue.watchEffect(() => { data.message = props2.data; }); return { ...vue.toRefs(data) }; } }); function _sfc_render$2c(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "div", { class: "message-tip" }, vue.toDisplayString(_ctx.message.text), 1 /* TEXT */ ); } const MessageTip = /* @__PURE__ */ _export_sfc(MessageTip$1, [["render", _sfc_render$2c], ["__scopeId", "data-v-eba994b3"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-tip.vue"]]); const MessageRevoked$1 = vue.defineComponent({ props: { data: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const data = vue.reactive({ message: {} }); vue.watchEffect(() => { data.message = props2.data; }); const edit = () => { ctx.emit("edit", data.message); }; return { ...vue.toRefs(data), edit }; } }); function _sfc_render$2b(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("div", { class: "revoke" }, [ _ctx.message.flow === "in" ? (vue.openBlock(), vue.createElementBlock( "label", { key: 0 }, vue.toDisplayString(_ctx.message.nick || _ctx.message.from), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock("label", { key: 1 }, "你")), vue.createElementVNode("span", null, "撤回了一条消息"), _ctx.message.flow === "out" ? (vue.openBlock(), vue.createElementBlock("span", { key: 2, class: "edit", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.edit && _ctx.edit(...args)) }, "重新编辑")) : vue.createCommentVNode("v-if", true) ]); } const MessageRevoked = /* @__PURE__ */ _export_sfc(MessageRevoked$1, [["render", _sfc_render$2b], ["__scopeId", "data-v-74cb0d08"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-revoked.vue"]]); const emojiUrl = "https://web.sdk.qcloud.com/im/assets/emoji/"; const emojiMap = { "[NO]": "emoji_0@2x.png", "[OK]": "emoji_1@2x.png", "[下雨]": "emoji_2@2x.png", "[么么哒]": "emoji_3@2x.png", "[乒乓]": "emoji_4@2x.png", "[便便]": "emoji_5@2x.png", "[信封]": "emoji_6@2x.png", "[偷笑]": "emoji_7@2x.png", "[傲慢]": "emoji_8@2x.png", "[再见]": "emoji_9@2x.png", "[冷汗]": "emoji_10@2x.png", "[凋谢]": "emoji_11@2x.png", "[刀]": "emoji_12@2x.png", "[删除]": "emoji_13@2x.png", "[勾引]": "emoji_14@2x.png", "[发呆]": "emoji_15@2x.png", "[发抖]": "emoji_16@2x.png", "[可怜]": "emoji_17@2x.png", "[可爱]": "emoji_18@2x.png", "[右哼哼]": "emoji_19@2x.png", "[右太极]": "emoji_20@2x.png", "[右车头]": "emoji_21@2x.png", "[吐]": "emoji_22@2x.png", "[吓]": "emoji_23@2x.png", "[咒骂]": "emoji_24@2x.png", "[咖啡]": "emoji_25@2x.png", "[啤酒]": "emoji_26@2x.png", "[嘘]": "emoji_27@2x.png", "[回头]": "emoji_28@2x.png", "[困]": "emoji_29@2x.png", "[坏笑]": "emoji_30@2x.png", "[多云]": "emoji_31@2x.png", "[大兵]": "emoji_32@2x.png", "[大哭]": "emoji_33@2x.png", "[太阳]": "emoji_34@2x.png", "[奋斗]": "emoji_35@2x.png", "[奶瓶]": "emoji_36@2x.png", "[委屈]": "emoji_37@2x.png", "[害羞]": "emoji_38@2x.png", "[尴尬]": "emoji_39@2x.png", "[左哼哼]": "emoji_40@2x.png", "[左太极]": "emoji_41@2x.png", "[左车头]": "emoji_42@2x.png", "[差劲]": "emoji_43@2x.png", "[弱]": "emoji_44@2x.png", "[强]": "emoji_45@2x.png", "[彩带]": "emoji_46@2x.png", "[彩球]": "emoji_47@2x.png", "[得意]": "emoji_48@2x.png", "[微笑]": "emoji_49@2x.png", "[心碎了]": "emoji_50@2x.png", "[快哭了]": "emoji_51@2x.png", "[怄火]": "emoji_52@2x.png", "[怒]": "emoji_53@2x.png", "[惊恐]": "emoji_54@2x.png", "[惊讶]": "emoji_55@2x.png", "[憨笑]": "emoji_56@2x.png", "[手枪]": "emoji_57@2x.png", "[打哈欠]": "emoji_58@2x.png", "[抓狂]": "emoji_59@2x.png", "[折磨]": "emoji_60@2x.png", "[抠鼻]": "emoji_61@2x.png", "[抱抱]": "emoji_62@2x.png", "[抱拳]": "emoji_63@2x.png", "[拳头]": "emoji_64@2x.png", "[挥手]": "emoji_65@2x.png", "[握手]": "emoji_66@2x.png", "[撇嘴]": "emoji_67@2x.png", "[擦汗]": "emoji_68@2x.png", "[敲打]": "emoji_69@2x.png", "[晕]": "emoji_70@2x.png", "[月亮]": "emoji_71@2x.png", "[棒棒糖]": "emoji_72@2x.png", "[汽车]": "emoji_73@2x.png", "[沙发]": "emoji_74@2x.png", "[流汗]": "emoji_75@2x.png", "[流泪]": "emoji_76@2x.png", "[激动]": "emoji_77@2x.png", "[灯泡]": "emoji_78@2x.png", "[炸弹]": "emoji_79@2x.png", "[熊猫]": "emoji_80@2x.png", "[爆筋]": "emoji_81@2x.png", "[爱你]": "emoji_82@2x.png", "[爱心]": "emoji_83@2x.png", "[爱情]": "emoji_84@2x.png", "[猪头]": "emoji_85@2x.png", "[猫咪]": "emoji_86@2x.png", "[献吻]": "emoji_87@2x.png", "[玫瑰]": "emoji_88@2x.png", "[瓢虫]": "emoji_89@2x.png", "[疑问]": "emoji_90@2x.png", "[白眼]": "emoji_91@2x.png", "[皮球]": "emoji_92@2x.png", "[睡觉]": "emoji_93@2x.png", "[磕头]": "emoji_94@2x.png", "[示爱]": "emoji_95@2x.png", "[礼品袋]": "emoji_96@2x.png", "[礼物]": "emoji_97@2x.png", "[篮球]": "emoji_98@2x.png", "[米饭]": "emoji_99@2x.png", "[糗大了]": "emoji_100@2x.png", "[红双喜]": "emoji_101@2x.png", "[红灯笼]": "emoji_102@2x.png", "[纸巾]": "emoji_103@2x.png", "[胜利]": "emoji_104@2x.png", "[色]": "emoji_105@2x.png", "[药]": "emoji_106@2x.png", "[菜刀]": "emoji_107@2x.png", "[蛋糕]": "emoji_108@2x.png", "[蜡烛]": "emoji_109@2x.png", "[街舞]": "emoji_110@2x.png", "[衰]": "emoji_111@2x.png", "[西瓜]": "emoji_112@2x.png", "[调皮]": "emoji_113@2x.png", "[象棋]": "emoji_114@2x.png", "[跳绳]": "emoji_115@2x.png", "[跳跳]": "emoji_116@2x.png", "[车厢]": "emoji_117@2x.png", "[转圈]": "emoji_118@2x.png", "[鄙视]": "emoji_119@2x.png", "[酷]": "emoji_120@2x.png", "[钞票]": "emoji_121@2x.png", "[钻戒]": "emoji_122@2x.png", "[闪电]": "emoji_123@2x.png", "[闭嘴]": "emoji_124@2x.png", "[闹钟]": "emoji_125@2x.png", "[阴险]": "emoji_126@2x.png", "[难过]": "emoji_127@2x.png", "[雨伞]": "emoji_128@2x.png", "[青蛙]": "emoji_129@2x.png", "[面条]": "emoji_130@2x.png", "[鞭炮]": "emoji_131@2x.png", "[风车]": "emoji_132@2x.png", "[飞吻]": "emoji_133@2x.png", "[飞机]": "emoji_134@2x.png", "[饥饿]": "emoji_135@2x.png", "[香蕉]": "emoji_136@2x.png", "[骷髅]": "emoji_137@2x.png", "[麦克风]": "emoji_138@2x.png", "[麻将]": "emoji_139@2x.png", "[鼓掌]": "emoji_140@2x.png", "[龇牙]": "emoji_141@2x.png" }; const emojiName = [ "[龇牙]", "[调皮]", "[流汗]", "[偷笑]", "[再见]", "[敲打]", "[擦汗]", "[猪头]", "[玫瑰]", "[流泪]", "[大哭]", "[嘘]", "[酷]", "[抓狂]", "[委屈]", "[便便]", "[炸弹]", "[菜刀]", "[可爱]", "[色]", "[害羞]", "[得意]", "[吐]", "[微笑]", "[怒]", "[尴尬]", "[惊恐]", "[冷汗]", "[爱心]", "[示爱]", "[白眼]", "[傲慢]", "[难过]", "[惊讶]", "[疑问]", "[困]", "[么么哒]", "[憨笑]", "[爱情]", "[衰]", "[撇嘴]", "[阴险]", "[奋斗]", "[发呆]", "[右哼哼]", "[抱抱]", "[坏笑]", "[飞吻]", "[鄙视]", "[晕]", "[大兵]", "[可怜]", "[强]", "[弱]", "[握手]", "[胜利]", "[抱拳]", "[凋谢]", "[米饭]", "[蛋糕]", "[西瓜]", "[啤酒]", "[瓢虫]", "[勾引]", "[OK]", "[爱你]", "[咖啡]", "[月亮]", "[刀]", "[发抖]", "[差劲]", "[拳头]", "[心碎了]", "[太阳]", "[礼物]", "[皮球]", "[骷髅]", "[挥手]", "[闪电]", "[饥饿]", "[咒骂]", "[折磨]", "[抠鼻]", "[鼓掌]", "[糗大了]", "[左哼哼]", "[打哈欠]", "[快哭了]", "[吓]", "[篮球]", "[乒乓]", "[NO]", "[跳跳]", "[怄火]", "[转圈]", "[磕头]", "[回头]", "[跳绳]", "[激动]", "[街舞]", "[献吻]", "[左太极]", "[右太极]", "[闭嘴]", "[猫咪]", "[红双喜]", "[鞭炮]", "[红灯笼]", "[麻将]", "[麦克风]", "[礼品袋]", "[信封]", "[象棋]", "[彩带]", "[蜡烛]", "[爆筋]", "[棒棒糖]", "[奶瓶]", "[面条]", "[香蕉]", "[飞机]", "[左车头]", "[车厢]", "[右车头]", "[多云]", "[下雨]", "[钞票]", "[熊猫]", "[灯泡]", "[风车]", "[闹钟]", "[雨伞]", "[彩球]", "[钻戒]", "[沙发]", "[纸巾]", "[手枪]", "[青蛙]" ]; const faceUrl = "https://web.sdk.qcloud.com/im/assets/face-elem/"; const bigEmojiList = [ { icon: "yz00", list: [ "yz00", "yz01", "yz02", "yz03", "yz04", "yz05", "yz06", "yz07", "yz08", "yz09", "yz10", "yz11", "yz12", "yz13", "yz14", "yz15", "yz16", "yz17" ] }, { icon: "ys00", list: [ "ys00", "ys01", "ys02", "ys03", "ys04", "ys05", "ys06", "ys07", "ys08", "ys09", "ys10", "ys11", "ys12", "ys13", "ys14", "ys15" ] }, { icon: "gcs00", list: [ "gcs00", "gcs01", "gcs02", "gcs03", "gcs04", "gcs05", "gcs06", "gcs07", "gcs08", "gcs09", "gcs10", "gcs11", "gcs12", "gcs13", "gcs14", "gcs15", "gcs16" ] } ]; function decodeText(payload) { const renderDom = []; let temp = payload.text; let left = -1; let right = -1; while (temp !== "") { left = temp.indexOf("["); right = temp.indexOf("]"); switch (left) { case 0: if (right === -1) { renderDom.push({ name: "text", text: temp }); temp = ""; } else { const emojiKey = temp.slice(0, right + 1); if (emojiMap[emojiKey]) { renderDom.push({ name: "img", src: emojiUrl + emojiMap[emojiKey] }); temp = temp.substring(right + 1); } else { renderDom.push({ name: "text", text: "[" }); temp = temp.slice(1); } } break; case -1: renderDom.push({ name: "text", text: temp }); temp = ""; break; default: renderDom.push({ name: "text", text: temp.slice(0, left) }); temp = temp.substring(left); break; } } return renderDom; } function handleTipMessageShowContext(message) { const options = { message, text: "" }; const userName = message.nick || message.payload.userIDList.join(","); switch (message.payload.operationType) { case uni.$TIM.TYPES.GRP_TIP_MBR_JOIN: options.text = `群成员:${userName} 加入群组`; break; case uni.$TIM.TYPES.GRP_TIP_MBR_QUIT: options.text = `群成员:${userName} 退出群组`; break; case uni.$TIM.TYPES.GRP_TIP_MBR_KICKED_OUT: options.text = `群成员:${userName} 被 ${message.payload.operatorID} 踢出群组`; break; case uni.$TIM.TYPES.GRP_TIP_MBR_SET_ADMIN: options.text = `群成员:${userName} 成为管理员`; break; case uni.$TIM.TYPES.GRP_TIP_MBR_CANCELED_ADMIN: options.text = `群成员:${userName} 被撤销管理员`; break; case uni.$TIM.TYPES.GRP_TIP_GRP_PROFILE_UPDATED: options.text = handleTipGrpUpdated(message); break; case uni.$TIM.TYPES.GRP_TIP_MBR_PROFILE_UPDATED: for (const member of message.payload.memberList) { if (member.muteTime > 0) { options.text = `群成员:${member.userID} 被禁言`; } else { options.text = `群成员:${member.userID} 被取消禁言`; } } break; default: options.text = `[群提示消息]`; break; } return options; } function handleTipGrpUpdated(message) { const { payload } = message; const { newGroupProfile } = payload; const { operatorID } = payload; let text = ""; const name = Object.keys(newGroupProfile)[0]; switch (name) { case "ownerID": text = `${newGroupProfile[name]} 成为新的群主`; break; case "groupName": text = `${operatorID} 修改群名为 ${newGroupProfile[name]}`; break; case "notification": text = `${operatorID} 发布新公告`; break; } return text; } function handleTextMessageShowContext(item) { const options = { text: decodeText(item.payload) }; return options; } function handleFaceMessageShowContext(item) { const face = { message: item, name: "", url: "" }; const currentEmojiList = bigEmojiList.filter( (emoItem) => emoItem.icon === item.payload.data ); if (currentEmojiList.length > 0) { face.name = currentEmojiList[0].list[item.payload.index]; } if (item.payload.data.indexOf("@2x") > 0) { face.name = item.payload.data; } else { face.name = `${item.payload.data}@2x`; } face.url = `https://web.sdk.qcloud.com/im/assets/face-elem/${face.name}.png`; return face; } function handleLocationMessageShowContext(item) { const location2 = { lon: "", lat: "", href: "", url: "", description: "", message: item }; location2.lon = item.payload.longitude.toFixed(6); location2.lat = item.payload.latitude.toFixed(6); location2.href = `https://map.qq.com/?type=marker&isopeninfowin=1&markertype=1&pointx=${location2.lon}&pointy=${location2.lat}&name=${item.payload.description}`; location2.url = `https://apis.map.qq.com/ws/staticmap/v2/?center=${location2.lat},${location2.lon}&zoom=10&size=300*150&maptype=roadmap&markers=size:large|color:0xFFCCFF|label:k|${location2.lat},${location2.lon}&key=UBNBZ-PTP3P-TE7DB-LHRTI-Y4YLE-VWBBD`; location2.description = item.payload.description; return location2; } function handleImageMessageShowContext(item) { return { progress: (item == null ? void 0 : item.status) === "unSend" && item.progress, info: item.payload.imageInfoArray, message: item }; } function handleVideoMessageShowContext(item) { var _a, _b; return { progress: (item == null ? void 0 : item.status) === "unSend" && (item == null ? void 0 : item.progress), url: (_a = item == null ? void 0 : item.payload) == null ? void 0 : _a.videoUrl, snapshotUrl: (_b = item == null ? void 0 : item.payload) == null ? void 0 : _b.snapshotUrl, message: item }; } function handleAudioMessageShowContext(item) { return { progress: (item == null ? void 0 : item.status) === "unSend" && item.progress, url: item.payload.url, message: item, second: item.payload.second }; } function handleFileMessageShowContext(item) { let size = ""; if (item.payload.fileSize >= 1024 * 1024) { size = `${(item.payload.fileSize / (1024 * 1024)).toFixed(2)} Mb`; } else if (item.payload.fileSize >= 1024) { size = `${(item.payload.fileSize / 1024).toFixed(2)} Kb`; } else { size = `${item.payload.fileSize.toFixed(2)}B`; } return { progress: (item == null ? void 0 : item.status) === "unSend" && item.progress, url: item.payload.fileUrl, message: item, name: item.payload.fileName, size }; } function handleMergerMessageShowContext(item) { return { message: item, ...item.payload }; } function extractCallingInfoFromMessage(message) { let callingmessage = {}; let objectData = {}; try { callingmessage = JSON.parse(message.payload.data); } catch (error2) { callingmessage = {}; } if (callingmessage.businessID !== 1) { return ""; } try { objectData = JSON.parse(callingmessage.data); } catch (error2) { objectData = {}; } switch (callingmessage.actionType) { case 1: { if (objectData.call_end >= 0 && !callingmessage.groupID) { return `通话时长 :${formatTime(objectData.call_end)}`; } if (callingmessage.groupID) { return `结束群聊`; } if (objectData.data && objectData.data.cmd === "switchToAudio") { return `切换语音通话`; } if (objectData.data && objectData.data.cmd === "switchToVideo") { return `切换视频通话`; } return `发起通话`; } case 2: return `取消通话`; case 3: if (objectData.data && objectData.data.cmd === "switchToAudio") { return `切换语音通话`; } if (objectData.data && objectData.data.cmd === "switchToVideo") { return `切换视频通话`; } return `已接听`; case 4: return `拒绝通话`; case 5: if (objectData.data && objectData.data.cmd === "switchToAudio") { return `切换语音通话`; } if (objectData.data && objectData.data.cmd === "switchToVideo") { return `切换视频通话`; } return `无应答`; default: return ""; } } function handleCustomMessageShowContext(item) { var _a; return { message: item, custom: extractCallingInfoFromMessage(item) || ((_a = item == null ? void 0 : item.payload) == null ? void 0 : _a.extension) || `[自定义消息]` }; } function translateGroupSystemNotice(message) { var _a, _b; const groupName = ((_a = message.payload.groupProfile) == null ? void 0 : _a.name) || ((_b = message.payload.groupProfile) == null ? void 0 : _b.groupID); switch (message.payload.operationType) { case 1: return `${message.payload.operatorID} 申请加入群组:${groupName}`; case 2: return `成功加入群组:${groupName}`; case 3: return `申请加入群组:${groupName} 被拒绝`; case 4: return `你被管理员 ${message.payload.operatorID} 踢出群组:${groupName}`; case 5: return `群:${groupName} 被 ${message.payload.operatorID} 解散`; case 6: return `${message.payload.operatorID} 创建群:${groupName}`; case 7: return `${message.payload.operatorID} 邀请你加群:${groupName}`; case 8: return `你退出群组:${groupName}`; case 9: return `你被${message.payload.operatorID} 设置为群:${groupName} 的管理员`; case 10: return `你被 ${message.payload.operatorID} 撤销群:${groupName} 的管理员身份`; case 12: return `${message.payload.operatorID} 邀请你加群:${groupName}`; case 13: return `${message.payload.operatorID} 同意加群 :${groupName}`; case 14: return `${message.payload.operatorID} 拒接加群 :${groupName}`; case 255: return `自定义群系统通知: ${message.payload.userDefinedField}`; } } const MessageSystem$1 = vue.defineComponent({ props: { data: { type: Array, default: () => { return []; } }, types: { type: Object, default: () => { return {}; } } }, setup(props2, ctx) { const data = vue.reactive({ messageList: [], types: {} }); vue.watchEffect(() => { data.messageList = props2.data; data.types = props2.types; }); const handleApplication = () => { uni.showActionSheet({ itemList: ["同意", "拒绝"], success: (res) => { const option = { handleAction: "Agree", handleMessage: "欢迎进群", message: this.message }; if (res.tapIndex === 1) { option.handleAction = "Reject"; option.handleMessage = "拒绝申请"; } uni.$TUIKit.handleGroupApplication(option).then(() => { uni.showToast({ title: option.handleAction === "Agree" ? "已同意申请" : "已拒绝申请" }); }).catch((error2) => { uni.showToast({ title: error2.message || "处理失败", icon: "none" }); }); } }); }; return { ...vue.toRefs(data), translateGroupSystemNotice, handleApplication, caculateTimeago }; } }); function _sfc_render$2a(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.messageList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ item.payload.operationType === 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "card handle" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(_ctx.caculateTimeago(item.time * 1e3)), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString(_ctx.translateGroupSystemNotice(item)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "choose" }, [ vue.createElementVNode("view", { class: "button", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)) }, "处理") ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "card" }, [ vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(_ctx.caculateTimeago(item.time * 1e3)), 1 /* TEXT */ ), vue.createTextVNode( " " + vue.toDisplayString(_ctx.translateGroupSystemNotice(item)), 1 /* TEXT */ ) ])) ]); }), 128 /* KEYED_FRAGMENT */ ); } const MessageSystem = /* @__PURE__ */ _export_sfc(MessageSystem$1, [["render", _sfc_render$2a], ["__scopeId", "data-v-041bacfa"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-system.vue"]]); const Face$1 = vue.defineComponent({ props: { show: { type: Boolean, default: () => false }, isMute: { type: Boolean, default: () => false } }, setup(props2, ctx) { const data = vue.reactive({ emojiUrl, emojiMap, emojiName, faceUrl, bigEmojiList, show: false, currentIndex: 0, isMute: false }); const dialog = vue.ref(); vue.watchEffect(() => { data.show = props2.show; data.isMute = props2.isMute; }); const toggleShow = () => { if (!data.isMute) { data.show = !data.show; } if (!data.show) { selectFace(0); } }; const select = async (item, index2) => { const options = { name: item }; if (data.currentIndex === 0) { options.type = "emo"; options.url = emojiUrl + emojiMap[item]; options.template = ``; return ctx.emit("send", options); } try { await uni.$TUIKit.TUIChatServer.sendFaceMessage({ index: index2, data: item }); } catch (error2) { } }; const list = vue.computed(() => { const emjiList = [data.emojiName]; for (let i = 0; i < data.bigEmojiList.length; i++) { emjiList.push(data.bigEmojiList[i].list); } return emjiList; }); const selectFace = (index2) => { data.currentIndex = index2; }; const handleSendEmoji = () => { return ctx.emit("handleSendEmoji"); }; return { ...vue.toRefs(data), toggleShow, select, selectFace, list, dialog, handleSendEmoji }; } }); function _sfc_render$29(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "face" }, [ vue.createElementVNode("view", { class: "icon icon-face", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleShow && _ctx.toggleShow(...args)) }), vue.withDirectives(vue.createElementVNode( "view", { class: "face-main", ref: "dialog" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "face-main-box", key: index2 }, [ _ctx.currentIndex === index2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "face-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item, (childrenItem, childrenIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: "face-list-item", key: childrenIndex, onClick: ($event) => _ctx.select(childrenItem, childrenIndex) }, [ index2 === 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "emo-image", src: _ctx.emojiUrl + _ctx.emojiMap[childrenItem] }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: "face-img", src: _ctx.faceUrl + childrenItem + "@2x.png" }, null, 8, ["src"])) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "face-tab" }, [ vue.createElementVNode("view", { class: "face-tab-item", onClick: _cache[1] || (_cache[1] = ($event) => _ctx.selectFace(0)) }, [ vue.createElementVNode("view", { class: "icon icon-face" }) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.bigEmojiList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "face-tab-item", key: index2, onClick: ($event) => _ctx.selectFace(index2 + 1) }, [ vue.createElementVNode("image", { class: "face-icon", src: _ctx.faceUrl + item.icon + "@2x.png" }, null, 8, ["src"]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "send-btn", onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleSendEmoji && _ctx.handleSendEmoji(...args)) }, "发送") ]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, _ctx.show] ]) ]); } const Face = /* @__PURE__ */ _export_sfc(Face$1, [["render", _sfc_render$29], ["__scopeId", "data-v-cc73b204"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-input/message/face.vue"]]); const recorderManager = uni.getRecorderManager(); const AudioMessage$1 = vue.defineComponent({ props: { show: { type: Boolean, default: () => { return false; } } }, setup(props2, ctx) { const data = vue.reactive({ popupToggle: false, isRecording: false, canSend: true, text: "按住说话", recorderManager: null, title: " ", recordTime: 0, recordTimer: null }); vue.onMounted(() => { recorderManager.onStop((res) => { clearInterval(data.recordTimer); let msg = { duration: res.duration ? res.duration : data.recordTime * 1e3, tempFilePath: res.tempFilePath, fileSize: res.fileSize ? res.fileSize : 48 * data.recordTime / 8 * 1024 }; uni.hideLoading(); if (data.canSend) { if (msg.duration < 1e3) { uni.showToast({ title: "录音时间太短", icon: "none" }); } else { uni.$TUIKit.TUIChatServer.sendAudioMessage(msg); } } data.popupToggle = false; data.isRecording = false; data.canSend = true; data.title = " "; data.text = "按住说话"; }); }); const handleLongPress = (e) => { data.popupToggle = true, recorderManager.start({ duration: 6e4, // 录音的时长,单位 ms,最大值 600000(10 分钟) sampleRate: 44100, // 采样率 numberOfChannels: 1, // 录音通道数 encodeBitRate: 192e3, // 编码码率 format: "aac" // 音频格式,选择此格式创建的音频消息,可以在即时通信 IM 全平台(Android、iOS、微信小程序和Web)互通 }); data.startPoint = e.target, data.title = "正在录音", data.isRecording = true, data.recordTime = 0; data.recordTimer = setInterval(() => { data.recordTime++; }, 1e3); }; const handleTouchMove = (e) => { if (data.isRecording) { if (e.currentTarget.offsetTop - e.changedTouches[e.changedTouches.length - 1].clientY > 100) { data.text = "抬起停止"; data.title = "松开手指,取消发送"; data.canSend = false; } else if (e.currentTarget.offsetTop - e.changedTouches[e.changedTouches.length - 1].clientY > 20) { data.text = "抬起停止"; data.title = "上划可取消"; data.canSend = true; } else { data.text = "抬起停止"; data.title = "正在录音"; data.canSend = true; } } }; const handleTouchEnd = () => { data.isRecording = false; data.popupToggle = false; data.text = "按住说话"; uni.hideLoading(); recorderManager.stop(); }; const sendUploadMessage = (e) => { Video.TUIServer.sendVideoMessage(e.target); }; return { ...vue.toRefs(data), sendUploadMessage, handleLongPress, handleTouchEnd, handleTouchMove }; } }); function _sfc_render$28(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "TUI-message-input-main", onLongpress: _cache[3] || (_cache[3] = (...args) => _ctx.handleLongPress && _ctx.handleLongPress(...args)), onTouchmove: _cache[4] || (_cache[4] = (...args) => _ctx.handleTouchMove && _ctx.handleTouchMove(...args)), onTouchend: _cache[5] || (_cache[5] = (...args) => _ctx.handleTouchEnd && _ctx.handleTouchEnd(...args)) }, [ vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.text), 1 /* TEXT */ ), _ctx.popupToggle ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "record-modal", onLongpress: _cache[0] || (_cache[0] = (...args) => _ctx.handleLongPress && _ctx.handleLongPress(...args)), onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchMove && _ctx.handleTouchMove(...args)), onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.handleTouchEnd && _ctx.handleTouchEnd(...args)) }, [ vue.createElementVNode("view", { class: "wrapper" }, [ vue.createElementVNode("view", { class: "modal-loading" }) ]), vue.createElementVNode( "view", { class: "modal-title" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ ) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ); } const AudioMessage = /* @__PURE__ */ _export_sfc(AudioMessage$1, [["render", _sfc_render$28], ["__scopeId", "data-v-764d0a96"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-input/message/audio.vue"]]); const TUIChatInput$1 = vue.defineComponent({ components: { Face, AudioMessage }, props: { text: { type: String, default: () => { return ""; } }, conversationData: { type: Object, default: () => { return ""; } } }, setup(props2) { const TUIServer = uni.$TUIKit.TUIChatServer; const data = vue.reactive({ imType: vue.computed(() => store.state.timStore.imType), orderType: vue.computed(() => store.state.timStore.orderType), firstSendMessage: true, inputText: "", extensionArea: false, sendMessageBtn: false, displayFlag: "", isAudio: false, displayServiceEvaluation: false, displayCommonWords: false, displayOrderList: false, conversation: vue.computed(() => store.state.timStore.conversation) }); vue.watchEffect(() => { data.inputText = props2.text; }); const handleSwitchAudio = () => { data.isAudio = !data.isAudio; }; const handleEmoji = () => { data.displayFlag = data.displayFlag === "emoji" ? "" : "emoji"; }; const handleExtensions = (e) => { data.displayFlag = data.displayFlag === "extension" ? "" : "extension"; }; const handleSendTextMessage = (e) => { if (data.inputText.trimEnd()) { uni.$TUIKit.TUIChatServer.sendTextMessage( JSON.parse(JSON.stringify(data.inputText)) ); } data.inputText = " "; }; const handleOrder = (value2) => { uni.navigateTo({ url: "/pages_order/inquiryOrderDetails?orderId=" + store.state.timStore.orderId }); }; const handleFollow = (value2) => { uni.navigateTo({ url: "/pages_user/followDetails?followId=" + store.state.timStore.followId }); }; const handleStoreOrder = (value2) => { uni.navigateTo({ url: "/pages_order/storeOrderDetail?orderId=" + store.state.timStore.orderId }); }; const handleSend = (emo) => { data.inputText += emo.name; }; const handleSendImageMessage = (type2) => { uni.chooseImage({ sourceType: [type2], count: 1, success: (res) => { uni.getImageInfo({ src: res.tempFilePaths[0], success(image2) { formatAppLog("error", "at pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue:228", image2); setTimeout(function() { TUIServer.sendImageMessage(res, image2); }, 500); } }); } }); }; const handleSendVideoMessage = (type2) => { uni.chooseVideo({ sourceType: [type2], // 来源相册或者拍摄 maxDuration: 60, // 设置最长时间60s camera: "back", // 后置摄像头 success: (res) => { if (res) { setTimeout(function() { TUIServer.sendVideoMessage(res); }, 500); } } }); }; const handleCalling = (value2) => { if (data.conversation.type === "GROUP") { uni.showToast({ title: "群聊暂不支持", icon: "none" }); return; } const { userID } = data.conversation.userProfile; if (typeof uni.$TUICallKit === "undefined") { formatAppLog( "error", "at pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue:271", "请集成 TUICallKit 插件,使用真机运行并且自定义基座调试,请参考官网文档:https://cloud.tencent.com/document/product/269/83857" ); uni.showToast({ title: "请集成 TUICallKit 插件哦 ~ ", icon: "none", duration: 3e3 }); } else { uni.$TUICallKit.call( { userID, callMediaType: value2 }, (res) => { formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue:287", JSON.stringify(res)); } ); } }; return { ...vue.toRefs(data), handleExtensions, handleSendImageMessage, handleSendTextMessage, handleSendVideoMessage, handleEmoji, handleSend, handleSwitchAudio, handleCalling, handleOrder, handleFollow, handleStoreOrder }; } }); const _imports_0 = "/assets/audio.3e97d529.svg"; const _imports_1 = "/assets/emoji.ccca7654.svg"; const _imports_2 = "/assets/more.abda2f36.svg"; const _imports_3 = "/assets/take-photo.bbcbfd9a.svg"; const _imports_4 = "/assets/send-img.7ec35072.svg"; const _imports_5 = "/assets/take-video.3b38acb8.svg"; const _imports_6 = "/assets/audio-calling.ce9b3c0a.svg"; const _imports_7 = "/assets/inquiry.4da57648.svg"; function _sfc_render$27(_ctx, _cache, $props, $setup, $data, $options) { const _component_AudioMessage = vue.resolveComponent("AudioMessage"); const _component_Face = vue.resolveComponent("Face"); return vue.openBlock(), vue.createElementBlock("view", { class: "TUI-message-input-container" }, [ vue.createElementVNode("view", { class: "TUI-message-input" }, [ vue.createElementVNode("image", { class: "TUI-icon", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleSwitchAudio && _ctx.handleSwitchAudio(...args)), src: _imports_0 }), !_ctx.isAudio ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "TUI-message-input-main" }, [ vue.withDirectives(vue.createElementVNode( "textarea", { class: "TUI-message-input-area", "placeholder-class": "input-placeholder", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.inputText = $event), placeholder: "请输入想要咨询的问题...", "auto-height": "", "confirm-type": "send", "confirm-hold": "true", onConfirm: _cache[2] || (_cache[2] = (...args) => _ctx.handleSendTextMessage && _ctx.handleSendTextMessage(...args)) }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, _ctx.inputText] ]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "TUI-message-input-main" }, [ vue.createVNode(_component_AudioMessage) ])), vue.createElementVNode("view", { class: "TUI-message-input-functions", "hover-class": "none" }, [ vue.createElementVNode("image", { class: "TUI-icon", onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleEmoji && _ctx.handleEmoji(...args)), src: _imports_1 }), vue.createElementVNode("view", { onClick: _cache[4] || (_cache[4] = (...args) => _ctx.handleExtensions && _ctx.handleExtensions(...args)) }, [ vue.createElementVNode("image", { class: "TUI-icon", src: _imports_2 }) ]) ]) ]), _ctx.displayFlag === "emoji" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "TUI-Emoji-area" }, [ vue.createVNode(_component_Face, { show: _ctx.displayFlag === "emoji", onSend: _ctx.handleSend, onHandleSendEmoji: _ctx.handleSendTextMessage }, null, 8, ["show", "onSend", "onHandleSendEmoji"]) ])) : vue.createCommentVNode("v-if", true), _ctx.displayFlag === "extension" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "TUI-Extensions" }, [ vue.createCommentVNode(' TODO: 这里功能还没实现\r\n '), vue.createElementVNode("view", { class: "TUI-Extension-slot", onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleSendImageMessage("camera")) }, [ vue.createElementVNode("image", { class: "TUI-Extension-icon", src: _imports_3 }), vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "拍照") ]), vue.createElementVNode("view", { class: "TUI-Extension-slot", onClick: _cache[6] || (_cache[6] = ($event) => _ctx.handleSendImageMessage("album")) }, [ vue.createElementVNode("image", { class: "TUI-Extension-icon", src: _imports_4 }), vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "图片") ]), vue.createElementVNode("view", { class: "TUI-Extension-slot", onClick: _cache[7] || (_cache[7] = ($event) => _ctx.handleSendVideoMessage("album")) }, [ vue.createElementVNode("image", { class: "TUI-Extension-icon", src: _imports_5 }), vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "视频") ]), vue.createElementVNode("view", { class: "TUI-Extension-slot", onClick: _cache[8] || (_cache[8] = ($event) => _ctx.handleSendVideoMessage("camera")) }, [ vue.createElementVNode("image", { class: "TUI-Extension-icon", src: _imports_3 }), vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "录像") ]), _ctx.imType == 1 && _ctx.orderType == 2 || _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "TUI-Extension-slot", onClick: _cache[9] || (_cache[9] = ($event) => _ctx.handleCalling(1)) }, [ vue.createElementVNode("image", { class: "TUI-Extension-icon", src: _imports_6 }), vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "语音通话") ])) : vue.createCommentVNode("v-if", true), _ctx.imType == 1 && _ctx.orderType == 2 || _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "TUI-Extension-slot", onClick: _cache[10] || (_cache[10] = ($event) => _ctx.handleCalling(2)) }, [ vue.createElementVNode("image", { class: "TUI-Extension-icon", src: _imports_5 }), vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "视频通话") ])) : vue.createCommentVNode("v-if", true), _ctx.imType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "TUI-Extension-slot", onClick: _cache[11] || (_cache[11] = ($event) => _ctx.handleOrder()) }, [ vue.createElementVNode("image", { class: "TUI-Extension-icon", src: _imports_7 }), vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "问诊订单") ])) : vue.createCommentVNode("v-if", true), _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "TUI-Extension-slot", onClick: _cache[12] || (_cache[12] = ($event) => _ctx.handleFollow()) }, [ vue.createElementVNode("image", { class: "TUI-Extension-icon", src: _imports_7 }), vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "随访单") ])) : vue.createCommentVNode("v-if", true), _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "TUI-Extension-slot", onClick: _cache[13] || (_cache[13] = ($event) => _ctx.handleStoreOrder()) }, [ vue.createElementVNode("image", { class: "TUI-Extension-icon", src: _imports_7 }), vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "药品订单") ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]); } const TUIChatInput = /* @__PURE__ */ _export_sfc(TUIChatInput$1, [["render", _sfc_render$27], ["__scopeId", "data-v-f3fabc48"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue"]]); class IComponentServer { /** * 组件销毁 */ destroyed() { } /** * 数据监听回调 * * @param {any} oldValue 旧数据 * @param {any} newValue 新数据 */ updateStore(oldValue, newValue) { } } class TUIConversationServer extends IComponentServer { constructor(TUICore) { super(); this.store = store.state.timStore; this.TUICore = uni.$TUIKit; uni.setStorageSync(`TIM_${uni.$chat_SDKAppID}_isTUIKit`, true); if (uni.$aegis) { uni.$aegis.reportEvent({ name: "platform", ext1: "platform-APP-npm", ext2: "uniTuikitExternalVue3", ext3: `${uni.$chat_SDKAppID}` }); } this.bindTIMEvent(); if (uni.$chat_isSDKReady) { this.getConversationList(); } } /** * ///////////////////////////////////////////////////////////////////////////////// * // * // TIM 事件监听注册接口 * // * ///////////////////////////////////////////////////////////////////////////////// */ bindTIMEvent() { this.TUICore.on( uni.$TIM.EVENT.CONVERSATION_LIST_UPDATED, this.handleConversationListUpdate, this ); } unbindTIMEvent() { this.TUICore.off( uni.$TIM.EVENT.CONVERSATION_LIST_UPDATED, this.handleConversationListUpdate ); } handleConversationListUpdate(res) { uni.hideLoading(); if (res.data.length === 0) ; uni.$emit("refreshMsgCount"); res.data.forEach(function(element) { formatAppLog("log", "at pages/TUIKit/TUICore/server/conversation/index.ts:96", "收到会话消息"); formatAppLog("log", "at pages/TUIKit/TUICore/server/conversation/index.ts:97", element); }); store.commit("timStore/setConversationList", res.data); } /** * 组件销毁 * */ destroyed() { this.unbindTIMEvent(); } /* * 获取 conversationList * * @returns {Promise} */ async getConversationList() { return new Promise(async (resolve, reject2) => { try { const imResponse = await uni.$TUIKit.getConversationList(); store.commit("timStore/setConversationList", imResponse.data.conversationList); uni.hideLoading(); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 获取 conversationList * * @param {string} conversationID 会话ID * @returns {Promise} */ async getConversationProfile(conversationID) { return new Promise(async (resolve, reject2) => { try { const imResponse = await this.TUICore.getConversationProfile( conversationID ); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 设置自定义值 */ async setConversationValue(conversationID, data) { return new Promise(async (resolve, reject2) => { try { const imResponse = await this.TUICore.setConversationCustomData( { conversationIDList: [conversationID], customData: data } ); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 删除会话 * * @param {string} conversationID 会话ID * @returns {Promise} */ async deleteConversation(conversationID) { return new Promise(async (resolve, reject2) => { try { const imResponse = await this.TUICore.deleteConversation( conversationID ); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 置顶会话 * * @param {Object} options 置顶参数 * @returns {Promise} */ async pinConversation(options) { return new Promise(async (resolve, reject2) => { try { const imResponse = await this.TUICore.pinConversation(options); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * C2C消息免打扰 * * @param {Object} options 消息免打扰参数 * @returns {Promise} */ async muteConversation(options) { return new Promise(async (resolve, reject2) => { try { const imResponse = await this.TUICore.setMessageRemindType( options ); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 设置已读 * * @param {string} conversationID 会话ID * @returns {Promise} */ async setMessageRead(conversationID) { return new Promise(async (resolve, reject2) => { try { const imResponse = await this.TUICore.setMessageRead({ conversationID }); resolve(imResponse); } catch (error2) { reject2(error2); } }); } } class TUIChatServer extends IComponentServer { constructor(TUICore) { super(); this.currentStore = {}; this.store = store.state.timStore; this.TUICore = uni.$TUIKit; this.bindTIMEvent(); this.updateStore(); } /** * 组件销毁 */ destroyed() { this.unbindTIMEvent(); } /** * 数据监听回调 * * @param {any} newValue 新数据 * @param {any} oldValue 旧数据 * */ updateStore() { this.getMessageList({ conversationID: this.store.conversationID, count: 15 }); store.commit("timStore/resetChat"); } /** * ///////////////////////////////////////////////////////////////////////////////// * // * // TIM 事件监听注册接口 * // * ///////////////////////////////////////////////////////////////////////////////// */ bindTIMEvent() { this.TUICore.on( uni.$TIM.EVENT.MESSAGE_RECEIVED, this.handleMessageReceived, this ); this.TUICore.on( uni.$TIM.EVENT.MESSAGE_MODIFIED, this.handleMessageModified, this ); this.TUICore.on( uni.$TIM.EVENT.MESSAGE_REVOKED, this.handleMessageRevoked, this ); this.TUICore.on( uni.$TIM.EVENT.MESSAGE_READ_BY_PEER, this.handleMessageReadByPeer, this ); this.TUICore.on( uni.$TIM.EVENT.GROUP_LIST_UPDATED, this.handleGroupListUpdated, this ); } unbindTIMEvent() { this.TUICore.off( uni.$TIM.EVENT.MESSAGE_RECEIVED, this.handleMessageReceived ); this.TUICore.off( uni.$TIM.EVENT.MESSAGE_MODIFIED, this.handleMessageModified ); this.TUICore.off(uni.$TIM.EVENT.MESSAGE_REVOKED, this.handleMessageRevoked); this.TUICore.off( uni.$TIM.EVENT.MESSAGE_READ_BY_PEER, this.handleMessageReadByPeer ); this.TUICore.off( uni.$TIM.EVENT.GROUP_LIST_UPDATED, this.handleGroupListUpdated, this ); } handleMessageReceived(event) { event.data.forEach((item) => { if (item.conversationID === this.store.conversationID) { uni.$TUIKit.TUIConversationServer.setMessageRead(item.conversationID); if (item.cloudCustomData != null && item.cloudCustomData != "") { formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:107", "收到消息"); formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:108", item); try { var json = JSON.parse(item.cloudCustomData); store.commit("timStore/setType", json.type); store.commit("timStore/setImType", json.imType); store.commit("timStore/setOrderId", json.orderId); store.commit("timStore/setOrderType", json.orderType); store.commit("timStore/setFollowId", json.followId); if (json.type === "finishInquiry") { store.commit("timStore/setImType", 0); uni.navigateTo({ url: "/pages_order/pingOrder?orderId=" + json.orderId }); } else if (json.type === "startInquiry") { } else if (json.type === "inquiry") { } else if (json.type === "startFollow") { } else if (json.type === "follow") { } else if (json.type === "finishFollow") { } else if (json.type === "startDrugReport") { } else if (json.type === "finishDrugReport") { } else if (json.type === "drugReport") { } } catch (e) { } const messageList = [...this.store.messageList, item]; store.commit("timStore/setMessageList", messageList); } else { const messageList = [...this.store.messageList, item]; store.commit("timStore/setMessageList", messageList); } } }); } handleMessageModified(event) { const middleData = this.store.messageList; this.store.messageList = []; this.store.messageList = middleData; } handleMessageRevoked(event) { } async handleMessageReadByPeer(event) { const middleData = this.store.messageList; await store.commit("timStore/setMessageList", middleData); } handleGroupListUpdated(event) { event == null ? void 0 : event.data.map((item) => { var _a, _b, _c; if ((item == null ? void 0 : item.groupID) === ((_c = (_b = (_a = this == null ? void 0 : this.store) == null ? void 0 : _a.conversation) == null ? void 0 : _b.groupProfile) == null ? void 0 : _c.groupID)) { this.store.conversation.groupProfile = item; const midden = this.store.conversation; this.store.conversation = {}; this.store.conversation = midden; } return item; }); } /** * ///////////////////////////////////////////////////////////////////////////////// * // * // 处理 TIM 接口参数及回调 * // * ///////////////////////////////////////////////////////////////////////////////// */ /** * 创建消息生成参数 * * @param {Object} content 消息体 * @param {String} type 消息类型 text: 文本类型 file: 文件类型 face: 表情 location: 地址 custom: 自定义 merger: 合并 forward: 转发 * @param {Callback} callback 回调函数 * @param {any} to 发送的对象 * @returns {options} 消息参数 */ handleMessageOptions(content, type2, callback, to) { var _a, _b, _c, _d, _e, _f; var customerData = { type: this.store.type, imType: this.store.imType, orderId: this.store.orderId, followId: this.store.followId, orderType: this.store.orderType }; const options = { cloudCustomData: JSON.stringify(customerData), to: "", conversationType: (to == null ? void 0 : to.type) || this.store.conversation.type, payload: content, needReadReceipt: true }; if (type2 === "file" && callback) { options.onProgress = callback; } switch (options.conversationType) { case uni.$TIM.TYPES.CONV_C2C: options.to = ((_a = to == null ? void 0 : to.userProfile) == null ? void 0 : _a.userID) || ((_c = (_b = this.store.conversation) == null ? void 0 : _b.userProfile) == null ? void 0 : _c.userID) || ""; break; case uni.$TIM.TYPES.CONV_GROUP: options.to = ((_d = to == null ? void 0 : to.groupProfile) == null ? void 0 : _d.groupID) || ((_f = (_e = this.store.conversation) == null ? void 0 : _e.groupProfile) == null ? void 0 : _f.groupID) || ""; break; } return options; } /** * 处理异步函数 * * @param {callback} callback 回调函数 * @returns {Promise} 返回异步函数 */ handlePromiseCallback(callback) { return new Promise((resolve, reject2) => { }); } /** * 文件上传进度函数处理 * * @param {number} progress 文件上传进度 1表示完成 * @param {message} message 文件消息 */ handleUploadProgress(progress, message) { this.store.messageList.map((item) => { if (item.ID === message.ID) { item.progress = progress; } return item; }); } /** * ///////////////////////////////////////////////////////////////////////////////// * // * // 对外方法 * // * ///////////////////////////////////////////////////////////////////////////////// */ // /** // * 发送文本消息 // * // * @param {any} text 发送的消息 // * @returns {Promise} // */ /** * 发送文本消息 * * @param {any} text 发送的消息 * @returns {Promise} */ sendTextMessage(text) { return new Promise(async (resolve, reject2) => { try { const options = this.handleMessageOptions({ text }, "text"); const message = this.TUICore.createTextMessage(options); const messageList = [...this.store.messageList, message]; store.commit("timStore/setMessageList", messageList); const imResponse = await this.TUICore.sendMessage(message); this.store.messageList = this.store.messageList.map((item) => { if (item.ID === imResponse.data.message.ID) { return imResponse.data.message; } return item; }); resolve(imResponse); } catch (error2) { reject2(error2); const middleData = this.store.messageList; store.commit("timStore/resetChat"); store.commit("timStore/setMessageList", middleData); } }); } /** * 发送表情消息 * * @param {Object} data 消息内容 * @param {Number} data.index 表情索引 * @param {String} data.data 额外数据 * @returns {Promise} */ sendFaceMessage(data) { return new Promise(async (resolve, reject2) => { try { const options = this.handleMessageOptions(data, "face"); const message = this.TUICore.createFaceMessage(options); const messageList = [...this.store.messageList, message]; store.commit("timStore/setMessageList", messageList); const imResponse = await this.TUICore.sendMessage(message); this.store.messageList = this.store.messageList.map((item) => { if (item.ID === imResponse.data.message.ID) { return imResponse.data.message; } return item; }); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 发送图片消息 * * @param {res} res 图片文件 * @param {image} 图片尺寸 * @returns {Promise} */ sendImageMessage(res, image2) { return new Promise(async (resolve, reject2) => { try { const options = this.handleMessageOptions({ file: res }, "file"); const message = this.TUICore.createImageMessage(options); formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:366", 111222); formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:367", options); formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:368", message); message.payload.imageInfoArray[1].height = image2.height; message.payload.imageInfoArray[1].width = image2.width; const messageList = [...this.store.messageList, message]; store.commit("timStore/setMessageList", messageList); const imResponse = await this.TUICore.sendMessage(message); this.store.messageList = this.store.messageList.map((item) => { if (item.ID === imResponse.data.message.ID) { return imResponse.data.message; } return item; }); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 发送视频消息 * * @param {Video} video 图片文件 * @returns {Promise} */ sendVideoMessage(res, video2) { return new Promise(async (resolve, reject2) => { try { const options = this.handleMessageOptions({ file: res }, "file"); const message = this.TUICore.createVideoMessage(options); const messageList = [...this.store.messageList, message]; store.commit("timStore/setMessageList", messageList); const imResponse = await this.TUICore.sendMessage(message); this.store.messageList = this.store.messageList.map((item) => { if (item.ID === imResponse.data.message.ID) { return imResponse.data.message; } return item; }); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 发送语音消息 * * @param {audio} audio 音频文件 * @returns {Promise} */ sendAudioMessage(audio2) { return new Promise(async (resolve, reject2) => { try { const options = this.handleMessageOptions( { file: audio2 }, "file", (progress) => { this.handleUploadProgress(progress, message); } ); const message = this.TUICore.createAudioMessage(options); const messageList = [...this.store.messageList, message]; store.commit("timStore/setMessageList", messageList); const imResponse = await this.TUICore.sendMessage(message); formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:439", "发送音频消息完成", imResponse); this.store.messageList = this.store.messageList.map((item) => { if (item.ID === imResponse.data.message.ID) { return imResponse.data.message; } return item; }); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 发送文件消息 * * @param {File} file 文件 * @returns {Promise} */ sendFileMessage(file) { return this.handlePromiseCallback(async (resolve, reject2) => { try { const options = this.handleMessageOptions( { file }, "file", (progress) => { this.handleUploadProgress(progress, message); } ); const message = this.TUICore.createFileMessage(options); this.currentStore.messageList.push(message); const imResponse = await this.TUICore.sendMessage(message); formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:472", "发送文件消息完成", imResponse); this.store.messageList = this.store.messageList.map((item) => { if (item.ID === imResponse.data.message.ID) { return imResponse.data.message; } return item; }); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 发送自定义消息 * * @param {Object} data 消息内容 * @param {String} data.data 自定义消息的数据字段 * @param {String} data.description 自定义消息的说明字段 * @param {String} data.extension 自定义消息的扩展字段 * @returns {Promise} */ sendCustomMessage(data) { return new Promise(async (resolve, reject2) => { try { const options = this.handleMessageOptions(data, "custom"); const message = this.TUICore.createCustomMessage(options); const messageList = [...this.store.messageList, message]; store.commit("timStore/setMessageList", messageList); const imResponse = await this.TUICore.sendMessage(message); formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:504", "发送自定义消息完成", imResponse); this.store.messageList = this.store.messageList.map((item) => { if (item.ID === imResponse.data.message.ID) { return imResponse.data.message; } return item; }); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 发送地理位置消息 * * @param {Object} data 消息内容 * @param {String} data.description 地理位置描述信息 * @param {Number} data.longitude 经度 * @param {Number} data.latitude 纬度 * @returns {Promise} */ sendLocationMessage(data) { return this.handlePromiseCallback(async (resolve, reject2) => { try { const options = this.handleMessageOptions(data, "location"); const message = this.TUICore.createLocationMessage(options); this.store.messageList.push(message); const imResponse = await this.TUICore.sendMessage(message); formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:534", "发送地理位置消息完成", imResponse); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 转发消息 * * @param {message} message 消息实例 * @param {any} to 转发的对象 * @returns {Promise} */ forwardMessage(message, to) { return this.handlePromiseCallback(async (resolve, reject2) => { try { const options = this.handleMessageOptions(message, "forward", {}, to); const imMessage = this.TUICore.createForwardMessage(options); const imResponse = await this.TUICore.sendMessage(imMessage); if (this.store.conversation.conversationID === imResponse.data.message.conversationID) { this.store.messageList.push(imResponse.data.message); } formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:561", "消息转发完成", imResponse); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 发送@ 提醒功能的文本消息 * * @param {Object} data 消息内容 * @param {String} data.text 文本消息 * @param {Array} data.atUserList 需要 @ 的用户列表,如果需要 @ALL,请传入 TIM.TYPES.MSG_AT_ALL * @returns {message} * * - 注:此接口仅用于群聊 */ sendTextAtMessage(data) { return new Promise(async (resolve, reject2) => { try { const options = this.handleMessageOptions(data, "text"); const message = this.TUICore.createTextAtMessage(options); this.currentStore.messageList.push(message); const imResponse = await this.TUICore.sendMessage(message); this.currentStore.messageList = this.currentStore.messageList.map( (item) => { if (item.ID === imResponse.data.message.ID) { return imResponse.data.message; } return item; } ); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 发送合并消息 * * @param {Object} data 消息内容 * @param {Array.} data.messageList 合并的消息列表 * @param {String} data.title 合并的标题 * @param {String} data.abstractList 摘要列表,不同的消息类型可以设置不同的摘要信息 * @param {String} data.compatibleText 兼容文本 * @returns {Promise} */ sendMergerMessage(data) { return this.handlePromiseCallback(async (resolve, reject2) => { try { const options = this.handleMessageOptions(data, "merger"); const message = this.TUICore.createMergerMessage(options); this.currentStore.messageList.push(message); const imResponse = await this.TUICore.sendMessage(message); formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:618", "发送合并消息完成", imResponse); this.currentStore.messageList = this.currentStore.messageList.map( (item) => { if (item.ID === imResponse.data.message.ID) { return imResponse.data.message; } return item; } ); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 获取 messageList * * @param {any} options 获取 messageList 参数 * @param {Boolean} history 是否获取历史消息 * @returns {Promise} */ async getMessageList(options, history) { return new Promise(async (resolve, reject2) => { try { const imResponse = await this.TUICore.getMessageList(options); let messageList; if (!history) { messageList = imResponse.data.messageList; } else { messageList = [ ...imResponse.data.messageList, ...this.store.messageList ]; } this.currentStore.nextReqMessageID = imResponse.data.nextReqMessageID; this.currentStore.isCompleted = imResponse.data.isCompleted; store.commit("timStore/setMessageList", messageList); resolve(imResponse.data); } catch (error2) { reject2(error2); } }); } /** * 获取历史消息 * * @returns {Promise} */ async getHistoryMessageList() { return new Promise(async (resolve, reject2) => { try { const options = { conversationID: this.store.conversation.conversationID, nextReqMessageID: this.currentStore.nextReqMessageID, count: 15 }; let messageList = []; if (!this.currentStore.isCompleted) { messageList = await this.getMessageList(options, true); } resolve(messageList); } catch (error2) { reject2(error2); } }); } /** * 消息撤回 * * @param {message} message 消息实例 * @returns {Promise} */ revokeMessage(message) { return new Promise(async (resolve, reject2) => { try { const imResponse = await this.TUICore.revokeMessage(message); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 重发消息 * * @param {message} message 消息实例 * @returns {Promise} */ resendMessage(message) { return new Promise(async (resolve, reject2) => { try { const imResponse = await this.TUICore.resendMessage(message); formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:715", "消息重发完成", imResponse); let messageList = []; messageList = this.store.messageList.filter( (item) => item.ID !== message.ID ); store.commit("timStore/setMessageList", messageList); resolve(imResponse); } catch (error2) { reject2(error2); } }); } /** * 删除消息 * * @param {Array.} messages 消息实例 * @returns {Promise} */ deleteMessage(messages2) { return new Promise(async (resolve, reject2) => { try { const imResponse = await this.TUICore.deleteMessage(messages2); let messageList = []; messageList = this.store.messageList.filter( (item) => item.ID !== messages2.ID ); store.commit("timStore/setMessageList", messageList); resolve(imResponse); } catch (error2) { reject2(error2); } }); } } class TUIProfileServer extends IComponentServer { constructor(TUICore) { super(); this.store = store.state.timStore; this.currentStore = {}; this.TUICore = uni.$TUIKit; this.bindTIMEvent(); } /** * 组件销毁 */ destroyed() { this.unbindTIMEvent(); } /** * ///////////////////////////////////////////////////////////////////////////////// * // * // TIM 事件监听注册接口 * // * ///////////////////////////////////////////////////////////////////////////////// */ bindTIMEvent() { this.TUICore.on( uni.$TIM.EVENT.PROFILE_UPDATED, this.handleProfileUpdated, this ); } unbindTIMEvent() { this.TUICore.off(uni.$TIM.EVENT.PROFILE_UPDATED, this.handleProfileUpdated); } handleProfileUpdated(event) { formatAppLog("log", "at pages/TUIKit/TUICore/server/profile/index.ts:51", event); } } const _sfc_main$27 = vue.defineComponent({ name: "TUIChat", components: { MessageText, MessageImage, MessageVideo, MessageAudio, MessageFace, MessageCustom, MessageBubble, MessageTip, MessageRevoked, MessageSystem, TUIChatInput, MessageOperate }, setup(props2) { const timStore2 = store.state.timStore; uni.$TUIKit.TUIChatServer = new TUIChatServer(); const TUICallKit = vue.shallowRef(null); const TUIServer = uni.$TUIKit.TUIChatServer; const left = 0; const right = 0; const defaultDialogPosition = { top: -70, left, right }; const data = vue.reactive({ messageList: vue.computed(() => timStore2.messageList), conversation: vue.computed(() => timStore2.conversation), triggered: false, scrollTop: 999, text: "", types: uni.$TIM.TYPES, currentMessage: {}, dialogID: "", forwardStatus: false, imageFlag: false, isCompleted: false, oldMessageTime: 0, dialogPosition: defaultDialogPosition, imType: vue.computed(() => timStore2.imType), orderId: vue.computed(() => timStore2.orderId) }); const conversationType = vue.computed(() => { const conversation = data.conversation; if (!(conversation == null ? void 0 : conversation.conversationID)) { return ""; } if ((conversation == null ? void 0 : conversation.type) === uni.$TIM.TYPES.CONV_SYSTEM) { return "system"; } return "chat"; }); const messages2 = vue.computed(() => { if (data.messageList.length > 0) { data.oldMessageTime = data.messageList[0].time; return data.messageList.filter((item) => { return !item.isDeleted; }); } }); onLoad((options) => { uni.setNavigationBarTitle({ title: options && options.conversationName }); if (store.state.timStore.imType == 1) ; else if (store.state.timStore.imType == 2) ; }); onUnload(() => { TUIServer.destroyed(); }); vue.watch(messages2, (newVal, oldVal) => { vue.nextTick(() => { const newLastMessage = newVal[newVal.length - 1]; const oldLastMessage = oldVal ? oldVal[oldVal.length - 1] : {}; data.oldMessageTime = messages2.value[0].time; handleShowTime(); if (oldVal && newLastMessage.ID !== oldLastMessage.ID) { handleScrollBottom(); } }); }); onReady(() => { const options = { sdkAppID: uni.$chat_SDKAppID, // 开通实时音视频服务创建应用后分配的 SDKAppID userID: uni.$chat_userID, // 用户 ID,可以由您的帐号系统指定 userSig: uni.$chat_userSig, // 身份签名,相当于登录密码的作用 tim: uni.$TUIKit // tim 参数适用于业务中已存在 TIM 实例,为保证 TIM 实例唯一性 }; uni.$TUICallKit = TUICallKit; vue.nextTick(() => { uni.$TUICallKit.value !== null && uni.$TUICallKit.value.init(options); }); setTimeout(() => { handleScrollBottom(); }, 500); }); vue.onMounted(() => { handleShowTime(); setTimeout(function() { uni.$TUIKit.TUIConversationServer.setMessageRead( data.conversation.conversationID ); uni.$emit("refreshMsgCount"); }, 2e3); }); onNavigationBarButtonTap(() => { var _a; if (((_a = data.conversation) == null ? void 0 : _a.type) === uni.$TIM.TYPES.CONV_GROUP) { uni.navigateTo({ url: "../TUIGroup/index" }); } else { uni.showToast({ title: "暂无信息" }); } }); const handleGetProfile = () => { uni.navigateTo({ url: "../TUIGroup/index" }); }; const handleShowTime = () => { if (messages2.value) { Array.from(messages2.value).forEach((item) => { if (item.time - data.oldMessageTime > 5 * 60) { data.oldMessageTime = item.time; item.showTime = true; } else { item.showTime = false; } }); } }; const handleScrollBottom = () => { uni.createSelectorQuery().select(".TUI-message-list").boundingClientRect((res) => { const scrollH = res.height; data.scrollTop = scrollH; }).exec(); }; const handleCustomerItem = (event, item) => { if (item.payload.data == "order") { uni.navigateTo({ url: "/pages_order/inquiryOrderDetails?orderId=" + item.payload.description }); } else if (item.payload.data == "prescribe") { var prescribe = JSON.parse(item.payload.extension); uni.navigateTo({ url: "/pages_order/prescribeDetails?prescribeId=" + prescribe.prescribeId }); } else if (item.payload.data == "follow") { var follow = JSON.parse(item.payload.extension); formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/index.vue:365", follow); if (follow.writeStatus == 0) { uni.navigateTo({ url: "/pages_user/doFollow?followId=" + follow.followId }); } else if (follow.writeStatus == 1) { uni.navigateTo({ url: "/pages_user/followDetails?followId=" + follow.followId }); } } else if (item.payload.data == "report") { uni.navigateTo({ url: "/pages_order/inquiryOrderReport?orderId=" + item.payload.description }); } else if (item.payload.data == "drugReport") { uni.navigateTo({ url: "/pages_user/drugReportDetails?reportId=" + item.payload.description }); } }; const handleScroll = (e) => { data.triggered = "restore"; }; const handleRefresher = () => { data.triggered = true; if (!data.isCompleted) { TUIServer.getHistoryMessageList().then((res) => { data.triggered = false; data.isCompleted = res.isCompleted; }); } setTimeout(() => { data.triggered = false; }, 500); }; const handleSend = (emo) => { data.text += emo.name; }; const handleItem = (event, item) => { const { flow } = item; try { const query = uni.createSelectorQuery(); query.select(`#${item.flow + "-" + item.ID}`).boundingClientRect((res) => { var _a; const { top } = res; if (top < 60 + 20) { data.dialogPosition = { ...data.dialogPosition, top: ((_a = res.height) == null ? void 0 : _a.res) + 10 // 在下面展示弹框 + 10px 间隔 }; data.dialogPosition = { ...data.dialogPosition, right: flow === "out" ? 0 : null, // 发出去的消息(弹框 right 都是 0) left: flow === "in" ? 0 : null // 接收的消息(弹框 left 都是 0) }; } else { data.dialogPosition = { ...defaultDialogPosition, right: flow === "out" ? 0 : null, // 发出去的消息(弹框 right 都是 0) left: flow === "in" ? 0 : null // 接收的消息(弹框 left 都是 0) }; } }).exec((res) => { data.currentMessage = item; data.dialogID = item.ID; }); } catch (error2) { data.currentMessage = item; data.dialogID = item.ID; } }; const handleTouchStart = () => { uni.hideKeyboard(); }; const handleEdit = (item) => { data.text = item.payload.text; }; return { ...vue.toRefs(data), TUICallKit, conversationType, messages: messages2, handleShowTime, handleTouchStart, handleRefresher, handleScroll, handleScrollBottom, handleCustomerItem, handleItem, handleEdit, handleTextMessageShowContext, handleImageMessageShowContext, handleVideoMessageShowContext, handleAudioMessageShowContext, handleFileMessageShowContext, handleFaceMessageShowContext, handleLocationMessageShowContext, handleMergerMessageShowContext, handleTipMessageShowContext, handleCustomMessageShowContext, handleSend, caculateTimeago, handleGetProfile }; } }); function _sfc_render$26(_ctx, _cache, $props, $setup, $data, $options) { var _a; const _component_MessageTip = vue.resolveComponent("MessageTip"); const _component_Message_Operate = vue.resolveComponent("Message-Operate"); const _component_MessageText = vue.resolveComponent("MessageText"); const _component_MessageImage = vue.resolveComponent("MessageImage"); const _component_MessageVideo = vue.resolveComponent("MessageVideo"); const _component_MessageAudio = vue.resolveComponent("MessageAudio"); const _component_MessageFace = vue.resolveComponent("MessageFace"); const _component_MessageCustom = vue.resolveComponent("MessageCustom"); const _component_MessageBubble = vue.resolveComponent("MessageBubble"); const _component_MessageRevoked = vue.resolveComponent("MessageRevoked"); const _component_TUIChatInput = vue.resolveComponent("TUIChatInput"); const _component_MessageSystem = vue.resolveComponent("MessageSystem"); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ _ctx.conversationType === "chat" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "TUIChat" }, [ ((_a = _ctx.conversation) == null ? void 0 : _a.type) === "GROUP" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "more-btn", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleGetProfile && _ctx.handleGetProfile(...args)) }, " 更多")) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "TUIChat-container" }, [ vue.createElementVNode("scroll-view", { class: "TUIChat-main", "scroll-y": "true", "scroll-with-animation": true, "refresher-triggered": _ctx.triggered, "refresher-enabled": true, onRefresherrefresh: _cache[3] || (_cache[3] = (...args) => _ctx.handleRefresher && _ctx.handleRefresher(...args)), "scroll-top": _ctx.scrollTop }, [ vue.createElementVNode( "view", { class: "TUI-message-list", onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchStart && _ctx.handleTouchStart(...args)), onClick: _cache[2] || (_cache[2] = ($event) => _ctx.dialogID = "") }, [ _ctx.isCompleted ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "loading-text" }, "没有更多")) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.messages, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: item.ID, id: "view" + item.ID }, [ item.showTime ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "time-container" }, vue.toDisplayString(_ctx.caculateTimeago(item.time * 1e3)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), !item.isRevoked && item.type === _ctx.types.MSG_GRP_TIP ? (vue.openBlock(), vue.createBlock(_component_MessageTip, { key: 1, data: _ctx.handleTipMessageShowContext(item) }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(' '), !item.isRevoked && item.type !== _ctx.types.MSG_GRP_TIP ? (vue.openBlock(), vue.createBlock(_component_MessageBubble, { key: 2, data: item }, { default: vue.withCtx(() => [ _ctx.dialogID === item.ID ? (vue.openBlock(), vue.createBlock(_component_Message_Operate, { key: 0, data: item, class: "dialog dialog-item", style: vue.normalizeStyle({ top: _ctx.dialogPosition.top + "px", right: _ctx.dialogPosition.right + "px", left: _ctx.dialogPosition.left + "px" }) }, null, 8, ["data", "style"])) : vue.createCommentVNode("v-if", true), item.type === _ctx.types.MSG_TEXT ? (vue.openBlock(), vue.createBlock(_component_MessageText, { key: 1, id: item.flow + "-" + item.ID, data: _ctx.handleTextMessageShowContext(item), messageData: item, onLongpress: ($event) => _ctx.handleItem($event, item) }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true), item.type === _ctx.types.MSG_IMAGE ? (vue.openBlock(), vue.createBlock(_component_MessageImage, { key: 2, id: item.flow + "-" + item.ID, data: _ctx.handleImageMessageShowContext(item), messageData: item, onLongpress: ($event) => _ctx.handleItem($event, item) }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true), item.type === _ctx.types.MSG_VIDEO ? (vue.openBlock(), vue.createBlock(_component_MessageVideo, { key: 3, id: item.flow + "-" + item.ID, data: _ctx.handleVideoMessageShowContext(item), messageData: item, onLongpress: ($event) => _ctx.handleItem($event, item) }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true), item.type === _ctx.types.MSG_AUDIO ? (vue.openBlock(), vue.createBlock(_component_MessageAudio, { key: 4, id: item.flow + "-" + item.ID, data: _ctx.handleAudioMessageShowContext(item), messageData: item, onLongpress: ($event) => _ctx.handleItem($event, item) }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true), item.type === _ctx.types.MSG_FACE ? (vue.openBlock(), vue.createBlock(_component_MessageFace, { key: 5, id: item.flow + "-" + item.ID, data: _ctx.handleFaceMessageShowContext(item), messageData: item, onLongpress: ($event) => _ctx.handleItem($event, item) }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true), item.type === _ctx.types.MSG_CUSTOM ? (vue.openBlock(), vue.createBlock(_component_MessageCustom, { key: 6, id: item.flow + "-" + item.ID, data: _ctx.handleCustomMessageShowContext(item), messageData: item, onClick: ($event) => _ctx.handleCustomerItem($event, item), onLongpress: ($event) => _ctx.handleItem($event, item) }, null, 8, ["id", "data", "messageData", "onClick", "onLongpress"])) : vue.createCommentVNode("v-if", true) ]), _: 2 /* DYNAMIC */ }, 1032, ["data"])) : vue.createCommentVNode("v-if", true), item.isRevoked ? (vue.openBlock(), vue.createBlock(_component_MessageRevoked, { key: 3, data: item, onEdit: ($event) => _ctx.handleEdit(item) }, null, 8, ["data", "onEdit"])) : vue.createCommentVNode("v-if", true) ], 8, ["id"]); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ], 40, ["refresher-triggered", "scroll-top"]) ]), _ctx.imType == 1 || _ctx.imType == 2 ? (vue.openBlock(), vue.createBlock(_component_TUIChatInput, { key: 1, text: _ctx.text, conversationData: _ctx.conversation }, null, 8, ["text", "conversationData"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), _ctx.conversationType === "system" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "TUIChat" }, [ vue.createVNode(_component_MessageSystem, { data: _ctx.messages, types: _ctx.types }, null, 8, ["data", "types"]) ])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ ); } const PagesTUIKitTUIPagesTUIChatIndex = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["render", _sfc_render$26], ["__scopeId", "data-v-1902a304"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/index.vue"]]); const _sfc_main$26 = vue.defineComponent({ name: "videoPlay", setup(props2) { const data = vue.reactive({ videoData: "", show: false, videoContext: null, direction: 0 }); onLoad((option) => { data.videoData = option && option.videoMessage; data.show = true; }); onReady(() => { data.videoContext = uni.createVideoContext("videoEle"); }); const toggleClose = () => { data.show = false; uni.navigateBack({ delta: 1 }); }; return { ...vue.toRefs(data), toggleClose }; } }); function _sfc_render$25(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "dialog-video" }, [ _ctx.show ? (vue.openBlock(), vue.createElementBlock("video", { key: 0, class: "video-box", src: _ctx.videoData, id: "videoEle", controls: "", autoplay: "" }, [ vue.createCommentVNode(' \n \n \n ') ], 8, ["src"])) : vue.createCommentVNode("v-if", true) ]); } const PagesTUIKitTUIPagesTUIChatComponentsMessageElementsVideoPlay = /* @__PURE__ */ _export_sfc(_sfc_main$26, [["render", _sfc_render$25], ["__scopeId", "data-v-b57b47b7"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/video-play.vue"]]); let request$e = new Request$1().http; function getTestList(data) { return request$e("/app/test/getTestList", data, "GET"); } function getTestDetails(data) { return request$e("/app/test/getTestDetails", data, "GET"); } function getTestTempDetails(data) { return request$e("/app/test/getTestTempDetails", data, "GET"); } function getTestReport(data) { return request$e("/app/test/getTestReport", data, "GET"); } function getTestReportImg(data) { return request$e("/app/test/getTestReportImg", data, "GET"); } function doReport(data) { return request$e("/app/test/doReport", data, "POST", "application/json;charset=UTF-8"); } const _sfc_main$25 = { mixins: [MescrollMixin], data() { return { mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onShow() { }, //发送给朋友 onShareAppMessage(res) { if (this.$isLogin()) { return { title: "健康自测", path: "/pages_index/testList", imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, //分享到朋友圈 onShareTimeline(res) { if (this.utils.isLogin()) { return { title: "健康自测", imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { pageNum: page2.num, pageSize: page2.size }; getTestList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, // 查看详情 showDetail(item) { uni.navigateTo({ url: "/pages_index/testDetails?tempId=" + item.tempId }); } } }; function _sfc_render$24(_ctx, _cache, $props, $setup, $data, $options) { const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "bg" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/8e52ab17eabc4534b3ce56026fd5c624.jpg" }) ]), vue.createVNode(_component_mescroll_body, { top: "0rpx", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "test-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: index2, onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(item.name), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "subtitle ellipsis2" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info-box" }, [ vue.createElementVNode("view", { class: "people-num" }, [ vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(item.peopleNum) + "W", 1 /* TEXT */ ), vue.createTextVNode("人测过") ]), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(item.num) + "题 | " + vue.toDisplayString(item.time) + "分钟", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: item.img, mode: "aspectFill" }, null, 8, ["src"]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_indexTestList = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["render", _sfc_render$24], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testList.vue"]]); const _sfc_main$24 = { data() { return { tempId: null, item: {} }; }, onLoad(option) { this.tempId = option.tempId; }, onShow() { this.getTestDetails(); }, //发送给朋友 onShareAppMessage(res) { if (this.$isLogin()) { return { title: "健康自测", path: "/pages_index/testDetails?tempId=" + this.tempId, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, //分享到朋友圈 onShareTimeline(res) { if (this.utils.isLogin()) { return { title: "健康自测", imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { navTo(url2) { this.$isLogin().then( (res) => { formatAppLog("log", "at pages_index/testDetails.vue:71", res); if (res) { uni.navigateTo({ url: url2 }); } else { uni.navigateTo({ url: "/pages/auth/login" }); } } ); }, getTestDetails() { let data = { tempId: this.tempId }; getTestDetails(data).then( (res) => { if (res.code == 200) { this.item = res.data; uni.setNavigationBarTitle({ title: this.item.name + "自测" }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$23(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "bg-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/71014b69fdcc4b56ae2a84bdc28f11c3.png" }), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.name), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "msg-box" }, [ vue.createElementVNode( "view", { class: "msg" }, vue.toDisplayString($data.item.msg), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "desc-box" }, [ vue.createElementVNode("view", { class: "desc", innerHTML: $data.item.descs }, null, 8, ["innerHTML"]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_index/test?tempId=" + $data.item.tempId)) }, "立即开始测试") ]), vue.createElementVNode("view", { class: "logo" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/b95950e4208c493d8b74ce0de220c65c.png" }) ]) ]) ]); } const Pages_indexTestDetails = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$23], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testDetails.vue"]]); const _sfc_main$23 = { data() { return { scrollTop: 0, //滚动条位置 formJson: null, tempId: null, patient: null, items: {}, msgs: [], index: 0, item: null }; }, onLoad(option) { this.tempId = option.tempId; var that = this; uni.$on("refreshOrderPatient", (res) => { that.patient = res; }); }, onShow() { this.getTestTempDetails(); this.getTestDetails(); }, //发送给朋友 onShareAppMessage(res) { if (this.$isLogin()) { return { title: "健康体质检测", path: "/pages_index/test?tempId=" + this.tempId, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, //分享到朋友圈 onShareTimeline(res) { if (this.utils.isLogin()) { return { title: "健康体质检测", imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { getTestDetails() { let data = { tempId: this.tempId }; getTestDetails(data).then( (res) => { if (res.code == 200) { uni.setNavigationBarTitle({ title: res.data.name + "自测" }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, addMsg(type2, content) { var msg = { type: type2, content }; this.msgs.push(msg); var that = this; uni.createSelectorQuery().select(".msgs").boundingClientRect((res) => { const scrollH = res.height; that.scrollTop = scrollH; formatAppLog("log", "at pages_index/test.vue:185", that.scrollTop); }).exec(); }, optionClick(item, option) { if (this.patient == null) { uni.showToast({ icon: "none", title: "请选择体验者" }); return; } item.option = option.name; formatAppLog("log", "at pages_index/test.vue:201", item.option); this.addMsg(2, option.name); this.index++; if (this.index <= this.items.length - 1) { this.item = this.items[this.index]; this.addMsg(1, this.item.title); } else { this.submit(); } }, getTestTempDetails() { var data = { tempId: this.tempId }; getTestTempDetails(data).then( (res) => { if (res.code == 200) { this.items = res.items; if (this.items.length > 0) { this.item = this.items[0]; this.addMsg(1, this.item.title); } } }, (err) => { } ); }, addPatient() { uni.navigateTo({ url: "/pages_user/patient" }); }, submit() { var data = { tempId: this.tempId, patientId: this.patient.patientId, formJson: JSON.stringify(this.items) }; doReport(data).then((res) => { if (res.code == 200) { uni.redirectTo({ url: "/pages_index/testResult?reportId=" + res.reportId }); } else { uni.showToast({ icon: "none", title: res.msg }); } }); } } }; function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "patient-cont" }, [ vue.createElementVNode("view", { class: "chose-patient" }, [ $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "patient-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("text", { class: "patient-title" }, "选择体验者"), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("text", { class: "value" }, "请点击添加"), vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "patient", onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString($data.patient.patientName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info" }, [ $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "男")) : vue.createCommentVNode("v-if", true), $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "女")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "msg-cont" }, [ vue.createElementVNode("scroll-view", { class: "msg-scroll", "scroll-top": $data.scrollTop, "scroll-y": "true", "scroll-with-animation": true }, [ vue.createElementVNode("view", { class: "msgs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.msgs, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "msg-item" }, [ item.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "left" }, [ vue.createElementVNode("image", { class: "img", src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5fd36547a3ca4d0b9935e623d3d8e1c5.png" }), vue.createElementVNode( "view", { class: "msg-content" }, vue.toDisplayString(item.content), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), item.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "right" }, [ vue.createElementVNode( "view", { class: "msg-content" }, vue.toDisplayString(item.content), 1 /* TEXT */ ), vue.createElementVNode("image", { class: "img", src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d7d49263e2e04f56a7a86fa7bfd35687.jpg" }) ])) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ], 8, ["scroll-top"]) ]), $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "option-cont" }, [ vue.createElementVNode( "view", { class: "option-title" }, vue.toDisplayString($data.item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "options" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(JSON.parse($data.item.scoreJson), (option) => { return vue.openBlock(), vue.createElementBlock("view", { class: "option-item", onClick: ($event) => $options.optionClick($data.item, option) }, vue.toDisplayString(option.name), 9, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(` \r 体质测试以当下感受为准作答,人的体质有可能会随季节变化。 \r \r \r \r 选择体验者\r \r \r \r \r \r \r {{patient.patientName}}\r \r \r \r {{$getAge(patient.birthday)}}岁\r {{$parseIdCard(patient.idCard)}}\r \r \r \r \r \r \r \r \r \r {{index+1}}{{item.title}}?\r \r \r {{option.name}}\r \r \r \r \r \r \r 提交\r \r \r 提交代表你已接受以下声明\r \r 本测试不作为诊断和治疗的依据,对于已经医生确诊的疾病,应按照医嘱积极治疗。所提及的内容仅作为生活保健的咨询建议。如遇不适请及时就医。\r \r `) ]); } const Pages_indexTest = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/test.vue"]]); const _sfc_main$22 = { data() { return { advImgs: [], advs: [], reportId: null, statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, report: null }; }, onLoad(option) { this.reportId = option.reportId; this.getTestReport(); }, onShow() { this.getAdvList(); }, methods: { shareImg() { var data = { reportId: this.reportId }; getTestReportImg(data).then( (res) => { if (res.code == 200) { formatAppLog("log", "at pages_index/testResult.vue:80", res); wx.downloadFile({ url: res.img, success: (res1) => { formatAppLog("log", "at pages_index/testResult.vue:84", res1); wx.showShareImageMenu({ path: res1.tempFilePath }); }, fail: (res2) => { formatAppLog("log", "at pages_index/testResult.vue:90", res2); } }); } }, (err) => { } ); }, handleAdvClick(index2) { var ad = this.advs[index2]; formatAppLog("log", "at pages_index/testResult.vue:105", ad.advUrl); if (ad.showType == 1) { uni.setStorageSync("url", ad.advUrl); uni.navigateTo({ url: "h5" }); } else if (ad.showType == 2) { uni.navigateTo({ url: ad.advUrl }); } else if (ad.showType == 3) { uni.setStorageSync("content", ad.content); uni.navigateTo({ url: "content" }); } }, getAdvList() { var that = this; var data = { advType: 3 }; getAdvList(data).then((res) => { if (res.code == 200) { that.advImgs = []; that.advs = res.data; that.advs.forEach(function(element) { if (element.imageUrl != null && element.imageUrl != "") { that.advImgs.push(element.imageUrl); } }); formatAppLog("log", "at pages_index/testResult.vue:140", that.advImgs); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getTestReport() { var data = { reportId: this.reportId }; getTestReport(data).then( (res) => { if (res.code == 200) { this.report = res.report; } }, (err) => { } ); }, goBack() { uni.navigateBack(); } } }; function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "bg" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/8e52ab17eabc4534b3ce56026fd5c624.jpg" }) ]), $data.report != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "cont-box" }, [ vue.createElementVNode("view", { class: "user" }, [ vue.createElementVNode("image", { src: JSON.parse($data.report.patientJson).avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : JSON.parse($data.report.patientJson).avatar }, null, 8, ["src"]), vue.createElementVNode("view", { class: "user-box" }, [ vue.createElementVNode( "view", { class: "sex" }, "性别 " + vue.toDisplayString(JSON.parse($data.report.patientJson).sex == 1 ? "男" : "女"), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "username" }, "年龄 " + vue.toDisplayString(JSON.parse($data.report.patientJson).age) + "岁", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "items" }, [ vue.createElementVNode("view", { class: "result-box" }, [ vue.createElementVNode( "view", { class: "time" }, "检测时间 " + vue.toDisplayString($data.report.createTime), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "title" }, "您属于" + vue.toDisplayString($data.report.testResult), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString($data.report.testResult), 1 /* TEXT */ ), vue.createCommentVNode(' {{report.testResult}}是一种身心和谐的表现,努力保持吧! ') ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(JSON.parse($data.report.conditioningPlanJson), (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item-box" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.name), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "descs" }, vue.toDisplayString(item.value.replace(/\\n/g, "
")), 1 /* TEXT */ ) ]), index2 < JSON.parse($data.report.conditioningPlanJson).length - 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "line" })) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "tips" }, " 注:报告内容仅供参考,具体情况以医生建议为准 "), $data.advImgs.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "banner" }, [ vue.createVNode(_component_u_swiper, { list: $data.advImgs, circular: "", onClick: $options.handleAdvClick }, null, 8, ["list", "onClick"]) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "share", onClick: _cache[0] || (_cache[0] = ($event) => $options.shareImg()) }, [ vue.createElementVNode("text", null, "分享") ]) ]); } const Pages_indexTestResult = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testResult.vue"]]); const _sfc_main$21 = { name: "Poster", components: {}, props: {}, data: function() { return { url: null }; }, mounted: function() { this.getTestReportImg(); }, methods: { shareImg: function() { wx.downloadFile({ url: this.url, success: (res) => { wx.showShareImageMenu({ path: res.tempFilePath }); } }); }, getTestReportImg: function() { let that = this; var data = { reportId: this.reportId }; getTestReportImg(data).then( (res) => { that.url = res.url; }, (err) => { uni.showToast({ title: err.msg, icon: "none", duration: 2e3 }); } ); }, downloadIamge(imgsrc, name) { var that = this; this.isDown = true; var downloadUrl = imgsrc; that.downloadFile(downloadUrl); }, saveImg: function() { this.downloadIamge(this.url, "poster"); }, downloadFile(url2) { formatAppLog("log", "at pages_index/testResultImg.vue:106", url2); uni.showLoading({ title: "图片保存中..." }); uni.downloadFile({ url: url2, fail: function(res) { uni.showModal({ title: "提示", content: "保存失败" }); }, success: function(res) { formatAppLog("log", "at pages_index/testResultImg.vue:119", res); var tempFilePath = res.tempFilePath; uni.saveImageToPhotosAlbum({ filePath: tempFilePath, success: () => { uni.showToast({ title: "保存成功", duration: 2e3 }); }, fail: () => { formatAppLog("log", "at pages_index/testResultImg.vue:132", "saveImageToPhotosAlbum 失败"); uni.hideLoading(); }, complete: function() { uni.hideLoading(); } }); } }); } } }; function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "banenr" }, [ vue.createElementVNode("image", { class: "slide-image", src: _ctx.url, mode: "widthFix", "show-menu-by-longpress": "" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.shareImg()) }, "分享好友") ]) ]); } const Pages_indexTestResultImg = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testResultImg.vue"]]); const _sfc_main$20 = { components: { Menu }, mixins: [MescrollMixin], data() { return { top: null, cates: [], cateId: 0, keyword: "", mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onShow() { this.getArticleCateList(); }, methods: { menuClick(item) { this.cateId = item.cateId; this.mescroll.resetUpScroll(); }, doSearch() { this.mescroll.resetUpScroll(); }, getArticleCateList() { var that = this; let data = {}; getArticleCateList$1(data).then( (res) => { if (res.code == 200) { this.cates = res.data; var query = uni.createSelectorQuery().in(that); setTimeout(function() { query.select(".top-content").boundingClientRect((data2) => { if (data2) { formatAppLog("log", "at pages_index/articleList.vue:104", "View height:", data2.height + "px"); that.top = data2.height + "px"; } }).exec(); }, 500); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { keyword: this.keyword, cateId: this.cateId, pageNum: page2.num, pageSize: page2.size }; getArticleList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, // 关键词选择 choseCate(item) { this.cateId = item.cateId; this.mescroll.resetUpScroll(); }, // 查看详情 showDetail(item) { uni.navigateTo({ url: "./articleDetails?articleId=" + item.articleId }); } } }; function _sfc_render$1$(_ctx, _cache, $props, $setup, $data, $options) { const _component_Menu = vue.resolveComponent("Menu"); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-content" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入关键字搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "cate-list" }, [ $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, { key: 0, list: $data.cates, onMenuClick: $options.menuClick, style: { "width": "100%" } }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 关键字列表 "), vue.createCommentVNode(` \r \r \r {{item.cateName}} \r \r `) ]) ]), $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, { key: 0, top: $data.top, ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "article-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: index2, onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info-box" }, [ vue.createElementVNode("view", { class: "readers" }, [ vue.createElementVNode("view", { class: "readings" }, [ vue.createElementVNode("image", { class: "eye", src: "/static/images/eye.png" }), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(item.views), 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(item.publishTime), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: item.imageUrl, mode: "aspectFill" }, null, 8, ["src"]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["top", "onInit", "onDown", "onUp", "down", "up"])) : vue.createCommentVNode("v-if", true) ]); } const Pages_indexArticleList = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/articleList.vue"]]); const _sfc_main$1$ = { data() { return { articleId: null, item: {} }; }, onLoad(option) { this.articleId = option.articleId; }, onShow() { this.getArticleById(); }, //发送给朋友 onShareAppMessage(res) { return { title: this.item.title, path: "/pages_index/articleDetails?articleId=" + this.articleId }; }, //分享到朋友圈 onShareTimeline(res) { return { title: this.item.title, query: "articleId=" + this.articleId //页面参数 }; }, methods: { getArticleById() { let data = { articleId: this.articleId }; getArticleById(data).then( (res) => { if (res.code == 200) { this.item = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$1_(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "detail-cont" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode( "view", { class: "reads" }, "阅读数:" + vue.toDisplayString($data.item.views), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString($data.item.publishTime), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 正文 "), vue.createElementVNode("view", { class: "full-text" }, [ vue.createElementVNode("view", { innerHTML: $data.item.contents }, null, 8, ["innerHTML"]) ]) ]), vue.createCommentVNode(" 咨询按钮 "), vue.createElementVNode("view", { class: "inquiry" }, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("image", { src: "/static/images/consult.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "咨询"), vue.createElementVNode("button", { class: "contact-btn", "open-type": "contact" }) ]) ]) ]); } const Pages_indexArticleDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1$, [["render", _sfc_render$1_], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/articleDetails.vue"]]); let request$d = new Request$1().http; function getDiseaseList(data) { return request$d("/app/disease/getDiseaseList", data, "GET"); } function getDiseaseById(data) { return request$d("/app/disease/getDiseaseById", data, "GET"); } const _sfc_main$1_ = { mixins: [MescrollMixin], data() { return { depts: [], deptId: 0, keyword: "", mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onShow() { this.getDepartmentList(); }, methods: { doSearch() { this.mescroll.resetUpScroll(); }, getDepartmentList() { let data = {}; getDepartmentList(data).then( (res) => { if (res.code == 200) { this.depts = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { keyword: this.keyword, deptId: this.deptId, pageNum: page2.num, pageSize: page2.size }; getDiseaseList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, choseDept(item) { this.deptId = item.deptId; this.mescroll.resetUpScroll(); }, showDetail(item) { uni.navigateTo({ url: "./diseaseDetails?diseaseId=" + item.diseaseId }); } } }; function _sfc_render$1Z(_ctx, _cache, $props, $setup, $data, $options) { const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-content" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入关键字搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "dept-list" }, [ vue.createCommentVNode(" 关键字列表 "), vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [ vue.createElementVNode("view", { class: "inner" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.depts, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass($data.deptId == item.deptId ? "item active" : "item"), onClick: ($event) => $options.choseDept(item) }, vue.toDisplayString(item.deptName), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ]), vue.createVNode(_component_mescroll_body, { top: "192rpx", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "disease-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: index2, onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "title ellipsis1" }, vue.toDisplayString(item.diseaseName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" }) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_indexDiseaseList = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/diseaseList.vue"]]); const _sfc_main$1Z = { data() { return { advs: [], advImgs: [], diseaseId: null, item: {} }; }, onLoad(option) { this.diseaseId = option.diseaseId; }, onShow() { this.getAdvList(); this.getDiseaseById(); }, onShareAppMessage(res) { if (this.$isLogin()) { return { title: this.item.diseaseName, path: "/pages_index/diseaseDetails?id=" + this.diseaseId, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, //分享到朋友圈 onShareTimeline(res) { if (this.utils.isLogin()) { return { title: this.item.diseaseName, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { handleAdvClick(index2) { var ad = this.advs[index2]; formatAppLog("log", "at pages_index/diseaseDetails.vue:79", ad.advUrl); if (ad.showType == 1) { uni.setStorageSync("url", ad.advUrl); uni.navigateTo({ url: "h5" }); } else if (ad.showType == 2) { uni.navigateTo({ url: ad.advUrl }); } else if (ad.showType == 3) { uni.setStorageSync("content", ad.content); uni.navigateTo({ url: "content" }); } }, getAdvList() { var that = this; var data = { advType: 7 }; getAdvList(data).then((res) => { if (res.code == 200) { that.advImgs = []; that.advs = []; res.data.forEach(function(element) { if (element.imageUrl != null && element.imageUrl != "") { that.advs.push(element); that.advImgs.push(element.imageUrl); } }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getDiseaseById() { let data = { diseaseId: this.diseaseId }; getDiseaseById(data).then( (res) => { if (res.code == 200) { this.item = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$1Y(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e); return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content" }, [ vue.createElementVNode("view", { class: "detail-cont" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "疾病名称") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.item.diseaseName }, null, 8, ["innerHTML"]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "病情症状") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.item.symptom }, null, 8, ["innerHTML"]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "病情诊断") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.item.diagnose }, null, 8, ["innerHTML"]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "相关检验") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.item.inspect }, null, 8, ["innerHTML"]) ]), vue.createElementVNode("view", { class: "ad" }, [ vue.createVNode(_component_u_swiper, { list: $data.advImgs, indicator: "", indicatorMode: "line", circular: "", onClick: $options.handleAdvClick }, null, 8, ["list", "onClick"]) ]) ])) : vue.createCommentVNode("v-if", true); } const Pages_indexDiseaseDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/diseaseDetails.vue"]]); let request$c = new Request$1().http; function getHospitalList(data) { return request$c("/app/hospital/getHospitalList", data, "GET"); } function getHospitalById(data) { return request$c("/app/hospital/getHospitalById", data, "GET"); } const _sfc_main$1Y = { mixins: [MescrollMixin], data() { return { keyword: "", mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onShow() { }, methods: { doSearch() { this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { keyword: this.keyword, pageNum: page2.num, pageSize: page2.size }; getHospitalList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, // 查看详情 showDetail(item) { uni.navigateTo({ url: "./hospitalDetails?hospitalId=" + item.hospitalId }); } } }; function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) { const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-content" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入关键字搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "hos-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: index2, onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: item.imgUrl, mode: "aspectFit" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title one-t" }, vue.toDisplayString(item.hospitalName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "desc" }, [ vue.createElementVNode("text", { class: "tag" }, "二甲"), vue.createElementVNode("text", { class: "tag" }, "综合医院") ]), vue.createElementVNode("view", { class: "address-box" }, [ vue.createElementVNode("view", { class: "address-left" }, [ vue.createElementVNode( "view", { class: "address one-t" }, vue.toDisplayString(item.address), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "address-right" }, [ vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" }) ]) ]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_indexHospitalList = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/hospitalList.vue"]]); const _sfc_main$1X = { data() { return { hospitalId: null, hospital: null, doctors: [] }; }, onLoad(options) { this.hospitalId = options.hospitalId; this.getHospitalById(); this.getDoctorList(); }, methods: { goMap() { uni.openLocation({ latitude: parseFloat(this.hospital.lat), longitude: parseFloat(this.hospital.lng), scale: 18, name: this.hospital.hospitalName, address: this.hospital.address, success: () => { formatAppLog("log", "at pages_index/hospitalDetails.vue:113", "导航success"); } }); }, getHospitalById() { var data = { hospitalId: this.hospitalId }; getHospitalById(data).then((res) => { if (res.code == 200) { this.hospital = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getDoctorList() { var data = { hospitalId: this.hospitalId, pageNum: 1, pageSize: 10 }; getDoctorList(data).then((res) => { if (res.code == 200) { res.data.list.forEach(function(value2, index2, array3) { value2.prices = JSON.parse(value2.priceJson); }); this.doctors = res.data.list; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, navTo(url2) { uni.navigateTo({ url: url2 }); } } }; function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "bg" }), vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "hos-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: $data.hospital.imgUrl, mode: "aspectFit" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "hos-name-box" }, [ vue.createElementVNode( "view", { class: "hos-name" }, vue.toDisplayString($data.hospital.hospitalName), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "hos-desc-box" }, vue.toDisplayString($data.hospital.hospitalType), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "hos-address-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.goMap()) }, [ vue.createElementVNode("view", { class: "address-left" }, [ vue.createElementVNode( "view", { class: "address one-t" }, vue.toDisplayString($data.hospital.address), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "address-right" }, [ vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" }) ]) ]) ]) ]), vue.createElementVNode("view", { class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "医院介绍") ]), vue.createElementVNode( "view", { class: "desc" }, vue.toDisplayString($data.hospital.descs), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doctor-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "医院专家") ]), $data.doctors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "doctors" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.doctors, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "doctor", onClick: ($event) => $options.navTo("/pages/doctor/doctorDetails?doctorId=" + item.doctorId) }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("image", { mode: "aspectFill", class: "doc-img", src: item.avatar }, null, 8, ["src"]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString(item.doctorName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-position" }, vue.toDisplayString(item.position), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "hospital" }, vue.toDisplayString(item.hospitalName) + " " + vue.toDisplayString(item.deptName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "doc-spec" }, [ vue.createElementVNode("view", { class: "title" }, "擅长:"), vue.createElementVNode( "view", { class: "spec ellipsis" }, vue.toDisplayString(item.speciality), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-ping" }, [ vue.createElementVNode( "view", { class: "ping" }, "好评率:" + vue.toDisplayString(item.pingStar) + "%", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "count" }, "咨询量:" + vue.toDisplayString(item.orderNumber), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-price" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createTextVNode("¥ "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.prices, (price, index3) => { return vue.openBlock(), vue.createElementBlock("text", null, [ vue.createTextVNode( vue.toDisplayString(price.price.toFixed(2)) + " ", 1 /* TEXT */ ), index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode("view", { class: "btn" }, " 咨询医生 ") ]) ]) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]) ]) ]); } const Pages_indexHospitalDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-cd01f093"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/hospitalDetails.vue"]]); const _sfc_main$1W = { data() { return { searchHistory: [], searchKey: "", statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight }; }, onLoad() { this.searchHistory = this.$getHisSearch(); }, methods: { clearHistory() { this.$clearHisSearch(); this.searchHistory = this.$getHisSearch(); }, back() { uni.navigateBack({ delta: 1 }); }, goSearchList(key) { uni.navigateTo({ url: "/pages_doctor/doctorList?keyword=" + key }); }, toSearchList() { if (this.searchKey != "") { this.$addHisSearch(this.searchKey); } uni.navigateTo({ url: "/pages_doctor/doctorList?keyword=" + this.searchKey }); } } }; function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-cont" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "back", src: "/static/images/icon_back_b.png", mode: "heightFix", onClick: _cache[0] || (_cache[0] = ($event) => $options.back()) }), vue.createElementVNode("view", { class: "screen-box" }, [ vue.createElementVNode("image", { class: "search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.searchKey = $event), placeholder: "搜索医生/疾病/知识", onConfirm: _cache[2] || (_cache[2] = ($event) => $options.toSearchList($data.searchKey)), "placeholder-style": "font-size:26rpx;color:#DADADA;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.searchKey] ]), vue.createElementVNode("text", { class: "text", onClick: _cache[3] || (_cache[3] = (...args) => $options.toSearchList && $options.toSearchList(...args)) }, "搜索") ]) ]) ]), vue.createElementVNode("view", { class: "cont-inner" }, [ vue.createCommentVNode(" 搜索历史 "), vue.createElementVNode("view", { class: "search-info" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title" }, "搜索历史"), vue.createElementVNode("view", { class: "btn", onClick: _cache[4] || (_cache[4] = ($event) => $options.clearHistory()) }, "清除搜索历史") ]), vue.createElementVNode("view", { class: "search-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.searchHistory, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.goSearchList(item), key: index2, class: "item ellipsis" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(item), 1 /* TEXT */ ) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(' \r\n 名字很长很长很长很长很长很长很长很长\r\n ') ]) ]) ]) ]); } const Pages_indexSearch = /* @__PURE__ */ _export_sfc(_sfc_main$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-e5a36dca"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/search.vue"]]); const props$m = { props: { // 是否显示圆点 isDot: { type: Boolean, default: props$y.badge.isDot }, // 显示的内容 value: { type: [Number, String], default: props$y.badge.value }, // 显示的内容 modelValue: { type: [Number, String], default: props$y.badge.modelValue }, // 是否显示 show: { type: Boolean, default: props$y.badge.show }, // 最大值,超过最大值会显示 '{max}+' max: { type: [Number, String], default: props$y.badge.max }, // 主题类型,error|warning|success|primary type: { type: String, default: props$y.badge.type }, // 当数值为 0 时,是否展示 Badge showZero: { type: Boolean, default: props$y.badge.showZero }, // 背景颜色,优先级比type高,如设置,type参数会失效 bgColor: { type: [String, null], default: props$y.badge.bgColor }, // 字体颜色 color: { type: [String, null], default: props$y.badge.color }, // 徽标形状,circle-四角均为圆角,horn-左下角为直角 shape: { type: String, default: props$y.badge.shape }, // 设置数字的显示方式,overflow|ellipsis|limit // overflow会根据max字段判断,超出显示`${max}+` // ellipsis会根据max判断,超出显示`${max}...` // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数 numberType: { type: String, default: props$y.badge.numberType }, // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效 offset: { type: Array, default: props$y.badge.offset }, // 是否反转背景和字体颜色 inverted: { type: Boolean, default: props$y.badge.inverted }, // 是否绝对定位 absolute: { type: Boolean, default: props$y.badge.absolute } } }; const _sfc_main$1V = { name: "u-badge", mixins: [mpMixin, props$m, mixin], 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 = uni.$u.addUnit(top); style.right = uni.$u.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); } } } }; function _sfc_render$1U(_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 ? "u-badge--dot" : "u-badge--not-dot", _ctx.inverted && "u-badge--inverted", _ctx.shape === "horn" && "u-badge--horn", `u-badge--${_ctx.type}${_ctx.inverted ? "--inverted" : ""}`], "u-badge"]), style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle]) }, vue.toDisplayString(_ctx.isDot ? "" : $options.showValue), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__scopeId", "data-v-06cca9b7"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-badge/u-badge.vue"]]); const props$l = { props: { // 滑块的移动过渡时间,单位ms duration: { type: Number, default: props$y.tabs.duration }, // tabs标签数组 list: { type: Array, default: props$y.tabs.list }, // 滑块颜色 lineColor: { type: String, default: props$y.tabs.lineColor }, // 菜单选择中时的样式 activeStyle: { type: [String, Object], default: props$y.tabs.activeStyle }, // 菜单非选中时的样式 inactiveStyle: { type: [String, Object], default: props$y.tabs.inactiveStyle }, // 滑块长度 lineWidth: { type: [String, Number], default: props$y.tabs.lineWidth }, // 滑块高度 lineHeight: { type: [String, Number], default: props$y.tabs.lineHeight }, // 滑块背景显示大小,当滑块背景设置为图片时使用 lineBgSize: { type: String, default: props$y.tabs.lineBgSize }, // 菜单item的样式 itemStyle: { type: [String, Object], default: props$y.tabs.itemStyle }, // 菜单是否可滚动 scrollable: { type: Boolean, default: props$y.tabs.scrollable }, // 当前选中标签的索引 current: { type: [Number, String], default: props$y.tabs.current }, // 默认读取的键名 keyName: { type: String, default: props$y.tabs.keyName } } }; const _sfc_main$1U = { name: "u-tabs", mixins: [mpMixin, mixin, props$l], 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() { this.$nextTick(() => { this.resize(); }); } }, computed: { textStyle() { return (index2) => { const style = {}; const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle( this.inactiveStyle ); if (this.list[index2].disabled) { style.color = "#c8c9cc"; } return uni.$u.deepMerge(customeStyle, style); }; }, propsBadge() { return uni.$u.props.badge; } }, async mounted() { this.init(); }, emits: ["click", "change"], 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); const lineWidth = uni.$u.getPx(this.lineWidth); this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2; if (this.firstTime) { setTimeout(() => { this.firstTime = false; }, 10); } }, // nvue下设置滑块的位置 animation(x, duration = 0) { }, // 点击某一个标签 clickHandler(item, index2) { this.$emit("click", { ...item, index: index2 }); if (item.disabled) return; this.innerCurrent = index2; this.resize(); this.$emit("change", { ...item, index: index2 }); }, init() { uni.$u.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 windowWidth2 = uni.$u.sys().windowWidth; let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth2 - 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("u-tabs__wrapper__scroll-view").then((size) => resolve(size)); }); }, // 获取所有标签的尺寸 getAllItemRect() { return new Promise((resolve) => { const promiseAllArr = this.list.map((item, index2) => this.queryRect( `u-tabs__wrapper__nav__item-${index2}`, true )); Promise.all(promiseAllArr).then((sizes) => resolve(sizes)); }); }, // 获取各个标签的尺寸 queryRect(el, item) { return new Promise((resolve) => { this.$uGetRect(`.${el}`).then((size) => { resolve(size); }); }); } } }; function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$8); return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [ vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [ vue.renderSlot(_ctx.$slots, "left", {}, void 0, true), vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [ vue.createElementVNode("scroll-view", { "scroll-x": _ctx.scrollable, "scroll-left": $data.scrollLeft, "scroll-with-animation": "", class: "u-tabs__wrapper__scroll-view", "show-scrollbar": false, ref: "u-tabs__wrapper__scroll-view" }, [ vue.createElementVNode( "view", { class: "u-tabs__wrapper__nav", ref: "u-tabs__wrapper__nav" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]), key: index2, onClick: ($event) => $options.clickHandler(item, index2), ref_for: true, ref: `u-tabs__wrapper__nav__item-${index2}`, style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }]) }, [ vue.createElementVNode( "text", { class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]), style: vue.normalizeStyle([$options.textStyle(index2)]) }, vue.toDisplayString(item[_ctx.keyName]), 7 /* TEXT, CLASS, STYLE */ ), vue.createVNode(_component_u_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: "u-tabs__wrapper__nav__line", ref: "u-tabs__wrapper__nav__line", style: vue.normalizeStyle([{ width: _ctx.$u.addUnit(_ctx.lineWidth), transform: `translate(${$data.lineOffsetLeft}px)`, transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`, height: _ctx.$u.addUnit(_ctx.lineHeight), background: _ctx.lineColor, backgroundSize: _ctx.lineBgSize }]) }, null, 4 /* STYLE */ ) ], 512 /* NEED_PATCH */ ) ], 8, ["scroll-x", "scroll-left"]) ]), vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ]) ]); } const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-02b0c54f"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-tabs/u-tabs.vue"]]); let request$b = new Request$1().http; function getFamousPrescribeList(data) { return request$b("/app/index/getFamousPrescribeList", data, "GET"); } function getFamousPrescribeById(data) { return request$b("/app/index/getFamousPrescribeById", data, "GET"); } function getQuestionsList(data) { return request$b("/app/index/getQuestionsList", data, "GET"); } function getQuestionsById(data) { return request$b("/app/index/getQuestionsById", data, "GET"); } function getMedicatedFoodList(data) { return request$b("/app/index/getMedicatedFoodList", data, "GET"); } function getMedicatedFoodById(data) { return request$b("/app/index/getMedicatedFoodById", data, "GET"); } function getVesselList(data) { return request$b("/app/index/getVesselList", data, "GET"); } function getVesselById(data) { return request$b("/app/index/getVesselById", data, "GET"); } function getChineseMedicineList(data) { return request$b("/app/index/getChineseMedicineList", data, "GET"); } function getChineseMedicineById(data) { return request$b("/app/index/getChineseMedicineById", data, "GET"); } const _sfc_main$1T = { data() { return { tabIndex: 1, indication: "", belongBook: "", title: "", prescribeType: 0, pageNum: 1, pageSize: 20, typeOptions: [], bookOptions: [], indicationOptions: [], tabs: [ { name: "按类型", id: "1" }, { name: "按疾病", id: "2" }, { name: "按书籍", id: "3" } ], keyword: "", dataList: [] }; }, onLoad() { this.getDictByKey("sys_famous_prescribe_type"); this.getDictByKey("sys_famous_prescribe_indication"); this.getDictByKey("sys_famous_prescribe_book"); }, methods: { scrolltolower(e) { this.pageNum++; this.getFamousPrescribeList(); formatAppLog("log", "at pages_index/famousPrescribeList.vue:91", e); }, typeClick(item) { this.indication = ""; this.belongBook = ""; this.prescribeType = parseInt(item.dictValue); formatAppLog("log", "at pages_index/famousPrescribeList.vue:97", this.prescribeType); this.title = item.dictLabel; this.pageNum = 1; this.getFamousPrescribeList(); }, bookClick(item) { this.indication = ""; this.prescribeType = 0; this.belongBook = item.dictLabel; this.title = item.dictLabel; this.pageNum = 1; this.getFamousPrescribeList(); }, indicationClick(item) { formatAppLog("log", "at pages_index/famousPrescribeList.vue:111", item); this.belongBook = ""; this.prescribeType = 0; this.indication = item.dictLabel; this.title = item.dictLabel; this.pageNum = 1; this.getFamousPrescribeList(); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_famous_prescribe_type") { this.typeOptions = res.data; if (this.typeOptions != null && this.typeOptions.length > 0) { this.typeClick(this.typeOptions[0]); } } if (key == "sys_famous_prescribe_indication") { this.indicationOptions = res.data; } if (key == "sys_famous_prescribe_book") { this.bookOptions = res.data; } } }, (err) => { } ); }, tabChange(item) { this.tabIndex = item.id; this.getFamousPrescribeList(); }, doSearch() { this.pageNum = 1; this.getFamousPrescribeList(); }, getFamousPrescribeList() { var that = this; var data = { indication: this.indication, belongBook: this.belongBook, prescribeType: this.prescribeType, keyword: this.keyword, pageNum: this.pageNum, pageSize: this.pageSize }; getFamousPrescribeList(data).then((res) => { if (res.code == 200) { if (this.pageNum == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = []; } }); }, // 查看详情 showDetail(item) { uni.navigateTo({ url: "./famousPrescribeDetails?id=" + item.id }); } } }; function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-box" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入关键字搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "tabs" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["list", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "items" }, [ $data.tabIndex == 1 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.typeOptions, (item) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.typeClick(item), class: vue.normalizeClass(item.dictValue == $data.prescribeType ? "item ellipsis active" : "item ellipsis") }, [ item.dictValue == $data.prescribeType ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "line" })) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $data.tabIndex == 2 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList($data.indicationOptions, (item) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.indicationClick(item), class: vue.normalizeClass(item.dictLabel == $data.indication ? "item ellipsis active" : "item ellipsis") }, [ item.dictLabel == $data.indication ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "line" })) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $data.tabIndex == 3 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 2 }, vue.renderList($data.bookOptions, (item) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.bookClick(item), class: vue.normalizeClass(item.dictLabel == $data.belongBook ? "item ellipsis active" : "item ellipsis") }, [ item.dictLabel == $data.belongBook ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "line" })) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.title), 1 /* TEXT */ ), vue.createElementVNode( "scroll-view", { onScrolltolower: _cache[2] || (_cache[2] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)), "scroll-y": "true", style: { "height": "calc(100vh - 180rpx)" } }, [ vue.createElementVNode("view", { class: "items" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "r-item", onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode( "view", { class: "r-left" }, vue.toDisplayString(item.prescribeName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "r-right" }, [ vue.createElementVNode("image", { src: "/static/images/fire.png" }) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ], 32 /* NEED_HYDRATION */ ) ]) ]) ]); } const Pages_indexFamousPrescribeList = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/famousPrescribeList.vue"]]); const _sfc_main$1S = { data() { return { advs: [], advImgs: [], tabIndex: 1, id: null, item: {} }; }, onLoad(option) { this.id = option.id; }, onShow() { this.getAdvList(); this.getFamousPrescribeById(); }, onShareAppMessage(res) { if (this.$isLogin()) { return { title: this.item.prescribeName, path: "/pages_index/famousPrescribeDetails?id=" + this.id, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, //分享到朋友圈 onShareTimeline(res) { if (this.utils.isLogin()) { return { title: this.item.title, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { handleAdvClick(index2) { var ad = this.advs[index2]; formatAppLog("log", "at pages_index/famousPrescribeDetails.vue:95", ad.advUrl); if (ad.showType == 1) { uni.setStorageSync("url", ad.advUrl); uni.navigateTo({ url: "h5" }); } else if (ad.showType == 2) { uni.navigateTo({ url: ad.advUrl }); } else if (ad.showType == 3) { uni.setStorageSync("content", ad.content); uni.navigateTo({ url: "content" }); } }, getAdvList() { var that = this; var data = { advType: 9 }; getAdvList(data).then((res) => { if (res.code == 200) { that.advImgs = []; that.advs = []; res.data.forEach(function(element) { if (element.imageUrl != null && element.imageUrl != "") { that.advs.push(element); that.advImgs.push(element.imageUrl); } }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, tabClick(index2) { this.tabIndex = index2; }, getFamousPrescribeById() { let data = { id: this.id }; getFamousPrescribeById(data).then( (res) => { if (res.code == 200) { this.item = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e); return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content" }, [ vue.createElementVNode("view", { class: "image" }, [ vue.createElementVNode("image", { mode: "aspectFill", src: $data.item.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "detail-cont" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.prescribeName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "title-py" }, vue.toDisplayString($data.item.pinyin), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "desc" }, vue.toDisplayString($data.item.actionTitle), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "line-h" }), vue.createElementVNode("view", { class: "tabs" }, [ vue.createElementVNode( "view", { onClick: _cache[0] || (_cache[0] = ($event) => $options.tabClick(1)), class: vue.normalizeClass($data.tabIndex == 1 ? "tab1 active" : "tab1") }, " 基本用法 ", 2 /* CLASS */ ), vue.createElementVNode( "view", { onClick: _cache[1] || (_cache[1] = ($event) => $options.tabClick(2)), class: vue.normalizeClass($data.tabIndex == 2 ? "tab2 active" : "tab2") }, " 药物作用 ", 2 /* CLASS */ ), vue.createElementVNode( "view", { onClick: _cache[2] || (_cache[2] = ($event) => $options.tabClick(3)), class: vue.normalizeClass($data.tabIndex == 3 ? "tab3 active" : "tab3") }, " 用药方法 ", 2 /* CLASS */ ), vue.createElementVNode( "view", { onClick: _cache[3] || (_cache[3] = ($event) => $options.tabClick(4)), class: vue.normalizeClass($data.tabIndex == 4 ? "tab4 active" : "tab4") }, " 注意事项 ", 2 /* CLASS */ ) ]), $data.tabIndex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content", innerHTML: $data.item.descs }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true), $data.tabIndex == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "content", innerHTML: $data.item.action }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true), $data.tabIndex == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "content", innerHTML: $data.item.usageMethod }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true), $data.tabIndex == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "content", innerHTML: $data.item.msg }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "ad" }, [ vue.createVNode(_component_u_swiper, { list: $data.advImgs, indicator: "", indicatorMode: "line", circular: "", onClick: $options.handleAdvClick }, null, 8, ["list", "onClick"]) ]) ])) : vue.createCommentVNode("v-if", true); } const Pages_indexFamousPrescribeDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/famousPrescribeDetails.vue"]]); const _sfc_main$1R = { data() { return { tabIndex: 1, vessel: "", region: "", title: "", pageNum: 1, pageSize: 20, vesselOptions: [], regionOptions: [], tabs: [ { name: "按经络查询", id: "1" }, { name: "按部位查询", id: "2" } ], keyword: "", dataList: [] }; }, onLoad() { this.getDictByKey("sys_vessel"); this.getDictByKey("sys_vessel_region"); this.getVesselList(); }, methods: { scrolltolower(e) { this.pageNum++; this.getVesselList(); formatAppLog("log", "at pages_index/vesselList.vue:85", e); }, regionClick(item) { this.vessel = ""; this.region = item.dictLabel; this.title = item.dictLabel; this.pageNum = 1; this.getVesselList(); }, vesselClick(item) { this.region = ""; this.vessel = item.dictLabel; this.title = item.dictLabel; this.pageNum = 1; this.getVesselList(); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_vessel") { this.vesselOptions = res.data; } if (key == "sys_vessel_region") { this.regionOptions = res.data; } } }, (err) => { } ); }, tabChange(item) { this.tabIndex = item.id; this.getVesselList(); }, doSearch() { this.pageNum = 1; this.getVesselList(); }, getVesselList() { var that = this; var data = { vessel: this.vessel, region: this.region, keyword: this.keyword, pageNum: this.pageNum, pageSize: this.pageSize }; getVesselList(data).then((res) => { if (res.code == 200) { if (this.pageNum == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = []; } }); }, // 查看详情 showDetail(item) { uni.navigateTo({ url: "./vesselDetails?id=" + item.id }); } } }; function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-box" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入关键字搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "tabs" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["list", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "items" }, [ $data.tabIndex == 1 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.vesselOptions, (item) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.vesselClick(item), class: vue.normalizeClass(item.dictValue == $data.vessel ? "item ellipsis active" : "item ellipsis") }, [ item.dictValue == $data.vessel ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "line" })) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $data.tabIndex == 2 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList($data.regionOptions, (item) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.regionClick(item), class: vue.normalizeClass(item.dictLabel == $data.region ? "item ellipsis active" : "item ellipsis") }, [ item.dictLabel == $data.region ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "line" })) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.title), 1 /* TEXT */ ), vue.createElementVNode( "scroll-view", { onScrolltolower: _cache[2] || (_cache[2] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)), "scroll-y": "true", style: { "height": "calc(100vh - 180rpx)" } }, [ vue.createElementVNode("view", { class: "items" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "r-item", onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode( "view", { class: "r-left" }, vue.toDisplayString(item.vesselName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "r-right" }, [ vue.createElementVNode("image", { src: "/static/images/fire.png" }) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ], 32 /* NEED_HYDRATION */ ) ]) ]) ]); } const Pages_indexVesselList = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/vesselList.vue"]]); const _sfc_main$1Q = { data() { return { advs: [], advImgs: [], tabIndex: 1, item: {} }; }, onLoad(option) { this.id = option.id; }, onShow() { this.getAdvList(); this.getVesselById(); }, //发送给朋友 onShareAppMessage(res) { if (this.$isLogin()) { return { title: this.item.vesselName, path: "/pages_index/vesselDetails?id=" + this.id, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, //分享到朋友圈 onShareTimeline(res) { if (this.utils.isLogin()) { return { title: this.item.vesselName, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { handleAdvClick(index2) { var ad = this.advs[index2]; formatAppLog("log", "at pages_index/vesselDetails.vue:75", ad.advUrl); if (ad.showType == 1) { uni.setStorageSync("url", ad.advUrl); uni.navigateTo({ url: "h5" }); } else if (ad.showType == 2) { uni.navigateTo({ url: ad.advUrl }); } else if (ad.showType == 3) { uni.setStorageSync("content", ad.content); uni.navigateTo({ url: "content" }); } }, getAdvList() { var that = this; var data = { advType: 5 }; getAdvList(data).then((res) => { if (res.code == 200) { that.advImgs = []; that.advs = []; res.data.forEach(function(element) { if (element.imageUrl != null && element.imageUrl != "") { that.advs.push(element); that.advImgs.push(element.imageUrl); } }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getVesselById() { let data = { id: this.id }; getVesselById(data).then( (res) => { if (res.code == 200) { this.item = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e); return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content" }, [ vue.createElementVNode("view", { class: "image" }, [ vue.createElementVNode("image", { mode: "aspectFill", src: $data.item.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "detail-cont" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.vesselName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "title-py" }, vue.toDisplayString($data.item.pinyin), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "desc" }, vue.toDisplayString($data.item.actionTitle), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "line-h" }), vue.createElementVNode("view", { class: "content", innerHTML: $data.item.descs }, null, 8, ["innerHTML"]) ]), vue.createElementVNode("view", { class: "ad" }, [ vue.createVNode(_component_u_swiper, { list: $data.advImgs, indicator: "", indicatorMode: "line", circular: "", onClick: $options.handleAdvClick }, null, 8, ["list", "onClick"]) ]) ])) : vue.createCommentVNode("v-if", true); } const Pages_indexVesselDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/vesselDetails.vue"]]); const _sfc_main$1P = { data() { return { tabIndex: 1, indication: "", flavor: "", vessel: "", title: "", pageNum: 1, pageSize: 20, flavorOptions: [], indicationOptions: [], tabs: [ { name: "按五味", id: "1" }, { name: "按疾病", id: "2" } ], keyword: "", dataList: [] }; }, onLoad() { this.getDictByKey("sys_chinese_medicine_flavor"); this.getDictByKey("sys_indication"); this.getChineseMedicineList(); }, methods: { scrolltolower(e) { this.pageNum++; this.getChineseMedicineList(); formatAppLog("log", "at pages_index/chineseMedicineList.vue:83", e); }, indicationClick(item) { this.flavor = ""; this.indication = item.dictLabel; this.title = item.dictLabel; this.pageNum = 1; this.getChineseMedicineList(); }, flavorClick(item) { formatAppLog("log", "at pages_index/chineseMedicineList.vue:93", item); this.indication = ""; this.flavor = item.dictLabel; this.title = item.dictLabel; this.pageNum = 1; this.getChineseMedicineList(); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_indication") { this.indicationOptions = res.data; } if (key == "sys_chinese_medicine_flavor") { this.flavorOptions = res.data; } } }, (err) => { } ); }, tabChange(item) { this.tabIndex = item.id; this.getChineseMedicineList(); }, doSearch() { this.pageNum = 1; this.getChineseMedicineList(); }, getChineseMedicineList() { var that = this; var data = { indication: this.indication, flavor: this.flavor, vessel: this.vessel, keyword: this.keyword, pageNum: this.pageNum, pageSize: this.pageSize }; getChineseMedicineList(data).then((res) => { if (res.code == 200) { if (this.pageNum == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = []; } }); }, // 查看详情 showDetail(item) { uni.navigateTo({ url: "./chineseMedicineDetails?id=" + item.id }); } } }; function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-box" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入关键字搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "tabs" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["list", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "items" }, [ $data.tabIndex == 1 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.flavorOptions, (item) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.flavorClick(item), class: vue.normalizeClass(item.dictValue == $data.flavor ? "item ellipsis active" : "item ellipsis") }, [ item.dictValue == $data.flavor ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "line" })) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $data.tabIndex == 2 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList($data.indicationOptions, (item) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.indicationClick(item), class: vue.normalizeClass(item.dictLabel == $data.indication ? "item ellipsis active" : "item ellipsis") }, [ item.dictLabel == $data.indication ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "line" })) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)), 1 /* TEXT */ ) ], 10, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.title), 1 /* TEXT */ ), vue.createElementVNode( "scroll-view", { onScrolltolower: _cache[2] || (_cache[2] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)), "scroll-y": "true", style: { "height": "calc(100vh - 180rpx)" } }, [ vue.createElementVNode("view", { class: "items" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "r-item", onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode( "view", { class: "r-left" }, vue.toDisplayString(item.medicineName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "r-right" }, [ vue.createElementVNode("image", { src: "/static/images/fire.png" }) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ], 32 /* NEED_HYDRATION */ ) ]) ]) ]); } const Pages_indexChineseMedicineList = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/chineseMedicineList.vue"]]); const _sfc_main$1O = { data() { return { advs: [], advImgs: [], tabIndex: 1, articleId: null, item: {} }; }, onLoad(option) { this.id = option.id; }, onShow() { this.getChineseMedicineById(); this.getAdvList(); }, onShareAppMessage(res) { if (this.$isLogin()) { return { title: this.item.medicineName, path: "/pages_index/chineseMedicineDetails?id=" + this.id, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, //分享到朋友圈 onShareTimeline(res) { if (this.utils.isLogin()) { return { title: this.item.title, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { handleAdvClick(index2) { var ad = this.advs[index2]; formatAppLog("log", "at pages_index/chineseMedicineDetails.vue:95", ad.advUrl); if (ad.showType == 1) { uni.setStorageSync("url", ad.advUrl); uni.navigateTo({ url: "h5" }); } else if (ad.showType == 2) { uni.navigateTo({ url: ad.advUrl }); } else if (ad.showType == 3) { uni.setStorageSync("content", ad.content); uni.navigateTo({ url: "content" }); } }, getAdvList() { var that = this; var data = { advType: 8 }; getAdvList(data).then((res) => { if (res.code == 200) { that.advImgs = []; that.advs = []; res.data.forEach(function(element) { if (element.imageUrl != null && element.imageUrl != "") { that.advs.push(element); that.advImgs.push(element.imageUrl); } }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, tabClick(index2) { this.tabIndex = index2; }, getChineseMedicineById() { let data = { id: this.id }; getChineseMedicineById(data).then( (res) => { if (res.code == 200) { this.item = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e); return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content" }, [ vue.createElementVNode("view", { class: "image" }, [ vue.createElementVNode("image", { mode: "aspectFill", src: $data.item.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "detail-cont" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.medicineName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "title-py" }, vue.toDisplayString($data.item.pinyin), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "desc" }, vue.toDisplayString($data.item.actionTitle), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "line-h" }), vue.createElementVNode("view", { class: "tabs" }, [ vue.createElementVNode( "view", { onClick: _cache[0] || (_cache[0] = ($event) => $options.tabClick(1)), class: vue.normalizeClass($data.tabIndex == 1 ? "tab1 active" : "tab1") }, " 基本用法 ", 2 /* CLASS */ ), vue.createElementVNode( "view", { onClick: _cache[1] || (_cache[1] = ($event) => $options.tabClick(2)), class: vue.normalizeClass($data.tabIndex == 2 ? "tab2 active" : "tab2") }, " 药物作用 ", 2 /* CLASS */ ), vue.createElementVNode( "view", { onClick: _cache[2] || (_cache[2] = ($event) => $options.tabClick(3)), class: vue.normalizeClass($data.tabIndex == 3 ? "tab3 active" : "tab3") }, " 用药方法 ", 2 /* CLASS */ ), vue.createElementVNode( "view", { onClick: _cache[3] || (_cache[3] = ($event) => $options.tabClick(4)), class: vue.normalizeClass($data.tabIndex == 4 ? "tab4 active" : "tab4") }, " 注意事项 ", 2 /* CLASS */ ) ]), $data.tabIndex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content", innerHTML: $data.item.descs }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true), $data.tabIndex == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "content", innerHTML: $data.item.action }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true), $data.tabIndex == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "content", innerHTML: $data.item.usageMethod }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true), $data.tabIndex == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "content", innerHTML: $data.item.msg }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "ad" }, [ vue.createVNode(_component_u_swiper, { list: $data.advImgs, indicator: "", indicatorMode: "line", circular: "", onClick: $options.handleAdvClick }, null, 8, ["list", "onClick"]) ]) ])) : vue.createCommentVNode("v-if", true); } const Pages_indexChineseMedicineDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/chineseMedicineDetails.vue"]]); const _sfc_main$1N = { mixins: [MescrollMixin], data() { return { foodOptions: [], actionOptions: [], indicationOptions: [], action: "", food: "", indications: "", keyword: "", mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onShow() { this.getDictByKey("sys_medicated_food"); this.getDictByKey("sys_medicated_food_action"); this.getDictByKey("sys_indication"); }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_medicated_food") { this.foodOptions = res.data; } if (key == "sys_medicated_food_action") { this.actionOptions = res.data; } if (key == "sys_indication") { this.indicationOptions = res.data; } } }, (err) => { } ); }, doSearch() { this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { food: this.food, action: this.action, indications: this.indications, keyword: this.keyword, pageNum: page2.num, pageSize: page2.size }; getMedicatedFoodList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, choseAction(item) { this.action = item.dictLabel; this.mescroll.resetUpScroll(); }, choseFood(item) { this.food = item.dictLabel; this.mescroll.resetUpScroll(); }, choseIndications(item) { this.indications = item.dictLabel; this.mescroll.resetUpScroll(); }, // 查看详情 showDetail(item) { uni.navigateTo({ url: "./medicatedFoodDetails?id=" + item.id }); } } }; function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) { const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-content" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入关键字搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "cate-list" }, [ vue.createCommentVNode(" 关键字列表 "), vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [ vue.createElementVNode("view", { class: "inner" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.foodOptions, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass($data.food == item.dictLabel ? "item active" : "item"), onClick: ($event) => $options.choseFood(item) }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [ vue.createElementVNode("view", { class: "inner" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.actionOptions, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass($data.action == item.dictLabel ? "item active" : "item"), onClick: ($event) => $options.choseAction(item) }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [ vue.createElementVNode("view", { class: "inner" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.indicationOptions, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass($data.indications == item.dictLabel ? "item active" : "item"), onClick: ($event) => $options.choseIndications(item) }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ]), vue.createVNode(_component_mescroll_body, { top: "376rpx", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "article-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: index2, onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { src: item.imgUrl, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode( "view", { class: "title ellipsis" }, vue.toDisplayString(item.foodName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "desc ellipsis" }, vue.toDisplayString(item.actionTitle), 1 /* TEXT */ ) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_indexMedicatedFoodList = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/medicatedFoodList.vue"]]); const _sfc_main$1M = { data() { return { advs: [], advImgs: [], item: {} }; }, onLoad(option) { this.id = option.id; }, onShow() { this.getAdvList(); this.getMedicatedFoodById(); }, onShareAppMessage(res) { if (this.utils.isLogin()) { return { title: this.item.foodName, path: "/pages_index/medicatedFoodDetails?id=" + this.id, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, //分享到朋友圈 onShareTimeline(res) { if (this.utils.isLogin()) { return { title: this.item.title, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { handleAdvClick(index2) { var ad = this.advs[index2]; formatAppLog("log", "at pages_index/medicatedFoodDetails.vue:73", ad.advUrl); if (ad.showType == 1) { uni.setStorageSync("url", ad.advUrl); uni.navigateTo({ url: "h5" }); } else if (ad.showType == 2) { uni.navigateTo({ url: ad.advUrl }); } else if (ad.showType == 3) { uni.setStorageSync("content", ad.content); uni.navigateTo({ url: "content" }); } }, getAdvList() { var that = this; var data = { advType: 4 }; getAdvList(data).then((res) => { if (res.code == 200) { that.advImgs = []; that.advs = []; res.data.forEach(function(element) { if (element.imageUrl != null && element.imageUrl != "") { that.advs.push(element); that.advImgs.push(element.imageUrl); } }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getMedicatedFoodById() { let data = { id: this.id }; getMedicatedFoodById(data).then( (res) => { if (res.code == 200) { this.item = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e); return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content" }, [ vue.createElementVNode("view", { class: "image" }, [ vue.createElementVNode("image", { mode: "aspectFill", src: $data.item.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "detail-cont" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.foodName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "title-py" }, vue.toDisplayString($data.item.pinyin), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "desc" }, vue.toDisplayString($data.item.actionTitle), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "line-h" }), vue.createElementVNode("view", { class: "content", innerHTML: $data.item.descs }, null, 8, ["innerHTML"]) ]), vue.createElementVNode("view", { class: "ad" }, [ vue.createVNode(_component_u_swiper, { list: $data.advImgs, indicator: "", indicatorMode: "line", circular: "", onClick: $options.handleAdvClick }, null, 8, ["list", "onClick"]) ]) ])) : vue.createCommentVNode("v-if", true); } const Pages_indexMedicatedFoodDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/medicatedFoodDetails.vue"]]); const _sfc_main$1L = { mixins: [MescrollMixin], data() { return { typeOptions: [], questionsType: 0, keyword: "", mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onShow() { this.getDictByKey("sys_questions_type"); }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_questions_type") { this.typeOptions = res.data; } } }, (err) => { } ); }, doSearch() { this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { keyword: this.keyword, questionsType: this.questionsType, pageNum: page2.num, pageSize: page2.size }; getQuestionsList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, // 关键词选择 choseType(item) { this.questionsType = item.dictValue; this.mescroll.resetUpScroll(); }, // 查看详情 showDetail(item) { uni.navigateTo({ url: "./questionsDetails?id=" + item.id }); } } }; function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) { const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-content" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入服务包搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "cate-list" }, [ vue.createCommentVNode(" 关键字列表 "), vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [ vue.createElementVNode("view", { class: "inner" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.typeOptions, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass($data.questionsType == item.dictValue ? "item active" : "item"), onClick: ($event) => $options.choseType(item) }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ]), vue.createVNode(_component_mescroll_body, { top: "192rpx", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "article-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: index2, onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info-box" }, [ vue.createElementVNode("view", { class: "readers" }, [ vue.createElementVNode("view", { class: "readings" }, [ vue.createElementVNode("image", { class: "eye", src: "/static/images/eye.png" }), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(item.views), 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(item.createTime), 1 /* TEXT */ ) ]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_indexQuestionsList = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/questionsList.vue"]]); const _sfc_main$1K = { data() { return { advs: [], advImgs: [], id: null, item: {} }; }, onLoad(option) { this.id = option.id; }, onShow() { this.getAdvList(); this.getQuestionsById(); }, onShareAppMessage(res) { if (this.$isLogin()) { return { title: this.item.vesselName, path: "/pages_index/questionsDetails?id=" + this.id, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, //分享到朋友圈 onShareTimeline(res) { if (this.utils.isLogin()) { return { title: this.item.title, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { handleAdvClick(index2) { var ad = this.advs[index2]; formatAppLog("log", "at pages_index/questionsDetails.vue:70", ad.advUrl); if (ad.showType == 1) { uni.setStorageSync("url", ad.advUrl); uni.navigateTo({ url: "h5" }); } else if (ad.showType == 2) { uni.navigateTo({ url: ad.advUrl }); } else if (ad.showType == 3) { uni.setStorageSync("content", ad.content); uni.navigateTo({ url: "content" }); } }, getAdvList() { var that = this; var data = { advType: 6 }; getAdvList(data).then((res) => { if (res.code == 200) { that.advImgs = []; that.advs = []; res.data.forEach(function(element) { if (element.imageUrl != null && element.imageUrl != "") { that.advs.push(element); that.advImgs.push(element.imageUrl); } }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getQuestionsById() { let data = { id: this.id }; getQuestionsById(data).then( (res) => { if (res.code == 200) { this.item = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "detail-cont" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode( "view", { class: "reads" }, "阅读数:" + vue.toDisplayString($data.item.views), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString($data.item.createTime), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 正文 "), vue.createElementVNode("view", { class: "full-text" }, [ vue.createElementVNode("view", { innerHTML: $data.item.answers }, null, 8, ["innerHTML"]) ]) ]), vue.createElementVNode("view", { class: "ad" }, [ vue.createVNode(_component_u_swiper, { list: $data.advImgs, indicator: "", indicatorMode: "line", circular: "", onClick: $options.handleAdvClick }, null, 8, ["list", "onClick"]) ]) ]); } const Pages_indexQuestionsDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/questionsDetails.vue"]]); const _sfc_main$1J = { components: { Menu }, mixins: [MescrollMixin], // 使用mixin data() { return { top: null, cates: [], diseaseType: 0, keyword: "", mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad() { }, onShow() { this.getPackagCateList(1); }, methods: { menuClick(item) { this.diseaseType = item.cateId; this.mescroll.resetUpScroll(); }, getPackagCateList(type2) { var data = { type: type2 }; var that = this; getPackagCateList(data).then( (res) => { if (res.code == 200) { this.cates = res.data; var query = uni.createSelectorQuery().in(that); setTimeout(function() { query.select(".top-content").boundingClientRect((data2) => { if (data2) { formatAppLog("log", "at pages_index/packageList.vue:99", "View height:", data2.height + "px"); that.top = data2.height + "px"; } }).exec(); }, 500); } }, (err) => { } ); }, // 关键词选择 choseType(item) { this.diseaseType = item.cateCode; this.mescroll.resetUpScroll(); }, doSearch() { this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { isShow: 1, diseaseType: this.diseaseType, keyword: this.keyword, pageNum: page2.num, pageSize: page2.size }; getPackageList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) { const _component_Menu = vue.resolveComponent("Menu"); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-content" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入关键字搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "cate-list" }, [ $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, { key: 0, list: $data.cates, onMenuClick: $options.menuClick, style: { "width": "100%" } }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(` \r {{item.cateName}} `) ]) ]), $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, { key: 0, top: $data.top, bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: $data.downOption, up: $data.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "package-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", onClick: ($event) => $options.navTo("/pages_index/packageDetails?packageId=" + item.packageId) }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { src: item.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "bottom" }, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(item.packageName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode( "view", { class: "price" }, "¥" + vue.toDisplayString(item.price.toFixed(2)) + "元/日", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item.sales) + "人已购", 1 /* TEXT */ ) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["top", "onInit", "down", "up", "onDown", "onUp"])) : vue.createCommentVNode("v-if", true) ]); } const Pages_indexPackageList = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__scopeId", "data-v-09c8d24b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/packageList.vue"]]); let request$a = new Request$1().http; function create$1(data) { return request$a("/app/packageOrder/create", data, "POST", "application/json;charset=UTF-8"); } function compute$2(data) { return request$a("/app/packageOrder/compute", data, "POST", "application/json;charset=UTF-8"); } function pay$2(data) { return request$a("/app/packageOrder/pay", data, "POST", "application/json;charset=UTF-8"); } function payment$2(data) { return request$a("/app/packageOrder/payment", data, "POST", "application/json;charset=UTF-8"); } function getPackageOrderById(data) { return request$a("/app/packageOrder/getPackageOrderById", data, "GET"); } function getMyPackageOrderList(data) { return request$a("/app/packageOrder/getMyPackageOrderList", data, "GET"); } function getCompanyUserPackageOrderList(data) { return request$a("/app/packageOrder/getCompanyUserPackageOrderList", data, "GET"); } function getSharePackageOrderById(data) { return request$a("/app/packageOrder/getSharePackageOrderById", data, "GET"); } function getCompanyUserPackageOrderById(data) { return request$a("/app/packageOrder/getCompanyUserPackageOrderById", data, "GET"); } function cancelOrder$1(data) { return request$a("/app/packageOrder/cancel", data, "POST", "application/json;charset=UTF-8"); } let request$9 = new Request$1().http; function login(data) { return request$9("/app/companyUser/login", data, "POST", "application/json;charset=UTF-8"); } function getUserInfo(data) { return request$9("/app/companyUser/getUserInfo", data, "GET", "application/json;charset=UTF-8"); } function bindCompanyUser(data) { return request$9("/app/companyUser/bindCompanyUser", data, "POST", "application/json;charset=UTF-8"); } const _sfc_main$1I = { data() { return { // isDrug:0, storeName: "", displayText: "查看更多", displayMore: 0, imgs: [], activeImg: 1, doctorShow: false, doctors: [], products: [], packageId: null, item: {}, describe: null, doctorId: null, doctorPageNum: 1, doctorLastPage: false, doctorTotal: 0, companyUserId: null, companyId: null }; }, onLoad(option) { this.packageId = option.packageId; if (!this.$isEmpty(option.companyId)) { this.companyId = option.companyId; } if (!this.$isEmpty(option.companyUserId)) { this.companyUserId = option.companyUserId; } }, onShow() { this.$isLogin().then( (res) => { if (res) { let data = { companyUserId: this.companyUserId }; bindCompanyUser(data).then( (res2) => { if (res2.code == 200) ; }, (rej) => { } ); } } ); this.getPackageById(); this.getPackageDoctorList(); }, onShareAppMessage(res) { return { title: this.item.packageName, path: "/pages_index/packageDetails?packageId=" + this.packageId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId, imageUrl: this.item.imgUrl //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; }, methods: { showMore() { this.displayMore = this.displayMore == 1 ? 0 : 1; this.displayText = this.displayMore == 1 ? "收起" : "查看更多"; formatAppLog("log", "at pages_index/packageDetails.vue:249", this.displayText); }, swiperChange(event) { this.activeImg = event.detail.current + 1; }, handleDoctorClick(item) { this.doctorShow = false; this.doctorId = item.doctorId; this.doSubmit(); }, lower(event) { if (this.doctorTotal > this.doctors.length) { this.doctorPageNum++; this.getPackageDoctorList(); } }, doSubmit() { var that = this; this.$isLogin().then( (res) => { if (res) { that.submit(); } else { uni.navigateTo({ url: "/pages/auth/login" }); } } ); }, submit() { if (this.doctors.length > 0 && this.doctorId == null) { this.doctorShow = true; } else { uni.navigateTo({ url: "/pages_index/packageForm?packageId=" + this.packageId + "&doctorId=" + this.doctorId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId }); } }, createOrder() { uni.showLoading({ title: "处理中..." }); var data = { companyId: this.companyId, companyUserId: this.companyUserId, packageId: this.packageId, doctorId: this.doctorId }; create$1(data).then((res) => { uni.hideLoading(); if (res.code == 200) { uni.navigateTo({ url: "/pages_order/packageOrderPay?orderId=" + res.order.orderId }); } else { uni.showToast({ icon: "none", title: res.msg }); } }); }, doctorOpen() { this.doctorShow = true; }, doctorClose() { this.doctorShow = false; }, showImg() { uni.previewImage({ urls: this.imgs, current: this.imgs[0] }); }, getPackageDoctorList() { if (this.doctorLastPage) { return; } var data = { packageId: this.packageId, pageNum: this.doctorPageNum, pageSize: 10 }; var that = this; getPackageDoctorList(data).then( (res) => { if (res.code == 200) { if (this.doctorPageNum == 0) { that.doctors = res.data.list; } else { that.doctors = that.doctors.concat(res.data.list); } this.doctorLastPage = res.data.isLastPage; this.doctorTotal = res.data.total; formatAppLog("log", "at pages_index/packageDetails.vue:360", that.doctors); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, getPackageById() { let data = { packageId: this.packageId }; getPackageById(data).then( (res) => { if (res.code == 200) { this.item = res.data; this.storeName = res.storeName; if (res.data.images != null) { this.imgs = res.data.images.split(","); } else { this.activeImg = 0; } this.describe = JSON.parse(this.item.describeJson); if (this.item.productJson != null) { this.products = JSON.parse(this.item.productJson); } formatAppLog("log", "at pages_index/packageDetails.vue:397", this.imgs); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n \r\n '), vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode("view", { class: "goods-banner", onClick: _cache[1] || (_cache[1] = ($event) => $options.showImg()) }, [ vue.createElementVNode( "swiper", { class: "swiper", "indicator-dots": false, circular: true, autoplay: true, interval: 3e3, duration: 1e3, "indicator-color": "rgba(255, 255, 255, 0.6)", "indicator-active-color": "#ffffff", onChange: _cache[0] || (_cache[0] = (...args) => $options.swiperChange && $options.swiperChange(...args)) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.imgs, (item, index2) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { class: "swiper-item", key: index2 }, [ vue.createElementVNode("image", { src: item, mode: "aspectFit" }, null, 8, ["src"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ), vue.createCommentVNode(" 数量 "), vue.createElementVNode( "view", { class: "num-box" }, vue.toDisplayString($data.activeImg) + "/" + vue.toDisplayString($data.imgs.length), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "package-box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.packageName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "desc" }, [ $data.item.cycle > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "cycle" }, "用药周期" + vue.toDisplayString($data.item.cycle) + "天", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.item.duration > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "duration" }, "签约时长" + vue.toDisplayString($data.item.duration) + "天", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode("view", { class: "price-box" }, [ $data.item != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "price" }, "¥" + vue.toDisplayString($data.item.price.toFixed(2)) + "元/日", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.item != null && $data.item.packageSubType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "price" }, "咨询包")) : vue.createCommentVNode("v-if", true), $data.item != null && $data.item.packageSubType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "price" }, "治疗包")) : vue.createCommentVNode("v-if", true), $data.item != null && $data.item.packageSubType == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "price" }, "产品包")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString($data.item.sales) + "人已购", 1 /* TEXT */ ) ]) ]), $data.products.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "drug-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "产品列表") ]), vue.createElementVNode("view", { class: "drug-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.products, (product, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [ ($data.displayMore == 0 ? index2 < 2 : true) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "drug" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: product.image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "drug-info" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString(product.productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec" }, vue.toDisplayString(product.sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode( "view", { class: "use" }, vue.toDisplayString(product.usageMethod), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "price" }, [ vue.createCommentVNode(' ¥\r\n {{product.price.toFixed(2)}} ') ]), vue.createCommentVNode(' x{{product.count}} ') ]) ]) ])) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]), $data.products.length > 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "display-more", onClick: _cache[2] || (_cache[2] = ($event) => $options.showMore()) }, vue.toDisplayString($data.displayText), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "tip" }, [ vue.createElementVNode("image", { class: "img", src: "/static/images/dui.png" }), vue.createElementVNode( "view", { class: "text" }, "本疗法所包含药品由" + vue.toDisplayString($data.storeName) + "配送", 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true), $data.describe.use != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "功能") ]), $data.describe != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "desc", innerHTML: $data.describe.use }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), $data.item.indication != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "主治") ]), $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "desc", innerHTML: $data.item.indication }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), $data.describe.usageMethod != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "服用/使用方式") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.describe.usageMethod }, null, 8, ["innerHTML"]) ])) : vue.createCommentVNode("v-if", true), $data.describe.forPeople != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "适宜人群") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.describe.forPeople }, null, 8, ["innerHTML"]) ])) : vue.createCommentVNode("v-if", true), $data.describe.tabooPeople != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "禁忌人群") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.describe.tabooPeople }, null, 8, ["innerHTML"]) ])) : vue.createCommentVNode("v-if", true), $data.item.explain != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 6, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "方解/搭配优势") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.item.explain }, null, 8, ["innerHTML"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "套餐描述") ]), vue.createElementVNode("view", { class: "html", innerHTML: $data.item.desc }, null, 8, ["innerHTML"]) ]) ]), vue.createElementVNode("view", { class: "btn-foot" }, [ vue.createElementVNode("view", { class: "p-price-box" }, [ vue.createElementVNode("view", { class: "p-name" }, "¥"), $data.item != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "p-price" }, vue.toDisplayString($data.item.totalPrice.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn buy", onClick: _cache[3] || (_cache[3] = ($event) => $options.doSubmit()) }, "提交需求") ]) ]), vue.createVNode(_component_u_popup, { bgColor: "#f6f6f6", round: 10, mode: "bottom", show: $data.doctorShow, onOpen: _cache[5] || (_cache[5] = ($event) => $options.doctorOpen()), onClose: _cache[6] || (_cache[6] = ($event) => $options.doctorClose()) }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "doctors" }, [ vue.createElementVNode( "scroll-view", { class: "scroll-list", "scroll-y": "true", onScrolltolower: _cache[4] || (_cache[4] = (...args) => $options.lower && $options.lower(...args)) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.doctors, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "doctor", onClick: ($event) => _ctx.navTo("/pages_doctor/doctorDetails?doctorId=" + item.doctorId) }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { mode: "aspectFill", class: "doc-img", src: item.avatar }, null, 8, ["src"]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString(item.doctorName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-position" }, vue.toDisplayString(item.position), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "hospital" }, vue.toDisplayString(item.hospitalName) + " " + vue.toDisplayString(item.deptName), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "btn", onClick: ($event) => $options.handleDoctorClick(item) }, "选择", 8, ["onClick"]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ]) ]), _: 1 /* STABLE */ }, 8, ["show"]) ]); } const Pages_indexPackageDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/packageDetails.vue"]]); const _sfc_main$1H = { data() { return { content: null, show: false, scrollTop: 0, //滚动条位置 patient: null, items: [ { title: "您是否已在线下就诊,且对所购买的药品无过敏或不良反应?", options: [ { name: "是,我线下就诊过", value: 1, color: "green" }, { name: "无,从未就诊", value: 0, color: "red" } ] }, { title: "您是否已详细阅读药物说明,确认自己符合药物适用人群,并了解用药方法、用药禁忌等信息?", options: [ { name: "是,我已充分了解", value: 1, color: "green" }, { name: "否,未阅读", value: 0, color: "red" } ] } ], msgs: [], index: 0, item: null, notice: [ { title: "好的。我将根据您提交的复诊信息开具处方,请详细阅读药品说明书,遵医嘱用药。" }, { title: "您存在用药禁忌证,目前不推荐购买此套餐包。建议您尽早就医,在医生指导下采取针对性的治疗措施!在改善相关禁忌证后,也可以再次咨询,重新评估是否可以使用该套餐包。" } ], packageId: null, doctorId: null, isComplete: 0, companyUserId: null, companyId: null }; }, onLoad(option) { this.packageId = option.packageId; this.doctorId = option.doctorId; if (!this.$isEmpty(option.companyId)) { this.companyId = option.companyId; } if (!this.$isEmpty(option.companyUserId)) { this.companyUserId = option.companyUserId; } var that = this; uni.$on("refreshOrderPatient", (res) => { that.patient = res; }); this.item = this.items[0]; this.addMsg(1, this.item.title); }, onShow() { }, methods: { close() { this.show = false; }, confirm() { if (this.isComplete == 1) { this.submit(); } else { uni.navigateBack(); } }, addMsg(type2, content) { var msg = { type: type2, content }; this.msgs.push(msg); var that = this; uni.createSelectorQuery().select(".msgs").boundingClientRect((res) => { const scrollH = res.height; that.scrollTop = scrollH; formatAppLog("log", "at pages_index/packageForm.vue:150", that.scrollTop); }).exec(); }, optionClick(item, option) { if (this.patient == null) { uni.showToast({ icon: "none", title: "请选择就诊人" }); return; } if (option.value == 0) { this.content = this.notice[1].title; this.show = true; this.isComplete = 0; return; } item.option = option.name; formatAppLog("log", "at pages_index/packageForm.vue:172", item.option); this.addMsg(2, option.name); this.index++; if (this.index <= this.items.length - 1) { this.item = this.items[this.index]; this.addMsg(1, this.item.title); } else { this.content = this.notice[0].title; this.show = true; this.isComplete = 1; return; } }, addPatient() { uni.navigateTo({ url: "/pages_user/patient" }); }, submit() { uni.showLoading({ title: "处理中..." }); var data = { companyId: this.companyId, companyUserId: this.companyUserId, patientId: this.patient.patientId, patientJson: JSON.stringify(this.patient), packageId: this.packageId, doctorId: this.doctorId, formJson: JSON.stringify(this.items) }; create$1(data).then((res) => { uni.hideLoading(); if (res.code == 200) { var temps = ["jARl4BpoBkRu-2MxPMkQVhIfGMG0V9qW-X3V_7NtEOU"]; uni.requestSubscribeMessage({ tmplIds: temps, success(e) { setTimeout(function() { uni.navigateTo({ url: "/pages_order/packageOrderPay?orderId=" + res.order.orderId }); }, 200); }, fail(e) { setTimeout(function() { uni.navigateTo({ url: "/pages_order/packageOrderPay?orderId=" + res.order.orderId }); }, 200); } }); } else { uni.showToast({ icon: "none", title: res.msg }); } }); } } }; function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_0$9); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "patient-cont" }, [ vue.createElementVNode("view", { class: "chose-patient" }, [ $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "patient-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("view", { class: "patient-item" }, [ vue.createElementVNode("view", { class: "patient-tip" }, "*"), vue.createElementVNode("view", { class: "patient-title" }, "选择就诊人") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "patient", onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString($data.patient.patientName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info" }, [ $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "男")) : vue.createCommentVNode("v-if", true), $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "女")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "msg-cont" }, [ vue.createElementVNode("scroll-view", { class: "msg-scroll", "scroll-top": $data.scrollTop, "scroll-y": "true", "scroll-with-animation": true }, [ vue.createElementVNode("view", { class: "msgs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.msgs, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "msg-item" }, [ item.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "left" }, [ vue.createElementVNode("image", { class: "img", src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/be32b8d2ae9f497297d10327656bb43c.png" }), vue.createElementVNode( "view", { class: "msg-content" }, vue.toDisplayString(item.content), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), item.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "right" }, [ vue.createElementVNode( "view", { class: "msg-content" }, vue.toDisplayString(item.content), 1 /* TEXT */ ), vue.createElementVNode("image", { class: "img", src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d7eb0607a074892964dd32e8735e540.jpg" }) ])) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ], 8, ["scroll-top"]) ]), $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "option-cont" }, [ vue.createElementVNode( "view", { class: "option-title" }, vue.toDisplayString($data.item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "options" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.item.options, (option, opIndex) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(option.color == "red" ? "option-item red" : "option-item green"), onClick: ($event) => $options.optionClick($data.item, option) }, vue.toDisplayString(option.name), 11, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_modal, { onCancel: _cache[2] || (_cache[2] = ($event) => $options.close()), onConfirm: _cache[3] || (_cache[3] = ($event) => $options.confirm()), show: $data.show, title: "温馨提示", content: $data.content }, null, 8, ["show", "content"]) ]); } const Pages_indexPackageForm = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/packageForm.vue"]]); const _sfc_main$1G = { components: { Menu }, mixins: [MescrollMixin], data() { return { top: null, cates: [], cateId: 0, keyword: "", mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad() { }, onShow() { this.getDoctorArticleCateList(); }, methods: { menuClick(item) { this.cateId = item.cateId; this.mescroll.resetUpScroll(); }, getDoctorArticleCateList() { var that = this; let data = {}; getDoctorArticleCateList(data).then( (res) => { if (res.code == 200) { this.cates = res.data; var query = uni.createSelectorQuery().in(that); setTimeout(function() { query.select(".top-content").boundingClientRect((data2) => { if (data2) { formatAppLog("log", "at pages_doctor/doctorArticleList.vue:114", "View height:", data2.height + "px"); that.top = data2.height + "px"; } }).exec(); }, 500); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, doSearch() { this.mescroll.resetUpScroll(); }, getArticleCateList() { let data = {}; getArticleCateList(data).then( (res) => { if (res.code == 200) { this.cates = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { keyword: this.keyword, cateId: this.cateId, pageNum: page2.num, pageSize: page2.size }; getDoctorArticleList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, // 关键词选择 choseCate(item) { this.cateId = item.cateId; this.mescroll.resetUpScroll(); }, // 查看详情 showDetail(item) { uni.navigateTo({ url: "./doctorArticleDetails?articleId=" + item.articleId }); } } }; function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) { const _component_Menu = vue.resolveComponent("Menu"); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-content" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入关键字搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "cate-list" }, [ $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, { key: 0, list: $data.cates, onMenuClick: $options.menuClick, style: { "width": "100%" } }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 关键字列表 "), vue.createCommentVNode(' '), vue.createCommentVNode(` \r \r \r {{item.cateName}} \r \r `), vue.createCommentVNode(" ") ]) ]), $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, { key: 0, top: $data.top, ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "article-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: index2, onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info-box" }, [ vue.createElementVNode("view", { class: "readers" }, [ vue.createElementVNode("view", { class: "head-box" }, [ vue.createElementVNode("view", { class: "head" }, [ vue.createElementVNode("image", { class: "eye", mode: "aspectFill", src: item.avatar }, null, 8, ["src"]) ]) ]), vue.createElementVNode("view", { class: "readings" }, [ vue.createElementVNode("image", { class: "eye", src: "/static/images/eye.png" }), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(item.views), 1 /* TEXT */ ) ]) ]), vue.createElementVNode( "view", { class: "time-box" }, vue.toDisplayString(item.createTime), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: item.imageUrl, mode: "aspectFill" }, null, 8, ["src"]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["top", "onInit", "onDown", "onUp", "down", "up"])) : vue.createCommentVNode("v-if", true) ]); } const Pages_doctorDoctorArticleList = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorArticleList.vue"]]); const _sfc_main$1F = { data() { return { advs: [], advImgs: [], src: "", articleId: null, item: {} }; }, onLoad(option) { this.articleId = option.articleId; }, onShow() { this.getAdvList(); this.getDoctorArticleById(); }, //发送给朋友 onShareAppMessage(res) { return { title: this.item.title, path: "/pages_doctor/doctorArticleDetails?articleId=" + this.articleId }; }, //分享到朋友圈 onShareTimeline(res) { return { title: this.item.title, query: "articleId=" + this.articleId //页面参数 }; }, methods: { handleAdvClick(index2) { var ad = this.advs[index2]; formatAppLog("log", "at pages_doctor/doctorArticleDetails.vue:79", ad.advUrl); if (ad.showType == 1) { uni.setStorageSync("url", ad.advUrl); uni.navigateTo({ url: "h5" }); } else if (ad.showType == 2) { uni.navigateTo({ url: ad.advUrl }); } else if (ad.showType == 3) { uni.setStorageSync("content", ad.content); uni.navigateTo({ url: "content" }); } }, getAdvList() { var that = this; var data = { advType: 10 }; getAdvList(data).then((res) => { if (res.code == 200) { that.advImgs = []; that.advs = []; res.data.forEach(function(element) { if (element.imageUrl != null && element.imageUrl != "") { that.advs.push(element); that.advImgs.push(element.imageUrl); } }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, videoErrorCallback: function(e) { uni.showModal({ content: e.target.errMsg, showCancel: false }); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, getDoctorArticleById() { let data = { articleId: this.articleId }; getDoctorArticleById(data).then( (res) => { if (res.code == 200) { this.item = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "detail-cont" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode( "view", { class: "reads" }, "阅读数:" + vue.toDisplayString($data.item.views), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString($data.item.createTime), 1 /* TEXT */ ) ]), $data.item.videoUrl != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "video" }, [ vue.createElementVNode("video", { class: "myVideo", id: "myVideo", src: $data.item.videoUrl, onError: _cache[0] || (_cache[0] = (...args) => $options.videoErrorCallback && $options.videoErrorCallback(...args)), controls: "" }, null, 40, ["src"]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 正文 "), vue.createElementVNode("view", { class: "full-text" }, [ vue.createElementVNode("view", { innerHTML: $data.item.content }, null, 8, ["innerHTML"]) ]) ]), vue.createCommentVNode(" 咨询按钮 "), vue.createElementVNode("view", { class: "inquiry" }, [ vue.createElementVNode("view", { class: "content", onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + $data.item.doctorId)) }, [ vue.createElementVNode("image", { mode: "aspectFill", src: $data.item.avatar }, null, 8, ["src"]), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.item.doctorName), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "ad" }, [ vue.createVNode(_component_u_swiper, { list: $data.advImgs, indicator: "", indicatorMode: "line", circular: "", onClick: $options.handleAdvClick }, null, 8, ["list", "onClick"]) ]) ]); } const Pages_doctorDoctorArticleDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorArticleDetails.vue"]]); const _sfc_main$1E = { mixins: [MescrollMixin], // 使用mixin data() { return { keyword: "", hosLevelOptions: [], tabIndex: 0, tabs: [ { name: "全部", deptId: 0 } ], deptId: 0, mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad(options) { if (options.deptId != null) { this.deptId = options.deptId; } if (options.keyword != null) { this.keyword = options.keyword; } formatAppLog("log", "at pages_doctor/doctorList.vue:124", this.deptId); this.getDictByKey("sys_hospital_level"); this.getDepartmentList(); }, onShow() { }, methods: { doSearch() { this.mescroll.resetUpScroll(); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_hospital_level") { this.hosLevelOptions = res.data; } } }, (err) => { } ); }, getDepartmentList(page2) { var that = this; var data = {}; getDepartmentList(data).then((res) => { if (res.code == 200) { res.data.forEach(function(value2, index2, array3) { var data2 = { name: value2.deptName, deptId: value2.deptId }; that.tabs.push(data2); if (value2.deptId == that.deptId) { that.tabIndex = index2 + 1; formatAppLog("log", "at pages_doctor/doctorList.vue:160", that.tabIndex); } }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, deptChange(item) { this.deptId = item.deptId; this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { keyword: this.keyword, deptId: this.deptId, pageNum: page2.num, pageSize: page2.size }; getDoctorList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { res.data.list.forEach(function(value2, index2, array3) { value2.prices = JSON.parse(value2.priceJson); }); that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入医生姓名搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { current: $data.tabIndex, scrollable: true, list: $data.tabs, lineColor: "#C39A58", onChange: $options.deptChange }, null, 8, ["current", "list", "onChange"]) ]), vue.createVNode(_component_mescroll_body, { top: "176rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: $data.downOption, up: $data.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ $data.dataList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "doctors" }, [ vue.createElementVNode("view", { class: "doctor-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "doctor", onClick: ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + item.doctorId) }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "head-box" }, [ vue.createElementVNode("image", { mode: "aspectFill", class: "doc-img", src: item.avatar }, null, 8, ["src"]), item.workStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "isline" }, [ vue.createElementVNode("view", { class: "img" }, [ vue.createElementVNode("image", { src: "/static/images/isline.png" }), vue.createElementVNode("view", { class: "name" }, "在线") ]) ])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString(item.doctorName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-position" }, vue.toDisplayString(item.position), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-dept" }, vue.toDisplayString(item.deptName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "hospital-box" }, [ item.hospitalLevel != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "tag" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.$getDictLabelName($data.hosLevelOptions, item.hospitalLevel)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(item.hospitalName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-spec" }, [ vue.createElementVNode( "view", { class: "spec ellipsis2" }, vue.toDisplayString(item.speciality), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-count" }, [ vue.createElementVNode("view", { class: "name" }, "好评:"), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item.pingStar) + "分", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "name" }, "接诊量:"), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item.orderNumber), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "name" }, "平均响应:"), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item.speed) + "分钟", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-price" }, [ vue.createElementVNode("view", { class: "btn" }, [ vue.createTextVNode(" 咨询医生¥ "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.prices, (price, index3) => { return vue.openBlock(), vue.createElementBlock("text", null, [ vue.createTextVNode( vue.toDisplayString(price.price.toFixed(2)) + " ", 1 /* TEXT */ ), index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["onInit", "down", "up", "onDown", "onUp"]) ]); } const Pages_doctorDoctorList = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-5e54308c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorList.vue"]]); const props$k = { props: { // 用于v-model双向绑定选中的星星数量 modelValue: { type: [String, Number], default: props$y.rate.value }, // 要显示的星星数量 count: { type: [String, Number], default: props$y.rate.count }, // 是否不可选中 disabled: { type: Boolean, default: props$y.rate.disabled }, // 是否只读 readonly: { type: Boolean, default: props$y.rate.readonly }, // 星星的大小,单位px size: { type: [String, Number], default: props$y.rate.size }, // 未选中时的颜色 inactiveColor: { type: String, default: props$y.rate.inactiveColor }, // 选中的颜色 activeColor: { type: String, default: props$y.rate.activeColor }, // 星星之间的间距,单位px gutter: { type: [String, Number], default: props$y.rate.gutter }, // 最少能选择的星星个数 minCount: { type: [String, Number], default: props$y.rate.minCount }, // 是否允许半星 allowHalf: { type: Boolean, default: props$y.rate.allowHalf }, // 选中时的图标(星星) activeIcon: { type: String, default: props$y.rate.activeIcon }, // 未选中时的图标(星星) inactiveIcon: { type: String, default: props$y.rate.inactiveIcon }, // 是否可以通过滑动手势选择评分 touchable: { type: Boolean, default: props$y.rate.touchable } } }; const _sfc_main$1D = { name: "u-rate", mixins: [mpMixin, mixin, props$k], data() { return { // 生成一个唯一id,否则一个页面多个评分组件,会造成冲突 elId: uni.$u.guid(), elClass: uni.$u.guid(), rateBoxLeft: 0, // 评分盒子左边到屏幕左边的距离,用于滑动选择时计算距离 activeIndex: this.modelValue, rateWidth: 0, // 每个星星的宽度 // 标识是否正在滑动,由于iOS事件上touch比click先触发,导致快速滑动结束后,接着触发click,导致事件混乱而出错 moving: false }; }, watch: { modelValue(val) { this.activeIndex = val; }, activeIndex: "emitEvent" }, emits: ["update:modelValue", "change"], methods: { init() { uni.$u.sleep().then(() => { this.getRateItemRect(); this.getRateIconWrapRect(); }); }, // 获取评分组件盒子的布局信息 async getRateItemRect() { await uni.$u.sleep(); this.$uGetRect("#" + this.elId).then((res) => { this.rateBoxLeft = res.left; }); }, // 获取单个星星的尺寸 getRateIconWrapRect() { this.$uGetRect("." + this.elClass).then((res) => { this.rateWidth = res.width; }); }, // 手指滑动 touchMove(e) { if (!this.touchable) { return; } this.preventEvent(e); const x = e.changedTouches[0].pageX; this.getActiveIndex(x); }, // 停止滑动 touchEnd(e) { if (!this.touchable) { return; } this.preventEvent(e); const x = e.changedTouches[0].pageX; this.getActiveIndex(x); }, // 通过点击,直接选中 clickHandler(e, index2) { if (uni.$u.os() === "ios" && this.moving) { return; } this.preventEvent(e); let x = 0; x = e.changedTouches[0].pageX; this.getActiveIndex(x, true); }, // 发出事件 emitEvent() { this.$emit("change", this.activeIndex); this.$emit("update:modelValue", this.activeIndex); }, // 获取当前激活的评分图标 getActiveIndex(x, isClick = false) { if (this.disabled || this.readonly) { return; } const allRateWidth = this.rateWidth * this.count + this.rateBoxLeft; x = uni.$u.range(this.rateBoxLeft, allRateWidth, x) - this.rateBoxLeft; const distance = x; let index2; if (this.allowHalf) { index2 = Math.floor(distance / this.rateWidth); const decimal = distance % this.rateWidth; if (decimal <= this.rateWidth / 2 && decimal > 0) { index2 += 0.5; } else if (decimal > this.rateWidth / 2) { index2++; } } else { index2 = Math.floor(distance / this.rateWidth); const decimal = distance % this.rateWidth; if (isClick) { if (decimal > 0) index2++; } else { if (decimal > this.rateWidth / 2) index2++; } } this.activeIndex = Math.min(index2, this.count); if (this.activeIndex < this.minCount) { this.activeIndex = this.minCount; } setTimeout(() => { this.moving = true; }, 10); setTimeout(() => { this.moving = false; }, 10); } }, mounted() { this.init(); } }; function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); return vue.openBlock(), vue.createElementBlock("view", { class: "u-rate", id: $data.elId, ref: "u-rate", style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]) }, [ vue.createElementVNode( "view", { class: "u-rate__content", onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.touchMove && $options.touchMove(...args), ["stop"])), onTouchend: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.touchEnd && $options.touchEnd(...args), ["stop"])) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(Number(_ctx.count), (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-rate__content__item", [$data.elClass]]), key: index2 }, [ vue.createElementVNode("view", { class: "u-rate__content__item__icon-wrap", ref_for: true, ref: "u-rate__content__item__icon-wrap", onClick: vue.withModifiers(($event) => $options.clickHandler($event, index2 + 1), ["stop"]) }, [ vue.createVNode(_component_u_icon, { name: Math.floor($data.activeIndex) > index2 ? _ctx.activeIcon : _ctx.inactiveIcon, color: _ctx.disabled ? "#c8c9cc" : Math.floor($data.activeIndex) > index2 ? _ctx.activeColor : _ctx.inactiveColor, "custom-style": { padding: `0 ${_ctx.$u.addUnit(_ctx.gutter / 2)}` }, size: _ctx.size }, null, 8, ["name", "color", "custom-style", "size"]) ], 8, ["onClick"]), _ctx.allowHalf ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, onClick: vue.withModifiers(($event) => $options.clickHandler($event, index2 + 1), ["stop"]), class: "u-rate__content__item__icon-wrap u-rate__content__item__icon-wrap--half", style: vue.normalizeStyle([{ width: _ctx.$u.addUnit($data.rateWidth / 2) }]), ref_for: true, ref: "u-rate__content__item__icon-wrap" }, [ vue.createVNode(_component_u_icon, { name: Math.ceil($data.activeIndex) > index2 ? _ctx.activeIcon : _ctx.inactiveIcon, color: _ctx.disabled ? "#c8c9cc" : Math.ceil($data.activeIndex) > index2 ? _ctx.activeColor : _ctx.inactiveColor, "custom-style": { padding: `0 ${_ctx.$u.addUnit(_ctx.gutter / 2)}` }, size: _ctx.size }, null, 8, ["name", "color", "custom-style", "size"]) ], 12, ["onClick"])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ], 12, ["id"]); } const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-69a384ee"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-rate/u-rate.vue"]]); const _sfc_main$1C = { data() { return { statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, isFollow: false, doctorId: null, doctor: null, department: null, hospital: null, pings: [] }; }, onLoad(options) { if (options.doctorId != null) { this.doctorId = options.doctorId; } else if (options.hasOwnProperty("q") && options.q) { const url2 = decodeURIComponent(options.q); const obj = this.$urlToObj(url2); uni.setStorageSync("doctorId", obj.doctorId); this.doctorId = obj.doctorId; } }, onShow() { this.getDoctorDetails(); this.getDoctorPingList(); var that = this; this.$isLogin().then( (res) => { if (res) { that.checkFollow(); } }, (rej) => { } ); }, //发送给朋友 onShareAppMessage(res) { return { title: this.doctor.doctorName, path: "/pages_doctor/doctorDetails?doctorId=" + this.doctorId, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; }, //分享到朋友圈 onShareTimeline(res) { return { title: this.doctor.doctorName, query: "doctorId=" + this.doctorId, //页面参数 imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; }, methods: { goback() { uni.navigateBack(); }, gohome() { uni.switchTab({ url: "/pages/index/index" }); }, doInquiry(price) { if (this.doctor.workStatus == 0) { uni.showToast({ icon: "none", title: "医生休息中" }); return; } var that = this; this.$isLogin().then( (res) => { if (res) { uni.navigateTo({ url: "/pages_order/inquiryForm1?inquiryType=1&orderType=" + price.type + "&doctorId=" + that.doctorId }); } else { uni.navigateTo({ url: "/pages/auth/login" }); } }, (rej) => { } ); }, followChange() { this.$isLogin().then( (res) => { if (res) { this.doFollow(); } else { uni.navigateTo({ url: "/pages/auth/login" }); } }, (rej) => { } ); }, checkFollow() { var data = { doctorId: this.doctorId }; checkFollow(data).then( (res) => { if (res.code == 200) { if (res.isFollow == 1) { this.isFollow = true; } else { this.isFollow = false; } } else { this.isFollow = false; } }, (rej) => { } ); }, doFollow() { var data = { doctorId: this.doctorId }; doFollow$1(data).then( (res) => { this.isFollow = !this.isFollow; if (res.code = 200) { uni.showToast({ title: res.msg }); } }, (rej) => { } ); }, getDoctorDetails() { var data = { doctorId: this.doctorId }; getDoctorDetails(data).then((res) => { if (res.code == 200) { this.doctor = res.data.doctor; this.doctor.prices = JSON.parse(this.doctor.priceJson); this.department = res.data.department; this.hospital = res.data.hospital; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, getDoctorPingList() { var data = { doctorId: this.doctorId, pageNum: 1, pageSize: 10 }; getDoctorPingList(data).then((res) => { if (res.code == 200) { this.pings = res.data.list; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, navTo(url2) { uni.navigateTo({ url: url2 }); } } }; function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "bg" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/dd7da40764af4db0ac326db271c7f1d3.png" }) ]), vue.createElementVNode("view", { class: "top-box" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btns", onClick: _cache[1] || (_cache[1] = ($event) => $options.goback()) }, [ vue.createElementVNode("view", { class: "btn" }, [ vue.createElementVNode("image", { src: "/static/images/back_white.png" }) ]), vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.gohome()) }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5981c2cd5f23484181f5b328c820d0de.png" }) ]) ]) ]) ]), vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "docs", style: { "margin-top": "88rpx" } }, [ vue.createElementVNode("view", { class: "tip", onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_doctor/doctorImgs?doctorId=" + $data.doctor.doctorId)) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "title" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/a58ee2a3fb674c2e8339243cb4ca1378.png" }), vue.createElementVNode("view", null, "实名认证") ]), vue.createElementVNode("view", { class: "cert" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/62aeeb0579974b67863a6ab56e9562f9.png" }), vue.createElementVNode( "view", null, "资格证编号:" + vue.toDisplayString($data.doctor.certificateCode != null ? $data.doctor.certificateCode.substr(0, 4) + "****" + $data.doctor.certificateCode.substr($data.doctor.certificateCode.length - 4, $data.doctor.certificateCode.length) : ""), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d519ad0467e4daea843aac745ae6b40.png" }) ]) ]), vue.createElementVNode("view", { class: "doc-cont" }, [ vue.createElementVNode("view", { class: "doc-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: $data.doctor.avatar, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-name-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString($data.doctor.doctorName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "doc-btns" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[3] || (_cache[3] = ($event) => $options.followChange()) }, [ $data.isFollow ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: "/static/images/icon_strar.png" })) : vue.createCommentVNode("v-if", true), !$data.isFollow ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d509e50536804703a4b7dc066b16beee.png" })) : vue.createCommentVNode("v-if", true), vue.createTextVNode(" 关注 ") ]), vue.createElementVNode("view", { class: "btn" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f79c3b9cbefa40be8c2beb74f616eefc.png" }), vue.createTextVNode(" 分享 "), vue.createElementVNode("button", { class: "contact-btn", "data-name": "shareBtn", "open-type": "share" }, "分享") ]) ]) ]), vue.createElementVNode("view", { class: "doc-dept-box" }, [ vue.createTextVNode( vue.toDisplayString($data.doctor.position) + " ", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "line" }), vue.createTextVNode( " " + vue.toDisplayString($data.department.deptName), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "doc-his-box" }, vue.toDisplayString($data.hospital.hospitalName), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "doc-desc-box" }, [ vue.createElementVNode("view", { class: "doc-desc-cont", onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("/pages_doctor/doctorInfo?doctorId=" + $data.doctor.doctorId)) }, [ vue.createElementVNode( "view", { class: "desc-cont ellipsis2" }, "          " + vue.toDisplayString($data.doctor.speciality), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "title" }, "擅长:"), vue.createElementVNode("view", { class: "btn" }, "详情") ]), vue.createElementVNode("view", { class: "doc-desc-cont", onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_doctor/doctorInfo?doctorId=" + $data.doctor.doctorId)) }, [ vue.createElementVNode( "view", { class: "desc-cont ellipsis2" }, "          " + vue.toDisplayString($data.doctor.introduction), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "title" }, "介绍:"), vue.createElementVNode("view", { class: "btn" }, "详情") ]) ]) ]) ]), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("view", { class: "count-box" }, [ vue.createElementVNode("view", { class: "count-item" }, [ vue.createElementVNode( "view", { class: "count yellow" }, vue.toDisplayString($data.doctor.pingStar) + "分", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "name" }, "好评") ]), vue.createElementVNode("view", { class: "count-item" }, [ vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString($data.doctor.orderNumber), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "name" }, "接诊量") ]), vue.createElementVNode("view", { class: "count-item" }, [ vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString($data.doctor.speed) + "分钟", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "name" }, "平均响应") ]), vue.createElementVNode("view", { class: "count-item" }, [ vue.createElementVNode("view", { class: "count" }, "0"), vue.createElementVNode("view", { class: "name" }, "粉丝数") ]) ]), $data.doctor != null && $data.doctor.prices != null && $data.doctor.prices.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "price-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.doctor.prices, (price, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "price-item", onClick: ($event) => $options.doInquiry(price) }, [ vue.createElementVNode("view", { class: "p-left" }, [ price.type == 1 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/645f3f298a264882b48e529342fc4074.png" })) : vue.createCommentVNode("v-if", true), price.type == 2 ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/45e904a9e74f4d1da771936a4b83f015.png" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "price-name" }, [ vue.createElementVNode("view", { class: "price" }, [ price.type == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "title" }, "图文问诊")) : vue.createCommentVNode("v-if", true), price.type == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "title" }, "视频问诊")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "money" }, vue.toDisplayString(price.price.toFixed(2)) + "/次", 1 /* TEXT */ ) ]), price.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "price-desc" }, " 与医生图文交流 ")) : vue.createCommentVNode("v-if", true), price.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "price-desc" }, " 与医生视频交流 ")) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "p-right" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass($data.doctor.workStatus == 1 ? "btn" : "btn gray") }, " 去咨询 ", 2 /* CLASS */ ) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]), vue.createCommentVNode(` \r \r 执业医院\r \r \r \r \r {{hospital.hospitalName}}\r \r \r {{hospital.hospitalType}}\r \r \r \r \r \r \r `), vue.createCommentVNode(' \r\n \r\n 医生介绍\r\n \r\n \r\n {{doctor.introduction}}\r\n \r\n '), vue.createElementVNode("view", { class: "ping-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "title" }, "患者评价(" + vue.toDisplayString($data.pings.length) + ")", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "more", onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("./doctorPingList?doctorId=" + $data.doctorId)) }, [ vue.createElementVNode("view", null, "更多"), vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" }) ]) ]), $data.pings.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "ping-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.pings, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ping-item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: item.avatar == null ? "/static/images/detault_head.jpg" : item.avatar }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "user-name-box" }, [ vue.createElementVNode( "view", { class: "user-name" }, vue.toDisplayString(item.nickName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "ping-star" }, [ vue.createVNode(_component_u_rate, { activeColor: "#ffc603", count: "5", readonly: "", modelValue: item.pingStar, "onUpdate:modelValue": ($event) => item.pingStar = $event }, null, 8, ["modelValue", "onUpdate:modelValue"]) ]) ]), vue.createElementVNode( "view", { class: "ping-cont" }, vue.toDisplayString(item.pingContent), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "ping-time" }, vue.toDisplayString(item.pingTime), 1 /* TEXT */ ) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]) ]) ]); } const Pages_doctorDoctorDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-e79e20d9"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorDetails.vue"]]); const _sfc_main$1B = { mixins: [MescrollMixin], // 使用mixin data() { return { total: 0, doctorId: null, mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad(options) { this.doctorId = options.doctorId; }, methods: { mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { doctorId: this.doctorId, pageNum: page2.num, pageSize: page2.size }; getDoctorPingList(data).then((res) => { if (res.code == 200) { this.total = res.data.total; if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "ping-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "title" }, "患者评价(" + vue.toDisplayString($data.total) + ")", 1 /* TEXT */ ) ]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: $data.downOption, up: $data.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "ping-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "ping-item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: item.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/dfdd555016854b0d9fb623937238729f.jpg" : item.avatar }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "user-name-box" }, [ vue.createElementVNode( "view", { class: "user-name" }, vue.toDisplayString(item.nickName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "ping-star" }, [ vue.createVNode(_component_u_rate, { activeColor: "#ffc603", count: "5", readonly: "", modelValue: item.pingStar, "onUpdate:modelValue": ($event) => item.pingStar = $event }, null, 8, ["modelValue", "onUpdate:modelValue"]) ]) ]), vue.createElementVNode( "view", { class: "ping-cont" }, vue.toDisplayString(item.pingContent), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "ping-time" }, vue.toDisplayString(item.pingTime), 1 /* TEXT */ ) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "down", "up", "onDown", "onUp"]) ]) ]) ]); } const Pages_doctorDoctorPingList = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-9dbb509a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorPingList.vue"]]); const _sfc_main$1A = { data() { return { isFollow: false, doctorId: null, doctor: null, department: null, hospital: null, pings: [] }; }, onLoad(options) { this.doctorId = options.doctorId; }, onShow() { this.getDoctorDetails(); }, methods: { showImg() { var data = []; data.push(this.doctor.avatar); uni.previewImage({ current: 0, urls: data }); }, getDoctorDetails() { var data = { doctorId: this.doctorId }; getDoctorDetails(data).then((res) => { if (res.code == 200) { this.doctor = res.data.doctor; this.department = res.data.department; this.hospital = res.data.hospital; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); } } }; function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "bg" }), vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "doc-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { onClick: _cache[0] || (_cache[0] = ($event) => $options.showImg()), src: $data.doctor.avatar, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-name-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString($data.doctor.doctorName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "doc-ping" }, [ vue.createVNode(_component_u_rate, { activeColor: "#ffc603", count: "5", readonly: "", modelValue: $data.doctor.pingStar, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.doctor.pingStar = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode( "view", { class: "doc-dept-box" }, vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-his-box" }, vue.toDisplayString($data.hospital.hospitalName), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "擅长方向") ]), vue.createElementVNode( "view", { class: "desc" }, vue.toDisplayString($data.doctor.speciality), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "医生介绍") ]), vue.createElementVNode( "view", { class: "desc" }, vue.toDisplayString($data.doctor.introduction), 1 /* TEXT */ ) ]) ]) ]); } const Pages_doctorDoctorInfo = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-012aad91"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorInfo.vue"]]); const _sfc_main$1z = { data() { return { imgs: [] }; }, onLoad(options) { this.doctorId = options.doctorId; }, onShow() { this.getDoctorDetails(); }, methods: { showImg(index2) { uni.previewImage({ current: index2, urls: this.imgs }); }, getDoctorDetails() { var data = { doctorId: this.doctorId }; this.imgs = []; getDoctorDetails(data).then((res) => { if (res.code == 200) { this.doctor = res.data.doctor; if (this.doctor.certificateImages != null) { this.imgs.concat(this.doctor.certificateImages); } if (this.doctor.practiseImages != null) { this.imgs.concat(this.doctor.practiseImages); } formatAppLog("log", "at pages_doctor/doctorImgs.vue:49", this.imgs); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); } } }; function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "imgs" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.imgs, (img, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "img" }, [ vue.createElementVNode("image", { onClick: ($event) => $options.showImg(index2), src: img }, null, 8, ["onClick", "src"]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]); } const Pages_doctorDoctorImgs = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-3b09300f"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorImgs.vue"]]); let request$8 = new Request$1().http; function confirm(data) { return request$8("/app/inquiryOrder/confirm", data, "POST", "application/json;charset=UTF-8"); } function create(data) { return request$8("/app/inquiryOrder/create", data, "POST", "application/json;charset=UTF-8"); } function pay$1(data) { return request$8("/app/inquiryOrder/pay", data, "POST", "application/json;charset=UTF-8"); } function compute$1(data) { return request$8("/app/inquiryOrder/compute", data, "POST", "application/json;charset=UTF-8"); } function payment$1(data) { return request$8("/app/inquiryOrder/payment", data, "POST", "application/json;charset=UTF-8"); } function cancel(data) { return request$8("/app/inquiryOrder/cancel", data, "POST", "application/json;charset=UTF-8"); } function getMyInquiryOrderList(data) { return request$8("/app/inquiryOrder/getMyInquiryOrderList", data, "GET"); } function getMyInquiryOrderById(data) { return request$8("/app/inquiryOrder/getMyInquiryOrderById", data, "GET"); } function getMyInquiryOrderPingList(data) { return request$8("/app/inquiryOrder/getMyInquiryOrderPingList", data, "GET"); } function getInquiryOrderById(data) { return request$8("/app/inquiryOrder/getInquiryOrderById", data, "GET"); } function getCompanyUserInquiryOrderById(data) { return request$8("/app/inquiryOrder/getCompanyUserInquiryOrderById", data, "GET"); } function pingOrder(data) { return request$8("/app/inquiryOrder/pingOrder", data, "POST", "application/json;charset=UTF-8"); } function getInquiryTemp(data) { return request$8("/app/inquiryOrder/getInquiryTemp", data, "GET"); } function getInquiryOrderReport(data) { return request$8("/app/inquiryOrder/getInquiryOrderReport", data, "GET"); } function getCompanyUserInquiryOrderList(data) { return request$8("/app/inquiryOrder/getCompanyUserInquiryOrderList", data, "GET"); } const _sfc_main$1y = { mixins: [MescrollMixin], // 使用mixin data() { return { orderStatusOptions: [], orderTypeOptions: [], inquiryTypeOptions: [], tabs: [ { id: 2, name: "快速问诊" }, { id: 1, name: "专家问诊" }, { id: 3, name: "开药问诊" } ], inquiryType: 2, mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad() { this.getDictByKey("sys_inquiry_order_type"); this.getDictByKey("sys_inquiry_type"); this.getDictByKey("sys_inquiry_status"); var that = this; uni.$on("refreshInquiryOrder", () => { that.mescroll.resetUpScroll(); }); }, onShow() { }, methods: { cancel(item) { uni.showModal({ title: "提示", content: "确认取消订单吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { var data = { orderId: item.orderId }; cancel(data).then( (res2) => { if (res2.code == 200) { this.mescroll.resetUpScroll(); uni.showToast({ icon: "success", title: "操作成功" }); } else { uni.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { } ); } } }); }, ping(item) { uni.navigateTo({ url: "/pages_order/pingOrder?orderId=" + item.orderId }); }, pay(item) { uni.navigateTo({ url: "/pages_order/inquiryPay?orderId=" + item.orderId }); }, toIM(item) { var id = "C2CD-" + item.doctorId; store.commit("timStore/setType", "startInquiry"); store.commit("timStore/setOrderType", item.orderType); store.commit("timStore/setImType", 1); store.commit("timStore/setFollowId", 0); store.commit("timStore/setOrderId", item.orderId); store.commit("timStore/setConversationID", id); uni.$TUIKit.TUIConversationServer.setMessageRead(id); uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => { var _a; const { conversation } = res.data; store.commit("timStore/setConversation", conversation); let url2 = "/pages/TUIKit/TUIPages/TUIChat/index"; conversation.userProfile; url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}&orderId=` + item.orderId; uni.redirectTo({ url: url2 }); }).catch((err) => { formatAppLog("warn", "at pages_order/inquiryOrderList.vue:215", "获取 group profile 异常 = ", err); }); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_inquiry_order_type") { this.orderTypeOptions = res.data; } if (key == "sys_inquiry_type") { this.inquiryTypeOptions = res.data; } if (key == "sys_inquiry_status") { this.orderStatusOptions = res.data; } } }, (err) => { } ); }, inquiryTypeChange(item) { this.inquiryType = item.id; formatAppLog("log", "at pages_order/inquiryOrderList.vue:241", item); this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { inquiryType: this.inquiryType, pageNum: page2.num, pageSize: page2.size }; getMyInquiryOrderList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.inquiryTypeChange }, null, 8, ["list", "onChange"]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: $data.downOption, up: $data.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "order-item", onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId) }, [ vue.createElementVNode("view", { class: "order-top" }, [ item.doctorId != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "left" }, [ vue.createElementVNode("image", { class: "head", mode: "aspectFill", src: item.avatar }, null, 8, ["src"]), vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(item.doctorName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "dept" }, vue.toDisplayString(item.deptName), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), item.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "left" }, [ item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "title" }, " 支付后为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "title" }, " 正在为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true), item.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "title" }, " 订单已取消 ")) : vue.createCommentVNode("v-if", true), item.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "title" }, " 订单已退款 ")) : vue.createCommentVNode("v-if", true), item.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "title" }, " 医生已拒单 ")) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "status red" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "status red" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4, class: "status green" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 5, class: "status green" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status < 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 6, class: "status gray" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "order-cont" }, [ vue.createElementVNode("view", { class: "order-type" }, [ vue.createTextVNode(" 订单类型: "), vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, item.inquiryType)), 1 /* TEXT */ ), vue.createElementVNode( "text", null, "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, item.orderType)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "order-desc" }, "病情描述:" + vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "order-time-box" }, [ vue.createElementVNode( "view", { class: "order-time" }, vue.toDisplayString(item.createTime), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "right" }, [ item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn", onClick: vue.withModifiers(($event) => $options.pay(item), ["stop"]) }, "去支付", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn", onClick: vue.withModifiers(($event) => $options.cancel(item), ["stop"]) }, "取消订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.status == 4 && item.isPing == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "btn", onClick: vue.withModifiers(($event) => $options.ping(item), ["stop"]) }, "去评价", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "btn", onClick: vue.withModifiers(($event) => $options.toIM(item), ["stop"]) }, "去咨询", 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ]) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "down", "up", "onDown", "onUp"]) ]); } const Pages_orderInquiryOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-e21794e7"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderList.vue"]]); const props$j = { props: { // 文字颜色 color: { type: String, default: props$y.link.color }, // 字体大小,单位px fontSize: { type: [String, Number], default: props$y.link.fontSize }, // 是否显示下划线 underLine: { type: Boolean, default: props$y.link.underLine }, // 要跳转的链接 href: { type: String, default: props$y.link.href }, // 小程序中复制到粘贴板的提示语 mpTips: { type: String, default: props$y.link.mpTips }, // 下划线颜色 lineColor: { type: String, default: props$y.link.lineColor }, // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色 text: { type: String, default: props$y.link.text } } }; const _sfc_main$1x = { name: "u-link", mixins: [mpMixin, mixin, props$j], computed: { linkStyle() { const style = { color: this.color, fontSize: uni.$u.addUnit(this.fontSize), // line-height设置为比字体大小多2px lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2), textDecoration: this.underLine ? "underline" : "none" }; return style; } }, methods: { openLink() { plus.runtime.openURL(this.href); this.$emit("click"); } } }; function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "text", { class: "u-link", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])), style: vue.normalizeStyle([$options.linkStyle, _ctx.$u.addStyle(_ctx.customStyle)]) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ ); } const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__scopeId", "data-v-12f6646d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-link/u-link.vue"]]); const value = { computed: { // 经处理后需要显示的值 value() { const { text, mode, format: format2, href } = this; if (mode === "price") { if (!/^\d+(\.\d+)?$/.test(text)) { uni.$u.error("金额模式下,text参数需要为金额格式"); } if (uni.$u.test.func(format2)) { return format2(text); } return uni.$u.priceFormat(text, 2); } if (mode === "date") { !uni.$u.test.date(text) && uni.$u.error("日期模式下,text参数需要为日期或时间戳格式"); if (uni.$u.test.func(format2)) { return format2(text); } if (format2) { return uni.$u.timeFormat(text, format2); } return uni.$u.timeFormat(text, "yyyy-mm-dd"); } if (mode === "phone") { if (uni.$u.test.func(format2)) { return format2(text); } if (format2 === "encrypt") { return `${text.substr(0, 3)}****${text.substr(7)}`; } return text; } if (mode === "name") { !(typeof text === "string") && uni.$u.error("姓名模式下,text参数需要为字符串格式"); if (uni.$u.test.func(format2)) { return format2(text); } if (format2 === "encrypt") { return this.formatName(text); } return text; } if (mode === "link") { !uni.$u.test.url(href) && uni.$u.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 button = { props: { lang: String, sessionFrom: String, sendMessageTitle: String, sendMessagePath: String, sendMessageImg: String, showMessageCard: Boolean, appParameter: String, formType: String, openType: String } }; const openType = { props: { openType: String }, methods: { onGetUserInfo(event) { this.$emit("getuserinfo", event.detail); }, onContact(event) { this.$emit("contact", event.detail); }, onGetPhoneNumber(event) { this.$emit("getphonenumber", event.detail); }, onError(event) { this.$emit("error", event.detail); }, onLaunchApp(event) { this.$emit("launchapp", event.detail); }, onOpenSetting(event) { this.$emit("opensetting", event.detail); } } }; const props$i = { props: { // 主题颜色 type: { type: String, default: props$y.text.type }, // 是否显示 show: { type: Boolean, default: props$y.text.show }, // 显示的值 text: { type: [String, Number], default: props$y.text.text }, // 前置图标 prefixIcon: { type: String, default: props$y.text.prefixIcon }, // 后置图标 suffixIcon: { type: String, default: props$y.text.suffixIcon }, // 文本处理的匹配模式 // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接 mode: { type: String, default: props$y.text.mode }, // mode=link下,配置的链接 href: { type: String, default: props$y.text.href }, // 格式化规则 format: { type: [String, Function], default: props$y.text.format }, // mode=phone时,点击文本是否拨打电话 call: { type: Boolean, default: props$y.text.call }, // 小程序的打开方式 openType: { type: String, default: props$y.text.openType }, // 是否粗体,默认normal bold: { type: Boolean, default: props$y.text.bold }, // 是否块状 block: { type: Boolean, default: props$y.text.block }, // 文本显示的行数,如果设置,超出此行数,将会显示省略号 lines: { type: [String, Number], default: props$y.text.lines }, // 文本颜色 color: { type: String, default: props$y.text.color }, // 字体大小 size: { type: [String, Number], default: props$y.text.size }, // 图标的样式 iconStyle: { type: [Object, String], default: props$y.text.iconStyle }, // 文字装饰,下划线,中划线等,可选值 none|underline|line-through decoration: { tepe: String, default: props$y.text.decoration }, // 外边距,对象、字符串,数值形式均可 margin: { type: [Object, String, Number], default: props$y.text.margin }, // 文本行高 lineHeight: { type: [String, Number], default: props$y.text.lineHeight }, // 文本对齐方式,可选值left|center|right align: { type: String, default: props$y.text.align }, // 文字换行,可选值break-word|normal|anywhere wordWrap: { type: String, default: props$y.text.wordWrap } } }; const _sfc_main$1w = { name: "u--text", mixins: [mpMixin, mixin, value, props$i], emits: ["click"], computed: { valueStyle() { const style = { textDecoration: this.decoration, fontWeight: this.bold ? "bold" : "normal", wordWrap: this.wordWrap, fontSize: uni.$u.addUnit(this.size) }; !this.type && (style.color = this.color); this.isNvue && this.lines && (style.lines = this.lines); this.lineHeight && (style.lineHeight = uni.$u.addUnit(this.lineHeight)); !this.isNvue && this.block && (style.display = "block"); return uni.$u.deepMerge(style, uni.$u.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$1v(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$3); return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-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(["u-text__price", _ctx.type && `u-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: "u-text__prefix-icon" }, [ vue.createVNode(_component_u_icon, { name: _ctx.prefixIcon, customStyle: _ctx.$u.addStyle(_ctx.iconStyle) }, null, 8, ["name", "customStyle"]) ])) : vue.createCommentVNode("v-if", true), _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_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: "u-reset-button u-text__value", style: vue.normalizeStyle([$options.valueStyle]), "data-index": _ctx.index, 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, ["data-index", "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(["u-text__value", [ _ctx.type && `u-text__value--${_ctx.type}`, _ctx.lines && `u-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: "u-text__suffix-icon" }, [ vue.createVNode(_component_u_icon, { name: _ctx.suffixIcon, customStyle: _ctx.$u.addStyle(_ctx.iconStyle) }, null, 8, ["name", "customStyle"]) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true); } const uvText = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-0a574502"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-text/u-text.vue"]]); const _sfc_main$1v = { name: "u--text", mixins: [mpMixin, mixin, props$i], components: { uvText } }; function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) { const _component_uvText = vue.resolveComponent("uvText"); return vue.openBlock(), vue.createBlock(_component_uvText, { type: _ctx.type, show: _ctx.show, text: _ctx.text, prefixIcon: _ctx.prefixIcon, suffixIcon: _ctx.suffixIcon, mode: _ctx.mode, href: _ctx.href, format: _ctx.format, call: _ctx.call, openType: _ctx.openType, bold: _ctx.bold, block: _ctx.block, lines: _ctx.lines, color: _ctx.color, decoration: _ctx.decoration, size: _ctx.size, iconStyle: _ctx.iconStyle, margin: _ctx.margin, lineHeight: _ctx.lineHeight, align: _ctx.align, wordWrap: _ctx.wordWrap, customStyle: _ctx.customStyle }, null, 8, ["type", "show", "text", "prefixIcon", "suffixIcon", "mode", "href", "format", "call", "openType", "bold", "block", "lines", "color", "decoration", "size", "iconStyle", "margin", "lineHeight", "align", "wordWrap", "customStyle"]); } const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u--text/u--text.vue"]]); const props$h = { props: { // 图片地址,Array|Array形式 urls: { type: Array, default: props$y.album.urls }, // 指定从数组的对象元素中读取哪个属性作为图片地址 keyName: { type: String, default: props$y.album.keyName }, // 单图时,图片长边的长度 singleSize: { type: [String, Number], default: props$y.album.singleSize }, // 多图时,图片边长 multipleSize: { type: [String, Number], default: props$y.album.multipleSize }, // 多图时,图片水平和垂直之间的间隔 space: { type: [String, Number], default: props$y.album.space }, // 单图时,图片缩放裁剪的模式 singleMode: { type: String, default: props$y.album.singleMode }, // 多图时,图片缩放裁剪的模式 multipleMode: { type: String, default: props$y.album.multipleMode }, // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量 maxCount: { type: [String, Number], default: props$y.album.maxCount }, // 是否可以预览图片 previewFullImage: { type: Boolean, default: props$y.album.previewFullImage }, // 每行展示图片数量,如设置,singleSize和multipleSize将会无效 rowCount: { type: [String, Number], default: props$y.album.rowCount }, // 超出maxCount时是否显示查看更多的提示 showMore: { type: Boolean, default: props$y.album.showMore } } }; const _sfc_main$1u = { name: "u-album", mixins: [mpMixin, mixin, props$h], data() { return { // 单图的宽度 singleWidth: 0, // 单图的高度 singleHeight: 0, // 单图时,如果无法获取图片的尺寸信息,让图片宽度默认为容器的一定百分比 singlePercent: 0.6 }; }, watch: { urls: { immediate: true, handler(newVal) { if (newVal.length === 1) { this.getImageRect(); } } } }, computed: { imageStyle() { return (index1, index2) => { const { space, rowCount, multipleSize, urls } = this, { addUnit: addUnit2, addStyle: addStyle2 } = uni.$u, rowLen = this.showUrls.length; this.urls.length; const style = { marginRight: addUnit2(space), marginBottom: addUnit2(space) }; if (index1 === rowLen) style.marginBottom = 0; if (index2 === rowCount || index1 === rowLen && index2 === this.showUrls[index1 - 1].length) style.marginRight = 0; return style; }; }, // 将数组划分为二维数组 showUrls() { const arr = []; this.urls.map((item, index2) => { if (index2 + 1 <= this.maxCount) { const itemIndex = Math.floor(index2 / this.rowCount); if (!arr[itemIndex]) { arr[itemIndex] = []; } arr[itemIndex].push(item); } }); return arr; }, imageWidth() { return uni.$u.addUnit( this.urls.length === 1 ? this.singleWidth : this.multipleSize ); }, imageHeight() { return uni.$u.addUnit( this.urls.length === 1 ? this.singleHeight : this.multipleSize ); }, // 此变量无实际用途,仅仅是为了利用computed特性,让其在urls长度等变化时,重新计算图片的宽度 // 因为用户在某些特殊的情况下,需要让文字与相册的宽度相等,所以这里事件的形式对外发送 albumWidth() { let width = 0; if (this.urls.length === 1) { width = this.singleWidth; } else { width = this.showUrls[0].length * this.multipleSize + this.space * (this.showUrls[0].length - 1); } this.$emit("albumWidth", width); return width; } }, methods: { // 预览图片 onPreviewTap(url2) { const urls = this.urls.map((item) => { return this.getSrc(item); }); uni.previewImage({ current: url2, urls }); }, // 获取图片的路径 getSrc(item) { return uni.$u.test.object(item) ? this.keyName && item[this.keyName] || item.src : item; }, // 单图时,获取图片的尺寸 // 在小程序中,需要将网络图片的的域名添加到小程序的download域名才可能获取尺寸 // 在没有添加的情况下,让单图宽度默认为盒子的一定宽度(singlePercent) getImageRect() { const src = this.getSrc(this.urls[0]); uni.getImageInfo({ src, success: (res) => { const isHorizotal = res.width >= res.height; this.singleWidth = isHorizotal ? this.singleSize : res.width / res.height * this.singleSize; this.singleHeight = !isHorizotal ? this.singleSize : res.height / res.width * this.singleWidth; }, fail: () => { this.getComponentWidth(); } }); }, // 获取组件的宽度 async getComponentWidth() { await uni.$u.sleep(30); this.$uGetRect(".u-album__row").then((size) => { this.singleWidth = size.width * this.singlePercent; }); } } }; function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) { const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_0$5); return vue.openBlock(), vue.createElementBlock("view", { class: "u-album" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.showUrls, (arr, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-album__row", ref_for: true, ref: "u-album__row", forComputedUse: $options.albumWidth, key: index2 }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(arr, (item, index1) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-album__row__wrapper", key: index1, style: vue.normalizeStyle([$options.imageStyle(index2 + 1, index1 + 1)]), onClick: ($event) => _ctx.previewFullImage ? $options.onPreviewTap($options.getSrc(item)) : "" }, [ vue.createElementVNode("image", { src: $options.getSrc(item), mode: _ctx.urls.length === 1 ? $options.imageHeight > 0 ? _ctx.singleMode : "widthFix" : _ctx.multipleMode, style: vue.normalizeStyle([ { width: $options.imageWidth, height: $options.imageHeight } ]) }, null, 12, ["src", "mode"]), _ctx.showMore && _ctx.urls.length > _ctx.rowCount * $options.showUrls.length && index2 === $options.showUrls.length - 1 && index1 === $options.showUrls[$options.showUrls.length - 1].length - 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-album__row__wrapper__text" }, [ vue.createVNode(_component_u__text, { text: `+${_ctx.urls.length - _ctx.maxCount}`, color: "#fff", size: _ctx.multipleSize * 0.3, align: "center", customStyle: "justify-content: center" }, null, 8, ["text", "size"]) ])) : vue.createCommentVNode("v-if", true) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 8, ["forComputedUse"]); }), 128 /* KEYED_FRAGMENT */ )) ]); } const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-96d28356"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-album/u-album.vue"]]); const _sfc_main$1t = { data() { return { report: null, patient: null, hospital: null, department: null, doctor: null, order: null, orderId: null, orderStatusOptions: [], orderTypeOptions: [], inquiryTypeOptions: [], reportImages: [], tongueImages: [], faceImages: [] // forms:[], }; }, onLoad(options) { this.orderId = options.orderId; this.getDictByKey("sys_inquiry_order_type"); this.getDictByKey("sys_inquiry_type"); this.getDictByKey("sys_inquiry_status"); }, onShow() { this.getMyInquiryOrderById(); }, methods: { cancel() { var that = this; uni.showModal({ title: "提示", content: "确认取消订单吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { var data = { orderId: this.orderId }; cancel(data).then( (res2) => { if (res2.code == 200) { that.getMyInquiryOrderById(); uni.showToast({ icon: "success", title: "操作成功" }); } else { uni.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { } ); } } }); }, ping() { uni.navigateTo({ url: "/pages_order/pingOrder?orderId=" + this.orderId + "&doctorId=" + this.order.doctorId }); }, pay() { uni.navigateTo({ url: "/pages_order/inquiryPay?orderId=" + this.orderId }); }, toIM() { var that = this; var id = "C2CD-" + this.doctor.doctorId; store.commit("timStore/setType", "startInquiry"); store.commit("timStore/setOrderType", this.order.orderType); store.commit("timStore/setOrderId", this.order.orderId); store.commit("timStore/setFollowId", 0); store.commit("timStore/setImType", 1); store.commit("timStore/setConversationID", id); uni.$TUIKit.TUIConversationServer.setMessageRead(id); uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => { var _a; uni.$TUIKit.TUIConversationServer.setConversationValue(id, that.orderId).then((res2) => { formatAppLog("log", "at pages_order/inquiryOrderDetails.vue:394", "更新order"); }).catch((err) => { }); formatAppLog("log", "at pages_order/inquiryOrderDetails.vue:399", res); const { conversation } = res.data; store.commit("timStore/setConversation", conversation); let url2 = "/pages/TUIKit/TUIPages/TUIChat/index"; conversation.userProfile; url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`; uni.redirectTo({ url: url2 }); }).catch((err) => { formatAppLog("warn", "at pages_order/inquiryOrderDetails.vue:412", "获取 group profile 异常 = ", err); }); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, copyOrderSn() { uni.setClipboardData({ data: this.order.orderSn, success: function() { uni.showToast({ title: "复制成功", icon: "none" }); } }); }, getMyInquiryOrderById() { var that = this; var data = { orderId: this.orderId }; getMyInquiryOrderById(data).then( (res) => { if (res.code == 200) { this.order = res.data.order; this.report = res.data.report; this.patient = JSON.parse(res.data.order.patientJson); if (that.patient.reportImages != null) { that.reportImages = that.patient.reportImages.split(","); } if (that.patient.tongueImages != null) { that.tongueImages = that.patient.tongueImages.split(","); } if (that.patient.faceImages != null) { that.faceImages = that.patient.faceImages.split(","); } this.doctor = res.data.doctor; this.department = res.data.department; this.hospital = res.data.hospital; } }, (err) => { } ); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_inquiry_order_type") { this.orderTypeOptions = res.data; } if (key == "sys_inquiry_type") { this.inquiryTypeOptions = res.data; } if (key == "sys_inquiry_status") { this.orderStatusOptions = res.data; } } }, (err) => { } ); }, navTo(url2) { uni.navigateTo({ url: url2 }); } } }; function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6); const _component_u_album = resolveEasycom(vue.resolveDynamicComponent("u-album"), __easycom_1$2); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont" }, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "付款详情"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "订单类型:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, $data.order.inquiryType)), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, $data.order.orderType)), 1 /* TEXT */ ) ]), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "status red" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "status red" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "status green" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "status green" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.order.status < 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4, class: "status gray" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true), $data.doctor != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "doc-box" }, [ vue.createElementVNode("view", { class: "title" }, "医生详情"), vue.createElementVNode("view", { class: "doc-name-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString($data.doctor.doctorName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "doc-star" }, [ vue.createVNode(_component_u_rate, { activeColor: "#ffc603", count: "5", readonly: "", modelValue: $data.doctor.pingStar, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.doctor.pingStar = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode( "view", { class: "doc-dept-box" }, vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-his-box" }, vue.toDisplayString($data.hospital.hospitalName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "doc-spec-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "title" }, "擅长:"), vue.createElementVNode( "view", { class: "spec" }, vue.toDisplayString($data.doctor.speciality), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages/doctor/doctorDetails?doctorId=" + $data.doctor.doctorId)) }, "详情") ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null && $data.order.inquiryType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "咨询内容"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患者信息:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "病情描述:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.title), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患病时间:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.duration), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "就诊情况:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.isVisit), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null && $data.order.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "咨询内容"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患者信息:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "身高(CM):"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.height), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "体重(KG):"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.weight), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "联系电话:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.mobile), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(' \r\n \r\n 学习进度:\r\n {{patient.study}}\r\n \r\n '), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "用药情况:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.medication), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "期望会诊方式:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.usage), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "病情描述:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.title), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "正在服用药品:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.drugs), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "本次患病时间:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.duration), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "是否就诊过:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.isVisit), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "舌苔照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "面部照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"]) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null && $data.order.inquiryType == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "咨询内容"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患者信息:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "病情描述:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.title), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "正在服用药品:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.drugs), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "本次患病时间:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.duration), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "是否就诊过:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.isVisit), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "舌苔照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "面部照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(' \r\n 体检信息\r\n \r\n \r\n {{item.title}}:\r\n \r\n \r\n \r\n \r\n \r\n '), $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "订单号码:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item-btn", onClick: _cache[2] || (_cache[2] = (...args) => $options.copyOrderSn && $options.copyOrderSn(...args)) }, "复制") ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.money.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "优惠金额:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.discountMoney.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true) ]), $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn-box" }, [ $data.report != null && $data.order.status >= 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn", onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/inquiryOrderReport?orderId=" + $data.order.orderId)) }, "查看报告")) : vue.createCommentVNode("v-if", true), $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn", onClick: _cache[4] || (_cache[4] = ($event) => $options.toIM()) }, "去问诊")) : vue.createCommentVNode("v-if", true), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "btn", onClick: _cache[5] || (_cache[5] = ($event) => $options.pay()) }, "去支付")) : vue.createCommentVNode("v-if", true), $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "btn", onClick: _cache[6] || (_cache[6] = ($event) => $options.cancel()) }, "取消订单")) : vue.createCommentVNode("v-if", true), $data.order.status == 4 && $data.order.isPing == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "btn", onClick: _cache[7] || (_cache[7] = ($event) => $options.ping()) }, "去评价")) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]); } const Pages_orderInquiryOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-905cad6d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderDetails.vue"]]); const _sfc_main$1s = { mixins: [MescrollMixin], // 使用mixin data() { return { mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onShow() { }, methods: { navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { pageNum: page2.num, pageSize: page2.size }; getMyInquiryOrderPingList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createVNode(_component_mescroll_body, { top: "0rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: $data.downOption, up: $data.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "doctor-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "doctor", onClick: ($event) => $options.navTo("../doctor/doctorDetails?doctorId=" + item.doctorId) }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("image", { mode: "aspectFill", class: "doc-img", src: item.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : item.avatar }, null, 8, ["src"]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString(item.doctorName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "ping-star" }, [ vue.createVNode(_component_u_rate, { activeColor: "#ffc603", count: "5", readonly: "", modelValue: item.pingStar, "onUpdate:modelValue": ($event) => item.pingStar = $event }, null, 8, ["modelValue", "onUpdate:modelValue"]) ]) ]), vue.createElementVNode( "view", { class: "doc-ping-content" }, vue.toDisplayString(item.pingContent), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-ping-time" }, vue.toDisplayString(item.pingTime), 1 /* TEXT */ ) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "down", "up", "onDown", "onUp"]) ]); } const Pages_orderInquiryOrderPingList = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-e069bc60"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderPingList.vue"]]); const _sfc_main$1r = { data() { return { isShare: null, companyId: null, companyUserId: null, inquiryType: null, prices: [] }; }, onLoad(options) { if (!this.$isEmpty(options.isShare)) { this.isShare = options.isShare; } else { uni.hideShareMenu(); } this.inquiryType = options.inquiryType; this.companyId = options.companyId; this.companyUserId = options.companyUserId; }, onShow() { this.getConfigByKey(); }, onShareAppMessage(res) { uni.showShareMenu({ withShareTicket: true }); wx.updateShareMenu({ isPrivateMessage: true, withShareTicket: false, success(res2) { formatAppLog("log", "at pages_order/inquirySelect.vue:66", "updateShareMenu: ", res2); }, fail() { } }); return { title: "御君方互联网医院--健康会诊", path: "/pages_order/inquirySelect?inquiryType=3&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId }; }, methods: { getConfigByKey() { let data = { key: "his.inquiryConfig" }; getConfigByKey(data).then( (res) => { if (res.code == 200) { var data2 = JSON.parse(res.data); this.prices = data2.prices; formatAppLog("log", "at pages_order/inquirySelect.vue:85", this.prices); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, doInquiryForm(price) { this.$isLogin().then( (res) => { formatAppLog("log", "at pages_order/inquirySelect.vue:99", res); if (res) { if (this.inquiryType == 1) { uni.navigateTo({ url: "/pages_order/inquiryForm1?inquiryType=" + this.inquiryType + "&orderType=" + price.type }); } else if (this.inquiryType == 3) { uni.navigateTo({ url: "/pages_order/inquiryForm3?inquiryType=" + this.inquiryType + "&orderType=" + price.type + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId }); } } else { uni.navigateTo({ url: "/pages/auth/login" }); } } ); } } }; function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "bg" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f06ec63771984f3b9f9aa65eb0c17eeb.png" }) ]), vue.createElementVNode("view", { class: "title" }, "20秒快速匹配专家医生"), vue.createElementVNode("view", { class: "cont" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.prices, (price, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "inquiry-item", onClick: ($event) => $options.doInquiryForm(price) }, [ price.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/939cf3ad7d1a4186a7195e84a1db84bf.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode( "view", { class: "name" }, "图文问诊 " + vue.toDisplayString(price.price) + "/次", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "desc" }, "和医生1对1在线图文问诊") ]) ])) : vue.createCommentVNode("v-if", true), price.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/cf80011807af45c9af1bea6c4cf4bb3a.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode( "view", { class: "name" }, "视频问诊 " + vue.toDisplayString(price.price) + "/次", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "desc" }, "和医生1对1在线视频问诊") ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" }) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]); } const Pages_orderInquirySelect = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-0e970724"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquirySelect.vue"]]); const _sfc_main$1q = { data() { return { companyId: null, companyUserId: null, isShare: null }; }, onLoad(options) { this.isShare = options.isShare; this.companyId = options.companyId; this.companyUserId = options.companyUserId; }, onShow() { }, methods: { doInquiryForm(type2) { this.$isLogin().then( (res) => { formatAppLog("log", "at pages_order/inquirySelectType.vue:123", res); if (res) { if (type2 == 1 || type2 == 2 || type2 == 6 || type2 == 5 || type2 == 7 || type2 == 8 || type2 == 9 || type2 == 10) { uni.navigateTo({ url: "/pages_order/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType=" + type2 + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId + "&isShare=" + this.isShare }); } else if (type2 == 3) { uni.navigateTo({ url: "/pages_order/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType=" + type2 + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId + "&isShare=" + this.isShare }); } } else { uni.navigateTo({ url: "/pages/auth/login" }); } } ); } } }; function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont-bg" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/42d328f9604947eea86b6331ff7013e6.jpg" }) ]), vue.createElementVNode("view", { class: "bg" }, [ vue.createElementVNode("view"), vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/65d12607ca874b0d8536c7201a0dfa97.png" }) ]), vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "inquiry-item", onClick: _cache[0] || (_cache[0] = ($event) => $options.doInquiryForm(1)) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode("view", { class: "name" }, "翟佳滨教授专家团队 会诊咨询"), vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询") ]) ]) ]), vue.createElementVNode("view", { class: "inquiry-item", onClick: _cache[1] || (_cache[1] = ($event) => $options.doInquiryForm(2)) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode("view", { class: "name" }, "红彦主任专家团队 会诊咨询"), vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询") ]) ]) ]), vue.createElementVNode("view", { class: "inquiry-item", onClick: _cache[2] || (_cache[2] = ($event) => $options.doInquiryForm(6)) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode("view", { class: "name" }, "史士昊老师专家团队 会诊咨询"), vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询") ]) ]) ]), vue.createElementVNode("view", { class: "inquiry-item", onClick: _cache[3] || (_cache[3] = ($event) => $options.doInquiryForm(5)) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode("view", { class: "name" }, "张然丁教授专家团队 会诊咨询"), vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询") ]) ]) ]), vue.createElementVNode("view", { class: "inquiry-item", onClick: _cache[4] || (_cache[4] = ($event) => $options.doInquiryForm(7)) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode("view", { class: "name" }, "丁玉球教授专家团队 会诊咨询"), vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询") ]) ]) ]), vue.createElementVNode("view", { class: "inquiry-item", onClick: _cache[5] || (_cache[5] = ($event) => $options.doInquiryForm(8)) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode("view", { class: "name" }, "杜丁主任专家团队 会诊咨询"), vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询") ]) ]) ]), vue.createElementVNode("view", { class: "inquiry-item", onClick: _cache[6] || (_cache[6] = ($event) => $options.doInquiryForm(9)) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode("view", { class: "name" }, "王洋主任专家团队 会诊咨询"), vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询") ]) ]) ]), vue.createElementVNode("view", { class: "inquiry-item", onClick: _cache[7] || (_cache[7] = ($event) => $options.doInquiryForm(10)) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode("view", { class: "name" }, "御君方互联网医院 VIP问诊"), vue.createElementVNode("view", { class: "desc" }, "医疗专家团队问诊咨询") ]) ]) ]), vue.createElementVNode("view", { class: "inquiry-item", onClick: _cache[8] || (_cache[8] = ($event) => $options.doInquiryForm(3)) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }), vue.createElementVNode("view", { class: "inquiry-cont" }, [ vue.createElementVNode("view", { class: "name" }, "御君方互联网医院 问诊咨询"), vue.createElementVNode("view", { class: "desc" }, "医疗专家团队问诊咨询") ]) ]) ]) ]) ]); } const Pages_orderInquirySelectType = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-d465af63"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquirySelectType.vue"]]); const props$g = { props: { // 是否开启顶部安全区适配 safeAreaInsetTop: { type: Boolean, default: props$y.navbar.safeAreaInsetTop }, // 固定在顶部时,是否生成一个等高元素,以防止塌陷 placeholder: { type: Boolean, default: props$y.navbar.placeholder }, // 是否固定在顶部 fixed: { type: Boolean, default: props$y.navbar.fixed }, // 是否显示下边框 border: { type: Boolean, default: props$y.navbar.border }, // 左边的图标 leftIcon: { type: String, default: props$y.navbar.leftIcon }, // 左边的提示文字 leftText: { type: String, default: props$y.navbar.leftText }, // 左右的提示文字 rightText: { type: String, default: props$y.navbar.rightText }, // 右边的图标 rightIcon: { type: String, default: props$y.navbar.rightIcon }, // 标题 title: { type: [String, Number], default: props$y.navbar.title }, // 背景颜色 bgColor: { type: String, default: props$y.navbar.bgColor }, // 标题的宽度 titleWidth: { type: [String, Number], default: props$y.navbar.titleWidth }, // 导航栏高度 height: { type: [String, Number], default: props$y.navbar.height }, // 左侧返回图标的大小 leftIconSize: { type: [String, Number], default: props$y.navbar.leftIconSize }, // 左侧返回图标的颜色 leftIconColor: { type: String, default: props$y.navbar.leftIconColor }, // 点击左侧区域(返回图标),是否自动返回上一页 autoBack: { type: Boolean, default: props$y.navbar.autoBack }, // 标题的样式,对象或字符串 titleStyle: { type: [String, Object], default: props$y.navbar.titleStyle } } }; const _sfc_main$1p = { name: "u-navbar", mixins: [mpMixin, mixin, props$g], data() { return {}; }, methods: { // 点击左侧区域 leftClick() { this.$emit("leftClick"); if (this.autoBack) { uni.navigateBack(); } }, // 点击右侧区域 rightClick() { this.$emit("rightClick"); } } }; function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$b); const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [ _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-navbar__placeholder", style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px") }) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"]) }, [ _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0, bgColor: _ctx.bgColor }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]), style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height), backgroundColor: _ctx.bgColor }) }, [ vue.createElementVNode("view", { class: "u-navbar__content__left", "hover-class": "u-navbar__content__left--hover", "hover-start-time": "150", onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "left", {}, () => [ _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: _ctx.leftIcon, size: _ctx.leftIconSize, color: _ctx.leftIconColor }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true), _ctx.leftText ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, style: vue.normalizeStyle({ color: _ctx.leftIconColor }), class: "u-navbar__content__left__text" }, vue.toDisplayString(_ctx.leftText), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], true) ]), vue.renderSlot(_ctx.$slots, "center", {}, () => [ vue.createElementVNode( "text", { class: "u-line-1 u-navbar__content__title", style: vue.normalizeStyle([{ width: _ctx.$u.addUnit(_ctx.titleWidth) }, _ctx.$u.addStyle(_ctx.titleStyle)]) }, vue.toDisplayString(_ctx.title), 5 /* TEXT, STYLE */ ) ], true), _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-navbar__content__right", onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "right", {}, () => [ _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: _ctx.rightIcon, size: "20" }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true), _ctx.rightText ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-navbar__content__right__text" }, vue.toDisplayString(_ctx.rightText), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], true) ])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ) ], 2 /* CLASS */ ) ]); } const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-f631659b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]); const props$f = { props: { // 显示文字 title: { type: String, default: props$y.alert.title }, // 主题,success/warning/info/error type: { type: String, default: props$y.alert.type }, // 辅助性文字 description: { type: String, default: props$y.alert.description }, // 是否可关闭 closable: { type: Boolean, default: props$y.alert.closable }, // 是否显示图标 showIcon: { type: Boolean, default: props$y.alert.showIcon }, // 浅或深色调,light-浅色,dark-深色 effect: { type: String, default: props$y.alert.effect }, // 文字是否居中 center: { type: Boolean, default: props$y.alert.center }, // 字体大小 fontSize: { type: [String, Number], default: props$y.alert.fontSize } } }; const _sfc_main$1o = { name: "u-alert", mixins: [mpMixin, mixin, props$f], data() { return { show: true }; }, computed: { iconColor() { return this.effect === "light" ? this.type : "#fff"; }, // 不同主题对应不同的图标 iconName() { switch (this.type) { case "success": return "checkmark-circle-fill"; case "error": return "close-circle-fill"; case "warning": return "error-circle-fill"; case "info": return "info-circle-fill"; case "primary": return "more-circle-fill"; default: return "error-circle-fill"; } } }, methods: { // 点击内容 clickHandler() { this.$emit("click"); }, // 点击关闭按钮 closeHandler() { this.show = false; } } }; function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4); return vue.openBlock(), vue.createBlock(_component_u_transition, { mode: "fade", show: $data.show }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]), onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])), style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]) }, [ _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-alert__icon" }, [ vue.createVNode(_component_u_icon, { name: $options.iconName, size: "18", color: $options.iconColor }, null, 8, ["name", "color"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-alert__content", style: vue.normalizeStyle([{ paddingRight: _ctx.closable ? "20px" : 0 }]) }, [ _ctx.title ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]), style: vue.normalizeStyle([{ fontSize: _ctx.$u.addUnit(_ctx.fontSize), textAlign: _ctx.center ? "center" : "left" }]) }, vue.toDisplayString(_ctx.title), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.description ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]), style: vue.normalizeStyle([{ fontSize: _ctx.$u.addUnit(_ctx.fontSize), textAlign: _ctx.center ? "center" : "left" }]) }, vue.toDisplayString(_ctx.description), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-alert__close", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])) }, [ vue.createVNode(_component_u_icon, { name: "close", color: $options.iconColor, size: "15" }, null, 8, ["color"]) ])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ) ]), _: 1 /* STABLE */ }, 8, ["show"]); } const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-158e540a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]); const props$e = { props: { // 输入框的内容 value: { type: [String, Number], default: props$y.textarea.value }, // 输入框的内容 modelValue: { type: [String, Number], default: props$y.textarea.value }, // 输入框为空时占位符 placeholder: { type: [String, Number], default: props$y.textarea.placeholder }, // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ placeholderClass: { type: String, default: props$y.input.placeholderClass }, // 指定placeholder的样式 placeholderStyle: { type: [String, Object], default: props$y.input.placeholderStyle }, // 输入框高度 height: { type: [String, Number], default: props$y.textarea.height }, // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效 confirmType: { type: String, default: props$y.textarea.confirmType }, // 是否禁用 disabled: { type: Boolean, default: props$y.textarea.disabled }, // 是否显示统计字数 count: { type: Boolean, default: props$y.textarea.count }, // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现 focus: { type: Boolean, default: props$y.textarea.focus }, // 是否自动增加高度 autoHeight: { type: Boolean, default: props$y.textarea.autoHeight }, // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true fixed: { type: Boolean, default: props$y.textarea.fixed }, // 指定光标与键盘的距离 cursorSpacing: { type: Number, default: props$y.textarea.cursorSpacing }, // 指定focus时的光标位置 cursor: { type: [String, Number], default: props$y.textarea.cursor }, // 是否显示键盘上方带有”完成“按钮那一栏, showConfirmBar: { type: Boolean, default: props$y.textarea.showConfirmBar }, // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用 selectionStart: { type: Number, default: props$y.textarea.selectionStart }, // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用 selectionEnd: { type: Number, default: props$y.textarea.selectionEnd }, // 键盘弹起时,是否自动上推页面 adjustPosition: { type: Boolean, default: props$y.textarea.adjustPosition }, // 是否去掉 iOS 下的默认内边距,只微信小程序有效 disableDefaultPadding: { type: Boolean, default: props$y.textarea.disableDefaultPadding }, // focus时,点击页面的时候不收起键盘,只微信小程序有效 holdKeyboard: { type: Boolean, default: props$y.textarea.holdKeyboard }, // 最大输入长度,设置为 -1 的时候不限制最大长度 maxlength: { type: [String, Number], default: props$y.textarea.maxlength }, // 边框类型,surround-四周边框,bottom-底部边框 border: { type: String, default: props$y.textarea.border }, // 用于处理或者过滤输入框内容的方法 formatter: { type: [Function, null], default: props$y.textarea.formatter }, // 是否忽略组件内对文本合成系统事件的处理 ignoreCompositionEvent: { type: Boolean, default: true } } }; const _sfc_main$1n = { name: "u-textarea", mixins: [mpMixin, mixin, props$e], data() { return { // 输入框的值 innerValue: "", // 是否处于获得焦点状态 focused: false, // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化 firstChange: true, // value绑定值的变化是由内部还是外部引起的 changeFromInner: false, // 过滤处理方法 innerFormatter: (value2) => value2 }; }, created() { }, watch: { modelValue: { immediate: true, handler(newVal, oldVal) { this.innerValue = newVal; this.firstChange = false; this.changeFromInner = false; } } }, computed: { // 组件的类名 textareaClass() { let classes = [], { border, disabled } = this; border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"])); border === "bottom" && (classes = classes.concat([ "u-border-bottom", "u-textarea--no-radius" ])); disabled && classes.push("u-textarea--disabled"); return classes.join(" "); }, // 组件的样式 textareaStyle() { const style = {}; return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } }, emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"], methods: { // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用 setFormatter(e) { this.innerFormatter = e; }, onFocus(e) { this.$emit("focus", e); }, onBlur(e) { this.$emit("blur", e); uni.$u.formValidate(this, "blur"); }, onLinechange(e) { this.$emit("linechange", e); }, 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(); }); }, // 内容发生变化,进行处理 valueChange() { const value2 = this.innerValue; this.$nextTick(() => { this.$emit("update:modelValue", value2); this.changeFromInner = true; this.$emit("change", value2); uni.$u.formValidate(this, "change"); }); }, onConfirm(e) { this.$emit("confirm", e); }, onKeyboardheightchange(e) { this.$emit("keyboardheightchange", e); } } }; function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-textarea", $options.textareaClass]), style: vue.normalizeStyle([$options.textareaStyle]) }, [ vue.createElementVNode("textarea", { class: "u-textarea__field", value: $data.innerValue, style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }), placeholder: _ctx.placeholder, "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"), "placeholder-class": _ctx.placeholderClass, disabled: _ctx.disabled, focus: _ctx.focus, autoHeight: _ctx.autoHeight, fixed: _ctx.fixed, cursorSpacing: _ctx.cursorSpacing, cursor: _ctx.cursor, showConfirmBar: _ctx.showConfirmBar, selectionStart: _ctx.selectionStart, selectionEnd: _ctx.selectionEnd, adjustPosition: _ctx.adjustPosition, disableDefaultPadding: _ctx.disableDefaultPadding, holdKeyboard: _ctx.holdKeyboard, maxlength: _ctx.maxlength, "confirm-type": _ctx.confirmType, ignoreCompositionEvent: _ctx.ignoreCompositionEvent, onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)), onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)), onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)), onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)), onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)), onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args)) }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]), _ctx.count ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-textarea__count", style: vue.normalizeStyle({ "background-color": _ctx.disabled ? "transparent" : "#fff" }) }, vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const uvTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-b6c174a6"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]); const _sfc_main$1m = { name: "u--textarea", mixins: [mpMixin, props$e, mixin], components: { uvTextarea } }; function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) { const _component_uvTextarea = vue.resolveComponent("uvTextarea"); return vue.openBlock(), vue.createBlock(_component_uvTextarea, { value: _ctx.value, modelValue: _ctx.modelValue, placeholder: _ctx.placeholder, height: _ctx.height, confirmType: _ctx.confirmType, disabled: _ctx.disabled, count: _ctx.count, focus: _ctx.focus, autoHeight: _ctx.autoHeight, fixed: _ctx.fixed, cursorSpacing: _ctx.cursorSpacing, cursor: _ctx.cursor, showConfirmBar: _ctx.showConfirmBar, selectionStart: _ctx.selectionStart, selectionEnd: _ctx.selectionEnd, adjustPosition: _ctx.adjustPosition, disableDefaultPadding: _ctx.disableDefaultPadding, holdKeyboard: _ctx.holdKeyboard, maxlength: _ctx.maxlength, border: _ctx.border, customStyle: _ctx.customStyle, formatter: _ctx.formatter, ignoreCompositionEvent: _ctx.ignoreCompositionEvent, onInput: _cache[0] || (_cache[0] = (e) => _ctx.$emit("input", e)), "onUpdate:modelValue": _cache[1] || (_cache[1] = (e) => _ctx.$emit("update:modelValue", e)) }, null, 8, ["value", "modelValue", "placeholder", "height", "confirmType", "disabled", "count", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "border", "customStyle", "formatter", "ignoreCompositionEvent"]); } const __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u--textarea/u--textarea.vue"]]); const props$d = { props: { // radio的名称 name: { type: [String, Number, Boolean], default: props$y.radio.name }, // 形状,square为方形,circle为圆型 shape: { type: String, default: props$y.radio.shape }, // 是否禁用 disabled: { type: [String, Boolean], default: props$y.radio.disabled }, // 是否禁止点击提示语选中单选框 labelDisabled: { type: [String, Boolean], default: props$y.radio.labelDisabled }, // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 activeColor: { type: String, default: props$y.radio.activeColor }, // 未选中的颜色 inactiveColor: { type: String, default: props$y.radio.inactiveColor }, // 图标的大小,单位px iconSize: { type: [String, Number], default: props$y.radio.iconSize }, // label的字体大小,px单位 labelSize: { type: [String, Number], default: props$y.radio.labelSize }, // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式 label: { type: [String, Number], default: props$y.radio.label }, // 整体的大小 size: { type: [String, Number], default: props$y.radio.size }, // 图标颜色 color: { type: String, default: props$y.radio.color }, // label的颜色 labelColor: { type: String, default: props$y.radio.labelColor }, // 图标颜色 iconColor: { type: String, default: props$y.radio.iconColor } } }; const _sfc_main$1l = { name: "u-radio", mixins: [mpMixin, mixin, props$d], data() { return { checked: false, // 当你看到这段代码的时候, // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式 // 故只能使用如此方法 parentData: { iconSize: 12, labelDisabled: null, disabled: null, shape: null, activeColor: null, inactiveColor: null, size: 18, value: null, modelValue: null, iconColor: null, placement: "row", borderBottom: false, iconPlacement: "left" } }; }, computed: { // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置 elDisabled() { return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false; }, // 是否禁用label点击 elLabelDisabled() { return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false; }, // 组件尺寸,对应size的值,默认值为21px elSize() { return this.size ? this.size : this.parentData.size ? this.parentData.size : 21; }, // 组件的勾选图标的尺寸,默认12px elIconSize() { return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12; }, // 组件选中激活时的颜色 elActiveColor() { return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff"; }, // 组件选未中激活时的颜色 elInactiveColor() { return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc"; }, // label的颜色 elLabelColor() { return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266"; }, // 组件的形状 elShape() { return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle"; }, // label大小 elLabelSize() { return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15"); }, elIconColor() { const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff"; if (this.elDisabled) { return this.checked ? this.elInactiveColor : "transparent"; } else { return this.checked ? iconColor : "transparent"; } }, iconClasses() { let classes = []; classes.push("u-radio__icon-wrap--" + this.elShape); if (this.elDisabled) { classes.push("u-radio__icon-wrap--disabled"); } if (this.checked && this.elDisabled) { classes.push("u-radio__icon-wrap--disabled--checked"); } return classes; }, iconWrapStyle() { const style = {}; style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff"; style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor; style.width = uni.$u.addUnit(this.elSize); style.height = uni.$u.addUnit(this.elSize); if (this.parentData.iconPlacement === "right") { style.marginRight = 0; } return style; }, radioStyle() { const style = {}; if (this.parentData.borderBottom && this.parentData.placement === "row") { uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效"); } if (this.parentData.borderBottom && this.parentData.placement === "column") { style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px"; } return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } }, mounted() { this.init(); }, methods: { init() { this.updateParentData(); if (!this.parent) { uni.$u.error("u-radio必须搭配u-radio-group组件使用"); } this.checked = this.name === this.parentData.modelValue; }, updateParentData() { this.getParentData("u-radio-group"); }, // 点击图标 iconClickHandler(e) { this.preventEvent(e); if (!this.elDisabled) { this.setRadioCheckedStatus(); } }, // 横向两端排列时,点击组件即可触发选中事件 wrapperClickHandler(e) { this.parentData.iconPlacement === "right" && this.iconClickHandler(e); }, // 点击label labelClickHandler(e) { this.preventEvent(e); if (!this.elLabelDisabled && !this.elDisabled) { this.setRadioCheckedStatus(); } }, emitEvent() { if (!this.checked) { this.$emit("change", this.name); this.$nextTick(() => { uni.$u.formValidate(this, "change"); }); } }, // 改变组件选中状态 // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例 // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态 setRadioCheckedStatus() { this.emitEvent(); this.checked = true; typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this); } } }; function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]), onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])), style: vue.normalizeStyle([$options.radioStyle]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]), onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])), style: vue.normalizeStyle([$options.iconWrapStyle]) }, [ vue.renderSlot(_ctx.$slots, "icon", {}, () => [ vue.createVNode(_component_u_icon, { class: "u-radio__icon-wrap__icon", name: "checkbox-mark", size: $options.elIconSize, color: $options.elIconColor }, null, 8, ["size", "color"]) ], true) ], 6 /* CLASS, STYLE */ ), vue.createElementVNode( "text", { class: "u-radio__text", onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])), style: vue.normalizeStyle({ color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor, fontSize: $options.elLabelSize, lineHeight: $options.elLabelSize }) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ ) ], 6 /* CLASS, STYLE */ ); } const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-83036558"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]); const props$c = { props: { // 绑定的值 modelValue: { type: [String, Number, Boolean], default: props$y.radioGroup.value }, // 是否禁用全部radio disabled: { type: Boolean, default: props$y.radioGroup.disabled }, // 形状,circle-圆形,square-方形 shape: { type: String, default: props$y.radioGroup.shape }, // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 activeColor: { type: String, default: props$y.radioGroup.activeColor }, // 未选中的颜色 inactiveColor: { type: String, default: props$y.radioGroup.inactiveColor }, // 标识符 name: { type: String, default: props$y.radioGroup.name }, // 整个组件的尺寸,默认px size: { type: [String, Number], default: props$y.radioGroup.size }, // 布局方式,row-横向,column-纵向 placement: { type: String, default: props$y.radioGroup.placement }, // label的文本 label: { type: [String], default: props$y.radioGroup.label }, // label的颜色 (默认 '#303133' ) labelColor: { type: [String], default: props$y.radioGroup.labelColor }, // label的字体大小,px单位 labelSize: { type: [String, Number], default: props$y.radioGroup.labelSize }, // 是否禁止点击文本操作checkbox(默认 false ) labelDisabled: { type: Boolean, default: props$y.radioGroup.labelDisabled }, // 图标颜色 iconColor: { type: String, default: props$y.radioGroup.iconColor }, // 图标的大小,单位px iconSize: { type: [String, Number], default: props$y.radioGroup.iconSize }, // 竖向配列时,是否显示下划线 borderBottom: { type: Boolean, default: props$y.radioGroup.borderBottom }, // 图标与文字的对齐方式 iconPlacement: { type: String, default: props$y.radio.iconPlacement } } }; const _sfc_main$1k = { name: "u-radio-group", mixins: [mpMixin, mixin, props$c], computed: { // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化 // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group) // 拉取父组件新的变化后的参数 parentData() { return [ this.modelValue, this.disabled, this.inactiveColor, this.activeColor, this.size, this.labelDisabled, this.shape, this.iconSize, this.borderBottom, this.placement ]; }, bemClass() { return this.bem("radio-group", ["placement"]); } }, watch: { // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件 parentData() { if (this.children.length) { this.children.map((child) => { typeof child.init === "function" && child.init(); }); } } }, data() { return {}; }, created() { this.children = []; }, emits: ["update:modelValue", "change"], methods: { // 将其他的radio设置为未选中的状态 unCheckedOther(childInstance) { this.children.map((child) => { if (childInstance !== child) { child.checked = false; } }); const { name } = childInstance; this.$emit("update:modelValue", name); this.$emit("change", name); } } }; function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-radio-group", $options.bemClass]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 2 /* CLASS */ ); } const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-cbc8bf70"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]); function pickExclude(obj, keys) { if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) { return {}; } return Object.keys(obj).reduce((prev, key) => { if (!keys.includes(key)) { prev[key] = obj[key]; } return prev; }, {}); } function formatImage(res) { return res.tempFiles.map((item) => ({ ...pickExclude(item, ["path"]), type: "image", url: item.path, thumb: item.path, size: item.size })); } function formatVideo(res) { return [ { ...pickExclude(res, ["tempFilePath", "thumbTempFilePath", "errMsg"]), type: "video", url: res.tempFilePath, thumb: res.thumbTempFilePath, size: res.size } ]; } function chooseFile({ accept, multiple, capture, compressed, maxDuration, sizeType, camera, maxCount }) { return new Promise((resolve, reject2) => { switch (accept) { case "image": uni.chooseImage({ count: multiple ? Math.min(maxCount, 9) : 1, sourceType: capture, sizeType, success: (res) => resolve(formatImage(res)), fail: reject2 }); break; case "video": uni.chooseVideo({ sourceType: capture, compressed, maxDuration, camera, success: (res) => resolve(formatVideo(res)), fail: reject2 }); break; } }); } const mixinUp = { watch: { // 监听accept的变化,判断是否符合个平台要求 // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示 accept: { immediate: true, handler(val) { if (val === "all" || val === "media") { uni.$u.error("只有微信小程序才支持把accept配置为all、media之一"); } if (val === "file") { uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file"); } } } } }; const props$b = { props: { // 接受的文件类型, 可选值为all media image file video accept: { type: String, default: props$y.upload.accept }, // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头 capture: { type: [String, Array], default: props$y.upload.capture }, // 当accept为video时生效,是否压缩视频,默认为true compressed: { type: Boolean, default: props$y.upload.compressed }, // 当accept为video时生效,可选值为back或front camera: { type: String, default: props$y.upload.camera }, // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒 maxDuration: { type: Number, default: props$y.upload.maxDuration }, // 上传区域的图标,只能内置图标 uploadIcon: { type: String, default: props$y.upload.uploadIcon }, // 上传区域的图标的颜色,默认 uploadIconColor: { type: String, default: props$y.upload.uploadIconColor }, // 是否开启文件读取前事件 useBeforeRead: { type: Boolean, default: props$y.upload.useBeforeRead }, // 读取后的处理函数 afterRead: { type: Function, default: null }, // 读取前的处理函数 beforeRead: { type: Function, default: null }, // 是否显示组件自带的图片预览功能 previewFullImage: { type: Boolean, default: props$y.upload.previewFullImage }, // 最大上传数量 maxCount: { type: [String, Number], default: props$y.upload.maxCount }, // 是否启用 disabled: { type: Boolean, default: props$y.upload.disabled }, // 预览上传的图片时的裁剪模式,和image组件mode属性一致 imageMode: { type: String, default: props$y.upload.imageMode }, // 标识符,可以在回调函数的第二项参数中获取 name: { type: String, default: props$y.upload.name }, // 所选的图片的尺寸, 可选值为original compressed sizeType: { type: Array, default: props$y.upload.sizeType }, // 是否开启图片多选,部分安卓机型不支持 multiple: { type: Boolean, default: props$y.upload.multiple }, // 是否展示删除按钮 deletable: { type: Boolean, default: props$y.upload.deletable }, // 文件大小限制,单位为byte maxSize: { type: [String, Number], default: props$y.upload.maxSize }, // 显示已上传的文件列表 fileList: { type: Array, default: props$y.upload.fileList }, // 上传区域的提示文字 uploadText: { type: String, default: props$y.upload.uploadText }, // 内部预览图片区域和选择图片按钮的区域宽度 width: { type: [String, Number], default: props$y.upload.width }, // 内部预览图片区域和选择图片按钮的区域高度 height: { type: [String, Number], default: props$y.upload.height }, // 是否在上传完成后展示预览图 previewImage: { type: Boolean, default: props$y.upload.previewImage } } }; const _sfc_main$1j = { name: "u-upload", mixins: [mpMixin, mixin, mixinUp, props$b], data() { return { lists: [], isInCount: true }; }, watch: { // 监听文件列表的变化,重新整理内部数据 fileList: { immediate: true, handler() { this.formatFileList(); }, immediate: true, deep: true } }, emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"], methods: { formatFileList() { const { fileList = [], maxCount } = this; const lists = fileList.map( (item) => Object.assign(Object.assign({}, item), { // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理 isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb), isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb), deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable }) ); this.lists = lists; this.isInCount = lists.length < maxCount; }, chooseFile() { const { maxCount, multiple, lists, disabled } = this; if (disabled) return; let capture; try { capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(","); } catch (e) { capture = []; } chooseFile( Object.assign({ accept: this.accept, multiple: this.multiple, capture, compressed: this.compressed, maxDuration: this.maxDuration, sizeType: this.sizeType, camera: this.camera }, { maxCount: maxCount - lists.length }) ).then((res) => { this.onBeforeRead(multiple ? res : res[0]); }).catch((error2) => { this.$emit("error", error2); }); }, // 文件读取之前 onBeforeRead(file) { const { beforeRead, useBeforeRead } = this; let res = true; if (uni.$u.test.func(beforeRead)) { res = beforeRead(file, this.getDetail()); } if (useBeforeRead) { res = new Promise((resolve, reject2) => { this.$emit( "beforeRead", Object.assign(Object.assign({ file }, this.getDetail()), { callback: (ok) => { ok ? resolve() : reject2(); } }) ); }); } if (!res) { return; } if (uni.$u.test.promise(res)) { res.then((data) => this.onAfterRead(data || file)); } else { this.onAfterRead(file); } }, getDetail(index2) { return { name: this.name, index: index2 == null ? this.fileList.length : index2 }; }, onAfterRead(file) { const { maxSize, afterRead } = this; const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize; if (oversize) { this.$emit("oversize", Object.assign({ file }, this.getDetail())); return; } if (typeof afterRead === "function") { afterRead(file, this.getDetail()); } this.$emit("afterRead", Object.assign({ file }, this.getDetail())); }, deleteItem(index2) { this.$emit( "delete", Object.assign(Object.assign({}, this.getDetail(index2)), { file: this.fileList[index2] }) ); }, // 预览图片 onPreviewImage(item) { if (!item.isImage || !this.previewFullImage) return; uni.previewImage({ // 先filter找出为图片的item,再返回filter结果中的图片url urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb), current: item.url || item.thumb, fail() { uni.$u.toast("预览图片失败"); } }); }, onPreviewVideo(event) { if (!this.data.previewFullImage) return; const { index: index2 } = event.currentTarget.dataset; const { lists } = this.data; wx.previewMedia({ sources: lists.filter((item) => isVideoFile(item)).map( (item) => Object.assign(Object.assign({}, item), { type: "video" }) ), current: index2, fail() { uni.$u.toast("预览视频失败"); } }); }, onClickPreview(event) { const { index: index2 } = event.currentTarget.dataset; const item = this.data.lists[index2]; this.$emit( "clickPreview", Object.assign(Object.assign({}, item), this.getDetail(index2)) ); } } }; function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-upload", style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]) }, [ vue.createElementVNode("view", { class: "u-upload__wrap" }, [ _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.lists, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-upload__wrap__preview", key: index2 }, [ item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: item.thumb || item.url, mode: _ctx.imageMode, class: "u-upload__wrap__preview__image", onClick: ($event) => $options.onPreviewImage(item), style: vue.normalizeStyle([{ width: _ctx.$u.addUnit(_ctx.width), height: _ctx.$u.addUnit(_ctx.height) }]) }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-upload__wrap__preview__other" }, [ vue.createVNode(_component_u_icon, { color: "#80CBF9", size: "26", name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder" }, null, 8, ["name"]), vue.createElementVNode( "text", { class: "u-upload__wrap__preview__other__text" }, vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"), 1 /* TEXT */ ) ])), item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "u-upload__status" }, [ vue.createElementVNode("view", { class: "u-upload__status__icon" }, [ item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: "close-circle", color: "#ffffff", size: "25" })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 1, size: "22", mode: "circle", color: "#ffffff" })) ]), item.message ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-upload__status__message" }, vue.toDisplayString(item.message), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "u-upload__deletable", onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"]) }, [ vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#ffffff", size: "10" }) ]) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "u-upload__success" }, [ vue.createElementVNode("view", { class: "u-upload__success__icon" }, [ vue.createVNode(_component_u_icon, { name: "checkmark", color: "#ffffff", size: "12" }) ]) ])) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), $data.isInCount ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]), "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "", "hover-stay-time": "150", onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)), style: vue.normalizeStyle([{ width: _ctx.$u.addUnit(_ctx.width), height: _ctx.$u.addUnit(_ctx.height) }]) }, [ vue.createVNode(_component_u_icon, { name: _ctx.uploadIcon, size: "26", color: _ctx.uploadIconColor }, null, 8, ["name", "color"]), _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-upload__button__text" }, vue.toDisplayString(_ctx.uploadText), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 14, ["hover-class"])) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]) ], 4 /* STYLE */ ); } const __easycom_6 = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-c8491d64"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]); const _sfc_main$1i = { data() { return { statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, orderKey: null, patient: null, durations: [ { name: "一周内", disabled: false }, { name: "一个月内", disabled: false }, { name: "半年内", disabled: false }, { name: "半年以上", disabled: false } ], isVisits: [ { name: "未就诊", disabled: false }, { name: "就诊过", disabled: false } ], title: "", isVisit: "就诊过", duration: "一周内", inquiryType: null, orderType: null, doctorId: null, fileList1: [] }; }, onLoad(options) { this.inquiryType = options.inquiryType; this.orderType = options.orderType; this.doctorId = options.doctorId; formatAppLog("log", "at pages_order/inquiryForm1.vue:147", this.inquiryType); formatAppLog("log", "at pages_order/inquiryForm1.vue:148", this.orderType); formatAppLog("log", "at pages_order/inquiryForm1.vue:149", this.doctorId); this.confirm(); }, onShow() { var that = this; uni.$on("refreshOrderPatient", (res) => { that.patient = res; }); }, methods: { leftClick() { formatAppLog("log", "at pages_order/inquiryForm1.vue:160", "leftClick"); uni.showModal({ title: "提示", content: "确认关闭吗", success: function(res) { if (res.confirm) { uni.navigateBack(); } else if (res.cancel) ; } }); }, submitOrder() { if (this.patient == null) { uni.showToast({ icon: "none", title: "请选择就诊人" }); return; } if (this.orderKey == null) { this.confirm(); } var images = []; this.fileList1.forEach(function(element) { images.push(element.url); }); var data = { orderKey: this.orderKey, patientId: this.patient.patientId, title: this.title, isVisit: this.isVisit, duration: this.duration, inquiryType: this.inquiryType, orderType: this.orderType, doctorId: this.doctorId, reportImages: images.toString() }; uni.showLoading({ title: "正在处理中..." }); create(data).then( (res) => { uni.hideLoading(); if (res.code == 200) { var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"]; uni.requestSubscribeMessage({ tmplIds: temps, success(e) { setTimeout(function() { uni.redirectTo({ url: "./inquiryPay?orderId=" + res.order.orderId }); }, 200); }, fail(e) { setTimeout(function() { uni.redirectTo({ url: "./inquiryPay?orderId=" + res.order.orderId }); }, 200); } }); return; } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, confirm() { let data = {}; confirm(data).then( (res) => { if (res.code == 200) { this.orderKey = res.orderKey; } }, (rej) => { } ); }, addPatient() { uni.navigateTo({ url: "/pages_user/patient" }); }, deletePic(event) { this[`fileList${event.name}`].splice(event.index, 1); }, async afterRead(event) { let lists = [].concat(event.file); let fileListLen = this[`fileList${event.name}`].length; lists.map((item) => { this[`fileList${event.name}`].push({ ...item, status: "uploading", message: "上传中" }); }); for (let i = 0; i < lists.length; i++) { const result = await this.uploadFilePromise(lists[i].url); let item = this[`fileList${event.name}`][fileListLen]; this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { status: "success", message: "", url: result })); fileListLen++; } }, uploadFilePromise(url2) { return new Promise((resolve, reject2) => { uni.uploadFile({ url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS", // 仅为示例,非真实的接口地址 filePath: url2, name: "file", formData: { user: "test" }, success: (res) => { setTimeout(() => { formatAppLog("log", "at pages_order/inquiryForm1.vue:288", JSON.parse(res.data).url); resolve(JSON.parse(res.data).url); }, 1e3); } }); }); } } }; function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4); const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3); const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5); const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1); const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2); const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", null, [ vue.createVNode(_component_u_navbar, { title: "症状描述", onLeftClick: $options.leftClick }, null, 8, ["onLeftClick"]) ]), vue.createElementVNode("view", { class: "main" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createVNode(_component_u_alert, { fontSize: "16", type: "primary", description: "尊敬的用户,您好!\r\n 为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!" }), vue.createElementVNode("view", { class: "chose-patient" }, [ $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "title-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("text", { class: "title" }, "选择就诊人"), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("text", { class: "value" }, "请点击添加"), vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "patient", onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString($data.patient.patientName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info" }, [ $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "男")) : vue.createCommentVNode("v-if", true), $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "女")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "red-dot" }, "*"), vue.createElementVNode("view", { class: "title" }, "请描述您的病情") ]), vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [ vue.createVNode(_component_u__textarea, { maxlength: "500", modelValue: $data.title, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.title = $event), placeholder: "请输入内容", count: "" }, null, 8, ["modelValue"]) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "red-dot" }, "*"), vue.createElementVNode("view", { class: "title" }, "本次患病多久了?") ]), vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [ vue.createVNode(_component_u_radio_group, { modelValue: $data.duration, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.duration = $event), iconPlacement: "left" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.durations, (item, index2) => { return vue.openBlock(), vue.createBlock(_component_u_radio, { customStyle: { marginRight: "5px" }, key: index2, label: item.name, name: item.name, activeColor: "#C39A58" }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "red-dot" }, "*"), vue.createElementVNode("view", { class: "title" }, "此次病情是否去医院就诊过?") ]), vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [ vue.createVNode(_component_u_radio_group, { modelValue: $data.isVisit, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.isVisit = $event), iconPlacement: "left" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.isVisits, (item, index2) => { return vue.openBlock(), vue.createBlock(_component_u_radio, { customStyle: { marginRight: "5px" }, key: index2, label: item.name, name: item.name, activeColor: "#C39A58" }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title" }, "上传检测报告或患处照片?") ]), vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [ vue.createVNode(_component_u_upload, { fileList: $data.fileList1, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "1", maxCount: 5 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[5] || (_cache[5] = ($event) => $options.submitOrder()) }, "提交订单") ]) ]); } const Pages_orderInquiryForm1 = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-83d3b7af"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryForm1.vue"]]); const props$a = { props: { // 绑定的值 modelValue: { type: [String, Number], default: props$y.input.value }, // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数 // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序 // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序 // text-文本输入键盘 type: { type: String, default: props$y.input.type }, // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true, // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序 fixed: { type: Boolean, default: props$y.input.fixed }, // 是否禁用输入框 disabled: { type: Boolean, default: props$y.input.disabled }, // 禁用状态时的背景色 disabledColor: { type: String, default: props$y.input.disabledColor }, // 是否显示清除控件 clearable: { type: Boolean, default: props$y.input.clearable }, // 是否密码类型 password: { type: Boolean, default: props$y.input.password }, // 最大输入长度,设置为 -1 的时候不限制最大长度 maxlength: { type: [String, Number], default: props$y.input.maxlength }, // 输入框为空时的占位符 placeholder: { type: String, default: props$y.input.placeholder }, // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ placeholderClass: { type: String, default: props$y.input.placeholderClass }, // 指定placeholder的样式 placeholderStyle: { type: [String, Object], default: props$y.input.placeholderStyle }, // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效 showWordLimit: { type: Boolean, default: props$y.input.showWordLimit }, // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档 // https://uniapp.dcloud.io/component/input // https://uniapp.dcloud.io/component/textarea confirmType: { type: String, default: props$y.input.confirmType }, // 点击键盘右下角按钮时是否保持键盘不收起,H5无效 confirmHold: { type: Boolean, default: props$y.input.confirmHold }, // focus时,点击页面的时候不收起键盘,微信小程序有效 holdKeyboard: { type: Boolean, default: props$y.input.holdKeyboard }, // 自动获取焦点 // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点 focus: { type: Boolean, default: props$y.input.focus }, // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效 autoBlur: { type: Boolean, default: props$y.input.autoBlur }, // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效 disableDefaultPadding: { type: Boolean, default: props$y.input.disableDefaultPadding }, // 指定focus时光标的位置 cursor: { type: [String, Number], default: props$y.input.cursor }, // 输入框聚焦时底部与键盘的距离 cursorSpacing: { type: [String, Number], default: props$y.input.cursorSpacing }, // 光标起始位置,自动聚集时有效,需与selection-end搭配使用 selectionStart: { type: [String, Number], default: props$y.input.selectionStart }, // 光标结束位置,自动聚集时有效,需与selection-start搭配使用 selectionEnd: { type: [String, Number], default: props$y.input.selectionEnd }, // 键盘弹起时,是否自动上推页面 adjustPosition: { type: Boolean, default: props$y.input.adjustPosition }, // 输入框内容对齐方式,可选值为:left|center|right inputAlign: { type: String, default: props$y.input.inputAlign }, // 输入框字体的大小 fontSize: { type: [String, Number], default: props$y.input.fontSize }, // 输入框字体颜色 color: { type: String, default: props$y.input.color }, // 输入框前置图标 prefixIcon: { type: String, default: props$y.input.prefixIcon }, // 前置图标样式,对象或字符串 prefixIconStyle: { type: [String, Object], default: props$y.input.prefixIconStyle }, // 输入框后置图标 suffixIcon: { type: String, default: props$y.input.suffixIcon }, // 后置图标样式,对象或字符串 suffixIconStyle: { type: [String, Object], default: props$y.input.suffixIconStyle }, // 边框类型,surround-四周边框,bottom-底部边框,none-无边框 border: { type: String, default: props$y.input.border }, // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会 readonly: { type: Boolean, default: props$y.input.readonly }, // 输入框形状,circle-圆形,square-方形 shape: { type: String, default: props$y.input.shape }, // 用于处理或者过滤输入框内容的方法 formatter: { type: [Function, null], default: props$y.input.formatter }, // 是否忽略组件内对文本合成系统事件的处理 ignoreCompositionEvent: { type: Boolean, default: true } } }; const _sfc_main$1h = { name: "u-input", mixins: [mpMixin, mixin, props$a], data() { return { // 输入框的值 innerValue: "", // 是否处于获得焦点状态 focused: false, // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化 firstChange: true, // value绑定值的变化是由内部还是外部引起的 changeFromInner: false, // 过滤处理方法 innerFormatter: (value2) => value2 }; }, watch: { modelValue: { immediate: true, handler(newVal, oldVal) { this.innerValue = newVal; this.firstChange = false; this.changeFromInner = false; } } }, 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(["u-border", "u-input--radius"])); classes.push(`u-input--${shape}`); border === "bottom" && (classes = classes.concat([ "u-border-bottom", "u-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 uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); }, // 输入框的样式 inputStyle() { const style = { color: this.color, fontSize: uni.$u.addUnit(this.fontSize), textAlign: this.inputAlign }; return style; } }, emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"], 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); uni.$u.sleep(50).then(() => { this.focused = false; }); uni.$u.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() { this.$emit("keyboardheightchange"); }, // 内容发生变化,进行处理 valueChange() { const value2 = this.innerValue; this.$nextTick(() => { this.$emit("update:modelValue", value2); this.changeFromInner = true; this.$emit("change", value2); uni.$u.formValidate(this, "change"); }); }, // 点击清除控件 onClear() { this.innerValue = ""; this.$nextTick(() => { this.valueChange(); this.$emit("clear"); }); }, /** * 在安卓nvue上,事件无法冒泡 * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后 * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发 */ clickHandler() { } } }; function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-input", $options.inputClass]), style: vue.normalizeStyle([$options.wrapperStyle]) }, [ vue.createElementVNode("view", { class: "u-input__content" }, [ _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-input__content__prefix-icon" }, [ vue.renderSlot(_ctx.$slots, "prefix", {}, () => [ vue.createVNode(_component_u_icon, { name: _ctx.prefixIcon, size: "18", customStyle: _ctx.prefixIconStyle }, null, 8, ["name", "customStyle"]) ], true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-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均失效,此时\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\n "), vue.createElementVNode("input", { class: "u-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: 1, class: "u-input__content__clear", onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args)) }, [ vue.createVNode(_component_u_icon, { name: "close", size: "11", color: "#ffffff", customStyle: "line-height: 12px" }) ])) : vue.createCommentVNode("v-if", true), _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "u-input__content__subfix-icon" }, [ vue.renderSlot(_ctx.$slots, "suffix", {}, () => [ vue.createVNode(_component_u_icon, { name: _ctx.suffixIcon, size: "18", customStyle: _ctx.suffixIconStyle }, null, 8, ["name", "customStyle"]) ], true) ])) : vue.createCommentVNode("v-if", true) ]) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-df79975b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-input/u-input.vue"]]); const props$9 = { props: { // input的label提示语 label: { type: String, default: props$y.formItem.label }, // 绑定的值 prop: { type: String, default: props$y.formItem.prop }, // 是否显示表单域的下划线边框 borderBottom: { type: [String, Boolean], default: props$y.formItem.borderBottom }, // label的宽度,单位px labelWidth: { type: [String, Number], default: props$y.formItem.labelWidth }, // 右侧图标 rightIcon: { type: String, default: props$y.formItem.rightIcon }, // 左侧图标 leftIcon: { type: String, default: props$y.formItem.leftIcon }, // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置 required: { type: Boolean, default: props$y.formItem.required }, leftIconStyle: { type: [String, Object], default: props$y.formItem.leftIconStyle } } }; const _sfc_main$1g = { name: "u-form-item", mixins: [mpMixin, mixin, props$9], data() { return { // 错误提示语 message: "", parentData: { // 提示文本的位置 labelPosition: "left", // 提示文本对齐方式 labelAlign: "left", // 提示文本的样式 labelStyle: {}, // 提示文本的宽度 labelWidth: 45, // 错误提示方式 errorType: "message" } }; }, // 组件创建完成时,将当前实例保存到u-form中 computed: { propsLine() { return uni.$u.props.line; } }, mounted() { this.init(); }, methods: { init() { this.updateParentData(); if (!this.parent) { uni.$u.error("u-form-item需要结合u-form组件使用"); } }, // 获取父组件的参数 updateParentData() { this.getParentData("u-form"); }, // 移除u-form-item的校验结果 clearValidate() { this.message = null; }, // 清空当前的组件的校验结果,并重置为初始值 resetField() { const value2 = uni.$u.getProperty(this.parent.originalModel, this.prop); uni.$u.setProperty(this.parent.model, this.prop, value2); this.message = null; }, // 点击组件 clickHandler() { this.$emit("click"); } } }; function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$5); return vue.openBlock(), vue.createElementBlock("view", { class: "u-form-item" }, [ vue.createElementVNode( "view", { class: "u-form-item__body", onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)), style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), { flexDirection: $data.parentData.labelPosition === "left" ? "row" : "column" }]) }, [ vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '), vue.renderSlot(_ctx.$slots, "label", {}, () => [ vue.createCommentVNode(" {{required}} "), _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-form-item__body__left", style: vue.normalizeStyle({ width: _ctx.$u.addUnit(_ctx.labelWidth || $data.parentData.labelWidth), marginBottom: $data.parentData.labelPosition === "left" ? 0 : "5px" }) }, [ vue.createCommentVNode(" 为了块对齐 "), vue.createElementVNode("view", { class: "u-form-item__body__left__content" }, [ vue.createCommentVNode(" nvue不支持伪元素before "), _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "u-form-item__body__left__content__required" }, "*")) : vue.createCommentVNode("v-if", true), _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-form-item__body__left__content__icon" }, [ vue.createVNode(_component_u_icon, { name: _ctx.leftIcon, "custom-style": _ctx.leftIconStyle }, null, 8, ["name", "custom-style"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "u-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: "u-form-item__body__right" }, [ vue.createElementVNode("view", { class: "u-form-item__body__right__content" }, [ vue.createElementVNode("view", { class: "u-form-item__body__right__content__slot" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "item__body__right__content__icon" }, [ vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true) ]) ]) ], 4 /* STYLE */ ), vue.renderSlot(_ctx.$slots, "error", {}, () => [ !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-form-item__body__right__message", style: vue.normalizeStyle({ marginLeft: _ctx.$u.addUnit($data.parentData.labelPosition === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth) }) }, vue.toDisplayString($data.message), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], true), _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0, color: $data.message && $data.parentData.errorType === "border-bottom" ? _ctx.$u.color.error : $options.propsLine.color, customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}` }, null, 8, ["color", "customStyle"])) : vue.createCommentVNode("v-if", true) ]); } const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-42bac3de"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]); const props$8 = { props: { // 背景颜色(默认transparent) bgColor: { type: String, default: props$y.gap.bgColor }, // 分割槽高度,单位px(默认30) height: { type: [String, Number], default: props$y.gap.height }, // 与上一个组件的距离 marginTop: { type: [String, Number], default: props$y.gap.marginTop }, // 与下一个组件的距离 marginBottom: { type: [String, Number], default: props$y.gap.marginBottom } } }; const _sfc_main$1f = { name: "u-gap", mixins: [mpMixin, mixin, props$8], computed: { gapStyle() { const style = { backgroundColor: this.bgColor, height: uni.$u.addUnit(this.height), marginTop: uni.$u.addUnit(this.marginTop), marginBottom: uni.$u.addUnit(this.marginBottom) }; return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } } }; function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-gap", style: vue.normalizeStyle([$options.gapStyle]) }, null, 4 /* STYLE */ ); } const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-6fe44ee6"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-gap/u-gap.vue"]]); const props$7 = { props: { // 操作菜单是否展示 (默认false) show: { type: Boolean, default: props$y.actionSheet.show }, // 标题 title: { type: String, default: props$y.actionSheet.title }, // 选项上方的描述信息 description: { type: String, default: props$y.actionSheet.description }, // 数据 actions: { type: Array, default: props$y.actionSheet.actions }, // 取消按钮的文字,不为空时显示按钮 cancelText: { type: String, default: props$y.actionSheet.cancelText }, // 点击某个菜单项时是否关闭弹窗 closeOnClickAction: { type: Boolean, default: props$y.actionSheet.closeOnClickAction }, // 处理底部安全区(默认true) safeAreaInsetBottom: { type: Boolean, default: props$y.actionSheet.safeAreaInsetBottom }, // 小程序的打开方式 openType: { type: String, default: props$y.actionSheet.openType }, // 点击遮罩是否允许关闭 (默认true) closeOnClickOverlay: { type: Boolean, default: props$y.actionSheet.closeOnClickOverlay }, // 圆角值 round: { type: [Boolean, String, Number], default: props$y.actionSheet.round } } }; const _sfc_main$1e = { name: "u-action-sheet", // 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到 mixins: [openType, button, mixin, props$7], data() { return {}; }, computed: { // 操作项目的样式 itemStyle() { return (index2) => { let style = {}; if (this.actions[index2].color) style.color = this.actions[index2].color; if (this.actions[index2].fontSize) style.fontSize = uni.$u.addUnit(this.actions[index2].fontSize); if (this.actions[index2].disabled) style.color = "#c0c4cc"; return style; }; } }, methods: { closeHandler() { if (this.closeOnClickOverlay) { this.$emit("close"); } }, // 点击取消按钮 cancel() { this.$emit("close"); }, selectHandler(index2) { const item = this.actions[index2]; if (item && !item.disabled && !item.loading) { this.$emit("select", item); if (this.closeOnClickAction) { this.$emit("close"); } } } } }; function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$5); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f); const _component_u_gap = resolveEasycom(vue.resolveDynamicComponent("u-gap"), __easycom_3$1); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); return vue.openBlock(), vue.createBlock(_component_u_popup, { show: _ctx.show, mode: "bottom", onClose: $options.closeHandler, safeAreaInsetBottom: _ctx.safeAreaInsetBottom, round: _ctx.round }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-action-sheet" }, [ _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-action-sheet__header" }, [ vue.createElementVNode( "text", { class: "u-action-sheet__header__title u-line-1" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "u-action-sheet__header__icon-wrap", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.cancel && $options.cancel(...args), ["stop"])) }, [ vue.createVNode(_component_u_icon, { name: "close", size: "17", color: "#c8c9cc", bold: "" }) ]) ])) : vue.createCommentVNode("v-if", true), _ctx.description ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-action-sheet__description", style: vue.normalizeStyle([{ marginTop: `${_ctx.title && _ctx.description ? 0 : "18px"}` }]) }, vue.toDisplayString(_ctx.description), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, () => [ _ctx.description ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-action-sheet__item-wrap" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.actions, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ vue.createElementVNode("view", { class: "u-action-sheet__item-wrap__item", onClick: vue.withModifiers(($event) => $options.selectHandler(index2), ["stop"]), "hover-class": !item.disabled && !item.loading ? "u-action-sheet--hover" : "", "hover-stay-time": 150 }, [ !item.loading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "text", { class: "u-action-sheet__item-wrap__item__name", style: vue.normalizeStyle([$options.itemStyle(index2)]) }, vue.toDisplayString(item.name), 5 /* TEXT, STYLE */ ), item.subname ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-action-sheet__item-wrap__item__subname" }, vue.toDisplayString(item.subname), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 1, "custom-class": "van-action-sheet__loading", size: "18", mode: "circle" })) ], 8, ["onClick", "hover-class"]), index2 !== _ctx.actions.length - 1 ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], true), _ctx.cancelText ? (vue.openBlock(), vue.createBlock(_component_u_gap, { key: 2, bgColor: "#eaeaec", height: "6" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { "hover-class": "u-action-sheet--hover" }, [ _ctx.cancelText ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => { }, ["stop", "prevent"])), "hover-stay-time": 150, class: "u-action-sheet__cancel-text", onClick: _cache[2] || (_cache[2] = (...args) => $options.cancel && $options.cancel(...args)) }, vue.toDisplayString(_ctx.cancelText), 33 /* TEXT, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true) ]) ]) ]), _: 3 /* FORWARDED */ }, 8, ["show", "onClose", "safeAreaInsetBottom", "round"]); } const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-69669810"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue"]]); const props$6 = { props: { // 当前form的需要验证字段的集合 model: { type: Object, default: props$y.form.model }, // 验证规则 rules: { type: [Object, Function, Array], default: props$y.form.rules }, // 有错误时的提示方式,message-提示信息,toast-进行toast提示 // border-bottom-下边框呈现红色,none-无提示 errorType: { type: String, default: props$y.form.errorType }, // 是否显示表单域的下划线边框 borderBottom: { type: Boolean, default: props$y.form.borderBottom }, // label的位置,left-左边,top-上边 labelPosition: { type: String, default: props$y.form.labelPosition }, // label的宽度,单位px labelWidth: { type: [String, Number], default: props$y.form.labelWidth }, // lable字体的对齐方式 labelAlign: { type: String, default: props$y.form.labelAlign }, // lable的样式,对象形式 labelStyle: { type: Object, default: props$y.form.labelStyle } } }; var define_process_env_default = {}; const formatRegExp = /%[sdj%]/g; let warning = function warning2() { }; if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") { warning = function warning3(type2, errors) { if (typeof console !== "undefined" && console.warn) { if (errors.every((e) => typeof e === "string")) { formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.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() { 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, reject2) => { const next = function next2(errors) { callback(errors); return errors.length ? reject2({ 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, reject2) => { const next = function next2(errors) { results.push.apply(results, errors); total++; if (total === objArrLength) { callback(results); return results.length ? reject2({ 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$2(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(options.messages.required, rule.fullField)); } } function whitespace(rule, value2, source, errors, options) { if (/^\s+$/.test(value2) || value2 === "") { errors.push(format(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 integer(value2) { return /^(-)?\d+$/.test(value2); }, float: function float(value2) { return /^(-)?\d+(\.\d+)?$/.test(value2); }, array: function array3(value2) { return Array.isArray(value2); }, regexp: function regexp(value2) { if (value2 instanceof RegExp) { return true; } try { return !!new RegExp(value2); } catch (e) { return false; } }, date: function date3(value2) { return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function"; }, number: function number3(value2) { if (isNaN(value2)) { return false; } return typeof +value2 === "number"; }, object: function object3(value2) { return typeof value2 === "object" && !types.array(value2); }, method: function method(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(options.messages.types[ruleType], rule.fullField, rule.type)); } } else if (ruleType && typeof value2 !== rule.type) { errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); } } function range$2(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(options.messages[key].len, rule.fullField, rule.len)); } } else if (min && !max && val < rule.min) { errors.push(format(options.messages[key].min, rule.fullField, rule.min)); } else if (max && !min && val > rule.max) { errors.push(format(options.messages[key].max, rule.fullField, rule.max)); } else if (min && max && (val < rule.min || val > rule.max)) { errors.push(format(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(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(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(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern)); } } } } const rules = { required, whitespace, type, range: range$2, enum: enumerable, pattern: pattern$1 }; function string$1(rule, value2, callback, source, options) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 method2(rule, value2, callback, source, options) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 number2(rule, value2, callback, source, options) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 regexp2(rule, value2, callback, source, options) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 integer2(rule, value2, callback, source, options) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 array2(rule, value2, callback, source, options) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 object2(rule, value2, callback, source, options) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 date2(rule, value2, callback, source, options) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { 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 validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options); } callback(errors); } const validators = { string: string$1, method: method2, number: number2, boolean: _boolean, regexp: regexp2, integer: integer2, float: floatFn, array: array2, object: object2, enum: enumerable$1, pattern: pattern$2, date: date2, 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 clone2() { const cloned = JSON.parse(JSON.stringify(this)); cloned.clone = this.clone; return cloned; } }; } const messages = newMessages(); function Schema(descriptor) { this.rules = null; this._messages = messages; this.define(descriptor); } Schema.prototype = { messages: function messages2(_messages) { if (_messages) { this._messages = deepMerge$2(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 = this.messages(); if (messages$1 === messages) { messages$1 = newMessages(); } deepMerge$2(messages$1, options.messages); options.messages = messages$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(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("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 register(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; Schema.warning = function() { }; const _sfc_main$1d = { name: "u-form", mixins: [mpMixin, mixin, props$6], provide() { return { uForm: this }; }, data() { return { formRules: {}, // 规则校验器 validator: {}, // 原始的model快照,用于resetFields方法重置表单时使用 originalModel: null }; }, watch: { // 监听规则的变化 rules: { immediate: true, handler(n) { this.setRules(n); } }, // 监听属性的变化,通知子组件u-form-item重新获取信息 propsChange(n) { 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(n) { if (!this.originalModel) { this.originalModel = uni.$u.deepClone(n); } } } }, 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) { uni.$u.error("设置rules,model必须设置!如果已经设置,请刷新页面。"); return; } this.formRules = rules2; this.validator = new Schema(rules2); }, // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法 resetFields() { this.resetModel(); }, // 重置model为初始值的快照 resetModel(obj) { this.children.map((child) => { const prop = child == null ? void 0 : child.prop; const value2 = uni.$u.getProperty(this.originalModel, prop); uni.$u.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 = uni.$u.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) => { var _a; if (uni.$u.test.array(errors)) { errorsRes.push(...errors); childErrors.push(...errors); } child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ?? null; } ); } } }); typeof callback === "function" && callback(errorsRes); }); }, // 校验全部数据 validate(callback) { if (Object.keys(this.formRules).length === 0) { uni.$u.error("未设置rules,请看文档说明!如果已经设置,请刷新页面。"); return; } return new Promise((resolve, reject2) => { this.$nextTick(() => { const formItemProps = this.children.map( (item) => item.prop ); this.validateField(formItemProps, (errors) => { if (errors.length) { this.errorType === "toast" && uni.$u.toast(errors[0].message); reject2(errors); } else { resolve(true); } }); }); }); } } }; function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [ vue.renderSlot(_ctx.$slots, "default") ]); } const __easycom_7 = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-form/u-form.vue"]]); const _sfc_main$1c = { data() { return { companyId: null, companyUserId: null, statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, temps: [], usageShow: false, usages: [ { name: "图文问诊" }, { name: "语音问诊" } ], orderKey: null, patient: null, inquiryType: null, inquirySubType: null, orderType: null, fileList1: [], fileList2: [], fileList3: [], form: { title: "" }, rules: { height: [ { required: true, message: "请输入身高", // 可以单个或者同时写两个触发验证方式 trigger: ["change", "blur"] } ], weight: [ { required: true, message: "请输入体重", // 可以单个或者同时写两个触发验证方式 trigger: ["change", "blur"] } ], mobile: [ { required: true, message: "请输入联系电话", // 可以单个或者同时写两个触发验证方式 trigger: ["change", "blur"] } ] } }; }, onLoad(options) { if (!this.$isEmpty(options.isShare)) { this.isShare = options.isShare; } else { uni.hideShareMenu(); } if (!this.$isEmpty(options.companyId)) { this.companyId = options.companyId; } if (!this.$isEmpty(options.companyUserId)) { this.companyUserId = options.companyUserId; } formatAppLog("log", "at pages_order/inquiryForm2_1.vue:349", this.companyId); formatAppLog("log", "at pages_order/inquiryForm2_1.vue:350", this.companyUserId); this.inquiryType = options.inquiryType; this.inquirySubType = options.inquirySubType; this.orderType = options.orderType; }, onReady() { this.$refs.uForm.setRules(this.rules); }, onShow() { if (this.$isLogin()) { if (!this.$isEmpty(this.companyUserId)) { let data = { companyUserId: this.companyUserId }; bindCompanyUser(data).then( (res) => { if (res.code == 200) ; }, (rej) => { } ); } } var that = this; uni.$on("refreshOrderPatient", (res) => { that.patient = res; }); this.confirm(); }, onShareAppMessage(res) { uni.showShareMenu({ withShareTicket: true }); wx.updateShareMenu({ isPrivateMessage: true, withShareTicket: true, success(res2) { formatAppLog("log", "at pages_order/inquiryForm2_1.vue:388", "updateShareMenu: ", res2); }, fail() { } }); return { title: "御君方互联网医院--健康会诊", path: "/pages_order/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType=" + this.inquirySubType + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId }; }, methods: { showImg(type2) { if (type2 == 1) { var imgs = [ "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0640bd4b80ba4491842b9d20d7238616.png" ]; uni.previewImage({ current: 0, urls: imgs }); } else if (type2 == 2) { var imgs = [ "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/2c9f24e5c3fc458f8bcb30a4fb0619be.png" ]; uni.previewImage({ current: 0, urls: imgs }); } }, leftClick() { formatAppLog("log", "at pages_order/inquiryForm2_1.vue:422", "leftClick"); uni.showModal({ title: "提示", content: "确认关闭吗", success: function(res) { if (res.confirm) { uni.navigateBack(); } else if (res.cancel) ; } }); }, confirm() { let data = {}; confirm(data).then( (res) => { if (res.code == 200) { this.orderKey = res.orderKey; } }, (rej) => { } ); }, usageSelect(e) { this.form.usage = e.name; this.$refs.uForm.validateField("usage"); }, submitOrder() { if (this.patient == null) { uni.showToast({ icon: "none", title: "请选择就诊人" }); return; } if (this.orderKey == null) { this.confirm(); } var reportImages = []; this.fileList3.forEach(function(element) { reportImages.push(element.url); }); var tongueImages = []; this.fileList1.forEach(function(element) { tongueImages.push(element.url); }); var faceImages = []; this.fileList2.forEach(function(element) { faceImages.push(element.url); }); var that = this; this.$refs.uForm.validate().then((res) => { var data = { companyId: that.companyId, companyUserId: that.companyUserId, orderKey: that.orderKey, patientId: that.patient.patientId, title: that.form.title, inquiryType: that.inquiryType, inquirySubType: that.inquirySubType, orderType: that.orderType, doctorId: that.doctorId, height: that.form.height, weight: that.form.weight, mobile: that.form.mobile, // study:that.form.study, medication: that.form.medication, usage: that.form.usage, reportImages: reportImages.toString(), tongueImages: tongueImages.toString(), faceImages: faceImages.toString() // formJson:JSON.stringify(forms) }; uni.showLoading({ title: "正在处理中..." }); create(data).then( (res2) => { uni.hideLoading(); if (res2.code == 200) { var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"]; uni.requestSubscribeMessage({ tmplIds: temps, success(e) { setTimeout(function() { uni.redirectTo({ url: "./inquiryPay?orderId=" + res2.order.orderId }); }, 200); }, fail(e) { setTimeout(function() { uni.redirectTo({ url: "./inquiryPay?orderId=" + res2.order.orderId }); }, 200); } }); return; } else { uni.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { } ); }).catch((errors) => { }); }, // getInquiryTemp(){ // let data = {}; // getInquiryTemp(data).then( // res => { // if(res.code==200){ // this.temps=res.data; // this.temps.forEach(function(element) { // element.options=JSON.parse(element.itemJson) // }); // // this.temps1=temps.filter((item) => { // // return item.tempType==1; // // }); // // this.temps2=temps.filter((item) => { // // return item.tempType==2; // // }); // // this.temps3=temps.filter((item) => { // // return item.tempType==3; // // }); // // this.temps4=temps.filter((item) => { // // return item.tempType==4; // // }); // __f__('log','at pages_order/inquiryForm2_1.vue:566',this.temps1) // } // }, // rej => {} // ); // }, addPatient() { uni.navigateTo({ url: "/pages_user/patient" }); }, deletePic(event) { this[`fileList${event.name}`].splice(event.index, 1); }, async afterRead(event) { let lists = [].concat(event.file); let fileListLen = this[`fileList${event.name}`].length; lists.map((item) => { this[`fileList${event.name}`].push({ ...item, status: "uploading", message: "上传中" }); }); for (let i = 0; i < lists.length; i++) { const result = await this.uploadFilePromise(lists[i].url); let item = this[`fileList${event.name}`][fileListLen]; this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { status: "success", message: "", url: result })); fileListLen++; } }, uploadFilePromise(url2) { return new Promise((resolve, reject2) => { uni.uploadFile({ url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS", // 仅为示例,非真实的接口地址 filePath: url2, name: "file", formData: { user: "test" }, success: (res) => { setTimeout(() => { formatAppLog("log", "at pages_order/inquiryForm2_1.vue:613", JSON.parse(res.data).url); resolve(JSON.parse(res.data).url); }, 1e3); } }); }); } } }; function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4); const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3); const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$2); const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1); const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5); const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_2$1); const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6); const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_7); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", null, [ vue.createVNode(_component_u_navbar, { title: "症状描述", onLeftClick: $options.leftClick }, null, 8, ["onLeftClick"]) ]), vue.createElementVNode("view", { class: "main" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createVNode(_component_u_alert, { fontSize: "16", type: "primary", description: "尊敬的用户,您好!\r\n 为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!" }), vue.createElementVNode("view", { class: "chose-patient" }, [ $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "title-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("text", { class: "title" }, "选择就诊人"), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("text", { class: "value" }, "请点击添加"), vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "patient", onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString($data.patient.patientName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info" }, [ $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "男")) : vue.createCommentVNode("v-if", true), $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "女")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "cont" }, [ vue.createVNode(_component_u_form, { rules: $data.rules, model: $data.form, ref: "uForm", labelPosition: "left" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "您的基本情况填写") ]), vue.createElementVNode("view", { class: "form" }, [ vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", borderBottom: "", label: "身高(厘米)", prop: "height" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { type: "number", border: "none", placeholder: "请输入身高", modelValue: $data.form.height, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.height = $event) }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", borderBottom: "", label: "体重(公斤)", prop: "weight" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { type: "number", border: "none", placeholder: "请输入体重", modelValue: $data.form.weight, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.weight = $event) }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", maxlength: "11", borderBottom: "", label: "联系电话", prop: "mobile" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { type: "number", border: "none", placeholder: "请输入电话", modelValue: $data.form.mobile, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.form.mobile = $event) }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(' \r\n \r\n '), vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", borderBottom: "", label: "用药情况", prop: "medication" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u__textarea, { modelValue: $data.form.medication, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.medication = $event), placeholder: "请输入用药情况", count: "" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { required: true, onClick: _cache[7] || (_cache[7] = ($event) => { $data.usageShow = true; }), labelWidth: "200rpx", label: "期望会诊方式", prop: "usage" }, { right: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "arrow-right" }) ]), default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { modelValue: $data.form.usage, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.form.usage = $event), disabled: "", disabledColor: "#ffffff", placeholder: "请选择", border: "none" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_action_sheet, { show: $data.usageShow, actions: $data.usages, title: "请选择", onClose: _cache[8] || (_cache[8] = ($event) => $data.usageShow = false), onSelect: $options.usageSelect }, null, 8, ["show", "actions", "onSelect"]) ]), vue.createCommentVNode(' \r\n \r\n 您的头面部健康状况自我检查\r\n \r\n \r\n \r\n \r\n {{index+1}} {{item.title}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 您的四肢肩颈健康状况自我检查\r\n \r\n \r\n \r\n \r\n {{index+1}} {{item.title}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 您的胸腹部健康状况自我检查\r\n \r\n \r\n \r\n \r\n {{index+1}} {{item.title}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 其他身体状况自我检查\r\n \r\n \r\n \r\n \r\n {{index+1}} {{item.title}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n '), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "补充信息") ]), vue.createElementVNode("view", { class: "form" }, [ vue.createVNode(_component_u_form_item, { labelWidth: "140rpx", borderBottom: "", label: "舌苔照片", prop: "avatar" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("image", { onClick: _cache[9] || (_cache[9] = ($event) => $options.showImg(1)), class: "icon", src: "/static/images/question.png" }), vue.createVNode(_component_u_upload, { fileList: $data.fileList1, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "1", multiple: "", maxCount: 4 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "140rpx", borderBottom: "", label: "面部照片", prop: "avatar" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("image", { onClick: _cache[10] || (_cache[10] = ($event) => $options.showImg(2)), class: "icon", src: "/static/images/question.png" }), vue.createVNode(_component_u_upload, { fileList: $data.fileList2, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "2", multiple: "", maxCount: 4 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "140rpx", borderBottom: "", label: "相关报告", prop: "avatar" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("view", { class: "icon" }), vue.createVNode(_component_u_upload, { fileList: $data.fileList3, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "3", multiple: "", maxCount: 4 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", label: "您最想咨询医生的问题是什么?", prop: "title" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u__textarea, { modelValue: $data.form.title, "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.form.title = $event), placeholder: "请输入内容", count: "" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }) ]) ]), _: 1 /* STABLE */ }, 8, ["rules", "model"]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[12] || (_cache[12] = ($event) => $options.submitOrder()) }, "预约会诊") ]) ]); } const Pages_orderInquiryForm2_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-a4f9ba6d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryForm2_1.vue"]]); const props$5 = { props: { // checkbox的名称 name: { type: [String, Number, Boolean], default: props$y.checkbox.name }, // 形状,square为方形,circle为圆型 shape: { type: String, default: props$y.checkbox.shape }, // 整体的大小 size: { type: [String, Number], default: props$y.checkbox.size }, // 是否默认选中 checked: { type: Boolean, default: props$y.checkbox.checked }, // 是否禁用 disabled: { type: [String, Boolean], default: props$y.checkbox.disabled }, // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 activeColor: { type: String, default: props$y.checkbox.activeColor }, // 未选中的颜色 inactiveColor: { type: String, default: props$y.checkbox.inactiveColor }, // 图标的大小,单位px iconSize: { type: [String, Number], default: props$y.checkbox.iconSize }, // 图标颜色 iconColor: { type: String, default: props$y.checkbox.iconColor }, // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式 label: { type: [String, Number], default: props$y.checkbox.label }, // label的字体大小,px单位 labelSize: { type: [String, Number], default: props$y.checkbox.labelSize }, // label的颜色 labelColor: { type: String, default: props$y.checkbox.labelColor }, // 是否禁止点击提示语选中复选框 labelDisabled: { type: [String, Boolean], default: props$y.checkbox.labelDisabled } } }; const _sfc_main$1b = { name: "u-checkbox", mixins: [mpMixin, mixin, props$5], data() { return { isChecked: false, // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式 // 故只能使用如此方法 parentData: { iconSize: 12, labelDisabled: null, disabled: null, shape: "square", activeColor: null, inactiveColor: null, size: 18, modelValue: null, iconColor: null, placement: "row", borderBottom: false, iconPlacement: "left" } }; }, computed: { // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置 elDisabled() { return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false; }, // 是否禁用label点击 elLabelDisabled() { return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false; }, // 组件尺寸,对应size的值,默认值为21px elSize() { return this.size ? this.size : this.parentData.size ? this.parentData.size : 21; }, // 组件的勾选图标的尺寸,默认12px elIconSize() { return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12; }, // 组件选中激活时的颜色 elActiveColor() { return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff"; }, // 组件选未中激活时的颜色 elInactiveColor() { return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc"; }, // label的颜色 elLabelColor() { return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266"; }, // 组件的形状 elShape() { return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle"; }, // label大小 elLabelSize() { return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15"); }, elIconColor() { const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff"; if (this.elDisabled) { return this.isChecked ? this.elInactiveColor : "transparent"; } else { return this.isChecked ? iconColor : "transparent"; } }, iconClasses() { let classes = []; classes.push("u-checkbox__icon-wrap--" + this.elShape); if (this.elDisabled) { classes.push("u-checkbox__icon-wrap--disabled"); } if (this.isChecked && this.elDisabled) { classes.push("u-checkbox__icon-wrap--disabled--checked"); } return classes; }, iconWrapStyle() { const style = {}; style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : "#ffffff"; style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor; style.width = uni.$u.addUnit(this.elSize); style.height = uni.$u.addUnit(this.elSize); if (this.parentData.iconPlacement === "right") { style.marginRight = 0; } return style; }, checkboxStyle() { const style = {}; if (this.parentData.borderBottom && this.parentData.placement === "row") { uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-checkbox-group的placement设置为column才有效"); } if (this.parentData.borderBottom && this.parentData.placement === "column") { style.paddingBottom = "8px"; } return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } }, mounted() { this.init(); }, methods: { init() { this.updateParentData(); if (!this.parent) { uni.$u.error("u-checkbox必须搭配u-checkbox-group组件使用"); } const value2 = this.parentData.modelValue; if (this.checked) { this.isChecked = true; } else if (uni.$u.test.array(value2)) { this.isChecked = value2.some((item) => { return item === this.name; }); } }, updateParentData() { this.getParentData("u-checkbox-group"); }, // 横向两端排列时,点击组件即可触发选中事件 wrapperClickHandler(e) { this.parentData.iconPlacement === "right" && this.iconClickHandler(e); }, // 点击图标 iconClickHandler(e) { this.preventEvent(e); if (!this.elDisabled) { this.setRadioCheckedStatus(); } }, // 点击label labelClickHandler(e) { this.preventEvent(e); if (!this.elLabelDisabled && !this.elDisabled) { this.setRadioCheckedStatus(); } }, emitEvent() { this.$emit("change", this.isChecked); this.$nextTick(() => { uni.$u.formValidate(this, "change"); }); }, // 改变组件选中状态 // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-checkbox实例 // 将本组件外的其他u-checkbox的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态 setRadioCheckedStatus() { this.isChecked = !this.isChecked; this.emitEvent(); typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this); } }, watch: { checked() { this.isChecked = this.checked; } } }; function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-checkbox", [`u-checkbox-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]), style: vue.normalizeStyle([$options.checkboxStyle]), onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-checkbox__icon-wrap", $options.iconClasses]), onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])), style: vue.normalizeStyle([$options.iconWrapStyle]) }, [ vue.renderSlot(_ctx.$slots, "icon", {}, () => [ vue.createVNode(_component_u_icon, { class: "u-checkbox__icon-wrap__icon", name: "checkbox-mark", size: $options.elIconSize, color: $options.elIconColor }, null, 8, ["size", "color"]) ], true) ], 6 /* CLASS, STYLE */ ), vue.createElementVNode( "text", { onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])), style: vue.normalizeStyle({ color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor, fontSize: $options.elLabelSize, lineHeight: $options.elLabelSize }) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ ) ], 6 /* CLASS, STYLE */ ); } const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-41713600"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-checkbox/u-checkbox.vue"]]); const props$4 = { props: { // 标识符 name: { type: String, default: props$y.checkboxGroup.name }, // 绑定的值 modelValue: { type: Array, default: props$y.checkboxGroup.value }, // 形状,circle-圆形,square-方形 shape: { type: String, default: props$y.checkboxGroup.shape }, // 是否禁用全部checkbox disabled: { type: Boolean, default: props$y.checkboxGroup.disabled }, // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 activeColor: { type: String, default: props$y.checkboxGroup.activeColor }, // 未选中的颜色 inactiveColor: { type: String, default: props$y.checkboxGroup.inactiveColor }, // 整个组件的尺寸,默认px size: { type: [String, Number], default: props$y.checkboxGroup.size }, // 布局方式,row-横向,column-纵向 placement: { type: String, default: props$y.checkboxGroup.placement }, // label的字体大小,px单位 labelSize: { type: [String, Number], default: props$y.checkboxGroup.labelSize }, // label的字体颜色 labelColor: { type: [String], default: props$y.checkboxGroup.labelColor }, // 是否禁止点击文本操作 labelDisabled: { type: Boolean, default: props$y.checkboxGroup.labelDisabled }, // 图标颜色 iconColor: { type: String, default: props$y.checkboxGroup.iconColor }, // 图标的大小,单位px iconSize: { type: [String, Number], default: props$y.checkboxGroup.iconSize }, // 勾选图标的对齐方式,left-左边,right-右边 iconPlacement: { type: String, default: props$y.checkboxGroup.iconPlacement }, // 竖向配列时,是否显示下划线 borderBottom: { type: Boolean, default: props$y.checkboxGroup.borderBottom } } }; const _sfc_main$1a = { name: "u-checkbox-group", mixins: [mpMixin, mixin, props$4], computed: { // 这里computed的变量,都是子组件u-checkbox需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化 // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-checkbox-group) // 拉取父组件新的变化后的参数 parentData() { return [ this.modelValue, this.disabled, this.inactiveColor, this.activeColor, this.size, this.labelDisabled, this.shape, this.iconSize, this.borderBottom, this.placement ]; }, bemClass() { return this.bem("checkbox-group", ["placement"]); } }, watch: { // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件 parentData: { handler() { if (this.children.length) { this.children.map((child) => { typeof child.init === "function" && child.init(); }); } }, deep: true } }, data() { return {}; }, created() { this.children = []; }, emits: ["update:modelValue", "change"], methods: { // 将其他的checkbox设置为未选中的状态 unCheckedOther(childInstance) { const values = []; this.children.map((child) => { if (child.isChecked) { values.push(child.name); } }); this.$emit("change", values); this.$emit("update:modelValue", values); } } }; function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-checkbox-group", $options.bemClass]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 2 /* CLASS */ ); } const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-ff0492f0"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.vue"]]); const _sfc_main$19 = { data() { return { companyId: null, companyUserId: null, temps: [], statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, orderKey: null, patient: null, durations: [ { name: "一周内", disabled: false }, { name: "一个月内", disabled: false }, { name: "半年内", disabled: false }, { name: "半年以上", disabled: false } ], isVisits: [ { name: "未就诊", disabled: false }, { name: "就诊过", disabled: false } ], form: { title: "", drug: "", isVisit: "就诊过", duration: "一周内" }, rules: { title: [ { required: true, message: "请输入您的病情", // 可以单个或者同时写两个触发验证方式 trigger: ["change", "blur"] } ], drugs: [ { required: true, message: "请输入正在服用药品", // 可以单个或者同时写两个触发验证方式 trigger: ["change", "blur"] } ], durations: [ { required: true, message: "请选择本次患病多久", // 可以单个或者同时写两个触发验证方式 trigger: ["change", "blur"] } ], isVisit: [ { required: true, message: "请选择是否去医院就诊过", // 可以单个或者同时写两个触发验证方式 trigger: ["change", "blur"] } ] }, inquiryType: null, inquirySubType: null, orderType: null, doctorId: null, fileList1: [], fileList2: [], fileList3: [], isShare: null }; }, onLoad(options) { if (!this.$isEmpty(options.isShare)) { this.isShare = options.isShare; } else { uni.hideShareMenu(); } formatAppLog("log", "at pages_order/inquiryForm2_2.vue:350", options); if (!this.$isEmpty(options.companyId)) { this.companyId = options.companyId; } if (!this.$isEmpty(options.companyUserId)) { this.companyUserId = options.companyUserId; } formatAppLog("log", "at pages_order/inquiryForm2_2.vue:357", this.companyId); formatAppLog("log", "at pages_order/inquiryForm2_2.vue:358", this.companyUserId); this.inquiryType = options.inquiryType; this.inquirySubType = options.inquirySubType; this.orderType = options.orderType; this.doctorId = options.doctorId; formatAppLog("log", "at pages_order/inquiryForm2_2.vue:363", this.inquiryType); formatAppLog("log", "at pages_order/inquiryForm2_2.vue:364", this.orderType); formatAppLog("log", "at pages_order/inquiryForm2_2.vue:365", this.doctorId); this.getInquiryTemp(); }, onShow() { if (this.$isLogin()) { if (!this.$isEmpty(this.companyUserId)) { let data = { companyUserId: this.companyUserId }; bindCompanyUser(data).then( (res) => { if (res.code == 200) ; }, (rej) => { } ); } } var that = this; uni.$on("refreshOrderPatient", (res) => { that.patient = res; }); this.confirm(); }, onReady() { this.$refs.uForm.setRules(this.rules); }, onShareAppMessage(res) { uni.showShareMenu({ withShareTicket: true }); wx.updateShareMenu({ isPrivateMessage: true, withShareTicket: false, success(res2) { formatAppLog("log", "at pages_order/inquiryForm2_2.vue:402", "updateShareMenu: ", res2); }, fail() { } }); return { title: "御君方互联网医院--健康会诊", path: "/pages_order/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType=" + this.inquirySubType + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId }; }, methods: { leftClick() { formatAppLog("log", "at pages_order/inquiryForm2_2.vue:415", "leftClick"); uni.showModal({ title: "提示", content: "确认关闭吗", success: function(res) { if (res.confirm) { uni.navigateBack(); } else if (res.cancel) ; } }); }, showImg(type2) { if (type2 == 1) { var imgs = [ "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0640bd4b80ba4491842b9d20d7238616.png" ]; uni.previewImage({ current: 0, urls: imgs }); } else if (type2 == 2) { var imgs = [ "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/2c9f24e5c3fc458f8bcb30a4fb0619be.png" ]; uni.previewImage({ current: 0, urls: imgs }); } }, getInquiryTemp() { let data = {}; getInquiryTemp(data).then( (res) => { if (res.code == 200) { this.temps = res.data; this.temps.forEach(function(element) { element.options = JSON.parse(element.itemJson); }); formatAppLog("log", "at pages_order/inquiryForm2_2.vue:468", this.temps1); } }, (rej) => { } ); }, submitOrder() { if (this.patient == null) { uni.showToast({ icon: "none", title: "请选择就诊人" }); return; } if (this.orderKey == null) { this.confirm(); } var reportImages = []; this.fileList1.forEach(function(element) { reportImages.push(element.url); }); var tongueImages = []; this.fileList2.forEach(function(element) { tongueImages.push(element.url); }); var faceImages = []; this.fileList3.forEach(function(element) { faceImages.push(element.url); }); var forms = []; this.temps.forEach(function(element) { var item = { title: element.title, option: element.checks }; forms.push(item); }); var that = this; this.$refs.uForm.validate().then((res) => { var data = { companyId: that.companyId, companyUserId: that.companyUserId, orderKey: this.orderKey, patientId: this.patient.patientId, title: this.form.title, drugs: this.form.drugs, isVisit: this.form.isVisit, duration: this.form.duration, inquiryType: this.inquiryType, inquirySubType: this.inquirySubType, orderType: this.orderType, doctorId: this.doctorId, reportImages: reportImages.toString(), tongueImages: tongueImages.toString(), faceImages: faceImages.toString(), formJson: JSON.stringify(forms) }; uni.showLoading({ title: "正在处理中..." }); create(data).then( (res2) => { uni.hideLoading(); if (res2.code == 200) { var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"]; uni.requestSubscribeMessage({ tmplIds: temps, success(e) { setTimeout(function() { uni.redirectTo({ url: "./inquiryPay?orderId=" + res2.order.orderId }); }, 200); }, fail(e) { setTimeout(function() { uni.redirectTo({ url: "./inquiryPay?orderId=" + res2.order.orderId }); }, 200); } }); return; } else { uni.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { } ); }).catch((errors) => { }); }, confirm() { let data = {}; confirm(data).then( (res) => { if (res.code == 200) { this.orderKey = res.orderKey; } }, (rej) => { } ); }, addPatient() { uni.navigateTo({ url: "/pages_user/patient" }); }, deletePic(event) { this[`fileList${event.name}`].splice(event.index, 1); }, async afterRead(event) { let lists = [].concat(event.file); let fileListLen = this[`fileList${event.name}`].length; lists.map((item) => { this[`fileList${event.name}`].push({ ...item, status: "uploading", message: "上传中" }); }); for (let i = 0; i < lists.length; i++) { const result = await this.uploadFilePromise(lists[i].url); let item = this[`fileList${event.name}`][fileListLen]; this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { status: "success", message: "", url: result })); fileListLen++; } }, uploadFilePromise(url2) { return new Promise((resolve, reject2) => { uni.uploadFile({ url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS", // 仅为示例,非真实的接口地址 filePath: url2, name: "file", formData: { user: "test" }, success: (res) => { setTimeout(() => { formatAppLog("log", "at pages_order/inquiryForm2_2.vue:620", JSON.parse(res.data).url); resolve(JSON.parse(res.data).url); }, 1e3); } }); }); } } }; function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4); const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3); const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5); const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1); const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1); const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2); const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6); const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3); const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4); const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_7); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", null, [ vue.createVNode(_component_u_navbar, { title: "症状描述", onLeftClick: $options.leftClick }, null, 8, ["onLeftClick"]) ]), vue.createElementVNode("view", { class: "main" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createVNode(_component_u_alert, { fontSize: "16", type: "primary", description: "尊敬的用户,您好!\n为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!" }), vue.createElementVNode("view", { class: "chose-patient" }, [ $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "title-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("text", { class: "title" }, "选择就诊人"), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("text", { class: "value" }, "请点击添加"), vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "patient", onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString($data.patient.patientName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info" }, [ $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "男")) : vue.createCommentVNode("v-if", true), $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "女")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "cont" }, [ vue.createVNode(_component_u_form, { rules: $data.rules, model: $data.form, ref: "uForm", labelPosition: "left" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "请描述您的病情") ]), vue.createElementVNode("view", { class: "form" }, [ vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", borderBottom: "", label: "描述您的病情", prop: "title" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u__textarea, { maxlength: "500", modelValue: $data.form.title, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.title = $event), placeholder: "请输入内容", count: "" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", borderBottom: "", label: "正在服用药品", prop: "drugs" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u__textarea, { maxlength: "500", modelValue: $data.form.drugs, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.drugs = $event), placeholder: "请输入内容", count: "" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", borderBottom: "", label: "本次患病多久了", prop: "duration" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_radio_group, { modelValue: $data.form.duration, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.form.duration = $event), iconPlacement: "left" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.durations, (item, index2) => { return vue.openBlock(), vue.createBlock(_component_u_radio, { customStyle: { marginRight: "5px" }, key: index2, label: item.name, name: item.name, activeColor: "#C39A58" }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", borderBottom: "", label: "此次病情是否去医院就诊过", prop: "isVisit" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_radio_group, { modelValue: $data.form.isVisit, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.isVisit = $event), iconPlacement: "left" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.isVisits, (item, index2) => { return vue.openBlock(), vue.createBlock(_component_u_radio, { customStyle: { marginRight: "5px" }, key: index2, label: item.name, name: item.name, activeColor: "#C39A58" }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", borderBottom: "", label: "上传检测报告或患处照片" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("view", { class: "icon" }), vue.createVNode(_component_u_upload, { fileList: $data.fileList1, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "1", multiple: "", maxCount: 4 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", borderBottom: "", label: "上传舌苔照片" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("image", { onClick: _cache[6] || (_cache[6] = ($event) => $options.showImg(1)), class: "icon", src: "/static/images/question.png" }), vue.createVNode(_component_u_upload, { fileList: $data.fileList2, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "2", multiple: "", maxCount: 4 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { required: true, labelWidth: "200rpx", label: "上传面部照片" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("image", { onClick: _cache[7] || (_cache[7] = ($event) => $options.showImg(2)), class: "icon", src: "/static/images/question.png" }), vue.createVNode(_component_u_upload, { fileList: $data.fileList3, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "3", multiple: "", maxCount: 4 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]) ]), _: 1 /* STABLE */ }) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "您的头面部健康状况自我检查") ]), vue.createElementVNode("view", { class: "form" }, [ vue.createElementVNode("view", { class: "option-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.temps, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [ item.tempType == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "title" }, vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "options" }, [ item.tempType == 1 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, { key: 0, modelValue: item.checks, "onUpdate:modelValue": ($event) => item.checks = $event, placement: "column" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.options, (option, subIndex) => { return vue.openBlock(), vue.createBlock(_component_u_checkbox, { size: "28", shape: "circle", activeColor: "#C39A58", key: option.name, label: option.name, name: option.name }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 2 /* DYNAMIC */ }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "您的四肢肩颈健康状况自我检查") ]), vue.createElementVNode("view", { class: "form" }, [ vue.createElementVNode("view", { class: "option-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.temps, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [ item.tempType == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "title" }, vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "options" }, [ item.tempType == 2 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, { key: 0, modelValue: item.checks, "onUpdate:modelValue": ($event) => item.checks = $event, placement: "column" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.options, (option, subIndex) => { return vue.openBlock(), vue.createBlock(_component_u_checkbox, { size: "28", shape: "circle", activeColor: "#C39A58", key: option.name, label: option.name, name: option.name }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 2 /* DYNAMIC */ }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "您的胸腹部健康状况自我检查") ]), vue.createElementVNode("view", { class: "form" }, [ vue.createElementVNode("view", { class: "option-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.temps, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [ item.tempType == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "title" }, vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "options" }, [ item.tempType == 3 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, { key: 0, modelValue: item.checks, "onUpdate:modelValue": ($event) => item.checks = $event, placement: "column" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.options, (option, subIndex) => { return vue.openBlock(), vue.createBlock(_component_u_checkbox, { size: "28", shape: "circle", activeColor: "#C39A58", key: option.name, label: option.name, name: option.name }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 2 /* DYNAMIC */ }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "其他身体状况自我检查") ]), vue.createElementVNode("view", { class: "form" }, [ vue.createElementVNode("view", { class: "option-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.temps, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [ item.tempType == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "title" }, vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "options" }, [ item.tempType == 4 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, { key: 0, modelValue: item.checks, "onUpdate:modelValue": ($event) => item.checks = $event, placement: "column" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.options, (option, subIndex) => { return vue.openBlock(), vue.createBlock(_component_u_checkbox, { size: "28", shape: "circle", activeColor: "#C39A58", key: option.name, label: option.name, name: option.name }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 2 /* DYNAMIC */ }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["rules", "model"]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[8] || (_cache[8] = ($event) => $options.submitOrder()) }, "提交订单") ]) ]); } const Pages_orderInquiryForm2_2 = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-1e2e2fb2"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryForm2_2.vue"]]); const _sfc_main$18 = { data() { return { companyId: null, companyUserId: null, orderKey: null, patient: null, durations: [ { name: "一周内", disabled: false }, { name: "一个月内", disabled: false }, { name: "半年内", disabled: false }, { name: "半年以上", disabled: false } ], isVisits: [ { name: "未就诊", disabled: false }, { name: "就诊过", disabled: false } ], title: "", isVisit: "就诊过", duration: "一周内", inquiryType: null, orderType: null, doctorId: null, fileList1: [] }; }, onLoad(options) { if (!this.$isEmpty(options.companyId)) { this.companyId = options.companyId; } if (!this.$isEmpty(options.companyUserId)) { this.companyUserId = options.companyUserId; } this.inquiryType = options.inquiryType; this.orderType = options.orderType; this.doctorId = options.doctorId; formatAppLog("log", "at pages_order/inquiryForm3.vue:151", this.inquiryType); formatAppLog("log", "at pages_order/inquiryForm3.vue:152", this.orderType); formatAppLog("log", "at pages_order/inquiryForm3.vue:153", this.doctorId); this.confirm(); }, onShow() { var that = this; uni.$on("refreshOrderPatient", (res) => { that.patient = res; }); }, methods: { submitOrder() { if (this.patient == null) { uni.showToast({ icon: "none", title: "请选择就诊人" }); return; } var images = []; this.fileList1.forEach(function(element) { images.push(element.url); }); var data = { companyId: this.companyId, companyUserId: this.companyUserId, orderKey: this.orderKey, patientId: this.patient.patientId, title: this.title, isVisit: this.isVisit, duration: this.duration, inquiryType: this.inquiryType, orderType: this.orderType, doctorId: this.doctorId, reportImages: images.toString() }; uni.showLoading({ title: "正在处理中..." }); create(data).then( (res) => { if (res.code == 200) { var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"]; uni.requestSubscribeMessage({ tmplIds: temps, success(e) { setTimeout(function() { uni.redirectTo({ url: "./inquiryPay?orderId=" + res.order.orderId }); }, 200); }, fail(e) { setTimeout(function() { uni.redirectTo({ url: "./inquiryPay?orderId=" + res.order.orderId }); }, 200); } }); return; } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, confirm() { let data = {}; confirm(data).then( (res) => { if (res.code == 200) { this.orderKey = res.orderKey; } }, (rej) => { } ); }, addPatient() { uni.navigateTo({ url: "/pages_user/patient" }); }, deletePic(event) { this[`fileList${event.name}`].splice(event.index, 1); }, async afterRead(event) { let lists = [].concat(event.file); let fileListLen = this[`fileList${event.name}`].length; lists.map((item) => { this[`fileList${event.name}`].push({ ...item, status: "uploading", message: "上传中" }); }); for (let i = 0; i < lists.length; i++) { const result = await this.uploadFilePromise(lists[i].url); let item = this[`fileList${event.name}`][fileListLen]; this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { status: "success", message: "", url: result })); fileListLen++; } }, uploadFilePromise(url2) { return new Promise((resolve, reject2) => { uni.uploadFile({ url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS", // 仅为示例,非真实的接口地址 filePath: url2, name: "file", formData: { user: "test" }, success: (res) => { setTimeout(() => { formatAppLog("log", "at pages_order/inquiryForm3.vue:279", JSON.parse(res.data).url); resolve(JSON.parse(res.data).url); }, 1e3); } }); }); } } }; function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3); const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5); const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1); const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2); const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "main" }, [ vue.createVNode(_component_u_alert, { fontSize: "16", type: "primary", description: "尊敬的用户,您好!\r\n 为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!" }), vue.createElementVNode("view", { class: "chose-patient" }, [ $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "title-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("text", { class: "title" }, "选择就诊人"), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("text", { class: "value" }, "请点击添加"), vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "patient", onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString($data.patient.patientName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "info" }, [ $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "男")) : vue.createCommentVNode("v-if", true), $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "女")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "red-dot" }, "*"), vue.createElementVNode("view", { class: "title" }, "请描述您的病情") ]), vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [ vue.createVNode(_component_u__textarea, { maxlength: "500", modelValue: $data.title, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.title = $event), placeholder: "请输入内容", count: "" }, null, 8, ["modelValue"]) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "red-dot" }, "*"), vue.createElementVNode("view", { class: "title" }, "本次患病多久了?") ]), vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [ vue.createVNode(_component_u_radio_group, { modelValue: $data.duration, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.duration = $event), iconPlacement: "left" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.durations, (item, index2) => { return vue.openBlock(), vue.createBlock(_component_u_radio, { customStyle: { marginRight: "5px" }, key: index2, label: item.name, name: item.name, activeColor: "#C39A58" }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "red-dot" }, "*"), vue.createElementVNode("view", { class: "title" }, "此次病情是否去医院就诊过?") ]), vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [ vue.createVNode(_component_u_radio_group, { modelValue: $data.isVisit, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.isVisit = $event), iconPlacement: "left" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.isVisits, (item, index2) => { return vue.openBlock(), vue.createBlock(_component_u_radio, { customStyle: { marginRight: "5px" }, key: index2, label: item.name, name: item.name, activeColor: "#C39A58" }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title" }, "上传检测报告或患处照片?") ]), vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [ vue.createVNode(_component_u_upload, { fileList: $data.fileList1, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "1", maxCount: 5 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[5] || (_cache[5] = ($event) => $options.submitOrder()) }, "提交订单") ]) ]); } const Pages_orderInquiryForm3 = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-3d545e9c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryForm3.vue"]]); const _sfc_main$17 = { data() { return { order: null, orderId: null, orderTypeOptions: [], inquiryTypeOptions: [], couponText: "请选择优惠券", userCouponId: 0, coupons: [], couponShow: false, payMoney: 0, discountMoney: 0 }; }, onLoad(options) { this.orderId = options.orderId; }, onShow() { this.getDictByKey("sys_inquiry_order_type"); this.getDictByKey("sys_inquiry_type"); this.getInquiryOrderById(); this.getMyEnableCouponList(); }, //发送给朋友 onShareAppMessage(res) { var that = this; if (this.$isLogin()) { return { title: "订单支付", path: "/pages_order/inquiryPay?orderId=" + that.orderId, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { couponSelect(item) { this.couponShow = false; this.userCouponId = item.id; formatAppLog("log", "at pages_order/inquiryPay.vue:148", item); this.couponText = item.price + "元优惠券"; this.compute(); }, open() { }, close() { this.couponShow = false; }, openCoupon() { this.couponShow = true; }, delCoupon() { this.userCouponId = 0; this.couponText = "请选择优惠券"; this.compute(); }, compute() { var data = { orderId: this.orderId, userCouponId: this.userCouponId }; formatAppLog("log", "at pages_order/inquiryPay.vue:170", data); compute$1(data).then( (res) => { if (res.code == 200) { this.payMoney = res.data.payMoney; this.discountMoney = res.data.discountMoney; } else { this.userCouponId = 0; this.couponText = "请选择优惠券"; uni.showToast({ icon: "none", title: res.msg }); } }, (err) => { } ); }, getMyEnableCouponList() { var data = { couponType: 3 }; getMyEnableCouponList(data).then( (res) => { if (res.code == 200) { this.coupons = res.data; } }, (err) => { } ); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_inquiry_order_type") { this.orderTypeOptions = res.data; } if (key == "sys_inquiry_type") { this.inquiryTypeOptions = res.data; } } }, (err) => { } ); }, getInquiryOrderById() { var data = { orderId: this.orderId }; var that = this; uni.showLoading(); getInquiryOrderById(data).then( (res) => { if (res.code == 200) { uni.hideLoading(); that.order = res.data; this.compute(); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, payOrder() { var data = { orderId: this.order.orderId, userCouponId: this.userCouponId }; uni.showLoading(); pay$1(data).then( (res) => { if (res.code == 200) { uni.redirectTo({ url: "./inquiryPayment?orderId=" + this.orderId }); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "付款详情"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "订单号:") ]), vue.createElementVNode("view", { class: "right" }, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "订单类型:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("text", { class: "text" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, $data.order.inquiryType)), 1 /* TEXT */ ), vue.createElementVNode( "text", null, "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, $data.order.orderType)), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.money.toFixed(2)), 1 /* TEXT */ ) ]) ]), $data.order != null && ($data.order.userCouponId == null || $data.order.userCouponId == 0) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "item", onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.openCoupon(), ["stop"])) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "优惠券:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.couponText), 1 /* TEXT */ ), $data.userCouponId != 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.delCoupon(), ["stop"])), class: "ic-close", src: "/static/images/close.png" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("image", { class: "ic-back", src: "/static/images/arrow_gray.png" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.order.userCouponId == null || $data.order.userCouponId == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "优惠金额:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.discountMoney.toFixed(2)), 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.payMoney.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createVNode(_component_u_popup, { closeable: true, show: $data.couponShow, round: 10, mode: "bottom", onClose: $options.close, onOpen: $options.open }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "coupon" }, [ $data.coupons.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "coupon-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.coupons, (item) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.couponSelect(item), class: "coupon-item" }, [ vue.createElementVNode("view", { class: "left" }, [ item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/004bcf24fc7641dea9f3247fa8d59ea2.png", mode: "widthFix" })) : vue.createCommentVNode("v-if", true), item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3ce37842579c48e2b8e50e547adbfeb6.png", mode: "widthFix" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { style: { "z-index": "999" } }, [ vue.createTextVNode(" ¥"), vue.createElementVNode( "span", { class: "num" }, vue.toDisplayString(item.price.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "pic-num" }, "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "btns" }, [ item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(item.limitTime) + " 到期", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, "使用时间 " + vue.toDisplayString(item.useTime), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "bnt gray" }, "已使用")) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "bnt gray" }, "已过期")) : vue.createCommentVNode("v-if", true), item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "btn" }, "使用")) : vue.createCommentVNode("v-if", true) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), $data.coupons.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty" }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" }) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["show", "onClose", "onOpen"]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode( "view", { class: "btn", onClick: _cache[2] || (_cache[2] = ($event) => $options.payOrder()) }, "支付" + vue.toDisplayString($data.payMoney.toFixed(2)) + "元", 1 /* TEXT */ ) ]) ]); } const Pages_orderInquiryPay = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-a396ca70"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryPay.vue"]]); const _sfc_main$16 = { data() { return { payMethod: null, orderId: null, order: null }; }, onLoad(option) { this.orderId = option.orderId; this.payMethod = option.payMethod; }, onShow() { this.getInquiryOrderById(); }, methods: { copyTest(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, getInquiryOrderById() { var data = { orderId: this.orderId }; formatAppLog("log", "at pages_order/inquiryPayment.vue:71", data); getInquiryOrderById(data).then( (res) => { if (res.code == 200) { this.order = res.data; if (this.payMethod != null && this.payMethod == "app") { this.payOrder(); } } }, (rej) => { } ); }, payOrder() { var data = { orderId: this.orderId }; var that = this; uni.showLoading(); payment$1(data).then( (res) => { if (res.code == 200) { if (res.isPay == 1) { uni.redirectTo({ url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId }); } else { if (res.type == "tz") { uni.setStorageSync("ztPayUrl", res.data.body.url); uni.redirectTo({ url: "/pages_order/tzPay" }); } else if (res.type == "yb") { var payData = JSON.parse(res.data.pay_info); formatAppLog("log", "at pages_order/inquiryPayment.vue:109", payData); uni.requestPayment({ provider: "wxpay", timeStamp: payData.timeStamp, nonceStr: payData.nonceStr, package: payData.package, signType: payData.signType, paySign: payData.paySign, success: function(res2) { formatAppLog("log", "at pages_order/inquiryPayment.vue:118", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } else if (res.type == "hf") { var payData = JSON.parse(res.data.pay_info); formatAppLog("log", "at pages_order/inquiryPayment.vue:138", payData); uni.requestPayment({ provider: "wxpay", timeStamp: payData.timeStamp, nonceStr: payData.nonceStr, package: payData.package, signType: payData.signType, paySign: payData.paySign, success: function(res2) { formatAppLog("log", "at pages_order/inquiryPayment.vue:147", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } else if (res.type == "wx") { uni.requestPayment({ provider: "wxpay", timeStamp: res.data.timeStamp, nonceStr: res.data.nonceStr, package: res.data.packageValue, signType: res.data.signType, paySign: res.data.paySign, success: function(res2) { formatAppLog("log", "at pages_order/inquiryPayment.vue:174", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } } } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "inner-box" }, [ vue.createCommentVNode(" 时间、价格 "), vue.createElementVNode("view", { class: "time-price" }, [ vue.createElementVNode("text", { class: "time" }, "订单金额"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 订单详情查看 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 底部按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder()) }, "立即支付")) : vue.createCommentVNode("v-if", true) ]) ]); } const Pages_orderInquiryPayment = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryPayment.vue"]]); const _sfc_main$15 = { data() { return { url: "", content: "" }; }, onLoad(options) { var that = this; var url2 = uni.getStorageSync("ztPayUrl"); that.url = url2; const obj = this.$urlToObj(url2); formatAppLog("log", "at pages_order/tzPay.vue:20", obj.extraData); uni.setStorageSync("payExtraData", obj.extraData); }, methods: {} }; function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("web-view", { src: $data.url }, null, 8, ["src"]) ]); } const Pages_orderTzPay = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-7333b40d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/tzPay.vue"]]); const _sfc_main$14 = { data() { return { payData: null, payExtraData: null }; }, onLoad(options) { formatAppLog("log", "at pages_order/tzWeixinPay.vue:18", options); this.payData = JSON.parse(decodeURIComponent(options.openid)); var json = uni.getStorageSync("payExtraData"); this.payExtraData = JSON.parse(json); formatAppLog("log", "at pages_order/tzWeixinPay.vue:22", this.payExtraData); formatAppLog("log", "at pages_order/tzWeixinPay.vue:23", this.payData); this.payOrder(); }, methods: { payOrder() { var that = this; uni.showLoading({ title: "处理中..." }); uni.requestPayment({ provider: "wxpay", timeStamp: that.payData.timeStamp, nonceStr: that.payData.nonceStr, package: that.payData.package, signType: that.payData.signType, paySign: that.payData.paySign, success: function(res) { uni.hideLoading(); if (that.payExtraData.orderType == 1) { uni.redirectTo({ url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.payExtraData.orderId }); } else if (that.payExtraData.orderType == 2) { uni.redirectTo({ url: "/pages_order/storeOrderPaySuccess?orderId=" + that.payExtraData.orderId }); } else if (that.payExtraData.orderType == 3) { uni.redirectTo({ url: "/pages_order/packageOrderPaySuccess?orderId=" + that.payExtraData.orderId }); } }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } } }; function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.payOrder()) }, "支付") ]) ]); } const Pages_orderTzWeixinPay = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-9895883c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/tzWeixinPay.vue"]]); const _sfc_main$13 = { data() { return { order: null }; }, onLoad(option) { uni.setNavigationBarTitle({ title: "支付结果" }); this.orderId = option.orderId; this.getInquiryOrderById(); }, methods: { getInquiryOrderById() { var data = { orderId: this.orderId }; var that = this; uni.showLoading(); getInquiryOrderById(data).then( (res) => { uni.hideLoading(); if (res.code == 200) { that.order = res.data; } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, copyTest(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, showOrderDetails(orderId) { uni.redirectTo({ url: "./inquiryOrderDetails?orderId=" + orderId }); } } }; function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("text", { class: "title" }, "支付成功"), vue.createElementVNode("image", { class: "icon", src: "/static/images/success.png" }), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn cancel", onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId)) }, " 查看订单") ]) ]), vue.createCommentVNode(" 订单详情查看 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderSn)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.money.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "优惠金额"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.discountMoney.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]) ]) ]) ]); } const Pages_orderInquiryOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderPaySuccess.vue"]]); let request$7 = new Request$1().http; function getMyStoreOrderList(data) { return request$7("/app/storeOrder/getMyStoreOrderList", data, "GET"); } function getCompanyUserStoreOrderList(data) { return request$7("/app/storeOrder/getCompanyUserStoreOrderList", data, "GET"); } function getMyStoreOrderById(data) { return request$7("/app/storeOrder/getMyStoreOrderById", data, "GET"); } function getStoreOrderById(data) { return request$7("/app/storeOrder/getStoreOrderById", data, "GET"); } function getCompanyUserStoreOrderById(data) { return request$7("/app/storeOrder/getCompanyUserStoreOrderById", data, "GET"); } function pay(data) { return request$7("/app/storeOrder/pay", data, "POST", "application/json;charset=UTF-8"); } function payment(data) { return request$7("/app/storeOrder/payment", data, "POST", "application/json;charset=UTF-8"); } function compute(data) { return request$7("/app/storeOrder/compute", data, "POST", "application/json;charset=UTF-8"); } function cancelOrder(data) { return request$7("/app/storeOrder/cancelOrder", data, "POST", "application/json;charset=UTF-8"); } function finishOrder(data) { return request$7("/app/storeOrder/finishOrder", data, "POST", "application/json;charset=UTF-8"); } function getExpress(data) { return request$7("/app/storeOrder/getExpress", data, "POST", "application/json;charset=UTF-8"); } const _sfc_main$12 = { data() { return { order: null }; }, onLoad(option) { uni.setNavigationBarTitle({ title: "支付结果" }); uni.$emit("refreshStoreOrder"); this.orderId = option.orderId; this.getStoreOrderById(); }, methods: { getStoreOrderById() { var data = { orderId: this.orderId }; var that = this; uni.showLoading(); getStoreOrderById(data).then( (res) => { uni.hideLoading(); if (res.code == 200) { that.order = res.order; } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, copyTest(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, showOrderDetails(orderId) { formatAppLog("log", "at pages_order/storeOrderPaySuccess.vue:87", orderId); uni.redirectTo({ url: "/pages_order/storeOrderDetail?orderId=" + orderId }); } } }; function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("text", { class: "title" }, "支付成功"), vue.createElementVNode("image", { class: "icon", src: "/static/images/success.png" }), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn cancel", onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId)) }, " 查看订单") ]) ]), vue.createCommentVNode(" 订单详情查看 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderCode), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderCode)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]) ]) ]) ]); } const Pages_orderStoreOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderPaySuccess.vue"]]); const _sfc_main$11 = { data() { return { hospital: null, department: null, doctor: null, form: { orderId: null, starCount: 5, pingStar: 0, pingContent: "" } }; }, onLoad(options) { this.form.orderId = options.orderId; this.getMyInquiryOrderById(); }, methods: { getMyInquiryOrderById() { var data = { orderId: this.form.orderId }; getMyInquiryOrderById(data).then( (res) => { if (res.code == 200) { this.order = res.data.order; this.doctorId = this.order.doctorId; this.getDoctorDetails(); } }, (err) => { } ); }, getDoctorDetails() { var data = { doctorId: this.doctorId }; getDoctorDetails(data).then( (res) => { if (res.code == 200) { this.doctor = res.data.doctor; this.department = res.data.department; this.hospital = res.data.hospital; } }, (rej) => { } ); }, submit() { uni.showLoading({ title: "处理中..." }); pingOrder(this.form).then( (res) => { uni.hideLoading(); if (res.code == 200) { uni.showToast({ icon: "success", title: "评价成功" }); uni.$emit("refreshInquiryOrder"); setTimeout(function() { uni.navigateBack({ delta: 1 }); }, 2e3); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "ping" }, [ vue.createElementVNode("view", { class: "title" }, " 问诊医生 "), vue.createElementVNode("view", { class: "doc-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: $data.doctor.avatar, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-name-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString($data.doctor.doctorName), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "doc-dept-box" }, vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-his-box" }, vue.toDisplayString($data.hospital.hospitalName), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "ping-star" }, [ vue.createElementVNode("text", { class: "label" }, "问诊满意度"), vue.createElementVNode("view", { class: "star" }, [ vue.createVNode(_component_u_rate, { size: "24", "active-color": "#fcab36", modelValue: $data.form.pingStar, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.pingStar = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "ping-content" }, [ vue.createElementVNode("view", { class: "textarea-box" }, [ vue.withDirectives(vue.createElementVNode( "textarea", { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.pingContent = $event), placeholder: "写入您对医生的评价吧", maxlength: "200" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.pingContent] ]), vue.createElementVNode( "view", { class: "num-box" }, vue.toDisplayString($data.form.pingContent.length) + "/200", 1 /* TEXT */ ) ]) ]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[2] || (_cache[2] = ($event) => $options.submit()) }, "提交评价") ]) ]); } const Pages_orderPingOrder = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-62560382"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/pingOrder.vue"]]); let request$6 = new Request$1().http; function getPrescribeList(data) { return request$6("/app/prescribe/getPrescribeList", data, "GET"); } function getPrescribeById(data) { return request$6("/app/prescribe/getPrescribeById", data, "GET"); } const _sfc_main$10 = { mixins: [MescrollMixin], data() { return { status: 0, tabs: [ { id: 0, name: "待开方" }, { id: 1, name: "已开方" }, { id: 2, name: "已拒绝" } ], mescroll: null, // 上拉加载的配置 upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, // 列表数据 dataList: [] }; }, onLoad() { }, methods: { tabChange(item) { this.status = item.id; formatAppLog("log", "at pages_order/prescribeList.vue:91", item); this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { status: this.status, pageNum: page2.num, pageSize: page2.size }; getPrescribeList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, showImg(item) { var imgArr = []; imgArr.push(item.rpUrl); uni.previewImage({ urls: imgArr, current: imgArr[0] }); } } }; function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["list", "onChange"]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: _ctx.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "prescribe-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item", onClick: ($event) => $options.navTo("/pages_order/prescribeDetails?prescribeId=" + item.prescribeId) }, [ vue.createElementVNode("view", { class: "ordersn-box" }, [ vue.createElementVNode( "view", { class: "num" }, "处方单号:" + vue.toDisplayString(item.prescribeCode), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "status-box" }, [ item.status == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text info" }, "待开方")) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text success" }, "已开方")) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 2, class: "text black" }, "已拒绝")) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode( "view", { class: "ask-text" }, "诊断结果:" + vue.toDisplayString(item.diagnose), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "drug-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.drugs, (subItme, index3) => { return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [ vue.createElementVNode("view", { class: "drug-info" }, [ vue.createElementVNode("view", { class: "name-box ellipsis" }, [ vue.createElementVNode( "view", { class: "tag" }, vue.toDisplayString(index3 + 1), 1 /* TEXT */ ), vue.createTextVNode( vue.toDisplayString(subItme.drugName), 1 /* TEXT */ ) ]) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]), vue.createElementVNode( "view", { class: "ask-text" }, "审核结果:" + vue.toDisplayString(item.auditReason), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "patient-text" }, "患者:" + vue.toDisplayString(item.patientName) + " " + vue.toDisplayString(item.patientAge) + "岁 " + vue.toDisplayString(item.patientGender == 1 ? "男" : "女"), 1 /* TEXT */ ), item.createTime != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "ask-time" }, "提交时间:" + vue.toDisplayString(item.createTime), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.auditTime != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "ask-time" }, "审核时间:" + vue.toDisplayString(item.auditTime), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_orderPrescribeList = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/prescribeList.vue"]]); const _sfc_main$$ = { data() { return { doctor: null, drugs: [], prescribe: null, prescribeId: null, usage: {} }; }, onLoad(options) { if (options.prescribeId != null) { this.prescribeId = options.prescribeId; } else if (options.hasOwnProperty("q") && options.q) { const url2 = decodeURIComponent(options.q); const obj = this.$urlToObj(url2); this.prescribeId = obj.prescribeId; } }, onShow() { this.getPrescribeById(); }, methods: { navTo(url2) { uni.navigateTo({ url: url2 }); }, copyOrderSn() { uni.setClipboardData({ data: this.order.orderSn, success: function() { uni.showToast({ title: "复制成功", icon: "none" }); } }); }, getPrescribeById() { var data = { prescribeId: this.prescribeId }; getPrescribeById(data).then( (res) => { if (res.code == 200) { this.prescribe = res.data.prescribe; this.drugs = res.data.drugs; this.doctor = res.data.doctor; this.usage = JSON.parse(this.prescribe.usageJson); } }, (err) => { } ); }, navTo(url2) { uni.navigateTo({ url: url2 }); } } }; function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ $data.prescribe != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "cont" }, [ vue.createElementVNode("view", { class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "御君方互联网医院处方笺"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "医生姓名:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.doctor.doctorName), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患者姓名:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.prescribe.patientName), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患者年龄:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.prescribe.patientAge) + "岁 ", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患者性别:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.prescribe.patientGender == 1 ? "男" : "女"), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "other-info" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "处方单号:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.prescribe.prescribeCode), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "开方时间:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.prescribe.createTime), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "医生诊断:"), vue.createElementVNode( "view", { class: "text" }, vue.toDisplayString($data.prescribe.diagnose), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "审核意见:"), $data.prescribe.status == 2 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.prescribe.auditReason), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]) ]), vue.createElementVNode("view", { class: "drug-cont" }, [ vue.createElementVNode("view", { class: "title" }, "药品信息"), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.drugs, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [ vue.createElementVNode("view", { class: "drug" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: item.drugImgUrl == "" ? "/static/images/drug.svg" : item.drugImgUrl }, null, 8, ["src"]), vue.createElementVNode("view", { class: "name-cont" }, [ vue.createElementVNode("view", { class: "name-box" }, [ item.drugType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "tag" }, "西药")) : vue.createCommentVNode("v-if", true), item.drugType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "tag" }, "中药")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(item.drugName), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "spec" }, vue.toDisplayString(item.drugSpec), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "price" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createCommentVNode(" {{item.drugPrice}}元 ") ]), item.drugType == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "num" }, "X" + vue.toDisplayString(item.drugNum), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]) ]) ]), item.drugType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "drug-use" }, [ vue.createElementVNode( "view", { class: "name" }, "用药频率:" + vue.toDisplayString(item.usageFrequencyUnit), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "name" }, "单次用量:" + vue.toDisplayString(item.usagePerUseCount), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "name" }, "用药方法:" + vue.toDisplayString(item.usageMethod), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "name" }, "备注:" + vue.toDisplayString(item.remark), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]), $data.prescribe.prescribeType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "other-info" }, [ vue.createElementVNode("view", { class: "title left" }, "用药说明"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "用药数量:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.usage.counts), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "用药频率:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.usage.usageFrequencyUnit), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "单次用量:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.usage.usagePerUseCount), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "用药方法:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.usage.usageMethod), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "备注:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.usage.remark), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.prescribe.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "other-info" }, [ vue.createCommentVNode(' \r\n 出方医生签名\r\n \r\n '), vue.createElementVNode("view", { class: "sign" }, [ vue.createTextVNode(" 处方医生签名 "), vue.createElementVNode("image", { src: $data.prescribe.prescribeDoctorSignUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "sign" }, [ vue.createTextVNode(" 药师签名 "), vue.createElementVNode("image", { src: $data.prescribe.drugDoctorSignUrl }, null, 8, ["src"]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "btn-box" }, [ $data.prescribe.storeOrderId != null && $data.prescribe.storeOrderId > 0 && $data.prescribe.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn pay", onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_order/storeOrderDetail?orderId=" + $data.prescribe.storeOrderId)) }, "药品订单")) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true) ]); } const Pages_orderPrescribeDetails = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-896a7eeb"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/prescribeDetails.vue"]]); const _sfc_main$_ = { mixins: [MescrollMixin], data() { return { orderStatusOptions: [], searchKey: "", status: "0", tabs: [ { name: "全部", id: "0" }, { name: "待付款", id: "1" }, { name: "待发货", id: "2" }, { name: "待收货", id: "3" }, { name: "已完成", id: "4" } ], mescroll: null, // 上拉加载的配置 upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, // 列表数据 dataList: [] }; }, onLoad(option) { var that = this; uni.$on("refreshStoreOrder", () => { that.mescroll.resetUpScroll(); }); this.getDictByKey("sys_order_status"); }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_order_status") { this.orderStatusOptions = res.data; } } }, (err) => { } ); }, goSearch(e) { this.searchKey = e.detail.value; this.mescroll.resetUpScroll(); }, refund(item) { uni.navigateTo({ url: "/pages_order/storeOrderRefundApply?orderId=" + item.orderId }); }, tabChange(item) { this.status = item.id; this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { keyword: this.searchKey, status: this.status, pageNum: page2.num, pageSize: page2.size }; getMyStoreOrderList(data).then((res) => { if (res.code == 200) { res.data.list.forEach(function(value2, index2, array3) { value2.items = JSON.parse(value2.itemJson); }); if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, // 查看订单详情 showDetail(item) { uni.navigateTo({ url: "./storeOrderDetail?orderId=" + item.orderId }); }, finish(item) { var that = this; uni.showModal({ title: "提示", content: "确定已收货吗", success: function(res) { if (res.confirm) { var data = { orderId: item.orderId }; finishOrder(data).then((res2) => { if (res2.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); that.mescroll.resetUpScroll(); } else { uni.showToast({ icon: "none", title: res2.msg }); } }); } else if (res.cancel) ; } }); }, cancel(item) { var that = this; uni.showModal({ title: "提示", content: "确定取消订单吗", success: function(res) { if (res.confirm) { var data = { orderId: item.orderId }; cancelOrder(data).then((res2) => { if (res2.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); that.mescroll.resetUpScroll(); } else { uni.showToast({ icon: "none", title: res2.msg }); } }); } else if (res.cancel) ; } }); }, pay(item) { uni.navigateTo({ url: "/pages_order/storeOrderPay?orderId=" + item.orderId }); }, // 查看物流 showDelivery(item) { uni.navigateTo({ url: "./storeOrderDelivery?orderId=" + item.orderId }); } } }; function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["list", "onChange"]) ]), vue.createCommentVNode(" 订单列表 "), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: _ctx.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item" }, [ vue.createCommentVNode(" 订单号,状态 "), vue.createElementVNode("view", { class: "ordersn-box", onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode( "view", { class: "num" }, "订单号:" + vue.toDisplayString(item.orderCode), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "status-box" }, [ item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status > 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "text success" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status < 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ], 8, ["onClick"]), vue.createCommentVNode(" 药品列表 "), vue.createElementVNode("view", { class: "drug-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.items, (subItem, subIndex) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.showDetail(item), key: subIndex, class: "drug-item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: JSON.parse(subItem.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(subItem.jsonInfo).image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "drug-info" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString(JSON.parse(subItem.jsonInfo).productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec ellipsis2" }, vue.toDisplayString(JSON.parse(subItem.jsonInfo).sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode("view", { class: "price" }, [ vue.createCommentVNode(' ¥ '), vue.createCommentVNode(' {{JSON.parse(subItem.jsonInfo).price.toFixed(2)}} ') ]), item.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "amount" }, "x" + vue.toDisplayString(JSON.parse(subItem.jsonInfo).num), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(" 实付金额、按钮 "), vue.createElementVNode("view", { class: "bottom-box" }, [ vue.createElementVNode("view", { class: "amount-paid" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额:"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("view", { class: "unit" }, "¥"), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString(item.payPrice.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createCommentVNode(` 联系客服 `), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn cancel", onClick: ($event) => $options.cancel(item) }, "取消订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn pay", onClick: ($event) => $options.pay(item) }, "支付", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(' 申请售后 '), vue.createCommentVNode(' 查看物流 '), item.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "btn pay", onClick: ($event) => $options.finish(item) }, "确认收货", 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_orderStoreOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderList.vue"]]); const _sfc_main$Z = { data() { return { payLimitTime: null, orderId: null, order: {}, items: [] }; }, onLoad(option) { this.orderId = option.orderId; }, onShow() { this.getMyStoreOrderById(); }, methods: { showPrescribe() { var data = { prescribeId: this.order.prescribeId }; getPrescribeById(data).then( (res) => { if (res.code == 200) { if (res.data.prescribe.prescribeImgUrl != null) { var data2 = []; data2.push(res.data.prescribe.prescribeImgUrl); uni.previewImage({ current: 0, urls: data2 }); } else { uni.showToast({ icon: "none", title: "电子处方单不存在" }); } } }, (err) => { } ); }, getMyStoreOrderById() { var data = { orderId: this.orderId }; getMyStoreOrderById(data).then((res) => { if (res.code == 200) { this.order = res.order; this.items = res.items; this.payLimitTime = res.payLimitTime; this.prescribe = res.prescribe; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, showDelivery() { uni.navigateTo({ url: "./storeOrderDelivery?orderId=" + this.orderId }); }, cancel() { var that = this; uni.showModal({ title: "提示", content: "确定取消订单吗", success: function(res) { if (res.confirm) { var data = { orderId: that.order.orderId }; cancelOrder(data).then((res2) => { if (res2.code == 200) { that.getMyStoreOrderById(); uni.$emit("refreshStoreOrder"); } else { uni.showToast({ icon: "none", title: res2.msg }); } }); } else if (res.cancel) ; } }); }, finish() { var that = this; uni.showModal({ title: "提示", content: "确定已收货吗", success: function(res) { if (res.confirm) { var data = { orderId: that.orderId }; finishOrder(data).then((res2) => { if (res2.code == 200) { that.getMyStoreOrderById(); uni.$emit("refreshStoreOrder"); } else { uni.showToast({ icon: "none", title: res2.msg }); } }); } else if (res.cancel) ; } }); }, pay() { uni.navigateTo({ url: "/pages_order/storeOrderPay?orderId=" + this.order.orderId }); }, payRemain() { uni.navigateTo({ url: "/pages_user/user/paymentOrderRemain?orderId=" + this.order.orderId }); }, // 复制订单编号 copyOrderSn(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, // 退货 refund() { uni.navigateTo({ url: "/pages_order/storeOrderRefundApply?orderId=" + this.orderId }); } } }; function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "bg" }), vue.createElementVNode("view", { class: "inner" }, [ vue.createCommentVNode(" 订单状态 "), vue.createElementVNode("view", { class: "order-status" }, [ vue.createCommentVNode(" 待付款 "), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "待付款"), vue.createElementVNode( "text", { class: "desc" }, "请在" + vue.toDisplayString($data.payLimitTime) + "前完成支付", 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 待发货 "), $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/520e24fba47441b3b0f73b5250bb0b57.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "待发货"), vue.createElementVNode("text", { class: "desc" }, "等待后台发货") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 已发货、待收货 "), $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1e6ba423ff7e4537bef87a022d530015.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "待收货"), vue.createElementVNode("text", { class: "desc" }, "运输中") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 已完成 "), $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "已完成"), vue.createElementVNode("text", { class: "desc" }, "订单已确认收货,交易完成") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode("交易取消 "), $data.order.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "交易关闭"), vue.createElementVNode("text", { class: "desc" }, "订单已取消") ]) ])) : vue.createCommentVNode("v-if", true), $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "申请售后"), vue.createElementVNode("text", { class: "desc" }, "请等待客服审核,您的退款将在2-5个工作日内原路退回") ]) ])) : vue.createCommentVNode("v-if", true), $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 6, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "退款成功"), vue.createElementVNode("text", { class: "desc" }, "已成功退款") ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createCommentVNode(" 下单人信息 "), $data.order.userName != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "order-placer" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "location", src: "/static/images/location.png", mode: "" }), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "name-phone" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.userName), 1 /* TEXT */ ), $data.order.userPhone != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.order.userPhone), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "address ellipsis2" }, vue.toDisplayString($data.order.userAddress), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "content" }, [ vue.createCommentVNode(" 药品列表 "), vue.createElementVNode("view", { class: "goods-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.items, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "info-box" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString(JSON.parse(item.jsonInfo).productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec ellipsis2" }, vue.toDisplayString(JSON.parse(item.jsonInfo).sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "price-num" }, [ vue.createElementVNode("view", { class: "price" }, [ vue.createCommentVNode(' ¥ '), vue.createCommentVNode(' {{JSON.parse(item.jsonInfo).price.toFixed(2)}} ') ]), $data.order.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "num" }, "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(" 已优惠、小计 "), vue.createElementVNode("view", { class: "sub-total" }, [ vue.createElementVNode( "view", { class: "discount" }, " 订单金额:¥" + vue.toDisplayString($data.order.payPrice), 1 /* TEXT */ ), vue.createCommentVNode(' 实付金额:\r\n \r\n ¥\r\n {{order.payMoney}}\r\n ') ]) ]), vue.createCommentVNode(" 订单信息 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderCode), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderCode)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付方式"), $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "微信支付")) : vue.createCommentVNode("v-if", true), $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "物流代收")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额"), $data.order.totalPrice != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.totalPrice.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "优惠金额"), $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "应付金额"), $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额"), $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付时间"), $data.order.payTime != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.order.payTime), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createCommentVNode(' \r\n 发货时间\r\n \r\n ') ]) ]) ]) ]), vue.createCommentVNode(" 按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn cancel" }, [ vue.createTextVNode(" 联系客服 "), vue.createElementVNode("button", { class: "contact-btn", "open-type": "contact" }) ]), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn cancel", onClick: _cache[1] || (_cache[1] = ($event) => $options.cancel()) }, "取消订单")) : vue.createCommentVNode("v-if", true), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn pay", onClick: _cache[2] || (_cache[2] = ($event) => $options.pay()) }, "支付")) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(' 查看处方单 '), $data.order.status > 1 && $data.order.isAfterSales == 1 && $data.order.orderType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "btn cancel", onClick: _cache[3] || (_cache[3] = ($event) => $options.refund()) }, "申请售后")) : vue.createCommentVNode("v-if", true), $data.order.deliverySn != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "btn pay", onClick: _cache[4] || (_cache[4] = ($event) => $options.showDelivery()) }, "查看物流")) : vue.createCommentVNode("v-if", true), $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "btn pay", onClick: _cache[5] || (_cache[5] = ($event) => $options.finish()) }, "确认收货")) : vue.createCommentVNode("v-if", true) ]) ]); } const Pages_orderStoreOrderDetail = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderDetail.vue"]]); const _sfc_main$Y = { data() { return { addressId: null, wxPay: true, address: null, orderId: null, order: null, items: null, couponText: "请选择优惠券", userCouponId: 0, coupons: [], couponShow: false, payMoney: 0, discountMoney: 0 }; }, onLoad(option) { this.orderId = option.orderId; var that = this; uni.$on("updateAddress", (e) => { that.addressId = e.addressId; that.address = e; that.address.address = e.province + e.city + e.district + e.detail; }); }, onShow() { this.getStoreOrderById(); this.getMyEnableCouponList(); }, onShareAppMessage(res) { var that = this; if (this.$isLogin()) { return { title: "订单支付", path: "/pages_order/storeOrderPay?orderId=" + that.orderId, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { couponSelect(item) { this.couponShow = false; this.userCouponId = item.id; formatAppLog("log", "at pages_order/storeOrderPay.vue:203", item); this.couponText = item.price + "元优惠券"; this.compute(); }, open() { }, close() { this.couponShow = false; }, openCoupon() { this.couponShow = true; }, delCoupon() { this.userCouponId = 0; this.couponText = "请选择优惠券"; this.compute(); }, compute() { var data = { orderId: this.orderId, userCouponId: this.userCouponId }; formatAppLog("log", "at pages_order/storeOrderPay.vue:225", data); compute(data).then( (res) => { if (res.code == 200) { this.payMoney = res.data.payMoney; this.discountMoney = res.data.discountMoney; } else { this.userCouponId = 0; this.couponText = "请选择优惠券"; uni.showToast({ icon: "none", title: res.msg }); } }, (err) => { } ); }, getMyEnableCouponList() { var data = { couponType: 2 }; getMyEnableCouponList(data).then( (res) => { if (res.code == 200) { this.coupons = res.data; } }, (err) => { } ); }, getStoreOrderById() { var data = { orderId: this.orderId }; formatAppLog("log", "at pages_order/storeOrderPay.vue:260", data); getStoreOrderById(data).then( (res) => { if (res.code == 200) { this.order = res.order; this.items = res.items; if (this.order.userName != null) { this.address = { realName: this.order.userName, phone: this.order.userPhone, address: this.order.userAddress }; } this.compute(); } }, (rej) => { } ); }, openAddress() { uni.navigateTo({ url: "/pages_user/address" }); }, payOrder() { var data = { userCouponId: this.userCouponId, addressId: this.addressId, remark: this.order.remark, orderId: this.order.orderId }; var that = this; uni.showLoading(); pay(data).then( (res) => { if (res.code == 200) { uni.redirectTo({ url: "/pages_order/storeOrderPayment?orderId=" + that.order.orderId }); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "inner-box" }, [ vue.createCommentVNode(" 收货人 "), $data.address == null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "address-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.openAddress()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "name-box" }, [ vue.createElementVNode("text", { class: "text name" }, "添加收货地址") ]) ]), vue.createElementVNode("view", { class: "arrow-box" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.address != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "address-box", onClick: _cache[1] || (_cache[1] = ($event) => $options.openAddress()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "name-box" }, [ vue.createElementVNode( "text", { class: "text name" }, vue.toDisplayString($data.address.realName), 1 /* TEXT */ ), $data.address.phone != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.address.phone), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "address" }, vue.toDisplayString($data.address.address), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "arrow-box" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 药品列表 "), vue.createElementVNode("view", { class: "goods-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.items, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "info-box" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString(JSON.parse(item.jsonInfo).productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec ellipsis2" }, vue.toDisplayString(JSON.parse(item.jsonInfo).sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "price-num" }, [ vue.createElementVNode("view", { class: "price" }, [ vue.createCommentVNode(' ¥ '), vue.createCommentVNode(' {{JSON.parse(item.jsonInfo).price.toFixed(2)}} ') ]), $data.order.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "num" }, "x" + vue.toDisplayString(item.num), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(" 小计 "), vue.createElementVNode("view", { class: "sub-total" }, [ vue.createElementVNode("text", { class: "label" }, "合计:"), vue.createElementVNode("view", { class: "price" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), $data.order != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "num" }, vue.toDisplayString($data.order.totalPrice.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]) ]), vue.createElementVNode("view", { class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "支付明细"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额:") ]), vue.createElementVNode("view", { class: "right" }, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.order.payPrice.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), $data.order != null && ($data.order.userCouponId == null || $data.order.userCouponId == 0) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "item", onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.openCoupon(), ["stop"])) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "优惠券:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.couponText), 1 /* TEXT */ ), $data.userCouponId != 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $options.delCoupon(), ["stop"])), class: "ic-close", src: "/static/images/close.png" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("image", { class: "ic-back", src: "/static/images/arrow_gray.png" }) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "优惠金额:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.discountMoney.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.payMoney.toFixed(2)), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "pay-type" }, [ vue.createElementVNode("view", { class: "title" }, "支付方式"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "/static/images/wecha_pay.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "全款支付") ]), vue.createElementVNode("label", null, [ vue.createElementVNode("radio", { value: "", checked: $data.wxPay, color: "#C39A58" }, null, 8, ["checked"]) ]) ]) ]), vue.createCommentVNode(" 备注 "), $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "remarks" }, [ vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.order.remark = $event), placeholder: "备注留言(选填)", "placeholder-class": "input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.order.remark] ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createVNode(_component_u_popup, { closeable: true, show: $data.couponShow, round: 10, mode: "bottom", onClose: $options.close, onOpen: $options.open }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "coupon" }, [ $data.coupons.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "coupon-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.coupons, (item) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.couponSelect(item), class: "coupon-item" }, [ vue.createElementVNode("view", { class: "left" }, [ item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0fdd75d89db84458886d38e615011048.png", mode: "widthFix" })) : vue.createCommentVNode("v-if", true), item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d950e4c7af1e4464be1a7777e9dca576.png", mode: "widthFix" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { style: { "z-index": "999" } }, [ vue.createTextVNode(" ¥"), vue.createElementVNode( "span", { class: "num" }, vue.toDisplayString(item.price.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "pic-num" }, "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "btns" }, [ item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(item.limitTime) + " 到期", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, "使用时间 " + vue.toDisplayString(item.useTime), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "bnt gray" }, "已使用")) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "bnt gray" }, "已过期")) : vue.createCommentVNode("v-if", true), item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "btn" }, "使用")) : vue.createCommentVNode("v-if", true) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), $data.coupons.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty" }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" }) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["show", "onClose", "onOpen"]), vue.createCommentVNode(" 底部按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "btn", onClick: _cache[5] || (_cache[5] = ($event) => $options.payOrder()) }, "支付" + vue.toDisplayString($data.payMoney.toFixed(2)) + "元", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]); } const Pages_orderStoreOrderPay = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderPay.vue"]]); const _sfc_main$X = { data() { return { payMethod: null, orderId: null, order: null }; }, onLoad(option) { this.orderId = option.orderId; this.payMethod = option.payMethod; }, onShow() { this.getStoreOrderById(); }, methods: { copyTest(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, getStoreOrderById() { var data = { orderId: this.orderId }; formatAppLog("log", "at pages_order/storeOrderPayment.vue:71", data); getStoreOrderById(data).then( (res) => { if (res.code == 200) { this.order = res.order; if (this.payMethod != null && this.payMethod == "app") { this.payOrder(); } } }, (rej) => { } ); }, payOrder() { var data = { orderId: this.orderId }; var that = this; uni.showLoading(); payment(data).then( (res) => { if (res.code == 200) { if (res.isPay == 1) { uni.redirectTo({ url: "/pages_order/storeOrderPaySuccess?orderId=" + that.order.orderId }); } else { if (res.type == "tz") { uni.setStorageSync("ztPayUrl", res.data.body.url); uni.redirectTo({ url: "/pages_order/tzPay" }); } if (res.type == "yb") { var payData = JSON.parse(res.data.pay_info); formatAppLog("log", "at pages_order/storeOrderPayment.vue:110", payData); uni.requestPayment({ provider: "wxpay", timeStamp: payData.timeStamp, nonceStr: payData.nonceStr, package: payData.package, signType: payData.signType, paySign: payData.paySign, success: function(res2) { formatAppLog("log", "at pages_order/storeOrderPayment.vue:119", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "./storeOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } else if (res.type == "hf") { var payData = JSON.parse(res.data.pay_info); formatAppLog("log", "at pages_order/storeOrderPayment.vue:139", payData); uni.requestPayment({ provider: "wxpay", timeStamp: payData.timeStamp, nonceStr: payData.nonceStr, package: payData.package, signType: payData.signType, paySign: payData.paySign, success: function(res2) { formatAppLog("log", "at pages_order/storeOrderPayment.vue:148", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "./storeOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } else if (res.type == "wx") { uni.requestPayment({ provider: "wxpay", timeStamp: res.data.timeStamp, nonceStr: res.data.nonceStr, package: res.data.packageValue, signType: res.data.signType, paySign: res.data.paySign, success: function(res2) { formatAppLog("log", "at pages_order/storeOrderPayment.vue:175", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "./storeOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } } } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "inner-box" }, [ vue.createCommentVNode(" 时间、价格 "), vue.createElementVNode("view", { class: "time-price" }, [ vue.createElementVNode("text", { class: "time" }, "订单金额"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 订单详情查看 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 底部按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder()) }, "立即支付")) : vue.createCommentVNode("v-if", true) ]) ]); } const Pages_orderStoreOrderPayment = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderPayment.vue"]]); const _sfc_main$W = { data() { return { orderId: null, statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, report: null, patient: null }; }, onLoad(option) { this.orderId = option.orderId; this.getInquiryOrderReport(); }, onShow() { }, methods: { getInquiryOrderReport() { let data = { orderId: this.orderId }; getInquiryOrderReport(data).then( (res) => { if (res.code == 200) { if (data != null) { formatAppLog("log", "at pages_order/inquiryOrderReport.vue:121", res.data); this.report = res.data; if (res.data.patientJson != null) { this.patient = JSON.parse(res.data.patientJson); } if (res.data.conditioningPlanJson != null) { this.report.conditioningPlan = JSON.parse(res.data.conditioningPlanJson); } formatAppLog("log", "at pages_order/inquiryOrderReport.vue:129", this.patient); } } }, (rej) => { } ); }, goBack() { uni.navigateBack(); } } }; function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "bg" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3305ca20c3f646c6b465918efb07f849.png" }) ]), vue.createElementVNode("view", { class: "top-box" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "top-title" }, [ vue.createElementVNode("image", { onClick: _cache[0] || (_cache[0] = ($event) => $options.goBack()), src: "/static/images/icon_back_w.png" }), vue.createElementVNode("view", { class: "title" }, "诊断报告") ]) ]), $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "cont-box" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "user" }, [ vue.createElementVNode("image", { src: $data.patient.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : JSON.parse($data.report.patientJson).avatar }, null, 8, ["src"]), vue.createElementVNode("view", { class: "user-box" }, [ vue.createElementVNode( "view", { class: "sex" }, "性别 " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女"), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "username" }, "年龄 " + vue.toDisplayString($data.patient.age) + "岁", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "user-box" }, [ vue.createElementVNode( "view", { class: "sex" }, "身高 " + vue.toDisplayString($data.patient.height) + "CM", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "username" }, "体重 " + vue.toDisplayString($data.patient.weight) + "KG", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "items" }, [ vue.createElementVNode("view", { class: "result-box" }, [ vue.createElementVNode( "view", { class: "time" }, "报告时间 " + vue.toDisplayString($data.report.createTime), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString($data.report.inquiryResult), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item-box" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title-line" }), vue.createElementVNode("view", { class: "title" }, "主诉") ]), vue.createElementVNode( "view", { class: "descs" }, vue.toDisplayString($data.patient.title), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "line" }) ]), vue.createElementVNode("view", { class: "item-box" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title-line" }), vue.createElementVNode("view", { class: "title" }, "用药情况") ]), vue.createElementVNode( "view", { class: "descs" }, vue.toDisplayString($data.patient.medication), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "line" }) ]), vue.createElementVNode("view", { class: "item-box" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title-line" }), vue.createElementVNode("view", { class: "title" }, "诊断结果") ]), vue.createElementVNode( "view", { class: "descs" }, vue.toDisplayString($data.report.inquiryResult), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "line" }) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.report.conditioningPlan, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item-box" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title-line" }), vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.name), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "descs" }, vue.toDisplayString(item.value.replace(/\\n/g, "
")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "line" }) ]); }), 256 /* UNKEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "item-box" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title-line" }), vue.createElementVNode("view", { class: "title" }, "备注") ]), vue.createElementVNode( "view", { class: "descs" }, vue.toDisplayString($data.report.remark), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "sign" }, [ vue.createTextVNode( vue.toDisplayString($data.report.deptId == 39 ? "药师" : "医生") + "签名 ", 1 /* TEXT */ ), vue.createElementVNode("image", { src: $data.report.doctorSignUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "tips" }, " 注:本次会诊,仅为针对患者当前身体情况的咨询问诊建议,不作为长期参考依据。 ") ])) : vue.createCommentVNode("v-if", true) ]) ]); } const Pages_orderInquiryOrderReport = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderReport.vue"]]); const _sfc_main$V = { data() { return { orderId: null, order: {}, package: null, items: [] }; }, onLoad(option) { this.orderId = option.orderId; this.getPackageOrderById(); }, onShow() { }, methods: { cancelOrder() { var that = this; uni.showModal({ title: "提示", content: "确认取消订单吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { var data = { orderId: that.orderId }; cancelOrder$1(data).then( (res2) => { if (res2.code == 200) { uni.$emit("refreshPackageOrder"); that.getPackageOrderById(); uni.showToast({ icon: "success", title: "操作成功" }); } else { uni.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { } ); } } }); }, getPackageOrderById() { var data = { orderId: this.orderId }; getPackageOrderById(data).then((res) => { if (res.code == 200) { this.order = res.order; this.package = JSON.parse(this.order.packageJson); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, pay() { uni.navigateTo({ url: "/pages_order/packageOrderPay?orderId=" + this.order.orderId }); }, // 返回上一页 back() { let pages2 = getCurrentPages(); formatAppLog("log", "at pages_order/packageOrderDetails.vue:214", pages2.length); if (pages2.length > 1) { uni.navigateBack(); } else { uni.reLaunch({ url: "/pages/common/launch" }); } }, // 复制订单编号 copyOrderSn(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); } } }; function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "bg" }), vue.createElementVNode("view", { class: "inner" }, [ vue.createCommentVNode(" 订单状态 "), vue.createElementVNode("view", { class: "order-status" }, [ vue.createCommentVNode(" 待付款 "), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "待付款"), vue.createCommentVNode(' 请在{{payLimitTime}}前完成支付 ') ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 服务中 "), $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/b71efb4b5ca54564b553569d578738b4.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "服务中"), vue.createElementVNode("text", { class: "desc" }, "正在服务中") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 已完成 "), $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "已完成"), vue.createElementVNode("text", { class: "desc" }, "服务已完成") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode("交易取消 "), $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "交易关闭"), vue.createElementVNode("text", { class: "desc" }, "订单已取消") ]) ])) : vue.createCommentVNode("v-if", true), $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "退款成功"), vue.createElementVNode("text", { class: "desc" }, "已成功退款") ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "package-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: $data.package.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.package.packageName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "desc" }, [ vue.createElementVNode( "view", { class: "cycle" }, "用药周期" + vue.toDisplayString($data.package.cycle) + "天", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "duration" }, "签约时长" + vue.toDisplayString($data.package.duration) + "天", 1 /* TEXT */ ) ]), vue.createCommentVNode(' \r\n ¥30元/日\r\n 6.2w人已购\r\n ') ]) ]), vue.createCommentVNode(" 订单信息 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderSn)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付方式"), $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "全款支付")) : vue.createCommentVNode("v-if", true), $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "物流代收")) : vue.createCommentVNode("v-if", true), $data.order.payType == 3 ? (vue.openBlock(), vue.createElementBlock("text", { key: 2, class: "text" }, "货到付款")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额"), $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额"), $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "抵扣金额"), $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "代收金额"), $data.order.payRemain != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payRemain.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "运费金额"), $data.order.payDelivery != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payDelivery.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.payTime), 1 /* TEXT */ ) ]) ]) ]) ]) ]), vue.createCommentVNode(" 按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn cancel", onClick: _cache[1] || (_cache[1] = ($event) => $options.cancelOrder()) }, "取消订单")) : vue.createCommentVNode("v-if", true), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn pay", onClick: _cache[2] || (_cache[2] = ($event) => $options.pay()) }, "支付")) : vue.createCommentVNode("v-if", true) ]) ]); } const Pages_orderPackageOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderDetails.vue"]]); const _sfc_main$U = { mixins: [MescrollMixin], data() { return { orderStatusOptions: [], searchKey: "", status: "0", tabs: [ { name: "全部", id: "0" }, { name: "待支付", id: "1" }, { name: "服务中", id: "2" }, { name: "已完成", id: "3" }, { name: "已取消", id: "-1" }, { name: "已退款", id: "-2" } ], mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad(options) { var that = this; uni.$on("refreshPackageOrder", () => { that.mescroll.resetUpScroll(); }); this.getDictByKey("sys_package_order_status"); }, onShow() { }, methods: { pay(item) { uni.navigateTo({ url: "/pages_order/packageOrderPay?orderId=" + item.orderId }); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_package_order_status") { this.orderStatusOptions = res.data; } } }, (err) => { } ); }, cancelOrder(item) { uni.showModal({ title: "提示", content: "确认取消订单吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { var data = { orderId: item.orderId }; cancelOrder$1(data).then( (res2) => { if (res2.code == 200) { uni.$emit("refreshPackageOrder"); uni.showToast({ icon: "success", title: "操作成功" }); } else { uni.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { } ); } } }); }, showDetails(item) { uni.navigateTo({ url: "/pages_order/packageOrderDetails?orderId=" + item.orderId }); }, tabChange(item) { this.status = item.id; formatAppLog("log", "at pages_order/packageOrderList.vue:179", item); this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { status: this.status, pageNum: page2.num, pageSize: page2.size }; getMyPackageOrderList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: true, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["list", "onChange"]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "order-item", onClick: ($event) => $options.showDetails(item) }, [ vue.createElementVNode("view", { class: "top-box" }, [ vue.createElementVNode( "view", { class: "num" }, "订单号:" + vue.toDisplayString(item.orderSn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "status-box" }, [ item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status > 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "text success" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status < 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "package-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: item.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.packageName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "desc" }, [ vue.createElementVNode( "view", { class: "cycle" }, "用药周期" + vue.toDisplayString(item.cycle) + "天", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "duration" }, "签约时长" + vue.toDisplayString(item.duration) + "天", 1 /* TEXT */ ) ]), vue.createCommentVNode(' \n ¥30元/日\n 6.2w人已购\n ') ]) ]), vue.createElementVNode("view", { class: "bottom-box" }, [ vue.createElementVNode("view", { class: "amount-paid" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额:"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("view", { class: "unit" }, "¥"), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString(item.payPrice.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn cancel", onClick: vue.withModifiers(($event) => $options.cancelOrder(item), ["stop"]) }, "取消订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn pay", onClick: vue.withModifiers(($event) => $options.pay(item), ["stop"]) }, "支付订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_orderPackageOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-99b5ebb4"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderList.vue"]]); let request$5 = new Request$1().http; function getAddressByDefault() { return request$5("/app/userAddress/getAddressByDefault", null, "GET"); } function getAddressList() { return request$5("/app/userAddress/getAddressList", null, "GET"); } function getAddressById(data) { return request$5("/app/userAddress/getAddressById", data, "GET"); } function delAddress(data) { return request$5("/app/userAddress/delAddress", data, "POST", "application/json;charset=UTF-8"); } function addAddress(data) { return request$5("/app/userAddress/addAddress", data, "POST", "application/json;charset=UTF-8"); } function editAddress(data) { return request$5("/app/userAddress/editAddress", data, "POST", "application/json;charset=UTF-8"); } function parseAddress(data) { return request$5("/app/userAddress/parseAddress", data, "POST", "application/json;charset=UTF-8"); } const _sfc_main$T = { data() { return { giftPrice: 0, payTypes: [], addressId: null, wxPay: true, address: null, orderId: null, order: null, items: null, payType: "1", couponText: "请选择优惠券", userCouponId: 0, coupons: [], couponShow: false, payMoney: 0, discountMoney: 0, payRemain: 0, payDelivery: 0, payPrice: 0, gifts: [] }; }, onLoad(option) { this.orderId = option.orderId; var that = this; uni.$on("updateAddress", (e) => { that.addressId = e.addressId; that.address = e; that.address.address = e.province + e.city + e.district + e.detail; }); this.getAddressByDefault(); }, onShow() { this.getPackageOrderById(); this.getPackageById(); this.getConfigByKey(); }, methods: { getAddressByDefault() { getAddressByDefault().then( (res) => { if (res.code == 200) { if (res.data != null) { this.addressId = res.data.addressId; this.address = res.data; this.address.address = res.data.province + res.data.city + res.data.district + res.data.detail; } } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, getConfigByKey() { var data = { key: "his.package" }; getConfigByKey(data).then( (res) => { if (res.code == 200) { this.giftPrice = JSON.parse(res.data).giftPrice; formatAppLog("log", "at pages_order/packageOrderPay.vue:268", this.giftPrice); } }, (rej) => { } ); }, checkPayType(payType) { var flag2 = false; this.payTypes.forEach(function(value2, index2, array3) { if (value2.toString() == payType.toString()) { flag2 = true; } }); return flag2; }, payTypeChange(e) { formatAppLog("log", "at pages_order/packageOrderPay.vue:284", e.detail.value); this.payType = e.detail.value; this.compute(); }, couponSelect(item) { this.couponShow = false; this.userCouponId = item.id; formatAppLog("log", "at pages_order/packageOrderPay.vue:292", item); this.couponText = item.price + "元优惠券"; this.compute(); }, open() { }, close() { this.couponShow = false; }, openCoupon() { this.couponShow = true; }, delCoupon() { this.userCouponId = 0; this.couponText = "请选择优惠券"; this.compute(); }, compute() { var data = { payType: this.payType, orderId: this.orderId, userCouponId: this.userCouponId }; formatAppLog("log", "at pages_order/packageOrderPay.vue:315", data); compute$2(data).then( (res) => { if (res.code == 200) { this.payPrice = res.moneys.payPrice.toFixed(2); this.payMoney = res.moneys.payMoney.toFixed(2); this.discountMoney = res.moneys.discountMoney.toFixed(2); this.payDelivery = res.moneys.payDelivery.toFixed(2); this.payRemain = res.moneys.payRemain.toFixed(2); this.gifts = res.moneys.gifts; } else { this.payType = 1; this.compute(); this.userCouponId = 0; this.couponText = "请选择优惠券"; uni.showToast({ icon: "none", title: res.msg }); } }, (err) => { } ); }, getMyEnableCouponList() { var data = {}; if (this.package.isShow == 0) { data.couponType = 5; data.cateId = this.package.privateType; } else if (this.package.isShow == 1) { data.couponType = 6; data.cateId = this.package.diseaseType; } getMyEnableCouponList(data).then( (res) => { if (res.code == 200) { this.coupons = res.data; } }, (err) => { } ); }, getPackageOrderById() { var data = { orderId: this.orderId }; formatAppLog("log", "at pages_order/packageOrderPay.vue:364", data); getPackageOrderById(data).then( (res) => { if (res.code == 200) { this.order = res.order; this.compute(); this.getPackageById(this.order.packageId); } }, (rej) => { } ); }, getPackageById(packageId) { var data = { packageId }; getPackageById(data).then( (res) => { if (res.code == 200) { this.package = res.data; this.payTypes = res.data.payType.split(","); formatAppLog("log", "at pages_order/packageOrderPay.vue:386", this.payTypes); this.getMyEnableCouponList(); } }, (rej) => { } ); }, openAddress() { uni.navigateTo({ url: "/pages_user/address" }); }, payOrder() { var data = { payType: this.payType, userCouponId: this.userCouponId, addressId: this.addressId, remark: this.order.remark, orderId: this.order.orderId }; uni.showLoading(); pay$2(data).then( (res) => { if (res.code == 200) { uni.redirectTo({ url: "./packagePayment?orderId=" + this.orderId }); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "inner-box" }, [ vue.createCommentVNode(" 收货人 "), $data.address == null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "address-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.openAddress()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "name-box" }, [ vue.createElementVNode("text", { class: "text name" }, "添加收货地址") ]) ]), vue.createElementVNode("view", { class: "arrow-box" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.address != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "address-box", onClick: _cache[1] || (_cache[1] = ($event) => $options.openAddress()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "name-box" }, [ vue.createElementVNode( "text", { class: "text name" }, vue.toDisplayString($data.address.realName), 1 /* TEXT */ ), $data.address.phone != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.address.phone), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "address" }, vue.toDisplayString($data.address.address), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "arrow-box" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "支付明细"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "应付金额:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.payPrice), 1 /* TEXT */ ) ]) ]), $data.order != null && ($data.order.userCouponId == null || $data.order.userCouponId == 0) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "item", onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.openCoupon(), ["stop"])) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "优惠券:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.couponText), 1 /* TEXT */ ), $data.userCouponId != 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $options.delCoupon(), ["stop"])), class: "ic-close", src: "/static/images/close.png" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("image", { class: "ic-back", src: "/static/images/arrow_gray.png" }) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "优惠金额:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.discountMoney), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.payMoney), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "物流代收:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.payRemain), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "邮费:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.payDelivery), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "pay-type" }, [ vue.createElementVNode("view", { class: "title" }, "支付方式"), vue.createElementVNode( "radio-group", { onChange: _cache[4] || (_cache[4] = (...args) => $options.payTypeChange && $options.payTypeChange(...args)) }, [ $options.checkPayType("1") ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "/static/images/wecha_pay.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "全款支付") ]), vue.createElementVNode("label", null, [ vue.createElementVNode("radio", { value: 1, checked: $data.payType == "1" }, null, 8, ["checked"]) ]) ])) : vue.createCommentVNode("v-if", true), $options.checkPayType("2") ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "/static/images/pay_de.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "物流代收") ]), vue.createElementVNode("label", null, [ vue.createElementVNode("radio", { value: 2, checked: $data.payType == "2" }, null, 8, ["checked"]) ]) ])) : vue.createCommentVNode("v-if", true), $options.checkPayType("3") ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: "/static/images/pay_1.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "货到付款") ]), vue.createElementVNode("label", null, [ vue.createElementVNode("radio", { value: 3, checked: $data.payType == "3" }, null, 8, ["checked"]) ]) ])) : vue.createCommentVNode("v-if", true) ], 32 /* NEED_HYDRATION */ ) ]), $data.payType == "1" && $data.order != null && $data.order.companyId != null && $data.order.companyId > 0 && $data.giftPrice <= $data.payPrice ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "赠品"), vue.createElementVNode("view", { class: "drug-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.gifts, (product) => { return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: product.image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "drug-info" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString(product.productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec" }, vue.toDisplayString(product.sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode( "view", { class: "use" }, vue.toDisplayString(product.usageMethod), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "price" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(product.price.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "amount" }, "x" + vue.toDisplayString(product.count), 1 /* TEXT */ ) ]) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 备注 "), $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "remarks" }, [ vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.order.remark = $event), placeholder: "备注留言(选填)", "placeholder-class": "input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.order.remark] ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createVNode(_component_u_popup, { closeable: true, show: $data.couponShow, round: 10, mode: "bottom", onClose: $options.close, onOpen: $options.open }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "coupon" }, [ $data.coupons.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "coupon-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.coupons, (item) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.couponSelect(item), class: "coupon-item" }, [ vue.createElementVNode("view", { class: "left" }, [ item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0fdd75d89db84458886d38e615011048.png", mode: "widthFix" })) : vue.createCommentVNode("v-if", true), item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d950e4c7af1e4464be1a7777e9dca576.png", mode: "widthFix" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { style: { "z-index": "999" } }, [ vue.createTextVNode(" ¥"), vue.createElementVNode( "span", { class: "num" }, vue.toDisplayString(item.price.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "pic-num" }, "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "btns" }, [ item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(item.limitTime) + " 到期", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, "使用时间 " + vue.toDisplayString(item.useTime), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "bnt gray" }, "已使用")) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "bnt gray" }, "已过期")) : vue.createCommentVNode("v-if", true), item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "btn" }, "使用")) : vue.createCommentVNode("v-if", true) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), $data.coupons.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "empty" }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" }) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["show", "onClose", "onOpen"]), vue.createCommentVNode(" 底部按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "btn", onClick: _cache[6] || (_cache[6] = ($event) => $options.payOrder()) }, "支付" + vue.toDisplayString($data.payMoney) + "元", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]); } const Pages_orderPackageOrderPay = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderPay.vue"]]); const _sfc_main$S = { data() { return { order: null }; }, onLoad(option) { uni.setNavigationBarTitle({ title: "支付结果" }); uni.$emit("refreshPackageOrder"); this.orderId = option.orderId; this.getPackageOrderById(); }, methods: { getPackageOrderById() { var data = { orderId: this.orderId }; var that = this; uni.showLoading(); getPackageOrderById(data).then( (res) => { uni.hideLoading(); if (res.code == 200) { that.order = res.order; } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, copyTest(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, showOrderDetails(orderId) { formatAppLog("log", "at pages_order/packageOrderPaySuccess.vue:87", orderId); uni.redirectTo({ url: "/pages_order/packageOrderDetails?orderId=" + orderId }); } } }; function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("text", { class: "title" }, "支付成功"), vue.createElementVNode("image", { class: "icon", src: "/static/images/success.png" }), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn cancel", onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId)) }, " 查看订单") ]) ]), vue.createCommentVNode(" 订单详情查看 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderSn)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]) ]) ]) ]); } const Pages_orderPackageOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderPaySuccess.vue"]]); const _sfc_main$R = { data() { return { orderId: null, deliverySn: null, express: {}, expressList: [] }; }, onLoad(option) { this.orderId = option.orderId; this.getExpress(); }, methods: { getExpress() { var data = { orderId: this.orderId }; getExpress(data).then((res) => { if (res.code == 200) { this.express = res.express; this.expressList = res.data; this.deliverySn = res.deliverySn; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, // 返回上一页 back() { uni.navigateBack(); }, // 复制运单号 copyOrderSn(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, // 拨打电话 callPhone(phone) { uni.makePhoneCall({ phoneNumber: phone }); } } }; function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-cont" }, [ vue.createCommentVNode(" 背景图片 "), vue.createElementVNode("view", { class: "bg" }), vue.createElementVNode("view", { class: "top-inner" }, [ vue.createCommentVNode(" 运单号 "), vue.createElementVNode("view", { class: "waybill-number" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode("text", { class: "text" }, "运单号"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.deliverySn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.deliverySn)) }, "复制") ]), vue.createElementVNode("view", { class: "kf-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.express.name), 1 /* TEXT */ ), vue.createCommentVNode(' 客服电话:95311 ') ]) ]) ]), $data.expressList != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content" }, [ vue.createCommentVNode(" 物流信息 "), $data.expressList.Traces != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "refund-steps" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.expressList.Traces, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "steps" }, [ vue.createElementVNode("view", { class: "title" }, [ vue.createCommentVNode(' 已签收 '), vue.createCommentVNode(' 运输中 '), vue.createCommentVNode(" 左侧灰色圆点 "), vue.createElementVNode("view", { class: "dot" }), vue.createCommentVNode(" 对号 "), vue.createElementVNode("image", { class: "img", src: "/static/images/complete.png", mode: "" }), vue.createCommentVNode(" 运输中图标 "), vue.createElementVNode("image", { class: "img", src: "/static/images/car40.png", mode: "" }) ]), vue.createElementVNode( "view", { class: "desc-text" }, vue.toDisplayString(item.AcceptStation), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(item.AcceptTime), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]) ]) ]); } const Pages_orderStoreOrderDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderDelivery.vue"]]); let request$4 = new Request$1().http; function getStoreOrderItems(data) { return request$4("/app/storeAfterSales/getStoreOrderItems", data, "GET"); } function applyAfterSales(data) { return request$4("/app/storeAfterSales/applyAfterSales", data, "POST", "application/json;charset=UTF-8"); } function getStoreAfterSalesList(data) { return request$4("/app/storeAfterSales/getStoreAfterSalesList", data, "GET"); } function getStoreAfterSalesById(data) { return request$4("/app/storeAfterSales/getStoreAfterSalesById", data, "GET"); } function revoke(data) { return request$4("/app/storeAfterSales/revoke", data, "POST", "application/json;charset=UTF-8"); } function addDelivery(data) { return request$4("/app/storeAfterSales/addDelivery", data, "POST", "application/json;charset=UTF-8"); } const _sfc_main$Q = { data() { return { order: null, items: [] }; }, onLoad(option) { this.orderId = option.orderId; this.getStoreOrderItems(); }, methods: { checkChange(item) { item.checked = !item.checked; }, submit(type2) { uni.redirectTo({ url: "./storeOrderRefundSubmit?orderId=" + this.orderId + "&type=" + type2 }); }, getStoreOrderItems() { var data = { orderId: this.orderId }; getStoreOrderItems(data).then((res) => { if (res.code == 200) { this.order = res.order; this.items = res.items; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); } } }; function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) { return $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "goods-list" }, [ $data.order != null ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.items, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: index2 }, [ vue.createCommentVNode(' '), vue.createElementVNode("image", { class: "goods-img", src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image, mode: "aspectFit" }, null, 8, ["src"]), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(JSON.parse(item.jsonInfo).productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec" }, vue.toDisplayString(JSON.parse(item.jsonInfo).sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "price-num" }, [ vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), vue.createElementVNode( "text", { class: "price" }, vue.toDisplayString(JSON.parse(item.jsonInfo).price.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "num" }, "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createCommentVNode(" 底部按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "text" }, "提交申请后,客服会与您电话沟通,请保持手机通畅"), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode("view", { class: "left" }), vue.createElementVNode("view", { class: "right" }, [ $data.order.status == 2 || $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn cancel", onClick: _cache[0] || (_cache[0] = ($event) => $options.submit(0)) }, "仅退款")) : vue.createCommentVNode("v-if", true), $data.order.status == 3 || $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn cancel", onClick: _cache[1] || (_cache[1] = ($event) => $options.submit(1)) }, "退款退货")) : vue.createCommentVNode("v-if", true) ]) ]) ]) ])) : vue.createCommentVNode("v-if", true); } const Pages_orderStoreOrderRefundApply = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundApply.vue"]]); const _sfc_main$P = { data() { return { orderId: null, order: null, orderCode: null, items: [], type: null, reasonsOptions: [], reasons: "请选择", explains: "", refundAmount: 0 }; }, onLoad(option) { this.type = option.type; this.orderId = option.orderId; this.getStoreOrderItems(); this.getDictByKey("sys_sales_reasons"); }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_sales_reasons") { this.reasonsOptions = res.data; } } }, (err) => { } ); }, getStoreOrderItems() { var data = { orderId: this.orderId }; getStoreOrderItems(data).then((res) => { if (res.code == 200) { this.order = res.order; this.items = res.items; this.refundAmount = this.order.payMoney.toFixed(2); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, handleReasons(e) { formatAppLog("log", "at pages_order/storeOrderRefundSubmit.vue:134", e.detail.value); this.reasons = this.reasonsOptions[e.detail.value].dictLabel; }, submit() { if (this.reasons == "请选择") { uni.showToast({ icon: "none", title: "请选择原因" }); return; } if (this.refundAmount < 0) { uni.showToast({ icon: "none", title: "请输入退款金额" }); return; } var productIds = this.items.map((item2) => item2.productId); var products = []; for (var i = 0; i < productIds.length; i++) { var item = { productId: productIds[i] }; products.push(item); } var data = { refundAmount: this.refundAmount, orderId: this.orderId, refundType: this.type, reasons: this.reasons, explains: this.explains, productList: products }; applyAfterSales(data).then((res) => { if (res.code == 200) { uni.showToast({ icon: "success", title: "提交成功" }); setTimeout(function() { uni.$emit("refreshOrder"); uni.navigateBack({ delta: 1 }); }, 500); } else { uni.showToast({ icon: "none", title: res.msg }); } }); } } }; function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) { const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createCommentVNode(" 药品列表 "), vue.createElementVNode("view", { class: "drug-list" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createCommentVNode(" 药品信息 "), $data.order != null ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.items, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "drug-info", key: index2 }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image, mode: "aspectFit" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(JSON.parse(item.jsonInfo).productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec" }, vue.toDisplayString(JSON.parse(item.jsonInfo).sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "price-num" }, [ vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), vue.createElementVNode( "text", { class: "price" }, vue.toDisplayString(JSON.parse(item.jsonInfo).price.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "num" }, "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createCommentVNode(" 申请原因 "), vue.createElementVNode("view", { class: "reason-apply" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("text", { class: "label" }, "退款金额"), vue.withDirectives(vue.createElementVNode( "input", { class: "money", type: "text", disabled: "", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.refundAmount = $event), placeholder: "退款金额", "placeholder-class": "form-input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.refundAmount] ]) ]), vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("text", { class: "label" }, "申请原因"), vue.createElementVNode("picker", { onChange: _cache[1] || (_cache[1] = (...args) => $options.handleReasons && $options.handleReasons(...args)), value: $data.reasons, "range-key": "dictLabel", range: $data.reasonsOptions }, [ vue.createElementVNode("view", { class: "chose-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.reasons), 1 /* TEXT */ ), vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ], 40, ["value", "range"]) ]), vue.createElementVNode("view", { class: "textarea-box" }, [ vue.createVNode(_component_u__textarea, { height: 100, modelValue: $data.explains, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.explains = $event), placeholder: "请描述申请售后服务的具体原因", count: 100 }, null, 8, ["modelValue"]) ]) ]), vue.createCommentVNode(" 退回方式 "), vue.createCommentVNode(' \r\n \r\n 退货方式\r\n 用户发货\r\n \r\n \r\n 请您在审核通过后7天内,将商品发货到指定点\r\n \r\n \r\n 联系人\r\n 张三 1572325612\r\n \r\n \r\n 发货地址\r\n 重庆市江北区建玛特商场5楼\r\n \r\n '), vue.createCommentVNode(" 底部按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "sub-btn", onClick: _cache[3] || (_cache[3] = ($event) => $options.submit()) }, "申请售后") ]) ]) ]); } const Pages_orderStoreOrderRefundSubmit = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundSubmit.vue"]]); const _sfc_main$O = { mixins: [MescrollMixin], data() { return { statusOptions: [], tabs: [ { name: "全部", id: "0" }, { name: "售后中", id: "1" }, { name: "已完成", id: "2" } ], status: 0, mescroll: null, // 上拉加载的配置 upOption: { onScroll: true, use: true, // 是否启用上拉加载; 默认true page: { num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, // 列表数据 dataList: [] }; }, onLoad(option) { var that = this; uni.$on("refreshAfterSales", () => { that.mescroll.resetUpScroll(); }); this.getDictByKey("sys_after_sales_status"); }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_after_sales_status") { this.statusOptions = res.data; } } }, (err) => { } ); }, tabChange(item) { this.status = item.id; this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { status: this.status, pageNum: page2.num, pageSize: page2.size }; getStoreAfterSalesList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, // 查看订单详情 showDetail(item) { uni.navigateTo({ url: "./storeOrderRefundDetails?id=" + item.id }); } } }; function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["list", "onChange"]) ]), vue.createCommentVNode(" 订单列表 "), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: _ctx.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item" }, [ vue.createCommentVNode(" 订单号,状态 "), vue.createElementVNode("view", { class: "ordersn-box" }, [ vue.createElementVNode( "view", { class: "num" }, "订单号:" + vue.toDisplayString(item.orderCode), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode( "text", { class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.statusOptions, item.salesStatus)), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 药品列表 "), vue.createElementVNode("view", { class: "drug-list" }, [ item != null ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(item.items, (subitem, j) => { return vue.openBlock(), vue.createElementBlock("view", { key: j, class: "drug-item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: JSON.parse(subitem.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(subitem.jsonInfo).image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "drug-info" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode("view", { class: "name-box ellipsis2" }, [ vue.createCommentVNode(' 处方药 '), vue.createTextVNode( " " + vue.toDisplayString(JSON.parse(subitem.jsonInfo).productName), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "spec" }, "规格:" + vue.toDisplayString(JSON.parse(subitem.jsonInfo).sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode("view", { class: "price" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(JSON.parse(subitem.jsonInfo).price.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "amount" }, "x" + vue.toDisplayString(JSON.parse(subitem.jsonInfo).num), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 实付金额、按钮 "), vue.createElementVNode("view", { class: "bottom-box" }, [ vue.createElementVNode("view", { class: "amount-paid" }, [ vue.createElementVNode("text", { class: "label" }, "退款金额:"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("view", { class: "unit" }, "¥"), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString(item.refundAmount.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn pay", onClick: ($event) => $options.showDetail(item) }, "查看详情", 8, ["onClick"]) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_orderStoreOrderRefundList = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundList.vue"]]); const _sfc_main$N = { data() { return { statusOptions: [], sales: {}, items: [], order: null, salesId: null, // 状态栏的高度 statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight }; }, onLoad(option) { this.id = option.id; }, onShow() { this.getStoreAfterSalesById(); this.getDictByKey("sys_after_sales_status"); }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_after_sales_status") { this.statusOptions = res.data; } } }, (err) => { } ); }, addDeliverySn() { uni.navigateTo({ url: "./storeOrderRefundAddDelivery?id=" + this.id }); }, revoke() { var data = { id: this.id }; revoke(data).then((res) => { if (res.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); setTimeout(function() { uni.$emit("refreshAfterSales"); uni.navigateBack({ delta: 1 }); }, 500); } else { uni.showToast({ icon: "none", title: res.msg }); } }); }, getStoreAfterSalesById() { var data = { id: this.id }; getStoreAfterSalesById(data).then((res) => { if (res.code == 200) { this.sales = res.sales; this.items = res.items; this.order = res.order; } else { uni.showToast({ icon: "none", title: res.msg }); } }); }, showLogs(status) { uni.navigateTo({ url: "./refundOrderLogs?orderStatus=" + status }); } } }; function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-cont" }, [ vue.createElementVNode("view", { class: "bg" }), vue.createElementVNode("view", { class: "top-inner" }, [ vue.createCommentVNode(" 订单状态 "), vue.createElementVNode("view", { class: "order-status" }, [ vue.createCommentVNode(" 处理中 "), $data.sales.salesStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/a4bf17c7fb7342118f5ba52911fbcd84.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "售后中"), vue.createElementVNode("text", { class: "desc" }, "请等待客服处理...") ]) ])) : vue.createCommentVNode("v-if", true), $data.sales.salesStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5be93a404ff148c99ff41b39a3b23665.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "售后取消"), vue.createElementVNode("text", { class: "desc" }, "用户已取消售后") ]) ])) : vue.createCommentVNode("v-if", true), $data.sales.salesStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5be93a404ff148c99ff41b39a3b23665.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "售后取消"), vue.createElementVNode("text", { class: "desc" }, "商家已拒绝...") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 退款成功 "), $data.sales.salesStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/09e5cf7de97d4ee6aa9f0c778599d760.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "退款成功"), vue.createElementVNode("text", { class: "desc" }, "已退款,退款金额将按原支付退回") ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createCommentVNode(" 退款信息 "), vue.createElementVNode("view", { class: "refund-info" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "title" }, "退款金额"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), $data.sales.refundAmount != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "num" }, vue.toDisplayString($data.sales.refundAmount.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("text", { class: "text" }, [ vue.createElementVNode( "text", { class: "text success" }, vue.toDisplayString(_ctx.$getDictLabelName($data.statusOptions, $data.sales.salesStatus)), 1 /* TEXT */ ) ]) ]) ]), $data.sales.status >= 1 && $data.sales.refundType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "refund-item" }, [ vue.createElementVNode( "view", { class: "text" }, "收件人:" + vue.toDisplayString($data.sales.consignee), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "text" }, "电话:" + vue.toDisplayString($data.sales.address), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "text" }, "收件地址:" + vue.toDisplayString($data.sales.phoneNumber), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $data.sales.salesStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn-box" }, [ $data.sales.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn cancel", onClick: _cache[0] || (_cache[0] = ($event) => $options.addDeliverySn()) }, "填写物流")) : vue.createCommentVNode("v-if", true), $data.sales.status == 0 || $data.sales.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn cancel", onClick: _cache[1] || (_cache[1] = ($event) => $options.revoke()) }, "撤销申请")) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(' 查看进度 ') ])) : vue.createCommentVNode("v-if", true), $data.sales.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "refund-item" }, [ vue.createElementVNode("view", { class: "text" }, "已提交等待平台审核 ") ])) : vue.createCommentVNode("v-if", true), $data.sales.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "refund-item" }, [ vue.createElementVNode("view", { class: "text" }, "平台已审核,等待用户发货 ") ])) : vue.createCommentVNode("v-if", true), $data.sales.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "refund-item" }, [ vue.createElementVNode("view", { class: "text" }, "用户已发货,等待仓库审核 ") ])) : vue.createCommentVNode("v-if", true), $data.sales.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "refund-item" }, [ vue.createElementVNode("view", { class: "text" }, "财务审核 ") ])) : vue.createCommentVNode("v-if", true), $data.sales.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 6, class: "refund-item" }, [ vue.createElementVNode("view", { class: "text" }, "已完成 ") ])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "content" }, [ vue.createCommentVNode(" 退货信息 "), vue.createElementVNode("view", { class: "return-info" }, [ vue.createCommentVNode(' \r\n 退货信息\r\n 共{{items.length}}件\r\n '), vue.createCommentVNode(" 退货列表 "), vue.createElementVNode("view", { class: "goods-list" }, [ $data.sales != null ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.items, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "info-box" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(JSON.parse(item.jsonInfo).productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec" }, "规格:" + vue.toDisplayString(JSON.parse(item.jsonInfo).sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "price-num" }, [ vue.createElementVNode("view", { class: "price" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(JSON.parse(item.jsonInfo).price.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "num" }, "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num), 1 /* TEXT */ ) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 详细信息 "), vue.createElementVNode("view", { class: "refund-det-info" }, [ vue.createElementVNode("view", { class: "det-item" }, [ vue.createElementVNode("text", { class: "label" }, "退货原因"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.sales.reasons), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "det-item" }, [ vue.createElementVNode("text", { class: "label" }, "退货说明"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.sales.explains), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "det-item" }, [ vue.createElementVNode("text", { class: "label" }, "退款金额"), $data.sales.refundAmount != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.sales.refundAmount.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "det-item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderCode), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "det-item" }, [ vue.createElementVNode("text", { class: "label" }, "申请时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.sales.createTime), 1 /* TEXT */ ) ]) ]) ]) ]) ]) ]) ]) ]); } const Pages_orderStoreOrderRefundDetails = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundDetails.vue"]]); const _sfc_main$M = { data() { return { form: { salesId: null, deliverySn: null, deliveryName: null } }; }, onLoad(option) { this.form.id = option.id; }, methods: { submit() { if (this.form.deliveryName == null) { uni.showToast({ icon: "none", title: "请输入快递公司" }); return; } if (this.form.deliverySn == null) { uni.showToast({ icon: "none", title: "请输入快递单号" }); return; } addDelivery(this.form).then( (res) => { if (res.code == 200) { uni.showToast({ icon: "success", title: "提交成功" }); uni.navigateBack({ delta: 1 }); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "form-box" }, [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "快递公司"), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.deliveryName = $event), placeholder: "请输入物流公司", "placeholder-class": "form-input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.deliveryName] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "快递单号"), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.deliverySn = $event), placeholder: "请输入物流单号", "placeholder-class": "form-input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.deliverySn] ]) ]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "sub-btn", onClick: _cache[2] || (_cache[2] = ($event) => $options.submit()) }, "提交") ]) ]); } const Pages_orderStoreOrderRefundAddDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundAddDelivery.vue"]]); const _sfc_main$L = { data() { return { statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, orderId: null, order: null }; }, onLoad(option) { this.orderId = option.orderId; }, onShow() { this.getPackageOrderById(); }, methods: { leftClick() { uni.showToast({ title: "请帮好友支付", icon: "none" }); }, copyTest(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, getPackageOrderById() { var data = { orderId: this.orderId }; var that = this; uni.showLoading(); getSharePackageOrderById(data).then( (res) => { if (res.code == 200) { uni.hideLoading(); that.order = res.order; } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, payOrder() { var data = { orderId: this.orderId }; var that = this; uni.showLoading(); payment$2(data).then( (res) => { if (res.code == 200) { if (res.isPay == 0) { if (res.type == "tz") { uni.setStorageSync("ztPayUrl", res.data.body.url); uni.navigateTo({ url: "/pages_order/tzPay" }); } if (res.type == "yb") { var payData = JSON.parse(res.data.pay_info); formatAppLog("log", "at pages_order/packageOtherPayment.vue:116", payData); uni.requestPayment({ provider: "wxpay", timeStamp: payData.timeStamp, nonceStr: payData.nonceStr, package: payData.package, signType: payData.signType, paySign: payData.paySign, success: function(res2) { formatAppLog("log", "at pages_order/packageOtherPayment.vue:125", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "./packageOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } else if (res.type == "wx") { uni.requestPayment({ provider: "wxpay", timeStamp: res.data.timeStamp, nonceStr: res.data.nonceStr, package: res.data.packageValue, signType: res.data.signType, paySign: res.data.paySign, success: function(res2) { formatAppLog("log", "at pages_order/packageOtherPayment.vue:152", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "./packageOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } } else { uni.hideLoading(); uni.redirectTo({ url: "./packageOrderPaySuccess?orderId=" + that.order.orderId }); } } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", null, [ vue.createVNode(_component_u_navbar, { title: "亲友代付", onLeftClick: $options.leftClick }, null, 8, ["onLeftClick"]) ]), vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createCommentVNode(" 时间、价格 "), vue.createElementVNode("view", { class: "time-price" }, [ vue.createElementVNode("text", { class: "time" }, "请帮好友支付"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "num" }, vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createCommentVNode(" 订单详情查看 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder()) }, "帮TA支付") ]) ]); } const Pages_orderPackageOtherPayment = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOtherPayment.vue"]]); const _sfc_main$K = { data() { return { payMethod: null, orderId: null, order: null }; }, onLoad(option) { this.orderId = option.orderId; this.payMethod = option.payMethod; }, onShow() { this.getPackageOrderById(); }, onShareAppMessage(res) { var that = this; if (this.$isLogin()) { return { title: "亲友代付", path: "/pages_order/packageOtherPayment?orderId=" + that.orderId, imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; } }, methods: { copyTest(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, getPackageOrderById() { var data = { orderId: this.orderId }; formatAppLog("log", "at pages_order/packagePayment.vue:85", data); getPackageOrderById(data).then( (res) => { if (res.code == 200) { this.order = res.order; if (this.payMethod != null && this.payMethod == "app") { this.payOrder(); } } }, (rej) => { } ); }, payOrder() { var data = { orderId: this.orderId }; var that = this; uni.showLoading(); payment$2(data).then( (res) => { if (res.code == 200) { if (res.isPay == 0) { if (res.type == "tz") { uni.setStorageSync("ztPayUrl", res.data.body.url); uni.navigateTo({ url: "/pages_order/tzPay" }); } if (res.type == "yb") { var payData = JSON.parse(res.data.pay_info); formatAppLog("log", "at pages_order/packagePayment.vue:118", payData); uni.requestPayment({ provider: "wxpay", timeStamp: payData.timeStamp, nonceStr: payData.nonceStr, package: payData.package, signType: payData.signType, paySign: payData.paySign, success: function(res2) { formatAppLog("log", "at pages_order/packagePayment.vue:127", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "./packageOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } else if (res.type == "hf") { var payData = JSON.parse(res.data.pay_info); formatAppLog("log", "at pages_order/packagePayment.vue:147", payData); uni.requestPayment({ provider: "wxpay", timeStamp: payData.timeStamp, nonceStr: payData.nonceStr, package: payData.package, signType: payData.signType, paySign: payData.paySign, success: function(res2) { formatAppLog("log", "at pages_order/packagePayment.vue:156", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "./packageOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } else if (res.type == "wx") { uni.requestPayment({ provider: "wxpay", timeStamp: res.data.timeStamp, nonceStr: res.data.nonceStr, package: res.data.packageValue, signType: res.data.signType, paySign: res.data.paySign, success: function(res2) { formatAppLog("log", "at pages_order/packagePayment.vue:183", that.order.orderId); uni.hideLoading(); uni.redirectTo({ url: "./packageOrderPaySuccess?orderId=" + that.order.orderId }); }, fail: function(err) { uni.showToast({ icon: "none", title: "fail:" + JSON.stringify(err) }); uni.hideLoading(); } }); } } else { uni.hideLoading(); uni.redirectTo({ url: "./packageOrderPaySuccess?orderId=" + that.order.orderId }); } } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "inner-box" }, [ vue.createCommentVNode(" 时间、价格 "), vue.createElementVNode("view", { class: "time-price" }, [ vue.createElementVNode("text", { class: "time" }, "订单金额"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 订单详情查看 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 底部按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder()) }, "立即支付")) : vue.createCommentVNode("v-if", true), $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn1" }, [ vue.createTextVNode(" 亲友代付 "), vue.createElementVNode("button", { class: "share-btn", "data-name": "shareBtn", "open-type": "share" }) ])) : vue.createCommentVNode("v-if", true) ]) ]); } const Pages_orderPackagePayment = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packagePayment.vue"]]); const props$3 = { props: { // 是否展示工具条 show: { type: Boolean, default: props$y.toolbar.show }, // 取消按钮的文字 cancelText: { type: String, default: props$y.toolbar.cancelText }, // 确认按钮的文字 confirmText: { type: String, default: props$y.toolbar.confirmText }, // 取消按钮的颜色 cancelColor: { type: String, default: props$y.toolbar.cancelColor }, // 确认按钮的颜色 confirmColor: { type: String, default: props$y.toolbar.confirmColor }, // 标题文字 title: { type: String, default: props$y.toolbar.title } } }; const _sfc_main$J = { name: "u-toolbar", mixins: [mpMixin, mixin, props$3], methods: { // 点击取消按钮 cancel() { this.$emit("cancel"); }, // 点击确定按钮 confirm() { this.$emit("confirm"); } } }; function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-toolbar", onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"])) }, [ vue.createElementVNode("view", { class: "u-toolbar__cancel__wrapper", "hover-class": "u-hover-class" }, [ vue.createElementVNode( "text", { class: "u-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: "u-toolbar__title u-line-1" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-toolbar__confirm__wrapper", "hover-class": "u-hover-class" }, [ vue.createElementVNode( "text", { class: "u-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 */ ) ]) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-eadae74e"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]); const props$2 = { props: { // 是否展示picker弹窗 show: { type: Boolean, default: props$y.picker.show }, // 是否展示顶部的操作栏 showToolbar: { type: Boolean, default: props$y.picker.showToolbar }, // 顶部标题 title: { type: String, default: props$y.picker.title }, // 对象数组,设置每一列的数据 columns: { type: Array, default: props$y.picker.columns }, // 是否显示加载中状态 loading: { type: Boolean, default: props$y.picker.loading }, // 各列中,单个选项的高度 itemHeight: { type: [String, Number], default: props$y.picker.itemHeight }, // 取消按钮的文字 cancelText: { type: String, default: props$y.picker.cancelText }, // 确认按钮的文字 confirmText: { type: String, default: props$y.picker.confirmText }, // 取消按钮的颜色 cancelColor: { type: String, default: props$y.picker.cancelColor }, // 确认按钮的颜色 confirmColor: { type: String, default: props$y.picker.confirmColor }, // 每列中可见选项的数量 visibleItemCount: { type: [String, Number], default: props$y.picker.visibleItemCount }, // 选项对象中,需要展示的属性键名 keyName: { type: String, default: props$y.picker.keyName }, // 是否允许点击遮罩关闭选择器 closeOnClickOverlay: { type: Boolean, default: props$y.picker.closeOnClickOverlay }, // 各列的默认索引 defaultIndex: { type: Array, default: props$y.picker.defaultIndex }, // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效 immediateChange: { type: Boolean, default: props$y.picker.immediateChange } } }; const _sfc_main$I = { name: "u-picker", mixins: [mpMixin, mixin, props$2], data() { return { // 上一次选择的列索引 lastIndex: [], // 索引值 ,对应picker-view的value innerIndex: [], // 各列的值 innerColumns: [], // 上一次的变化列索引 columnIndex: 0 }; }, watch: { // 监听默认索引的变化,重新设置对应的值 defaultIndex: { immediate: true, handler(n) { this.setIndexs(n, true); } }, // 监听columns参数的变化 columns: { immediate: true, deep: true, handler(n) { this.setColumns(n); } } }, emits: ["close", "cancel", "confirm", "change"], methods: { // 获取item需要显示的文字,判别为对象还是文本 getItemText(item) { if (uni.$u.test.object(item)) { return item[this.keyName]; } else { return item; } }, // 关闭选择器 closeHandler() { if (this.closeOnClickOverlay) { this.$emit("close"); } }, // 点击工具栏的取消按钮 cancel() { this.$emit("cancel"); }, // 点击工具栏的确定按钮 confirm() { this.$emit("confirm", { indexs: this.innerIndex, value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]), values: this.innerColumns }); }, // 选择器某一列的数据发生变化时触发 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", { // 微信小程序不能传递this,会因为循环引用而报错 picker: this, value: this.innerColumns.map((item, index3) => item[value2[index3]]), index: index2, indexs: value2, // values为当前变化列的数组内容 values, columnIndex }); }, // 设置index索引,此方法可被外部调用设置 setIndexs(index2, setLastIndex) { this.innerIndex = uni.$u.deepClone(index2); if (setLastIndex) { this.setLastIndex(index2); } }, // 记录上一次的各列索引位置 setLastIndex(index2) { this.lastIndex = uni.$u.deepClone(index2); }, // 设置对应列选项的所有值 setColumnValues(columnIndex, values) { this.innerColumns.splice(columnIndex, 1, values); let tmpIndex = uni.$u.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 uni.$u.sleep(); })(); return this.innerColumns[columnIndex]; }, // 设置整体各列的columns的值 setColumns(columns) { formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns); this.innerColumns = uni.$u.deepClone(columns); if (this.innerIndex.length === 0) { this.innerIndex = new Array(columns.length).fill(0); } }, // 获取各列选中值对应的索引 getIndexs() { return this.innerIndex; }, // 获取各列选中的值 getValues() { (async () => { await uni.$u.sleep(); })(); return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]); } } }; function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$1); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); return vue.openBlock(), vue.createBlock(_component_u_popup, { show: _ctx.show, onClose: $options.closeHandler }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-picker" }, [ _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_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: "u-picker__view", indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`, value: $data.innerIndex, immediateChange: _ctx.immediateChange, style: vue.normalizeStyle({ height: `${_ctx.$u.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: "u-picker__view__column" }, [ _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(item, (item1, index1) => { return vue.openBlock(), vue.createElementBlock( "text", { class: "u-picker__view__column__item u-line-1", key: index1, style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.itemHeight), lineHeight: _ctx.$u.addUnit(_ctx.itemHeight), fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal" }) }, 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: "u-picker--loading" }, [ vue.createVNode(_component_u_loading_icon, { mode: "circle" }) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["show", "onClose"]); } const __easycom_10 = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-91b05052"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]); const _sfc_main$H = { data() { return { cityIndex1: 0, cityIndex2: 0, allCitys: [], citys: [[], [], []], cityShow: false, depts: [[]], deptShow: false, hospitals: [[]], hospitalShow: false, positions: [[]], positionShow: false, fileList1: [], fileList2: [], fileList3: [], fileList4: [], checked: 0, form: { sex: "1" }, rules: { doctorName: [ { required: true, message: "请输入医生姓名" } ], idCard: [ { required: true, message: "请输入身份证号", // 可以单个或者同时写两个触发验证方式 trigger: ["change", "blur"] } ], deptId: [ { required: true, message: "请选择部门" } ], hospitalId: [ { required: true, message: "请选择医院" } ], position: [ { required: true, message: "请选择职务" } ], cityIds: [ { required: true, message: "请选择所在城市" } ], account: [ { required: true, message: "请输入帐号" } ], password: [ { required: true, message: "请输入密码" } ], mobile: [ { required: true, message: "请输入手机号", // 可以单个或者同时写两个触发验证方式 trigger: ["change", "blur"] } ] } }; }, onLoad(options) { this.form.doctorType = options.type; this.getCitys(); this.getHospitalList(); this.getDepartmentList(); this.getDictByKey("sys_doc_position"); }, onShow() { }, onReady() { this.$refs.uForm.setRules(this.rules); }, methods: { hospitalSelect(e) { this.form.hospitalId = this.hospitals[0][e.indexs[0]].hospitalId; this.form.hospitalName = this.hospitals[0][e.indexs[0]].hospitalName; this.hospitalShow = false; }, deptSelect(e) { formatAppLog("log", "at pages_user/registerDoctor.vue:307", e); this.form.deptId = this.depts[0][e.indexs[0]].deptId; this.form.deptName = this.depts[0][e.indexs[0]].deptName; this.deptShow = false; }, positionSelect(e) { formatAppLog("log", "at pages_user/registerDoctor.vue:313", e); this.form.position = this.positions[0][e.indexs[0]].dictLabel; this.positionShow = false; }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { this.positions[0] = res.data; } }, (err) => { } ); }, openContent(type2) { uni.navigateTo({ url: "agreement?type=" + type2 }); }, cityChangeHandler(e) { const { columnIndex, index: index2, // 微信小程序无法将picker实例传出来,只能通过ref操作 picker = this.$refs.cityPicker } = e; if (columnIndex == 0) { this.cityIndex1 = index2; formatAppLog("log", "at pages_user/registerDoctor.vue:344", this.cityIndex1); var citys1 = this.allCitys[this.cityIndex1].c; formatAppLog("log", "at pages_user/registerDoctor.vue:347", citys1); picker.setColumnValues(1, citys1); this.cityIndex2 = 0; var citys2 = this.allCitys[this.cityIndex1].c[this.cityIndex2].c; picker.setColumnValues(2, citys2); } if (columnIndex == 1) { this.cityIndex2 = index2; var citys = this.allCitys[this.cityIndex1].c[this.cityIndex2].c; formatAppLog("log", "at pages_user/registerDoctor.vue:357", citys); picker.setColumnValues(2, citys); } }, citySelect(e) { formatAppLog("log", "at pages_user/registerDoctor.vue:363", e); this.form.cityName = e.value[0].n + ">" + e.value[1].n + ">" + e.value[2].n; this.form.cityIds = e.value[0].v + "," + e.value[1].v + "," + e.value[2].v; this.cityShow = false; }, getCitys() { var that = this; var data = {}; getCitys(data).then( (res) => { if (res.code == 200) { that.allCitys = res.data; that.citys = [[], [], []]; that.citys[0] = that.allCitys; that.citys[1] = that.allCitys[0].c; that.citys[2] = that.allCitys[0].c[0].c; formatAppLog("log", "at pages_user/registerDoctor.vue:380", that.citys); } }, (err) => { } ); }, getHospitalList() { var that = this; var data = {}; getHospitalList$1(data).then( (res) => { if (res.code == 200) { that.hospitals[0] = res.data; formatAppLog("log", "at pages_user/registerDoctor.vue:395", 111); formatAppLog("log", "at pages_user/registerDoctor.vue:396", that.hospitals); } }, (err) => { } ); }, getDepartmentList() { var that = this; var data = {}; getDepartmentList$1(data).then( (res) => { if (res.code == 200) { that.depts[0] = res.data; } }, (err) => { } ); }, deletePic(event) { this[`fileList${event.name}`].splice(event.index, 1); }, async afterRead(event) { let lists = [].concat(event.file); let fileListLen = this[`fileList${event.name}`].length; lists.map((item) => { this[`fileList${event.name}`].push({ ...item, status: "uploading", message: "上传中" }); }); for (let i = 0; i < lists.length; i++) { const result = await this.uploadFilePromise(lists[i].url); let item = this[`fileList${event.name}`][fileListLen]; this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { status: "success", message: "", url: result })); fileListLen++; } }, uploadFilePromise(url2) { return new Promise((resolve, reject2) => { uni.uploadFile({ url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS", filePath: url2, name: "file", formData: { user: "test" }, success: (res) => { setTimeout(() => { formatAppLog("log", "at pages_user/registerDoctor.vue:455", JSON.parse(res.data).url); resolve(JSON.parse(res.data).url); }, 1e3); } }); }); }, register() { registerDoctor(this.form).then( (res) => { formatAppLog("log", "at pages_user/registerDoctor.vue:465", res); if (res.code == 200) { uni.showToast({ icon: "none", title: res.msg }); setTimeout(function() { uni.navigateBack({ delta: 1 }); }, 2e3); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { formatAppLog("log", "at pages_user/registerDoctor.vue:484", rej); } ); }, submit() { var that = this; if (this.fileList1.length > 0) { this.form.avatar = this.fileList1[0].url; } if (this.fileList2.length > 0) { var images = []; that.fileList2.forEach(function(item) { images.push(item.url); }); if (images.length != 2) { uni.showToast({ icon: "none", title: "请上传身份证号" }); return; } this.form.idCardFrontUrl = images[0]; this.form.idCardBackUrl = images[1]; } if (this.fileList3.length > 0) { var images = []; that.fileList3.forEach(function(item) { images.push(item.url); }); this.form.certificateImages = images.toString(); } if (this.fileList4.length > 0) { var images = []; that.fileList4.forEach(function(item) { images.push(item.url); }); this.form.practiseImages = images.toString(); } if (this.checked != 1) { uni.showToast({ icon: "none", title: "请同意协议" }); return; } formatAppLog("log", "at pages_user/registerDoctor.vue:530", this.form); this.$refs.uForm.validate().then((res) => { that.register(); }).catch((errors) => { formatAppLog("log", "at pages_user/registerDoctor.vue:534", errors); }); } } }; function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$2); const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1); const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1); const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2); const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5); const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6); const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_7); const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3); const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4); const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_10); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "bg" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/74645f3b57bc45b08b35e2449fdf90c7.jpg" }), $data.form.doctorType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "title" }, "医生注册")) : vue.createCommentVNode("v-if", true), $data.form.doctorType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "desc" }, "请填写医生资料")) : vue.createCommentVNode("v-if", true), $data.form.doctorType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "title" }, "药师注册")) : vue.createCommentVNode("v-if", true), $data.form.doctorType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "desc" }, "请填写药师资料")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "my-form" }, [ vue.createVNode(_component_u_form, { rules: $data.rules, model: $data.form, ref: "uForm", labelPosition: "left" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "真实姓名", prop: "doctorName" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { border: "none", placeholder: "请输入真实姓名", modelValue: $data.form.doctorName, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.doctorName = $event) }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "身份证号", prop: "idCard" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { border: "none", placeholder: "请输入身份证号", modelValue: $data.form.idCard, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.idCard = $event) }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "性别", prop: "sex" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_radio_group, { placement: "row", modelValue: $data.form.sex, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.sex = $event) }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_radio, { activeColor: "#C39A58", customStyle: { marginRight: "8px" }, key: "1", label: "男", name: "1" }), vue.createVNode(_component_u_radio, { activeColor: "#C39A58", key: "2", label: "女", name: "2" }) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", prop: "cityId", onClick: _cache[4] || (_cache[4] = ($event) => $data.cityShow = true), borderBottom: "", label: "所在城市" }, { right: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "arrow-right" }) ]), default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { modelValue: $data.form.cityName, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.cityName = $event), disabled: "", disabledColor: "#ffffff", placeholder: "请选择所在城市", border: "none" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", prop: "hospitalId", onClick: _cache[6] || (_cache[6] = ($event) => $data.hospitalShow = true), borderBottom: "", label: "就职医院" }, { right: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "arrow-right" }) ]), default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { modelValue: $data.form.hospitalName, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.hospitalName = $event), disabled: "", disabledColor: "#ffffff", placeholder: "请选择医院", border: "none" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", prop: "deptId", onClick: _cache[8] || (_cache[8] = ($event) => $data.deptShow = true), borderBottom: "", label: "所属科室" }, { right: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "arrow-right" }) ]), default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { modelValue: $data.form.deptName, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.form.deptName = $event), disabled: "", disabledColor: "#ffffff", placeholder: "请选择科室", border: "none" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", prop: "position", onClick: _cache[10] || (_cache[10] = ($event) => $data.positionShow = true), borderBottom: "", label: "职称" }, { right: vue.withCtx(() => [ vue.createVNode(_component_u_icon, { name: "arrow-right" }) ]), default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { modelValue: $data.form.position, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.form.position = $event), disabled: "", disabledColor: "#ffffff", placeholder: "请选择职称", border: "none" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "擅长领域", prop: "speciality" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u__textarea, { modelValue: $data.form.speciality, "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.form.speciality = $event), placeholder: "请输入擅长领域", count: "" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "个人简介", prop: "introduction" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u__textarea, { modelValue: $data.form.introduction, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.form.introduction = $event), placeholder: "请输入个人简介", count: "" }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "医生照片", prop: "avatar" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_upload, { fileList: $data.fileList1, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "1", multiple: "", maxCount: 1 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "身份证照片(正反面)", prop: "idCardFrontUrl" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_upload, { fileList: $data.fileList2, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "2", multiple: "", maxCount: 2 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "资质证编号", prop: "certificateCode" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { border: "none", placeholder: "请输入资质证编号", modelValue: $data.form.certificateCode, "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.form.certificateCode = $event) }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "资质证书", prop: "certificateImages" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_upload, { fileList: $data.fileList3, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "3", maxCount: 3 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "执业证编号", prop: "practiseCode" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { border: "none", placeholder: "请输入执业证编号", modelValue: $data.form.practiseCode, "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $data.form.practiseCode = $event) }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "执业证书", prop: "certificateImages" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_upload, { fileList: $data.fileList4, onAfterRead: $options.afterRead, onDelete: $options.deletePic, name: "4", maxCount: 3 }, null, 8, ["fileList", "onAfterRead", "onDelete"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "联系电话", prop: "mobile" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { border: "none", placeholder: "请输入联系电话", modelValue: $data.form.mobile, "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $data.form.mobile = $event) }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", borderBottom: "", label: "登录帐号", prop: "account" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { border: "none", placeholder: "请输入登录帐号", modelValue: $data.form.account, "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $data.form.account = $event) }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }), vue.createVNode(_component_u_form_item, { labelWidth: "180rpx", label: "登录密码", prop: "password" }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_input, { border: "none", type: "password", placeholder: "请输入登录密码", modelValue: $data.form.password, "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => $data.form.password = $event) }, null, 8, ["modelValue"]) ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }, 8, ["rules", "model"]) ]), vue.createElementVNode("view", { class: "agree" }, [ vue.createVNode(_component_u_checkbox_group, { modelValue: $data.checked, "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => $data.checked = $event), placement: "column" }, { default: vue.withCtx(() => [ (vue.openBlock(), vue.createBlock(_component_u_checkbox, { activeColor: "#2BC7B9", customStyle: { marginRight: "8px" }, key: 1, label: "同意", name: 1 })) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createElementVNode("text", { class: "text", onClick: _cache[19] || (_cache[19] = ($event) => $options.openContent("doctorRegister")) }, "《医生注册协议》"), vue.createElementVNode("text", { class: "text", onClick: _cache[20] || (_cache[20] = ($event) => $options.openContent("doctorFiling")) }, "《医生多机构备案协议》") ]), vue.createVNode(_component_u_picker, { ref: "cityPicker", onCancel: _cache[21] || (_cache[21] = ($event) => $data.cityShow = false), keyName: "n", onConfirm: $options.citySelect, onChange: $options.cityChangeHandler, show: $data.cityShow, columns: $data.citys }, null, 8, ["onConfirm", "onChange", "show", "columns"]), vue.createVNode(_component_u_picker, { ref: "deptPicker", onCancel: _cache[22] || (_cache[22] = ($event) => $data.deptShow = false), keyName: "deptName", onConfirm: $options.deptSelect, show: $data.deptShow, columns: $data.depts }, null, 8, ["onConfirm", "show", "columns"]), vue.createVNode(_component_u_picker, { onCancel: _cache[23] || (_cache[23] = ($event) => $data.hospitalShow = false), keyName: "hospitalName", onConfirm: $options.hospitalSelect, show: $data.hospitalShow, columns: $data.hospitals }, null, 8, ["onConfirm", "show", "columns"]), vue.createVNode(_component_u_picker, { ref: "positionPicker", onCancel: _cache[24] || (_cache[24] = ($event) => $data.positionShow = false), keyName: "dictLabel", onConfirm: $options.positionSelect, show: $data.positionShow, columns: $data.positions }, null, 8, ["onConfirm", "show", "columns"]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "sub-btn", onClick: _cache[25] || (_cache[25] = ($event) => $options.submit()) }, "提交") ]) ]) ]); } const Pages_userRegisterDoctor = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-be607d3d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/registerDoctor.vue"]]); const _sfc_main$G = { data() { return { tel: void 0, version: "1.0" }; }, onLoad() { const accountInfo = wx.getAccountInfoSync(); this.version = accountInfo.miniProgram.version; }, methods: { callPhone() { uni.makePhoneCall({ phoneNumber: "4000717770" }); }, submit() { } } }; function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "logo" }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/1287b2bf7c944538905f5092e8ff7db9.png" }), vue.createElementVNode("p", null, "芸医汇互联网医院") ]), vue.createElementVNode("view", { class: "set-box" }, [ vue.createElementVNode("view", { class: "item", onClick: _cache[0] || (_cache[0] = ($event) => $options.callPhone()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "text" }, "联系我们") ]), vue.createElementVNode("image", { class: "right", src: "/static/images/arrow_gray.png", mode: "aspectFill" }) ]), vue.createElementVNode("view", { style: { "height": "1px", "background-color": "#F5F6FA" } }), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "text" }, "在线客服") ]), vue.createElementVNode("image", { class: "right", src: "/static/images/arrow_gray.png", mode: "aspectFill" }), vue.createElementVNode("button", { class: "contact-btn", "open-type": "contact" }, " 1111 ") ]), vue.createElementVNode("view", { style: { "height": "1px", "background-color": "#F5F6FA" } }), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "text" }, "版本号") ]), vue.createElementVNode("view", { class: "right-text" }, [ vue.createElementVNode( "text", { class: "text" }, "v" + vue.toDisplayString($data.version), 1 /* TEXT */ ) ]) ]) ]) ]); } const Pages_userAbout = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__scopeId", "data-v-a8066ee1"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/about.vue"]]); const _sfc_main$F = { data() { return { address: [] }; }, onLoad() { var that = this; uni.$on("refreshAddress", () => { that.getAddressList(); }); }, onShow() { this.getAddressList(); }, methods: { selectAddress(item) { uni.$emit("updateAddress", item); uni.navigateBack({ delta: 1 }); }, editAddress(item) { uni.navigateTo({ url: "./addEditAddress?type=edit&addressId=" + item.addressId }); }, delAddress(item) { uni.showModal({ title: "提示", content: "确认删除此地址吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { var data = { addressId: item.addressId }; delAddress(data).then( (res2) => { if (res2.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); this.getAddressList(); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }); }, getAddressList() { getAddressList().then( (res) => { if (res.code == 200) { this.address = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, // 新建地址 addAddress() { uni.navigateTo({ url: "./addEditAddress?type=add" }); } } }; function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.address, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, onClick: vue.withModifiers(($event) => $options.selectAddress(item), ["stop"]), class: "address-item" }, [ vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "title" }, [ item.isDefault == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "tag" }, "默认")) : vue.createCommentVNode("v-if", true), vue.createTextVNode( " " + vue.toDisplayString(item.province) + vue.toDisplayString(item.city) + vue.toDisplayString(item.district) + vue.toDisplayString(item.detail), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "name-phone" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(item.realName), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$parsePhone(item.phone)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "operat-box" }, [ vue.createElementVNode("image", { src: "/static/images/del.png", mode: "", onClick: vue.withModifiers(($event) => $options.delAddress(item), ["stop"]) }, null, 8, ["onClick"]), vue.createElementVNode("image", { src: "/static/images/edit.png", mode: "", onClick: vue.withModifiers(($event) => $options.editAddress(item), ["stop"]) }, null, 8, ["onClick"]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), $data.address.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "no-data-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.getAddressList()) }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", mode: "aspectFit" }), vue.createElementVNode("view", { class: "empty-title" }, "暂无数据") ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "sub-btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.addAddress()) }, "新建收货地址") ]) ]); } const Pages_userAddress = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/address.vue"]]); const props$1 = { props: { // 是否为加载中状态 loading: { type: Boolean, default: props$y.switch.loading }, // 是否为禁用装填 disabled: { type: Boolean, default: props$y.switch.disabled }, // 开关尺寸,单位px size: { type: [String, Number], default: props$y.switch.size }, // 打开时的背景颜色 activeColor: { type: String, default: props$y.switch.activeColor }, // 关闭时的背景颜色 inactiveColor: { type: String, default: props$y.switch.inactiveColor }, // 通过v-model双向绑定的值 modelValue: { type: [Boolean, String, Number], default: props$y.switch.value }, // switch打开时的值 activeValue: { type: [String, Number, Boolean], default: props$y.switch.activeValue }, // switch关闭时的值 inactiveValue: { type: [String, Number, Boolean], default: props$y.switch.inactiveValue }, // 是否开启异步变更,开启后需要手动控制输入值 asyncChange: { type: Boolean, default: props$y.switch.asyncChange }, // 圆点与外边框的距离 space: { type: [String, Number], default: props$y.switch.space } } }; const _sfc_main$E = { name: "u-switch", mixins: [mpMixin, mixin, props$1], watch: { modelValue: { immediate: true, handler(n) { if (n !== this.inactiveValue && n !== this.activeValue) { uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一"); } } } }, data() { return { bgColor: "#ffffff" }; }, computed: { isActive() { return this.modelValue === this.activeValue; }, switchStyle() { let style = {}; style.width = uni.$u.addUnit(this.size * 2 + 2); style.height = uni.$u.addUnit(Number(this.size) + 2); if (this.customInactiveColor) { style.borderColor = "rgba(0, 0, 0, 0)"; } style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor; return style; }, nodeStyle() { let style = {}; style.width = uni.$u.addUnit(this.size - this.space); style.height = uni.$u.addUnit(this.size - this.space); const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size); style.transform = `translateX(-${translateX})`; return style; }, bgStyle() { let style = {}; style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2); style.height = uni.$u.addUnit(this.size); style.backgroundColor = this.inactiveColor; style.transform = `scale(${this.isActive ? 0 : 1})`; return style; }, customInactiveColor() { return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff"; } }, emits: ["update:modelValue", "change"], methods: { clickHandler() { if (!this.disabled && !this.loading) { const oldValue = this.isActive ? this.inactiveValue : this.activeValue; if (!this.asyncChange) { this.$emit("update:modelValue", oldValue); } this.$nextTick(() => { this.$emit("change", oldValue); }); } } } }; function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]), style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.createElementVNode( "view", { class: "u-switch__bg", style: vue.normalizeStyle([$options.bgStyle]) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]), style: vue.normalizeStyle([$options.nodeStyle]), ref: "u-switch__node" }, [ vue.createVNode(_component_u_loading_icon, { show: _ctx.loading, mode: "circle", timingFunction: "linear", color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD", size: _ctx.size * 0.6 }, null, 8, ["show", "color", "size"]) ], 6 /* CLASS, STYLE */ ) ], 6 /* CLASS, STYLE */ ); } const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-6ab257b3"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-switch/u-switch.vue"]]); const _sfc_main$D = { components: {}, data() { return { content: null, type: null, addressId: null, isDefault: false, addressList: [[], [], []], multiIndex: [0, 0, 0], address: [], form: { realName: null, phone: null, detail: null, address: null, isDefault: 0 } }; }, onLoad(option) { this.type = option.type; if (this.type == "edit") { uni.setNavigationBarTitle({ title: "修改收货地址" }); this.addressId = option.addressId; this.getAddressById(); } else { uni.setNavigationBarTitle({ title: "新增收货地址" }); } this.getCitys(); }, methods: { parseAddress() { if (this.content == null || this.content == "") { uni.showToast({ icon: "none", title: "请输入地址信息" }); return; } var data = { content: this.content }; parseAddress(data).then( (res) => { if (res.code == 200) { this.form.realName = res.data.name; this.form.phone = res.data.mobile; this.form.address = res.data.provinceName + res.data.cityName + res.data.expAreaName; this.form.province = res.data.provinceName; this.form.city = res.data.cityName; this.form.district = res.data.expAreaName; this.form.detail = res.data.streetName + res.data.address; this.form.detail = this.form.detail.replace(/\s+/g, ""); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, getAddressById() { var data = { addressId: this.addressId }; getAddressById(data).then( (res) => { if (res.code == 200) { this.form = res.data; this.isDefault = this.form.isDefault == 1 ? true : false; this.form.address = this.form.province + this.form.city + this.form.district; } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, submit() { if (this.type == "add") { this.addAddress(); } else if (this.type == "edit") { this.editAddress(); } }, editAddress() { this.form.isDefault = this.isDefault ? 1 : 0; editAddress(this.form).then( (res) => { if (res.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); setTimeout(function() { uni.$emit("refreshAddress"); uni.navigateBack({ delta: 1 }); }, 500); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, addAddress() { this.form.isDefault = this.isDefault ? 1 : 0; addAddress(this.form).then( (res) => { if (res.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); setTimeout(function() { uni.$emit("refreshAddress"); uni.navigateBack({ delta: 1 }); }, 500); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, // 地区选择 pickerChange(e) { this.multiIndex = e.detail.value; this.form.address = this.addressList[0][this.multiIndex[0]].n + this.addressList[1][this.multiIndex[1]].n + this.addressList[2][this.multiIndex[2]].n; this.form.province = this.addressList[0][this.multiIndex[0]].n; this.form.city = this.addressList[1][this.multiIndex[1]].n; this.form.district = this.addressList[2][this.multiIndex[2]].n; this.form.cityId = this.addressList[1][this.multiIndex[1]].v; }, pickerColumnchange(e) { if (e.detail.column === 0) { this.multiIndex[0] = e.detail.value; this.addressList[1] = this.address[this.multiIndex[0]].c; this.addressList[2] = this.address[this.multiIndex[0]].c[0].c; this.multiIndex.splice(1, 1, 0); this.multiIndex.splice(2, 1, 0); } if (e.detail.column === 1) { this.multiIndex[1] = e.detail.value; this.addressList[2] = this.address[this.multiIndex[0]].c[this.multiIndex[1]].c; this.multiIndex.splice(2, 1, 0); } if (e.detail.column === 2) { this.multiIndex[2] = e.detail.value; } }, getCitys() { getCitys().then( (res) => { if (res.code == 200) { this.address = res.data; for (var i = 0; i < this.address.length; i++) { this.addressList[0].push(this.address[i]); } for (var i = 0; i < this.address[0].c.length; i++) { this.addressList[1].push(this.address[0].c[i]); } for (var i = 0; i < this.address[0].c[0].c.length; i++) { this.addressList[2].push(this.address[0].c[0].c[i]); } } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "form-box" }, [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "收货人"), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.realName = $event), maxlength: "10", placeholder: "请输入姓名", class: "form-input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.realName] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "手机号"), vue.withDirectives(vue.createElementVNode( "input", { type: "number", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.phone = $event), maxlength: "11", placeholder: "请输入手机号", class: "form-input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.phone] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "所在地区"), vue.createElementVNode("picker", { value: $data.multiIndex, class: "birth-picker", mode: "multiSelector", "range-key": "n", range: $data.addressList, onChange: _cache[3] || (_cache[3] = (...args) => $options.pickerChange && $options.pickerChange(...args)), onColumnchange: _cache[4] || (_cache[4] = (...args) => $options.pickerColumnchange && $options.pickerColumnchange(...args)) }, [ vue.createElementVNode("view", { class: "right-box" }, [ vue.createElementVNode("view", { class: "input-box" }, [ vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.address = $event), placeholder: "请选择省市区", class: "form-input", disabled: "disabled" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.address] ]) ]), vue.createElementVNode("image", { class: "arrow", src: "/static/images/arrow_gray.png", mode: "" }) ]) ], 40, ["value", "range"]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "详细地址"), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.detail = $event), placeholder: "请输入详细地址", class: "form-input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.detail] ]) ]) ]), vue.createElementVNode("view", { class: "address-box" }, [ vue.withDirectives(vue.createElementVNode( "textarea", { class: "textarea", "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.content = $event), placeholder: "请粘贴或输入文本,点击'识别'自动识别姓名、电话、地址,格式:深圳市龙岗区坂田街道长坑路西2巷2号202 黄大大 18888888888" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.content] ]), vue.createElementVNode("view", { class: "btns" }, [ vue.createElementVNode("view", { class: "btn parse", onClick: _cache[7] || (_cache[7] = ($event) => $options.parseAddress()) }, "识别") ]) ]), vue.createCommentVNode(" 设为默认地址 "), vue.createElementVNode("view", { class: "setting-box" }, [ vue.createElementVNode("text", { class: "label" }, "设为默认地址"), vue.createVNode(_component_u_switch, { modelValue: $data.isDefault, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.isDefault = $event), activeColor: "#C39A58" }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "sub-btn", onClick: _cache[9] || (_cache[9] = ($event) => $options.submit()) }, "保存地址") ]) ]); } const Pages_userAddEditAddress = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/addEditAddress.vue"]]); const _sfc_main$C = { data() { return { user: { avatar: null, phone: "" } }; }, onLoad() { this.getUserInfo(); }, methods: { bindblur(e) { this.user.nickName = e.detail.value; }, bindinput(e) { this.user.nickName = e.detail.value; }, onChooseAvatar(e) { let { avatarUrl } = e.detail; uni.uploadFile({ url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS", //仅为示例,非真实的接口地址 filePath: avatarUrl, name: "file", formData: { "user": "test" // 上传附带参数 }, success: (uploadFileRes) => { this.user.avatar = JSON.parse(uploadFileRes.data).url; } }); }, // chooseImage() { // var that = this; // uni.chooseImage({ // count: 1, // 默认9 // sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有 // sourceType: ['album', 'camera'], //从相册选择 // success: (res) => { // uni.uploadFile({ // url: uni.getStorageSync('requestPath')+'/api/common/uploadOSS', //仅为示例,非真实的接口地址 // filePath: res.tempFilePaths[0], // name: 'file', // formData: { // 'user': 'test' // 上传附带参数 // }, // success: (uploadFileRes) => { // __f__('log','at pages_user/personInfo.vue:86',uploadFileRes) // this.user.avatar =JSON.parse(uploadFileRes.data).data.url // } // }); // } // }); // }, submit() { editUser(this.user).then( (res) => { if (res.code == 200) { uni.setStorageSync("avatar", this.avatar); uni.setStorageSync("nickName", this.nickName); uni.showToast({ icon: "success", title: "修改成功" }); this.getUserInfo(); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, getUserInfo() { getUserInfo$1().then( (res) => { if (res.code == 200) { if (res.user != null) { this.user = res.user; } else { this.utils.loginOut(); } } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode("view", { class: "label" }, "头像"), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("image", { class: "head", src: $data.user.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : $data.user.avatar, mode: "" }, null, 8, ["src"]), vue.createElementVNode( "button", { class: "wx-head", type: "balanced", "open-type": "chooseAvatar", onChooseavatar: _cache[0] || (_cache[0] = (...args) => $options.onChooseAvatar && $options.onChooseAvatar(...args)) }, null, 32 /* NEED_HYDRATION */ ) ]) ]), vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode("view", { class: "label" }, "昵称"), vue.createElementVNode("view", { class: "right" }, [ vue.withDirectives(vue.createElementVNode( "input", { type: "nickname", onBlur: _cache[1] || (_cache[1] = (...args) => $options.bindblur && $options.bindblur(...args)), onInput: _cache[2] || (_cache[2] = (...args) => $options.bindinput && $options.bindinput(...args)), "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.user.nickName = $event), class: "input" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.user.nickName] ]), vue.createElementVNode("image", { class: "image", src: "/static/images/icon_edit.png", mode: "" }) ]) ]), vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode("view", { class: "label" }, "手机号"), vue.createElementVNode("view", { class: "right" }, [ $data.user != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString(_ctx.$parsePhone($data.user.phone)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("image", { class: "image", src: "/static/images/icon_lock.png", mode: "" }) ]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[4] || (_cache[4] = ($event) => $options.submit()) }, "保存修改") ]) ]); } const Pages_userPersonInfo = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-082ee3d6"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/personInfo.vue"]]); const block0 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("handler"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["handler"] = "174adfb2"; }; function getTop(e) { let top; top = e.touches[0].pageY; if (top - e.currentTarget.offsetTop < 150) top = e.currentTarget.offsetTop; if (top < 30) top += 70; return top - 30; } const _sfc_main$B = { name: "node", options: {}, data() { return { ctrl: {} }; }, props: { name: String, attrs: { type: Object, default() { return {}; } }, childs: Array, opts: Array }, components: { node }, mounted() { this.$nextTick(() => { for (this.root = this.$parent; this.root.$options.name !== "mp-html"; this.root = this.root.$parent) ; }); if (this.opts[0]) { let i; for (i = this.childs.length; i--; ) { if (this.childs[i].name === "img") break; } if (i !== -1) { this.observer = uni.createIntersectionObserver(this).relativeToViewport({ top: 500, bottom: 500 }); this.observer.observe("._img", (res) => { if (res.intersectionRatio) { this.$set(this.ctrl, "load", 1); this.observer.disconnect(); } }); } } }, beforeDestroy() { if (this.root._edit === this) { this.root._edit = void 0; } if (this.observer) { this.observer.disconnect(); } }, methods: { editStart(e) { if (this.opts[5]) { const i = e.currentTarget.dataset.i; if (!this.ctrl["e" + i]) { this.$set(this.ctrl, "e" + i, 1); setTimeout(() => { this.root._mask.push(() => this.$set(this.ctrl, "e" + i, 0)); }, 50); this.root._edit = this; this.i = i; this.cursor = this.childs[i].text.length; } else { this.root._mask.pop(); this.root._maskTap(); this.$set(this.ctrl, "e" + i, 2); setTimeout(() => { this.$set(this.ctrl, "e" + i, 3); }, 50); } } }, editInput(e) { const i = e.target.dataset.i; const value2 = e.detail.value.replace(/ {2,}/, ($) => { let res = " "; for (let i2 = 1; i2 < $.length; i2++) { res += " "; } return res; }); this.root._editVal(`${this.opts[7]}.${i}.text`, this.childs[i].text, value2); this.cursor = e.detail.cursor; }, editEnd(e) { const i = e.target.dataset.i; this.$set(this.ctrl, "e" + i, 0); this.root._setData(`${this.opts[7]}.${i}.text`, e.detail.value.replace(/ {2}/g, "  ")); if (e.detail.cursor !== void 0) { this.cursor = e.detail.cursor; } }, insert(node2) { setTimeout(() => { const childs = this.childs.slice(0); if (!childs[this.i]) { childs.push(node2); } else if (childs[this.i].text) { const text = childs[this.i].text; const list = []; if (this.cursor) { list.push({ type: "text", text: text.substring(0, this.cursor) }); } list.push(node2); if (this.cursor < text.length) { list.push({ type: "text", text: text.substring(this.cursor) }); } childs.splice(this.i, 1, ...list); } else { childs.splice(parseInt(this.i) + 1, 0, node2); } this.root._editVal(this.opts[7], this.childs, childs, true); this.i = parseInt(this.i) + 1; }, 200); }, remove(i) { const arr = this.childs.slice(0); const delEle = arr.splice(i, 1)[0]; if (delEle.name === "img" || delEle.name === "video" || delEle.name === "audio") { let src = delEle.attrs.src; if (delEle.src) { src = delEle.src.length === 1 ? delEle.src[0] : delEle.src; } this.root.$emit("remove", { type: delEle.name, src }); } this.root._edit = void 0; this.root._maskTap(); this.root._editVal(this.opts[7], this.childs, arr, true); }, nodeTap(e) { if (this.opts[5]) { if (this.root._lock) return; this.root._lock = true; setTimeout(() => { this.root._lock = false; }, 50); if (this.ctrl["e" + this.i] === 3) return; this.root._maskTap(); this.root._edit = this; let start = this.opts[7].lastIndexOf("children."); if (start !== -1) { start += 9; } else { start = 6; } const i = parseInt(this.opts[7].substring(start, this.opts[7].lastIndexOf(".children"))); let parent = this.$parent; while (parent && parent.$options.name !== "node") { parent = parent.$parent; } if (!parent || this.opts[7].length - parent.opts[7].length > 15) return; this.$set(this.ctrl, "root", 1); this.root._mask.push(() => this.$set(this.ctrl, "root", 0)); if (this.childs.length === 1 && this.childs[0].type === "text" && !this.ctrl.e0) { this.$set(this.ctrl, "e0", 1); this.root._mask.push(() => this.$set(this.ctrl, "e0", 0)); this.i = 0; this.cursor = this.childs[0].text.length; } const items = this.root._getItem(parent.childs[i], i !== 0, i !== parent.childs.length - 1); this.root._tooltip({ top: getTop(e), items, success: (tapIndex) => { if (items[tapIndex] === "大小") { const style = parent.childs[i].attrs.style || ""; let value2 = style.match(/;font-size:([0-9]+)px/); if (value2) { value2 = parseInt(value2[1]); } else { value2 = 16; } this.root._slider({ min: 10, max: 30, value: value2, top: getTop(e), changing: (val) => { if (Math.abs(val - value2) > 2) { parent.changeStyle("font-size", i, val + "px", value2 + "px"); value2 = e.detail.value; } }, change: (val) => { if (val !== value2) { parent.changeStyle("font-size", i, val + "px", value2 + "px"); } this.root._editVal(`${parent.opts[7]}.${i}.attrs.style`, style, parent.childs[i].attrs.style); } }); } else if (items[tapIndex] === "上移" || items[tapIndex] === "下移") { const arr = parent.childs.slice(0); const item = arr[i]; if (items[tapIndex] === "上移") { arr[i] = arr[i - 1]; arr[i - 1] = item; } else { arr[i] = arr[i + 1]; arr[i + 1] = item; } this.root._editVal(parent.opts[7], parent.childs, arr, true); } else if (items[tapIndex] === "删除") { parent.remove(i); } else { const style = parent.childs[i].attrs.style || ""; let newStyle = ""; const item = items[tapIndex]; let name; let value2; if (item === "斜体") { name = "font-style"; value2 = "italic"; } else if (item === "粗体") { name = "font-weight"; value2 = "bold"; } else if (item === "下划线") { name = "text-decoration"; value2 = "underline"; } else if (item === "居中") { name = "text-align"; value2 = "center"; } else if (item === "缩进") { name = "text-indent"; value2 = "2em"; } if (style.includes(name + ":")) { newStyle = style.replace(new RegExp(name + ":[^;]+"), ""); } else { newStyle = style + ";" + name + ":" + value2; } this.root._editVal(`${parent.opts[7]}.${i}.attrs.style`, style, newStyle, true); } } }); } }, mediaTap(e) { if (this.opts[5]) { const i = e.target.dataset.i; const node2 = this.childs[i]; const items = this.root._getItem(node2); this.root._edit = this; this.i = i; this.root._tooltip({ top: e.target.offsetTop - 30, items, success: (tapIndex) => { switch (items[tapIndex]) { case "封面": this.root.getSrc("img", node2.attrs.poster || "").then((url2) => { this.root._editVal(`${this.opts[7]}.${i}.attrs.poster`, node2.attrs.poster, url2 instanceof Array ? url2[0] : url2, true); }).catch(() => { }); break; case "删除": this.remove(i); break; case "循环": case "不循环": this.root._setData(`${this.opts[7]}.${i}.attrs.loop`, !node2.attrs.loop); uni.showToast({ title: "成功" }); break; case "自动播放": case "不自动播放": this.root._setData(`${this.opts[7]}.${i}.attrs.autoplay`, !node2.attrs.autoplay); uni.showToast({ title: "成功" }); break; } } }); this.root._lock = true; setTimeout(() => { this.root._lock = false; }, 50); } }, changeStyle(name, i, value2, oldVal) { let style = this.childs[i].attrs.style || ""; if (style.includes(";" + name + ":" + oldVal)) { style = style.replace(";" + name + ":" + oldVal, ";" + name + ":" + value2); } else { style += ";" + name + ":" + value2; } this.root._setData(`${this.opts[7]}.${i}.attrs.style`, style); }, /** * @description 播放视频事件 * @param {Event} e */ play(e) { this.root.$emit("play"); }, /** * @description 图片点击事件 * @param {Event} e */ imgTap(e) { if (!this.opts[5]) { const node2 = this.childs[e.currentTarget.dataset.i]; if (node2.a) { this.linkTap(node2.a); return; } if (node2.attrs.ignore) return; node2.attrs.src = node2.attrs.src || node2.attrs["data-src"]; this.root.$emit("imgtap", node2.attrs); if (this.root.previewImg) { uni.previewImage({ current: parseInt(node2.attrs.i), urls: this.root.imgList }); } } else { const i = e.currentTarget.dataset.i; const node2 = this.childs[i]; const items = this.root._getItem(node2); this.root._edit = this; this.i = i; this.root._maskTap(); this.$set(this.ctrl, "e" + i, 1); this.root._mask.push(() => this.$set(this.ctrl, "e" + i, 0)); this.root._tooltip({ top: getTop(e), items, success: (tapIndex) => { if (items[tapIndex] === "换图") { this.root.getSrc("img", node2.attrs.src || "").then((url2) => { this.root._editVal(this.opts[7] + "." + i + ".attrs.src", node2.attrs.src, url2 instanceof Array ? url2[0] : url2, true); }).catch(() => { }); } else if (items[tapIndex] === "宽度") { const style = node2.attrs.style || ""; let value2 = style.match(/max-width:([0-9]+)%/); if (value2) { value2 = parseInt(value2[1]); } else { value2 = 100; } this.root._slider({ min: 0, max: 100, value: value2, top: getTop(e), changing: (val) => { if (Math.abs(val - value2) > 5) { this.changeStyle("max-width", i, val + "%", value2 + "%"); value2 = val; } }, change: (val) => { if (val !== value2) { this.changeStyle("max-width", i, val + "%", value2 + "%"); value2 = val; } this.root._editVal(this.opts[7] + "." + i + ".attrs.style", style, this.childs[i].attrs.style); } }); } else if (items[tapIndex] === "超链接") { this.root.getSrc("link", node2.a ? node2.a.href : "").then((url2) => { if (node2.a) { this.root._editVal(this.opts[7] + "." + i + ".a.href", node2.a.href, url2, true); } else { const link = { name: "a", attrs: { href: url2 }, children: [node2] }; node2.a = link.attrs; this.root._editVal(this.opts[7] + "." + i, node2, link, true); } wx.showToast({ title: "成功" }); }).catch(() => { }); } else if (items[tapIndex] === "预览图") { this.root.getSrc("img", node2.attrs["original-src"] || "").then((url2) => { this.root._editVal(this.opts[7] + "." + i + ".attrs.original-src", node2.attrs["original-src"], url2 instanceof Array ? url2[0] : url2, true); uni.showToast({ title: "成功" }); }).catch(() => { }); } else if (items[tapIndex] === "删除") { this.remove(i); } else { this.root._setData(this.opts[7] + "." + i + ".attrs.ignore", !node2.attrs.ignore); uni.showToast({ title: "成功" }); } } }); this.root._lock = true; setTimeout(() => { this.root._lock = false; }, 50); } }, /** * @description 图片长按 */ imgLongTap(e) { const attrs = this.childs[e.currentTarget.dataset.i].attrs; if (this.opts[3] && !attrs.ignore) { uni.showActionSheet({ itemList: ["保存图片"], success: () => { const save = (path) => { uni.saveImageToPhotosAlbum({ filePath: path, success() { uni.showToast({ title: "保存成功" }); } }); }; if (this.root.imgList[attrs.i].startsWith("http")) { uni.downloadFile({ url: this.root.imgList[attrs.i], success: (res) => save(res.tempFilePath) }); } else { save(this.root.imgList[attrs.i]); } } }); } }, /** * @description 图片加载完成事件 * @param {Event} e */ imgLoad(e) { const i = e.currentTarget.dataset.i; if (!this.childs[i].w) { this.$set(this.ctrl, i, e.detail.width); if (this.opts[5]) { const path = this.opts[7] + "." + i + ".attrs."; if (e.detail.width < 150) this.root._setData(path + "ignore", "T"); this.root._setData(path + "width", e.detail.width.toString()); } } else if (this.opts[1] && !this.ctrl[i] || this.ctrl[i] === -1) { this.$set(this.ctrl, i, 1); } }, /** * @description 链接点击事件 * @param {Event} e */ linkTap(e) { if (!this.opts[5]) { const node2 = e.currentTarget ? this.childs[e.currentTarget.dataset.i] : {}; const attrs = node2.attrs || e; const href = attrs.href; this.root.$emit("linktap", Object.assign({ innerText: this.root.getText(node2.children || []) // 链接内的文本内容 }, attrs)); if (href) { if (href[0] === "#") { this.root.navigateTo(href.substring(1)).catch(() => { }); } else if (href.split("?")[0].includes("://")) { if (this.root.copyLink) { plus.runtime.openWeb(href); } } else { uni.navigateTo({ url: href, fail() { uni.switchTab({ url: href, fail() { } }); } }); } } } else { const i = e.currentTarget.dataset.i; const node2 = this.childs[i]; const items = this.root._getItem(node2); this.root._tooltip({ top: getTop(e), items, success: (tapIndex) => { if (items[tapIndex] === "更换链接") { this.root.getSrc("link", node2.attrs.href).then((url2) => { this.root._editVal(this.opts[7] + "." + i + ".attrs.href", node2.attrs.href, url2, true); uni.showToast({ title: "成功" }); }).catch(() => { }); } else { this.remove(i); } } }); } }, /** * @description 错误事件 * @param {Event} e */ mediaError(e) { const i = e.currentTarget.dataset.i; const node2 = this.childs[i]; if (node2.name === "video" || node2.name === "audio") { let index2 = (this.ctrl[i] || 0) + 1; if (index2 > node2.src.length) { index2 = 0; } if (index2 < node2.src.length) { this.$set(this.ctrl, i, index2); return; } } else if (node2.name === "img") { if (this.opts[2]) { this.$set(this.ctrl, i, -1); } } if (this.root) { this.root.$emit("error", { source: node2.name, attrs: node2.attrs, errMsg: e.detail.errMsg }); } } } }; function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) { const _component_node = vue.resolveComponent("node", true); return vue.openBlock(), vue.createElementBlock("view", { onClick: _cache[11] || (_cache[11] = (...args) => $options.nodeTap && $options.nodeTap(...args)), id: $props.attrs.id, class: vue.normalizeClass("_block _" + $props.name + " " + $props.attrs.class), style: vue.normalizeStyle(($data.ctrl.root ? "border:1px solid black;padding:5px;display:block;" : "") + $props.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.childs, (n, i) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: i }, [ vue.createCommentVNode(" 图片 "), vue.createCommentVNode(" 占位图 "), n.name === "img" && ($props.opts[1] && !$data.ctrl[i] || $data.ctrl[i] < 0) ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "_img", style: vue.normalizeStyle(n.attrs.style), src: $data.ctrl[i] < 0 ? $props.opts[2] : $props.opts[1], mode: "widthFix" }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 显示图片 "), n.name === "img" ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, id: n.attrs.id, class: vue.normalizeClass("_img " + n.attrs.class), style: vue.normalizeStyle(($data.ctrl["e" + i] ? "border:1px dashed black;padding:3px;" : "") + ($data.ctrl[i] === -1 ? "display:none;" : "") + "width:" + ($data.ctrl[i] || 1) + "px;" + n.attrs.style), src: n.attrs.src || ($data.ctrl.load ? n.attrs["data-src"] : ""), mode: !n.h ? "widthFix" : !n.w ? "heightFix" : "", "data-i": i, onLoad: _cache[0] || (_cache[0] = (...args) => $options.imgLoad && $options.imgLoad(...args)), onError: _cache[1] || (_cache[1] = (...args) => $options.mediaError && $options.mediaError(...args)), onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])), onLongpress: _cache[3] || (_cache[3] = (...args) => $options.imgLongTap && $options.imgLongTap(...args)) }, null, 46, ["id", "src", "mode", "data-i"])) : n.type === "text" && !$data.ctrl["e" + i] ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ vue.createCommentVNode(" 文本 "), vue.createElementVNode("text", { "data-i": i, "user-select": $props.opts[4], decode: !$props.opts[5], onClick: _cache[4] || (_cache[4] = (...args) => $options.editStart && $options.editStart(...args)) }, [ vue.createTextVNode( vue.toDisplayString(n.text) + " ", 1 /* TEXT */ ), !n.text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "color": "gray" } }, vue.toDisplayString($props.opts[6] || "请输入"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 8, ["data-i", "user-select", "decode"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n.type === "text" && $data.ctrl["e" + i] === 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 3, "data-i": i, style: { "border": "1px dashed black", "min-width": "50px", "width": "auto", "padding": "5px", "display": "block" }, onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.editStart && $options.editStart(...args), ["stop"])) }, [ vue.createTextVNode( vue.toDisplayString(n.text) + " ", 1 /* TEXT */ ), !n.text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, style: { "color": "gray" } }, vue.toDisplayString($props.opts[6] || "请输入"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 8, ["data-i"])) : n.type === "text" ? (vue.openBlock(), vue.createElementBlock("textarea", { key: 4, style: { "border": "1px dashed black", "min-width": "50px", "width": "auto", "padding": "5px" }, "auto-height": "", maxlength: "-1", focus: $data.ctrl["e" + i] === 3, value: n.text, "data-i": i, onInput: _cache[6] || (_cache[6] = (...args) => $options.editInput && $options.editInput(...args)), onBlur: _cache[7] || (_cache[7] = (...args) => $options.editEnd && $options.editEnd(...args)) }, null, 40, ["focus", "value", "data-i"])) : n.name === "br" ? (vue.openBlock(), vue.createElementBlock("text", { key: 5 }, "\\n")) : n.name === "a" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 6 }, [ vue.createCommentVNode(" 链接 "), vue.createElementVNode("view", { id: n.attrs.id, class: vue.normalizeClass((n.attrs.href ? "_a " : "") + n.attrs.class), "hover-class": "_hover", style: vue.normalizeStyle("display:inline;" + n.attrs.style), "data-i": i, onClick: _cache[8] || (_cache[8] = vue.withModifiers((...args) => $options.linkTap && $options.linkTap(...args), ["stop"])) }, [ vue.createVNode(_component_node, { name: "span", childs: n.children, opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children"], style: { "display": "inherit" } }, null, 8, ["childs", "opts"]) ], 14, ["id", "data-i"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n.html ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 7 }, [ vue.createCommentVNode(" 视频 "), vue.createElementVNode("view", { "data-i": i, onClick: _cache[9] || (_cache[9] = (...args) => $options.mediaTap && $options.mediaTap(...args)), id: n.attrs.id, class: vue.normalizeClass("_video " + n.attrs.class), style: vue.normalizeStyle(n.attrs.style), innerHTML: n.html, onVplay: _cache[10] || (_cache[10] = vue.withModifiers((...args) => $options.play && $options.play(...args), ["stop"])) }, null, 46, ["data-i", "id", "innerHTML"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n.name === "iframe" ? (vue.openBlock(), vue.createElementBlock("iframe", { key: 8, style: vue.normalizeStyle(n.attrs.style), allowfullscreen: n.attrs.allowfullscreen, frameborder: n.attrs.frameborder, src: n.attrs.src }, null, 12, ["allowfullscreen", "frameborder", "src"])) : n.name === "embed" ? (vue.openBlock(), vue.createElementBlock("embed", { key: 9, style: vue.normalizeStyle(n.attrs.style), src: n.attrs.src }, null, 12, ["src"])) : n.name === "table" && (n.c || $props.opts[5]) || n.name === "li" ? (vue.openBlock(), vue.createElementBlock("view", { key: 10, id: n.attrs.id, class: vue.normalizeClass("_" + n.name + " " + n.attrs.class), style: vue.normalizeStyle(n.attrs.style) }, [ n.name === "li" ? (vue.openBlock(), vue.createBlock(_component_node, { key: 0, childs: n.children, opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children"] }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(n.children, (tbody, x) => { return vue.openBlock(), vue.createElementBlock( "view", { key: x, class: vue.normalizeClass("_" + tbody.name + " " + tbody.attrs.class), style: vue.normalizeStyle(tbody.attrs.style) }, [ tbody.name === "td" || tbody.name === "th" ? (vue.openBlock(), vue.createBlock(_component_node, { key: 0, childs: tbody.children, opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children." + x + ".children"] }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(tbody.children, (tr, y) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: y }, [ tr.name === "td" || tr.name === "th" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class), style: vue.normalizeStyle(tr.attrs.style) }, [ vue.createVNode(_component_node, { childs: tr.children, opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children." + x + ".children." + y + ".children"] }, null, 8, ["childs", "opts"]) ], 6 /* CLASS, STYLE */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class), style: vue.normalizeStyle(tr.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(tr.children, (td, z) => { return vue.openBlock(), vue.createElementBlock( "view", { key: z, class: vue.normalizeClass("_" + td.name + " " + td.attrs.class), style: vue.normalizeStyle(td.attrs.style) }, [ vue.createVNode(_component_node, { childs: td.children, opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children." + x + ".children." + y + ".children." + z + ".children"] }, null, 8, ["childs", "opts"]) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ )) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"])) : !$props.opts[5] && !n.c ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 11 }, [ vue.createCommentVNode(" 富文本 "), vue.createElementVNode("rich-text", { id: n.attrs.id, style: vue.normalizeStyle(n.f + ";display:inline"), preview: false, selectable: $props.opts[4], "user-select": $props.opts[4], nodes: [n] }, null, 12, ["id", "selectable", "user-select", "nodes"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n.c === 2 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 12 }, [ vue.createCommentVNode(" 继续递归 "), vue.createElementVNode("view", { id: n.attrs.id, class: vue.normalizeClass("_block _" + n.name + " " + n.attrs.class), style: vue.normalizeStyle(n.f + ";" + n.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(n.children, (n2, j) => { return vue.openBlock(), vue.createBlock(_component_node, { key: j, style: vue.normalizeStyle(n2.f), name: n2.name, attrs: n2.attrs, childs: n2.children, opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children." + j + ".children"] }, null, 8, ["style", "name", "attrs", "childs", "opts"]); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : (vue.openBlock(), vue.createBlock(_component_node, { key: 13, style: vue.normalizeStyle(n.f), name: n.name, attrs: n.attrs, childs: n.children, opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children"] }, null, 8, ["style", "name", "attrs", "childs", "opts"])) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"]); } if (typeof block0 === "function") block0(_sfc_main$B); const node = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-b9c8a97d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/mp-html/node/node.vue"]]); const config$1 = { // 信任的标签(保持标签名不变) trustTags: makeMap("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"), // 块级标签(转为 div,其他的非信任标签转为 span) blockTags: makeMap("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"), // 行内标签 inlineTags: makeMap("abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup"), // 要移除的标签 ignoreTags: makeMap("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"), // 自闭合的标签 voidTags: makeMap("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"), // html 实体 entities: { lt: "<", gt: ">", quot: '"', apos: "'", ensp: " ", emsp: " ", nbsp: " ", semi: ";", ndash: "–", mdash: "—", middot: "·", lsquo: "‘", rsquo: "’", ldquo: "“", rdquo: "”", bull: "•", hellip: "…", larr: "←", uarr: "↑", rarr: "→", darr: "↓" }, // 默认的标签样式 tagStyle: { address: "font-style:italic", big: "display:inline;font-size:1.2em", caption: "display:table-caption;text-align:center", center: "text-align:center", cite: "font-style:italic", dd: "margin-left:40px", mark: "background-color:yellow", pre: "font-family:monospace;white-space:pre", s: "text-decoration:line-through", small: "display:inline;font-size:0.8em", strike: "text-decoration:line-through", u: "text-decoration:underline" }, // svg 大小写对照表 svgDict: { animatetransform: "animateTransform", lineargradient: "linearGradient", viewbox: "viewBox", attributename: "attributeName", repeatcount: "repeatCount", repeatdur: "repeatDur" } }; const tagSelector = {}; const { windowWidth } = uni.getSystemInfoSync(); const blankChar = makeMap(" ,\r,\n, ,\f"); let idIndex = 0; config$1.ignoreTags.iframe = void 0; config$1.trustTags.iframe = true; config$1.ignoreTags.embed = void 0; config$1.trustTags.embed = true; function makeMap(str) { const map = /* @__PURE__ */ Object.create(null); const list = str.split(","); for (let i = list.length; i--; ) { map[list[i]] = true; } return map; } function decodeEntity(str, amp) { let i = str.indexOf("&"); while (i !== -1) { const j = str.indexOf(";", i + 3); let code2; if (j === -1) break; if (str[i + 1] === "#") { code2 = parseInt((str[i + 2] === "x" ? "0" : "") + str.substring(i + 2, j)); if (!isNaN(code2)) { str = str.substr(0, i) + String.fromCharCode(code2) + str.substr(j + 1); } } else { code2 = str.substring(i + 1, j); if (config$1.entities[code2] || code2 === "amp" && amp) { str = str.substr(0, i) + (config$1.entities[code2] || "&") + str.substr(j + 1); } } i = str.indexOf("&", i + 1); } return str; } function mergeNodes(nodes) { let i = nodes.length - 1; for (let j = i; j >= -1; j--) { if (j === -1 || nodes[j].c || !nodes[j].name || nodes[j].name !== "div" && nodes[j].name !== "p" && nodes[j].name[0] !== "h" || (nodes[j].attrs.style || "").includes("inline")) { if (i - j >= 5) { nodes.splice(j + 1, i - j, { name: "div", attrs: {}, children: nodes.slice(j + 1, i + 1) }); } i = j - 1; } } } function Parser(vm) { this.options = vm || {}; this.tagStyle = Object.assign({}, config$1.tagStyle, this.options.tagStyle); this.imgList = vm.imgList || []; this.plugins = vm.plugins || []; this.attrs = /* @__PURE__ */ Object.create(null); this.stack = []; this.nodes = []; this.pre = (this.options.containerStyle || "").includes("white-space") && this.options.containerStyle.includes("pre") ? 2 : 0; } Parser.prototype.parse = function(content) { for (let i = this.plugins.length; i--; ) { if (this.plugins[i].onUpdate) { content = this.plugins[i].onUpdate(content, config$1) || content; } } new Lexer(this).parse(content); while (this.stack.length) { this.popNode(); } if (this.nodes.length > 50) { mergeNodes(this.nodes); } return this.nodes; }; Parser.prototype.expose = function() { for (let i = this.stack.length; i--; ) { const item = this.stack[i]; if (item.c || item.name === "a" || item.name === "video" || item.name === "audio") return; item.c = 1; } }; Parser.prototype.hook = function(node2) { for (let i = this.plugins.length; i--; ) { if (this.plugins[i].onParse && this.plugins[i].onParse(node2, this) === false) { return false; } } return true; }; Parser.prototype.getUrl = function(url2) { const domain = this.options.domain; if (url2[0] === "/") { if (url2[1] === "/") { url2 = (domain ? domain.split("://")[0] : "http") + ":" + url2; } else if (domain) { url2 = domain + url2; } else { url2 = plus.io.convertLocalFileSystemURL(url2); } } else if (!url2.includes("data:") && !url2.includes("://")) { if (domain) { url2 = domain + "/" + url2; } else { url2 = plus.io.convertLocalFileSystemURL(url2); } } return url2; }; Parser.prototype.parseStyle = function(node2) { const attrs = node2.attrs; const list = (this.tagStyle[node2.name] || "").split(";").concat((attrs.style || "").split(";")); const styleObj = {}; let tmp = ""; if (attrs.id && !this.xml) { if (this.options.useAnchor) { this.expose(); } else if (node2.name !== "img" && node2.name !== "a" && node2.name !== "video" && node2.name !== "audio") { attrs.id = void 0; } } if (attrs.width) { styleObj.width = parseFloat(attrs.width) + (attrs.width.includes("%") ? "%" : "px"); attrs.width = void 0; } if (attrs.height) { styleObj.height = parseFloat(attrs.height) + (attrs.height.includes("%") ? "%" : "px"); attrs.height = void 0; } for (let i = 0, len = list.length; i < len; i++) { const info = list[i].split(":"); if (info.length < 2) continue; const key = info.shift().trim().toLowerCase(); let value2 = info.join(":").trim(); if (value2[0] === "-" && value2.lastIndexOf("-") > 0 || value2.includes("safe")) { tmp += `;${key}:${value2}`; } else if (!styleObj[key] || value2.includes("import") || !styleObj[key].includes("import")) { if (value2.includes("url")) { let j = value2.indexOf("(") + 1; if (j) { while (value2[j] === '"' || value2[j] === "'" || blankChar[value2[j]]) { j++; } value2 = value2.substr(0, j) + this.getUrl(value2.substr(j)); } } else if (value2.includes("rpx")) { value2 = value2.replace(/[0-9.]+\s*rpx/g, ($) => parseFloat($) * windowWidth / 750 + "px"); } styleObj[key] = value2; } } node2.attrs.style = tmp; return styleObj; }; Parser.prototype.onTagName = function(name) { this.tagName = this.xml ? name : name.toLowerCase(); if (this.tagName === "svg") { this.xml = (this.xml || 0) + 1; } }; Parser.prototype.onAttrName = function(name) { name = this.xml ? name : name.toLowerCase(); if (name.substr(0, 5) === "data-") { if (name === "data-src" && !this.attrs.src) { this.attrName = "src"; } else if (this.tagName === "img" || this.tagName === "a") { this.attrName = name; } else { this.attrName = void 0; } } else { this.attrName = name; this.attrs[name] = "T"; } }; Parser.prototype.onAttrVal = function(val) { const name = this.attrName || ""; if (name === "style" || name === "href") { this.attrs[name] = decodeEntity(val, true); } else if (name.includes("src")) { this.attrs[name] = this.getUrl(decodeEntity(val, true)); } else if (name) { this.attrs[name] = val; } }; Parser.prototype.onOpenTag = function(selfClose) { const node2 = /* @__PURE__ */ Object.create(null); node2.name = this.tagName; node2.attrs = this.attrs; if (this.options.nodes.length) { node2.type = "node"; } this.attrs = /* @__PURE__ */ Object.create(null); const attrs = node2.attrs; const parent = this.stack[this.stack.length - 1]; const siblings = parent ? parent.children : this.nodes; const close = this.xml ? selfClose : config$1.voidTags[node2.name]; if (tagSelector[node2.name]) { attrs.class = tagSelector[node2.name] + (attrs.class ? " " + attrs.class : ""); } if (node2.name === "embed") { this.expose(); } if (node2.name === "video" || node2.name === "audio") { if (node2.name === "video" && !attrs.id) { attrs.id = "v" + idIndex++; } if (!attrs.controls && !attrs.autoplay) { attrs.controls = "T"; } node2.src = []; if (attrs.src) { node2.src.push(attrs.src); attrs.src = void 0; } this.expose(); } if (close) { if (!this.hook(node2) || config$1.ignoreTags[node2.name]) { if (node2.name === "base" && !this.options.domain) { this.options.domain = attrs.href; } else if (node2.name === "source" && parent && (parent.name === "video" || parent.name === "audio") && attrs.src) { parent.src.push(attrs.src); } return; } const styleObj = this.parseStyle(node2); if (node2.name === "img") { if (attrs.src) { if (attrs.src.includes("webp")) { node2.webp = "T"; } if (attrs.src.includes("data:") && !attrs["original-src"]) { attrs.ignore = "T"; } if (!attrs.ignore || node2.webp || attrs.src.includes("cloud://")) { for (let i = this.stack.length; i--; ) { const item = this.stack[i]; if (item.name === "a") { node2.a = item.attrs; break; } item.c = 1; } attrs.i = this.imgList.length.toString(); let src = attrs["original-src"] || attrs.src; this.imgList.push(src); if (this.options.lazyLoad) { attrs["data-src"] = attrs.src; attrs.src = void 0; } } } if (styleObj.display === "inline") { styleObj.display = ""; } if (attrs.ignore) { styleObj["max-width"] = styleObj["max-width"] || "100%"; attrs.style += ";-webkit-touch-callout:none"; } if (parseInt(styleObj.width) > windowWidth) { styleObj.height = void 0; } if (!isNaN(parseInt(styleObj.width))) { node2.w = "T"; } if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes("%") || parent && (parent.attrs.style || "").includes("height"))) { node2.h = "T"; } } else if (node2.name === "svg") { siblings.push(node2); this.stack.push(node2); this.popNode(); return; } for (const key in styleObj) { if (styleObj[key]) { attrs.style += `;${key}:${styleObj[key].replace(" !important", "")}`; } } attrs.style = attrs.style.substr(1) || void 0; } else { if ((node2.name === "pre" || (attrs.style || "").includes("white-space") && attrs.style.includes("pre")) && this.pre !== 2) { this.pre = node2.pre = 1; } node2.children = []; this.stack.push(node2); } siblings.push(node2); }; Parser.prototype.onCloseTag = function(name) { name = this.xml ? name : name.toLowerCase(); let i; for (i = this.stack.length; i--; ) { if (this.stack[i].name === name) break; } if (i !== -1) { while (this.stack.length > i) { this.popNode(); } } else if (name === "p" || name === "br") { const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes; siblings.push({ name, attrs: { class: tagSelector[name] || "", style: this.tagStyle[name] || "" } }); } }; Parser.prototype.popNode = function() { const editable = this.options.editable; const node2 = this.stack.pop(); let attrs = node2.attrs; const children = node2.children; const parent = this.stack[this.stack.length - 1]; const siblings = parent ? parent.children : this.nodes; if (!this.hook(node2) || config$1.ignoreTags[node2.name]) { if (node2.name === "title" && children.length && children[0].type === "text" && this.options.setTitle) { uni.setNavigationBarTitle({ title: children[0].text }); } siblings.pop(); return; } if (node2.pre && this.pre !== 2) { this.pre = node2.pre = void 0; for (let i = this.stack.length; i--; ) { if (this.stack[i].pre) { this.pre = 1; } } } const styleObj = {}; if (node2.name === "svg") { if (this.xml > 1) { this.xml--; return; } let src = ""; const style = attrs.style; attrs.style = ""; attrs.xmlns = "http://www.w3.org/2000/svg"; (function traversal(node3) { if (node3.type === "text") { src += node3.text; return; } const name = config$1.svgDict[node3.name] || node3.name; src += "<" + name; for (const item in node3.attrs) { const val = node3.attrs[item]; if (val) { src += ` ${config$1.svgDict[item] || item}="${val}"`; } } if (!node3.children) { src += "/>"; } else { src += ">"; for (let i = 0; i < node3.children.length; i++) { traversal(node3.children[i]); } src += ""; } })(node2); node2.name = "img"; node2.attrs = { src: "data:image/svg+xml;utf8," + src.replace(/#/g, "%23"), style, ignore: "T" }; node2.children = void 0; this.xml = false; return; } if (attrs.align) { if (node2.name === "table") { if (attrs.align === "center") { styleObj["margin-inline-start"] = styleObj["margin-inline-end"] = "auto"; } else { styleObj.float = attrs.align; } } else { styleObj["text-align"] = attrs.align; } attrs.align = void 0; } if (attrs.dir) { styleObj.direction = attrs.dir; attrs.dir = void 0; } if (node2.name === "font") { if (attrs.color) { styleObj.color = attrs.color; attrs.color = void 0; } if (attrs.face) { styleObj["font-family"] = attrs.face; attrs.face = void 0; } if (attrs.size) { let size = parseInt(attrs.size); if (!isNaN(size)) { if (size < 1) { size = 1; } else if (size > 7) { size = 7; } styleObj["font-size"] = ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"][size - 1]; } attrs.size = void 0; } } if ((attrs.class || "").includes("align-center")) { styleObj["text-align"] = "center"; } Object.assign(styleObj, this.parseStyle(node2)); if (node2.name !== "table" && parseInt(styleObj.width) > windowWidth) { styleObj["max-width"] = "100%"; styleObj["box-sizing"] = "border-box"; } if (config$1.blockTags[node2.name]) { if (!editable) { node2.name = "div"; } } else if (!config$1.trustTags[node2.name] && !this.xml) { node2.name = "span"; } if (node2.name === "a" || node2.name === "ad" || node2.name === "iframe") { this.expose(); } else if (node2.name === "video") { if ((styleObj.height || "").includes("auto")) { styleObj.height = void 0; } let str = '"; node2.html = str; } else if ((node2.name === "ul" || node2.name === "ol") && (node2.c || editable)) { const types2 = { a: "lower-alpha", A: "upper-alpha", i: "lower-roman", I: "upper-roman" }; if (types2[attrs.type]) { attrs.style += ";list-style-type:" + types2[attrs.type]; attrs.type = void 0; } for (let i = children.length; i--; ) { if (children[i].name === "li") { children[i].c = 1; } } } else if (node2.name === "table") { let padding = parseFloat(attrs.cellpadding); let spacing = parseFloat(attrs.cellspacing); const border = parseFloat(attrs.border); const bordercolor = styleObj["border-color"]; const borderstyle = styleObj["border-style"]; if (node2.c || editable) { if (isNaN(padding)) { padding = 2; } if (isNaN(spacing)) { spacing = 2; } } if (border) { attrs.style += `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}`; } if (node2.flag && (node2.c || editable)) { styleObj.display = "grid"; if (spacing) { styleObj["grid-gap"] = spacing + "px"; styleObj.padding = spacing + "px"; } else if (border) { attrs.style += ";border-left:0;border-top:0"; } const width = []; const trList = []; const cells = []; const map = {}; (function traversal(nodes) { for (let i = 0; i < nodes.length; i++) { if (nodes[i].name === "tr") { trList.push(nodes[i]); } else { traversal(nodes[i].children || []); } } })(children); for (let row = 1; row <= trList.length; row++) { let col = 1; for (let j = 0; j < trList[row - 1].children.length; j++) { const td = trList[row - 1].children[j]; if (td.name === "td" || td.name === "th") { while (map[row + "." + col]) { col++; } if (editable) { td.r = row; } let style = td.attrs.style || ""; const start = style.indexOf("width") ? style.indexOf(";width") : 0; if (start !== -1) { let end = style.indexOf(";", start + 6); if (end === -1) { end = style.length; } if (!td.attrs.colspan) { width[col] = style.substring(start ? start + 7 : 6, end); } style = style.substr(0, start) + style.substr(end); } style = (border ? `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}` + (spacing ? "" : ";border-right:0;border-bottom:0") : "") + (padding ? `;padding:${padding}px` : "") + ";" + style; if (td.attrs.colspan) { style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`; if (!td.attrs.rowspan) { style += `;grid-row-start:${row};grid-row-end:${row + 1}`; } col += parseInt(td.attrs.colspan) - 1; } if (td.attrs.rowspan) { style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`; if (!td.attrs.colspan) { style += `;grid-column-start:${col};grid-column-end:${col + 1}`; } for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) { for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) { map[row + rowspan + "." + (col - colspan)] = 1; } } } if (style) { td.attrs.style = style; } cells.push(td); col++; } } if (row === 1) { let temp = ""; for (let i = 1; i < col; i++) { temp += (width[i] ? width[i] : "auto") + " "; } styleObj["grid-template-columns"] = temp; } } node2.children = cells; } else { if (node2.c || editable) { styleObj.display = "table"; } if (!isNaN(spacing)) { styleObj["border-spacing"] = spacing + "px"; } if (border || padding) { (function traversal(nodes) { for (let i = 0; i < nodes.length; i++) { const td = nodes[i]; if (td.name === "th" || td.name === "td") { if (border) { td.attrs.style = `border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"};${td.attrs.style || ""}`; } if (padding) { td.attrs.style = `padding:${padding}px;${td.attrs.style || ""}`; } } else if (td.children) { traversal(td.children); } } })(children); } } if (this.options.scrollTable && !(attrs.style || "").includes("inline")) { const table = Object.assign({}, node2); node2.name = "div"; node2.attrs = { style: "overflow:auto" }; node2.children = [table]; attrs = table.attrs; } } else if ((node2.name === "td" || node2.name === "th") && (attrs.colspan || attrs.rowspan)) { for (let i = this.stack.length; i--; ) { if (this.stack[i].name === "table") { this.stack[i].flag = 1; break; } } } else if (node2.name === "ruby") { node2.name = "span"; for (let i = 0; i < children.length - 1; i++) { if (children[i].type === "text" && children[i + 1].name === "rt") { children[i] = { name: "div", attrs: { style: "display:inline-block;text-align:center" }, children: [{ name: "div", attrs: { style: "font-size:50%;" + (children[i + 1].attrs.style || "") }, children: children[i + 1].children }, children[i]] }; children.splice(i + 1, 1); } } } else if (!editable && node2.c) { (function traversal(node3) { node3.c = 2; for (let i = node3.children.length; i--; ) { const child = node3.children[i]; if (child.name && (config$1.inlineTags[child.name] || (child.attrs.style || "").includes("inline") && child.children) && !child.c) { traversal(child); } if (!child.c || child.name === "table") { node3.c = 1; } } })(node2); } if ((styleObj.display || "").includes("flex") && !(node2.c || editable)) { for (let i = children.length; i--; ) { const item = children[i]; if (item.f) { item.attrs.style = (item.attrs.style || "") + item.f; item.f = void 0; } } } const flex = parent && ((parent.attrs.style || "").includes("flex") || (parent.attrs.style || "").includes("grid")) && !node2.c; if (flex) { node2.f = ";max-width:100%"; } if (children.length >= 50 && (node2.c || editable) && !(styleObj.display || "").includes("flex")) { mergeNodes(children); } for (const key in styleObj) { if (styleObj[key]) { const val = `;${key}:${styleObj[key].replace(" !important", "")}`; if (flex && (key.includes("flex") && key !== "flex-direction" || key === "align-self" || key.includes("grid") || styleObj[key][0] === "-" || key.includes("width") && val.includes("%"))) { node2.f += val; if (key === "width") { attrs.style += ";width:100%"; } } else { attrs.style += val; } } } attrs.style = attrs.style.substr(1) || void 0; }; Parser.prototype.onText = function(text) { if (!this.pre) { let trim2 = ""; let flag2; for (let i = 0, len = text.length; i < len; i++) { if (!blankChar[text[i]]) { trim2 += text[i]; } else { if (trim2[trim2.length - 1] !== " ") { trim2 += " "; } if (text[i] === "\n" && !flag2) { flag2 = true; } } } if (trim2 === " ") { if (flag2) return; else { const parent = this.stack[this.stack.length - 1]; if (parent && parent.name[0] === "t") return; } } text = trim2; } const node2 = /* @__PURE__ */ Object.create(null); node2.type = "text"; node2.text = decodeEntity(text); if (this.hook(node2)) { const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes; siblings.push(node2); } }; function Lexer(handler) { this.handler = handler; } Lexer.prototype.parse = function(content) { this.content = content || ""; this.i = 0; this.start = 0; this.state = this.text; for (let len = this.content.length; this.i !== -1 && this.i < len; ) { this.state(); } }; Lexer.prototype.checkClose = function(method) { const selfClose = this.content[this.i] === "/"; if (this.content[this.i] === ">" || selfClose && this.content[this.i + 1] === ">") { if (method) { this.handler[method](this.content.substring(this.start, this.i)); } this.i += selfClose ? 2 : 1; this.start = this.i; this.handler.onOpenTag(selfClose); if (this.handler.tagName === "script") { this.i = this.content.indexOf("= "a" && c <= "z" || c >= "A" && c <= "Z") { if (this.start !== this.i) { this.handler.onText(this.content.substring(this.start, this.i)); } this.start = ++this.i; this.state = this.tagName; } else if (c === "/" || c === "!" || c === "?") { if (this.start !== this.i) { this.handler.onText(this.content.substring(this.start, this.i)); } const next = this.content[this.i + 2]; if (c === "/" && (next >= "a" && next <= "z" || next >= "A" && next <= "Z")) { this.i += 2; this.start = this.i; this.state = this.endTag; return; } let end = "-->"; if (c !== "!" || this.content[this.i + 2] !== "-" || this.content[this.i + 3] !== "-") { end = ">"; } this.i = this.content.indexOf(end, this.i); if (this.i !== -1) { this.i += end.length; this.start = this.i; } } else { this.i++; } }; Lexer.prototype.tagName = function() { if (blankChar[this.content[this.i]]) { this.handler.onTagName(this.content.substring(this.start, this.i)); while (blankChar[this.content[++this.i]]) ; if (this.i < this.content.length && !this.checkClose()) { this.start = this.i; this.state = this.attrName; } } else if (!this.checkClose("onTagName")) { this.i++; } }; Lexer.prototype.attrName = function() { let c = this.content[this.i]; if (blankChar[c] || c === "=") { this.handler.onAttrName(this.content.substring(this.start, this.i)); let needVal = c === "="; const len = this.content.length; while (++this.i < len) { c = this.content[this.i]; if (!blankChar[c]) { if (this.checkClose()) return; if (needVal) { this.start = this.i; this.state = this.attrVal; return; } if (this.content[this.i] === "=") { needVal = true; } else { this.start = this.i; this.state = this.attrName; return; } } } } else if (!this.checkClose("onAttrName")) { this.i++; } }; Lexer.prototype.attrVal = function() { const c = this.content[this.i]; const len = this.content.length; if (c === '"' || c === "'") { this.start = ++this.i; this.i = this.content.indexOf(c, this.i); if (this.i === -1) return; this.handler.onAttrVal(this.content.substring(this.start, this.i)); } else { for (; this.i < len; this.i++) { if (blankChar[this.content[this.i]]) { this.handler.onAttrVal(this.content.substring(this.start, this.i)); break; } else if (this.checkClose("onAttrVal")) return; } } while (blankChar[this.content[++this.i]]) ; if (this.i < len && !this.checkClose()) { this.start = this.i; this.state = this.attrName; } }; Lexer.prototype.endTag = function() { const c = this.content[this.i]; if (blankChar[c] || c === ">" || c === "/") { this.handler.onCloseTag(this.content.substring(this.start, this.i)); if (c !== ">") { this.i = this.content.indexOf(">", this.i); if (this.i === -1) return; } this.start = ++this.i; this.state = this.text; } else { this.i++; } }; const config = { // 普通标签的菜单项 node: ["大小", "斜体", "粗体", "下划线", "居中", "缩进", "上移", "下移", "删除"], // 图片的菜单项 img: ["换图", "宽度", "超链接", "预览图", "禁用预览", "上移", "下移", "删除"], // 链接的菜单项 link: ["更换链接", "上移", "下移", "删除"], // 音视频的菜单项 media: ["封面", "循环", "自动播放", "上移", "下移", "删除"] }; function Editable(vm) { this.vm = vm; this.editHistory = []; this.editI = -1; vm._mask = []; vm._setData = function(path, val) { const paths = path.split("."); let target = vm; for (let i = 0; i < paths.length - 1; i++) { target = target[paths[i]]; } vm.$set(target, paths.pop(), val); }; const move = (num) => { setTimeout(() => { const item = this.editHistory[this.editI + num]; if (item) { this.editI += num; vm._setData(item.key, item.value); } }, 200); }; vm.undo = () => move(-1); vm.redo = () => move(1); vm._editVal = (path, oldVal, newVal, set) => { while (this.editI < this.editHistory.length - 1) { this.editHistory.pop(); } while (this.editHistory.length > 30) { this.editHistory.pop(); this.editI--; } const last = this.editHistory[this.editHistory.length - 1]; if (!last || last.key !== path) { if (last) { this.editHistory.pop(); this.editI--; } this.editHistory.push({ key: path, value: oldVal }); this.editI++; } this.editHistory.push({ key: path, value: newVal }); this.editI++; if (set) { vm._setData(path, newVal); } }; vm._getItem = function(node2, up, down) { let items; let i; if (node2.name === "img") { items = config.img.slice(0); if (!vm.getSrc) { i = items.indexOf("换图"); if (i !== -1) { items.splice(i, 1); } i = items.indexOf("超链接"); if (i !== -1) { items.splice(i, 1); } i = items.indexOf("预览图"); if (i !== -1) { items.splice(i, 1); } } i = items.indexOf("禁用预览"); if (i !== -1 && node2.attrs.ignore) { items[i] = "启用预览"; } } else if (node2.name === "a") { items = config.link.slice(0); if (!vm.getSrc) { i = items.indexOf("更换链接"); if (i !== -1) { items.splice(i, 1); } } } else if (node2.name === "video" || node2.name === "audio") { items = config.media.slice(0); i = items.indexOf("封面"); if (!vm.getSrc && i !== -1) { items.splice(i, 1); } i = items.indexOf("循环"); if (node2.attrs.loop && i !== -1) { items[i] = "不循环"; } i = items.indexOf("自动播放"); if (node2.attrs.autoplay && i !== -1) { items[i] = "不自动播放"; } } else { items = config.node.slice(0); } if (!up) { i = items.indexOf("上移"); if (i !== -1) { items.splice(i, 1); } } if (!down) { i = items.indexOf("下移"); if (i !== -1) { items.splice(i, 1); } } return items; }; vm._tooltip = function(obj) { vm.$set(vm, "tooltip", { top: obj.top, items: obj.items }); vm._tooltipcb = obj.success; }; vm._slider = function(obj) { vm.$set(vm, "slider", { min: obj.min, max: obj.max, value: obj.value, top: obj.top }); vm._slideringcb = obj.changing; vm._slidercb = obj.change; }; vm._maskTap = function() { while (vm._mask.length) { vm._mask.pop()(); } if (vm.tooltip) { vm.$set(vm, "tooltip", null); } if (vm.slider) { vm.$set(vm, "slider", null); } }; function insert(node2) { if (vm._edit) { vm._edit.insert(node2); } else { const nodes = vm.nodes.slice(0); nodes.push(node2); vm._editVal("nodes", vm.nodes, nodes, true); } } vm.insertHtml = (html) => { this.inserting = true; const arr = new Parser(vm).parse(html); this.inserting = void 0; for (let i = 0; i < arr.length; i++) { insert(arr[i]); } }; vm.insertImg = function() { vm.getSrc && vm.getSrc("img").then((src) => { if (typeof src === "string") { src = [src]; } const parser = new Parser(vm); for (let i = 0; i < src.length; i++) { insert({ name: "img", attrs: { src: parser.getUrl(src[i]) } }); } }).catch(() => { }); }; vm.insertLink = function() { vm.getSrc && vm.getSrc("link").then((url2) => { insert({ name: "a", attrs: { href: url2 }, children: [{ type: "text", text: url2 }] }); }).catch(() => { }); }; vm.insertTable = function(rows, cols) { const table = { name: "table", attrs: { style: "display:table;width:100%;margin:10px 0;text-align:center;border-spacing:0;border-collapse:collapse;border:1px solid gray" }, children: [] }; for (let i = 0; i < rows; i++) { const tr = { name: "tr", attrs: {}, children: [] }; for (let j = 0; j < cols; j++) { tr.children.push({ name: "td", attrs: { style: "padding:2px;border:1px solid gray" }, children: [{ type: "text", text: "" }] }); } table.children.push(tr); } insert(table); }; function insertMedia(node2) { if (typeof node2.src === "string") { node2.src = [node2.src]; } const parser = new Parser(vm); for (let i = 0; i < node2.src.length; i++) { node2.src[i] = parser.getUrl(node2.src[i]); } insert({ name: "div", attrs: { style: "text-align:center" }, children: [node2] }); } vm.insertVideo = function() { vm.getSrc && vm.getSrc("video").then((src) => { insertMedia({ name: "video", attrs: { controls: "T" }, children: [], src, html: `` }); }).catch(() => { }); }; vm.insertAudio = function() { vm.getSrc && vm.getSrc("audio").then((attrs) => { let src; if (attrs.src) { src = attrs.src; attrs.src = void 0; } else { src = attrs; attrs = {}; } attrs.controls = "T"; insertMedia({ name: "audio", attrs, children: [], src }); }).catch(() => { }); }; vm.insertText = function() { insert({ name: "p", attrs: {}, children: [{ type: "text", text: "" }] }); }; vm.clear = function() { vm._maskTap(); vm._edit = void 0; vm.$set(vm, "nodes", [{ name: "p", attrs: {}, children: [{ type: "text", text: "" }] }]); }; vm.getContent = function() { let html = ""; (function traversal(nodes, table) { for (let i = 0; i < nodes.length; i++) { let item = nodes[i]; if (item.type === "text") { html += item.text.replace(/&/g, "&").replace(//g, ">").replace(/\n/g, "
").replace(/\xa0/g, " "); } else { if (item.name === "img") { item.attrs.i = ""; if ((item.attrs.src || "").includes("data:image/svg+xml;utf8,")) { html += item.attrs.src.substr(24).replace(/%23/g, "#").replace(" 1) { item.children = []; for (let j = 0; j < item.src.length; j++) { item.children.push({ name: "source", attrs: { src: item.src[j] } }); } } else { item.attrs.src = item.src[0]; } } else if (item.name === "div" && (item.attrs.style || "").includes("overflow:auto") && (item.children[0] || {}).name === "table") { item = item.children[0]; } if (item.name === "table") { item = JSON.parse(JSON.stringify(item)); table = item.attrs; if ((item.attrs.style || "").includes("display:grid")) { item.attrs.style = item.attrs.style.split("display:grid")[0]; const children = [{ name: "tr", attrs: {}, children: [] }]; for (let j = 0; j < item.children.length; j++) { item.children[j].attrs.style = item.children[j].attrs.style.replace(/grid-[^;]+;*/g, ""); if (item.children[j].r !== children.length) { children.push({ name: "tr", attrs: {}, children: [item.children[j]] }); } else { children[children.length - 1].children.push(item.children[j]); } } item.children = children; } } html += "<" + item.name; for (const attr in item.attrs) { let val = item.attrs[attr]; if (!val) continue; if (val === "T" || val === true) { html += " " + attr; continue; } else if (item.name[0] === "t" && attr === "style" && table) { val = val.replace(/;*display:table[^;]*/, ""); if (table.border) { val = val.replace(/border[^;]+;*/g, ($) => $.includes("collapse") ? $ : ""); } if (table.cellpadding) { val = val.replace(/padding[^;]+;*/g, ""); } if (!val) continue; } html += " " + attr + '="' + val.replace(/"/g, """) + '"'; } html += ">"; if (item.children) { traversal(item.children, table); html += ""; } } } })(vm.nodes); for (let i = vm.plugins.length; i--; ) { if (vm.plugins[i].onGetContent) { html = vm.plugins[i].onGetContent(html) || html; } } return html; }; } Editable.prototype.onUpdate = function(content, config2) { if (this.vm.editable) { this.vm._maskTap(); config2.entities.amp = "&"; if (!this.inserting) { this.vm._edit = void 0; if (!content) { setTimeout(() => { this.vm.$set(this.vm, "nodes", [{ name: "p", attrs: {}, children: [{ type: "text", text: "" }] }]); }, 0); } } } }; Editable.prototype.onParse = function(node2) { if (this.vm.editable && (node2.name === "td" || node2.name === "th") && !this.vm.getText(node2.children)) { node2.children.push({ type: "text", text: "" }); } }; const plugins = [Editable]; const _sfc_main$A = { name: "mp-html", data() { return { tooltip: null, slider: null, nodes: [] }; }, props: { editable: Boolean, placeholder: String, containerStyle: { type: String, default: "" }, content: { type: String, default: "" }, copyLink: { type: [Boolean, String], default: true }, domain: String, errorImg: { type: String, default: "" }, lazyLoad: { type: [Boolean, String], default: false }, loadingImg: { type: String, default: "" }, pauseVideo: { type: [Boolean, String], default: true }, previewImg: { type: [Boolean, String], default: true }, scrollTable: [Boolean, String], selectable: [Boolean, String], setTitle: { type: [Boolean, String], default: true }, showImgMenu: { type: [Boolean, String], default: true }, tagStyle: Object, useAnchor: [Boolean, Number] }, emits: ["load", "ready", "imgtap", "linktap", "play", "error"], components: { node }, watch: { editable(val) { this.setContent(val ? this.content : this.getContent()); if (!val) this._maskTap(); }, content(content) { this.setContent(content); } }, created() { this.plugins = []; for (let i = plugins.length; i--; ) { this.plugins.push(new plugins[i](this)); } }, mounted() { if ((this.content || this.editable) && !this.nodes.length) { this.setContent(this.content); } }, beforeDestroy() { this._hook("onDetached"); clearInterval(this._timer); }, methods: { _containTap() { if (!this._lock && !this.slider) { this._edit = void 0; this._maskTap(); } }, _tooltipTap(e) { this._tooltipcb(e.currentTarget.dataset.i); this.$set(this, "tooltip", null); }, _sliderChanging(e) { this._slideringcb(e.detail.value); }, _sliderChange(e) { this._slidercb(e.detail.value); }, /** * @description 将锚点跳转的范围限定在一个 scroll-view 内 * @param {Object} page scroll-view 所在页面的示例 * @param {String} selector scroll-view 的选择器 * @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名 */ in(page2, selector, scrollTop) { if (page2 && selector && scrollTop) { this._in = { page: page2, selector, scrollTop }; } }, /** * @description 锚点跳转 * @param {String} id 要跳转的锚点 id * @param {Number} offset 跳转位置的偏移量 * @returns {Promise} */ navigateTo(id, offset) { return new Promise((resolve, reject2) => { if (!this.useAnchor) { reject2(Error("Anchor is disabled")); return; } offset = offset || parseInt(this.useAnchor) || 0; let deep = " "; const selector = uni.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector : "._root") + (id ? `${deep}#${id}` : "")).boundingClientRect(); if (this._in) { selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect(); } else { selector.selectViewport().scrollOffset(); } selector.exec((res) => { if (!res[0]) { reject2(Error("Label not found")); return; } const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset; if (this._in) { this._in.page[this._in.scrollTop] = scrollTop; } else { uni.pageScrollTo({ scrollTop, duration: 300 }); } resolve(); }); }); }, /** * @description 获取文本内容 * @return {String} */ getText(nodes) { let text = ""; (function traversal(nodes2) { for (let i = 0; i < nodes2.length; i++) { const node2 = nodes2[i]; if (node2.type === "text") { text += node2.text.replace(/&/g, "&"); } else if (node2.name === "br") { text += "\n"; } else { const isBlock = node2.name === "p" || node2.name === "div" || node2.name === "tr" || node2.name === "li" || node2.name[0] === "h" && node2.name[1] > "0" && node2.name[1] < "7"; if (isBlock && text && text[text.length - 1] !== "\n") { text += "\n"; } if (node2.children) { traversal(node2.children); } if (isBlock && text[text.length - 1] !== "\n") { text += "\n"; } else if (node2.name === "td" || node2.name === "th") { text += " "; } } } })(nodes || this.nodes); return text; }, /** * @description 获取内容大小和位置 * @return {Promise} */ getRect() { return new Promise((resolve, reject2) => { uni.createSelectorQuery().in(this).select("#_root").boundingClientRect().exec((res) => res[0] ? resolve(res[0]) : reject2(Error("Root label not found"))); }); }, /** * @description 暂停播放媒体 */ pauseMedia() { for (let i = (this._videos || []).length; i--; ) { this._videos[i].pause(); } const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()'; let page2 = this.$parent; while (!page2.$scope) page2 = page2.$parent; page2.$scope.$getAppWebview().evalJS(command); }, /** * @description 设置内容 * @param {String} content html 内容 * @param {Boolean} append 是否在尾部追加 */ setContent(content, append) { if (!append || !this.imgList) { this.imgList = []; } const nodes = new Parser(this).parse(content); this.$set(this, "nodes", append ? (this.nodes || []).concat(nodes) : nodes); this._videos = []; this.$nextTick(() => { this._hook("onLoad"); this.$emit("load"); }); let height; clearInterval(this._timer); this._timer = setInterval(() => { this.getRect().then((rect) => { if (rect.height === height) { this.$emit("ready", rect); clearInterval(this._timer); } height = rect.height; }).catch(() => { }); }, 350); }, /** * @description 调用插件钩子函数 */ _hook(name) { for (let i = plugins.length; i--; ) { if (this.plugins[i][name]) { this.plugins[i][name](); } } } } }; function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) { const _component_node = vue.resolveComponent("node"); return vue.openBlock(), vue.createElementBlock( "view", { id: "_root", class: vue.normalizeClass(($props.selectable ? "_select " : "") + "_root"), style: vue.normalizeStyle(($props.editable ? "min-height:200px;" : "") + $props.containerStyle), onClick: _cache[3] || (_cache[3] = (...args) => $options._containTap && $options._containTap(...args)) }, [ !$data.nodes[0] ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_node, { key: 1, childs: $data.nodes, opts: [$props.lazyLoad, $props.loadingImg, $props.errorImg, $props.showImgMenu, $props.selectable, $props.editable, $props.placeholder, "nodes"], name: "span" }, null, 8, ["childs", "opts"])), $data.tooltip ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "_tooltip_contain", style: vue.normalizeStyle("top:" + $data.tooltip.top + "px") }, [ vue.createElementVNode("view", { class: "_tooltip" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.tooltip.items, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "_tooltip_item", "data-i": index2, onClick: _cache[0] || (_cache[0] = (...args) => $options._tooltipTap && $options._tooltipTap(...args)) }, vue.toDisplayString(item), 9, ["data-i"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), $data.slider ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "_slider", style: vue.normalizeStyle("top:" + $data.slider.top + "px") }, [ vue.createElementVNode("slider", { value: $data.slider.value, min: $data.slider.min, max: $data.slider.max, "handle-size": "14", "block-size": "14", "show-value": "", activeColor: "white", style: { "padding": "3px" }, onChanging: _cache[1] || (_cache[1] = (...args) => $options._sliderChanging && $options._sliderChanging(...args)), onChange: _cache[2] || (_cache[2] = (...args) => $options._sliderChange && $options._sliderChange(...args)) }, null, 40, ["value", "min", "max"]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const mpHtml = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-334fab66"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/mp-html/mp-html.vue"]]); const _sfc_main$z = { components: { mpHtml }, data() { return { type: null, content: "" }; }, onLoad(options) { this.type = options.type; if (this.type == "doctorAgreement") { uni.setNavigationBarTitle({ title: "入驻协议" }); } if (this.type == "userRegister") { uni.setNavigationBarTitle({ title: "用户协议" }); } if (this.type == "userPrivacy") { uni.setNavigationBarTitle({ title: "隐私协议" }); } this.getConfig(); }, methods: { getConfig() { var data = { key: "his.agreementConfig" }; getConfigByKey(data).then( (res) => { if (res.code == 200) { if (this.type == "doctorRegister") { this.content = JSON.parse(res.data).doctorRegister; } else if (this.type == "doctorFiling") { this.content = JSON.parse(res.data).doctorFiling; } else if (this.type == "userRegister") { this.content = JSON.parse(res.data).userRegister; } else if (this.type == "userPrivacy") { this.content = JSON.parse(res.data).userPrivacy; } } }, (rej) => { } ); } } }; function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) { const _component_mp_html = vue.resolveComponent("mp-html"); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createVNode(_component_mp_html, { content: $data.content }, null, 8, ["content"]) ]); } const Pages_userAgreement = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-b3cf2c5c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/agreement.vue"]]); const _sfc_main$y = { mixins: [MescrollMixin], // 使用mixin data() { return { hosLevelOptions: [], tabs: [ { index: 1, name: "关注医生" }, { index: 2, name: "签约医生" } ], type: 0, mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad(options) { this.getDictByKey("sys_hospital_level"); }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_hospital_level") { this.hosLevelOptions = res.data; } } }, (err) => { } ); }, typeChange(item) { this.type = item.index; formatAppLog("log", "at pages_user/myDoctorList.vue:138", this.type); this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { type: this.type + 1, pageNum: page2.num, pageSize: page2.size }; getMyDoctorList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { res.data.list.forEach(function(value2, index2, array3) { value2.prices = JSON.parse(value2.priceJson); }); that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { current: $data.type, scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.typeChange }, null, 8, ["current", "list", "onChange"]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: $data.downOption, up: $data.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "doctors" }, [ vue.createElementVNode("view", { class: "doctor-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "doctor", onClick: ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + item.doctorId) }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "head-box" }, [ vue.createElementVNode("image", { mode: "aspectFill", class: "doc-img", src: item.avatar }, null, 8, ["src"]), item.workStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "isline" }, [ vue.createElementVNode("view", { class: "img" }, [ vue.createElementVNode("image", { src: "/static/images/isline.png" }), vue.createElementVNode("view", { class: "name" }, "在线") ]) ])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString(item.doctorName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-position" }, vue.toDisplayString(item.position), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-dept" }, vue.toDisplayString(item.deptName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "hospital-box" }, [ vue.createElementVNode("view", { class: "tag" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.$getDictLabelName($data.hosLevelOptions, item.hospitalLevel)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(item.hospitalName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-spec" }, [ vue.createElementVNode( "view", { class: "spec ellipsis2" }, vue.toDisplayString(item.speciality), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "doc-count" }, [ vue.createElementVNode("view", { class: "name" }, "好评:"), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item.pingStar) + "分", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "name" }, "接诊量:"), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item.pingStar), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "name" }, "平均响应:"), vue.createElementVNode("view", { class: "count" }) ]), vue.createElementVNode("view", { class: "doc-price" }, [ vue.createElementVNode("view", { class: "btn" }, [ vue.createTextVNode(" 咨询医生¥ "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.prices, (price, index3) => { return vue.openBlock(), vue.createElementBlock("text", null, [ vue.createTextVNode( vue.toDisplayString(price.price.toFixed(2)) + " ", 1 /* TEXT */ ), index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "down", "up", "onDown", "onUp"]) ]); } const Pages_userMyDoctorList = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-bdd0a4ce"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/myDoctorList.vue"]]); let request$3 = new Request$1().http; function getPatientList() { return request$3("/app/patient/getPatientList", null, "GET"); } function getPatientById(data) { return request$3("/app/patient/getPatientById", data, "GET"); } function delPatient(data) { return request$3("/app/patient/delPatient", data, "POST", "application/json;charset=UTF-8"); } function addPatient(data) { return request$3("/app/patient/addPatient", data, "POST", "application/json;charset=UTF-8"); } function editPatient(data) { return request$3("/app/patient/editPatient", data, "POST", "application/json;charset=UTF-8"); } const _sfc_main$x = { data() { return { patient: [] }; }, onLoad() { this.getPatientList(); uni.$on("refreshPatient", () => { this.getPatientList(); }); }, methods: { selectPatient(item) { uni.$emit("refreshOrderPatient", item); uni.navigateBack({ delta: 1 }); }, editPatient(item) { uni.navigateTo({ url: "./addEditPatient?type=edit&patientId=" + item.patientId }); }, delPatient(item) { uni.showModal({ title: "提示", content: "确认删除吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { var data = { patientId: item.patientId }; delPatient(data).then( (res2) => { if (res2.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); this.getPatientList(); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }); }, getPatientList() { getPatientList().then( (res) => { uni.hideLoading(); if (res.code == 200) { this.patient = res.data; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, addPatient() { uni.navigateTo({ url: "./addEditPatient?type=add" }); } } }; function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.patient, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, onClick: vue.withModifiers(($event) => $options.selectPatient(item), ["stop"]), class: "peop-item" }, [ vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(item.patientName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "detail" }, [ item.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "男")) : vue.createCommentVNode("v-if", true), item.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "女")) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$getAge(item.birthday)) + "岁", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$parseIdCard(item.idCard)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "operat-box" }, [ vue.createElementVNode("image", { src: "/static/images/del.png", mode: "", onClick: vue.withModifiers(($event) => $options.delPatient(item), ["stop"]) }, null, 8, ["onClick"]), vue.createElementVNode("image", { src: "/static/images/edit.png", mode: "", onClick: vue.withModifiers(($event) => $options.editPatient(item), ["stop"]) }, null, 8, ["onClick"]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), $data.patient.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "no-data-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.getPatientList()) }, [ vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", mode: "aspectFit" }), vue.createElementVNode("view", { class: "empty-title" }, "暂无数据") ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "sub-btn", onClick: _cache[1] || (_cache[1] = (...args) => $options.addPatient && $options.addPatient(...args)) }, "创建就诊人") ]) ]); } const Pages_userPatient = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/patient.vue"]]); const props = { props: { // 标签类型info、primary、success、warning、error type: { type: String, default: props$y.tag.type }, // 不可用 disabled: { type: [Boolean, String], default: props$y.tag.disabled }, // 标签的大小,large,medium,mini size: { type: String, default: props$y.tag.size }, // tag的形状,circle(两边半圆形), square(方形,带圆角) shape: { type: String, default: props$y.tag.shape }, // 标签文字 text: { type: [String, Number], default: props$y.tag.text }, // 背景颜色,默认为空字符串,即不处理 bgColor: { type: String, default: props$y.tag.bgColor }, // 标签字体颜色,默认为空字符串,即不处理 color: { type: String, default: props$y.tag.color }, // 标签的边框颜色 borderColor: { type: String, default: props$y.tag.borderColor }, // 关闭按钮图标的颜色 closeColor: { type: String, default: props$y.tag.closeColor }, // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了 name: { type: [String, Number], default: props$y.tag.name }, // // 模式选择,dark|light|plain // mode: { // type: String, // default: 'light' // }, // 镂空时是否填充背景色 plainFill: { type: Boolean, default: props$y.tag.plainFill }, // 是否镂空 plain: { type: Boolean, default: props$y.tag.plain }, // 是否可关闭 closable: { type: Boolean, default: props$y.tag.closable }, // 是否显示 show: { type: Boolean, default: props$y.tag.show }, // 内置图标,或绝对路径的图片 icon: { type: String, default: props$y.tag.icon } } }; const _sfc_main$w = { name: "u-tag", mixins: [mpMixin, mixin, props], data() { return {}; }, computed: { style() { const style = {}; if (this.bgColor) { style.backgroundColor = this.bgColor; } if (this.color) { style.color = this.color; } if (this.borderColor) { style.borderColor = this.borderColor; } return style; }, // nvue下,文本颜色无法继承父元素 textColor() { const style = {}; if (this.color) { style.color = this.color; } return style; }, imgStyle() { const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px"; return { width, height: width }; }, // 文本的样式 closeSize() { const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12; return size; }, // 图标大小 iconSize() { const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16; return size; }, // 图标颜色 elIconColor() { return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff"; } }, methods: { // 点击关闭按钮 closeHandler() { this.$emit("close", this.name); }, // 点击标签 clickHandler() { this.$emit("click", this.name); } } }; function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4); return vue.openBlock(), vue.createBlock(_component_u_transition, { mode: "fade", show: _ctx.show, style: { "display": "inline-flex" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-tag-wrapper" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-tag", [`u-tag--${_ctx.shape}`, !_ctx.plain && `u-tag--${_ctx.type}`, _ctx.plain && `u-tag--${_ctx.type}--plain`, `u-tag--${_ctx.size}`, _ctx.plain && _ctx.plainFill && `u-tag--${_ctx.type}--plain--fill`]]), onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])), style: vue.normalizeStyle([{ marginRight: _ctx.closable ? "10px" : 0, marginTop: _ctx.closable ? "10px" : 0 }, $options.style]) }, [ vue.renderSlot(_ctx.$slots, "icon", {}, () => [ _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-tag__icon" }, [ _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _ctx.icon, style: vue.normalizeStyle([$options.imgStyle]) }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 1, color: $options.elIconColor, name: _ctx.icon, size: $options.iconSize }, null, 8, ["color", "name", "size"])) ])) : vue.createCommentVNode("v-if", true) ], true), vue.createElementVNode( "text", { class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]), style: vue.normalizeStyle([$options.textColor]) }, vue.toDisplayString(_ctx.text), 7 /* TEXT, CLASS, STYLE */ ) ], 6 /* CLASS, STYLE */ ), _ctx.closable ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]), onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])), style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor }) }, [ vue.createVNode(_component_u_icon, { name: "close", size: $options.closeSize, color: "#ffffff" }, null, 8, ["size"]) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ]) ]), _: 3 /* FORWARDED */ }, 8, ["show"]); } const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-2fd891bb"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]); const _sfc_main$v = { data() { return { relationShow: false, relations: [ { name: "本人" }, { name: "配偶" }, { name: "父母" }, { name: "子女" }, { name: "朋友" }, { name: "亲戚" }, { name: "其他" } ], historyAllergics: [ { name: "阿司匹林", checked: 0 }, { name: "磺胺类", checked: 0 }, { name: "头孢类", checked: 0 }, { name: "青毒素类", checked: 0 }, { name: "奶制品", checked: 0 }, { name: "其他", checked: 0 } ], selfMedHistorys: [ { name: "糖尿病", checked: 0 }, { name: "哮喘", checked: 0 }, { name: "恶性肿瘤", checked: 0 }, { name: "高血压", checked: 0 }, { name: "其他", checked: 0 } ], familyMedHistorys: [ { name: "糖尿病", checked: 0 }, { name: "哮喘", checked: 0 }, { name: "恶性肿瘤", checked: 0 }, { name: "高血压", checked: 0 }, { name: "其他", checked: 0 } ], type: null, patientId: null, form: { sex: 1, birthday: "", idCard: "", relation: "", // 与本人关系 liverUnusual: "正常", // 肝功能是否异常 renalUnusual: "正常", // 肾功能是否异常 historyAllergic: "无", // 过敏史 familyMedHistory: "无", // 家族病史 selfMedHistory: "无" // 个人病史 } }; }, onLoad(option) { this.type = option.type; if (this.type == "edit") { this.patientId = option.patientId; this.getPatientById(); uni.setNavigationBarTitle({ title: "编辑就诊人" }); } else { uni.setNavigationBarTitle({ title: "新增就诊人" }); } }, methods: { liverUnusualChange(item) { formatAppLog("log", "at pages_user/addEditPatient.vue:289", item); this.form.liverUnusual = item.detail.value; }, renalUnusualChange(item) { formatAppLog("log", "at pages_user/addEditPatient.vue:293", item); this.form.renalUnusual = item.detail.value; }, historyAllergicOptionChange(item) { item.checked = item.checked == 1 ? 0 : 1; }, selfMedHistoryOptionChange(item) { item.checked = item.checked == 1 ? 0 : 1; }, familyMedHistoryOptionChange(item) { item.checked = item.checked == 1 ? 0 : 1; }, historyAllergicChange(item) { formatAppLog("log", "at pages_user/addEditPatient.vue:306", item); this.form.historyAllergic = item.detail.value; }, selfMedHistoryChange(item) { formatAppLog("log", "at pages_user/addEditPatient.vue:310", item); this.form.selfMedHistory = item.detail.value; }, familyMedHistoryChange(item) { formatAppLog("log", "at pages_user/addEditPatient.vue:314", item); this.form.familyMedHistory = item.detail.value; }, relationSelect(e) { this.form.relation = e.name; }, idcardChange() { if (this.form.idCard.length == 18) { var json = this.$parseIDCardInfo(this.form.idCard); this.form.birthday = json.birthday; formatAppLog("log", "at pages_user/addEditPatient.vue:324", json); } }, genderChange(type2) { this.form.sex = type2; }, getPatientById() { var data = { patientId: this.patientId }; getPatientById(data).then( (res) => { if (res.code == 200) { this.form = res.data; this.date = this.form.birthday; if (this.form.historyAllergic != null && this.form.historyAllergic != "无") { var options = this.form.historyAllergic.split(","); this.historyAllergics.forEach((item) => { for (var i = 0; i < options.length; i++) { if (item.name == options[i]) { item.checked = 1; } } }); this.form.historyAllergic = "有"; } if (this.form.selfMedHistory != null && this.form.selfMedHistory != "无") { var options = this.form.selfMedHistory.split(","); this.selfMedHistorys.forEach((item) => { for (var i = 0; i < options.length; i++) { if (item.name == options[i]) { item.checked = 1; } } }); this.form.selfMedHistory = "有"; } if (this.form.familyMedHistory != null && this.form.familyMedHistory != "无") { var options = this.form.familyMedHistory.split(","); this.familyMedHistorys.forEach((item) => { for (var i = 0; i < options.length; i++) { if (item.name == options[i]) { item.checked = 1; } } }); this.form.familyMedHistory = "有"; } } else { uni.showToast({ title: res.msg }); } }, (rej) => { } ); }, submit() { if (this.type == "add") { this.addPatient(); } else if (this.type == "edit") { this.editPatient(); } }, editPatient() { var data = { patientId: this.patientId, patientName: this.form.patientName, mobile: this.form.mobile, sex: this.form.sex, birthday: this.form.birthday, idCard: this.form.idCard, relation: this.form.relation, // 与本人关系 liverUnusual: this.form.liverUnusual, // 肝功能是否异常 renalUnusual: this.form.renalUnusual // 肾功能是否异常 }; if (this.form.historyAllergic == "有") { var options = []; this.historyAllergics.forEach((item) => { if (item.checked == 1) { options.push(item.name); } }); data.historyAllergic = options.toString(); } else { data.historyAllergic = this.form.historyAllergic; } if (this.form.selfMedHistory == "有") { var options = []; this.selfMedHistorys.forEach((item) => { if (item.checked == 1) { options.push(item.name); } }); data.selfMedHistory = options.toString(); } else { data.selfMedHistory = this.form.selfMedHistory; } if (this.form.familyMedHistory == "有") { var options = []; this.familyMedHistorys.forEach((item) => { if (item.checked == 1) { options.push(item.name); } }); data.familyMedHistory = options.toString(); } else { data.familyMedHistory = this.form.familyMedHistory; } editPatient(data).then( (res) => { if (res.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); setTimeout(function() { uni.$emit("refreshPatient"); uni.navigateBack({ delta: 1 }); }, 500); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, addPatient() { var data = { patientName: this.form.patientName, mobile: this.form.mobile, sex: this.form.sex, birthday: this.form.birthday, idCard: this.form.idCard, relation: this.form.relation, // 与本人关系 liverUnusual: this.form.liverUnusual, // 肝功能是否异常 renalUnusual: this.form.renalUnusual // 肾功能是否异常 }; if (this.form.historyAllergic == "有") { var options = []; this.historyAllergics.forEach((item) => { if (item.checked == 1) { options.push(item.name); } }); data.historyAllergic = options.toString(); } else { data.historyAllergic = this.form.historyAllergic; } if (this.form.selfMedHistory == "有") { var options = []; this.selfMedHistorys.forEach((item) => { if (item.checked == 1) { options.push(item.name); } }); data.selfMedHistory = options.toString(); } else { data.selfMedHistory = this.form.selfMedHistory; } if (this.form.familyMedHistory == "有") { var options = []; this.familyMedHistorys.forEach((item) => { if (item.checked == 1) { options.push(item.name); } }); data.familyMedHistory = options.toString(); } else { data.familyMedHistory = this.form.familyMedHistory; } addPatient(data).then( (res) => { if (res.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); setTimeout(function() { uni.$emit("refreshPatient"); uni.navigateBack({ delta: 1 }); }, 500); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, // 出生日期选择 birthdayChange: function(e) { this.form.birthday = e.target.value; } } }; function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3); const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2); const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_2$1); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createVNode(_component_u_alert, { title: "国家卫健委要求,就医行为必须实名登记", type: "info" }), vue.createElementVNode("view", { class: "form-box" }, [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "姓名"), vue.withDirectives(vue.createElementVNode( "input", { class: "input-width", type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.patientName = $event), placeholder: "请输入真实姓名", "placeholder-class": "form-input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.patientName] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "性别"), vue.createElementVNode("radio-group", { style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [ vue.createElementVNode("radio", { onClick: _cache[1] || (_cache[1] = ($event) => $options.genderChange(1)), color: "#C39A58", value: "1", checked: $data.form.sex === 1, style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "男") ]), vue.createElementVNode("label", null, [ vue.createElementVNode("radio", { onClick: _cache[2] || (_cache[2] = ($event) => $options.genderChange(2)), color: "#C39A58", value: "2", checked: $data.form.sex === 2, style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "女") ]) ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "联系方式"), vue.withDirectives(vue.createElementVNode( "input", { class: "input-width", type: "phone", "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.mobile = $event), placeholder: "请输入联系方式", "placeholder-class": "form-input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.mobile] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "身份证号"), vue.withDirectives(vue.createElementVNode( "input", { class: "input-width", type: "idcard", onBlur: _cache[4] || (_cache[4] = ($event) => $options.idcardChange()), "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.idCard = $event), placeholder: "请输入身份证号", "placeholder-class": "form-input" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.form.idCard] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "出生年月"), vue.createElementVNode("picker", { value: $data.form.birthday, start: "1900-01-01", class: "birth-picker", mode: "date", onChange: _cache[6] || (_cache[6] = (...args) => $options.birthdayChange && $options.birthdayChange(...args)) }, [ vue.createElementVNode("view", { class: "right-box" }, [ vue.createElementVNode("view", { class: "input-box" }, [ vue.createElementVNode("input", { type: "text", value: $data.form.birthday, placeholder: "请选择出生年月", "placeholder-class": "form-input", disabled: "disabled" }, null, 8, ["value"]) ]), vue.createElementVNode("image", { class: "arrow", src: "/static/images/arrow_gray.png", mode: "" }) ]) ], 40, ["value"]) ]) ]), vue.createElementVNode("view", { class: "form-box" }, [ vue.createElementVNode("view", { class: "form-item", onClick: _cache[7] || (_cache[7] = ($event) => $data.relationShow = true) }, [ vue.createElementVNode("text", { class: "label" }, "与本人关系"), vue.createElementVNode("view", { class: "right-box" }, [ vue.createElementVNode("view", { class: "input-box" }, [ vue.createElementVNode("input", { type: "text", value: $data.form.relation, placeholder: "请选择", "placeholder-class": "form-input", disabled: "disabled" }, null, 8, ["value"]) ]), vue.createElementVNode("image", { class: "arrow", src: "/static/images/arrow_gray.png", mode: "" }) ]) ]) ]), vue.createElementVNode("view", { class: "form-box" }, [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "肝功能"), vue.createElementVNode( "radio-group", { onChange: _cache[8] || (_cache[8] = (...args) => $options.liverUnusualChange && $options.liverUnusualChange(...args)), style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [ vue.createElementVNode("radio", { color: "#C39A58", value: "正常", checked: $data.form.liverUnusual === "正常", style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "正常") ]), vue.createElementVNode("label", null, [ vue.createElementVNode("radio", { color: "#C39A58", value: "异常", checked: $data.form.liverUnusual === "异常", style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "异常") ]) ], 32 /* NEED_HYDRATION */ ) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "肾功能"), vue.createElementVNode( "radio-group", { onChange: _cache[9] || (_cache[9] = (...args) => $options.renalUnusualChange && $options.renalUnusualChange(...args)), style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [ vue.createElementVNode("radio", { color: "#C39A58", value: "正常", checked: $data.form.renalUnusual === "正常", style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "正常") ]), vue.createElementVNode("label", null, [ vue.createElementVNode("radio", { color: "#C39A58", value: "异常", checked: $data.form.renalUnusual === "异常", style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "异常") ]) ], 32 /* NEED_HYDRATION */ ) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "过敏史"), vue.createElementVNode( "radio-group", { onChange: _cache[10] || (_cache[10] = (...args) => $options.historyAllergicChange && $options.historyAllergicChange(...args)), style: { "display": "flex", "align-items": "center", "justify-content": "flex-end", "margin": "5rpx 0rpx" } }, [ vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [ vue.createElementVNode("radio", { color: "#C39A58", value: "无", checked: $data.form.historyAllergic === "无", style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "无") ]), vue.createElementVNode("label", null, [ vue.createElementVNode("radio", { color: "#C39A58", value: "有", checked: $data.form.historyAllergic === "有", style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "有") ]) ], 32 /* NEED_HYDRATION */ ) ]), $data.form.historyAllergic == "有" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "form-item" }, [ vue.createElementVNode("view", { class: "option-box", style: { "margin": "5rpx 0rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.historyAllergics, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "option" }, [ vue.createVNode(_component_u_tag, { onClick: ($event) => $options.historyAllergicOptionChange(item), borderColor: item.checked == 1 ? "#ffffff" : "#C39A58", bgColor: item.checked == 1 ? "#C39A58" : "#ffffff", color: item.checked == 1 ? "#ffffff" : "#C39A58", shape: "circle", text: item.name }, null, 8, ["onClick", "borderColor", "bgColor", "color", "text"]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "个人病史"), vue.createElementVNode( "radio-group", { onChange: _cache[11] || (_cache[11] = (...args) => $options.selfMedHistoryChange && $options.selfMedHistoryChange(...args)), style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [ vue.createElementVNode("radio", { color: "#C39A58", value: "无", checked: $data.form.selfMedHistory === "无", style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "无") ]), vue.createElementVNode("label", null, [ vue.createElementVNode("radio", { color: "#C39A58", value: "有", checked: $data.form.selfMedHistory === "有", style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "有") ]) ], 32 /* NEED_HYDRATION */ ) ]), $data.form.selfMedHistory == "有" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "form-item" }, [ vue.createElementVNode("view", { class: "option-box", style: { "margin": "5rpx 0rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.selfMedHistorys, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "option" }, [ vue.createVNode(_component_u_tag, { onClick: ($event) => $options.selfMedHistoryOptionChange(item), borderColor: item.checked == 1 ? "#ffffff" : "#C39A58", bgColor: item.checked == 1 ? "#C39A58" : "#ffffff", color: item.checked == 1 ? "#ffffff" : "#C39A58", shape: "circle", text: item.name }, null, 8, ["onClick", "borderColor", "bgColor", "color", "text"]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "家庭病史"), vue.createElementVNode( "radio-group", { onChange: _cache[12] || (_cache[12] = (...args) => $options.familyMedHistoryChange && $options.familyMedHistoryChange(...args)), style: { "display": "flex", "align-items": "center" } }, [ vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [ vue.createElementVNode("radio", { color: "#C39A58", value: "无", checked: $data.form.familyMedHistory === "无", style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "无") ]), vue.createElementVNode("label", null, [ vue.createElementVNode("radio", { color: "#C39A58", value: "有", checked: $data.form.familyMedHistory === "有", style: { "margin-right": "16upx" } }, null, 8, ["checked"]), vue.createElementVNode("text", { class: "option-text" }, "有") ]) ], 32 /* NEED_HYDRATION */ ) ]), $data.form.familyMedHistory == "有" ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "form-item" }, [ vue.createElementVNode("view", { class: "option-box", style: { "margin": "5rpx 0rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.familyMedHistorys, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "option" }, [ vue.createVNode(_component_u_tag, { onClick: ($event) => $options.familyMedHistoryOptionChange(item), borderColor: item.checked == 1 ? "#ffffff" : "#C39A58", bgColor: item.checked == 1 ? "#C39A58" : "#ffffff", color: item.checked == 1 ? "#ffffff" : "#C39A58", shape: "circle", text: item.name }, null, 8, ["onClick", "borderColor", "bgColor", "color", "text"]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "sub-btn", onClick: _cache[13] || (_cache[13] = ($event) => $options.submit()) }, "保存就诊人") ]), vue.createVNode(_component_u_action_sheet, { show: $data.relationShow, actions: $data.relations, title: "请选择", onClose: _cache[14] || (_cache[14] = ($event) => $data.relationShow = false), onSelect: $options.relationSelect }, null, 8, ["show", "actions", "onSelect"]) ]); } const Pages_userAddEditPatient = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/addEditPatient.vue"]]); const _sfc_main$u = { name: "UserCoupon", props: {}, mixins: [MescrollMixin], // 使用mixin data: function() { return { tabs: [ { id: 0, name: "待使用" }, { id: 1, name: "已使用" }, { id: 2, name: "已过期" } ], status: 0, mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, watch: {}, onShow() { }, methods: { statusChange(item) { formatAppLog("log", "at pages_user/myCouponList.vue:96", item); this.status = item.id; this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { status: this.status, pageNum: page2.num, pageSize: page2.size }; getMyCouponList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { current: _ctx.status, scrollable: false, list: _ctx.tabs, lineColor: "#C39A58", onChange: $options.statusChange }, null, 8, ["current", "list", "onChange"]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: _ctx.downOption, up: _ctx.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "coupon-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0fdd75d89db84458886d38e615011048.png", mode: "widthFix" })) : vue.createCommentVNode("v-if", true), item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d950e4c7af1e4464be1a7777e9dca576.png", mode: "widthFix" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { style: { "z-index": "999" } }, [ vue.createTextVNode(" ¥"), item.price != null ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0, class: "num" }, vue.toDisplayString(item.price.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), item.minPrice != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "pic-num" }, "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "btns" }, [ item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString(item.limitTime) + " 到期", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, "使用时间 " + vue.toDisplayString(item.useTime), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "bnt gray" }, "已使用")) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "bnt gray" }, "已过期")) : vue.createCommentVNode("v-if", true), item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "btn" }, "可使用")) : vue.createCommentVNode("v-if", true) ]) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "down", "up", "onDown", "onUp"]) ]); } const Pages_userMyCouponList = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-f4d41b7b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/myCouponList.vue"]]); const _sfc_main$t = { data() { return { certs: [] }; }, onLoad(val) { this.getConfigByKey(); }, methods: { getConfigByKey() { var data = { key: "his.certs" }; getConfigByKey(data).then( (res) => { if (res.code == 200) { this.certs = JSON.parse(res.data).certs.split(","); } }, (rej) => { } ); }, showImg(item) { var urls = []; urls.push(item); uni.previewImage({ urls, current: 0 }); } } }; function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "my-content" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.certs, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [ vue.createElementVNode("image", { onClick: ($event) => $options.showImg(item), src: item }, null, 8, ["onClick", "src"]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]); } const Pages_userCert = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-18b08804"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/cert.vue"]]); let request$2 = new Request$1().http; function getFollowList(data) { return request$2("/app/follow/getFollowList", data, "GET"); } function getFollowById(data) { return request$2("/app/follow/getFollowById", data, "GET"); } function doFollow(data) { return request$2("/app/follow/doFollow", data, "POST", "application/json;charset=UTF-8"); } const _sfc_main$s = { mixins: [MescrollMixin], // 使用mixin data() { return { tabs: [ { id: -1, name: "全部" }, { id: 0, name: "未完成" }, { id: 1, name: "已完成" } ], writeStatus: -1, mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad() { var that = this; uni.$on("refreshFollowList", () => { that.mescroll.resetUpScroll(); }); }, onShow() { }, methods: { doFoloow(item) { uni.navigateTo({ url: "./doFollow?followId=" + item.followId }); }, showDetails(item) { uni.navigateTo({ url: "./followDetails?followId=" + item.followId }); }, statusChange(item) { this.writeStatus = item.id; formatAppLog("log", "at pages_user/followList.vue:111", item); this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { pageNum: page2.num, pageSize: page2.size }; if (this.writeStatus != -1) { data.writeStatus = this.writeStatus; } getFollowList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.statusChange }, null, 8, ["list", "onChange"]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: $data.downOption, up: $data.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "order-item", onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId) }, [ vue.createElementVNode("view", { class: "order-top" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.tempName), 1 /* TEXT */ ) ]), item.writeStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "status red" }, " 未完成 ")) : vue.createCommentVNode("v-if", true), item.writeStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "status green" }, " 已完成 ")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "order-cont" }, [ vue.createElementVNode("view", { class: "order-time-box" }, [ vue.createElementVNode("view", { class: "order-time" }, [ vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(item.planTime), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString(item.num) + "/" + vue.toDisplayString(item.totalNum) + "期", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ item.writeStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn red", onClick: vue.withModifiers(($event) => $options.doFoloow(item), ["stop"]) }, "去填写", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), item.writeStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn green", onClick: vue.withModifiers(($event) => $options.showDetails(item), ["stop"]) }, "查看", 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ]) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "down", "up", "onDown", "onUp"]) ]); } const Pages_userFollowList = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-7c72c7c3"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/followList.vue"]]); const _sfc_main$r = { data() { return { followId: null, follow: null, doctor: null, form: null }; }, onLoad(options) { this.followId = options.followId; }, onShow() { this.getFollowById(); }, methods: { toIM() { var id = "C2CD-" + this.follow.doctorId; formatAppLog("log", "at pages_user/followDetails.vue:83", uni.$TUIKit.TUIConversationServer); store.commit("timStore/setType", "startFollow"); store.commit("timStore/setOrderId", this.follow.orderId); store.commit("timStore/setFollowId", this.follow.followId); store.commit("timStore/setImType", 2); store.commit("timStore/setConversationID", id); uni.$TUIKit.TUIConversationServer.setMessageRead(id); uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => { var _a; formatAppLog("log", "at pages_user/followDetails.vue:93", res); const { conversation } = res.data; store.commit("timStore/setConversation", conversation); let url2 = "/pages/TUIKit/TUIPages/TUIChat/index"; conversation.userProfile; url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`; uni.redirectTo({ url: url2 }); }).catch((err) => { formatAppLog("warn", "at pages_user/followDetails.vue:114", "获取 group profile 异常 = ", err); }); }, doFollow() { uni.showModal({ title: "提示", content: "确认提交吗吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { var data = { followId: this.followId, formJson: JSON.stringify(this.form) }; doFollow(data).then( (res2) => { if (res2.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); setTimeout(function() { uni.$emit("refreshFollowList"); uni.navigateBack({ delta: 1 }); }, 500); } else { uni.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { } ); } } }); }, getFollowById() { var data = { followId: this.followId }; getFollowById(data).then( (res) => { if (res.code == 200) { this.follow = res.follow; this.doctor = res.doctor; this.form = JSON.parse(this.follow.formJson); } }, (err) => { } ); } } }; function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3); const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1); const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2); const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3); const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4); const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createVNode(_component_u_alert, { fontSize: "13", type: "info", description: "为了给您提供更好的服务,希望您能用几分钟时间,将您的感受和建议告诉我们,我们非常重视您的宝贵意见!" }), vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "doctor" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "name" }, "发布医生:" + vue.toDisplayString(_ctx.dortor != null ? $data.doctor.doctorName : ""), 1 /* TEXT */ ), $data.follow != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "count" }, vue.toDisplayString($data.follow.num) + "/" + vue.toDisplayString($data.follow.totalNum) + "期", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "right" }, vue.toDisplayString($data.follow.planTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.form, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.question), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "option" }, [ item.type == 1 ? (vue.openBlock(), vue.createBlock(_component_u_radio_group, { key: 0, disabled: true, modelValue: item.answers, "onUpdate:modelValue": ($event) => item.answers = $event, placement: "column" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.options, (option, subIndex) => { return vue.openBlock(), vue.createBlock(_component_u_radio, { customStyle: { marginBottom: "8px" }, key: subIndex, label: option, name: option }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 2 /* DYNAMIC */ }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true), item.type == 2 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, { key: 1, disabled: true, modelValue: item.answers, "onUpdate:modelValue": ($event) => item.answers = $event, placement: "column" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.options, (option, subIndex) => { return vue.openBlock(), vue.createBlock(_component_u_checkbox, { customStyle: { marginBottom: "8px" }, key: subIndex, label: option, name: option }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 2 /* DYNAMIC */ }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true), item.type == 3 ? (vue.openBlock(), vue.createBlock(_component_u__textarea, { key: 2, disabled: true, count: "", maxlength: "200", modelValue: item.answers, "onUpdate:modelValue": ($event) => item.answers = $event, placeholder: "请输入内容" }, null, 8, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn cancel", onClick: _cache[0] || (_cache[0] = ($event) => $options.toIM()) }, "咨询") ]) ]); } const Pages_userFollowDetails = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-e5734008"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/followDetails.vue"]]); const _sfc_main$q = { mixins: [MescrollMixin], // 使用mixin data() { return { tabs: [ { id: 0, name: "全部" }, { id: 1, name: "待评价" }, { id: 2, name: "已评价" } ], status: 0, mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad() { var that = this; uni.$on("refreshDrugReportList", () => { that.mescroll.resetUpScroll(); }); }, onShow() { }, methods: { doPing(item) { uni.navigateTo({ url: "./drugReportPing?reportId=" + item.reportId }); }, showDetails(item) { uni.navigateTo({ url: "./drugReportDetails?reportId=" + item.reportId }); }, statusChange(item) { this.status = item.id; formatAppLog("log", "at pages_user/drugReportList.vue:113", item); this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { pageNum: page2.num, pageSize: page2.size }; if (this.status != 0) { data.status = this.status; } getDrugReportList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.statusChange }, null, 8, ["list", "onChange"]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: $data.downOption, up: $data.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "order-item", onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId) }, [ vue.createElementVNode("view", { class: "order-top" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { class: "head", mode: "aspectFill", src: item.avatar }, null, 8, ["src"]), vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(item.doctorName), 1 /* TEXT */ ) ]), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "status red" }, " 未评价 ")) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "status green" }, " 已评价 ")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "order-cont" }, [ vue.createElementVNode( "view", { class: "order-desc" }, "咨询总结:" + vue.toDisplayString(item.reportSummary), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "order-time-box" }, [ vue.createElementVNode("view", { class: "order-time" }, [ vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(item.createTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn green", onClick: vue.withModifiers(($event) => $options.doPing(item), ["stop"]) }, "去评价", 8, ["onClick"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "btn green", onClick: vue.withModifiers(($event) => $options.showDetails(item), ["stop"]) }, "查看", 8, ["onClick"]) ]) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "down", "up", "onDown", "onUp"]) ]); } const Pages_userDrugReportList = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__scopeId", "data-v-b91fd820"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/drugReportList.vue"]]); const _sfc_main$p = { data() { return { report: null, form: { reportId: null, pingStar: 0, pingContent: "" } }; }, onLoad(options) { this.form.reportId = options.reportId; this.getDrugReportById(); }, methods: { getDrugReportById() { var data = { reportId: this.form.reportId }; getDrugReportById(data).then( (res) => { if (res.code == 200) { this.report = res.data; } }, (err) => { } ); }, submit() { uni.showLoading({ title: "处理中..." }); pingReport(this.form).then( (res) => { uni.hideLoading(); if (res.code == 200) { uni.showToast({ icon: "success", title: "评价成功" }); uni.$emit("refreshDrugReportList"); setTimeout(function() { uni.navigateBack({ delta: 1 }); }, 2e3); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "ping" }, [ vue.createElementVNode("view", { class: "title" }, " 咨询评价 "), $data.report != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "doc-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: $data.report.avatar, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "doc-name-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString($data.report.doctorName), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "ping-star" }, [ vue.createElementVNode("text", { class: "label" }, "评分"), vue.createElementVNode("view", { class: "star" }, [ vue.createVNode(_component_u_rate, { size: "24", "active-color": "#fcab36", modelValue: $data.form.pingStar, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.pingStar = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "ping-content" }, [ vue.createElementVNode("view", { class: "textarea-box" }, [ vue.withDirectives(vue.createElementVNode( "textarea", { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.pingContent = $event), placeholder: "写入您对医生的评价吧", maxlength: "200" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.pingContent] ]), vue.createElementVNode( "view", { class: "num-box" }, vue.toDisplayString($data.form.pingContent.length) + "/200", 1 /* TEXT */ ) ]) ]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[2] || (_cache[2] = ($event) => $options.submit()) }, "提交评价") ]) ]); } const Pages_userDrugReportPing = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-d5c2a17c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/drugReportPing.vue"]]); const _sfc_main$o = { data() { return { statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, reportId: null, report: null }; }, onLoad(options) { this.reportId = options.reportId; }, onShow() { this.getDrugReportById(); }, methods: { goBack() { uni.navigateBack(); }, doPing() { uni.navigateTo({ url: "./drugReportPing?reportId=" + this.reportId }); }, getDrugReportById() { var data = { reportId: this.reportId }; getDrugReportById(data).then( (res) => { if (res.code == 200) { this.report = res.data; } }, (err) => { } ); } } }; function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "bg" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3305ca20c3f646c6b465918efb07f849.png" }) ]), vue.createElementVNode("view", { class: "top-box" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "top-title" }, [ vue.createElementVNode("image", { onClick: _cache[0] || (_cache[0] = ($event) => $options.goBack()), src: "/static/images/icon_back_w.png" }), vue.createElementVNode("view", { class: "title" }, "用药报告") ]) ]), $data.report != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "cont-box" }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "user" }, [ vue.createElementVNode("image", { src: $data.report.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : $data.report.avatar }, null, 8, ["src"]), vue.createElementVNode("view", { class: "user-box" }, [ vue.createElementVNode( "view", { class: "username" }, vue.toDisplayString($data.report.doctorName), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "items" }, [ vue.createElementVNode("view", { class: "result-box" }, [ vue.createElementVNode("view", { class: "name" }, "用药咨询报告"), vue.createElementVNode( "view", { class: "time" }, "报告时间 " + vue.toDisplayString($data.report.createTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item-box" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title-line" }), vue.createElementVNode("view", { class: "title" }, "咨询总结") ]), vue.createElementVNode( "view", { class: "descs" }, vue.toDisplayString($data.report.reportSummary), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "line" }) ]), vue.createElementVNode("view", { class: "item-box" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "title-line" }), vue.createElementVNode("view", { class: "title" }, "生活建议") ]), $data.report.reportAdvice != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "descs" }, vue.toDisplayString($data.report.reportAdvice), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]) ]), vue.createCommentVNode(' \r\n 医生签名\r\n \r\n \r\n \r\n 注:本次会诊,仅为针对患者当前身体情况的咨询问诊建议,不作为长期参考依据。\r\n ') ])) : vue.createCommentVNode("v-if", true) ]), $data.report.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.doPing()) }, "咨询评价") ])) : vue.createCommentVNode("v-if", true) ]); } const Pages_userDrugReportDetails = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-4dee7337"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/drugReportDetails.vue"]]); const _sfc_main$n = { data() { return { followId: null, follow: null, doctor: null, form: null }; }, onLoad(options) { this.followId = options.followId; }, onShow() { this.getFollowById(); }, methods: { doFollow() { uni.showModal({ title: "提示", content: "确认提交吗吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { var data = { followId: this.followId, formJson: JSON.stringify(this.form) }; doFollow(data).then( (res2) => { if (res2.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); setTimeout(function() { uni.$emit("refreshFollowList"); uni.navigateBack({ delta: 1 }); }, 500); } else { uni.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { } ); } } }); }, getFollowById() { var data = { followId: this.followId }; getFollowById(data).then( (res) => { if (res.code == 200) { this.follow = res.follow; this.doctor = res.doctor; this.form = JSON.parse(this.follow.formJson); this.form.forEach(function(element) { if (element.type == 3) { element.answers = ""; } }); } }, (err) => { } ); } } }; function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3); const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1); const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2); const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3); const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4); const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createVNode(_component_u_alert, { fontSize: "13", type: "info", description: "为了给您提供更好的服务,希望您能用几分钟时间,将您的感受和建议告诉我们,我们非常重视您的宝贵意见!" }), vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "doctor" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "view", { class: "name" }, "发布医生:" + vue.toDisplayString(_ctx.dortor != null ? $data.doctor.doctorName : ""), 1 /* TEXT */ ), $data.follow != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "count" }, vue.toDisplayString($data.follow.num) + "/" + vue.toDisplayString($data.follow.totalNum) + "期", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "right" }, vue.toDisplayString($data.follow.planTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.form, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [ vue.createElementVNode("view", { class: "title" }, [ vue.createTextVNode( vue.toDisplayString(item.question), 1 /* TEXT */ ), item.require ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "tip" }, "(必填)")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "option" }, [ item.type == 1 ? (vue.openBlock(), vue.createBlock(_component_u_radio_group, { key: 0, modelValue: item.answers, "onUpdate:modelValue": ($event) => item.answers = $event, placement: "column" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.options, (option, subIndex) => { return vue.openBlock(), vue.createBlock(_component_u_radio, { customStyle: { marginBottom: "8px" }, key: subIndex, label: option, name: option }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 2 /* DYNAMIC */ }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true), item.type == 2 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, { key: 1, modelValue: item.answers, "onUpdate:modelValue": ($event) => item.answers = $event, placement: "column" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.options, (option, subIndex) => { return vue.openBlock(), vue.createBlock(_component_u_checkbox, { customStyle: { marginBottom: "8px" }, key: subIndex, label: option, name: option }, null, 8, ["label", "name"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 2 /* DYNAMIC */ }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true), item.type == 3 ? (vue.openBlock(), vue.createBlock(_component_u__textarea, { key: 2, count: "", maxlength: "200", modelValue: item.answers, "onUpdate:modelValue": ($event) => item.answers = $event, placeholder: "请输入内容" }, null, 8, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "sub-btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.doFollow()) }, "提交随访") ]) ]); } const Pages_userDoFollow = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__scopeId", "data-v-22d7de8a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/doFollow.vue"]]); let request$1 = new Request$1().http; function getIntegralGoodsList(data) { return request$1("/app/integral/getIntegralGoodsList", data, "GET"); } function getIntegralGoodsById(data) { return request$1("/app/integral/getIntegralGoodsById", data, "GET"); } function getUserIntegralLogsList(data) { return request$1("/app/integral/getUserIntegralLogsList", data, "GET"); } function getIntegralOrderList(data) { return request$1("/app/integral/getIntegralOrderList", data, "GET"); } function getIntegralOrderById(data) { return request$1("/app/integral/getIntegralOrderById", data, "GET"); } function createOrder(data) { return request$1("/app/integral/createOrder", data, "POST", "application/json;charset=UTF-8"); } function getUserSign() { return request$1("/app/integral/getUserSign", null, "GET"); } function doSign(data) { return request$1("/app/integral/sign", data, "POST", "application/json;charset=UTF-8"); } const _sfc_main$m = { mixins: [MescrollMixin], data() { return { integral: 0, type: "0", typeOptions: [], tabIndex: 0, tabs: [], mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad() { this.getDictByKey("sys_integral_goods_type"); this.getUserInfo(); }, methods: { getUserInfo() { getUserInfo$1().then( (res) => { if (res.code == 200) { if (res.user != null) { this.integral = res.user.integral; } } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, getDictByKey(key) { var data = { key }; var that = this; getDictByKey(data).then( (res) => { if (res.code == 200) { this.typeOptions = res.data; this.typeOptions.forEach(function(item, index2) { var data2 = { name: item.dictLabel }; that.tabs.push(data2); }); if (this.tabs.length > 0) { this.tabIndex = 0; } } }, (err) => { } ); }, tabChange(item) { formatAppLog("log", "at pages_user/integralGoodsList.vue:135", item.index); this.type = this.typeOptions[item.index].dictValue; this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { pageNum: page2.num, pageSize: page2.size }; if (this.type != null) { data.goodsType = this.type; } getIntegralGoodsList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode("view", { class: "top-box" }, [ vue.createElementVNode("view", { class: "my-integral" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "label" }, "我的积分"), vue.createElementVNode( "view", { class: "integral" }, vue.toDisplayString($data.integral), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_user/integralLogsList")) }, "积分记录"), vue.createElementVNode("view", { class: "btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_user/integralOrderList")) }, "兑换记录") ]) ]), $data.tabs.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "tabs" }, [ vue.createVNode(_component_u_tabs, { current: $data.tabIndex, scrollable: true, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["current", "list", "onChange"]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createVNode(_component_mescroll_body, { top: "288rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "integral-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", onClick: ($event) => $options.navTo("/pages_user/integralGoodsDetails?goodsId=" + item.goodsId) }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("image", { src: item.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "bottom" }, [ vue.createElementVNode( "view", { class: "title ellipsis2" }, vue.toDisplayString(item.goodsName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode( "view", { class: "price" }, vue.toDisplayString(item.integral) + "积分", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "count" }, "原价:" + vue.toDisplayString(item.otPrice.toFixed(2)) + "元", 1 /* TEXT */ ) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]) ]); } const Pages_userIntegralGoodsList = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-a55124e7"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralGoodsList.vue"]]); const _sfc_main$l = { data() { return { imgs: [], activeImg: 1, goodsId: null, item: {} }; }, onLoad(option) { this.goodsId = option.goodsId; }, onShow() { this.getIntegralGoodsById(); }, methods: { submit() { uni.navigateTo({ url: "./integralOrderPay?goodsId=" + this.goodsId }); }, swiperChange(event) { this.activeImg = event.detail.current + 1; }, showImg() { uni.previewImage({ urls: this.imgs, current: this.imgs[0] }); }, getIntegralGoodsById() { let data = { goodsId: this.goodsId }; getIntegralGoodsById(data).then( (res) => { if (res.code == 200) { this.item = res.data; if (res.data.images != null) { this.imgs = res.data.images.split(","); } else { this.activeImg = 0; } formatAppLog("log", "at pages_user/integralGoodsDetails.vue:98", this.imgs); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode("view", { class: "goods-banner", onClick: _cache[1] || (_cache[1] = ($event) => $options.showImg()) }, [ vue.createElementVNode( "swiper", { class: "swiper", "indicator-dots": false, circular: true, autoplay: true, interval: 3e3, duration: 1e3, "indicator-color": "rgba(255, 255, 255, 0.6)", "indicator-active-color": "#ffffff", onChange: _cache[0] || (_cache[0] = (...args) => $options.swiperChange && $options.swiperChange(...args)) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.imgs, (item, index2) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { class: "swiper-item", key: index2 }, [ vue.createElementVNode("image", { src: item, mode: "aspectFit" }, null, 8, ["src"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ), vue.createCommentVNode(" 数量 "), vue.createElementVNode( "view", { class: "num-box" }, vue.toDisplayString($data.activeImg) + "/" + vue.toDisplayString($data.imgs.length), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "integral-box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.goodsName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode( "view", { class: "price" }, vue.toDisplayString($data.item.integral) + " 积分", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "count" }, "原价:" + vue.toDisplayString($data.item.otPrice.toFixed(2)) + "元", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "desc-box" }, [ vue.createElementVNode("view", { class: "desc", innerHTML: $data.item.descs }, null, 8, ["innerHTML"]) ]) ]), vue.createElementVNode("view", { class: "btn-foot" }, [ vue.createElementVNode("view", { class: "p-price-box" }, [ vue.createElementVNode("view", { class: "p-name" }, "兑换积分: "), vue.createElementVNode( "view", { class: "p-price" }, vue.toDisplayString($data.item.integral), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn buy", onClick: _cache[2] || (_cache[2] = ($event) => $options.submit()) }, " 立即兑换 ") ]) ]) ]); } const Pages_userIntegralGoodsDetails = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralGoodsDetails.vue"]]); const _sfc_main$k = { mixins: [MescrollMixin], data() { return { orderStatusOptions: [], searchKey: "", status: "0", tabs: [ { name: "全部", id: "0" }, { name: "待发货", id: "1" }, { name: "待收货", id: "2" }, { name: "已完成", id: "3" }, { name: "已取消", id: "-1" } ], mescroll: null, // 上拉加载的配置 upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, // 列表数据 dataList: [] }; }, onLoad() { this.getDictByKey("sys_integral_order_status"); }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_integral_order_status") { this.orderStatusOptions = res.data; } } }, (err) => { } ); }, tabChange(item) { this.status = item.id; this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { keyword: this.searchKey, status: this.status, pageNum: page2.num, pageSize: page2.size }; getIntegralOrderList(data).then((res) => { if (res.code == 200) { res.data.list.forEach(function(value2, index2, array3) { value2.items = []; value2.items.push(JSON.parse(value2.itemJson)); }); if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, // 查看订单详情 showDetail(item) { uni.navigateTo({ url: "./integralOrderDetails?orderId=" + item.orderId }); } } }; function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["list", "onChange"]) ]), vue.createCommentVNode(" 订单列表 "), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: _ctx.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item" }, [ vue.createCommentVNode(" 订单号,状态 "), vue.createElementVNode("view", { class: "ordersn-box", onClick: ($event) => $options.showDetail(item) }, [ vue.createElementVNode( "view", { class: "num" }, "订单号:" + vue.toDisplayString(item.orderCode), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "status-box" }, [ item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status > 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "text success" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status < 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ], 8, ["onClick"]), vue.createElementVNode("view", { class: "drug-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.items, (subItem, subIndex) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.showDetail(item), key: subIndex, class: "drug-item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: subItem.imgUrl == "" ? "/static/images/drug.svg" : subItem.imgUrl, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "drug-info" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString(subItem.goodsName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode("view", { class: "price" }, [ vue.createElementVNode("text", { class: "unit" }, "积分"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(subItem.integral), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "amount" }, "x1") ]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(" 实付金额、按钮 "), vue.createElementVNode("view", { class: "bottom-box" }, [ vue.createElementVNode("view", { class: "amount-paid" }, [ vue.createElementVNode("text", { class: "label" }, "使用积分:"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("view", { class: "unit" }, "¥"), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString(item.integral), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn cancel" }, [ vue.createTextVNode(" 联系客服 "), vue.createElementVNode("button", { class: "contact-btn", "open-type": "contact" }) ]) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_userIntegralOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-84740af3"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderList.vue"]]); const _sfc_main$j = { data() { return { orderId: null, order: null, item: null }; }, onLoad(option) { this.orderId = option.orderId; }, onShow() { this.getIntegralOrderById(); }, methods: { getIntegralOrderById() { var data = { orderId: this.orderId }; getIntegralOrderById(data).then((res) => { if (res.code == 200) { this.order = res.data; this.item = JSON.parse(this.order.itemJson); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, // 复制订单编号 copyOrderSn(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); } } }; function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "bg" }), vue.createElementVNode("view", { class: "inner" }, [ vue.createCommentVNode(" 订单状态 "), vue.createElementVNode("view", { class: "order-status" }, [ vue.createCommentVNode(" 待发货 "), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/520e24fba47441b3b0f73b5250bb0b57.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "待发货"), vue.createElementVNode("text", { class: "desc" }, "等待后台发货") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 已发货、待收货 "), $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1e6ba423ff7e4537bef87a022d530015.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "待收货"), vue.createElementVNode("text", { class: "desc" }, "运输中") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 已完成 "), $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "已完成"), vue.createElementVNode("text", { class: "desc" }, "订单已确认收货,交易完成") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode("交易取消 "), $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "交易关闭"), vue.createElementVNode("text", { class: "desc" }, "订单已取消") ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createCommentVNode(" 下单人信息 "), $data.order.userName != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "order-placer" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "location", src: "/static/images/location.png", mode: "" }), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "name-phone" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.userName), 1 /* TEXT */ ), $data.order.userPhone != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.order.userPhone), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "address ellipsis2" }, vue.toDisplayString($data.order.userAddress), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "goods-list" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: $data.item.imgUrl == "" ? "/static/images/drug.svg" : $data.item.imgUrl, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "info-box" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString($data.item.goodsName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "price-num" }, [ vue.createElementVNode("view", { class: "price" }, [ vue.createElementVNode("text", { class: "unit" }, "积分:"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($data.item.integral), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "num" }, "x1") ]) ]) ]) ]), vue.createCommentVNode(" 订单信息 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderCode), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderCode)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "使用积分"), vue.createElementVNode( "text", { class: "text" }, "¥" + vue.toDisplayString($data.order.integral), 1 /* TEXT */ ) ]), $data.order.deliveryName != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "物流公司"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.deliveryName), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), $data.order.deliverySn != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "物流单号"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.deliverySn), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]) ]) ]), vue.createCommentVNode(" 按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn cancel" }, [ vue.createTextVNode(" 联系客服 "), vue.createElementVNode("button", { class: "contact-btn", "open-type": "contact" }) ]) ]) ]); } const Pages_userIntegralOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderDetails.vue"]]); const _sfc_main$i = { mixins: [MescrollMixin], // 使用mixin data() { return { typeOptions: [], mescroll: null, downOption: { auto: false //不要自动加载 }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad() { this.getDictByKey("sys_integral_log_type"); }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { this.typeOptions = res.data; } }, (err) => { } ); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { pageNum: page2.num, pageSize: page2.size }; getUserIntegralLogsList(data).then((res) => { uni.hideLoading(); if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) { const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "page" }, [ vue.createElementVNode("view", { class: "content" }, [ vue.createVNode(_component_mescroll_body, { ref: "mescrollRef", onInit: $options.mescrollInit, up: $data.upOption, down: $data.downOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString(_ctx.$getDictLabelName($data.typeOptions, item.logType)), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(item.createTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(item.integral > 0 ? "money green" : "money red") }, vue.toDisplayString(item.integral), 3 /* TEXT, CLASS */ ), vue.createElementVNode( "text", { class: "remark" }, "剩余积分:" + vue.toDisplayString(item.balance), 1 /* TEXT */ ) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["onInit", "up", "down", "onDown", "onUp"]) ]) ]); } const Pages_userIntegralLogsList = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-b9674a7d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralLogsList.vue"]]); const _sfc_main$h = { data() { return { addressId: null, address: null, orderId: null, order: null, item: null }; }, onLoad(option) { this.goodsId = option.goodsId; var that = this; uni.$on("updateAddress", (e) => { that.addressId = e.addressId; that.address = e; that.address.address = e.province + e.city + e.district + e.detail; }); this.getIntegralGoodsById(); }, methods: { getIntegralGoodsById() { var data = { goodsId: this.goodsId }; formatAppLog("log", "at pages_user/integralOrderPay.vue:97", data); getIntegralGoodsById(data).then( (res) => { if (res.code == 200) { this.item = res.data; } }, (rej) => { } ); }, openAddress() { uni.navigateTo({ url: "/pages_user/address" }); }, payOrder() { if (this.addressId == null) { uni.showToast({ icon: "none", title: "请选择收货地址" }); return; } var data = { goodsId: this.goodsId, addressId: this.addressId }; uni.showLoading(); createOrder(data).then( (res) => { if (res.code == 200) { uni.redirectTo({ url: "./integralOrderPaySuccess?orderId=" + res.order.orderId }); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "inner-box" }, [ vue.createCommentVNode(" 收货人 "), $data.address == null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "address-box", onClick: _cache[0] || (_cache[0] = ($event) => $options.openAddress()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "name-box" }, [ vue.createElementVNode("text", { class: "text name" }, "添加收货地址") ]) ]), vue.createElementVNode("view", { class: "arrow-box" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), $data.address != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "address-box", onClick: _cache[1] || (_cache[1] = ($event) => $options.openAddress()) }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "name-box" }, [ vue.createElementVNode( "text", { class: "text name" }, vue.toDisplayString($data.address.realName), 1 /* TEXT */ ), $data.address.phone != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.address.phone), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "address" }, vue.toDisplayString($data.address.address), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "arrow-box" }, [ vue.createElementVNode("image", { src: "/static/images/arrow_gray.png", mode: "" }) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 药品列表 "), vue.createElementVNode("view", { class: "goods-list" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: $data.item.imgUrl == "" ? "/static/images/drug.svg" : $data.item.imgUrl, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "info-box" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString($data.item.goodsName), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "price-num" }, [ vue.createElementVNode("view", { class: "price" }, [ vue.createElementVNode("text", { class: "unit" }, "积分"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($data.item.integral), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "num" }, "x1") ]) ]) ]) ]), vue.createElementVNode("view", { class: "other-info" }, [ vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "所需积分:") ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.item.integral), 1 /* TEXT */ ) ]) ]) ]) ]), vue.createCommentVNode(" 底部按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn", onClick: _cache[2] || (_cache[2] = ($event) => $options.payOrder()) }, "立即兑换")) : vue.createCommentVNode("v-if", true) ]) ]); } const Pages_userIntegralOrderPay = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderPay.vue"]]); const _sfc_main$g = { data() { return { order: null }; }, onLoad(option) { uni.setNavigationBarTitle({ title: "支付结果" }); uni.$emit("refreshStoreOrder"); this.orderId = option.orderId; this.getIntegralOrderById(); }, methods: { getIntegralOrderById() { var data = { orderId: this.orderId }; var that = this; uni.showLoading(); getIntegralOrderById(data).then( (res) => { uni.hideLoading(); if (res.code == 200) { that.order = res.data; } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, copyTest(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, showOrderDetails(orderId) { formatAppLog("log", "at pages_user/integralOrderPaySuccess.vue:87", orderId); uni.redirectTo({ url: "./integralOrderDetails?orderId=" + orderId }); } } }; function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "top" }, [ vue.createElementVNode("text", { class: "title" }, "兑换成功"), vue.createElementVNode("image", { class: "icon", src: "/static/images/success.png" }), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn cancel", onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId)) }, " 查看订单") ]) ]), vue.createCommentVNode(" 订单详情查看 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderCode), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderCode)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.integral), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "兑换时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]) ]) ]) ]); } const Pages_userIntegralOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderPaySuccess.vue"]]); const _sfc_main$f = { name: "Loading", props: { loaded: Boolean, loading: Boolean } }; function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) { return $props.loading || !$props.loaded ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "Loads acea-row row-center-wrapper", style: { "margin-top": "20rpx" } }, [ $props.loading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode("view", { class: "iconfont icon-jiazai loading acea-row row-center-wrapper" }), vue.createTextVNode(" 正在加载中 ") ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), !$props.loading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createTextVNode(" 上拉加载更多 ") ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true); } const Loading = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-65e10ca8"], ["__file", "E:/Project/2023/问诊平台/his_user_app/components/Loading.vue"]]); const _sfc_main$e = { components: { Loading }, data() { return { typeOptions: [], isDaySign: false, top: 0, signNum: 0, integral: 0, sign: [], // 状态栏的高度 statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight, // tab切换 tags: [{ lable: "全部", value: 0 }, { lable: "获得", value: 1 }, { lable: "消耗", value: 2 }], // 选中的tab tabIndex: 0, current: 0, page: { type: 0, page: 1, pageSize: 10 }, list: [], loaded: false, loading: false }; }, onLoad(option) { this.getDictByKey("sys_integral_log_type"); this.getUserSign(); this.getUserIntegralLogsList(); }, onReachBottom() { !this.loading && this.getUserIntegralLogsList(); }, onPageScroll(e) { if (e.scrollTop > 30) { this.topFixed = true; } else { this.topFixed = false; } }, onPageScroll(e) { this.top = e.scrollTop; }, computed: { // 计算属性的 getter bg: function() { return "rgba(255,142,60, " + this.top / 30 + ")"; } }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { this.typeOptions = res.data; } }, (err) => { } ); }, doSign() { var data = {}; doSign(data).then( (res) => { if (res.code == 200) { uni.showToast({ icon: "success", title: res.msg }); this.list = []; this.page.page = 1; this.list = []; this.loaded = false; this.loading = false; this.getUserIntegralLogsList(); this.getUserSign(); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); }, getUserSign() { getUserSign().then( (res) => { if (res.code == 200) { this.data = res.member; this.signNum = res.signNum; this.isDaySign = res.isDaySign; this.integral = res.integral; this.sign = JSON.parse(res.sign); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, getUserIntegralLogsList() { let that = this; if (that.loaded == true || that.loading == true) return; that.loading = true; uni.showLoading({ title: "加载中..." }); getUserIntegralLogsList(that.page).then( (res) => { that.loading = false; that.loaded = res.data.list.length < that.page.pageSize; that.page.page = that.page.page + 1; that.list.push.apply(that.list, res.data.list); uni.hideLoading(); }, (err) => { uni.hideLoading(); uni.showToast({ title: err.msg, icon: "none", duration: 2e3 }); } ); }, // 返回上一页 back() { uni.navigateBack(); }, // tab选择 tabChange(item) { formatAppLog("log", "at pages_user/integral.vue:254", item); this.tabIndex = item.value; this.page.type = this.tabIndex; this.page.page = 1; this.list = []; this.loaded = false; this.loading = false; this.getUserIntegralLogsList(); } } }; function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) { const _component_Loading = vue.resolveComponent("Loading"); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-cont" }, [ vue.createCommentVNode(" 背景图片 "), vue.createElementVNode("image", { class: "bg", src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/ed4a8ff0406747a68e40988b210d1c78.png", mode: "" }), vue.createElementVNode("view", { class: "top-inner" }, [ vue.createCommentVNode(" 这里是状态栏 "), vue.createElementVNode( "view", { class: "fixed-top-box", style: vue.normalizeStyle({ background: $options.bg }) }, [ vue.createElementVNode( "view", { class: "status_bar", style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "back-box", onClick: _cache[0] || (_cache[0] = (...args) => $options.back && $options.back(...args)) }, [ vue.createElementVNode("image", { src: "/static/images/back_white.png", mode: "" }), vue.createElementVNode("text", { class: "title" }, "我的积分"), vue.createElementVNode("text") ]) ], 4 /* STYLE */ ), vue.createCommentVNode(" 顶部固定后站位元素 "), vue.createElementVNode("view", { style: { "padding-bottom": "88upx" } }, [ vue.createElementVNode( "view", { style: vue.normalizeStyle({ height: $data.statusBarHeight }) }, null, 4 /* STYLE */ ) ]), vue.createCommentVNode(" 可用积分 "), vue.createElementVNode("view", { class: "available-points" }, [ vue.createElementVNode("text", { class: "label" }, "可用积分"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($data.integral), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 签到 "), vue.createElementVNode("view", { class: "singn-content" }, [ vue.createElementVNode("view", { class: "sign-in-box" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createTextVNode("已连续签到"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($data.signNum), 1 /* TEXT */ ), vue.createTextVNode("天") ]), vue.createCommentVNode(" 签到天数 "), vue.createElementVNode("view", { class: "sign-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.sign, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { key: index2, class: vue.normalizeClass($data.signNum >= index2 + 1 ? "item active" : "item") }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "right" }, [ vue.createCommentVNode(" 已签到图标 "), $data.signNum >= index2 + 1 ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f3bdd5d388854e9a8f365904840c3b32.png", mode: "" })) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 未签到图标 "), vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/c593e551e4b246b981aaa58deb1fe725.png", mode: "" }) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(item.day), 1 /* TEXT */ ) ]) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createCommentVNode(" 签到按钮 "), vue.createElementVNode("view", { class: "sign-btn-box" }, [ $data.isDaySign == false ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.doSign()) }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/295aa046433d4feb95b467c83f8b4096.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "签到") ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/295aa046433d4feb95b467c83f8b4096.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "签到") ])) ]) ]) ]), vue.createElementVNode("view", { class: "content" }, [ vue.createCommentVNode(" 积分列表 "), vue.createElementVNode("view", { class: "points-cont" }, [ vue.createCommentVNode(" tab切换 "), vue.createElementVNode("view", { class: "pub-tab-box" }, [ vue.createElementVNode("view", { class: "tab-inner" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.tags, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass($data.tabIndex == item.value ? "item active" : "item"), onClick: ($event) => $options.tabChange(item) }, [ vue.createElementVNode("view", { class: "text" }, [ vue.createTextVNode( vue.toDisplayString(item.lable) + " ", 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode( "image", { class: "tab-bg", src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1828ea6b3b124b5f84e3556267a8d9ef.png", mode: "" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, $data.tabIndex == item.value] ]) ]) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createCommentVNode(" 列表 "), vue.createElementVNode("view", { class: "point-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "text", { class: "title" }, vue.toDisplayString(_ctx.$getDictLabelName($data.typeOptions, item.logType)), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(item.createTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ item.integral < 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "less" }, vue.toDisplayString(item.integral), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "add" }, "+" + vue.toDisplayString(item.integral), 1 /* TEXT */ )) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createVNode(_component_Loading, { loaded: $data.loaded, loading: $data.loading }, null, 8, ["loaded", "loading"]) ]) ]) ]) ]) ]); } const Pages_userIntegral = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integral.vue"]]); const _sfc_main$d = { data() { return { form: { userName: null, password: null } }; }, computed: {}, onLoad() { }, onHide() { }, onUnload() { }, mounted() { }, methods: { submit() { login(this.form).then( (res) => { if (res.code == 200) { uni.showToast({ icon: "success", title: "登录成功" }); uni.setStorageSync("companyId", res.user.companyId); uni.setStorageSync("companyUserId", res.user.userId); uni.setStorageSync("CompanyUserToken", res.companyUserToken); uni.redirectTo({ url: "/pages_company/index" }); } else { uni.showToast({ icon: "none", title: res.msg }); } }, (rej) => { } ); } } }; function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "form-box" }, [ vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "员工帐号"), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.userName = $event), placeholder: "登录帐号", "placeholder-class": "form-input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.userName] ]) ]), vue.createElementVNode("view", { class: "form-item" }, [ vue.createElementVNode("text", { class: "label" }, "员工密码"), vue.withDirectives(vue.createElementVNode( "input", { type: "password", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.password = $event), placeholder: "登录密码", "placeholder-class": "form-input" }, null, 512 /* NEED_PATCH */ ), [ [vue.vModelText, $data.form.password] ]) ]) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "sub-btn", onClick: _cache[2] || (_cache[2] = ($event) => $options.submit()) }, "员工登录") ]) ]); } const Pages_companyLogin = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/login.vue"]]); const _sfc_main$c = { data() { return { companyId: null, companyUserId: null, user: null }; }, onLoad() { }, onShow() { this.companyId = uni.getStorageSync("companyId"); this.companyUserId = uni.getStorageSync("companyUserId"); formatAppLog("log", "at pages_company/index.vue:81", this.companyUserId); this.getUserInfo(); }, onShareAppMessage(res) { return { title: "问诊", path: "/pages/TUIKit/TUIPages/TUIConversation/index", imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png" //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; }, methods: { navTo(url2) { uni.navigateTo({ url: url2 }); }, getUserInfo() { var data = {}; getUserInfo(data).then( (res) => { if (res.code == 200) { this.user = res.data; } else { uni.setStorageSync("CompanyUserToken", null); uni.showToast({ icon: "none", title: res.msg }); uni.navigateBack({ delta: -1 }); } }, (rej) => { } ); }, logout() { uni.showModal({ title: "提示", content: "确认退出登录吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { uni.setStorageSync("CompanyUserToken", null); uni.navigateBack({ delta: -1 }); } } }); }, // 跳转页面 navgetTo(url2) { this.$isLogin().then((res) => { if (res) { uni.navigateTo({ url: url2 }); } }); } } }; function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "top-cont" }, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "user-info" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "name-phone" }, [ $data.user != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "name" }, vue.toDisplayString($data.user.nickName), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.user != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "phone" }, vue.toDisplayString(_ctx.$parsePhone($data.user.phonenumber)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), $data.user != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "msg-box" }, vue.toDisplayString($data.user.deptName), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createCommentVNode(" 常用工具 "), vue.createElementVNode("view", { class: "used-tools" }, [ vue.createElementVNode("view", { class: "title" }, "常用工具"), vue.createElementVNode("view", { class: "tools-list" }, [ vue.createElementVNode("view", { class: "item", onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_company/couponList?isShare=1&couponType=5")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_my_coupon.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "私域疗法券") ]), vue.createElementVNode("view", { class: "item", onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_company/couponList?isShare=1&couponType=2")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_my_coupon.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "中药免单券") ]), vue.createElementVNode("view", { class: "item", onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_company/packageList")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_company_2.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "疗法") ]), vue.createElementVNode("view", { class: "item", onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/inquirySelectType?companyId=" + $data.companyId + "&companyUserId=" + $data.companyUserId + "&isShare=1")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_company_3.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "会诊") ]), vue.createElementVNode("view", { class: "item", onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("/pages_order/inquirySelect?inquiryType=3&companyId=" + $data.companyId + "&companyUserId=" + $data.companyUserId + "&isShare=1")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_company_3.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "按方开药") ]), vue.createElementVNode("view", { class: "item", onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_company/packageOrderList")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_company_3.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "套餐订单") ]), vue.createElementVNode("view", { class: "item", onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("/pages_company/inquiryOrderList")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_company_3.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "问诊订单") ]), vue.createElementVNode("view", { class: "item", onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("/pages_company/storeOrderList")) }, [ vue.createElementVNode("image", { src: "/static/images/icon_company_3.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "药品订单") ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("image", { src: "/static/images/icon_company_3.png", mode: "" }), vue.createElementVNode("text", { class: "text" }, "问诊分享"), vue.createElementVNode("button", { class: "share-btn", "open-type": "share" }) ]) ]) ]), vue.createCommentVNode(" 退出登录按钮 "), vue.createElementVNode("view", { class: "logout", onClick: _cache[8] || (_cache[8] = (...args) => $options.logout && $options.logout(...args)) }, "退出登录") ]) ]); } const Pages_companyIndex = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/index.vue"]]); const _sfc_main$b = { mixins: [MescrollMixin], data() { return { cates: [], privateType: 0, keyword: "", mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onShow() { this.getPackagCateList(2); }, methods: { getPackagCateList(type2) { var data = { type: type2 }; getPackagCateList(data).then( (res) => { if (res.code == 200) { this.cates = res.data; } }, (err) => { } ); }, showMore(item) { item.displayMore = item.displayMore == 1 ? 0 : 1; item.displayText = item.displayMore == 1 ? "收起" : "点击查看方案明细"; }, navTo(url2) { uni.navigateTo({ url: url2 }); }, doSearch() { this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { isShow: 0, keyword: this.keyword, privateType: this.privateType, pageNum: page2.num, pageSize: page2.size }; getPackageList(data).then((res) => { if (res.code == 200) { res.data.list.forEach(function(element) { element.displayMore = 0; element.displayText = "点击查看方案明细"; if (element.productJson != null) { element.products = JSON.parse(element.productJson); } else { element.products = []; } }); if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, choseType(item) { this.privateType = item.cateCode; this.mescroll.resetUpScroll(); } } }; function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-content" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event), placeholder: "输入健康疗法名称或别名搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $data.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "cate-list" }, [ vue.createCommentVNode(" 关键字列表 "), vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [ vue.createElementVNode("view", { class: "inner" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.cates, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass($data.privateType == item.cateCode ? "item active" : "item"), onClick: ($event) => $options.choseType(item) }, vue.toDisplayString(item.cateName), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ]), vue.createVNode(_component_mescroll_body, { top: "192rpx", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "package-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item" }, [ vue.createElementVNode("view", { class: "top-box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.packageName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "subtitle" }, "别名:" + vue.toDisplayString(item.secondName), 1 /* TEXT */ ) ]), vue.createCommentVNode(" 药品列表 "), vue.createElementVNode("view", { class: "drug-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.products, (subItem, subIndex) => { return vue.openBlock(), vue.createElementBlock( "view", { key: subIndex, class: vue.normalizeClass(["drug-item", item.displayMore == 0 ? "hide" : "show"]) }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: subItem.image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "drug-info" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString(subItem.productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec" }, vue.toDisplayString(subItem.sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "num-box" }, [ subItem.price != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "price" }, [ vue.createElementVNode("text", { class: "unit" }, "¥"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(subItem.price.toFixed(2)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "amount" }, "x" + vue.toDisplayString(subItem.count), 1 /* TEXT */ ) ]) ]) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "display-more", onClick: ($event) => $options.showMore(item) }, vue.toDisplayString(item.displayText), 9, ["onClick"]), vue.createCommentVNode(" 实付金额、按钮 "), vue.createElementVNode("view", { class: "bottom-box" }, [ vue.createElementVNode("view", { class: "amount-paid" }, [ vue.createElementVNode("text", { class: "label" }, "套餐价格:"), item.totalPrice != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "price-box" }, [ vue.createElementVNode("view", { class: "unit" }, "¥"), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString(item.totalPrice.toFixed(2)), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn pay", onClick: vue.withModifiers(($event) => $options.navTo("/pages_company/packageDetails?packageId=" + item.packageId), ["stop"]) }, " 查看详情 ", 8, ["onClick"]) ]) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createCommentVNode(` {{item.packageName}} ¥{{item.price.toFixed(2)}}元/日 {{item.sales}}人已购 `) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_companyPackageList = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageList.vue"]]); const _sfc_main$a = { data() { return { displayText: "查看更多", displayMore: 0, imgs: [], activeImg: 1, doctorShow: false, doctors: [], products: [], packageId: null, item: {}, describe: null, doctorId: null, doctorPageNum: 1, doctorLastPage: false, doctorTotal: 0 }; }, onLoad(option) { this.packageId = option.packageId; this.companyId = uni.getStorageSync("companyId"); this.companyUserId = uni.getStorageSync("companyUserId"); }, onShow() { this.getPackageById(); this.getPackageDoctorList(); }, onShareAppMessage(res) { return { title: this.item.packageName, path: "/pages_index/packageDetails?packageId=" + this.packageId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId, imageUrl: this.item.imgUrl //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4 }; }, methods: { showMore() { this.displayMore = this.displayMore == 1 ? 0 : 1; this.displayText = this.displayMore == 1 ? "收起" : "查看更多"; formatAppLog("log", "at pages_company/packageDetails.vue:194", this.displayText); }, swiperChange(event) { this.activeImg = event.detail.current + 1; }, handleDoctorClick(item) { this.doctorShow = false; this.doctorId = item.doctorId; uni.navigateTo({ url: "/pages_index/packageForm?packageId=" + this.packageId + "&doctorId=" + this.doctorId }); }, lower(event) { if (this.doctorTotal > this.doctors.length) { this.doctorPageNum++; this.getPackageDoctorList(); } }, doctorOpen() { this.doctorShow = true; }, doctorClose() { this.doctorShow = false; }, showImg() { uni.previewImage({ urls: this.imgs, current: this.imgs[0] }); }, getPackageDoctorList() { if (this.doctorLastPage) { return; } var data = { packageId: this.packageId, pageNum: this.doctorPageNum, pageSize: 10 }; var that = this; getPackageDoctorList(data).then( (res) => { if (res.code == 200) { if (this.doctorPageNum == 0) { that.doctors = res.data.list; } else { that.doctors = that.doctors.concat(res.data.list); } this.doctorLastPage = res.data.isLastPage; this.doctorTotal = res.data.total; formatAppLog("log", "at pages_company/packageDetails.vue:250", that.doctors); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, getPackageById() { let data = { packageId: this.packageId }; getPackageById(data).then( (res) => { if (res.code == 200) { this.item = res.data; if (res.data.images != null) { this.imgs = res.data.images.split(","); } else { this.activeImg = 0; } this.describe = JSON.parse(this.item.describeJson); if (this.item.productJson != null) { this.products = JSON.parse(this.item.productJson); } formatAppLog("log", "at pages_company/packageDetails.vue:278", this.imgs); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); } } }; function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n \r\n '), vue.createElementVNode("view", { class: "cont-box" }, [ vue.createElementVNode("view", { class: "goods-banner", onClick: _cache[1] || (_cache[1] = ($event) => $options.showImg()) }, [ vue.createElementVNode( "swiper", { class: "swiper", "indicator-dots": false, circular: true, autoplay: true, interval: 3e3, duration: 1e3, "indicator-color": "rgba(255, 255, 255, 0.6)", "indicator-active-color": "#ffffff", onChange: _cache[0] || (_cache[0] = (...args) => $options.swiperChange && $options.swiperChange(...args)) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.imgs, (item, index2) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { class: "swiper-item", key: index2 }, [ vue.createElementVNode("image", { src: item, mode: "aspectFit" }, null, 8, ["src"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ), vue.createCommentVNode(" 数量 "), vue.createElementVNode( "view", { class: "num-box" }, vue.toDisplayString($data.activeImg) + "/" + vue.toDisplayString($data.imgs.length), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "package-box" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.item.packageName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "desc" }, [ $data.item.cycle > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "cycle" }, "用药周期" + vue.toDisplayString($data.item.cycle) + "天", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.item.duration > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "duration" }, "签约时长" + vue.toDisplayString($data.item.duration) + "天", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode("view", { class: "price-box" }, [ $data.item != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "price" }, "¥" + vue.toDisplayString($data.item.price.toFixed(2)) + "元/日", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.item != null && $data.item.packageSubType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "price" }, "咨询包")) : vue.createCommentVNode("v-if", true), $data.item != null && $data.item.packageSubType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "price" }, "治疗包")) : vue.createCommentVNode("v-if", true), $data.item != null && $data.item.packageSubType == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "price" }, "产品包")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "count" }, vue.toDisplayString($data.item.sales) + "人已购", 1 /* TEXT */ ) ]) ]), $data.products.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "drug-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "产品列表") ]), vue.createElementVNode("view", { class: "drug-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.products, (product, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [ ($data.displayMore == 0 ? index2 < 2 : true) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "drug" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: product.image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "drug-info" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString(product.productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec" }, vue.toDisplayString(product.sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode( "view", { class: "use" }, vue.toDisplayString(product.usageMethod), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "price" }, [ vue.createCommentVNode(' ¥\r\n {{product.price.toFixed(2)}} ') ]), vue.createCommentVNode(' x{{product.count}} ') ]) ]) ])) : vue.createCommentVNode("v-if", true) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ]), $data.products.length > 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "display-more", onClick: _cache[2] || (_cache[2] = ($event) => $options.showMore()) }, vue.toDisplayString($data.displayText), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), $data.describe.use != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "功能") ]), $data.describe != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "desc", innerHTML: $data.describe.use }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), $data.item.indication != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "主治") ]), $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "desc", innerHTML: $data.item.indication }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), $data.describe.usageMethod != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "服用/使用方式") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.describe.usageMethod }, null, 8, ["innerHTML"]) ])) : vue.createCommentVNode("v-if", true), $data.describe.forPeople != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "适宜人群") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.describe.forPeople }, null, 8, ["innerHTML"]) ])) : vue.createCommentVNode("v-if", true), $data.describe.tabooPeople != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "禁忌人群") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.describe.tabooPeople }, null, 8, ["innerHTML"]) ])) : vue.createCommentVNode("v-if", true), $data.item.explain != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 6, class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "方解/搭配优势") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.item.explain }, null, 8, ["innerHTML"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "desc-box" }, [ vue.createElementVNode("view", { class: "title-box" }, [ vue.createElementVNode("view", { class: "line" }), vue.createElementVNode("view", { class: "title" }, "套餐描述") ]), vue.createElementVNode("view", { class: "desc", innerHTML: $data.item.desc }, null, 8, ["innerHTML"]) ]) ]), vue.createElementVNode("view", { class: "btn-foot" }, [ vue.createElementVNode("view", { class: "p-price-box" }, [ vue.createElementVNode("view", { class: "p-name" }, "¥"), $data.item != null ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "p-price" }, vue.toDisplayString($data.item.totalPrice.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn buy" }, [ vue.createTextVNode(" 分享 "), vue.createElementVNode("button", { class: "contact-btn", "data-name": "shareBtn", "open-type": "share" }, "分享") ]) ]) ]) ]); } const Pages_companyPackageDetails = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageDetails.vue"]]); const _sfc_main$9 = { mixins: [MescrollMixin], data() { return { orderStatusOptions: [], searchKey: "", status: "0", tabs: [ { name: "全部", id: "0" }, { name: "待支付", id: "1" }, { name: "服务中", id: "2" }, { name: "已完成", id: "3" }, { name: "已取消", id: "-1" }, { name: "已退款", id: "-2" } ], mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad(options) { var that = this; uni.$on("refreshPackageOrder", () => { that.mescroll.resetUpScroll(); }); this.getDictByKey("sys_package_order_status"); }, onShow() { }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_package_order_status") { this.orderStatusOptions = res.data; } } }, (err) => { } ); }, showDetails(item) { uni.navigateTo({ url: "/pages_company/packageOrderDetails?orderId=" + item.orderId }); }, tabChange(item) { this.status = item.id; formatAppLog("log", "at pages_company/packageOrderList.vue:141", item); this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { status: this.status, pageNum: page2.num, pageSize: page2.size }; getCompanyUserPackageOrderList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: true, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["list", "onChange"]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: $data.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "order-item", onClick: vue.withModifiers(($event) => $options.showDetails(item), ["stop"]) }, [ vue.createElementVNode("view", { class: "top-box" }, [ vue.createElementVNode( "view", { class: "num" }, "订单号:" + vue.toDisplayString(item.orderSn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "status-box" }, [ item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status > 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "text success" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status < 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "package-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: item.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.packageName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "desc" }, [ vue.createElementVNode( "view", { class: "cycle" }, "用药周期" + vue.toDisplayString(item.cycle) + "天", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "duration" }, "签约时长" + vue.toDisplayString(item.duration) + "天", 1 /* TEXT */ ) ]), vue.createCommentVNode(' \n ¥30元/日\n 6.2w人已购\n ') ]) ]), vue.createElementVNode("view", { class: "bottom-box" }, [ vue.createElementVNode("view", { class: "amount-paid" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额:"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("view", { class: "unit" }, "¥"), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString(item.payPrice.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createCommentVNode(' 取消订单 '), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn pay" }, "查看订单")) : vue.createCommentVNode("v-if", true) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_companyPackageOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-c4b00143"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageOrderList.vue"]]); const _sfc_main$8 = { data() { return { orderId: null, order: {}, package: null, items: [] }; }, onLoad(option) { this.orderId = option.orderId; this.getPackageOrderById(); }, onShow() { }, methods: { getPackageOrderById() { var data = { orderId: this.orderId }; getCompanyUserPackageOrderById(data).then((res) => { if (res.code == 200) { this.order = res.order; this.package = JSON.parse(this.order.packageJson); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, pay() { uni.navigateTo({ url: "/pages_order/packageOrderPay?orderId=" + this.order.orderId }); }, // 返回上一页 back() { let pages2 = getCurrentPages(); formatAppLog("log", "at pages_company/packageOrderDetails.vue:180", pages2.length); if (pages2.length > 1) { uni.navigateBack(); } else { uni.reLaunch({ url: "/pages/common/launch" }); } }, // 复制订单编号 copyOrderSn(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); } } }; function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "bg" }), vue.createElementVNode("view", { class: "inner" }, [ vue.createCommentVNode(" 订单状态 "), vue.createElementVNode("view", { class: "order-status" }, [ vue.createCommentVNode(" 待付款 "), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "待付款"), vue.createCommentVNode(' 请在{{payLimitTime}}前完成支付 ') ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 服务中 "), $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/b71efb4b5ca54564b553569d578738b4.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "服务中"), vue.createElementVNode("text", { class: "desc" }, "正在服务中") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 已完成 "), $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "已完成"), vue.createElementVNode("text", { class: "desc" }, "服务已完成") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode("交易取消 "), $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "交易关闭"), vue.createElementVNode("text", { class: "desc" }, "订单已取消") ]) ])) : vue.createCommentVNode("v-if", true), $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "退款成功"), vue.createElementVNode("text", { class: "desc" }, "已成功退款") ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "package-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("image", { src: $data.package.imgUrl }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString($data.package.packageName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "desc" }, [ vue.createElementVNode( "view", { class: "cycle" }, "用药周期" + vue.toDisplayString($data.package.cycle) + "天", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "duration" }, "签约时长" + vue.toDisplayString($data.package.duration) + "天", 1 /* TEXT */ ) ]), vue.createCommentVNode(' \r\n ¥30元/日\r\n 6.2w人已购\r\n ') ]) ]), vue.createCommentVNode(" 订单信息 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderSn)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付方式"), $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "微信支付")) : vue.createCommentVNode("v-if", true), $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "物流代收")) : vue.createCommentVNode("v-if", true), $data.order.payType == 3 ? (vue.openBlock(), vue.createElementBlock("text", { key: 2, class: "text" }, "货到付款")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额"), $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额"), $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "抵扣金额"), $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "代收金额"), $data.order.payRemain != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payRemain.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "运费金额"), $data.order.payDelivery != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payDelivery.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.payTime), 1 /* TEXT */ ) ]) ]) ]) ]) ]), vue.createCommentVNode(" 按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createCommentVNode(' 取消订单 '), vue.createCommentVNode(' 支付 ') ]) ]); } const Pages_companyPackageOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageOrderDetails.vue"]]); let request = new Request$1().http; function getCouponList(data) { return request("/app/coupon/getCouponList", data, "GET"); } function getCouponById(data) { return request("/app/coupon/getCouponById", data, "GET"); } function genCode(data) { return request("/app/coupon/genCode", data, "GET"); } function receive(data) { return request("/app/coupon/receive", data, "POST", "application/json;charset=UTF-8"); } const _sfc_main$7 = { name: "UserCoupon", props: {}, mixins: [MescrollMixin], // 使用mixin data: function() { return { keyword: "", cateOptions: [], cateId: null, couponType: null, mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [], isShare: null }; }, watch: {}, onLoad(options) { this.couponType = options.couponType; this.isShare = options.isShare; }, onShow() { if (this.couponType == 5) { this.getDictByKey("sys_package_private_type"); } else if (this.couponType == 6) { this.getDictByKey("sys_package_disease_type"); } }, methods: { choseCate(item) { this.cateId = item.dictValue; this.mescroll.resetUpScroll(); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { this.cateOptions = res.data; } }, (err) => { } ); }, doSearch() { this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { keyword: this.keyword, couponType: this.couponType, pageNum: page2.num, pageSize: page2.size }; if (this.cateId != null) { data.cateId = this.cateId; } getCouponList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ _ctx.couponType == 5 || _ctx.couponType == 6 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "top-content" }, [ vue.createCommentVNode(" 搜索框 "), vue.createElementVNode("view", { class: "search-cont" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "icon-search", src: "/static/images/icon_search.png", mode: "" }), vue.withDirectives(vue.createElementVNode( "input", { type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.keyword = $event), placeholder: "输入名称搜索", "confirm-type": "search", onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)), "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, _ctx.keyword] ]) ]) ]), vue.createElementVNode("view", { class: "cate-list" }, [ vue.createCommentVNode(" 关键字列表 "), vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [ vue.createElementVNode("view", { class: "inner" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.cateOptions, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass(_ctx.cateId == item.dictValue ? "item active" : "item"), onClick: ($event) => $options.choseCate(item) }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_mescroll_body, { top: _ctx.couponType == 5 || _ctx.couponType == 6 ? "192rpx" : "0rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: _ctx.downOption, up: _ctx.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "tui-coupon-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "tui-coupon-item tui-top20", key: index2 }, [ vue.createElementVNode("image", { src: "/static/images/bg_coupon_3x.png", class: "tui-coupon-bg", mode: "widthFix" }), vue.createElementVNode("view", { class: "tui-coupon-item-left" }, [ vue.createElementVNode("view", { class: "tui-coupon-price-box" }, [ vue.createElementVNode("view", { class: "tui-coupon-price-sign" }, "¥"), vue.createElementVNode( "view", { class: vue.normalizeClass(["tui-coupon-price", { "tui-price-small": false }]) }, vue.toDisplayString(item.price.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "tui-coupon-intro" }, "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "tui-coupon-item-right" }, [ vue.createElementVNode("view", { class: "tui-coupon-content" }, [ vue.createElementVNode("view", { class: "tui-coupon-title-box" }, [ vue.createElementVNode( "view", { class: "tui-coupon-title" }, vue.toDisplayString(item.title), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "tui-coupon-rule" }, [ vue.createElementVNode("view", { class: "tui-rule-box tui-padding-btm" }, [ vue.createElementVNode("view", { class: "tui-coupon-circle" }), vue.createElementVNode("view", { class: "tui-coupon-text" }, "不可叠加使用") ]), vue.createElementVNode("view", { class: "tui-rule-box" }, [ vue.createElementVNode("view", { class: "tui-coupon-circle" }), vue.createElementVNode( "view", { class: "tui-coupon-text" }, vue.toDisplayString(item.limitTime) + " 到期", 1 /* TEXT */ ) ]) ]) ]) ]), vue.createElementVNode("view", { class: "tui-btn-box" }, [ vue.createElementVNode("view", { class: "btn receive", onClick: ($event) => $options.navTo("/pages_company/couponDetails?isShare=" + _ctx.isShare + "&couponId=" + item.couponId) }, "查看", 8, ["onClick"]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["top", "onInit", "down", "up", "onDown", "onUp"]) ]); } const Pages_companyCouponList = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-343ae408"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/couponList.vue"]]); const _sfc_main$6 = { name: "getCoupon", props: {}, data: function() { return { couponId: null, item: null, isShare: null, code: null }; }, onLoad(options) { this.couponId = options.couponId; this.code = options.code; if (!this.$isEmpty(options.isShare)) { this.isShare = options.isShare; this.genCode(); } else { uni.hideShareMenu(); } formatAppLog("log", "at pages_company/couponDetails.vue:63", options.couponId); this.companyId = uni.getStorageSync("companyId"); this.companyUserId = uni.getStorageSync("companyUserId"); this.getCouponById(); }, //发送给朋友 onShareAppMessage(res) { uni.showShareMenu({ withShareTicket: true }); wx.updateShareMenu({ isPrivateMessage: true, withShareTicket: true, success(res2) { formatAppLog("log", "at pages_company/couponDetails.vue:78", "updateShareMenu: ", res2); }, fail() { } }); return { title: this.item.title, path: "/pages_company/couponDetails?couponId=" + this.item.couponId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId + "&code=" + this.code }; }, mounted: function() { }, onShow() { }, methods: { genCode: function() { let that = this; var data = { couponId: this.couponId }; genCode(data).then(function(res) { that.code = res.data; }).catch(function(err) { }); }, getCouponById: function() { let that = this; var data = { couponId: this.couponId }; getCouponById(data).then(function(res) { that.item = res.data; }).catch(function(err) { uni.showToast({ title: err.msg, icon: "none", duration: 2e3 }); }); }, receive: function() { var data = { couponId: this.item.couponId, companyId: this.companyId, companyUserId: this.companyUserId, code: this.code }; receive(data).then(function(res) { if (res.code == 200) { uni.showToast({ title: "领取成功", icon: "success", duration: 2e3 }); } else { uni.showToast({ title: res.msg, duration: 2e3 }); } }).catch(function(err) { uni.showToast({ title: err.msg, icon: "none", duration: 2e3 }); }); } } }; function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [ _ctx.item != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "tui-coupon-list" }, [ vue.createElementVNode("view", { class: "tui-coupon-item tui-top20" }, [ vue.createElementVNode("image", { src: "/static/images/bg_coupon_3x.png", class: "tui-coupon-bg", mode: "widthFix" }), vue.createElementVNode("view", { class: "tui-coupon-item-left" }, [ vue.createElementVNode("view", { class: "tui-coupon-price-box" }, [ vue.createElementVNode("view", { class: "tui-coupon-price-sign" }, "¥"), vue.createElementVNode( "view", { class: vue.normalizeClass(["tui-coupon-price", { "tui-price-small": false }]) }, vue.toDisplayString(_ctx.item.price.toFixed(2)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "tui-coupon-intro" }, "满" + vue.toDisplayString(_ctx.item.minPrice.toFixed(2)) + "元可用", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "tui-coupon-item-right" }, [ vue.createElementVNode("view", { class: "tui-coupon-content" }, [ vue.createElementVNode("view", { class: "tui-coupon-title-box" }, [ vue.createElementVNode( "view", { class: "tui-coupon-title" }, vue.toDisplayString(_ctx.item.title), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "tui-coupon-rule" }, [ vue.createElementVNode("view", { class: "tui-rule-box tui-padding-btm" }, [ vue.createElementVNode("view", { class: "tui-coupon-circle" }), vue.createElementVNode("view", { class: "tui-coupon-text" }, "不可叠加使用") ]), vue.createElementVNode("view", { class: "tui-rule-box" }, [ vue.createElementVNode("view", { class: "tui-coupon-circle" }), vue.createElementVNode( "view", { class: "tui-coupon-text" }, vue.toDisplayString(_ctx.item.limitTime) + " 到期", 1 /* TEXT */ ) ]) ]) ]) ]), vue.createElementVNode("view", { class: "tui-btn-box" }, [ _ctx.item.remainNumber > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn receive", onClick: _cache[0] || (_cache[0] = ($event) => $options.receive()) }, "立即领取")) : _ctx.item.remainNumber == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "btn cancel" }, "已领完")) : vue.createCommentVNode("v-if", true) ]) ]) ])) : vue.createCommentVNode("v-if", true) ]); } const Pages_companyCouponDetails = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-66a98d6c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/couponDetails.vue"]]); const _sfc_main$5 = { mixins: [MescrollMixin], // 使用mixin data() { return { orderStatusOptions: [], orderTypeOptions: [], inquiryTypeOptions: [], tabs: [ { id: 2, name: "快速问诊" }, { id: 1, name: "专家问诊" }, { id: 3, name: "开药问诊" } ], inquiryType: 2, mescroll: null, downOption: { //下拉刷新 use: true, auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback) }, upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, dataList: [] }; }, onLoad() { this.getDictByKey("sys_inquiry_order_type"); this.getDictByKey("sys_inquiry_type"); this.getDictByKey("sys_inquiry_status"); var that = this; uni.$on("refreshInquiryOrder", () => { that.mescroll.resetUpScroll(); }); }, onShow() { }, methods: { cancel(item) { uni.showModal({ title: "提示", content: "确认取消订单吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { var data = { orderId: item.orderId }; cancel(data).then( (res2) => { if (res2.code == 200) { this.mescroll.resetUpScroll(); uni.showToast({ icon: "success", title: "操作成功" }); } else { uni.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { } ); } } }); }, ping(item) { uni.navigateTo({ url: "/pages_order/pingOrder?orderId=" + item.orderId }); }, pay(item) { uni.navigateTo({ url: "/pages_order/inquiryPay?orderId=" + item.orderId }); }, toIM(item) { var id = "C2CD-" + item.doctorId; formatAppLog("log", "at pages_company/inquiryOrderList.vue:190", uni.$TUIKit.TUIConversationServer); store.commit("timStore/setConversationID", id); uni.$TUIKit.TUIConversationServer.setMessageRead(id); uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => { var _a; store.commit("timStore/setImType", res.customData); const { conversation } = res.data; store.commit("timStore/setImType", 1); store.commit("timStore/setConversation", conversation); let url2 = "/pages/TUIKit/TUIPages/TUIChat/index"; conversation.userProfile; url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}&orderId=` + item.orderId; uni.redirectTo({ url: url2 }); }).catch((err) => { formatAppLog("warn", "at pages_company/inquiryOrderList.vue:217", "获取 group profile 异常 = ", err); }); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_inquiry_order_type") { this.orderTypeOptions = res.data; } if (key == "sys_inquiry_type") { this.inquiryTypeOptions = res.data; } if (key == "sys_inquiry_status") { this.orderStatusOptions = res.data; } } }, (err) => { } ); }, inquiryTypeChange(item) { this.inquiryType = item.id; formatAppLog("log", "at pages_company/inquiryOrderList.vue:243", item); this.mescroll.resetUpScroll(); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback() { this.mescroll.resetUpScroll(); }, /*上拉加载的回调*/ upCallback(page2) { var that = this; var data = { inquiryType: this.inquiryType, pageNum: page2.num, pageSize: page2.size }; getCompanyUserInquiryOrderList(data).then((res) => { if (res.code == 200) { if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); } } }; function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.inquiryTypeChange }, null, 8, ["list", "onChange"]) ]), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, down: $data.downOption, up: $data.upOption, onDown: $options.downCallback, onUp: $options.upCallback }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "order-item", onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId) }, [ vue.createElementVNode("view", { class: "order-top" }, [ item.doctorId != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "left" }, [ vue.createElementVNode("image", { class: "head", mode: "aspectFill", src: item.avatar }, null, 8, ["src"]), vue.createElementVNode( "view", { class: "name" }, vue.toDisplayString(item.doctorName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "dept" }, vue.toDisplayString(item.deptName), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), item.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "left" }, [ item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "title" }, " 支付后为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "title" }, " 正在为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true), item.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "title" }, " 订单已取消 ")) : vue.createCommentVNode("v-if", true), item.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "title" }, " 订单已退款 ")) : vue.createCommentVNode("v-if", true), item.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "title" }, " 医生已拒单 ")) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "status red" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "status red" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4, class: "status green" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 5, class: "status green" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status < 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 6, class: "status gray" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "order-cont" }, [ vue.createElementVNode("view", { class: "order-type" }, [ vue.createTextVNode(" 订单类型: "), vue.createElementVNode( "text", null, vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, item.inquiryType)), 1 /* TEXT */ ), vue.createElementVNode( "text", null, "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, item.orderType)), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "order-desc" }, "病情描述:" + vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "order-time-box" }, [ vue.createElementVNode( "view", { class: "order-time" }, vue.toDisplayString(item.createTime), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "btn", onClick: vue.withModifiers(($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId), ["stop"]) }, "查看", 8, ["onClick"]) ]) ]) ]) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "down", "up", "onDown", "onUp"]) ]); } const Pages_companyInquiryOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-c9704ce4"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/inquiryOrderList.vue"]]); const _sfc_main$4 = { data() { return { report: null, patient: null, hospital: null, department: null, doctor: null, order: null, orderId: null, orderStatusOptions: [], orderTypeOptions: [], inquiryTypeOptions: [], reportImages: [], tongueImages: [], faceImages: [], forms: [] }; }, onLoad(options) { this.orderId = options.orderId; this.getDictByKey("sys_inquiry_order_type"); this.getDictByKey("sys_inquiry_type"); this.getDictByKey("sys_inquiry_status"); }, onShow() { this.getCompanyUserInquiryOrderById(); }, methods: { cancel() { var that = this; uni.showModal({ title: "提示", content: "确认取消订单吗?", showCancel: true, cancelText: "取消", confirmText: "确定", success: (res) => { if (res.confirm) { var data = { orderId: this.orderId }; cancel(data).then( (res2) => { if (res2.code == 200) { that.getMyInquiryOrderById(); uni.showToast({ icon: "success", title: "操作成功" }); } else { uni.showToast({ icon: "none", title: res2.msg }); } }, (rej) => { } ); } } }); }, ping() { uni.navigateTo({ url: "/pages_order/pingOrder?orderId=" + this.orderId + "&doctorId=" + this.order.doctorId }); }, pay() { uni.navigateTo({ url: "/pages_order/inquiryPay?orderId=" + this.orderId }); }, toIM() { var that = this; var id = "C2CD-" + this.doctor.doctorId; formatAppLog("log", "at pages_company/inquiryOrderDetails.vue:371", uni.$TUIKit.TUIConversationServer); store.commit("timStore/setConversationID", id); uni.$TUIKit.TUIConversationServer.setMessageRead(id); uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => { var _a; uni.$TUIKit.TUIConversationServer.setConversationValue(id, that.orderId).then((res2) => { formatAppLog("log", "at pages_company/inquiryOrderDetails.vue:379", "更新order"); }).catch((err) => { }); formatAppLog("log", "at pages_company/inquiryOrderDetails.vue:384", res); const { conversation } = res.data; store.commit("timStore/setImType", 1); store.commit("timStore/setConversation", conversation); let url2 = "/pages/TUIKit/TUIPages/TUIChat/index"; conversation.userProfile; url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`; uni.redirectTo({ url: url2 }); }).catch((err) => { formatAppLog("warn", "at pages_company/inquiryOrderDetails.vue:398", "获取 group profile 异常 = ", err); }); }, navTo(url2) { uni.navigateTo({ url: url2 }); }, copyOrderSn() { uni.setClipboardData({ data: this.order.orderSn, success: function() { uni.showToast({ title: "复制成功", icon: "none" }); } }); }, getCompanyUserInquiryOrderById() { var that = this; var data = { orderId: this.orderId }; getCompanyUserInquiryOrderById(data).then( (res) => { if (res.code == 200) { this.order = res.data.order; this.report = res.data.report; this.patient = JSON.parse(res.data.order.patientJson); if (this.report != null && this.report.formJson != null) { this.forms = JSON.parse(this.report.formJson); } if (that.patient.reportImages != null) { that.reportImages = that.patient.reportImages.split(","); } if (that.patient.tongueImages != null) { that.tongueImages = that.patient.tongueImages.split(","); } if (that.patient.faceImages != null) { that.faceImages = that.patient.faceImages.split(","); } this.doctor = res.data.doctor; this.department = res.data.department; this.hospital = res.data.hospital; } }, (err) => { } ); }, getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_inquiry_order_type") { this.orderTypeOptions = res.data; } if (key == "sys_inquiry_type") { this.inquiryTypeOptions = res.data; } if (key == "sys_inquiry_status") { this.orderStatusOptions = res.data; } } }, (err) => { } ); }, navTo(url2) { uni.navigateTo({ url: url2 }); } } }; function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6); const _component_u_album = resolveEasycom(vue.resolveDynamicComponent("u-album"), __easycom_1$2); const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "cont" }, [ $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "付款详情"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "订单类型:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, $data.order.inquiryType)), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "text" }, "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, $data.order.orderType)), 1 /* TEXT */ ) ]), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "status red" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "status red" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "status green" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "status green" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $data.order.status < 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4, class: "status gray" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true), $data.doctor != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "doc-box" }, [ vue.createElementVNode("view", { class: "title" }, "医生详情"), vue.createElementVNode("view", { class: "doc-name-box" }, [ vue.createElementVNode( "view", { class: "doc-name" }, vue.toDisplayString($data.doctor.doctorName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "doc-star" }, [ vue.createVNode(_component_u_rate, { activeColor: "#ffc603", count: "5", readonly: "", modelValue: $data.doctor.pingStar, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.doctor.pingStar = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode( "view", { class: "doc-dept-box" }, vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "doc-his-box" }, vue.toDisplayString($data.hospital.hospitalName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "doc-spec-box" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("view", { class: "title" }, "擅长:"), vue.createElementVNode( "view", { class: "spec" }, vue.toDisplayString($data.doctor.speciality), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "right" }, [ vue.createElementVNode("view", { class: "btn", onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages/doctor/doctorDetails?doctorId=" + $data.doctor.doctorId)) }, "详情") ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null && $data.order.inquiryType == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "咨询内容"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患者信息:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "病情描述:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.title), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患病时间:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.duration), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "就诊情况:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.isVisit), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null && $data.order.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "咨询内容"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患者信息:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "身高(CM):"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.height), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "体重(KG):"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.weight), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "联系电话:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.mobile), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "学习进度:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.study), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "期望会诊方式:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.usage), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "病情描述:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.title), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "正在服用药品:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.drugs), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "本次患病时间:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.duration), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "是否就诊过:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.isVisit), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "舌苔照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "面部照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"]) ]) ])) : vue.createCommentVNode("v-if", true), $data.patient != null && $data.order.inquiryType == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "咨询内容"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "患者信息:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁", 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "病情描述:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.title), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "正在服用药品:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.drugs), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "本次患病时间:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.duration), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "是否就诊过:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.patient.isVisit), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "舌苔照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "面部照片:") ]) ]), vue.createElementVNode("view", null, [ vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"]) ]) ])) : vue.createCommentVNode("v-if", true), $data.report != null && $data.order.status >= 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "体检信息"), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.forms, (item) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode( "text", { class: "label" }, vue.toDisplayString(item.title) + ":", 1 /* TEXT */ ), vue.createElementVNode("text", { class: "text" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.option, (tag) => { return vue.openBlock(), vue.createBlock(_component_u_tag, { size: "mini", plain: "", type: "success", style: { "margin-right": "5rpx", "margin-bottom": "5rpx" }, text: tag }, null, 8, ["text"]); }), 256 /* UNKEYED_FRAGMENT */ )) ]) ]) ]); }), 256 /* UNKEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true), $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 6, class: "other-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "订单号码:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderSn), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item-btn", onClick: _cache[2] || (_cache[2] = (...args) => $options.copyOrderSn && $options.copyOrderSn(...args)) }, "复制") ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.money.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "优惠金额:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.discountMoney.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "left" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额:"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true) ]), $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn-box" }, [ $data.report != null && $data.order.status >= 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn", onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/inquiryOrderReport?orderId=" + $data.order.orderId)) }, "查看报告")) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]); } const Pages_companyInquiryOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-2626eb2a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/inquiryOrderDetails.vue"]]); const _sfc_main$3 = { mixins: [MescrollMixin], data() { return { orderStatusOptions: [], searchKey: "", status: "0", tabs: [ { name: "全部", id: "0" }, { name: "待付款", id: "1" }, { name: "待发货", id: "2" }, { name: "待收货", id: "3" }, { name: "已完成", id: "4" } ], mescroll: null, // 上拉加载的配置 upOption: { onScroll: false, use: true, // 是否启用上拉加载; 默认true page: { pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 size: 10 // 每页数据的数量,默认10 }, noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示 textNoMore: "已经到底了", empty: { icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png", tip: "暂无数据" } }, // 列表数据 dataList: [] }; }, onLoad(option) { var that = this; uni.$on("refreshStoreOrder", () => { that.mescroll.resetUpScroll(); }); this.getDictByKey("sys_order_status"); }, methods: { getDictByKey(key) { var data = { key }; getDictByKey(data).then( (res) => { if (res.code == 200) { if (key == "sys_order_status") { this.orderStatusOptions = res.data; } } }, (err) => { } ); }, goSearch(e) { this.searchKey = e.detail.value; this.mescroll.resetUpScroll(); }, refund(item) { uni.navigateTo({ url: "/pages_order/storeOrderRefundApply?orderId=" + item.orderId }); }, tabChange(item) { this.status = item.id; this.mescroll.resetUpScroll(); }, mescrollInit(mescroll) { this.mescroll = mescroll; }, /*下拉刷新的回调 */ downCallback(mescroll) { mescroll.resetUpScroll(); }, upCallback(page2) { var that = this; var data = { keyword: this.searchKey, status: this.status, pageNum: page2.num, pageSize: page2.size }; getCompanyUserStoreOrderList(data).then((res) => { if (res.code == 200) { res.data.list.forEach(function(value2, index2, array3) { value2.items = JSON.parse(value2.itemJson); }); if (page2.num == 1) { that.dataList = res.data.list; } else { that.dataList = that.dataList.concat(res.data.list); } that.mescroll.endBySize(res.data.list.length, res.data.total); } else { uni.showToast({ icon: "none", title: "请求失败" }); that.dataList = null; that.mescroll.endErr(); } }); }, // 查看订单详情 showDetail(item) { uni.navigateTo({ url: "./storeOrderDetail?orderId=" + item.orderId }); }, finish(item) { var that = this; uni.showModal({ title: "提示", content: "确定已收货吗", success: function(res) { if (res.confirm) { var data = { orderId: item.orderId }; finishOrder(data).then((res2) => { if (res2.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); that.mescroll.resetUpScroll(); } else { uni.showToast({ icon: "none", title: res2.msg }); } }); } else if (res.cancel) ; } }); }, cancel(item) { var that = this; uni.showModal({ title: "提示", content: "确定取消订单吗", success: function(res) { if (res.confirm) { var data = { orderId: item.orderId }; cancelOrder(data).then((res2) => { if (res2.code == 200) { uni.showToast({ icon: "success", title: "操作成功" }); that.mescroll.resetUpScroll(); } else { uni.showToast({ icon: "none", title: res2.msg }); } }); } else if (res.cancel) ; } }); }, pay(item) { uni.navigateTo({ url: "/pages_order/storeOrderPay?orderId=" + item.orderId }); }, // 查看物流 showDelivery(item) { uni.navigateTo({ url: "./storeOrderDelivery?orderId=" + item.orderId }); } } }; function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7); const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-fixed" }, [ vue.createVNode(_component_u_tabs, { scrollable: false, list: $data.tabs, lineColor: "#C39A58", onChange: $options.tabChange }, null, 8, ["list", "onChange"]) ]), vue.createCommentVNode(" 订单列表 "), vue.createVNode(_component_mescroll_body, { top: "88rpx", bottom: "0", ref: "mescrollRef", onInit: $options.mescrollInit, onDown: $options.downCallback, onUp: $options.upCallback, down: _ctx.downOption, up: $data.upOption }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "order-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.dataList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { onClick: ($event) => $options.showDetail(item), key: index2, class: "item" }, [ vue.createCommentVNode(" 订单号,状态 "), vue.createElementVNode("view", { class: "ordersn-box" }, [ vue.createElementVNode( "view", { class: "num" }, "订单号:" + vue.toDisplayString(item.orderCode), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "status-box" }, [ item.status == 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status > 1 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "text success" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), item.status < 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "text info" }, vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createCommentVNode(" 药品列表 "), vue.createElementVNode("view", { class: "drug-list" }, [ item.isPackage != 1 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(item.items, (subItem, subIndex) => { return vue.openBlock(), vue.createElementBlock("view", { key: subIndex, class: "drug-item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: JSON.parse(subItem.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(subItem.jsonInfo).image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "drug-info" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString(JSON.parse(subItem.jsonInfo).productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec ellipsis2" }, vue.toDisplayString(JSON.parse(subItem.jsonInfo).sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode("view", { class: "price" }, [ vue.createCommentVNode(' ¥ '), vue.createCommentVNode(' {{JSON.parse(subItem.jsonInfo).price.toFixed(2)}} ') ]), item.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "amount" }, "x" + vue.toDisplayString(JSON.parse(subItem.jsonInfo).num), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 实付金额、按钮 "), vue.createElementVNode("view", { class: "bottom-box" }, [ vue.createElementVNode("view", { class: "amount-paid" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额:"), vue.createElementVNode("view", { class: "price-box" }, [ vue.createElementVNode("view", { class: "unit" }, "¥"), vue.createElementVNode( "view", { class: "num" }, vue.toDisplayString(item.payPrice.toFixed(2)), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "btn-box" }, [ vue.createElementVNode("view", { class: "btn", onClick: ($event) => $options.showDetail(item) }, "查看订单", 8, ["onClick"]) ]) ]) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), _: 1 /* STABLE */ }, 8, ["onInit", "onDown", "onUp", "down", "up"]) ]); } const Pages_companyStoreOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/storeOrderList.vue"]]); const _sfc_main$2 = { data() { return { payLimitTime: null, orderId: null, order: {}, items: [] }; }, onLoad(option) { this.orderId = option.orderId; }, onShow() { this.getCompanyUserStoreOrderById(); }, methods: { showPrescribe() { var data = { prescribeId: this.order.prescribeId }; getPrescribeById(data).then( (res) => { if (res.code == 200) { if (res.data.prescribe.prescribeImgUrl != null) { var data2 = []; data2.push(res.data.prescribe.prescribeImgUrl); uni.previewImage({ current: 0, urls: data2 }); } else { uni.showToast({ icon: "none", title: "电子处方单不存在" }); } } }, (err) => { } ); }, getCompanyUserStoreOrderById() { var data = { orderId: this.orderId }; getCompanyUserStoreOrderById(data).then((res) => { if (res.code == 200) { this.order = res.order; this.items = res.items; this.payLimitTime = res.payLimitTime; this.prescribe = res.prescribe; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, showDelivery() { uni.navigateTo({ url: "./storeOrderDelivery?orderId=" + this.orderId }); }, cancel() { var that = this; uni.showModal({ title: "提示", content: "确定取消订单吗", success: function(res) { if (res.confirm) { var data = { orderId: that.order.orderId }; cancelOrder(data).then((res2) => { if (res2.code == 200) { that.getMyStoreOrderById(); uni.$emit("refreshStoreOrder"); } else { uni.showToast({ icon: "none", title: res2.msg }); } }); } else if (res.cancel) ; } }); }, finish() { var that = this; uni.showModal({ title: "提示", content: "确定已收货吗", success: function(res) { if (res.confirm) { var data = { orderId: that.orderId }; finishOrder(data).then((res2) => { if (res2.code == 200) { that.getMyStoreOrderById(); uni.$emit("refreshStoreOrder"); } else { uni.showToast({ icon: "none", title: res2.msg }); } }); } else if (res.cancel) ; } }); }, pay() { uni.navigateTo({ url: "/pages_order/storeOrderPay?orderId=" + this.order.orderId }); }, payRemain() { uni.navigateTo({ url: "/pages_user/user/paymentOrderRemain?orderId=" + this.order.orderId }); }, // 复制订单编号 copyOrderSn(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, // 退货 refund() { uni.navigateTo({ url: "/pages_order/storeOrderRefundApply?orderId=" + this.orderId }); } } }; function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createElementVNode("view", { class: "bg" }), vue.createElementVNode("view", { class: "inner" }, [ vue.createCommentVNode(" 订单状态 "), vue.createElementVNode("view", { class: "order-status" }, [ vue.createCommentVNode(" 待付款 "), $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "待付款"), vue.createElementVNode( "text", { class: "desc" }, "请在" + vue.toDisplayString($data.payLimitTime) + "前完成支付", 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 待发货 "), $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/520e24fba47441b3b0f73b5250bb0b57.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "待发货"), vue.createElementVNode("text", { class: "desc" }, "等待后台发货") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 已发货、待收货 "), $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1e6ba423ff7e4537bef87a022d530015.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "待收货"), vue.createElementVNode("text", { class: "desc" }, "运输中") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 已完成 "), $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "已完成"), vue.createElementVNode("text", { class: "desc" }, "订单已确认收货,交易完成") ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode("交易取消 "), $data.order.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "交易关闭"), vue.createElementVNode("text", { class: "desc" }, "订单已取消") ]) ])) : vue.createCommentVNode("v-if", true), $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "申请售后"), vue.createElementVNode("text", { class: "desc" }, "请等待客服审核") ]) ])) : vue.createCommentVNode("v-if", true), $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 6, class: "inner" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png", mode: "" }) ]), vue.createElementVNode("view", { class: "status-box" }, [ vue.createElementVNode("text", { class: "status" }, "退款成功"), vue.createElementVNode("text", { class: "desc" }, "已成功退款") ]) ])) : vue.createCommentVNode("v-if", true) ]), vue.createCommentVNode(" 下单人信息 "), $data.order.userName != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "order-placer" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("image", { class: "location", src: "/static/images/location.png", mode: "" }), vue.createElementVNode("view", { class: "info" }, [ vue.createElementVNode("view", { class: "name-phone" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.userName), 1 /* TEXT */ ), $data.order.userPhone != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.order.userPhone), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode( "view", { class: "address ellipsis2" }, vue.toDisplayString($data.order.userAddress), 1 /* TEXT */ ) ]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "content" }, [ vue.createCommentVNode(" 药品列表 "), vue.createElementVNode("view", { class: "goods-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.items, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "item" }, [ vue.createElementVNode("view", { class: "img-box" }, [ vue.createElementVNode("image", { src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image, mode: "aspectFill" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "info-box" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode( "view", { class: "name-box ellipsis2" }, vue.toDisplayString(JSON.parse(item.jsonInfo).productName), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "spec ellipsis2" }, vue.toDisplayString(JSON.parse(item.jsonInfo).sku), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "price-num" }, [ vue.createElementVNode("view", { class: "price" }, [ vue.createCommentVNode(' ¥ '), vue.createCommentVNode(' {{JSON.parse(item.jsonInfo).price.toFixed(2)}} ') ]), $data.order.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "num" }, "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(" 已优惠、小计 "), vue.createElementVNode("view", { class: "sub-total" }, [ vue.createElementVNode( "view", { class: "discount" }, " 订单金额:¥" + vue.toDisplayString($data.order.payPrice), 1 /* TEXT */ ), vue.createCommentVNode(' 实付金额:\r\n \r\n ¥\r\n {{order.payMoney}}\r\n ') ]) ]), vue.createCommentVNode(" 订单信息 "), vue.createElementVNode("view", { class: "order-info" }, [ vue.createElementVNode("view", { class: "title" }, "订单信息"), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单编号"), vue.createElementVNode("view", { class: "sn-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.orderCode), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy-btn", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderCode)) }, "复制") ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "下单时间"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.order.createTime), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付方式"), $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, "微信支付")) : vue.createCommentVNode("v-if", true), $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "text" }, "物流代收")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "订单金额"), $data.order.totalPrice != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.totalPrice.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "优惠金额"), $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "应付金额"), $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付金额"), $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("text", { class: "label" }, "支付时间"), $data.order.payTime != null ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "text" }, vue.toDisplayString($data.order.payTime), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createCommentVNode(' \r\n 发货时间\r\n \r\n ') ]) ]) ]) ]), vue.createCommentVNode(" 按钮 "), vue.createElementVNode("view", { class: "btn-box" }, [ $data.order.deliverySn != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn pay", onClick: _cache[1] || (_cache[1] = ($event) => $options.showDelivery()) }, "查看物流")) : vue.createCommentVNode("v-if", true) ]) ]); } const Pages_companyStoreOrderDetail = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/storeOrderDetail.vue"]]); const _sfc_main$1 = { data() { return { orderId: null, deliverySn: null, express: {}, expressList: [] }; }, onLoad(option) { this.orderId = option.orderId; this.getExpress(); }, methods: { getExpress() { var data = { orderId: this.orderId }; getExpress(data).then((res) => { if (res.code == 200) { this.express = res.express; this.expressList = res.data; this.deliverySn = res.deliverySn; } else { uni.showToast({ icon: "none", title: "请求失败" }); } }); }, // 返回上一页 back() { uni.navigateBack(); }, // 复制运单号 copyOrderSn(text) { uni.setClipboardData({ data: text, success: () => { uni.showToast({ title: "内容已成功复制到剪切板", icon: "none" }); } }); }, // 拨打电话 callPhone(phone) { uni.makePhoneCall({ phoneNumber: phone }); } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "top-cont" }, [ vue.createCommentVNode(" 背景图片 "), vue.createElementVNode("view", { class: "bg" }), vue.createElementVNode("view", { class: "top-inner" }, [ vue.createCommentVNode(" 运单号 "), vue.createElementVNode("view", { class: "waybill-number" }, [ vue.createElementVNode("view", { class: "inner" }, [ vue.createElementVNode("view", { class: "num-box" }, [ vue.createElementVNode("text", { class: "text" }, "运单号"), vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.deliverySn), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "copy", onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.deliverySn)) }, "复制") ]), vue.createElementVNode("view", { class: "kf-box" }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString($data.express.name), 1 /* TEXT */ ), vue.createCommentVNode(' 客服电话:95311 ') ]) ]) ]), $data.expressList != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "content" }, [ vue.createCommentVNode(" 物流信息 "), $data.expressList.Traces != null ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "refund-steps" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.expressList.Traces, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "steps" }, [ vue.createElementVNode("view", { class: "title" }, [ vue.createCommentVNode(' 已签收 '), vue.createCommentVNode(' 运输中 '), vue.createCommentVNode(" 左侧灰色圆点 "), vue.createElementVNode("view", { class: "dot" }), vue.createCommentVNode(" 对号 "), vue.createElementVNode("image", { class: "img", src: "/static/images/complete.png", mode: "" }), vue.createCommentVNode(" 运输中图标 "), vue.createElementVNode("image", { class: "img", src: "/static/images/car40.png", mode: "" }) ]), vue.createElementVNode( "view", { class: "desc-text" }, vue.toDisplayString(item.AcceptStation), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "time" }, vue.toDisplayString(item.AcceptTime), 1 /* TEXT */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]) ]) ]); } const Pages_companyStoreOrderDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/storeOrderDelivery.vue"]]); __definePage("pages/common/launch", PagesCommonLaunch); __definePage("pages/auth/login", PagesAuthLogin); __definePage("pages/index/index", PagesIndexIndex); __definePage("pages/index/h5", PagesIndexH5); __definePage("pages/index/content", PagesIndexContent); __definePage("pages/doctor/index", PagesDoctorIndex); __definePage("pages/store/index", PagesStoreIndex); __definePage("pages/user/index", PagesUserIndex); __definePage("pages/TUIKit/TUIPages/TUIConversation/index", PagesTUIKitTUIPagesTUIConversationIndex); __definePage("pages/TUIKit/TUIPages/TUIConversation/create", PagesTUIKitTUIPagesTUIConversationCreate); __definePage("pages/TUIKit/TUIPages/TUIChat/index", PagesTUIKitTUIPagesTUIChatIndex); __definePage("pages/TUIKit/TUIPages/TUIChat/components/message-elements/video-play", PagesTUIKitTUIPagesTUIChatComponentsMessageElementsVideoPlay); __definePage("pages_index/testList", Pages_indexTestList); __definePage("pages_index/testDetails", Pages_indexTestDetails); __definePage("pages_index/test", Pages_indexTest); __definePage("pages_index/testResult", Pages_indexTestResult); __definePage("pages_index/testResultImg", Pages_indexTestResultImg); __definePage("pages_index/articleList", Pages_indexArticleList); __definePage("pages_index/articleDetails", Pages_indexArticleDetails); __definePage("pages_index/diseaseList", Pages_indexDiseaseList); __definePage("pages_index/diseaseDetails", Pages_indexDiseaseDetails); __definePage("pages_index/hospitalList", Pages_indexHospitalList); __definePage("pages_index/hospitalDetails", Pages_indexHospitalDetails); __definePage("pages_index/search", Pages_indexSearch); __definePage("pages_index/famousPrescribeList", Pages_indexFamousPrescribeList); __definePage("pages_index/famousPrescribeDetails", Pages_indexFamousPrescribeDetails); __definePage("pages_index/vesselList", Pages_indexVesselList); __definePage("pages_index/vesselDetails", Pages_indexVesselDetails); __definePage("pages_index/chineseMedicineList", Pages_indexChineseMedicineList); __definePage("pages_index/chineseMedicineDetails", Pages_indexChineseMedicineDetails); __definePage("pages_index/medicatedFoodList", Pages_indexMedicatedFoodList); __definePage("pages_index/medicatedFoodDetails", Pages_indexMedicatedFoodDetails); __definePage("pages_index/questionsList", Pages_indexQuestionsList); __definePage("pages_index/questionsDetails", Pages_indexQuestionsDetails); __definePage("pages_index/packageList", Pages_indexPackageList); __definePage("pages_index/packageDetails", Pages_indexPackageDetails); __definePage("pages_index/packageForm", Pages_indexPackageForm); __definePage("pages_doctor/doctorArticleList", Pages_doctorDoctorArticleList); __definePage("pages_doctor/doctorArticleDetails", Pages_doctorDoctorArticleDetails); __definePage("pages_doctor/doctorList", Pages_doctorDoctorList); __definePage("pages_doctor/doctorDetails", Pages_doctorDoctorDetails); __definePage("pages_doctor/doctorPingList", Pages_doctorDoctorPingList); __definePage("pages_doctor/doctorInfo", Pages_doctorDoctorInfo); __definePage("pages_doctor/doctorImgs", Pages_doctorDoctorImgs); __definePage("pages_order/inquiryOrderList", Pages_orderInquiryOrderList); __definePage("pages_order/inquiryOrderDetails", Pages_orderInquiryOrderDetails); __definePage("pages_order/inquiryOrderPingList", Pages_orderInquiryOrderPingList); __definePage("pages_order/inquirySelect", Pages_orderInquirySelect); __definePage("pages_order/inquirySelectType", Pages_orderInquirySelectType); __definePage("pages_order/inquiryForm1", Pages_orderInquiryForm1); __definePage("pages_order/inquiryForm2_1", Pages_orderInquiryForm2_1); __definePage("pages_order/inquiryForm2_2", Pages_orderInquiryForm2_2); __definePage("pages_order/inquiryForm3", Pages_orderInquiryForm3); __definePage("pages_order/inquiryPay", Pages_orderInquiryPay); __definePage("pages_order/inquiryPayment", Pages_orderInquiryPayment); __definePage("pages_order/tzPay", Pages_orderTzPay); __definePage("pages_order/tzWeixinPay", Pages_orderTzWeixinPay); __definePage("pages_order/inquiryOrderPaySuccess", Pages_orderInquiryOrderPaySuccess); __definePage("pages_order/storeOrderPaySuccess", Pages_orderStoreOrderPaySuccess); __definePage("pages_order/pingOrder", Pages_orderPingOrder); __definePage("pages_order/prescribeList", Pages_orderPrescribeList); __definePage("pages_order/prescribeDetails", Pages_orderPrescribeDetails); __definePage("pages_order/storeOrderList", Pages_orderStoreOrderList); __definePage("pages_order/storeOrderDetail", Pages_orderStoreOrderDetail); __definePage("pages_order/storeOrderPay", Pages_orderStoreOrderPay); __definePage("pages_order/storeOrderPayment", Pages_orderStoreOrderPayment); __definePage("pages_order/inquiryOrderReport", Pages_orderInquiryOrderReport); __definePage("pages_order/packageOrderDetails", Pages_orderPackageOrderDetails); __definePage("pages_order/packageOrderList", Pages_orderPackageOrderList); __definePage("pages_order/packageOrderPay", Pages_orderPackageOrderPay); __definePage("pages_order/packageOrderPaySuccess", Pages_orderPackageOrderPaySuccess); __definePage("pages_order/storeOrderDelivery", Pages_orderStoreOrderDelivery); __definePage("pages_order/storeOrderRefundApply", Pages_orderStoreOrderRefundApply); __definePage("pages_order/storeOrderRefundSubmit", Pages_orderStoreOrderRefundSubmit); __definePage("pages_order/storeOrderRefundList", Pages_orderStoreOrderRefundList); __definePage("pages_order/storeOrderRefundDetails", Pages_orderStoreOrderRefundDetails); __definePage("pages_order/storeOrderRefundAddDelivery", Pages_orderStoreOrderRefundAddDelivery); __definePage("pages_order/packageOtherPayment", Pages_orderPackageOtherPayment); __definePage("pages_order/packagePayment", Pages_orderPackagePayment); __definePage("pages_user/registerDoctor", Pages_userRegisterDoctor); __definePage("pages_user/about", Pages_userAbout); __definePage("pages_user/address", Pages_userAddress); __definePage("pages_user/addEditAddress", Pages_userAddEditAddress); __definePage("pages_user/personInfo", Pages_userPersonInfo); __definePage("pages_user/agreement", Pages_userAgreement); __definePage("pages_user/myDoctorList", Pages_userMyDoctorList); __definePage("pages_user/patient", Pages_userPatient); __definePage("pages_user/addEditPatient", Pages_userAddEditPatient); __definePage("pages_user/myCouponList", Pages_userMyCouponList); __definePage("pages_user/cert", Pages_userCert); __definePage("pages_user/followList", Pages_userFollowList); __definePage("pages_user/followDetails", Pages_userFollowDetails); __definePage("pages_user/drugReportList", Pages_userDrugReportList); __definePage("pages_user/drugReportPing", Pages_userDrugReportPing); __definePage("pages_user/drugReportDetails", Pages_userDrugReportDetails); __definePage("pages_user/doFollow", Pages_userDoFollow); __definePage("pages_user/integralGoodsList", Pages_userIntegralGoodsList); __definePage("pages_user/integralGoodsDetails", Pages_userIntegralGoodsDetails); __definePage("pages_user/integralOrderList", Pages_userIntegralOrderList); __definePage("pages_user/integralOrderDetails", Pages_userIntegralOrderDetails); __definePage("pages_user/integralLogsList", Pages_userIntegralLogsList); __definePage("pages_user/integralOrderPay", Pages_userIntegralOrderPay); __definePage("pages_user/integralOrderPaySuccess", Pages_userIntegralOrderPaySuccess); __definePage("pages_user/integral", Pages_userIntegral); __definePage("pages_company/login", Pages_companyLogin); __definePage("pages_company/index", Pages_companyIndex); __definePage("pages_company/packageList", Pages_companyPackageList); __definePage("pages_company/packageDetails", Pages_companyPackageDetails); __definePage("pages_company/packageOrderList", Pages_companyPackageOrderList); __definePage("pages_company/packageOrderDetails", Pages_companyPackageOrderDetails); __definePage("pages_company/couponList", Pages_companyCouponList); __definePage("pages_company/couponDetails", Pages_companyCouponDetails); __definePage("pages_company/inquiryOrderList", Pages_companyInquiryOrderList); __definePage("pages_company/inquiryOrderDetails", Pages_companyInquiryOrderDetails); __definePage("pages_company/storeOrderList", Pages_companyStoreOrderList); __definePage("pages_company/storeOrderDetail", Pages_companyStoreOrderDetail); __definePage("pages_company/storeOrderDelivery", Pages_companyStoreOrderDelivery); var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } var timWx = { exports: {} }; (function(module, exports) { !function(e, t) { module.exports = t(); }(commonjsGlobal, function() { function e(e2, t2) { var n2 = Object.keys(e2); if (Object.getOwnPropertySymbols) { var o2 = Object.getOwnPropertySymbols(e2); t2 && (o2 = o2.filter(function(t3) { return Object.getOwnPropertyDescriptor(e2, t3).enumerable; })), n2.push.apply(n2, o2); } return n2; } function t(t2) { for (var n2 = 1; n2 < arguments.length; n2++) { var o2 = null != arguments[n2] ? arguments[n2] : {}; n2 % 2 ? e(Object(o2), true).forEach(function(e2) { i(t2, e2, o2[e2]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(o2)) : e(Object(o2)).forEach(function(e2) { Object.defineProperty(t2, e2, Object.getOwnPropertyDescriptor(o2, e2)); }); } return t2; } function n(e2) { return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) { return typeof e3; } : function(e3) { return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3; })(e2); } function o(e2, t2) { if (!(e2 instanceof t2)) throw new TypeError("Cannot call a class as a function"); } function s(e2, t2) { for (var n2 = 0; n2 < t2.length; n2++) { var o2 = t2[n2]; o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e2, o2.key, o2); } } function a(e2, t2, n2) { return t2 && s(e2.prototype, t2), n2 && s(e2, n2), Object.defineProperty(e2, "prototype", { writable: false }), e2; } function i(e2, t2, n2) { return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2; } function r(e2, t2) { if ("function" != typeof t2 && null !== t2) throw new TypeError("Super expression must either be null or a function"); e2.prototype = Object.create(t2 && t2.prototype, { constructor: { value: e2, writable: true, configurable: true } }), Object.defineProperty(e2, "prototype", { writable: false }), t2 && c(e2, t2); } function u(e2) { return (u = Object.setPrototypeOf ? Object.getPrototypeOf : function(e3) { return e3.__proto__ || Object.getPrototypeOf(e3); })(e2); } function c(e2, t2) { return (c = Object.setPrototypeOf || function(e3, t3) { return e3.__proto__ = t3, e3; })(e2, t2); } function l() { if ("undefined" == typeof Reflect || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if ("function" == typeof Proxy) return true; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), true; } catch (e2) { return false; } } function d(e2, t2, n2) { return (d = l() ? Reflect.construct : function(e3, t3, n3) { var o2 = [null]; o2.push.apply(o2, t3); var s2 = new (Function.bind.apply(e3, o2))(); return n3 && c(s2, n3.prototype), s2; }).apply(null, arguments); } function p(e2) { var t2 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; return (p = function(e3) { if (null === e3 || (n2 = e3, -1 === Function.toString.call(n2).indexOf("[native code]"))) return e3; var n2; if ("function" != typeof e3) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== t2) { if (t2.has(e3)) return t2.get(e3); t2.set(e3, o2); } function o2() { return d(e3, arguments, u(this).constructor); } return o2.prototype = Object.create(e3.prototype, { constructor: { value: o2, enumerable: false, writable: true, configurable: true } }), c(o2, e3); })(e2); } function g(e2, t2) { if (null == e2) return {}; var n2, o2, s2 = function(e3, t3) { if (null == e3) return {}; var n3, o3, s3 = {}, a3 = Object.keys(e3); for (o3 = 0; o3 < a3.length; o3++) n3 = a3[o3], t3.indexOf(n3) >= 0 || (s3[n3] = e3[n3]); return s3; }(e2, t2); if (Object.getOwnPropertySymbols) { var a2 = Object.getOwnPropertySymbols(e2); for (o2 = 0; o2 < a2.length; o2++) n2 = a2[o2], t2.indexOf(n2) >= 0 || Object.prototype.propertyIsEnumerable.call(e2, n2) && (s2[n2] = e2[n2]); } return s2; } function h(e2) { if (void 0 === e2) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e2; } function _(e2, t2) { if (t2 && ("object" == typeof t2 || "function" == typeof t2)) return t2; if (void 0 !== t2) throw new TypeError("Derived constructors may only return object or undefined"); return h(e2); } function f(e2) { var t2 = l(); return function() { var n2, o2 = u(e2); if (t2) { var s2 = u(this).constructor; n2 = Reflect.construct(o2, arguments, s2); } else n2 = o2.apply(this, arguments); return _(this, n2); }; } function v(e2, t2) { return M(e2) || function(e3, t3) { var n2 = null == e3 ? null : "undefined" != typeof Symbol && e3[Symbol.iterator] || e3["@@iterator"]; if (null == n2) return; var o2, s2, a2 = [], i2 = true, r2 = false; try { for (n2 = n2.call(e3); !(i2 = (o2 = n2.next()).done) && (a2.push(o2.value), !t3 || a2.length !== t3); i2 = true) ; } catch (u2) { r2 = true, s2 = u2; } finally { try { i2 || null == n2.return || n2.return(); } finally { if (r2) throw s2; } } return a2; }(e2, t2) || I(e2, t2) || T(); } function m(e2) { return function(e3) { if (Array.isArray(e3)) return C(e3); }(e2) || y(e2) || I(e2) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }(); } function M(e2) { if (Array.isArray(e2)) return e2; } function y(e2) { if ("undefined" != typeof Symbol && null != e2[Symbol.iterator] || null != e2["@@iterator"]) return Array.from(e2); } function I(e2, t2) { if (e2) { if ("string" == typeof e2) return C(e2, t2); var n2 = Object.prototype.toString.call(e2).slice(8, -1); return "Object" === n2 && e2.constructor && (n2 = e2.constructor.name), "Map" === n2 || "Set" === n2 ? Array.from(e2) : "Arguments" === n2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? C(e2, t2) : void 0; } } function C(e2, t2) { (null == t2 || t2 > e2.length) && (t2 = e2.length); for (var n2 = 0, o2 = new Array(t2); n2 < t2; n2++) o2[n2] = e2[n2]; return o2; } function T() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function D(e2, t2) { var n2 = "undefined" != typeof Symbol && e2[Symbol.iterator] || e2["@@iterator"]; if (!n2) { if (Array.isArray(e2) || (n2 = I(e2)) || t2 && e2 && "number" == typeof e2.length) { n2 && (e2 = n2); var o2 = 0, s2 = function() { }; return { s: s2, n: function() { return o2 >= e2.length ? { done: true } : { done: false, value: e2[o2++] }; }, e: function(e3) { throw e3; }, f: s2 }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var a2, i2 = true, r2 = false; return { s: function() { n2 = n2.call(e2); }, n: function() { var e3 = n2.next(); return i2 = e3.done, e3; }, e: function(e3) { r2 = true, a2 = e3; }, f: function() { try { i2 || null == n2.return || n2.return(); } finally { if (r2) throw a2; } } }; } var k = { SDK_READY: "sdkStateReady", SDK_NOT_READY: "sdkStateNotReady", SDK_DESTROY: "sdkDestroy", MESSAGE_RECEIVED: "onMessageReceived", MESSAGE_MODIFIED: "onMessageModified", MESSAGE_REVOKED: "onMessageRevoked", MESSAGE_READ_BY_PEER: "onMessageReadByPeer", MESSAGE_READ_RECEIPT_RECEIVED: "onMessageReadReceiptReceived", MESSAGE_EXTENSIONS_UPDATED: "onMessageExtensionsUpdated", MESSAGE_EXTENSIONS_DELETED: "onMessageExtensionsDeleted", CONVERSATION_LIST_UPDATED: "onConversationListUpdated", TOTAL_UNREAD_MESSAGE_COUNT_UPDATED: "onTotalUnreadMessageCountUpdated", CONVERSATION_GROUP_LIST_UPDATED: "onConversationGroupListUpdated", CONVERSATION_IN_GROUP_UPDATED: "onConversationInGroupUpdated", GROUP_LIST_UPDATED: "onGroupListUpdated", GROUP_SYSTEM_NOTICE_RECEIVED: "receiveGroupSystemNotice", GROUP_ATTRIBUTES_UPDATED: "groupAttributesUpdated", GROUP_COUNTER_UPDATED: "onGroupCounterUpdated", TOPIC_CREATED: "onTopicCreated", TOPIC_DELETED: "onTopicDeleted", TOPIC_UPDATED: "onTopicUpdated", PROFILE_UPDATED: "onProfileUpdated", USER_STATUS_UPDATED: "onUserStatusUpdated", BLACKLIST_UPDATED: "blacklistUpdated", FRIEND_LIST_UPDATED: "onFriendListUpdated", FRIEND_GROUP_LIST_UPDATED: "onFriendGroupListUpdated", FRIEND_APPLICATION_LIST_UPDATED: "onFriendApplicationListUpdated", KICKED_OUT: "kickedOut", ERROR: "error", NET_STATE_CHANGE: "netStateChange", SDK_RELOAD: "sdkReload" }, E = { MSG_TEXT: "TIMTextElem", MSG_IMAGE: "TIMImageElem", MSG_SOUND: "TIMSoundElem", MSG_AUDIO: "TIMSoundElem", MSG_FILE: "TIMFileElem", MSG_FACE: "TIMFaceElem", MSG_VIDEO: "TIMVideoFileElem", MSG_GEO: "TIMLocationElem", MSG_LOCATION: "TIMLocationElem", MSG_GRP_TIP: "TIMGroupTipElem", MSG_GRP_SYS_NOTICE: "TIMGroupSystemNoticeElem", MSG_CUSTOM: "TIMCustomElem", MSG_MERGER: "TIMRelayElem", MSG_PRIORITY_HIGH: "High", MSG_PRIORITY_NORMAL: "Normal", MSG_PRIORITY_LOW: "Low", MSG_PRIORITY_LOWEST: "Lowest", CONV_C2C: "C2C", CONV_GROUP: "GROUP", CONV_TOPIC: "TOPIC", CONV_SYSTEM: "@TIM#SYSTEM", CONV_AT_ME: 1, CONV_AT_ALL: 2, CONV_AT_ALL_AT_ME: 3, CONV_MARK_TYPE_STAR: 1, CONV_MARK_TYPE_UNREAD: 2, CONV_MARK_TYPE_FOLD: 4, CONV_MARK_TYPE_HIDE: 8, GRP_PRIVATE: "Private", GRP_WORK: "Private", GRP_PUBLIC: "Public", GRP_CHATROOM: "ChatRoom", GRP_MEETING: "ChatRoom", GRP_AVCHATROOM: "AVChatRoom", GRP_COMMUNITY: "Community", GRP_MBR_ROLE_OWNER: "Owner", GRP_MBR_ROLE_ADMIN: "Admin", GRP_MBR_ROLE_MEMBER: "Member", GRP_MBR_ROLE_CUSTOM: "Custom", GRP_TIP_MBR_JOIN: 1, GRP_TIP_MBR_QUIT: 2, GRP_TIP_MBR_KICKED_OUT: 3, GRP_TIP_MBR_SET_ADMIN: 4, GRP_TIP_MBR_CANCELED_ADMIN: 5, GRP_TIP_GRP_PROFILE_UPDATED: 6, GRP_TIP_MBR_PROFILE_UPDATED: 7, GRP_TIP_BAN_AVCHATROOM_MEMBER: 10, GRP_TIP_UNBAN_AVCHATROOM_MEMBER: 11, MSG_REMIND_ACPT_AND_NOTE: "AcceptAndNotify", MSG_REMIND_ACPT_NOT_NOTE: "AcceptNotNotify", MSG_REMIND_DISCARD: "Discard", GENDER_UNKNOWN: "Gender_Type_Unknown", GENDER_FEMALE: "Gender_Type_Female", GENDER_MALE: "Gender_Type_Male", KICKED_OUT_MULT_ACCOUNT: "multipleAccount", KICKED_OUT_MULT_DEVICE: "multipleDevice", KICKED_OUT_USERSIG_EXPIRED: "userSigExpired", KICKED_OUT_REST_API: "REST_API_Kick", ALLOW_TYPE_ALLOW_ANY: "AllowType_Type_AllowAny", ALLOW_TYPE_NEED_CONFIRM: "AllowType_Type_NeedConfirm", ALLOW_TYPE_DENY_ANY: "AllowType_Type_DenyAny", FORBID_TYPE_NONE: "AdminForbid_Type_None", FORBID_TYPE_SEND_OUT: "AdminForbid_Type_SendOut", JOIN_OPTIONS_FREE_ACCESS: "FreeAccess", JOIN_OPTIONS_NEED_PERMISSION: "NeedPermission", JOIN_OPTIONS_DISABLE_APPLY: "DisableApply", JOIN_STATUS_SUCCESS: "JoinedSuccess", JOIN_STATUS_ALREADY_IN_GROUP: "AlreadyInGroup", JOIN_STATUS_WAIT_APPROVAL: "WaitAdminApproval", INVITE_OPTIONS_DISABLE_INVITE: "DisableInvite", INVITE_OPTIONS_NEED_PERMISSION: "NeedPermission", INVITE_OPTIONS_FREE_ACCESS: "FreeAccess", GRP_PROFILE_OWNER_ID: "ownerID", GRP_PROFILE_CREATE_TIME: "createTime", GRP_PROFILE_LAST_INFO_TIME: "lastInfoTime", GRP_PROFILE_MEMBER_NUM: "memberNum", GRP_PROFILE_MAX_MEMBER_NUM: "maxMemberNum", GRP_PROFILE_JOIN_OPTION: "joinOption", GRP_PROFILE_INVITE_OPTION: "inviteOption", GRP_PROFILE_INTRODUCTION: "introduction", GRP_PROFILE_NOTIFICATION: "notification", GRP_PROFILE_MUTE_ALL_MBRS: "muteAllMembers", SNS_ADD_TYPE_SINGLE: "Add_Type_Single", SNS_ADD_TYPE_BOTH: "Add_Type_Both", SNS_DELETE_TYPE_SINGLE: "Delete_Type_Single", SNS_DELETE_TYPE_BOTH: "Delete_Type_Both", SNS_APPLICATION_TYPE_BOTH: "Pendency_Type_Both", SNS_APPLICATION_SENT_TO_ME: "Pendency_Type_ComeIn", SNS_APPLICATION_SENT_BY_ME: "Pendency_Type_SendOut", SNS_APPLICATION_AGREE: "Response_Action_Agree", SNS_APPLICATION_AGREE_AND_ADD: "Response_Action_AgreeAndAdd", SNS_CHECK_TYPE_BOTH: "CheckResult_Type_Both", SNS_CHECK_TYPE_SINGLE: "CheckResult_Type_Single", SNS_TYPE_NO_RELATION: "CheckResult_Type_NoRelation", SNS_TYPE_A_WITH_B: "CheckResult_Type_AWithB", SNS_TYPE_B_WITH_A: "CheckResult_Type_BWithA", SNS_TYPE_BOTH_WAY: "CheckResult_Type_BothWay", NET_STATE_CONNECTED: "connected", NET_STATE_CONNECTING: "connecting", NET_STATE_DISCONNECTED: "disconnected", MSG_AT_ALL: "__kImSDK_MesssageAtALL__", READ_ALL_C2C_MSG: "readAllC2CMessage", READ_ALL_GROUP_MSG: "readAllGroupMessage", READ_ALL_MSG: "readAllMessage", USER_STATUS_UNKNOWN: 0, USER_STATUS_ONLINE: 1, USER_STATUS_OFFLINE: 2, USER_STATUS_UNLOGINED: 3 }, S = function() { function e2() { o(this, e2), this.cache = [], this.options = null; } return a(e2, [{ key: "use", value: function(e3) { if ("function" != typeof e3) throw "middleware must be a function"; return this.cache.push(e3), this; } }, { key: "next", value: function(e3) { if (this.middlewares && this.middlewares.length > 0) return this.middlewares.shift().call(this, this.options, this.next.bind(this)); } }, { key: "run", value: function(e3) { return this.middlewares = this.cache.map(function(e4) { return e4; }), this.options = e3, this.next(); } }]), e2; }(), L = function() { function e2() { var t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, n2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0; o(this, e2), this.high = t2, this.low = n2; } return a(e2, [{ key: "equal", value: function(e3) { return null !== e3 && (this.low === e3.low && this.high === e3.high); } }, { key: "toString", value: function() { var e3 = Number(this.high).toString(16), t2 = Number(this.low).toString(16); if (t2.length < 8) for (var n2 = 8 - t2.length; n2; ) t2 = "0" + t2, n2--; return e3 + t2; } }]), e2; }(), A = { TEST: { CHINA: { DEFAULT: "wss://wss-dev.tim.qq.com" }, OVERSEA: { DEFAULT: "wss://wss-dev.tim.qq.com" }, SINGAPORE: { DEFAULT: "wss://wsssgp-dev.im.qcloud.com" }, KOREA: { DEFAULT: "wss://wsskr-dev.im.qcloud.com" }, GERMANY: { DEFAULT: "wss://wssger-dev.im.qcloud.com" }, IND: { DEFAULT: "wss://wssind-dev.im.qcloud.com" }, JPN: { DEFAULT: "wss://wssjpn-dev.im.qcloud.com" }, USA: { DEFAULT: "wss://wssusa-dev.im.qcloud.com" } }, PRODUCTION: { CHINA: { DEFAULT: "wss://wss.im.qcloud.com", BACKUP: "wss://wss.tim.qq.com", STAT: "https://events.im.qcloud.com", ANYCAST: "wss://162.14.13.203" }, OVERSEA: { DEFAULT: "wss://wss.im.qcloud.com", BACKUP: "wss://wss.my-imcloud.com", STAT: "https://api.my-imcloud.com" }, SINGAPORE: { DEFAULT: "wss://wsssgp.im.qcloud.com", BACKUP: "wss://wsssgp.my-imcloud.com", STAT: "https://apisgp.my-imcloud.com" }, KOREA: { DEFAULT: "wss://wsskr.im.qcloud.com", BACKUP: "wss://wsskr.my-imcloud.com", STAT: "https://apikr.my-imcloud.com" }, GERMANY: { DEFAULT: "wss://wssger.im.qcloud.com", BACKUP: "wss://wssger.my-imcloud.com", STAT: "https://apiger.my-imcloud.com" }, IND: { DEFAULT: "wss://wssind.my-imcloud.com", BACKUP: "wss://wssind.im.qcloud.com", STAT: "https://apiind.my-imcloud.com" }, JPN: { DEFAULT: "wss://wssjpn.im.qcloud.com", BACKUP: "wss://wssjpn.my-imcloud.com", STAT: "https://apijpn.my-imcloud.com" }, USA: { DEFAULT: "wss://wssusa.im.qcloud.com", BACKUP: "wss://wssusa.my-imcloud.com", STAT: "https://apiusa.my-imcloud.com" } } }, R = { ANDROID: 2, IOS: 3, MAC: 4, WEB: 7, WX_MP: 8, QQ_MP: 9, TT_MP: 10, BAIDU_MP: 11, ALI_MP: 12, IPAD: 13, UNI_NATIVE_APP: 15 }, N = "1.7.3", O = 537048168, G = "CHINA", U = "OVERSEA", P = "SINGAPORE", b = "KOREA", w = "GERMANY", F = "IND", q = "JPN", x = "USA", V = { HOST: { CURRENT: { DEFAULT: "wss://wss.im.qcloud.com", STAT: "https://events.im.qcloud.com" }, setCurrent: function() { var e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : G; this.CURRENT = A.PRODUCTION[e2]; } }, NAME: { OPEN_IM: "openim", OPEN_IM_MSG_EXT: "openim_msg_ext_http_svc", GROUP: "group_open_http_svc", GROUP_AVCHATROOM: "group_open_avchatroom_http_svc", GROUP_COMMUNITY: "million_group_open_http_svc", GROUP_ATTR: "group_open_attr_http_svc", FRIEND: "sns", PROFILE: "profile", RECENT_CONTACT: "recentcontact", PIC: "openpic", BIG_GROUP_NO_AUTH: "group_open_http_noauth_svc", BIG_GROUP_LONG_POLLING: "group_open_long_polling_http_svc", BIG_GROUP_LONG_POLLING_NO_AUTH: "group_open_long_polling_http_noauth_svc", IM_OPEN_STAT: "imopenstat", WEB_IM: "webim", IM_COS_SIGN: "im_cos_sign_svr", CUSTOM_UPLOAD: "im_cos_msg", HEARTBEAT: "heartbeat", IM_OPEN_PUSH: "im_open_push", IM_OPEN_STATUS: "im_open_status", IM_LONG_MESSAGE: "im_long_msg", IM_CONFIG_MANAGER: "im_sdk_config_mgr", STAT_SERVICE: "StatSvc", OVERLOAD_PUSH: "OverLoadPush", IM_MSG_AUDIT_MGR: "im_msg_audit_mgr", TUIROOM_SVR: "tui_room_svr", IM_OPEN_TRANSLATE: "im_open_translate" }, CMD: { LOGIN: "wslogin", LOGOUT_LONG_POLL: "longpollinglogout", LOGOUT: "wslogout", HELLO: "wshello", STAT_BACKGROUND: "ws_stat_background", STAT_FOREGROUND: "ws_stat_foreground", SET_TOKEN: "ws_stat_settoken", PORTRAIT_GET: "portrait_get_all", PORTRAIT_SET: "portrait_set", GET_LONG_POLL_ID: "getlongpollingid", LONG_POLL: "longpolling", AVCHATROOM_LONG_POLL: "get_msg", ADD_FRIEND: "friend_add", UPDATE_FRIEND: "friend_update", GET_FRIEND_LIST: "friend_get", GET_FRIEND_PROFILE: "friend_get_specified", DELETE_FRIEND: "friend_delete", CHECK_FRIEND: "friend_check", GET_FRIEND_GROUP_LIST: "group_get", RESPOND_FRIEND_APPLICATION: "friend_response", GET_FRIEND_APPLICATION_LIST: "pendency_get", DELETE_FRIEND_APPLICATION: "pendency_delete", REPORT_FRIEND_APPLICATION: "pendency_report", GET_GROUP_APPLICATION: "get_pendency", CREATE_FRIEND_GROUP: "group_add", DELETE_FRIEND_GROUP: "group_delete", UPDATE_FRIEND_GROUP: "group_update", GET_BLACKLIST: "black_list_get", ADD_BLACKLIST: "black_list_add", DELETE_BLACKLIST: "black_list_delete", CREATE_GROUP: "create_group", GET_JOINED_GROUPS: "get_joined_group_list", SET_GROUP_ATTRIBUTES: "set_group_attr", MODIFY_GROUP_ATTRIBUTES: "modify_group_attr", DELETE_GROUP_ATTRIBUTES: "delete_group_attr", CLEAR_GROUP_ATTRIBUTES: "clear_group_attr", GET_GROUP_ATTRIBUTES: "get_group_attr", SEND_MESSAGE: "sendmsg", REVOKE_C2C_MESSAGE: "msgwithdraw", DELETE_C2C_MESSAGE: "delete_c2c_msg_ramble", MODIFY_C2C_MESSAGE: "modify_c2c_msg", MODIFY_C2C_MESSAGE_EXTENSIONS: "set_key_values", GET_C2C_MESSAGE_EXTENSIONS: "get_key_values", SEND_GROUP_MESSAGE: "send_group_msg", REVOKE_GROUP_MESSAGE: "group_msg_recall", DELETE_GROUP_MESSAGE: "delete_group_ramble_msg_by_seq", MODIFY_GROUP_MESSAGE: "modify_group_msg", MODIFY_GROUP_MESSAGE_EXTENSIONS: "group_set_key_values", GET_GROUP_MESSAGE_EXTENSIONS: "group_get_key_values", GET_GROUP_INFO: "get_group_self_member_info", GET_GROUP_MEMBER_INFO: "get_specified_group_member_info", GET_GROUP_MEMBER_LIST: "get_group_member_info", GET_AVCHATROOM_MEMBER_LIST: "get_members", MARK_AVCHATROOM_MEMBER_INFO: "modify_user_info", QUIT_GROUP: "quit_group", CHANGE_GROUP_OWNER: "change_group_owner", DESTROY_GROUP: "destroy_group", ADD_GROUP_MEMBER: "add_group_member", DELETE_GROUP_MEMBER: "delete_group_member", BAN_AVCHATROOM_MEMBER: "ban_group_member", SEARCH_GROUP_BY_ID: "get_group_public_info", APPLY_JOIN_GROUP: "apply_join_group", HANDLE_APPLY_JOIN_GROUP: "handle_apply_join_group", HANDLE_INVITE_JOIN_GROUP: "handle_invite_join_permission_group", HANDLE_GROUP_INVITATION: "handle_invite_join_group", MODIFY_GROUP_INFO: "modify_group_base_info", MODIFY_GROUP_MEMBER_INFO: "modify_group_member_info", DELETE_GROUP_SYSTEM_MESSAGE: "deletemsg", DELETE_GROUP_AT_TIPS: "deletemsg", GET_GROUP_NOTIFY: "get_group_notify", GET_CONVERSATION_LIST: "get", PAGING_GET_CONVERSATION_LIST: "page_get", DELETE_CONVERSATION: "batch_delete", CLEAR_HISTORY_MESSAGE: "clear_msg", PIN_CONVERSATION: "top", SET_CONVERSATION_CUSTOM_DATA: "mark_contact", MARK_CONVERSATION: "mark_contact", CREATE_CONVERSATION_GROUP: "create_contact_group", DELETE_CONVERSATION_GROUP: "del_contact_group", UPDATE_CONVERSATION_GROUP: "update_contact_group", GET_CONVERSATION_GROUP_LIST: "get_contact_group", GET_MESSAGES: "getmsg", GET_C2C_ROAM_MESSAGES: "getroammsg", SET_C2C_PEER_MUTE_NOTIFICATIONS: "set_c2c_peer_mute_notifications", GET_C2C_PEER_MUTE_NOTIFICATIONS: "get_c2c_peer_mute_notifications", GET_GROUP_ROAM_MESSAGES: "group_msg_get", GET_READ_RECEIPT: "get_group_msg_receipt", GET_READ_RECEIPT_DETAIL: "get_group_msg_receipt_detail", SEND_READ_RECEIPT: "group_msg_receipt", SEND_C2C_READ_RECEIPT: "c2c_msg_read_receipt", SET_C2C_MESSAGE_READ: "msgreaded", GET_PEER_READ_TIME: "get_peer_read_time", SET_GROUP_MESSAGE_READ: "msg_read_report", FILE_READ_AND_WRITE_AUTHKEY: "authkey", FILE_UPLOAD: "pic_up", COS_SIGN: "cos", COS_PRE_SIG: "pre_sig", VIDEO_COVER: "video_cover", TIM_WEB_REPORT_V2: "tim_web_report_v2", BIG_DATA_HALLWAY_AUTH_KEY: "authkey", GET_ONLINE_MEMBER_NUM: "get_online_member_num", ALIVE: "alive", MESSAGE_PUSH: "msg_push", MULTI_MESSAGE_PUSH: "multi_msg_push_ws", MESSAGE_PUSH_ACK: "ws_msg_push_ack", STATUS_FORCE_OFFLINE: "stat_forceoffline", DOWNLOAD_MERGER_MESSAGE: "get_relay_json_msg", UPLOAD_MERGER_MESSAGE: "save_relay_json_msg", FETCH_CLOUD_CONTROL_CONFIG: "fetch_config", PUSHED_CLOUD_CONTROL_CONFIG: "push_configv2", FETCH_COMMERCIAL_CONFIG: "fetch_imsdk_purchase_bitsv2", PUSHED_COMMERCIAL_CONFIG: "push_imsdk_purchase_bitsv2", KICK_OTHER: "KickOther", OVERLOAD_NOTIFY: "notify2", SET_ALL_MESSAGE_READ: "read_all_unread_msg", CREATE_TOPIC: "create_topic", DELETE_TOPIC: "destroy_topic", UPDATE_TOPIC_PROFILE: "modify_topic", GET_TOPIC_LIST: "get_topic", SET_SELF_STATUS: "ws_set_custom_status", GET_USER_STATUS: "ws_get_user_status", SUBSCRIBE_USER_STATUS: "ws_status_subscribe", UNSUBSCRIBE_USER_STATUS: "ws_status_unsubscribe", GET_RPOFANITY_LIST: "get_local_words", TRANSLATE_TEXT: "ws_batch_trans_text", UPDATE_GROUP_COUNTER: "update_group_counter", GET_GROUP_COUNTER: "get_group_counter" }, CHANNEL: { SOCKET: 1, XHR: 2, AUTO: 0 }, NAME_VERSION: { openim: "v4", group_open_http_svc: "v4", sns: "v4", profile: "v4", recentcontact: "v4", openpic: "v4", group_open_http_noauth_svc: "v4", group_open_long_polling_http_svc: "v4", group_open_long_polling_http_noauth_svc: "v4", imopenstat: "v4", im_cos_sign_svr: "v4", im_cos_msg: "v4", webim: "v4", im_open_push: "v4", im_open_status: "v4" } }, B = { SEARCH_MSG: new L(0, Math.pow(2, 0)).toString(), SEARCH_GRP_SNS: new L(0, Math.pow(2, 1)).toString(), AVCHATROOM_HISTORY_MSG: new L(0, Math.pow(2, 2)).toString(), GRP_COMMUNITY: new L(0, Math.pow(2, 3)).toString(), MSG_TO_SPECIFIED_GRP_MBR: new L(0, Math.pow(2, 4)).toString(), AVCHATROOM_MBR_LIST: new L(0, Math.pow(2, 6)).toString(), USER_STATUS: new L(0, Math.pow(2, 7)).toString(), CONV_MARK: new L(0, Math.pow(2, 9)).toString(), CONV_GROUP: new L(0, Math.pow(2, 10)).toString(), AVCHATROOM_BAN_MBR: new L(0, Math.pow(2, 11)).toString(), MSG_EXT: new L(0, Math.pow(2, 13)).toString(), GRP_COUNTER: new L(0, Math.pow(2, 15)).toString() }, H = "c2c_text_message", K = "c2c_custom_message", W = "group_text_message", Y = "group_custom_message", j = "user_profile", z = "group_profile", J = "group_member_profile"; V.HOST.setCurrent(G); var X = "undefined" != typeof wx && "function" == typeof wx.getSystemInfoSync && Boolean(wx.getSystemInfoSync().fontSizeSetting), Z = X && "function" == typeof wx.createGamePortal, Q = "undefined" != typeof qq && "function" == typeof qq.getSystemInfoSync && Boolean(qq.getSystemInfoSync().fontSizeSetting), $ = "undefined" != typeof tt && "function" == typeof tt.getSystemInfoSync && Boolean(tt.getSystemInfoSync().fontSizeSetting), ee = "undefined" != typeof swan && "function" == typeof swan.getSystemInfoSync && Boolean(swan.getSystemInfoSync().fontSizeSetting), te = "undefined" != typeof my && "function" == typeof my.getSystemInfoSync && Boolean(my.getSystemInfoSync().fontSizeSetting), ne = "undefined" != typeof jd && "function" == typeof jd.getSystemInfoSync, oe = "undefined" != typeof uni && "undefined" == typeof window && "function" == typeof requireNativePlugin, se = "undefined" != typeof uni, ae = X || Q || $ || ee || te || oe || ne, ie = ("undefined" != typeof uni || "undefined" != typeof window) && !ae, re = Q ? qq : $ ? tt : ee ? swan : te ? my : X ? wx : oe ? uni : ne ? jd : {}, ue = ie && window && window.navigator && window.navigator.userAgent || "", ce = /(micromessenger|webbrowser)/i.test(ue), le = /AppleWebKit\/([\d.]+)/i.exec(ue); le && parseFloat(le.pop()); var de, pe, ge = (de = "WEB", ce ? de = "WEB" : Q ? de = "QQ_MP" : $ ? de = "TT_MP" : ee ? de = "BAIDU_MP" : te ? de = "ALI_MP" : X ? de = "WX_MP" : oe && (de = "UNI_NATIVE_APP"), R[de]), he = /iPad/i.test(ue), _e = /iPhone/i.test(ue) && !he, fe = /iPod/i.test(ue), ve = _e || he || fe, me = (pe = ue.match(/OS (\d+)_/i)) && pe[1] ? pe[1] : null, Me = /Android/i.test(ue), ye = function() { var e2 = ue.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i); if (!e2) return null; var t2 = e2[1] && parseFloat(e2[1]), n2 = e2[2] && parseFloat(e2[2]); return t2 && n2 ? parseFloat(e2[1] + "." + e2[2]) : t2 || null; }(); !function() { var e2 = ue.match(/Chrome\/(\d+)/); e2 && e2[1] && parseFloat(e2[1]); }(); var Ie = /MSIE/.test(ue) || ue.indexOf("Trident") > -1 && ue.indexOf("rv:11.0") > -1, Ce = function() { var e2 = /MSIE\s(\d+)\.\d/.exec(ue), t2 = e2 && parseFloat(e2[1]); return !t2 && /Trident\/7.0/i.test(ue) && /rv:11.0/.test(ue) && (t2 = 11), t2; }(); !function() { var e2 = ue.match(/TBS\/(\d+)/i); if (e2 && e2[1]) e2[1]; }(); var Te, De, ke = /Windows/i.test(ue), Ee = /MAC OS X/i.test(ue), Se = ie && "undefined" != typeof Worker && !Ie, Le = Me || ve, Ae = ie && void 0 !== window.tencent_cloud_im_csig_flutter_for_web_25F_cy; Te = "undefined" != typeof console ? console : "undefined" != typeof commonjsGlobal && commonjsGlobal.console ? commonjsGlobal.console : "undefined" != typeof window && window.console ? window.console : {}; for (var Re = function() { }, Ne = ["assert", "clear", "count", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "profile", "profileEnd", "table", "time", "timeEnd", "timeStamp", "trace", "warn"], Oe = Ne.length; Oe--; ) De = Ne[Oe], console[De] || (Te[De] = Re); var Ge = Te, Ue = 0, Pe = function() { return (/* @__PURE__ */ new Date()).getTime() + Ue; }, be = function() { Ue = 0; }, we = function() { return Math.floor(Pe() / 1e3); }, Fe = 0; function qe() { return Kt() ? "%c TIM %c" : "TIM"; } function xe() { var e2, t2 = ((e2 = /* @__PURE__ */ new Date()).setTime(Pe()), e2); return t2.toLocaleTimeString("en-US", { hour12: false }) + "." + function(e3) { var t3; switch (e3.toString().length) { case 1: t3 = "00" + e3; break; case 2: t3 = "0" + e3; break; default: t3 = e3; } return t3; }(t2.getMilliseconds()); } var Ve = { arguments2String: function(e2) { var t2 = ""; if (1 === e2.length) t2 = e2[0]; else for (var n2 = 0, o2 = e2.length; n2 < o2; n2++) rt(e2[n2]) ? ct(e2[n2]) ? t2 += gt(e2[n2]) : t2 += JSON.stringify(e2[n2]) : t2 += e2[n2], t2 += " "; return t2; }, _exec: function(e2, t2) { Kt() ? Ge[e2](qe(), "background:#0abf5b; padding:1px; border-radius:3px; color: #fff", "background:transparent", xe(), t2) : Ge[e2]("".concat(qe(), " ").concat(xe(), " ").concat(t2)); }, d: function() { if (Fe <= -1) { var e2 = this.arguments2String(arguments); this._exec("debug", e2); } }, l: function() { if (Fe <= 0) { var e2 = this.arguments2String(arguments); this._exec("log", e2); } }, log: function() { if (Fe <= 0) { var e2 = this.arguments2String(arguments); this._exec("log", e2); } }, i: function() { if (Fe <= 1) { var e2 = this.arguments2String(arguments); this._exec("info", e2); } }, w: function() { if (Fe <= 2) { var e2 = this.arguments2String(arguments); this._exec("warn", e2); } }, e: function() { if (Fe <= 3) { var e2 = this.arguments2String(arguments); this._exec("error", e2); } }, setLevel: function(e2) { e2 < 4 && this._exec("log", "set level from " + Fe + " to " + e2), Fe = e2; }, getLevel: function() { return Fe; } }, Be = { JPG: 1, JPEG: 1, GIF: 2, PNG: 3, BMP: 4, UNKNOWN: 255 }, He = { NICK: "Tag_Profile_IM_Nick", GENDER: "Tag_Profile_IM_Gender", BIRTHDAY: "Tag_Profile_IM_BirthDay", LOCATION: "Tag_Profile_IM_Location", SELFSIGNATURE: "Tag_Profile_IM_SelfSignature", ALLOWTYPE: "Tag_Profile_IM_AllowType", LANGUAGE: "Tag_Profile_IM_Language", AVATAR: "Tag_Profile_IM_Image", MESSAGESETTINGS: "Tag_Profile_IM_MsgSettings", ADMINFORBIDTYPE: "Tag_Profile_IM_AdminForbidType", LEVEL: "Tag_Profile_IM_Level", ROLE: "Tag_Profile_IM_Role" }, Ke = { UNKNOWN: "Gender_Type_Unknown", FEMALE: "Gender_Type_Female", MALE: "Gender_Type_Male" }, We = { NONE: "AdminForbid_Type_None", SEND_OUT: "AdminForbid_Type_SendOut" }, Ye = { NEED_CONFIRM: "AllowType_Type_NeedConfirm", ALLOW_ANY: "AllowType_Type_AllowAny", DENY_ANY: "AllowType_Type_DenyAny" }, je = "JoinedSuccess", ze = "WaitAdminApproval", Je = "@TGS#_", Xe = "@TOPIC#_", Ze = ["url"], Qe = function(e2) { return "map" === lt(e2); }, $e = function(e2) { return "file" === lt(e2); }, et = function(e2) { return null !== e2 && ("number" == typeof e2 && !isNaN(e2 - 0) || "object" === n(e2) && e2.constructor === Number); }, nt = function(e2) { return "string" == typeof e2; }, ot = function(e2) { return null !== e2 && "object" === n(e2); }, st = function(e2) { if ("object" !== n(e2) || null === e2) return false; var t2 = Object.getPrototypeOf(e2); if (null === t2) return true; for (var o2 = t2; null !== Object.getPrototypeOf(o2); ) o2 = Object.getPrototypeOf(o2); return t2 === o2; }, at = function(e2) { return "function" == typeof Array.isArray ? Array.isArray(e2) : "array" === lt(e2); }, it = function(e2) { return void 0 === e2; }, rt = function(e2) { return at(e2) || ot(e2); }, ut = function(e2) { return "function" == typeof e2; }, ct = function(e2) { return e2 instanceof Error; }, lt = function(e2) { return Object.prototype.toString.call(e2).match(/^\[object (.*)\]$/)[1].toLowerCase(); }, dt = function(e2) { if ("string" != typeof e2) return false; var t2 = e2[0]; return !/[^a-zA-Z0-9]/.test(t2); }; Date.now || (Date.now = function() { return (/* @__PURE__ */ new Date()).getTime(); }); var pt = function e2(t2, n2, o2, s2) { if (!rt(t2) || !rt(n2)) return 0; for (var a2, i2 = 0, r2 = Object.keys(n2), u2 = 0, c2 = r2.length; u2 < c2; u2++) if (a2 = r2[u2], !(it(n2[a2]) || o2 && o2.includes(a2))) if (rt(t2[a2]) && rt(n2[a2])) i2 += e2(t2[a2], n2[a2], o2, s2); else { if (s2 && s2.includes(n2[a2])) continue; t2[a2] !== n2[a2] && (t2[a2] = n2[a2], i2 += 1); } return i2; }, gt = function(e2) { return JSON.stringify(e2, ["message", "code"]); }, ht = function(e2) { if (0 === e2.length) return 0; for (var t2 = 0, n2 = 0, o2 = "undefined" != typeof document && void 0 !== document.characterSet ? document.characterSet : "UTF-8"; void 0 !== e2[t2]; ) n2 += e2[t2++].charCodeAt[t2] <= 255 ? 1 : false === o2 ? 3 : 2; return n2; }, _t = function(e2) { var t2 = e2 || 99999999; return Math.round(Math.random() * t2); }, ft = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", vt = ft.length, mt = function(e2, t2) { for (var n2 in e2) if (e2[n2] === t2) return true; return false; }, Mt = {}, yt = function(e2) { return -1 === e2.indexOf("http://") || -1 === e2.indexOf("https://") ? "https://" + e2 : e2.replace(/https|http/, "https"); }, It = function e2(t2) { if (0 === Object.getOwnPropertyNames(t2).length) return /* @__PURE__ */ Object.create(null); var o2 = Array.isArray(t2) ? [] : /* @__PURE__ */ Object.create(null), s2 = ""; for (var a2 in t2) null !== t2[a2] ? void 0 !== t2[a2] ? (s2 = n(t2[a2]), ["string", "number", "function", "boolean"].indexOf(s2) >= 0 ? o2[a2] = t2[a2] : o2[a2] = e2(t2[a2])) : o2[a2] = void 0 : o2[a2] = null; return o2; }; function Ct(e2, t2) { if (!at(e2) || !at(t2)) return false; var n2 = false; return t2.forEach(function(t3) { var o2 = t3.key, s2 = t3.value, a2 = e2.find(function(e3) { return e3.key === o2; }); a2 ? a2.value !== s2 && (a2.value = s2, n2 = true) : (e2.push({ key: o2, value: s2 }), n2 = true); }), n2; } var Tt = function(e2) { return e2 === E.GRP_AVCHATROOM; }, Dt = function(e2) { var t2 = e2.type, n2 = e2.groupID; return t2 === E.GRP_COMMUNITY || "".concat(n2).startsWith(Je) && !"".concat(n2).includes(Xe); }, kt = function(e2) { return "".concat(e2).startsWith(Je) && "".concat(e2).includes(Xe); }, Et = function(e2) { return nt(e2) && e2.slice(0, 3) === E.CONV_C2C; }, St = function(e2) { return nt(e2) && e2.slice(0, 5) === E.CONV_GROUP; }, Lt = function(e2) { return nt(e2) && e2 === E.CONV_SYSTEM; }; function At(e2, t2) { var n2 = {}; return Object.keys(e2).forEach(function(o2) { n2[o2] = t2(e2[o2], o2); }), n2; } function Rt(e2) { return ae ? new Promise(function(t2, n2) { re.getImageInfo({ src: e2, success: function(e3) { t2({ width: e3.width, height: e3.height }); }, fail: function() { t2({ width: 0, height: 0 }); } }); }) : Ie && 9 === Ce ? Promise.resolve({ width: 0, height: 0 }) : new Promise(function(t2, n2) { var o2 = new Image(); o2.onload = function() { t2({ width: this.width, height: this.height }), o2 = null; }, o2.onerror = function() { t2({ width: 0, height: 0 }), o2 = null; }, o2.src = e2; }); } function Nt() { function e2() { return (65536 * (1 + Math.random()) | 0).toString(16).substring(1); } return "".concat(e2() + e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2()); } function Ot() { var e2 = "unknown"; if (Ee && (e2 = "mac"), ke && (e2 = "windows"), ve && (e2 = "ios"), Me && (e2 = "android"), ae) try { var t2 = re.getSystemInfoSync().platform; void 0 !== t2 && (e2 = t2); } catch (n2) { } return e2; } function Gt(e2, t2) { e2 = e2.split("."), t2 = t2.split("."); for (var n2 = Math.max(e2.length, t2.length); e2.length < n2; ) e2.push("0"); for (; t2.length < n2; ) t2.push("0"); for (var o2 = 0; o2 < n2; o2++) { var s2 = parseInt(e2[o2]), a2 = parseInt(t2[o2]); if (s2 > a2) return 1; if (s2 < a2) return -1; } return 0; } function Ut(e2) { var t2 = e2.originUrl, n2 = void 0 === t2 ? void 0 : t2, o2 = e2.originWidth, s2 = e2.originHeight, a2 = e2.min, i2 = void 0 === a2 ? 198 : a2, r2 = parseInt(o2), u2 = parseInt(s2), c2 = { url: void 0, width: 0, height: 0 }; if ((r2 <= u2 ? r2 : u2) <= i2) c2.url = n2, c2.width = r2, c2.height = u2; else { u2 <= r2 ? (c2.width = Math.ceil(r2 * i2 / u2), c2.height = i2) : (c2.width = i2, c2.height = Math.ceil(u2 * i2 / r2)); var l2 = n2 && n2.indexOf("?") > -1 ? "".concat(n2, "&") : "".concat(n2, "?"); c2.url = "".concat(l2, 198 === i2 ? "imageView2/3/w/198/h/198" : "imageView2/3/w/720/h/720"); } return it(n2) ? (c2.url, g(c2, Ze)) : c2; } function Pt(e2) { var t2 = e2[2]; e2[2] = e2[1], e2[1] = t2; for (var n2 = 0; n2 < e2.length; n2++) e2[n2].setType(n2); } function bt(e2) { var t2 = e2.servcmd; return t2.slice(t2.indexOf(".") + 1); } function wt(e2, t2) { return Math.round(Number(e2) * Math.pow(10, t2)) / Math.pow(10, t2); } function Ft(e2, t2) { return e2.includes(t2); } function qt(e2, t2) { return e2.includes(t2); } function xt(e2) { return e2.split(Xe)[0]; } var Vt = function(e2, t2, n2) { if (it(t2)) return ""; switch (e2) { case E.MSG_TEXT: return t2.text; case E.MSG_IMAGE: return n2 ? "[Image]" : "[图片]"; case E.MSG_LOCATION: return n2 ? "[Location]" : "[位置]"; case E.MSG_AUDIO: return n2 ? "[Voice]" : "[语音]"; case E.MSG_VIDEO: return n2 ? "[Video]" : "[视频]"; case E.MSG_FILE: return n2 ? "[File]" : "[文件]"; case E.MSG_CUSTOM: return n2 ? "[Custom Messages]" : "[自定义消息]"; case E.MSG_GRP_TIP: return n2 ? "[Group Notification]" : "[群提示消息]"; case E.MSG_GRP_SYS_NOTICE: return n2 ? "[Group System Message]" : "[群系统通知]"; case E.MSG_FACE: return n2 ? "[Animated Sticker]" : "[动画表情]"; case E.MSG_MERGER: return n2 ? "[Chat Record]" : "[聊天记录]"; default: return ""; } }; function Bt(e2) { return e2 === E.MSG_TEXT || e2 === E.MSG_CUSTOM || e2 === E.MSG_LOCATION || e2 === E.MSG_FACE; } function Ht(e2) { var t2 = []; if (!nt(e2)) return t2; var n2 = e2.length; if (0 === n2) return t2; for (var o2 = n2 - 1; o2 >= 0; o2--) "1" === e2[o2] && t2.push(Math.pow(2, n2 - o2 - 1)); return t2; } function Kt() { return !Ie && !ae; } function Wt(e2) { return "the length of userIDList cannot exceed ".concat(e2); } function Yt(e2, t2) { if (e2) { var n2 = e2; return t2 && (e2.startsWith("http://") ? n2 = e2.replace(/^http:\/\/[^/]+/, t2) : e2.startsWith("https://") && (n2 = e2.replace(/^https:\/\/[^/]+/, t2))), n2; } } var jt = Object.prototype.hasOwnProperty; function zt(e2) { if (null == e2) return true; if ("boolean" == typeof e2) return false; if ("number" == typeof e2) return 0 === e2; if ("string" == typeof e2) return 0 === e2.length; if ("function" == typeof e2) return 0 === e2.length; if (Array.isArray(e2)) return 0 === e2.length; if (e2 instanceof Error) return "" === e2.message; if (st(e2)) { for (var t2 in e2) if (jt.call(e2, t2)) return false; return true; } return !(!Qe(e2) && (n2 = e2, "set" !== lt(n2)) && !$e(e2)) && 0 === e2.size; var n2; } function Jt(e2, t2, n2) { if (void 0 === t2) return true; var o2 = true; if (st(t2)) Object.keys(t2).forEach(function(s3) { var a2 = 1 === e2.length ? e2[0][s3] : void 0; o2 = !!Xt(a2, t2[s3], n2, s3) && o2; }); else if (at(t2)) for (var s2 = 0; s2 < t2.length; s2++) o2 = !!Xt(e2[s2], t2[s2], n2, t2[s2].name) && o2; if (o2) return o2; throw new Error("Params validate failed."); } function Xt(e2, t2, n2, o2) { if (void 0 === t2) return true; var s2 = true; if (t2.required && zt(e2) && (Ve.e("[".concat(n2, '] Missing required params: "').concat(o2, '".')), s2 = false), !zt(e2)) { var a2 = lt(e2), i2 = t2.type.toLowerCase(); a2 !== i2 && ("asyncfunction" === a2 && "function" === i2 || (Ve.e("[".concat(n2, '] Invalid params: type check failed for "').concat(o2, '".Expected ').concat(t2.type, ".")), s2 = false)); } return t2.validator && !t2.validator(e2) && (Ve.e("[".concat(n2, "] Invalid params: custom validator check failed for params.")), s2 = false), s2; } var Zt, Qt = { UNSEND: "unSend", SUCCESS: "success", FAIL: "fail" }, $t = { NOT_START: "notStart", PENDING: "pending", RESOLVED: "resolved", REJECTED: "rejected" }, en = function(e2) { if (!e2) return false; if (Et(e2) || St(e2) || Lt(e2)) return true; var t2 = Sn("InvalidConversationID", e2); return t2 && Ve.w(t2), false; }, tn = function(e2) { "" !== e2.desc && "" !== Sn("API_REFER") && Ve.w("[".concat(e2.api, "] | ").concat(e2.param, " | ").concat(e2.desc, ", ").concat(Sn("API_REFER")).concat(e2.api)); }, nn = function() { return Sn("StringRequiredLog"); }, on = function(e2) { return Sn("NonEmptyStringRequiredLog", e2); }, sn = function() { return Sn("NumberRequiredLog"); }, an = function() { return Sn("UndefinedNotAllowedLog"); }, rn = function() { return Sn("FileRequiredLog"); }, un = function() { return Sn("FunctionRequiredLog"); }, cn = function() { return Sn("ArrayRequiredLog"); }, ln = function() { return Sn("NonEmptyArrayLog"); }, dn = function() { return Sn("CallbackMissingLog"); }, pn = function() { return Sn("PositiveIntegerRequiredLog"); }, gn = function(e2, t2) { return Sn("StringNotLongerThanLog", e2, t2); }, hn = function(e2, t2) { return Sn("NumberLessThanLog", e2, t2); }, _n = function(e2) { return Sn("KeyValueStringRequiredLog", e2); }, fn = function() { return Sn("PlainObjectRequiredLog"); }, vn = function() { return Sn("NonEmptyContentRequiredLog"); }, mn = function() { return Sn("FileNotSelectedLog"); }, Mn = function() { return Sn("MessageInstanceRequiredLog"); }, yn = function() { return Sn("NonAnonymousFunctionLog"); }, In = function() { return Sn("MessageExtensionNotAvailableLog"); }, Cn = { type: "String", required: true }, Tn = { type: "Array", required: true }, Dn = { type: "Object", required: true }, kn = { type: "Boolean", required: true }, En = { type: "number", required: true }, Sn = null, Ln = { hookGetAPITips: function(e2) { Sn = e2; }, login: { userID: Cn, userSig: Cn }, addToBlacklist: { userIDList: Tn }, removeFromBlacklist: { userIDList: Tn }, on: [{ name: "eventName", type: "String", validator: function(e2) { return "string" == typeof e2 && 0 !== e2.length || (tn({ api: "on", param: "eventName", desc: on("eventName") }), false); } }, { name: "handler", type: "Function", validator: function(e2) { return "function" != typeof e2 ? (tn({ api: "on", param: "handler", desc: un() }), false) : ("" === e2.name && tn({ api: "on", param: "handler", desc: yn() }), true); } }], once: [{ name: "eventName", type: "String", validator: function(e2) { return "string" == typeof e2 && 0 !== e2.length || (tn({ api: "once", param: "eventName", desc: on("eventName") }), false); } }, { name: "handler", type: "Function", validator: function(e2) { return "function" != typeof e2 ? (tn({ api: "once", param: "handler", desc: un() }), false) : ("" === e2.name && tn({ api: "once", param: "handler", desc: yn() }), true); } }], off: [{ name: "eventName", type: "String", validator: function(e2) { return "string" == typeof e2 && 0 !== e2.length || (tn({ api: "off", param: "eventName", desc: on("eventName") }), false); } }, { name: "handler", type: "Function", validator: function(e2) { return "function" != typeof e2 ? (tn({ api: "off", param: "handler", desc: un() }), false) : ("" === e2.name && tn({ api: "off", param: "handler", desc: yn() }), true); } }], sendMessage: [t({ name: "message" }, Dn)], setMessageExtensions: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) { return e2.status === Qt.SUCCESS && true === e2.isSupportExtension || (tn({ api: "setMessageExtensions", param: "message", desc: In() }), false); } }), t({ name: "extensions" }, Tn)], getMessageExtensions: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) { return e2.status === Qt.SUCCESS && true === e2.isSupportExtension || (tn({ api: "getMessageExtensions", param: "message", desc: In() }), false); } })], deleteMessageExtensions: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) { return e2.status === Qt.SUCCESS && true === e2.isSupportExtension || (tn({ api: "deleteMessageExtensions", param: "message", desc: In() }), false); } })], getMessageList: { conversationID: t(t({}, Cn), {}, { validator: function(e2) { return en(e2); } }), nextReqMessageID: { type: "String" }, count: { type: "Number", validator: function(e2) { return !(!it(e2) && !/^[1-9][0-9]*$/.test(e2)) || (tn({ api: "getMessageList", param: "count", desc: pn() }), false); } } }, getMessageListHopping: { conversationID: t(t({}, Cn), {}, { validator: function(e2) { return en(e2); } }), sequence: { type: "Number" }, time: { type: "Number" }, direction: { type: "Number", validator: function(e2) { return !(!it(e2) && 0 !== e2 && 1 !== e2) || (tn({ api: "getMessageListHopping", param: "direction", desc: Sn("0Or1RequiredLog") }), false); } }, count: { type: "Number", validator: function(e2) { return !(!it(e2) && !/^[1-9][0-9]*$/.test(e2)) || (tn({ api: "getMessageListHopping", param: "count", desc: pn }), false); } } }, setMessageRead: { conversationID: t(t({}, Cn), {}, { validator: function(e2) { return en(e2); } }) }, setAllMessageRead: { scope: { type: "String", required: false, validator: function(e2) { return !e2 || -1 !== [E.READ_ALL_C2C_MSG, E.READ_ALL_GROUP_MSG, E.READ_ALL_MSG].indexOf(e2) || (tn({ api: "setAllMessageRead", param: "scope", desc: "TIM.TYPES.READ_ALL_C2C_MSG or TIM.TYPES.READ_ALL_GROUP_MSG or TIM.TYPES.READ_ALL_MSG required" }), false); } } }, getConversationProfile: [t(t({ name: "conversationID" }, Cn), {}, { validator: function(e2) { return en(e2); } })], clearHistoryMessage: [t(t({ name: "conversationID" }, Cn), {}, { validator: function(e2) { return en(e2); } })], pinConversation: { conversationID: t(t({}, Cn), {}, { validator: function(e2) { return en(e2); } }), isPinned: t({}, kn) }, setConversationCustomData: { conversationIDList: t({}, Tn), customData: { type: "String", validator: function(e2) { return nt(e2) ? !(e2.length > 256) || (tn({ api: "setConversationCustomData", param: "customData", desc: gn("customData", 256) }), false) : (tn({ api: "setConversationCustomData", param: "customData", desc: nn() }), false); } } }, markConversation: { conversationIDList: t({}, Tn), markType: { type: "number", validator: function(e2) { return et(e2) ? e2 <= 0 ? (tn({ api: "markConversation", param: "markType", desc: (t2 = "markType", n2 = 0, Sn("NumberGreaterThanLog", t2, n2)) }), false) : !(e2 >= Math.pow(2, 64)) || (tn({ api: "markConversation", param: "markType", desc: hn("markType", "Math.pow(2,64)") }), false) : (tn({ api: "markConversation", param: "markType", desc: sn() }), false); var t2, n2; } }, enableMark: t({}, kn) }, createConversationGroup: { conversationIDList: t({}, Tn), groupName: t(t({}, Cn), {}, { validator: function(e2) { return !!e2 && (!(e2.length > 32) || (tn({ api: "createConversationGroup", param: "groupName", desc: gn("groupName", 32) }), false)); } }) }, deleteConversationGroup: [t({ name: "groupName" }, Cn)], renameConversationGroup: { oldName: t({}, Cn), newName: t(t({}, Cn), {}, { validator: function(e2) { return !!e2 && (!(e2.length > 32) || (tn({ api: "renameConversationGroup", param: "newName", desc: gn("newName", 32) }), false)); } }) }, addConversationsToGroup: { conversationIDList: t({}, Tn), groupName: t({}, Cn) }, deleteConversationsFromGroup: { conversationIDList: t({}, Tn), groupName: t({}, Cn) }, getGroupList: { groupProfileFilter: { type: "Array" } }, getGroupProfile: { groupID: Cn, groupCustomFieldFilter: { type: "Array" }, memberCustomFieldFilter: { type: "Array" } }, getGroupProfileAdvance: { groupIDList: Tn }, createGroup: { name: Cn }, joinGroup: { groupID: Cn, type: { type: "String" }, applyMessage: { type: "String" } }, quitGroup: [t({ name: "groupID" }, Cn)], handleApplication: { message: Dn, handleAction: Cn, handleMessage: { type: "String" } }, changeGroupOwner: { groupID: Cn, newOwnerID: Cn }, updateGroupProfile: { groupID: Cn, muteAllMembers: { type: "Boolean" } }, dismissGroup: [t({ name: "groupID" }, Cn)], searchGroupByID: [t({ name: "groupID" }, Cn)], initGroupAttributes: { groupID: Cn, groupAttributes: t(t({}, Dn), {}, { validator: function(e2) { var t2 = true; return Object.keys(e2).forEach(function(n2) { if (!nt(e2[n2])) return tn({ api: "initGroupAttributes", param: "groupAttributes", desc: _n("value") }), t2 = false; }), t2; } }) }, setGroupAttributes: { groupID: Cn, groupAttributes: t(t({}, Dn), {}, { validator: function(e2) { var t2 = true; return Object.keys(e2).forEach(function(n2) { if (!nt(e2[n2])) return tn({ api: "setGroupAttributes", param: "groupAttributes", desc: _n("value") }), t2 = false; }), t2; } }) }, deleteGroupAttributes: { groupID: Cn, keyList: { type: "Array", validator: function(e2) { if (it(e2) || !at(e2)) return tn({ api: "deleteGroupAttributes", param: "keyList", desc: cn() }), false; if (!zt(e2)) { var t2 = true; return e2.forEach(function(e3) { if (!nt(e3)) return tn({ api: "deleteGroupAttributes", param: "keyList", desc: Sn("StringArrayRequiredLog") }), t2 = false; }), t2; } return true; } } }, getGroupAttributes: { groupID: Cn, keyList: { type: "Array", validator: function(e2) { if (it(e2) || !at(e2)) return tn({ api: "getGroupAttributes", param: "keyList", desc: cn() }), false; if (!zt(e2)) { var t2 = true; return e2.forEach(function(e3) { if (!nt(e3)) return tn({ api: "getGroupAttributes", param: "keyList", desc: _n("key") }), t2 = false; }), t2; } return true; } } }, setGroupCounters: { groupID: Cn, counters: Dn }, increaseGroupCounter: { groupID: Cn, key: Cn, value: En }, decreaseGroupCounter: { groupID: Cn, key: Cn, value: En }, getGroupCounters: { groupID: Cn }, getGroupMemberList: { groupID: Cn, count: { type: "Number" } }, getGroupMemberProfile: { groupID: Cn, userIDList: Tn, memberCustomFieldFilter: { type: "Array" } }, addGroupMember: { groupID: Cn, userIDList: Tn }, setGroupMemberRole: { groupID: Cn, userID: Cn, role: Cn }, setGroupMemberMuteTime: { groupID: Cn, userID: Cn, muteTime: { type: "Number", validator: function(e2) { return e2 >= 0; } } }, setGroupMemberNameCard: { groupID: Cn, userID: { type: "String" }, nameCard: { type: "String", validator: function(e2) { return nt(e2) ? (e2.length, true) : (tn({ api: "setGroupMemberNameCard", param: "nameCard", desc: nn() }), false); } } }, setGroupMemberCustomField: { groupID: Cn, userID: { type: "String" }, memberCustomField: Tn }, deleteGroupMember: { groupID: Cn }, markGroupMemberList: { groupID: Cn, markType: { type: "number", validator: function(e2) { return et(e2) ? !(e2 < 1e3) || (tn({ api: "markGroupMemberList", param: "markType", desc: (t2 = "markType", n2 = 1e3, Sn("NumberGreaterOrEqualLog", t2, n2)) }), false) : (tn({ api: "markGroupMemberList", param: "markType", desc: sn() }), false); var t2, n2; } }, userIDList: t({}, Tn), enableMark: t({}, kn) }, createTextMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) { return st(e2) ? nt(e2.text) ? 0 !== e2.text.length || (tn({ api: "createTextMessage", param: "payload.text", desc: vn() }), false) : (tn({ api: "createTextMessage", param: "payload.text", desc: nn() }), false) : (tn({ api: "createTextMessage", param: "payload", desc: fn() }), false); } }) }, createTextAtMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) { return st(e2) ? nt(e2.text) ? 0 === e2.text.length ? (tn({ api: "createTextAtMessage", param: "payload.text", desc: vn() }), false) : !(e2.atUserList && !at(e2.atUserList)) || (tn({ api: "createTextAtMessage", param: "payload.atUserList", desc: cn() }), false) : (tn({ api: "createTextAtMessage", param: "payload.text", desc: nn() }), false) : (tn({ api: "createTextAtMessage", param: "payload", desc: fn() }), false); } }) }, createCustomMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) { return st(e2) ? e2.data && !nt(e2.data) ? (tn({ api: "createCustomMessage", param: "payload.data", desc: nn() }), false) : e2.description && !nt(e2.description) ? (tn({ api: "createCustomMessage", param: "payload.description", desc: nn() }), false) : !(e2.extension && !nt(e2.extension)) || (tn({ api: "createCustomMessage", param: "payload.extension", desc: nn() }), false) : (tn({ api: "createCustomMessage", param: "payload", desc: fn() }), false); } }) }, createImageMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) { if (!st(e2)) return tn({ api: "createImageMessage", param: "payload", desc: fn() }), false; if (it(e2.file)) return tn({ api: "createImageMessage", param: "payload.file", desc: an() }), false; if (ie) { if (!(e2.file instanceof HTMLInputElement || $e(e2.file))) return st(e2.file) && "undefined" != typeof uni ? 0 !== e2.file.tempFilePaths.length && 0 !== e2.file.tempFiles.length || (tn({ api: "createImageMessage", param: "payload.file", desc: mn() }), false) : (tn({ api: "createImageMessage", param: "payload.file", desc: rn() }), false); if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length) return tn({ api: "createImageMessage", param: "payload.file", desc: mn() }), false; } return true; }, onProgress: { type: "Function", required: false, validator: function(e2) { return it(e2) && tn({ api: "createImageMessage", param: "onProgress", desc: dn() }), true; } } }) }, createAudioMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) { return !!st(e2) || (tn({ api: "createAudioMessage", param: "payload", desc: fn() }), false); } }), onProgress: { type: "Function", required: false, validator: function(e2) { return it(e2) && tn({ api: "createAudioMessage", param: "onProgress", desc: dn() }), true; } } }, createVideoMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) { if (!st(e2)) return tn({ api: "createVideoMessage", param: "payload", desc: fn() }), false; if (it(e2.file)) return tn({ api: "createVideoMessage", param: "payload.file", desc: an() }), false; if (ie) { if (!(e2.file instanceof HTMLInputElement || $e(e2.file))) return st(e2.file) && "undefined" != typeof uni ? !!$e(e2.file.tempFile) || (tn({ api: "createVideoMessage", param: "payload.file", desc: mn() }), false) : (tn({ api: "createVideoMessage", param: "payload.file", desc: rn() }), false); if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length) return tn({ api: "createVideoMessage", param: "payload.file", desc: mn() }), false; } return true; } }), onProgress: { type: "Function", required: false, validator: function(e2) { return it(e2) && tn({ api: "createVideoMessage", param: "onProgress", desc: dn() }), true; } } }, createFaceMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) { return st(e2) ? et(e2.index) ? !!nt(e2.data) || (tn({ api: "createFaceMessage", param: "payload.data", desc: nn() }), false) : (tn({ api: "createFaceMessage", param: "payload.index", desc: sn() }), false) : (tn({ api: "createFaceMessage", param: "payload", desc: fn() }), false); } }) }, createFileMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) { if (!st(e2)) return tn({ api: "createFileMessage", param: "payload", desc: fn() }), false; if (it(e2.file)) return tn({ api: "createFileMessage", param: "payload.file", desc: an() }), false; if (ie) { if (!(e2.file instanceof HTMLInputElement || $e(e2.file))) return st(e2.file) && "undefined" != typeof uni ? 0 !== e2.file.tempFilePaths.length && 0 !== e2.file.tempFiles.length || (tn({ api: "createFileMessage", param: "payload.file", desc: mn() }), false) : (tn({ api: "createFileMessage", param: "payload.file", desc: rn() }), false); if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length) return tn({ api: "createFileMessage", param: "payload.file", desc: mn() }), false; } return true; } }), onProgress: { type: "Function", required: false, validator: function(e2) { return it(e2) && tn({ api: "createFileMessage", param: "onProgress", desc: dn() }), true; } } }, createLocationMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) { return st(e2) ? nt(e2.description) ? et(e2.longitude) ? !!et(e2.latitude) || (tn({ api: "createLocationMessage", param: "payload.latitude", desc: sn() }), false) : (tn({ api: "createLocationMessage", param: "payload.longitude", desc: sn() }), false) : (tn({ api: "createLocationMessage", param: "payload.description", desc: nn() }), false) : (tn({ api: "createLocationMessage", param: "payload", desc: fn() }), false); } }) }, createMergerMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) { if (zt(e2.messageList)) return tn({ api: "createMergerMessage", param: "payload.messageList", desc: ln() }), false; if (zt(e2.compatibleText)) return tn({ api: "createMergerMessage", param: "payload.compatibleText", desc: on("compatibleText") }), false; var t2 = false; return e2.messageList.forEach(function(e3) { e3.status === Qt.FAIL && (t2 = true); }), !t2 || (tn({ api: "createMergerMessage", param: "payload.messageList", desc: Sn("MergeFailedMessageLog") }), false); } }) }, revokeMessage: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) { return zt(e2) ? (tn({ api: "revokeMessage", param: "message", desc: Mn() }), false) : e2.conversationType === E.CONV_SYSTEM ? (tn({ api: "revokeMessage", param: "message", desc: Sn("MessageCanBeRevokedDesc") }), false) : true !== e2.isRevoked || (tn({ api: "revokeMessage", param: "message", desc: Sn("MessageRevokedLog") }), false); } })], deleteMessage: [t(t({ name: "messageList" }, Tn), {}, { validator: function(e2) { return !zt(e2) || (tn({ api: "deleteMessage", param: "messageList", desc: ln() }), false); } })], translateText: { sourceTextList: Tn, sourceLanguage: Cn, targetLanguage: Cn }, modifyMessage: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) { return zt(e2) ? (tn({ api: "modifyMessage", param: "message", desc: Mn() }), false) : e2.conversationType === E.CONV_SYSTEM ? (tn({ api: "modifyMessage", param: "message", desc: Sn("MessageCanBeModifiedLog") }), false) : true !== e2._onlineOnlyFlag || (tn({ api: "modifyMessage", param: "message", desc: Sn("OnlineMessageNotSupportLog") }), false); } })], getUserProfile: { userIDList: { type: "Array", validator: function(e2) { return at(e2) ? (0 === e2.length && tn({ api: "getUserProfile", param: "userIDList", desc: ln() }), true) : (tn({ api: "getUserProfile", param: "userIDList", desc: cn() }), false); } } }, updateMyProfile: { profileCustomField: { type: "Array", validator: function(e2) { return !!it(e2) || (!!at(e2) || (tn({ api: "updateMyProfile", param: "profileCustomField", desc: cn() }), false)); } } }, setSelfStatus: { customStatus: { type: "String", validator: function(e2) { return !!nt(e2) || (tn({ api: "setSelfStatus", param: "customStatus", desc: nn() }), false); } } }, getUserStatus: { userIDList: { type: "Array", validator: function(e2) { return at(e2) ? 0 !== e2.length || (tn({ api: "getUserStatus", param: "userIDList", desc: ln() }), false) : (tn({ api: "getUserStatus", param: "userIDList", desc: cn() }), false); } } }, subscribeUserStatus: { userIDList: { type: "Array", validator: function(e2) { return at(e2) ? 0 !== e2.length || (tn({ api: "subscribeUserStatus", param: "userIDList", desc: ln() }), false) : (tn({ api: "subscribeUserStatus", param: "userIDList", desc: cn() }), false); } } }, unsubscribeUserStatus: { userIDList: { type: "Array", validator: function(e2) { return !e2 || (!!at(e2) || (tn({ api: "subscribeUserStatus", param: "userIDList", desc: cn() }), false)); } } }, addFriend: { to: Cn, source: { type: "String", required: true, validator: function(e2) { return !!e2 && (e2.startsWith("AddSource_Type_") ? !(e2.replace("AddSource_Type_", "").length > 8) || (tn({ api: "addFriend", param: "source", desc: gn("keyword", 8) }), false) : (tn({ api: "addFriend", param: "source", desc: Sn("SourcePrefixLog") }), false)); } }, remark: { type: "String", required: false, validator: function(e2) { return !(nt(e2) && e2.length > 96) || (tn({ api: "addFriend", param: "remark", desc: gn("remark", 96) }), false); } } }, deleteFriend: { userIDList: Tn }, checkFriend: { userIDList: Tn }, getFriendProfile: { userIDList: Tn }, updateFriend: { userID: Cn, remark: { type: "String", required: false, validator: function(e2) { return !(nt(e2) && e2.length > 96) || (tn({ api: "updateFriend", param: "remark", desc: gn("remark", 96) }), false); } }, friendCustomField: { type: "Array", required: false, validator: function(e2) { if (e2) { if (!at(e2)) return tn({ api: "updateFriend", param: "friendCustomField", desc: cn() }), false; var t2 = true; return e2.forEach(function(e3) { return nt(e3.key) && -1 !== e3.key.indexOf("Tag_SNS_Custom") ? nt(e3.value) ? e3.key.replace("Tag_SNS_Custom_", "").length > 8 ? (tn({ api: "updateFriend", param: "friendCustomField", desc: gn("keyword", 8) }), t2 = false) : void 0 : (tn({ api: "updateFriend", param: "friendCustomField", desc: _n("value") }), t2 = false) : (tn({ api: "updateFriend", param: "friendCustomField", desc: Sn("FriendCustomFieldPrefixLog") }), t2 = false); }), t2; } return true; } } }, acceptFriendApplication: { userID: Cn }, refuseFriendApplication: { userID: Cn }, deleteFriendApplication: { userID: Cn }, createFriendGroup: { name: Cn }, deleteFriendGroup: { name: Cn }, addToFriendGroup: { name: Cn, userIDList: Tn }, removeFromFriendGroup: { name: Cn, userIDList: Tn }, renameFriendGroup: { oldName: Cn, newName: Cn }, sendMessageReadReceipt: [{ name: "messageList", type: "Array", validator: function(e2) { return at(e2) ? 0 !== e2.length || (tn({ api: "sendMessageReadReceipt", param: "messageList", desc: ln() }), false) : (tn({ api: "sendMessageReadReceipt", param: "messageList", desc: cn() }), false); } }], getMessageReadReceiptList: [{ name: "messageList", type: "Array", validator: function(e2) { return at(e2) ? 0 !== e2.length || (tn({ api: "getMessageReadReceiptList", param: "messageList", desc: ln() }), false) : (tn({ api: "getMessageReadReceiptList", param: "messageList", desc: cn() }), false); } }], createTopicInCommunity: { groupID: Cn, topicName: Cn }, deleteTopicFromCommunity: { groupID: Cn, topicIDList: { type: "Array", validator: function(e2) { return !e2 || (!!at(e2) || (tn({ api: "deleteTopicFromCommunity", param: "topicIDList", desc: cn() }), false)); } } }, updateTopicProfile: { groupID: Cn, topicID: Cn }, getTopicList: { groupID: Cn, topicIDList: { type: "Array", validator: function(e2) { return !e2 || (!!at(e2) || (tn({ api: "getTopicList", param: "topicIDList", desc: cn() }), false)); } } } }, An = { login: 1, logout: 1, on: 1, once: 1, off: 1, setLogLevel: 1, registerPlugin: 1, destroy: 1, createTextMessage: 1, createTextAtMessage: 1, createImageMessage: 1, createAudioMessage: 1, createVideoMessage: 1, createCustomMessage: 1, createFaceMessage: 1, createFileMessage: 1, createLocationMessage: 1, createMergerMessage: 1, downloadMergerMessage: 1, createForwardMessage: 1, sendMessage: 1, resendMessage: 1, revokeMessage: 1, deleteMessage: 1, translateText: 1, modifyMessage: 1, sendMessageReadReceipt: 1, getGroupMessageReadMemberList: 1, getMessageReadReceiptList: 1, setMessageExtensions: 1, getMessageExtensions: 1, deleteMessageExtensions: 1, getMessageList: 1, findMessage: 1, getMessageListHopping: 1, setMessageRead: 1, setAllMessageRead: 1, getConversationList: 1, getConversationProfile: 1, deleteConversation: 1, pinConversation: 1, getTotalUnreadMessageCount: 1, setConversationCustomData: 1, markConversation: 1, createConversationGroup: 1, getConversationGroupList: 1, deleteConversationGroup: 1, renameConversationGroup: 1, addConversationsToGroup: 1, deleteConversationsFromGroup: 1, clearHistoryMessage: 1, getGroupList: 1, getGroupProfile: 1, createGroup: 1, joinGroup: 1, updateGroupProfile: 1, quitGroup: 1, dismissGroup: 1, changeGroupOwner: 1, searchGroupByID: 1, setMessageRemindType: 1, getGroupApplicationList: 1, handleGroupApplication: 1, initGroupAttributes: 1, setGroupAttributes: 1, deleteGroupAttributes: 1, getGroupAttributes: 1, setGroupCounters: 1, increaseGroupCounter: 1, decreaseGroupCounter: 1, getGroupCounters: 1, getJoinedCommunityList: 1, createTopicInCommunity: 1, deleteTopicFromCommunity: 1, updateTopicProfile: 1, getTopicList: 1, getGroupMemberProfile: 1, getGroupMemberList: 1, addGroupMember: 1, deleteGroupMember: 1, setGroupMemberNameCard: 1, setGroupMemberMuteTime: 1, setGroupMemberRole: 1, setGroupMemberCustomField: 1, getGroupOnlineMemberCount: 1, markGroupMemberList: 1, getMyProfile: 1, getUserProfile: 1, updateMyProfile: 1, setSelfStatus: 1, getUserStatus: 1, subscribeUserStatus: 1, unsubscribeUserStatus: 1, getBlacklist: 1, addToBlacklist: 1, removeFromBlacklist: 1, getFriendList: 1, addFriend: 1, deleteFriend: 1, checkFriend: 1, updateFriend: 1, getFriendProfile: 1, getFriendApplicationList: 1, refuseFriendApplication: 1, deleteFriendApplication: 1, acceptFriendApplication: 1, setFriendApplicationRead: 1, getFriendGroupList: 1, createFriendGroup: 1, renameFriendGroup: 1, deleteFriendGroup: 1, addToFriendGroup: 1, removeFromFriendGroup: 1, callExperimentalAPI: 1 }, Rn = 1, Nn = 2, On = 3, Gn = 4, Un = 6, Pn = 7, bn = 8, wn = 9, Fn = 10, qn = 11, xn = 12, Vn = 13, Bn = 14, Hn = 15, Kn = 16, Wn = 17, Yn = 18, jn = 19, zn = 20, Jn = 21, Xn = 22, Zn = 23, Qn = 24, $n = 25, eo = 26, to = 27, no = 28, oo = 29, so = 30, ao = 31, io = 32, ro = 37, uo = function() { function e2(t2) { o(this, e2), this._m = t2, this._n = ""; } return a(e2, [{ key: "isLoggedIn", value: function() { return this._m.getModule(xn).isLoggedIn(); } }, { key: "isOversea", value: function() { return this._m.getModule(xn).isOversea(); } }, { key: "isPrivateNetWork", value: function() { return this._m.getModule(xn).isPrivateNetWork(); } }, { key: "getFileDownloadProxy", value: function() { return this._m.getModule(xn).getFileDownloadProxy(); } }, { key: "getMyUserID", value: function() { return this._m.getModule(xn).getUserID(); } }, { key: "getMyTinyID", value: function() { return this._m.getModule(xn).getTinyID(); } }, { key: "getSDKAppID", value: function() { return this._m.getModule(xn).getSDKAppID(); } }, { key: "isIntl", value: function() { return this._m.getModule(xn).isIntl(); } }, { key: "isDevMode", value: function() { return this._m.getModule(xn).isDevMode(); } }, { key: "getModule", value: function(e3) { return this._m.getModule(e3); } }, { key: "getPlatform", value: function() { return ge; } }, { key: "getNetworkType", value: function() { return this._m.getModule(Hn).getNetworkType(); } }, { key: "probeNetwork", value: function(e3) { return this._m.getModule(Hn).probe(e3); } }, { key: "getCloudConfig", value: function(e3) { return this._m.getModule(Zn).getCloudConfig(e3); } }, { key: "emitOuterEvent", value: function(e3, t2) { this._m.getOuterEmitterInstance().emit(e3, t2); } }, { key: "emitInnerEvent", value: function(e3, t2) { this._m.getInnerEmitterInstance().emit(e3, t2); } }, { key: "getInnerEmitterInstance", value: function() { return this._m.getInnerEmitterInstance(); } }, { key: "generateTjgID", value: function(e3) { return this._m.getModule(xn).getTinyID() + "-" + e3.random; } }, { key: "filterModifiedMessage", value: function(e3) { if (!zt(e3)) { var t2 = e3.filter(function(e4) { return true === e4.isModified; }); t2.length > 0 && this.emitOuterEvent(k.MESSAGE_MODIFIED, t2); } } }, { key: "filterUnmodifiedMessage", value: function(e3) { return zt(e3) ? [] : e3.filter(function(e4) { return false === e4.isModified; }); } }, { key: "request", value: function(e3) { return this._m.getModule(zn).request(e3); } }, { key: "canIUse", value: function(e3) { return this._m.getModule(to).canIUse(e3); } }, { key: "getErrorMessage", value: function(e3, t2, n2) { return this._m.getErrorMessage(e3, t2, n2); } }, { key: "outputWarning", value: function(e3, t2, n2) { var o2 = this.getErrorMessage(e3, t2, n2); o2 && Ve.w(o2); } }]), e2; }(), co = "wslogin", lo = "wslogout", po = "wshello", go = "KickOther", ho = "getmsg", _o = "authkey", fo = "sendmsg", vo = "send_group_msg", mo = "portrait_get_all", Mo = "portrait_set", yo = "black_list_get", Io = "black_list_add", Co = "black_list_delete", To = "msgwithdraw", Do = "msgreaded", ko = "set_c2c_peer_mute_notifications", Eo = "get_c2c_peer_mute_notifications", So = "getroammsg", Lo = "get_peer_read_time", Ao = "delete_c2c_msg_ramble", Ro = "modify_c2c_msg", No = "set_key_values", Oo = "get_key_values", Go = "page_get", Uo = "get", Po = "batch_delete", bo = "clear_msg", wo = "top", Fo = "deletemsg", qo = "set_conv_custom_data", xo = "mark_contact", Vo = "create_contact_group", Bo = "del_contact_group", Ho = "update_contact_group", Ko = "add_conv_to_group", Wo = "del_conv_from_group", Yo = "get_contact_group", jo = "get_joined_group_list", zo = "get_group_self_member_info", Jo = "create_group", Xo = "destroy_group", Zo = "modify_group_base_info", Qo = "apply_join_group", $o = "apply_join_group_noauth", es = "quit_group", ts = "get_group_public_info", ns = "change_group_owner", os2 = "handle_apply_join_group", ss = "handle_invite_join_permission_group", as = "handle_invite_join_group", is = "group_msg_recall", rs = "msg_read_report", us = "read_all_unread_msg", cs = "group_msg_get", ls = "get_group_msg_receipt", ds = "group_msg_receipt", ps = "c2c_msg_read_receipt", gs = "get_group_msg_receipt_detail", hs = "get_pendency", _s = "deletemsg", fs = "get_msg", vs = "get_msg_noauth", ms = "get_online_member_num", Ms = "delete_group_ramble_msg_by_seq", ys = "modify_group_msg", Is = "set_group_attr", Cs = "modify_group_attr", Ts = "delete_group_attr", Ds = "clear_group_attr", ks = "get_group_attr", Es = "group_set_key_values", Ss = "group_get_key_values", Ls = "get_group_notify", As = "update_group_counter", Rs = "get_group_counter", Ns = "get_group_member_info", Os = "get_members", Gs = "get_specified_group_member_info", Us = "add_group_member", Ps = "delete_group_member", bs = "ban_group_member", ws = "modify_group_member_info", Fs = "modify_user_info", qs = "cos", xs = "pre_sig", Vs = "video_cover", Bs = "tim_web_report_v2", Hs = "alive", Ks = "msg_push", Ws = "multi_msg_push_ws", Ys = "ws_msg_push_ack", js = "stat_forceoffline", zs = "save_relay_json_msg", Js = "get_relay_json_msg", Xs = "fetch_config", Zs = "push_configv2", Qs = "fetch_imsdk_purchase_bitsv2", $s = "push_imsdk_purchase_bitsv2", ea = "notify2", ta = "create_topic", na = "destroy_topic", oa = "modify_topic", sa = "get_topic", aa = "ws_set_custom_status", ia = "ws_get_user_status", ra = "ws_status_subscribe", ua = "ws_status_unsubscribe", ca = "ws_stat_background", la = "ws_stat_foreground", da = "ws_stat_settoken", pa = "get_local_words", ga = "ws_batch_trans_text", ha = { NO_SDKAPPID: 2e3, NO_ACCOUNT_TYPE: 2001, NO_IDENTIFIER: 2002, NO_USERSIG: 2003, NO_TINYID: 2022, NO_A2KEY: 2023, USER_NOT_LOGGED_IN: 2024, REPEAT_LOGIN: 2025, COS_UNDETECTED: 2040, COS_GET_SIG_FAIL: 2041, MESSAGE_SEND_FAIL: 2100, MESSAGE_SEND_FAIL_NOT_IN_AVCHATROOM: 2101, MESSAGE_SEND_NEED_MESSAGE_INSTANCE: 2105, MESSAGE_SEND_INVALID_CONVERSATION_TYPE: 2106, MESSAGE_FILE_IS_EMPTY: 2108, MESSAGE_ONPROGRESS_FUNCTION_ERROR: 2109, MESSAGE_REVOKE_FAIL: 2110, MESSAGE_DELETE_FAIL: 2111, MESSAGE_UNREAD_ALL_FAIL: 2112, READ_RECEIPT_MESSAGE_LIST_EMPTY: 2114, MESSAGE_SEND_GROUP_WITH_TOPIC_FAIL: 2115, CANNOT_DELETE_GROUP_SYSTEM_NOTICE: 2116, TRANSLATE_TEXT_FAIL: 2117, MESSAGE_IMAGE_SELECT_FILE_FIRST: 2251, MESSAGE_IMAGE_TYPES_LIMIT: 2252, MESSAGE_IMAGE_SIZE_LIMIT: 2253, MESSAGE_AUDIO_UPLOAD_FAIL: 2300, MESSAGE_AUDIO_SIZE_LIMIT: 2301, MESSAGE_VIDEO_UPLOAD_FAIL: 2350, MESSAGE_VIDEO_SIZE_LIMIT: 2351, MESSAGE_VIDEO_TYPES_LIMIT: 2352, MESSAGE_FILE_UPLOAD_FAIL: 2400, MESSAGE_FILE_SELECT_FILE_FIRST: 2401, MESSAGE_FILE_SIZE_LIMIT: 2402, MESSAGE_FILE_URL_IS_EMPTY: 2403, MESSAGE_MERGER_TYPE_INVALID: 2450, MESSAGE_MERGER_KEY_INVALID: 2451, MESSAGE_MERGER_DOWNLOAD_FAIL: 2452, MESSAGE_FORWARD_TYPE_INVALID: 2453, MESSAGE_MODIFY_CONFLICT: 2480, MESSAGE_MODIFY_DISABLED_IN_AVCHATROOM: 2481, CONVERSATION_NOT_FOUND: 2500, USER_OR_GROUP_NOT_FOUND: 2501, CONVERSATION_UN_RECORDED_TYPE: 2502, INVALID_CONVERSATION_ID: 2503, ILLEGAL_GROUP_TYPE: 2600, CANNOT_JOIN_WORK: 2601, ILLEGAL_GROUP_ID: 2602, CANNOT_FIND_GROUP: 2603, CANNOT_CHANGE_OWNER_IN_AVCHATROOM: 2620, CANNOT_CHANGE_OWNER_TO_SELF: 2621, CANNOT_DISMISS_WORK: 2622, MEMBER_NOT_IN_GROUP: 2623, JOIN_GROUP_FAIL: 2660, CANNOT_ADD_MEMBER_IN_AVCHATROOM: 2661, CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN: 2662, NOT_OWNER: 2681, CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM: 2682, INVALID_MEMBER_ROLE: 2683, CANNOT_SET_SELF_MEMBER_ROLE: 2684, CANNOT_MUTE_SELF: 2685, BAN_DURATION_INVALID: 2686, NOT_MY_FRIEND: 2700, ALREADY_MY_FRIEND: 2701, FRIEND_GROUP_EXISTED: 2710, FRIEND_GROUP_NOT_EXIST: 2711, FRIEND_APPLICATION_NOT_EXIST: 2716, UPDATE_PROFILE_INVALID_PARAM: 2721, UPDATE_PROFILE_NO_KEY: 2722, CANNOT_ADD_SELF_TO_BLACKLIST: 2742, NETWORK_ERROR: 2800, NETWORK_TIMEOUT: 2801, NO_NETWORK: 2805, UNCAUGHT_ERROR: 2903, INVALID_OPERATION: 2905, INVALID_TRTC_CMD: 2995, OVER_FREQUENCY_LIMIT: 2996, CANNOT_FIND_PROTOCOL: 2997, CANNOT_FIND_MODULE: 2998, SDK_IS_NOT_READY: 2999, LOGGING_IN: 3e3, LOGIN_FAILED: 3001, KICKED_OUT_MULT_DEVICE: 3002, KICKED_OUT_MULT_ACCOUNT: 3003, KICKED_OUT_USERSIG_EXPIRED: 3004, LOGGED_OUT: 3005, KICKED_OUT_REST_API: 3006, ILLEGAL_TOPIC_ID: 3021, CANNOT_USE_COMMERCIAL_ABILITY: 3122, PROFANITY_FOUND: 3123, MESSAGE_A2KEY_EXPIRED: 20002, ACCOUNT_A2KEY_EXPIRED: 70001, HELLO_ANSWER_KICKED_OUT: 1002, OPEN_SERVICE_OVERLOAD_ERROR: 60022 }, _a = "networkRTT", fa = "messageE2EDelay", va = "sendMessageC2C", ma = "sendMessageGroup", Ma = "sendMessageGroupAV", ya = "sendMessageRichMedia", Ia = "cosUpload", Ca = "messageReceivedGroup", Ta = "messageReceivedGroupAVPush", Da = "messageReceivedGroupAVPull", ka = (i(Zt = {}, _a, 2), i(Zt, fa, 3), i(Zt, va, 4), i(Zt, ma, 5), i(Zt, Ma, 6), i(Zt, ya, 7), i(Zt, Ca, 8), i(Zt, Ta, 9), i(Zt, Da, 10), i(Zt, Ia, 11), Zt), Ea = { info: 4, warning: 5, error: 6 }, Sa = { wifi: 1, "2g": 2, "3g": 3, "4g": 4, "5g": 5, unknown: 6, none: 7, online: 8 }, La = { login: 4 }, Aa = function() { function e2(t2) { o(this, e2), this._n = "SSOLogData", this.eventType = La[t2] || 0, this.timestamp = 0, this.networkType = 8, this.code = 0, this.message = "", this.moreMessage = "", this.extension = t2, this.costTime = 0, this.duplicate = false, this.level = 4, this.uiPlatform = void 0, this._sentFlag = false, this._startts = Pe(); } return a(e2, [{ key: "updateTimeStamp", value: function() { this.timestamp = Pe(); } }, { key: "start", value: function(e3) { return this._startts = e3, this; } }, { key: "end", value: function() { var e3 = this, t2 = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; if (!this._sentFlag) { var n2 = Pe(); 0 === this.costTime && (this.costTime = n2 - this._startts), this.setMoreMessage("startts:".concat(this._startts, " endts:").concat(n2)), t2 ? (this._sentFlag = true, this._eventStatModule && this._eventStatModule.pushIn(this)) : setTimeout(function() { e3._sentFlag = true, e3._eventStatModule && e3._eventStatModule.pushIn(e3); }, 0); } } }, { key: "setError", value: function(e3, t2, n2) { if (!(e3 instanceof Error)) return Ve.w("".concat(this._n, ".setError value not instanceof Error, please check!")), this; if (this._sentFlag) return this; if (this.setNetworkType(n2), t2) e3.code && this.setCode(e3.code), e3.message && this.setMoreMessage(e3.message); else { var o2 = ha.NO_NETWORK; this.setCode(o2); } return this.setLevel("error"), this; } }, { key: "setCode", value: function(e3) { return it(e3) || this._sentFlag || ("ECONNABORTED" === e3 && (this.code = 103), et(e3) ? this.code = e3 : Ve.w("".concat(this._n, ".setCode value not a number, please check!"), e3, n(e3))), this; } }, { key: "setMessage", value: function(e3) { return it(e3) || this._sentFlag || (et(e3) && (this.message = e3.toString()), nt(e3) && (this.message = e3)), this; } }, { key: "setCostTime", value: function(e3) { return this.costTime = e3, this; } }, { key: "setLevel", value: function(e3) { return it(e3) || this._sentFlag || (this.level = Ea[e3]), this; } }, { key: "setMoreMessage", value: function(e3) { return zt(this.moreMessage) ? this.moreMessage = "".concat(e3) : this.moreMessage += " ".concat(e3), this; } }, { key: "setNetworkType", value: function(e3) { if (it(e3)) Ve.w("".concat(this._n, ".setNetworkType value is undefined, please check!")); else { var t2 = Sa[e3.toLowerCase()]; it(t2) || (this.networkType = t2); } return this; } }, { key: "getStartTs", value: function() { return this._startts; } }, { key: "setUIPlatform", value: function(e3) { this.uiPlatform = e3; } }], [{ key: "bindEventStatModule", value: function(t2) { e2.prototype._eventStatModule = t2; } }]), e2; }(), Ra = function() { function e2(t2) { o(this, e2), this.type = E.MSG_TEXT, this.content = { text: t2.text || "" }; } return a(e2, [{ key: "setText", value: function(e3) { this.content.text = e3; } }, { key: "sendable", value: function() { return 0 !== this.content.text.length; } }]), e2; }(), Na = function() { function e2(t2, n2) { o(this, e2), this._imageMemoryURL = "", this._fileDownloadProxy = n2, ae ? this.createImageDataASURLInWXMiniApp(t2.file) : this.createImageDataASURLInWeb(t2.file), this._initImageInfoModel(), this.type = E.MSG_IMAGE, this._percent = 0, this.content = { imageFormat: t2.imageFormat || Be.UNKNOWN, uuid: t2.uuid, imageInfoArray: [] }, this.initImageInfoArray(t2.imageInfoArray), this._autoFixUrl(); } return a(e2, [{ key: "_initImageInfoModel", value: function() { var e3 = this; this._ImageInfoModel = function(t2) { this.instanceID = _t(9999999), this.sizeType = t2.type || 0, this.type = 0, this.size = t2.size || 0, this.width = t2.width || 0, this.height = t2.height || 0, this.imageUrl = t2.url || "", this.url = Yt(t2.url || e3._imageMemoryURL, e3._fileDownloadProxy); }, this._ImageInfoModel.prototype = { setSizeType: function(e4) { this.sizeType = e4; }, setType: function(e4) { this.type = e4; }, setImageUrl: function(e4) { e4 && (this.imageUrl = e4); }, getImageUrl: function() { return this.imageUrl; } }; } }, { key: "initImageInfoArray", value: function(e3) { for (var t2 = 0, n2 = null, o2 = null; t2 <= 2; ) o2 = it(e3) || it(e3[t2]) ? { type: 0, size: 0, width: 0, height: 0, url: "" } : e3[t2], (n2 = new this._ImageInfoModel(o2)).setSizeType(t2 + 1), n2.setType(t2), this.addImageInfo(n2), t2++; this.updateAccessSideImageInfoArray(); } }, { key: "updateImageInfoArray", value: function(e3) { for (var t2, n2 = this.content.imageInfoArray.length, o2 = 0; o2 < n2; o2++) t2 = this.content.imageInfoArray[o2], e3[o2].size && (t2.size = e3[o2].size), e3[o2].url && t2.setImageUrl(e3[o2].url), e3[o2].width && (t2.width = e3[o2].width), e3[o2].height && (t2.height = e3[o2].height); } }, { key: "_autoFixUrl", value: function() { for (var e3 = this.content.imageInfoArray.length, t2 = "", n2 = "", o2 = ["http", "https"], s2 = null, a2 = 0; a2 < e3; a2++) this.content.imageInfoArray[a2].url && "" !== (s2 = this.content.imageInfoArray[a2]).imageUrl && (n2 = s2.imageUrl.slice(0, s2.imageUrl.indexOf("://") + 1), t2 = s2.imageUrl.slice(s2.imageUrl.indexOf("://") + 1), o2.indexOf(n2) < 0 && (n2 = "https:"), this.content.imageInfoArray[a2].setImageUrl([n2, t2].join(""))); } }, { key: "updatePercent", value: function(e3) { this._percent = e3, this._percent > 1 && (this._percent = 1); } }, { key: "updateImageFormat", value: function(e3) { this.content.imageFormat = Be[e3.toUpperCase()] || Be.UNKNOWN; } }, { key: "createImageDataASURLInWeb", value: function(e3) { void 0 !== e3 && e3.files.length > 0 && (this._imageMemoryURL = window.URL.createObjectURL(e3.files[0])); } }, { key: "createImageDataASURLInWXMiniApp", value: function(e3) { e3 && e3.url && (this._imageMemoryURL = e3.url); } }, { key: "replaceImageInfo", value: function(e3, t2) { this.content.imageInfoArray[t2] instanceof this._ImageInfoModel || (this.content.imageInfoArray[t2] = e3); } }, { key: "addImageInfo", value: function(e3) { this.content.imageInfoArray.length >= 3 || this.content.imageInfoArray.push(e3); } }, { key: "updateAccessSideImageInfoArray", value: function() { var e3 = this.content.imageInfoArray, t2 = e3[0], n2 = t2.width, o2 = void 0 === n2 ? 0 : n2, s2 = t2.height, a2 = void 0 === s2 ? 0 : s2; 0 !== o2 && 0 !== a2 && (Pt(e3), Object.assign(e3[2], Ut({ originWidth: o2, originHeight: a2, min: 720 }))); } }, { key: "sendable", value: function() { return 0 !== this.content.imageInfoArray.length && ("" !== this.content.imageInfoArray[0].imageUrl && 0 !== this.content.imageInfoArray[0].size); } }]), e2; }(), Oa = function() { function e2(t2) { o(this, e2), this.type = E.MSG_FACE, this.content = t2 || null; } return a(e2, [{ key: "sendable", value: function() { return null !== this.content; } }]), e2; }(), Ga = function() { function e2(t2, n2) { o(this, e2), this.type = E.MSG_AUDIO, this._percent = 0, this.content = { downloadFlag: 2, second: t2.second, size: t2.size, url: Yt(t2.url, n2), remoteAudioUrl: t2.url || "", uuid: t2.uuid }; } return a(e2, [{ key: "updatePercent", value: function(e3) { this._percent = e3, this._percent > 1 && (this._percent = 1); } }, { key: "updateAudioUrl", value: function(e3) { this.content.remoteAudioUrl = e3; } }, { key: "sendable", value: function() { return "" !== this.content.remoteAudioUrl; } }]), e2; }(), Ua = { from: true, groupID: true, groupName: true, to: true }, Pa = function() { function e2(t2) { o(this, e2), this.type = E.MSG_GRP_TIP, this.content = {}, this._initContent(t2); } return a(e2, [{ key: "_initContent", value: function(e3) { var t2 = this; Object.keys(e3).forEach(function(n2) { switch (n2) { case "remarkInfo": break; case "groupProfile": t2.content.groupProfile = {}, t2._initGroupProfile(e3[n2]); break; case "operatorInfo": break; case "memberInfoList": case "msgMemberInfo": t2._updateMemberList(e3[n2]); break; case "memberExtraInfo": case "onlineMemberInfo": break; case "memberNum": t2.content[n2] = e3[n2], t2.content.memberCount = e3[n2]; break; case "newGroupProfile": t2.content.newGroupProfile = {}, t2._initNewGroupProfile(e3[n2]); break; default: t2.content[n2] = e3[n2]; } }), this.content.userIDList || (this.content.userIDList = [this.content.operatorID]); } }, { key: "_initGroupProfile", value: function(e3) { for (var t2 = Object.keys(e3), n2 = 0; n2 < t2.length; n2++) { var o2 = t2[n2]; Ua[o2] && (this.content.groupProfile[o2] = e3[o2]); } } }, { key: "_updateMemberList", value: function(e3) { zt(this.content.memberList) ? this.content.memberList = e3 : this.content.memberList.forEach(function(t2) { e3.forEach(function(e4) { t2.userID === e4.userID && Object.assign(t2, e4); }); }); } }, { key: "_initNewGroupProfile", value: function(e3) { for (var t2 = Object.keys(e3), n2 = 0; n2 < t2.length; n2++) { var o2 = t2[n2]; "muteAllMembers" !== o2 ? this.content.newGroupProfile[o2] = e3[o2] : this.content.newGroupProfile[o2] = 1 === e3[o2]; } } }]), e2; }(), ba = { from: true, groupID: true, groupName: true, to: true }, wa = function() { function e2(t2) { o(this, e2), this.type = E.MSG_GRP_SYS_NOTICE, this.content = {}, this._initContent(t2); } return a(e2, [{ key: "_initContent", value: function(e3) { var t2 = this; Object.keys(e3).forEach(function(n2) { switch (n2) { case "memberInfoList": break; case "remarkInfo": t2.content.handleMessage = e3[n2]; break; case "groupProfile": t2.content.groupProfile = {}, t2._initGroupProfile(e3[n2]); break; default: t2.content[n2] = e3[n2]; } }); } }, { key: "_initGroupProfile", value: function(e3) { for (var t2 = Object.keys(e3), n2 = 0; n2 < t2.length; n2++) { var o2 = t2[n2]; ba[o2] && ("groupName" === o2 ? this.content.groupProfile.name = e3[o2] : this.content.groupProfile[o2] = e3[o2]); } } }]), e2; }(), Fa = function() { function e2(t2, n2) { o(this, e2), this.type = E.MSG_FILE, this._percent = 0; var s2 = this._getFileInfo(t2); this.content = { downloadFlag: 2, fileUrl: Yt(t2.url, n2) || "", uuid: t2.uuid, fileName: s2.name || "", fileSize: s2.size || 0 }; } return a(e2, [{ key: "_getFileInfo", value: function(e3) { if (!it(e3.fileName) && !it(e3.fileSize)) return { size: e3.fileSize, name: e3.fileName }; var t2 = e3.file.files[0]; if (oe) { if (t2.path && -1 !== t2.path.indexOf(".")) { var n2 = t2.path.slice(t2.path.lastIndexOf(".") + 1).toLowerCase(); t2.type = n2, t2.name || (t2.name = "".concat(_t(999999), ".").concat(n2)); } t2.name || (t2.type = "", t2.name = t2.path.slice(t2.path.lastIndexOf("/") + 1).toLowerCase()), t2.suffix && (t2.type = t2.suffix), t2.url || (t2.url = t2.path); } return { size: t2.size, name: t2.name }; } }, { key: "updatePercent", value: function(e3) { this._percent = e3, this._percent > 1 && (this._percent = 1); } }, { key: "updateFileUrl", value: function(e3) { this.content.fileUrl = e3; } }, { key: "sendable", value: function() { return "" !== this.content.fileUrl && ("" !== this.content.fileName && 0 !== this.content.fileSize); } }]), e2; }(), qa = function() { function e2(t2) { o(this, e2), this.type = E.MSG_CUSTOM, this.content = { data: t2.data || "", description: t2.description || "", extension: t2.extension || "" }; } return a(e2, [{ key: "setData", value: function(e3) { return this.content.data = e3, this; } }, { key: "setDescription", value: function(e3) { return this.content.description = e3, this; } }, { key: "setExtension", value: function(e3) { return this.content.extension = e3, this; } }, { key: "sendable", value: function() { return 0 !== this.content.data.length || 0 !== this.content.description.length || 0 !== this.content.extension.length; } }]), e2; }(), xa = function() { function e2(t2, n2) { o(this, e2), this.type = E.MSG_VIDEO, this._percent = 0, this.content = { remoteVideoUrl: t2.remoteVideoUrl || t2.videoUrl || "", videoFormat: t2.videoFormat, videoSecond: parseInt(t2.videoSecond, 10), videoSize: t2.videoSize, videoUrl: Yt(t2.videoUrl, n2), videoDownloadFlag: 2, videoUUID: t2.videoUUID, thumbUUID: t2.thumbUUID, thumbFormat: t2.thumbFormat, thumbWidth: t2.thumbWidth, snapshotWidth: t2.thumbWidth, thumbHeight: t2.thumbHeight, snapshotHeight: t2.thumbHeight, thumbSize: t2.thumbSize, snapshotSize: t2.thumbSize, thumbDownloadFlag: 2, thumbUrl: Yt(t2.thumbUrl, n2), snapshotUrl: Yt(t2.thumbUrl, n2) }; } return a(e2, [{ key: "updatePercent", value: function(e3) { this._percent = e3, this._percent > 1 && (this._percent = 1); } }, { key: "updateVideoUrl", value: function(e3) { e3 && (this.content.remoteVideoUrl = e3); } }, { key: "updateSnapshotInfo", value: function(e3) { var t2 = e3.snapshotUrl, n2 = e3.snapshotWidth, o2 = e3.snapshotHeight; zt(t2) || (this.content.thumbUrl = this.content.snapshotUrl = t2), zt(n2) || (this.content.thumbWidth = this.content.snapshotWidth = Number(n2)), zt(o2) || (this.content.thumbHeight = this.content.snapshotHeight = Number(o2)); } }, { key: "sendable", value: function() { return "" !== this.content.remoteVideoUrl; } }]), e2; }(), Va = function() { function e2(t2) { o(this, e2), this.type = E.MSG_LOCATION; var n2 = t2.description, s2 = t2.longitude, a2 = t2.latitude; this.content = { description: n2, longitude: s2, latitude: a2 }; } return a(e2, [{ key: "sendable", value: function() { return true; } }]), e2; }(), Ba = function() { function e2(t2, n2) { if (o(this, e2), this.from = t2.from, this.messageSender = t2.from, this.time = t2.time, this.messageSequence = t2.sequence, this.clientSequence = t2.clientSequence || t2.sequence, this.messageRandom = t2.random, this.cloudCustomData = t2.cloudCustomData || "", this.clientTime = t2.clientTime || void 0, t2.ID) this.ID = t2.ID || "", this.nick = t2.nick || "", this.avatar = t2.avatar || "", this.messageBody = [{ type: t2.type, payload: t2.payload }], t2.conversationType.startsWith(E.CONV_C2C) ? this.receiverUserID = t2.to : t2.conversationType.startsWith(E.CONV_GROUP) && (this.receiverGroupID = t2.to), this.messageReceiver = t2.to; else { this.nick = t2.nick || "", this.avatar = t2.avatar || "", this.messageBody = []; var s2 = t2.elements[0].type, a2 = t2.elements[0].content; this._patchRichMediaPayload(s2, a2), this._updateRichMediaDownloadUrl(s2, a2, n2), s2 === E.MSG_MERGER ? this.messageBody.push({ type: s2, payload: new Ha(a2).content }) : this.messageBody.push({ type: s2, payload: a2 }), t2.groupID && (this.receiverGroupID = t2.groupID, this.messageReceiver = t2.groupID), t2.to && (this.receiverUserID = t2.to, this.messageReceiver = t2.to), this.ID = "".concat(t2.tinyID, "-").concat(t2.clientTime, "-").concat(t2.random); } } return a(e2, [{ key: "_patchRichMediaPayload", value: function(e3, t2) { e3 === E.MSG_IMAGE ? t2.imageInfoArray.forEach(function(e4) { !e4.imageUrl && e4.url && (e4.imageUrl = e4.url, e4.sizeType = e4.type, 1 === e4.type ? e4.type = 0 : 3 === e4.type && (e4.type = 1)); }) : e3 === E.MSG_VIDEO ? !t2.remoteVideoUrl && t2.videoUrl && (t2.remoteVideoUrl = t2.videoUrl) : e3 === E.MSG_AUDIO ? !t2.remoteAudioUrl && t2.url && (t2.remoteAudioUrl = t2.url) : e3 === E.MSG_FILE && !t2.fileUrl && t2.url && (t2.fileUrl = t2.url, t2.url = void 0); } }, { key: "_updateRichMediaDownloadUrl", value: function(e3, t2, n2) { n2 && (e3 === E.MSG_IMAGE ? t2.imageInfoArray.forEach(function(e4) { e4.url = Yt(e4.url, n2); }) : e3 === E.MSG_VIDEO ? (t2.videoUrl = Yt(t2.videoUrl, n2), t2.snapshotUrl = Yt(t2.thumbUrl, n2), t2.snapshotHeight = t2.thumbHeight, t2.snapshotWidth = t2.thumbWidth) : e3 === E.MSG_AUDIO ? t2.url = Yt(t2.url, n2) : e3 === E.MSG_FILE && (t2.fileUrl = Yt(t2.fileUrl, n2))); } }]), e2; }(), Ha = function() { function e2(t2, n2) { if (o(this, e2), this.type = E.MSG_MERGER, this.content = { downloadKey: "", pbDownloadKey: "", messageList: [], title: "", abstractList: [], compatibleText: "", version: 0, layersOverLimit: false }, t2.downloadKey) { var s2 = t2.downloadKey, a2 = t2.pbDownloadKey, i2 = t2.title, r2 = t2.abstractList, u2 = t2.compatibleText, c2 = t2.version; this.content.downloadKey = s2, this.content.pbDownloadKey = a2, this.content.title = i2, this.content.abstractList = r2, this.content.compatibleText = u2, this.content.version = c2 || 0; } else if (zt(t2.messageList)) 1 === t2.layersOverLimit && (this.content.layersOverLimit = true); else { var l2 = t2.messageList, d2 = t2.title, p2 = t2.abstractList, g2 = t2.compatibleText, h2 = t2.version, _2 = []; l2.forEach(function(e3) { if (!zt(e3)) { var t3 = new Ba(e3, n2); _2.push(t3); } }), this.content.messageList = _2, this.content.title = d2, this.content.abstractList = p2, this.content.compatibleText = g2, this.content.version = h2 || 0; } } return a(e2, [{ key: "sendable", value: function() { return !zt(this.content.messageList) || !zt(this.content.downloadKey); } }]), e2; }(), Ka = { 1: E.MSG_PRIORITY_HIGH, 2: E.MSG_PRIORITY_NORMAL, 3: E.MSG_PRIORITY_LOW, 4: E.MSG_PRIORITY_LOWEST }, Wa = function() { function e2(t2) { o(this, e2), this.ID = "", this.conversationID = t2.conversationID || null, this.conversationType = t2.conversationType || E.CONV_C2C, this.conversationSubType = t2.conversationSubType, this.time = t2.time || Math.ceil(Date.now() / 1e3), this.sequence = t2.sequence || 0, this.clientSequence = t2.clientSequence || t2.sequence || 0, this.random = t2.random || 0 === t2.random ? t2.random : _t(), this.priority = this._computePriority(t2.priority), this.nick = t2.nick || "", this.avatar = t2.avatar || "", this.isPeerRead = false, this.nameCard = "", this._elements = [], this.isPlaceMessage = t2.isPlaceMessage || 0, this.isRevoked = 2 === t2.isPlaceMessage || 8 === t2.msgFlagBits, this.from = t2.from || null, this.to = t2.to || null, this.flow = "", this.isSystemMessage = t2.isSystemMessage || false, this.protocol = t2.protocol || "JSON", this.isResend = false, this.isRead = false, this.status = t2.status || Qt.SUCCESS, this._onlineOnlyFlag = false, this._groupAtInfoList = [], this._relayFlag = false, this.atUserList = [], this.cloudCustomData = t2.cloudCustomData || "", this.isDeleted = false, this.isModified = false, this._isExcludedFromUnreadCount = !(!t2.messageControlInfo || 1 !== t2.messageControlInfo.excludedFromUnreadCount), this._isExcludedFromLastMessage = !(!t2.messageControlInfo || 1 !== t2.messageControlInfo.excludedFromLastMessage), this.clientTime = t2.clientTime || we() || 0, this.senderTinyID = t2.senderTinyID || t2.tinyID || "", this.readReceiptInfo = t2.readReceiptInfo || { readCount: void 0, unreadCount: void 0, isPeerRead: void 0 }, this.needReadReceipt = true === t2.needReadReceipt || 1 === t2.needReadReceipt, this.version = t2.messageVersion || 0, this.isBroadcastMessage = t2.isBroadcastMessage || false, this._receiverList = t2.receiverList || void 0, this.isSupportExtension = true === t2.isSupportExtension || 1 === t2.isSupportExtension, this.revoker = t2.revokerInfo && t2.revokerInfo.revoker || null, this.reInitialize(t2.currentUser), this.extractGroupInfo(t2.groupProfile || null), this.handleGroupAtInfo(t2), this.initC2CReadReceiptInfo(t2.readReceiptSentByPeer); } return a(e2, [{ key: "elements", get: function() { return this._elements; } }, { key: "getElements", value: function() { return this._elements; } }, { key: "extractGroupInfo", value: function(e3) { if (null !== e3) { nt(e3.nick) && (this.nick = e3.nick), nt(e3.avatar) && (this.avatar = e3.avatar); var t2 = e3.messageFromAccountExtraInformation; st(t2) && nt(t2.nameCard) && (this.nameCard = t2.nameCard); } } }, { key: "handleGroupAtInfo", value: function(e3) { var t2 = this; e3.payload && e3.payload.atUserList && e3.payload.atUserList.forEach(function(e4) { e4 !== E.MSG_AT_ALL ? (t2._groupAtInfoList.push({ groupAtAllFlag: 0, groupAtUserID: e4 }), t2.atUserList.push(e4)) : (t2._groupAtInfoList.push({ groupAtAllFlag: 1 }), t2.atUserList.push(E.MSG_AT_ALL)); }), at(e3.groupAtInfo) && e3.groupAtInfo.forEach(function(e4) { 0 === e4.groupAtAllFlag ? t2.atUserList.push(e4.groupAtUserID) : 1 === e4.groupAtAllFlag && t2.atUserList.push(E.MSG_AT_ALL); }); } }, { key: "getGroupAtInfoList", value: function() { return this._groupAtInfoList; } }, { key: "_initProxy", value: function() { this._elements[0] && (this.payload = this._elements[0].content, this.type = this._elements[0].type); } }, { key: "reInitialize", value: function(e3) { e3 && (this.status = this.from ? Qt.SUCCESS : Qt.UNSEND, !this.from && (this.from = e3)), this._initFlow(e3), this._initSequence(e3), this._concatConversationID(e3), this.generateMessageID(); } }, { key: "isSendable", value: function() { return 0 !== this._elements.length && ("function" == typeof this._elements[0].sendable && this._elements[0].sendable()); } }, { key: "_initTo", value: function(e3) { this.conversationType === E.CONV_GROUP && (this.to = e3.groupID); } }, { key: "_initSequence", value: function(e3) { 0 === this.clientSequence && e3 && (this.clientSequence = function(e4) { if (!e4) return false; if (void 0 === Mt[e4]) { var t2 = /* @__PURE__ */ new Date(), n2 = "3".concat(t2.getHours()).slice(-2), o2 = "0".concat(t2.getMinutes()).slice(-2), s2 = "0".concat(t2.getSeconds()).slice(-2); Mt[e4] = parseInt([n2, o2, s2, "0001"].join("")), n2 = null, o2 = null, s2 = null, Ve.l("autoIncrementIndex start index:".concat(Mt[e4])); } return Mt[e4]++; }(e3)), 0 === this.sequence && this.conversationType === E.CONV_C2C && (this.sequence = this.clientSequence); } }, { key: "generateMessageID", value: function() { this.from === E.CONV_SYSTEM && (this.senderTinyID = "144115198244471703"), this.ID = "".concat(this.senderTinyID, "-").concat(this.clientTime, "-").concat(this.random); } }, { key: "_initFlow", value: function(e3) { "" !== e3 && (e3 === this.from ? (this.flow = "out", this.isRead = true) : this.flow = "in"); } }, { key: "_concatConversationID", value: function(e3) { var t2 = this.to, n2 = "", o2 = this.conversationType; o2 !== E.CONV_SYSTEM ? (n2 = o2 === E.CONV_C2C ? e3 === this.from ? t2 : this.from : this.to, this.conversationID = n2 ? "".concat(o2).concat(n2) : null) : this.conversationID = E.CONV_SYSTEM; } }, { key: "isElement", value: function(e3) { return e3 instanceof Ra || e3 instanceof Na || e3 instanceof Oa || e3 instanceof Ga || e3 instanceof Fa || e3 instanceof xa || e3 instanceof Pa || e3 instanceof wa || e3 instanceof qa || e3 instanceof Va || e3 instanceof Ha; } }, { key: "setElement", value: function(e3, t2) { var n2 = this; if (this.isElement(e3)) return this._elements = [e3], void this._initProxy(); var o2 = function(e4) { if (e4.type && e4.content) switch (e4.type) { case E.MSG_TEXT: n2.setTextElement(e4.content); break; case E.MSG_IMAGE: n2.setImageElement(e4.content, t2); break; case E.MSG_AUDIO: n2.setAudioElement(e4.content, t2); break; case E.MSG_FILE: n2.setFileElement(e4.content, t2); break; case E.MSG_VIDEO: n2.setVideoElement(e4.content, t2); break; case E.MSG_CUSTOM: n2.setCustomElement(e4.content); break; case E.MSG_LOCATION: n2.setLocationElement(e4.content); break; case E.MSG_GRP_TIP: n2.setGroupTipElement(e4.content); break; case E.MSG_GRP_SYS_NOTICE: n2.setGroupSystemNoticeElement(e4.content); break; case E.MSG_FACE: n2.setFaceElement(e4.content); break; case E.MSG_MERGER: n2.setMergerElement(e4.content, t2); } }; if (at(e3)) for (var s2 = 0; s2 < e3.length; s2++) o2(e3[s2]); else o2(e3); this._initProxy(); } }, { key: "clearElement", value: function() { this._elements.length = 0; } }, { key: "setTextElement", value: function(e3) { var t2 = "string" == typeof e3 ? e3 : e3.text, n2 = new Ra({ text: t2 }); this._elements.push(n2); } }, { key: "setImageElement", value: function(e3, t2) { var n2 = new Na(e3, t2); this._elements.push(n2); } }, { key: "setAudioElement", value: function(e3, t2) { var n2 = new Ga(e3, t2); this._elements.push(n2); } }, { key: "setFileElement", value: function(e3, t2) { var n2 = new Fa(e3, t2); this._elements.push(n2); } }, { key: "setVideoElement", value: function(e3, t2) { var n2 = new xa(e3, t2); this._elements.push(n2); } }, { key: "setLocationElement", value: function(e3) { var t2 = new Va(e3); this._elements.push(t2); } }, { key: "setCustomElement", value: function(e3) { var t2 = new qa(e3); this._elements.push(t2); } }, { key: "setGroupTipElement", value: function(e3) { var t2 = {}, n2 = e3.operationType; if (zt(e3.memberInfoList) ? e3.operatorInfo && (t2 = e3.operatorInfo) : n2 !== E.GRP_TIP_MBR_JOIN && n2 !== E.GRP_TIP_MBR_KICKED_OUT && n2 !== E.GRP_TIP_MBR_SET_ADMIN && n2 !== E.GRP_TIP_MBR_CANCELED_ADMIN || (t2 = e3.memberInfoList[0]), !zt(e3.memberExtraInfo)) { var o2 = e3.memberExtraInfo.reason; e3.msgMemberInfo.forEach(function(e4) { e4.reason = o2; }); } var s2 = t2, a2 = s2.nick, i2 = s2.avatar; nt(a2) && (this.nick = a2), nt(i2) && (this.avatar = i2); var r2 = new Pa(e3); this._elements.push(r2); } }, { key: "setGroupSystemNoticeElement", value: function(e3) { var t2 = new wa(e3); this._elements.push(t2); } }, { key: "setFaceElement", value: function(e3) { var t2 = new Oa(e3); this._elements.push(t2); } }, { key: "setMergerElement", value: function(e3, t2) { var n2 = new Ha(e3, t2); this._elements.push(n2); } }, { key: "setIsRead", value: function(e3) { this.isRead = e3; } }, { key: "setRelayFlag", value: function(e3) { this._relayFlag = e3; } }, { key: "getRelayFlag", value: function() { return this._relayFlag; } }, { key: "_computePriority", value: function(e3) { if (it(e3)) return E.MSG_PRIORITY_NORMAL; if (nt(e3) && -1 !== Object.values(Ka).indexOf(e3)) return e3; if (et(e3)) { var t2 = "" + e3; if (-1 !== Object.keys(Ka).indexOf(t2)) return Ka[t2]; } return E.MSG_PRIORITY_NORMAL; } }, { key: "setNickAndAvatar", value: function(e3) { var t2 = e3.nick, n2 = e3.avatar; nt(t2) && (this.nick = t2), nt(n2) && (this.avatar = n2); } }, { key: "setNameCard", value: function(e3) { nt(e3) && (this.nameCard = e3); } }, { key: "initC2CReadReceiptInfo", value: function(e3) { this.conversationType === E.CONV_C2C && true === this.needReadReceipt && (this.readReceiptInfo.isPeerRead = 1 === e3); } }]), e2; }(), Ya = function(e2) { return { code: 0, data: e2 || {} }; }, ja = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; o(this, n2), s2 = t2.call(this); var a2 = e3.code, i2 = e3.message, r2 = e3.data; return s2.code = a2, s2.message = i2 || s2._getErrorMessage(s2.code), s2.data = r2 || {}, s2; } return a(n2); }(p(Error)), za = null, Ja = function(e2) { za = e2; }, Xa = function(e2) { return Promise.resolve(Ya(e2)); }, Za = function(e2) { var t2 = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; if (e2 instanceof ja) return t2 && null !== za && za.emit(k.ERROR, e2), Promise.reject(e2); if (e2 instanceof Error) { var n2 = new ja({ code: ha.UNCAUGHT_ERROR }); return t2 && null !== za && za.emit(k.ERROR, n2), Promise.reject(n2); } if (!it(e2) && !it(e2.code)) { var o2 = new ja(e2); return t2 && null !== za && za.emit(k.ERROR, o2), Promise.reject(o2); } }, Qa = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; return o(this, s2), (t2 = n2.call(this, e3))._n = "C2CModule", t2._messageFromUnreadDBMap = /* @__PURE__ */ new Map(), t2._signalingFromUnreadDBList = [], t2; } return a(s2, [{ key: "onNewC2CMessage", value: function(e3) { var t2 = e3.dataList, n3 = e3.isInstantMessage, o2 = e3.C2CRemainingUnreadList, s3 = e3.C2CPairUnreadList; Ve.d("".concat(this._n, ".onNewC2CMessage count:").concat(t2.length, " isInstantMessage:").concat(n3)); var a2 = this._newC2CMessageStoredAndSummary({ dataList: t2, C2CRemainingUnreadList: o2, C2CPairUnreadList: s3, isInstantMessage: n3 }), i2 = a2.conversationOptionsList, r2 = a2.messageList, u2 = a2.isUnreadC2CMessage; (this.filterModifiedMessage(r2), i2.length > 0) && this.getModule(qn).onNewMessage({ conversationOptionsList: i2, isInstantMessage: n3, isUnreadC2CMessage: u2 }); var c2 = this.filterUnmodifiedMessage(r2); n3 && c2.length > 0 && this.emitOuterEvent(k.MESSAGE_RECEIVED, c2), r2.length = 0; } }, { key: "_newC2CMessageStoredAndSummary", value: function(e3) { for (var t2 = e3.dataList, n3 = e3.C2CRemainingUnreadList, o2 = e3.C2CPairUnreadList, s3 = e3.isInstantMessage, a2 = null, i2 = [], r2 = [], u2 = {}, c2 = this.getModule(Kn), l2 = this.getModule(eo), d2 = false, p2 = this.getModule(qn), g2 = this.getFileDownloadProxy(), h2 = 0, _2 = t2.length; h2 < _2; h2++) if (this._isSignaling(t2[h2])) this._signalingFromUnreadDBList.push(t2[h2].eventArray[0].c2CNotifyMsgArray[0]); else { var f2 = t2[h2]; f2.currentUser = this.getMyUserID(), f2.conversationType = E.CONV_C2C, f2.isSystemMessage = !!f2.isSystemMessage, (it(f2.nick) || it(f2.avatar)) && (d2 = true, Ve.d("".concat(this._n, "._newC2CMessageStoredAndSummary nick or avatar missing!"))), a2 = new Wa(f2), f2.elements = c2.parseElements(f2.elements, f2.from), a2.setElement(f2.elements, g2), a2.setNickAndAvatar({ nick: f2.nick, avatar: f2.avatar }); var v2 = a2.conversationID; if (s3) { if (1 === this._messageFromUnreadDBMap.get(a2.ID)) continue; var m2 = false; if (a2.from !== this.getMyUserID()) { var M2 = p2.getLatestMessageSentByPeer(v2); if (M2) { var y2 = M2.nick, I2 = M2.avatar; d2 ? a2.setNickAndAvatar({ nick: y2, avatar: I2 }) : y2 === a2.nick && I2 === a2.avatar || (m2 = true); } } else { var C2 = p2.getLatestMessageSentByMe(v2); if (C2) { var T2 = C2.nick, D2 = C2.avatar; T2 === a2.nick && D2 === a2.avatar || p2.modifyMessageSentByMe({ conversationID: v2, latestNick: a2.nick, latestAvatar: a2.avatar }); } } var k2 = 1 === t2[h2].isModified; if (p2.isMessageSentByCurrentInstance(a2) ? a2.isModified = k2 : k2 = false, 0 === f2.msgLifeTime) a2._onlineOnlyFlag = true, p2.isMessageSentByCurrentInstance(a2) || r2.push(a2); else { if (!p2.pushIntoMessageList(r2, a2, k2)) continue; m2 && (p2.modifyMessageSentByPeer({ conversationID: v2, latestNick: a2.nick, latestAvatar: a2.avatar }), p2.updateUserProfileSpecifiedKey({ conversationID: v2, nick: a2.nick, avatar: a2.avatar })); } s3 && a2.clientTime > 0 && l2.addMessageDelay(a2.clientTime); } else this._messageFromUnreadDBMap.set(a2.ID, 1); if (0 !== f2.msgLifeTime) { if (false === a2._onlineOnlyFlag) { var S2 = p2.getLastMessageTime(v2); if (et(S2) && a2.time < S2) continue; if (it(u2[v2])) { var L2 = 0; "in" === a2.flow && (a2._isExcludedFromUnreadCount || (L2 = 1)), u2[v2] = i2.push({ conversationID: v2, unreadCount: L2, type: a2.conversationType, subType: a2.conversationSubType, lastMessage: a2._isExcludedFromLastMessage ? "" : a2 }) - 1; } else { var A2 = u2[v2]; i2[A2].type = a2.conversationType, i2[A2].subType = a2.conversationSubType, i2[A2].lastMessage = a2._isExcludedFromLastMessage ? "" : a2, "in" === a2.flow && (a2._isExcludedFromUnreadCount || i2[A2].unreadCount++); } } } else a2._onlineOnlyFlag = true; } this._handleSignalingFromUnreadDB(); var R2 = false; if (at(o2)) for (var N2 = function(e4, t3) { if (o2[e4].unreadCount > 0) { R2 = true; var n4 = i2.find(function(t4) { return t4.conversationID === "C2C".concat(o2[e4].from); }); n4 ? n4.unreadCount = o2[e4].unreadCount : i2.push({ conversationID: "C2C".concat(o2[e4].from), unreadCount: o2[e4].unreadCount, type: E.CONV_C2C }); } }, O2 = 0, G2 = o2.length; O2 < G2; O2++) N2(O2); if (at(n3)) for (var U2 = function(e4, t3) { i2.find(function(t4) { return t4.conversationID === "C2C".concat(n3[e4].from); }) || i2.push({ conversationID: "C2C".concat(n3[e4].from), type: E.CONV_C2C, lastMsgTime: n3[e4].lastMsgTime }); }, P2 = 0, b2 = n3.length; P2 < b2; P2++) U2(P2); return { conversationOptionsList: i2, messageList: r2, isUnreadC2CMessage: R2 }; } }, { key: "_isSignaling", value: function(e3) { var t2 = e3.eventArray; return !(!at(t2) || 10 !== t2[0].event); } }, { key: "_handleSignalingFromUnreadDB", value: function() { var e3 = this._signalingFromUnreadDBList.length; if (Ve.l("".concat(this._n, "._handleSignalingFromUnreadDB signalingCount:").concat(e3)), 0 !== e3) { var t2 = []; this._signalingFromUnreadDBList.forEach(function(e4) { e4.hasOwnProperty("c2cMessageRevokedNotify") && t2.push(e4); }), this.onC2CMessageRevoked({ dataList: t2 }), this._signalingFromUnreadDBList.length = 0, t2.length = 0; } } }, { key: "onC2CMessageRevoked", value: function(e3) { var t2 = this, n3 = this.getModule(qn), o2 = [], s3 = null, a2 = true; e3.dataList.forEach(function(e4) { if (e4.c2cMessageRevokedNotify) { var i2 = e4.c2cMessageRevokedNotify.revokedInfos; it(i2) || i2.forEach(function(e5) { var i3 = t2.getMyUserID() === e5.from ? "".concat(E.CONV_C2C).concat(e5.to) : "".concat(E.CONV_C2C).concat(e5.from); s3 = n3.revoke(i3, e5.sequence, e5.random); var r2 = e5.revokerInfo && e5.revokerInfo.revoker; if (s3) s3.revoker || (s3.revoker = r2, o2.push(s3)); else { var u2 = { conversationID: i3, sequence: e5.sequence, time: e5.time, revoker: r2 }; n3.isLastMessageRevoked(u2) && (o2.push(u2), a2 = false); } }); } }), 0 !== o2.length && (n3.onMessageRevoked(o2), true === a2 && (Ve.l("".concat(this._n, ".onC2CMessageRevoked count:").concat(o2.length)), this.emitOuterEvent(k.MESSAGE_REVOKED, o2))); } }, { key: "onC2CMessageReadReceipt", value: function(e3) { var t2 = this; e3.dataList.forEach(function(e4) { if (!zt(e4.c2cMessageReadReceipt)) { var n3 = e4.c2cMessageReadReceipt.to; e4.c2cMessageReadReceipt.uinPairReadArray.forEach(function(e5) { var o2 = e5.peerReadTime; Ve.d("".concat(t2._n, "._onC2CMessageReadReceipt to:").concat(n3, " peerReadTime:").concat(o2)); var s3 = "".concat(E.CONV_C2C).concat(n3), a2 = t2.getModule(qn); a2.recordPeerReadTime(s3, o2), a2.updateMessageIsPeerReadProperty(s3, o2); }); } }); } }, { key: "onC2CMessageReadNotice", value: function(e3) { var t2 = this; e3.dataList.forEach(function(e4) { if (!zt(e4.c2cMessageReadNotice)) { var n3 = t2.getModule(qn); e4.c2cMessageReadNotice.uinPairReadArray.forEach(function(e5) { var o2 = e5.from, s3 = e5.peerReadTime; Ve.d("".concat(t2._n, ".onC2CMessageReadNotice from:").concat(o2, " lastReadTime:").concat(s3)); var a2 = "".concat(E.CONV_C2C).concat(o2); n3.updateIsReadAfterReadReport({ conversationID: a2, lastMessageTime: s3 }), n3.updateUnreadCount(a2); }); } }); } }, { key: "onC2CMessageModified", value: function(e3) { Ve.d("".concat(this._n, ".onC2CMessageModified options:"), JSON.stringify(e3)); var n3 = this.getModule(qn); e3.dataList.forEach(function(e4) { n3.onMessageModified(t(t({}, e4), {}, { conversationType: E.CONV_C2C })); }); } }, { key: "onReadReceiptList", value: function(e3) { Ve.d("".concat(this._n, ".onReadReceiptList options:"), JSON.stringify(e3)); var t2 = e3.dataList, n3 = t2.userID, o2 = t2.readReceiptList; this.getModule(qn).updateReadReceiptInfo({ userID: n3, readReceiptList: o2 }); } }, { key: "sendMessage", value: function(e3, t2) { var n3 = this._createC2CMessagePack(e3, t2); return this.request(n3); } }, { key: "_createC2CMessagePack", value: function(e3, t2) { var n3 = null; t2 && (t2.offlinePushInfo && (n3 = t2.offlinePushInfo), true === t2.onlineUserOnly && (n3 ? n3.disablePush = true : n3 = { disablePush: true })); var o2 = ""; nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (o2 = e3.cloudCustomData); var s3 = []; if (st(t2) && st(t2.messageControlInfo)) { var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration; true === i2 && s3.push("NoUnread"), true === r2 && s3.push("NoLastMsg"), true === u2 && s3.push("NoMsgCheck"); } var c2 = this.isOnlineMessage(e3, t2) ? 0 : void 0; return { protocolName: fo, tjgID: this.generateTjgID(e3), requestData: { fromAccount: this.getMyUserID(), toAccount: e3.to, msgBody: e3.getElements(), cloudCustomData: o2, msgSeq: e3.sequence, msgRandom: e3.random, msgLifeTime: c2, nick: e3.nick, avatar: e3.avatar, offlinePushInfo: n3 ? { pushFlag: true === n3.disablePush ? 1 : 0, title: n3.title || "", desc: n3.description || "", ext: n3.extension || "", apnsInfo: { badgeMode: true === n3.ignoreIOSBadge ? 1 : 0, isVoipPush: this._isVoipPush(n3) }, androidInfo: { OPPOChannelID: n3.androidOPPOChannelID || "" } } : void 0, messageControlInfo: 0 !== c2 ? s3 : void 0, clientTime: e3.clientTime, needReadReceipt: true === e3.needReadReceipt ? 1 : 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0 } }; } }, { key: "_isVoipPush", value: function(e3) { var t2 = void 0; return it(e3.disableVoipPush) || (t2 = false === e3.disableVoipPush ? 1 : 0), t2; } }, { key: "isOnlineMessage", value: function(e3, t2) { return !(!t2 || true !== t2.onlineUserOnly); } }, { key: "revokeMessage", value: function(e3) { return this.request({ protocolName: To, requestData: { msgInfo: { fromAccount: e3.from, toAccount: e3.to, msgSeq: e3.sequence, msgRandom: e3.random, msgTimeStamp: e3.time } } }); } }, { key: "deleteMessage", value: function(e3) { var t2 = e3.to, n3 = e3.keyList; return Ve.l("".concat(this._n, ".deleteMessage toAccount:").concat(t2, " count:").concat(n3.length)), this.request({ protocolName: Ao, requestData: { fromAccount: this.getMyUserID(), to: t2, keyList: n3 } }); } }, { key: "modifyRemoteMessage", value: function(e3) { var t2 = e3.from, n3 = e3.to, o2 = e3.version, s3 = void 0 === o2 ? 0 : o2, a2 = e3.sequence, i2 = e3.random, r2 = e3.time, u2 = e3.payload, c2 = e3.type, l2 = e3.cloudCustomData, d2 = void 0; return Bt(c2) && (d2 = []).push({ type: c2, content: u2 }), this.request({ protocolName: Ro, requestData: { from: t2, to: n3, version: s3, sequence: a2, random: i2, time: r2, elements: d2, cloudCustomData: l2 } }); } }, { key: "setMessageRead", value: function(e3) { var t2 = this, n3 = e3.conversationID, o2 = e3.lastMessageTime, s3 = "".concat(this._n, ".setMessageRead"); Ve.l("".concat(s3, " conversationID:").concat(n3, " lastMessageTime:").concat(o2)), et(o2) || this.outputWarning("DoNotModifyLastTime"); var a2 = new Aa("setC2CMessageRead"); return a2.setMessage("conversationID:".concat(n3, " lastMessageTime:").concat(o2)), this.request({ protocolName: Do, requestData: { C2CMsgReaded: { cookie: "", C2CMsgReadedItem: [{ toAccount: n3.replace("C2C", ""), lastMessageTime: o2, receipt: 1 }] } } }).then(function() { a2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(s3, " ok")); var e4 = t2.getModule(qn); return e4.updateIsReadAfterReadReport({ conversationID: n3, lastMessageTime: o2 }), e4.updateUnreadCount(n3), Ya(); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; a2.setError(e4, o3, s4).end(); }), Ve.l("".concat(s3, " failed. error:"), e4), Za(e4); }); } }, { key: "getRoamingMessage", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".getRoamingMessage"), o2 = e3.peerAccount, s3 = e3.conversationID, a2 = e3.count, i2 = e3.lastMessageTime, r2 = e3.messageKey, u2 = "peerAccount:".concat(o2, " count:").concat(a2 || 15, " lastMessageTime:").concat(i2 || 0, " messageKey:").concat(r2); Ve.l("".concat(n3, " ").concat(u2)); var c2 = new Aa("getC2CRoamingMessages"); return this.request({ protocolName: So, requestData: { peerAccount: o2, count: a2 || 15, lastMessageTime: i2 || 0, messageKey: r2 } }).then(function(e4) { var o3 = e4.data, a3 = o3.complete, i3 = o3.messageList, r3 = o3.messageKey, l2 = o3.lastMessageTime; it(i3) ? Ve.l("".concat(n3, " ok. complete:").concat(a3, " but messageList is undefined!")) : Ve.l("".concat(n3, " ok. complete:").concat(a3, " count:").concat(i3.length)), c2.setNetworkType(t2.getNetworkType()).setMessage("".concat(u2, " complete:").concat(a3, " length:").concat(i3.length)).end(); var d2 = t2.getModule(qn); 1 === a3 && d2.setCompleted(s3); var p2 = d2.onRoamingMessage(i3, s3); d2.modifyMessageList(s3), d2.updateIsRead(s3), d2.updateRoamingMessageKeyAndTime(s3, r3, l2); var g2 = d2.getPeerReadTime(s3); if (Ve.l("".concat(n3, " update isPeerRead property. conversationID:").concat(s3, " peerReadTime:").concat(g2)), g2) d2.updateMessageIsPeerReadProperty(s3, g2); else { var h2 = s3.replace(E.CONV_C2C, ""); t2.getRemotePeerReadTime([h2]).then(function() { d2.updateMessageIsPeerReadProperty(s3, d2.getPeerReadTime(s3)); }); } var _2 = ""; if (p2.length > 0) _2 = p2[0].ID; else { var f2 = d2.getLocalOldestMessage(s3); f2 && (_2 = f2.ID); } return Ve.l("".concat(n3, " nextReqID:").concat(_2, " stored message count:").concat(p2.length)), { nextReqID: _2, storedMessageList: p2 }; }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; c2.setMessage(u2).setError(e4, o3, s4).end(); }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "getRoamingMessagesHopping", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".getRoamingMessagesHopping"), o2 = e3.peerAccount, s3 = e3.time, a2 = void 0 === s3 ? 0 : s3, i2 = e3.count, r2 = e3.direction, u2 = "".concat(E.CONV_C2C).concat(o2), c2 = "peerAccount:".concat(o2, " count:").concat(i2, " time:").concat(a2, " direction:").concat(r2); Ve.l("".concat(n3, " ").concat(c2)); var l2 = new Aa("getC2CRoamingMessagesHopping"); return this.request({ protocolName: So, requestData: { peerAccount: o2, count: i2 + 1, lastMessageTime: a2, direction: r2 } }).then(function(e4) { var o3 = e4.data, s4 = o3.complete, a3 = o3.messageList, i3 = void 0 === a3 ? [] : a3, d2 = o3.lastMessageTime; Ve.l("".concat(n3, " ok. complete:").concat(s4, " count:").concat(i3.length)), l2.setNetworkType(t2.getNetworkType()).setMessage("".concat(c2, " complete:").concat(s4, " length:").concat(i3.length)).end(), 1 !== s4 && (1 === r2 ? i3.pop() : i3.shift()); var p2 = t2.getModule(qn).onRoamingMessage(i3, u2, false); t2._modifyMessageList(u2, p2); var g2 = t2._computeResult({ complete: s4, lastMessageTime: d2, resultList: p2 }); return Ya(g2); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; l2.setMessage(c2).setError(e4, o3, s4).end(); }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "_computeResult", value: function(e3) { var t2 = e3.complete, n3 = void 0 === t2 ? 0 : t2, o2 = e3.lastMessageTime, s3 = e3.resultList, a2 = { messageList: m(void 0 === s3 ? [] : s3), isCompleted: false, nextMessageTime: "" }; return 1 === n3 ? (a2.isCompleted = true, a2) : (a2.nextMessageTime = o2, a2); } }, { key: "_modifyMessageList", value: function(e3, t2) { var n3 = this.getModule(qn).getLocalConversation(e3); if (n3) for (var o2 = n3.userProfile.nick, s3 = n3.userProfile.avatar, a2 = this.getModule(Gn).getNickAndAvatarByUserID(this.getMyUserID()), i2 = a2.nick, r2 = a2.avatar, u2 = t2.length - 1; u2 >= 0; u2--) { var c2 = t2[u2]; "in" === c2.flow && (c2.nick !== o2 && c2.setNickAndAvatar({ nick: o2 }), c2.avatar !== s3 && c2.setNickAndAvatar({ avatar: s3 })), "out" === c2.flow && (c2.nick !== i2 && c2.setNickAndAvatar({ nick: i2 }), c2.avatar !== r2 && c2.setNickAndAvatar({ avatar: r2 })); } } }, { key: "getRemotePeerReadTime", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".getRemotePeerReadTime"); if (zt(e3)) return Ve.w("".concat(n3, " userIDList is empty!")), Promise.resolve(); var o2 = new Aa("getPeerReadTime"); return Ve.l("".concat(n3, " userIDList:").concat(e3)), this.request({ protocolName: Lo, requestData: { userIDList: e3 } }).then(function(s3) { var a2 = s3.data.peerReadTimeList; Ve.l("".concat(n3, " ok. peerReadTimeList:").concat(a2)); for (var i2 = "", r2 = t2.getModule(qn), u2 = 0; u2 < e3.length; u2++) i2 += "".concat(e3[u2], "-").concat(a2[u2], " "), a2[u2] > 0 && r2.recordPeerReadTime("C2C".concat(e3[u2]), a2[u2]); o2.setNetworkType(t2.getNetworkType()).setMessage(i2).end(); }).catch(function(e4) { t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), s3 = n4[0], a2 = n4[1]; o2.setError(e4, s3, a2).end(); }), Ve.w("".concat(n3, " failed. error:"), e4); }); } }, { key: "sendReadReceipt", value: function(e3) { var t2 = this, n3 = e3[0].conversationID.replace(E.CONV_C2C, ""), o2 = new Aa("sendC2CReadReceipt"); o2.setMessage("peerAccount:".concat(n3)); var s3 = this.getMyUserID(), a2 = e3.filter(function(e4) { return e4.from !== s3 && true === e4.needReadReceipt; }).map(function(e4) { return { fromAccount: e4.from, toAccount: e4.to, sequence: e4.sequence, random: e4.random, time: e4.time, clientTime: e4.clientTime }; }); if (0 === a2.length) return Za({ code: ha.READ_RECEIPT_MESSAGE_LIST_EMPTY }); var i2 = "".concat(this._n, ".sendReadReceipt"); return Ve.l("".concat(i2, ". peerAccount:").concat(n3, " messageInfoList length:").concat(a2.length)), this.request({ protocolName: ps, requestData: { peerAccount: n3, messageInfoList: a2 } }).then(function(e4) { return o2.end(), Ve.l("".concat(i2, " ok")), Ya(); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), s4 = n4[0], a3 = n4[1]; o2.setError(e4, s4, a3).end(); }), Ve.w("".concat(i2, " failed. error:"), e4), Za(e4); }); } }, { key: "getReadReceiptList", value: function(e3) { var t2 = "".concat(this._n, ".getReadReceiptList"), n3 = this.getMyUserID(), o2 = e3.filter(function(e4) { return e4.from === n3 && true === e4.needReadReceipt; }); return Ve.l("".concat(t2, " userID:").concat(n3, " messageList length:").concat(o2.length)), Xa({ messageList: o2 }); } }, { key: "getMessageExtensions", value: function(e3, t2) { return Ve.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2)), this.request({ protocolName: Oo, requestData: { from: e3.from, to: e3.to, messageKey: this._getMessageKey(e3), startSequence: t2 } }); } }, { key: "modifyMessageExtensions", value: function(e3, t2) { var n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1; return Ve.l("".concat(this._n, ".modifyMessageExtensions operateType:").concat(n3)), this.request({ protocolName: No, requestData: { from: e3.from, to: e3.to, messageKey: this._getMessageKey(e3), extensionList: t2, operateType: n3 } }); } }, { key: "_getMessageKey", value: function(e3) { var t2 = e3.clientSequence, n3 = e3.random, o2 = e3.time; return "".concat(t2, "_").concat(n3, "_").concat(o2); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._messageFromUnreadDBMap.clear(), this._signalingFromUnreadDBList.length = 0; } }]), s2; }(uo), $a = function() { function e2() { o(this, e2), this.list = /* @__PURE__ */ new Map(), this._n = "MessageListHandler", this._latestMessageSentByPeerMap = /* @__PURE__ */ new Map(), this._latestMessageSentByMeMap = /* @__PURE__ */ new Map(); } return a(e2, [{ key: "getLocalOldestMessageByConversationID", value: function(e3) { if (!e3) return null; if (!this.list.has(e3)) return null; var t2 = this.list.get(e3).values(); return t2 ? t2.next().value : null; } }, { key: "pushIn", value: function(e3) { var t2 = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], n2 = e3.conversationID, o2 = true; this.list.has(n2) || this.list.set(n2, /* @__PURE__ */ new Map()); var s2 = this._getUniqueIDOfMessage(e3), a2 = this.list.get(n2).has(s2); if (a2) { var i2 = this.list.get(n2).get(s2); if (!t2 || true === i2.isModified) return o2 = false; } return this.list.get(n2).set(s2, e3), this._setLatestMessageSentByPeer(n2, e3), this._setLatestMessageSentByMe(n2, e3), o2; } }, { key: "unshift", value: function(e3, t2) { var n2; if (at(e3) ? e3.length > 0 && (n2 = e3[0].conversationID, this._unshiftMultipleMessages(e3, t2)) : (n2 = e3.conversationID, this._unshiftSingleMessage(e3, t2)), n2 && n2.startsWith(E.CONV_C2C)) { var o2 = Array.from(this.list.get(n2).values()), s2 = o2.length; if (0 === s2) return; for (var a2 = s2 - 1; a2 >= 0; a2--) if ("out" === o2[a2].flow) { this._setLatestMessageSentByMe(n2, o2[a2]); break; } for (var i2 = s2 - 1; i2 >= 0; i2--) if ("in" === o2[i2].flow) { this._setLatestMessageSentByPeer(n2, o2[i2]); break; } } } }, { key: "_unshiftSingleMessage", value: function(e3, t2) { var n2 = e3.conversationID, o2 = this._getUniqueIDOfMessage(e3); if (!this.list.has(n2)) return this.list.set(n2, /* @__PURE__ */ new Map()), this.list.get(n2).set(o2, e3), void t2.push(e3); var s2 = this.list.get(n2), a2 = Array.from(s2); s2.has(o2) || (a2.unshift([o2, e3]), this.list.set(n2, new Map(a2)), t2.push(e3)); } }, { key: "_unshiftMultipleMessages", value: function(e3, t2) { for (var n2 = e3.length, o2 = [], s2 = e3[0].conversationID, a2 = this.list.get(s2), i2 = this.list.has(s2) ? Array.from(a2) : [], r2 = 0; r2 < n2; r2++) { var u2 = this._getUniqueIDOfMessage(e3[r2]); a2 && a2.has(u2) || (o2.push([u2, e3[r2]]), t2.push(e3[r2])); } this.list.set(s2, new Map(o2.concat(i2))); } }, { key: "remove", value: function(e3) { var t2 = e3.conversationID, n2 = this._getUniqueIDOfMessage(e3); this.list.has(t2) && this.list.get(t2).delete(n2); } }, { key: "revoke", value: function(e3, t2, n2) { if (Ve.d("revoke message", e3, t2, n2), this.list.has(e3)) { var o2, s2 = D(this.list.get(e3)); try { for (s2.s(); !(o2 = s2.n()).done; ) { var a2 = v(o2.value, 2)[1]; if (a2.sequence === t2 && (it(n2) || a2.random === n2)) return a2.isRevoked || (a2.isRevoked = true), a2; } } catch (i2) { s2.e(i2); } finally { s2.f(); } } return null; } }, { key: "removeByConversationID", value: function(e3) { this.list.has(e3) && (this.list.delete(e3), this._latestMessageSentByPeerMap.delete(e3), this._latestMessageSentByMeMap.delete(e3)); } }, { key: "findMessage", value: function(e3) { var t2, n2 = null, o2 = D(this.list); try { for (o2.s(); !(t2 = o2.n()).done; ) for (var s2 = m(v(t2.value, 2)[1].values()), a2 = s2.length, i2 = 0; i2 < a2; i2++) if (s2[i2].ID === e3) { n2 = s2[i2]; break; } } catch (r2) { o2.e(r2); } finally { o2.f(); } return n2; } }, { key: "updateMessageIsPeerReadProperty", value: function(e3, t2) { var n2 = []; if (this.list.has(e3)) { var o2, s2 = D(this.list.get(e3)); try { for (s2.s(); !(o2 = s2.n()).done; ) { var a2 = v(o2.value, 2)[1]; a2.time <= t2 && !a2.isPeerRead && "out" === a2.flow && (a2.isPeerRead = true, n2.push(a2)); } } catch (i2) { s2.e(i2); } finally { s2.f(); } Ve.l("".concat(this._n, ".updateMessageIsPeerReadProperty conversationID:").concat(e3, " peerReadTime:").concat(t2, " count:").concat(n2.length)); } return n2; } }, { key: "updateMessageIsModifiedProperty", value: function(e3) { var t2 = e3.conversationID; if (this.list.has(t2)) { var n2 = this._getUniqueIDOfMessage(e3), o2 = this.list.get(t2).get(n2); o2 && (o2.isModified = true); } } }, { key: "hasLocalMessageList", value: function(e3) { return this.list.has(e3); } }, { key: "getLocalMessageList", value: function(e3) { return this.hasLocalMessageList(e3) ? m(this.list.get(e3).values()) : []; } }, { key: "hasLocalMessage", value: function(e3, t2) { for (var n2 = false, o2 = this.getLocalMessageList(e3), s2 = o2.length, a2 = 0; a2 < s2; a2++) o2[a2].ID === t2 && (n2 = true); return n2; } }, { key: "getLocalMessage", value: function(e3, t2) { for (var n2 = null, o2 = this.getLocalMessageList(e3), s2 = o2.length, a2 = 0; a2 < s2; a2++) if (o2[a2].ID === t2) { n2 = o2[a2]; break; } return n2; } }, { key: "getLocalLastMessage", value: function(e3) { var t2 = this.getLocalMessageList(e3); return t2[t2.length - 1]; } }, { key: "getLocalOldestMessage", value: function(e3) { return this.getLocalMessageList(e3)[0]; } }, { key: "_setLatestMessageSentByPeer", value: function(e3, t2) { e3.startsWith(E.CONV_C2C) && "in" === t2.flow && this._latestMessageSentByPeerMap.set(e3, t2); } }, { key: "_setLatestMessageSentByMe", value: function(e3, t2) { e3.startsWith(E.CONV_C2C) && "out" === t2.flow && this._latestMessageSentByMeMap.set(e3, t2); } }, { key: "getLatestMessageSentByPeer", value: function(e3) { return this._latestMessageSentByPeerMap.get(e3); } }, { key: "getLatestMessageSentByMe", value: function(e3) { return this._latestMessageSentByMeMap.get(e3); } }, { key: "modifyMessageSentByPeer", value: function(e3) { var t2 = e3.conversationID, n2 = e3.latestNick, o2 = e3.latestAvatar, s2 = this.list.get(t2); if (!zt(s2)) { var a2 = Array.from(s2.values()), i2 = a2.length; if (0 !== i2) { for (var r2 = null, u2 = 0, c2 = false, l2 = i2 - 1; l2 >= 0; l2--) "in" === a2[l2].flow && ((r2 = a2[l2]).nick !== n2 && (r2.setNickAndAvatar({ nick: n2 }), c2 = true), r2.avatar !== o2 && (r2.setNickAndAvatar({ avatar: o2 }), c2 = true), c2 && (u2 += 1)); Ve.l("".concat(this._n, ".modifyMessageSentByPeer conversationID:").concat(t2, " count:").concat(u2)); } } } }, { key: "modifyMessageSentByMe", value: function(e3) { var t2 = e3.conversationID, n2 = e3.latestNick, o2 = e3.latestAvatar, s2 = this.list.get(t2); if (!zt(s2)) { var a2 = Array.from(s2.values()), i2 = a2.length; if (0 !== i2) { for (var r2 = null, u2 = 0, c2 = false, l2 = i2 - 1; l2 >= 0; l2--) "out" === a2[l2].flow && ((r2 = a2[l2]).nick !== n2 && (r2.setNickAndAvatar({ nick: n2 }), c2 = true), r2.avatar !== o2 && (r2.setNickAndAvatar({ avatar: o2 }), c2 = true), c2 && (u2 += 1)); Ve.l("".concat(this._n, ".modifyMessageSentByMe conversationID:").concat(t2, " count:").concat(u2)); } } } }, { key: "getTopicConversationIDList", value: function(e3) { return m(this.list.keys()).filter(function(t2) { return t2.startsWith("".concat(E.CONV_GROUP).concat(e3)); }); } }, { key: "traversal", value: function() { if (0 !== this.list.size && -1 === Ve.getLevel()) { console.group("conversationID-messageCount"); var e3, t2 = D(this.list); try { for (t2.s(); !(e3 = t2.n()).done; ) { var n2 = v(e3.value, 2), o2 = n2[0], s2 = n2[1]; formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", "".concat(o2, "-").concat(s2.size)); } } catch (a2) { t2.e(a2); } finally { t2.f(); } console.groupEnd(); } } }, { key: "onMessageModified", value: function(e3, t2) { if (!this.list.has(e3)) return { isUpdated: false, message: null }; var n2 = this._getUniqueIDOfMessage(t2), o2 = this.list.get(e3).has(n2); if (Ve.d("".concat(this._n, ".onMessageModified conversationID:").concat(e3, " uniqueID:").concat(n2, " has:").concat(o2)), o2) { var s2 = this.list.get(e3).get(n2), a2 = t2.messageVersion, i2 = t2.elements, r2 = t2.cloudCustomData; return s2.version < a2 ? (s2.version = a2, s2._elements = JSON.parse(JSON.stringify(i2)), s2.payload = JSON.parse(JSON.stringify(i2[0].content)), s2.type = i2[0].type, s2.cloudCustomData = r2, s2.isModified = true, { isUpdated: true, message: s2 }) : { isUpdated: false, message: s2 }; } return { isUpdated: false, message: null }; } }, { key: "_getUniqueIDOfMessage", value: function(e3) { var t2 = e3.from, n2 = e3.to, o2 = e3.random, s2 = e3.sequence, a2 = e3.time; return "".concat(t2, "-").concat(n2, "-").concat(o2, "-").concat(s2, "-").concat(a2); } }, { key: "reset", value: function() { this.list.clear(), this._latestMessageSentByPeerMap.clear(), this._latestMessageSentByMeMap.clear(); } }]), e2; }(), ei = "_a2KeyAndTinyIDUpdated", ti = "_cloudConfigUpdated", ni = "_profileUpdated"; function oi(e2) { this.mixin(e2); } oi.mixin = function(e2) { var t2 = e2.prototype || e2; t2._isReady = false, t2.ready = function(e3) { var t3 = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; if (e3) return this._isReady ? void (t3 ? e3.call(this) : setTimeout(e3, 1)) : (this._readyQueue = this._readyQueue || [], void this._readyQueue.push(e3)); }, t2.triggerReady = function() { var e3 = this; this._isReady = true, setTimeout(function() { var t3 = e3._readyQueue; e3._readyQueue = [], t3 && t3.length > 0 && t3.forEach(function(e4) { e4.call(this); }, e3); }, 1); }, t2.resetReady = function() { this._isReady = false, this._readyQueue = []; }, t2.isReady = function() { return this._isReady; }; }; var si = ["jpg", "jpeg", "gif", "png", "bmp", "image", "webp"], ai = ["mp4", "quicktime", "mov"], ii = 1, ri = 2, ui = 3, ci = 255, li = function() { function e2(t2) { var n2 = this; o(this, e2), zt(t2) || (this.userID = t2.userID || "", this.nick = t2.nick || "", this.gender = t2.gender || "", this.birthday = t2.birthday || 0, this.location = t2.location || "", this.selfSignature = t2.selfSignature || "", this.allowType = t2.allowType || E.ALLOW_TYPE_ALLOW_ANY, this.language = t2.language || 0, this.avatar = t2.avatar || "", this.messageSettings = t2.messageSettings || 0, this.adminForbidType = t2.adminForbidType || E.FORBID_TYPE_NONE, this.level = t2.level || 0, this.role = t2.role || 0, this.lastUpdatedTime = 0, this.profileCustomField = [], zt(t2.profileCustomField) || t2.profileCustomField.forEach(function(e3) { n2.profileCustomField.push({ key: e3.key, value: e3.value }); })); } return a(e2, [{ key: "validate", value: function(e3) { var t2 = true, n2 = ""; if (zt(e3)) return { valid: false, tips: "empty options" }; if (e3.profileCustomField) for (var o2 = e3.profileCustomField.length, s2 = null, a2 = 0; a2 < o2; a2++) { if (s2 = e3.profileCustomField[a2], !nt(s2.key) || -1 === s2.key.indexOf("Tag_Profile_Custom")) return { valid: false, tips: "The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom" }; if (!nt(s2.value)) return { valid: false, tips: "The type of values of the custom profile key-value pairs (which is profileCustomField) must be String" }; } for (var i2 in e3) if (Object.prototype.hasOwnProperty.call(e3, i2)) { if ("profileCustomField" === i2) continue; if (zt(e3[i2]) && !nt(e3[i2]) && !et(e3[i2])) { n2 = "key:" + i2 + ", invalid value:" + e3[i2], t2 = false; continue; } switch (i2) { case "nick": nt(e3[i2]) || (n2 = "nick must be a string", t2 = false), ht(e3[i2]) > 500 && (n2 = "nick name limited: must less than or equal to ".concat(500, " bytes, current size: ").concat(ht(e3[i2]), " bytes"), t2 = false); break; case "gender": mt(Ke, e3.gender) || (n2 = "key:gender, invalid value:" + e3.gender, t2 = false); break; case "birthday": et(e3.birthday) || (n2 = "birthday must be a number", t2 = false); break; case "location": nt(e3.location) || (n2 = "location must be a string", t2 = false); break; case "selfSignature": nt(e3.selfSignature) || (n2 = "selfSignature must be a string", t2 = false); break; case "allowType": mt(Ye, e3.allowType) || (n2 = "key:allowType, invalid value:" + e3.allowType, t2 = false); break; case "language": et(e3.language) || (n2 = "language must be a number", t2 = false); break; case "avatar": nt(e3.avatar) || (n2 = "avatar must be a string", t2 = false); break; case "messageSettings": 0 !== e3.messageSettings && 1 !== e3.messageSettings && (n2 = "messageSettings must be 0 or 1", t2 = false); break; case "adminForbidType": mt(We, e3.adminForbidType) || (n2 = "key:adminForbidType, invalid value:" + e3.adminForbidType, t2 = false); break; case "level": et(e3.level) || (n2 = "level must be a number", t2 = false); break; case "role": et(e3.role) || (n2 = "role must be a number", t2 = false); break; default: n2 = "unknown key:" + i2 + " " + e3[i2], t2 = false; } } return { valid: t2, tips: n2 }; } }]), e2; }(), di = a(function e2(t2) { o(this, e2), this.value = t2, this.next = null; }), pi = function() { function e2(t2) { o(this, e2), this.MAX_LENGTH = t2, this.pTail = null, this.pNodeToDel = null, this.map = /* @__PURE__ */ new Map(); } return a(e2, [{ key: "set", value: function(e3) { var t2 = new di(e3); if (this.map.size < this.MAX_LENGTH) null === this.pTail ? (this.pTail = t2, this.pNodeToDel = t2) : (this.pTail.next = t2, this.pTail = t2), this.map.set(e3, 1); else { var n2 = this.pNodeToDel; this.pNodeToDel = this.pNodeToDel.next, this.map.delete(n2.value), n2.next = null, n2 = null, this.pTail.next = t2, this.pTail = t2, this.map.set(e3, 1); } } }, { key: "has", value: function(e3) { return this.map.has(e3); } }, { key: "delete", value: function(e3) { this.has(e3) && this.map.delete(e3); } }, { key: "tail", value: function() { return this.pTail; } }, { key: "size", value: function() { return this.map.size; } }, { key: "data", value: function() { return Array.from(this.map.keys()); } }, { key: "reset", value: function() { for (var e3; null !== this.pNodeToDel; ) e3 = this.pNodeToDel, this.pNodeToDel = this.pNodeToDel.next, e3.next = null, e3 = null; this.pTail = null, this.map.clear(); } }]), e2; }(), gi = ["groupID", "name", "avatar", "type", "introduction", "notification", "ownerID", "selfInfo", "createTime", "infoSequence", "lastInfoTime", "lastMessage", "nextMessageSeq", "memberNum", "maxMemberNum", "memberList", "joinOption", "groupCustomField", "muteAllMembers", "isSupportTopic", "inviteOption", "_lastRevokedTime"], hi = function() { function e2(t2) { o(this, e2), this.groupID = "", this.name = "", this.avatar = "", this.type = "", this.introduction = "", this.notification = "", this.ownerID = "", this.createTime = "", this.infoSequence = "", this.lastInfoTime = "", this.selfInfo = { messageRemindType: "", joinTime: "", nameCard: "", role: "", userID: "", memberCustomField: void 0, readedSequence: 0, excludedUnreadSequenceList: void 0 }, this.lastMessage = { lastTime: "", lastSequence: "", fromAccount: "", messageForShow: "" }, this.nextMessageSeq = "", this.memberNum = "", this.memberCount = "", this.maxMemberNum = "", this.maxMemberCount = "", this.joinOption = "", this.inviteOption = "", this.groupCustomField = [], this.muteAllMembers = false, this.isSupportTopic = false, this._lastRevokedTime = 0, this._initGroup(t2); } return a(e2, [{ key: "memberNum", get: function() { return this.memberCount; }, set: function(e3) { } }, { key: "maxMemberNum", get: function() { return this.maxMemberCount; }, set: function(e3) { } }, { key: "_initGroup", value: function(e3) { for (var t2 in e3) gi.indexOf(t2) < 0 || ("selfInfo" !== t2 ? ("memberNum" === t2 && (this.memberCount = e3[t2]), "maxMemberNum" === t2 && (this.maxMemberCount = e3[t2]), "isSupportTopic" !== t2 ? this[t2] = e3[t2] : this.isSupportTopic = 1 === e3[t2]) : this.updateSelfInfo(e3[t2])); } }, { key: "updateGroup", value: function(e3) { var t2 = this; e3.appid = void 0, e3.grossTopicNextMsgSeq = void 0, e3.selfInfo && (e3.selfInfo.grossTopicReadSeq = void 0); var n2 = JSON.parse(JSON.stringify(e3)); n2.lastMsgTime && (this.lastMessage.lastTime = n2.lastMsgTime), it(n2.muteAllMembers) || ("On" === n2.muteAllMembers ? n2.muteAllMembers = true : n2.muteAllMembers = false), n2.groupCustomField && Ct(this.groupCustomField, n2.groupCustomField), it(n2.memberNum) || (this.memberCount = n2.memberNum), it(n2.maxMemberNum) || (this.maxMemberCount = n2.maxMemberNum), it(n2.isSupportTopic) || (this.isSupportTopic = et(n2.isSupportTopic) ? 1 === n2.isSupportTopic : n2.isSupportTopic), pt(this, n2, ["members", "errorCode", "lastMsgTime", "groupCustomField", "memberNum", "maxMemberNum", "isSupportTopic"]), at(n2.members) && n2.members.length > 0 && n2.members.forEach(function(e4) { e4.userID === t2.selfInfo.userID && pt(t2.selfInfo, e4, ["sequence"]); }); } }, { key: "updateSelfInfo", value: function(e3) { var n2 = { nameCard: e3.nameCard, joinTime: e3.joinTime, role: e3.role, messageRemindType: e3.messageRemindType, readedSequence: e3.readedSequence, excludedUnreadSequenceList: e3.excludedUnreadSequenceList }; pt(this.selfInfo, t({}, n2), [], ["", null, void 0, 0, NaN]); } }, { key: "setSelfNameCard", value: function(e3) { this.selfInfo.nameCard = e3; } }]), e2; }(), _i = function(e2, n2) { return it(e2) ? { lastTime: 0, lastSequence: 0, fromAccount: 0, messageForShow: "", payload: null, type: "", isRevoked: false, cloudCustomData: "", onlineOnlyFlag: false, nick: "", nameCard: "", version: 0, isPeerRead: false, revoker: null } : e2 instanceof Wa ? { lastTime: e2.time || 0, lastSequence: e2.sequence || 0, fromAccount: e2.from || "", messageForShow: Vt(e2.type, e2.payload, n2), payload: e2.payload || null, type: e2.type || null, isRevoked: e2.isRevoked || false, cloudCustomData: e2.cloudCustomData || "", onlineOnlyFlag: e2._onlineOnlyFlag || false, nick: e2.nick || "", nameCard: e2.nameCard || "", version: e2.version || 0, isPeerRead: e2.isPeerRead || false, revoker: e2.revoker || null } : t(t({}, e2), {}, { messageForShow: Vt(e2.type, e2.payload, n2) }); }, fi = function() { function e2(t2, n2) { o(this, e2), this.conversationID = t2.conversationID || "", this.unreadCount = t2.unreadCount || 0, this.type = t2.type || "", this.lastMessage = _i(t2.lastMessage, n2), t2.lastMsgTime && (this.lastMessage.lastTime = t2.lastMsgTime), this._isInfoCompleted = false, this.peerReadTime = t2.peerReadTime || 0, this.groupAtInfoList = [], this.remark = "", this.isPinned = t2.isPinned || false, this.messageRemindType = "", this.markList = t2.markList || [], this.customData = t2.customData || "", this.conversationGroupList = t2.conversationGroupList || [], this._initProfile(t2); } return a(e2, [{ key: "toAccount", get: function() { return this.conversationID.startsWith(E.CONV_C2C) ? this.conversationID.replace(E.CONV_C2C, "") : this.conversationID.startsWith(E.CONV_GROUP) ? this.conversationID.replace(E.CONV_GROUP, "") : ""; } }, { key: "subType", get: function() { return this.groupProfile ? this.groupProfile.type : ""; } }, { key: "_initProfile", value: function(e3) { var t2 = this; Object.keys(e3).forEach(function(n2) { switch (n2) { case "userProfile": t2.userProfile = e3.userProfile; break; case "groupProfile": t2.groupProfile = e3.groupProfile; } }), it(this.userProfile) && this.type === E.CONV_C2C ? this.userProfile = new li({ userID: e3.conversationID.replace("C2C", "") }) : it(this.groupProfile) && this.type === E.CONV_GROUP && (this.groupProfile = new hi({ groupID: e3.conversationID.replace("GROUP", "") })); } }, { key: "updateUnreadCount", value: function(e3) { var t2 = e3.nextUnreadCount, n2 = e3.isFromGetConversations, o2 = e3.isUnreadC2CMessage; it(t2) || (Tt(this.subType) ? this.unreadCount = 0 : n2 && this.type === E.CONV_GROUP || n2 && this.type === E.CONV_TOPIC || o2 && this.type === E.CONV_C2C ? this.unreadCount = t2 : this.unreadCount = this.unreadCount + t2); } }, { key: "updateLastMessage", value: function(e3) { this.lastMessage = _i(e3); } }, { key: "updateGroupAtInfoList", value: function(e3) { if (!this._isNeedMergeGroupAtInfo(e3)) { var t2, n2 = (M(t2 = e3.groupAtType) || y(t2) || I(t2) || T()).slice(0); -1 !== n2.indexOf(E.CONV_AT_ME) && -1 !== n2.indexOf(E.CONV_AT_ALL) && (n2 = [E.CONV_AT_ALL_AT_ME]); var o2 = { from: e3.from, groupID: e3.groupID, topicID: e3.topicID, messageSequence: e3.sequence, atTypeArray: n2, __random: e3.__random, __sequence: e3.__sequence }; this.groupAtInfoList.push(o2); } } }, { key: "_isNeedMergeGroupAtInfo", value: function(e3) { var t2 = e3.groupID, n2 = e3.sequence; if (!Dt({ groupID: t2 })) return false; var o2 = false; return this.groupAtInfoList.forEach(function(t3) { t3.messageSequence === n2 && (t3.atTypeArray.indexOf(E.CONV_AT_ME) > -1 && e3.groupAtType.indexOf(E.CONV_AT_ALL) > -1 && (t3.atTypeArray = [E.CONV_AT_ALL_AT_ME]), t3.atTypeArray.indexOf(E.CONV_AT_ALL) > -1 && e3.groupAtType.indexOf(E.CONV_AT_ME) > -1 && (t3.atTypeArray = [E.CONV_AT_ALL_AT_ME], t3.__random = e3.__random, t3.__sequence = e3.__sequence), o2 = true); }), o2; } }, { key: "clearGroupAtInfoList", value: function() { this.groupAtInfoList.length = 0; } }, { key: "reduceUnreadCount", value: function() { return this.unreadCount >= 1 && (this.unreadCount -= 1, true); } }, { key: "isLastMessageRevoked", value: function(e3) { var t2 = e3.sequence, n2 = e3.time; return this.type === E.CONV_C2C && t2 === this.lastMessage.lastSequence && n2 === this.lastMessage.lastTime || this.type === E.CONV_GROUP && t2 === this.lastMessage.lastSequence; } }, { key: "setLastMessageRevoked", value: function(e3) { this.lastMessage.isRevoked = e3; } }, { key: "setLastMessageRevoker", value: function(e3) { this.lastMessage.revoker = e3; } }]), e2; }(), vi = function() { function e2(t2) { o(this, e2), this._conversationModule = t2, this._n = "MessageRemindHandler", this._updateSequence = 0; } return a(e2, [{ key: "getC2CMessageRemindType", value: function() { var e3 = this, t2 = "".concat(this._n, ".getC2CMessageRemindType"); return this._conversationModule.request({ protocolName: Eo, updateSequence: this._updateSequence }).then(function(n2) { Ve.l("".concat(t2, " ok")); var o2 = n2.data, s2 = o2.updateSequence, a2 = o2.muteFlagList; e3._updateSequence = s2, e3._patchC2CMessageRemindType(a2); }).catch(function(e4) { Ve.e("".concat(t2, " failed. error:"), e4); }); } }, { key: "_patchC2CMessageRemindType", value: function(e3) { var t2 = this, n2 = 0, o2 = ""; at(e3) && e3.length > 0 && e3.forEach(function(e4) { var s2 = e4.userID, a2 = e4.muteFlag; 0 === a2 ? o2 = E.MSG_REMIND_ACPT_AND_NOTE : 1 === a2 ? o2 = E.MSG_REMIND_DISCARD : 2 === a2 && (o2 = E.MSG_REMIND_ACPT_NOT_NOTE), true === t2._conversationModule.patchMessageRemindType({ ID: s2, isC2CConversation: true, messageRemindType: o2 }) && (n2 += 1); }), Ve.l("".concat(this._n, "._patchC2CMessageRemindType count:").concat(n2)); } }, { key: "set", value: function(e3) { return e3.groupID ? this._setGroupMessageRemindType(e3) : at(e3.userIDList) ? this._setC2CMessageRemindType(e3) : void 0; } }, { key: "_setGroupMessageRemindType", value: function(e3) { var t2 = this, n2 = "".concat(this._n, "._setGroupMessageRemindType"), o2 = e3.groupID, s2 = e3.messageRemindType, a2 = "groupID:".concat(o2, " messageRemindType:").concat(s2), i2 = new Aa("setMessageRemindType"); return i2.setMessage(a2), this._getModule(wn).modifyGroupMemberInfo({ groupID: o2, messageRemindType: s2, userID: this._conversationModule.getMyUserID() }).then(function() { i2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok. ").concat(a2)); var o3 = t2.onGroupMessageRemindTypeUpdated(e3); return t2._conversationModule.emitTotalUnreadMessageCountUpdate(), Ya(o3); }).catch(function(e4) { return t2._conversationModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; i2.setError(e4, o3, s3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "onGroupMessageRemindTypeUpdated", value: function(e3) { var t2 = e3.groupID, n2 = e3.messageRemindType, o2 = this._getModule(Pn).getLocalGroupProfile(t2); if (o2 && (o2.selfInfo.messageRemindType = n2), kt(t2)) { var s2 = t2, a2 = xt(s2), i2 = this._getModule(Fn).getLocalTopic(a2, s2); return i2 && (i2.updateSelfInfo({ messageRemindType: n2 }), this._conversationModule.emitOuterEvent(k.TOPIC_UPDATED, { groupID: a2, topic: i2 })), { topic: i2 }; } return this._conversationModule.patchMessageRemindType({ ID: t2, isC2CConversation: false, messageRemindType: n2 }) && this._emitConversationUpdate(), { group: o2 }; } }, { key: "_setC2CMessageRemindType", value: function(e3) { var t2 = this, n2 = "".concat(this._n, "._setC2CMessageRemindType"), o2 = e3.userIDList, s2 = e3.messageRemindType, a2 = o2.slice(0, 30), i2 = 0; s2 === E.MSG_REMIND_DISCARD ? i2 = 1 : s2 === E.MSG_REMIND_ACPT_NOT_NOTE && (i2 = 2); var r2 = "userIDList:".concat(a2, " messageRemindType:").concat(s2), u2 = new Aa("setMessageRemindType"); return u2.setMessage(r2), this._conversationModule.request({ protocolName: ko, requestData: { userIDList: a2, muteFlag: i2 } }).then(function(e4) { u2.setNetworkType(t2._conversationModule.getNetworkType()).end(); var o3 = e4.data, i3 = o3.updateSequence, r3 = o3.errorList; t2._updateSequence = i3; var c2 = [], l2 = []; at(r3) && r3.forEach(function(e5) { c2.push(e5.userID), l2.push({ userID: e5.userID, code: e5.errorCode }); }); var d2 = a2.filter(function(e5) { return -1 === c2.indexOf(e5); }); Ve.l("".concat(n2, " ok. successUserIDList:").concat(d2, " failureUserIDList:").concat(JSON.stringify(l2))); var p2 = 0; return d2.forEach(function(e5) { t2._conversationModule.patchMessageRemindType({ ID: e5, isC2CConversation: true, messageRemindType: s2 }) && (p2 += 1); }), p2 >= 1 && t2._emitConversationUpdate(), a2.length = c2.length = 0, t2._conversationModule.emitTotalUnreadMessageCountUpdate(), Xa({ successUserIDList: d2.map(function(e5) { return { userID: e5 }; }), failureUserIDList: l2 }); }).catch(function(e4) { return t2._conversationModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; u2.setError(e4, o3, s3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "_getModule", value: function(e3) { return this._conversationModule.getModule(e3); } }, { key: "_emitConversationUpdate", value: function() { this._conversationModule.emitConversationUpdate(true, false); } }, { key: "setUpdateSequence", value: function(e3) { this._updateSequence = e3; } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._updateSequence = 0; } }]), e2; }(), mi = function() { function e2(t2) { o(this, e2), this._conversationModule = t2, this._n = "ConvGroupHandler", this._convGroupMap = /* @__PURE__ */ new Map(), this._startIndex = 0, this._pagingStatus = $t.NOT_START; } return a(e2, [{ key: "setConvCustomData", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".").concat("setConvCustomData"), o2 = e3.conversationIDList, s2 = e3.customData; Ve.l("".concat(n2, " options:"), e3); var a2 = new Aa("setConvCustomData"); a2.setMessage(JSON.stringify(e3)); var i2 = { fromAccount: this._getMyUserID(), itemList: [] }, r2 = [], u2 = []; return o2.forEach(function(e4) { if (!t2._hasLocalConversation(e4)) return t2._onConversationNotFound(u2, e4), true; if (!Et(e4) && !St(e4)) return t2._onConversationIDInvalid(u2, e4), true; var n3 = { operationType: 2, contactItem: void 0, customMark: s2 }; Et(e4) ? n3.contactItem = { type: 1, toAccount: e4.replace(E.CONV_C2C, "") } : St(e4) && (n3.contactItem = { type: 2, groupID: e4.replace(E.CONV_GROUP, "") }), i2.itemList.push(n3); }), u2.length === o2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: qo, requestData: i2 }).then(function(e4) { a2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok")); var o3 = e4.data.resultItem; if (at(o3)) { var i3, c2, l2 = false; o3.forEach(function(e5) { i3 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode ? (r2.push(i3), (c2 = t2._getLocalConversation(i3)) && c2.customData !== s2 && (c2.customData = s2, l2 = true)) : u2.push({ conversationID: i3, code: e5.resultCode, message: e5.resultInfo }); }), true === l2 && t2._emitConversationUpdate(); } return Ya({ successConversationIDList: r2, failureConversationIDList: u2 }); }).catch(function(e4) { return t2._conversationModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; a2.setError(e4, o3, s3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "markConversation", value: function(e3) { var t2 = this; if (!this._conversationModule.canIUse(B.CONV_MARK)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".").concat("markConversation"), o2 = e3.conversationIDList, s2 = e3.markType, a2 = e3.enableMark; Ve.l("".concat(n2, " options:"), e3); var i2 = new Aa("markConversation"); i2.setMessage(JSON.stringify(e3)); var r2 = void 0, u2 = void 0, c2 = this._getFlagBit(s2); true === a2 ? u2 = [c2] : r2 = [c2]; var l2 = { fromAccount: this._getMyUserID(), itemList: [] }, d2 = [], p2 = []; return o2.forEach(function(e4) { if (!t2._hasLocalConversation(e4)) return t2._onConversationNotFound(p2, e4), true; if (!Et(e4) && !St(e4)) return t2._onConversationIDInvalid(p2, e4), true; var n3 = { operationType: 1, contactItem: void 0, clearMark: r2, setMark: u2 }; Et(e4) ? n3.contactItem = { type: 1, toAccount: e4.replace(E.CONV_C2C, "") } : St(e4) && (n3.contactItem = { type: 2, groupID: e4.replace(E.CONV_GROUP, "") }), l2.itemList.push(n3); }), p2.length === o2.length ? Xa({ successConversationIDList: d2, failureConversationIDList: p2 }) : this._conversationModule.request({ protocolName: xo, requestData: l2 }).then(function(e4) { i2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok")); var o3 = e4.data.resultItem; if (at(o3)) { var r3, u3, c3 = false; o3.forEach(function(e5) { if (r3 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode) { if (d2.push(r3), u3 = t2._getLocalConversation(r3)) { var n3 = u3.markList.indexOf(s2); true === a2 ? -1 === n3 && (u3.markList.push(s2), c3 = true) : -1 !== n3 && (u3.markList.splice(n3, 1), c3 = true); } } else p2.push({ conversationID: r3, code: e5.resultCode, message: e5.resultInfo }); }), true === c3 && t2._emitConversationUpdate(); } return Ya({ successConversationIDList: d2, failureConversationIDList: p2 }); }).catch(function(e4) { return t2._conversationModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; i2.setError(e4, o3, s3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "getLocalConvGroupList", value: function() { var e3 = this; return Ve.l("".concat(this._n, ".getLocalConvGroupList pagingStatus:").concat(this._pagingStatus)), this._pagingStatus === $t.REJECTED ? this.getRemoteConvGroupList().then(function() { return Ya(m(e3._convGroupMap.values())); }) : Xa(m(this._convGroupMap.values())); } }, { key: "getRemoteConvGroupList", value: function() { var e3 = this, t2 = "".concat(this._n, ".getRemoteConvGroupList"); return this._pagingStatus = $t.PENDING, this._conversationModule.request({ protocolName: Yo, requestData: { fromAccount: this._getMyUserID(), startIndex: this._startIndex, startTime: we() } }).then(function(n2) { var o2, s2, a2 = n2.data, i2 = a2.completeFlag, r2 = a2.contactItem, u2 = a2.nextStartIndex, c2 = void 0 === u2 ? 0 : u2, l2 = a2.groupItem; (e3._startIndex = c2, Ve.l("".concat(t2, " completeFlag:").concat(i2, " nextStartIndex:").concat(c2)), at(l2) && l2.forEach(function(t3) { var n3 = t3.convGroupID, o3 = t3.groupName; e3._convGroupMap.set(n3, o3); }), at(r2)) && r2.forEach(function(t3) { var n3 = t3.standardMark, a3 = t3.customData, i3 = t3.convGroupIDList; if (o2 = e3._concatConversationID(t3), (s2 = e3._getLocalConversation(o2)) && (s2.markList = Ht(n3), s2.customData = a3 || "", at(i3))) { var r3 = []; i3.forEach(function(t4) { e3._convGroupMap.has(t4) && r3.push(e3._convGroupMap.get(t4)); }), s2.conversationGroupList = [].concat(r3), r3.length = 0; } }); if (0 === i2) return e3.getRemoteConvGroupList(); 1 === i2 && (e3._pagingStatus = $t.RESOLVED, e3._emitConversationUpdate(), e3._emitConvGroupListUpdate()); }).catch(function(n2) { e3._pagingStatus = $t.REJECTED, Ve.w("".concat(t2, " failed. error:"), n2); }); } }, { key: "createConvGroup", value: function(e3) { var t2 = this; if (!this._conversationModule.canIUse(B.CONV_GROUP)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".").concat("createConvGroup"); Ve.l("".concat(n2, " options:"), e3); var o2 = new Aa("createConvGroup"); o2.setMessage(JSON.stringify(e3)); var s2 = e3.groupName, a2 = e3.conversationIDList, i2 = { fromAccount: this._getMyUserID(), itemList: [{ groupName: s2, contactItem: [] }] }, r2 = [], u2 = []; return a2.forEach(function(e4) { return t2._hasLocalConversation(e4) ? Et(e4) || St(e4) ? void (Et(e4) ? i2.itemList[0].contactItem.push({ type: 1, toAccount: e4.replace(E.CONV_C2C, "") }) : St(e4) && i2.itemList[0].contactItem.push({ type: 2, groupID: e4.replace(E.CONV_GROUP, "") })) : (t2._onConversationIDInvalid(u2, e4), true) : (t2._onConversationNotFound(u2, e4), true); }), u2.length === a2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: Vo, requestData: i2 }).then(function(e4) { o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok")); var a3 = e4.data.groupResultItem[0], i3 = a3.groupItem, c2 = a3.resultItem; if (st(i3) && (t2._convGroupMap.set(i3.convGroupID, i3.groupName), t2._emitConvGroupListUpdate()), at(c2)) { var l2, d2, p2 = false; c2.forEach(function(e5) { l2 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode ? (r2.push(l2), (d2 = t2._getLocalConversation(l2)) && -1 === d2.conversationGroupList.indexOf(s2) && (d2.conversationGroupList.push(s2), p2 = true)) : u2.push({ conversationID: l2, code: e5.resultCode, message: e5.resultInfo }); }), true === p2 && (t2._emitConversationUpdate(), t2._emitConvGroupListUpdate()); } return Ya({ successConversationIDList: r2, failureConversationIDList: u2 }); }).catch(function(e4) { return t2._conversationModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1]; o2.setError(e4, s3, a3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "deleteConvGroup", value: function(e3) { var t2 = this; if (!this._conversationModule.canIUse(B.CONV_GROUP)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".").concat("deleteConvGroup"); Ve.l("".concat(n2, " groupName:").concat(e3)); var o2 = new Aa("deleteConvGroup"); return o2.setMessage(e3), this._conversationModule.request({ protocolName: Bo, requestData: { fromAccount: this._getMyUserID(), groupName: [e3] } }).then(function(s2) { o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok")); var a2 = s2.data.groupItem; if (at(a2)) { var i2 = false; a2.forEach(function(e4) { t2._convGroupMap.has(e4.convGroupID) && (t2._convGroupMap.delete(e4.convGroupID), i2 = true); }), true === i2 && t2._emitConvGroupListUpdate(); } t2._eraseFromConversationGroupList([e3]); }).catch(function(e4) { return t2._conversationModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), s2 = n3[0], a2 = n3[1]; o2.setError(e4, s2, a2).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "renameConvGroup", value: function(e3) { var t2 = this; if (!this._conversationModule.canIUse(B.CONV_GROUP)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".").concat("renameConvGroup"); Ve.l("".concat(n2, " options:"), e3); var o2 = new Aa("renameConvGroup"); o2.setMessage(JSON.stringify(e3)); var s2 = e3.oldName, a2 = e3.newName; return this._conversationModule.request({ protocolName: Ho, requestData: { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 1, oldName: s2, newName: a2 } } }).then(function(e4) { o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok")); var i2 = e4.data.updateGroupResult.convGroupID; t2._convGroupMap.set(i2, a2), t2._emitConvGroupListUpdate(); var r2, u2, c2 = t2._conversationModule.getLocalConversationList(), l2 = false; c2.forEach(function(e5) { r2 = e5.conversationGroupList, -1 !== (u2 = r2.indexOf(s2)) && (r2.splice(u2, 1, a2), l2 = true); }), true === l2 && t2._emitConversationUpdate(); }).catch(function(e4) { return t2._conversationModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1]; o2.setError(e4, s3, a3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "addConvsToGroup", value: function(e3) { var t2 = this; if (!this._conversationModule.canIUse(B.CONV_GROUP)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".").concat("addConvsToGroup"); Ve.l("".concat(n2, " options:"), e3); var o2 = new Aa("addConvsToGroup"); o2.setMessage(JSON.stringify(e3)); var s2 = e3.conversationIDList, a2 = e3.groupName, i2 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: a2, updateItem: [] } }, r2 = [], u2 = []; return s2.forEach(function(e4) { return t2._hasLocalConversation(e4) ? Et(e4) || St(e4) ? void (Et(e4) ? i2.updateGroup.updateItem.push({ operationType: 1, contactItem: { type: 1, toAccount: e4.replace(E.CONV_C2C, "") } }) : St(e4) && i2.updateGroup.updateItem.push({ operationType: 1, contactItem: { type: 2, groupID: e4.replace(E.CONV_GROUP, "") } })) : (t2._onConversationIDInvalid(u2, e4), true) : (t2._onConversationNotFound(u2, e4), true); }), u2.length === s2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: Ko, requestData: i2 }).then(function(e4) { o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok")); var s3 = e4.data.updateGroupResult.contactResultItem; if (at(s3)) { var i3, c2, l2 = false; s3.forEach(function(e5) { i3 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode ? (c2 = t2._getLocalConversation(i3)) && -1 === c2.conversationGroupList.indexOf(a2) && (c2.conversationGroupList.push(a2), r2.push(i3), l2 = true) : u2.push({ conversationID: i3, code: e5.resultCode, message: e5.resultInfo }); }), true === l2 && (t2._emitConversationUpdate(), t2._emitConvInGroupUpdate(a2)); } return Ya({ successConversationIDList: r2, failureConversationIDList: u2 }); }).catch(function(e4) { return t2._conversationModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1]; o2.setError(e4, s3, a3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "deleteConvsFromGroup", value: function(e3) { var t2 = this; if (!this._conversationModule.canIUse(B.CONV_GROUP)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".").concat("deleteConvsFromGroup"); Ve.l("".concat(n2, " options:"), e3); var o2 = new Aa("deleteConvsFromGroup"); o2.setMessage(JSON.stringify(e3)); var s2 = e3.conversationIDList, a2 = e3.groupName, i2 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: a2, updateItem: [] } }, r2 = [], u2 = []; return s2.forEach(function(e4) { return t2._hasLocalConversation(e4) ? Et(e4) || St(e4) ? void (Et(e4) ? i2.updateGroup.updateItem.push({ operationType: 2, contactItem: { type: 1, toAccount: e4.replace(E.CONV_C2C, "") } }) : St(e4) && i2.updateGroup.updateItem.push({ operationType: 2, contactItem: { type: 2, groupID: e4.replace(E.CONV_GROUP, "") } })) : (t2._onConversationIDInvalid(u2, e4), true) : (t2._onConversationNotFound(u2, e4), true); }), u2.length === s2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: Wo, requestData: i2 }).then(function(e4) { o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok")); var s3 = e4.data.updateGroupResult.contactResultItem; if (at(s3)) { var i3, c2, l2 = false; s3.forEach(function(e5) { if (i3 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode) { if (c2 = t2._getLocalConversation(i3)) { var n3 = c2.conversationGroupList.indexOf(a2); -1 !== n3 && (c2.conversationGroupList.splice(n3, 1), r2.push(i3), l2 = true); } } else u2.push({ conversationID: i3, code: e5.resultCode, message: e5.resultInfo }); }), true === l2 && (t2._emitConversationUpdate(), t2._emitConvInGroupUpdate(a2)); } return Ya({ successConversationIDList: r2, failureConversationIDList: u2 }); }).catch(function(e4) { return t2._conversationModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1]; o2.setError(e4, s3, a3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "onConvMarkUpdated", value: function(e3) { var t2 = this; if (!zt(e3)) { var n2, o2; Ve.d("".concat(this._n, ".onConvMarkUpdated markItemList:"), e3); var s2 = false; e3.forEach(function(e4) { var a2 = e4.recentContactItem, i2 = e4.optType, r2 = e4.standardMark, u2 = e4.customMark; if (n2 = t2._concatConversationID(a2), o2 = t2._getLocalConversation(n2)) if (1 === i2) { var c2 = Ht(r2); true !== function(e5, t3) { if (e5 === t3) return true; if (!e5 || !t3) return false; if (e5.length !== t3.length) return false; for (var n3 = 0, o3 = e5.length; n3 < o3; n3++) if (e5[n3] !== t3[n3]) return false; return true; }(o2.markList, c2) && (o2.markList = c2, s2 = true); } else 2 === i2 && o2.customData !== u2 && void 0 !== u2 && (o2.customData = u2, s2 = true); }), true === s2 && this._emitConversationUpdate(); } } }, { key: "onConvGroupCreated", value: function(e3) { var t2 = this; Ve.d("".concat(this._n, ".onConvGroupCreated resultList:"), e3); var n2 = false, o2 = false; at(e3) && (e3.forEach(function(e4) { var s2 = e4.msgGroupItem, a2 = s2.groupID, i2 = s2.groupName; t2._convGroupMap.get(a2) !== i2 && (t2._convGroupMap.set(a2, i2), o2 = true); var r2, u2, c2 = e4.msgRecentContactItem; at(c2) && c2.forEach(function(e5) { r2 = t2._concatConversationID(e5), (u2 = t2._getLocalConversation(r2)) && -1 === u2.conversationGroupList.indexOf(i2) && (u2.conversationGroupList.push(i2), n2 = true); }); }), true === n2 && this._emitConversationUpdate(), true === o2 && this._emitConvGroupListUpdate()); } }, { key: "onConvGroupDeleted", value: function(e3) { var t2 = this; Ve.d("".concat(this._n, ".onConvGroupDeleted groupItemList:"), e3); var n2 = []; if (at(e3)) { var o2 = false; e3.forEach(function(e4) { var s2 = e4.groupID, a2 = e4.groupName; t2._convGroupMap.has(s2) && (t2._convGroupMap.delete(s2), o2 = true, n2.push(a2)); }), true === o2 && this._emitConvGroupListUpdate(); } this._eraseFromConversationGroupList(n2); } }, { key: "_eraseFromConversationGroupList", value: function(e3) { zt(e3) || (this._conversationModule.getLocalConversationList().forEach(function(t2) { t2.conversationGroupList = t2.conversationGroupList.filter(function(t3) { return !e3.includes(t3); }); }), this._emitConversationUpdate()); } }, { key: "onConvGroupNameUpdated", value: function(e3) { Ve.d("".concat(this._n, ".onConvGroupNameUpdated options:"), e3); var t2 = e3.groupID, n2 = e3.groupName, o2 = e3.oldGroupName; if (this._convGroupMap.get(t2) !== n2) { this._convGroupMap.set(t2, n2), this._emitConvGroupListUpdate(); var s2, a2, i2 = this._conversationModule.getLocalConversationList(), r2 = false; i2.forEach(function(e4) { s2 = e4.conversationGroupList, -1 !== (a2 = s2.indexOf(o2)) && (s2.splice(a2, 1, n2), r2 = true); }), true === r2 && this._emitConversationUpdate(); } } }, { key: "onConvInGroupUpdated", value: function(e3) { var t2 = this; Ve.d("".concat(this._n, ".onConvInGroupUpdated options:"), e3); var n2 = e3.oldGroupName, o2 = e3.recentContactUpdateGroupItem; if (at(o2)) { var s2, a2, i2, r2 = false; o2.forEach(function(e4) { var o3 = e4.contactOptType, u2 = e4.recentContactItem; s2 = t2._concatConversationID(u2), (a2 = t2._getLocalConversation(s2)) && (i2 = a2.conversationGroupList.indexOf(n2), 1 === o3 ? -1 === i2 && (a2.conversationGroupList.push(n2), r2 = true) : 2 === o3 && -1 !== i2 && (a2.conversationGroupList.splice(i2, 1), r2 = true)); }), true === r2 && (this._emitConversationUpdate(), this._emitConvInGroupUpdate(n2)); } } }, { key: "onConvAddedToOrDeletedFromGroup", value: function(e3) { var t2 = this; Ve.d("".concat(this._n, ".onConvAddedToOrDeletedFromGroup options:"), e3); var n2 = e3.msgRecentContactItem, o2 = e3.msgRecentContactUpdateContactItem, s2 = this._concatConversationID(n2), a2 = this._getLocalConversation(s2); if (a2 && at(o2)) { var i2, r2 = false; o2.forEach(function(e4) { var n3 = e4.groupOptType, o3 = e4.recentContactGroupItem.groupName; i2 = a2.conversationGroupList.indexOf(o3), 1 === n3 ? -1 === i2 && (a2.conversationGroupList.push(o3), r2 = true) : 2 === n3 && -1 !== i2 && (a2.conversationGroupList.splice(i2, 1), r2 = true), true === r2 && t2._emitConvInGroupUpdate(o3); }), true === r2 && this._emitConversationUpdate(); } } }, { key: "onConvGroupListSynced", value: function(e3) { var t2 = this; at(e3) && 0 !== e3.length && (Ve.l("".concat(this._n, ".onConvGroupListSynced groupItemList:"), e3), e3.forEach(function(e4) { t2._convGroupMap.set(e4.convGroupID, e4.groupName); })); } }, { key: "getConvGroupListByID", value: function(e3) { var t2 = this; if (!zt(e3)) { var n2 = []; return e3.forEach(function(e4) { t2._convGroupMap.has(e4) && n2.push(t2._convGroupMap.get(e4)); }), n2; } } }, { key: "_onConversationNotFound", value: function(e3, t2) { e3.push({ conversationID: t2, code: ha.CONVERSATION_NOT_FOUND, message: this._conversationModule.getErrorMessage(ha.CONVERSATION_NOT_FOUND) }); } }, { key: "_onConversationIDInvalid", value: function(e3, t2) { e3.push({ conversationID: t2, code: ha.INVALID_CONVERSATION_ID, message: this._conversationModule.getErrorMessage(ha.INVALID_CONVERSATION_ID) }); } }, { key: "_getFlagBit", value: function(e3) { for (var t2 = e3.toString(2), n2 = t2.length, o2 = n2 - 1; o2 >= 0; o2--) if ("1" === t2[o2]) return n2 - o2 - 1; } }, { key: "_concatConversationID", value: function(e3) { var t2, n2 = e3.type, o2 = e3.to, s2 = e3.groupID, a2 = e3.userID; return 1 === n2 ? it(a2) ? it(o2) || (t2 = "".concat(E.CONV_C2C).concat(o2)) : t2 = "".concat(E.CONV_C2C).concat(a2) : 2 === n2 && (t2 = "".concat(E.CONV_GROUP).concat(s2)), t2; } }, { key: "_getMyUserID", value: function() { return this._conversationModule.getMyUserID(); } }, { key: "_insertConversationGroup", value: function(e3, t2) { var n2 = this._getLocalConversation(e3); if (n2) { var o2 = n2.conversationGroupList; -1 === o2.indexOf(t2) && o2.push(t2); } } }, { key: "_getLocalConversation", value: function(e3) { return this._conversationModule.getLocalConversation(e3); } }, { key: "_hasLocalConversation", value: function(e3) { return this._conversationModule.hasLocalConversation(e3); } }, { key: "_emitConversationUpdate", value: function() { this._conversationModule.emitConversationUpdate(true, false); } }, { key: "_emitConvGroupListUpdate", value: function() { this._conversationModule.emitOuterEvent(k.CONVERSATION_GROUP_LIST_UPDATED, m(this._convGroupMap.values())); } }, { key: "_emitConvInGroupUpdate", value: function(e3) { var t2 = { groupName: e3, conversationList: [] }, n2 = this._conversationModule.getLocalConversationList(); t2.conversationList = n2.filter(function(t3) { return t3.conversationGroupList.includes(e3); }), this._conversationModule.emitOuterEvent(k.CONVERSATION_IN_GROUP_UPDATED, t2); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._convGroupMap.clear(), this._startIndex = 0, this._pagingStatus = $t.NOT_START; } }]), e2; }(), Mi = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; return o(this, s2), (t2 = n2.call(this, e3))._n = "ConversationModule", oi.mixin(h(t2)), t2._messageListHandler = new $a(), t2._messageRemindHandler = new vi(h(t2)), t2._convGroupHandler = new mi(h(t2)), t2.singlyLinkedList = new pi(100), t2._pagingStatus = $t.NOT_START, t2._pagingTimeStamp = 0, t2._pagingStartIndex = 0, t2._pagingPinnedTimeStamp = 0, t2._pagingPinnedStartIndex = 0, t2._pagingConvIDMap = /* @__PURE__ */ new Map(), t2._convIDFromUnreadDBMap = /* @__PURE__ */ new Map(), t2._conversationMap = /* @__PURE__ */ new Map(), t2._tmpGroupList = [], t2._tmpGroupAtTipsList = [], t2._peerReadTimeMap = /* @__PURE__ */ new Map(), t2._completedMap = /* @__PURE__ */ new Map(), t2._roamingMessageKeyAndTimeMap = /* @__PURE__ */ new Map(), t2._roamingMessageSequenceMap = /* @__PURE__ */ new Map(), t2._remoteGroupReadSequenceMap = /* @__PURE__ */ new Map(), t2._convTotalUnreadCount = 0, t2._pagingGetCostList = [], t2._initListeners(), t2; } return a(s2, [{ key: "_initListeners", value: function() { var e3 = this.getInnerEmitterInstance(); e3.on(ei, this._initLocalConversationList, this), e3.on(ni, this._onProfileUpdated, this); } }, { key: "onCheckTimer", value: function(e3) { e3 % 60 == 0 && this._messageListHandler.traversal(); } }, { key: "_initLocalConversationList", value: function() { var e3 = this, t2 = new Aa("_initLocalConversationList"); Ve.l("".concat(this._n, ".").concat("_initLocalConversationList")); var n3 = "", o2 = this._getStorageConversationList(), s3 = this.isIntl(); if (o2) { for (var a2 = o2.length, i2 = 0; i2 < a2; i2++) { var r2 = o2[i2]; if (r2) { if (r2.conversationID === "".concat(E.CONV_C2C, "@TLS#ERROR") || r2.conversationID === "".concat(E.CONV_C2C, "@TLS#NOT_FOUND")) continue; if (r2.groupProfile) { var u2 = r2.groupProfile.type; if (Tt(u2)) continue; } } this._conversationMap.set(o2[i2].conversationID, new fi(o2[i2], s3)); } this.emitConversationUpdate(true, false), n3 = "count:".concat(a2); } else n3 = "count:0"; t2.setNetworkType(this.getNetworkType()).setMessage(n3).end(), this.getModule(Un) || this.triggerReady(), this.ready(function() { e3._tmpGroupList.length > 0 && (e3.updateConversationGroupProfile(e3._tmpGroupList), e3._tmpGroupList.length = 0); }), this.syncConversationList(); } }, { key: "onMessageSent", value: function(e3) { this._onSendOrReceiveMessage({ conversationOptionsList: e3.conversationOptionsList, isInstantMessage: true }); } }, { key: "onNewMessage", value: function(e3) { this._onSendOrReceiveMessage(e3); } }, { key: "_onSendOrReceiveMessage", value: function(e3) { var t2 = this, n3 = e3.conversationOptionsList, o2 = e3.isInstantMessage, s3 = void 0 === o2 || o2, a2 = e3.isUnreadC2CMessage, i2 = void 0 !== a2 && a2, r2 = e3.updateUnreadCount, u2 = void 0 === r2 || r2; this._isReady ? 0 !== n3.length && (this._getC2CPeerReadTime(n3), this._updateLocalConversationList({ conversationOptionsList: n3, isInstantMessage: s3, isUnreadC2CMessage: i2, isFromGetConversations: false, updateUnreadCount: u2 }), s3 || (this._convIDFromUnreadDBMap = new Map([].concat(m(this._convIDFromUnreadDBMap), m(n3.map(function(e4) { return [e4.conversationID, 1]; })))), this._diffAndDeleteConversation()), this._setStorageConversationList(), n3.filter(function(e4) { return e4.type === E.CONV_TOPIC; }).length > 0 || this.emitConversationUpdate()) : this.ready(function() { t2._onSendOrReceiveMessage(e3); }); } }, { key: "updateConversationGroupProfile", value: function(e3) { var t2 = this; if (!at(e3) || 0 !== e3.length) if (0 !== this._conversationMap.size) { var n3 = false; e3.forEach(function(e4) { var o2 = "GROUP".concat(e4.groupID); if (t2._conversationMap.has(o2)) { n3 = true; var s3 = t2._conversationMap.get(o2); s3.groupProfile = JSON.parse(JSON.stringify(e4)), s3.lastMessage.lastSequence < e4.nextMessageSeq && (s3.lastMessage.lastSequence = e4.nextMessageSeq - 1), s3.subType || (s3.subType = e4.type); } }), n3 && this.emitConversationUpdate(true, false); } else this._tmpGroupList = e3; } }, { key: "_updateConversationUserProfile", value: function(e3) { var t2 = this; e3.data.forEach(function(e4) { var n3 = "C2C".concat(e4.userID); t2._conversationMap.has(n3) && (t2._conversationMap.get(n3).userProfile = e4); }), this.emitConversationUpdate(true, false); } }, { key: "onMessageRevoked", value: function(e3) { var t2 = this; if (0 !== e3.length) { var n3 = null, o2 = false, s3 = []; e3.forEach(function(e4) { (n3 = t2._conversationMap.get(e4.conversationID)) && (n3.type === E.CONV_TOPIC ? s3.push(e4) : (n3.reduceUnreadCount() && (o2 = true), n3.isLastMessageRevoked({ sequence: e4.sequence, time: e4.time }) && (n3.setLastMessageRevoked(true), n3.setLastMessageRevoker(e4.revoker), o2 = true))); }), this.getModule(Fn).onMessageRevoked(s3), o2 && (this.emitConversationUpdate(true, false), this.emitTotalUnreadMessageCountUpdate()); } } }, { key: "isLastMessageRevoked", value: function(e3) { var t2 = false, n3 = e3.conversationID, o2 = e3.sequence, s3 = e3.time, a2 = this._conversationMap.get(n3); a2 && (t2 = a2.type === E.CONV_TOPIC ? this.getModule(Fn).isLastMessageRevoked({ topicID: n3.replace(E.CONV_GROUP, ""), sequence: o2 }) : a2.isLastMessageRevoked({ sequence: o2, time: s3 })); return Ve.l("".concat(this._n, ".isLastMessageRevoked options:").concat(JSON.stringify(e3), " ret:").concat(t2)), t2; } }, { key: "onMessageDeleted", value: function(e3) { var t2 = this; if (0 !== e3.length) { var n3 = null; e3.forEach(function(e4) { (n3 = t2._messageListHandler.getLocalMessage(e4.conversationID, e4.ID)) && (n3.isDeleted = true), e4 !== n3 && (e4.isDeleted = true); }); for (var o2 = e3[0].conversationID, s3 = this._messageListHandler.getLocalMessageList(o2), a2 = {}, i2 = s3.length - 1; i2 >= 0; i2--) if (!s3[i2].isDeleted) { a2 = s3[i2]; break; } var r2 = this._conversationMap.get(o2); if (r2) { var u2 = false; r2.lastMessage.lastSequence === a2.sequence && r2.lastMessage.lastTime === a2.time || (zt(a2) && (a2 = void 0), r2.updateLastMessage(a2), r2.type !== E.CONV_TOPIC && (u2 = true), Ve.l("".concat(this._n, ".onMessageDeleted. update conversationID:").concat(o2, " with lastMessage:"), r2.lastMessage)), o2.startsWith(E.CONV_C2C) && this.updateUnreadCount(o2), u2 && this.emitConversationUpdate(true, false); } } } }, { key: "onMessageModified", value: function(e3) { var t2 = e3.conversationType, n3 = e3.from, o2 = e3.to, s3 = e3.time, a2 = e3.sequence, i2 = e3.elements, r2 = e3.cloudCustomData, u2 = e3.messageVersion, c2 = this.getMyUserID(), l2 = "".concat(t2).concat(o2); o2 === c2 && t2 === E.CONV_C2C && (l2 = "".concat(t2).concat(n3)); var d2 = this._messageListHandler.onMessageModified(l2, e3), p2 = d2.isUpdated, g2 = d2.message; true === p2 && this.emitOuterEvent(k.MESSAGE_MODIFIED, [g2]); var h2 = this._isTopicConversation(l2); if (Ve.l("".concat(this._n, ".onMessageModified isUpdated:").concat(p2, " isTopicMessage:").concat(h2, " from:").concat(n3, " to:").concat(o2)), h2) { this.getModule(Fn).onMessageModified(e3); } else { var _2 = this._conversationMap.get(l2); if (_2) { var f2 = _2.lastMessage; Ve.d("".concat(this._n.onMessageModified, " lastMessage:"), JSON.stringify(f2), "options:", JSON.stringify(e3)), f2 && f2.lastTime === s3 && f2.lastSequence === a2 && f2.version !== u2 && (f2.type = i2[0].type, f2.payload = i2[0].content, f2.messageForShow = Vt(f2.type, f2.payload, this.isIntl()), f2.cloudCustomData = r2, f2.version = u2, this.emitConversationUpdate(true, false)); } } return g2; } }, { key: "onNewGroupAtTips", value: function(e3) { var n3 = this, o2 = e3.dataList, s3 = null; o2.forEach(function(e4) { e4.groupAtTips ? s3 = e4.groupAtTips : e4.elements ? s3 = t(t({}, e4.elements), {}, { sync: true }) : e4.groupAtType && (s3 = t(t({}, e4), {}, { sync: true })), s3.__random = e4.random, s3.__sequence = e4.clientSequence, n3._tmpGroupAtTipsList.push(s3); }), Ve.d("".concat(this._n, ".onNewGroupAtTips isReady:").concat(this._isReady), this._tmpGroupAtTipsList), this._isReady && this._handleGroupAtTipsList(); } }, { key: "_handleGroupAtTipsList", value: function() { var e3 = this; if (0 !== this._tmpGroupAtTipsList.length) { var t2 = false; this._tmpGroupAtTipsList.forEach(function(n3) { var o2 = n3.groupID, s3 = n3.from, a2 = n3.topicID, i2 = void 0 === a2 ? void 0 : a2, r2 = n3.sync, u2 = void 0 !== r2 && r2; if (s3 !== e3.getMyUserID()) if (it(i2)) { var c2 = e3._conversationMap.get("".concat(E.CONV_GROUP).concat(o2)); c2 && (c2.updateGroupAtInfoList(n3), t2 = true); } else { var l2 = e3._conversationMap.get("".concat(E.CONV_GROUP).concat(i2)); if (l2) { l2.updateGroupAtInfoList(n3); var d2 = e3.getModule(Fn), p2 = l2.groupAtInfoList; d2.onConversationProxy({ topicID: i2, groupAtInfoList: p2 }); } if (zt(l2) && u2) e3.updateTopicConversation([{ conversationID: "".concat(E.CONV_GROUP).concat(i2), type: E.CONV_TOPIC }]), e3._conversationMap.get("".concat(E.CONV_GROUP).concat(i2)).updateGroupAtInfoList(n3); } }), t2 && this.emitConversationUpdate(true, false), this._tmpGroupAtTipsList.length = 0; } } }, { key: "_getC2CPeerReadTime", value: function(e3) { var t2 = this, n3 = []; if (e3.forEach(function(e4) { t2._conversationMap.has(e4.conversationID) || e4.type !== E.CONV_C2C || n3.push(e4.conversationID.replace(E.CONV_C2C, "")); }), n3.length > 0) { Ve.d("".concat(this._n, "._getC2CPeerReadTime userIDList:").concat(n3)); var o2 = this.getModule(Un); o2 && o2.getRemotePeerReadTime(n3); } } }, { key: "_getStorageConversationList", value: function() { return this.getModule(Vn).getItem("conversationMap"); } }, { key: "_setStorageConversationList", value: function() { var e3 = this.getLocalConversationList().filter(function(e4) { return e4.type === E.CONV_C2C || e4.type === E.CONV_GROUP && e4.lastMessage.type !== E.MSG_GRP_TIP; }).slice(0, 20).map(function(e4) { return { conversationID: e4.conversationID, type: e4.type, subType: e4.subType, lastMessage: e4.lastMessage, groupProfile: e4.groupProfile, userProfile: e4.userProfile }; }); this.getModule(Vn).setItem("conversationMap", e3); } }, { key: "emitConversationUpdate", value: function() { var e3 = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this.getLocalConversationList(); if (t2) { var o2 = this.getModule(Pn); o2 && o2.updateGroupLastMessage(n3); } e3 && this.emitOuterEvent(k.CONVERSATION_LIST_UPDATED); } }, { key: "getLocalConversationList", value: function() { return m(this._conversationMap.values()).filter(function(e3) { return e3.type !== E.CONV_TOPIC; }); } }, { key: "getLocalConversation", value: function(e3) { return this._conversationMap.get(e3); } }, { key: "hasLocalConversation", value: function(e3) { return this._conversationMap.has(e3); } }, { key: "getLocalOldestMessage", value: function(e3) { return this._messageListHandler.getLocalOldestMessage(e3); } }, { key: "syncConversationList", value: function() { var e3 = this, t2 = new Aa("syncConversationList"); return this._pagingStatus === $t.NOT_START && this._conversationMap.clear(), this._pagingGetConversationList().then(function(n3) { var o2 = function(e4) { if (at(e4) && 0 !== e4.length) { var t3 = 0; return e4.forEach(function(e5) { t3 += e5; }), (t3 / e4.length).toFixed(0); } }(e3._pagingGetCostList); return Ve.l("".concat(e3._n, ".").concat("syncConversationList", ". sum ").concat(function(e4) { if (at(e4) && 0 !== e4.length) { var t3 = 0; return e4.forEach(function(e5) { t3 += e5; }), t3.toFixed(0); } }(e3._pagingGetCostList), " ms, average ").concat(o2, " ms")), e3._pagingGetCostList.length = 0, e3._pagingStatus = $t.RESOLVED, e3._diffAndDeleteConversation(), e3.emitConversationUpdate(true, false), e3._setStorageConversationList(), e3._handleC2CPeerReadTime(), e3._patchConversationProperties(), t2.setMessage(e3._conversationMap.size).setMoreMessage(o2).setNetworkType(e3.getNetworkType()).end(), n3; }).catch(function(n3) { return e3._pagingStatus = $t.REJECTED, t2.setMessage(e3._pagingTimeStamp), e3.probeNetwork().then(function(e4) { var o2 = v(e4, 2), s3 = o2[0], a2 = o2[1]; t2.setError(n3, s3, a2).end(); }), Za(n3); }); } }, { key: "_diffAndDeleteConversation", value: function() { var e3 = this; if (this._isSyncCompleted()) { var t2 = []; this._conversationMap.forEach(function(n3, o2) { !e3._pagingConvIDMap.has(o2) && e3._convIDFromUnreadDBMap.has(o2) && (e3._conversationMap.delete(o2), t2.push(o2)); }), Ve.l("".concat(this._n, "._diffAndDeleteConversation list:").concat(t2)); } } }, { key: "_patchConversationProperties", value: function() { var e3 = this, t2 = Date.now(), n3 = this.checkAndPatchRemark(), o2 = this._messageRemindHandler.getC2CMessageRemindType(), s3 = this.getModule(Pn).getGroupList(); Promise.all([n3, o2, s3]).then(function() { var n4 = Date.now() - t2; Ve.l("".concat(e3._n, "._patchConversationProperties ok. cost ").concat(n4, " ms")), e3.emitConversationUpdate(true, false), e3.emitTotalUnreadMessageCountUpdate(); }); } }, { key: "_pagingGetConversationList", value: function() { var e3 = this, t2 = "".concat(this._n, "._pagingGetConversationList"); Ve.l("".concat(t2, " timeStamp:").concat(this._pagingTimeStamp, " startIndex:").concat(this._pagingStartIndex) + " pinnedTimeStamp:".concat(this._pagingPinnedTimeStamp, " pinnedStartIndex:").concat(this._pagingPinnedStartIndex)); var n3 = Date.now(); return this._pagingStatus = $t.PENDING, this.request({ protocolName: Go, requestData: { fromAccount: this.getMyUserID(), timeStamp: this._pagingTimeStamp, startIndex: this._pagingStartIndex, pinnedTimeStamp: this._pagingPinnedTimeStamp, pinnedStartIndex: this._pagingPinnedStartIndex, orderType: 1 } }).then(function(o2) { var s3 = o2.data, a2 = s3.completeFlag, i2 = s3.conversations, r2 = void 0 === i2 ? [] : i2, u2 = s3.timeStamp, c2 = s3.startIndex, l2 = s3.pinnedTimeStamp, d2 = s3.pinnedStartIndex, p2 = s3.groupItem, g2 = Date.now() - n3; if (e3._pagingGetCostList.push(g2), Ve.l("".concat(t2, " ok. completeFlag:").concat(a2, " count:").concat(r2.length, " cost ").concat(g2, " ms")), e3._convGroupHandler.onConvGroupListSynced(p2), r2.length > 0) { var h2 = e3._getConversationOptions(r2); e3._pagingConvIDMap = new Map([].concat(m(e3._pagingConvIDMap), m(h2.map(function(e4) { return [e4.conversationID, 1]; })))), e3._updateLocalConversationList({ conversationOptionsList: h2, isFromGetConversations: true }), e3.isLoggedIn() && e3.emitConversationUpdate(); } if (!e3._isReady) { if (!e3.isLoggedIn()) return Xa(); e3.triggerReady(); } return e3._pagingTimeStamp = u2, e3._pagingStartIndex = c2, e3._pagingPinnedTimeStamp = l2, e3._pagingPinnedStartIndex = d2, 1 !== a2 ? e3._pagingGetConversationList() : (e3._handleGroupAtTipsList(), e3._convGroupHandler.getRemoteConvGroupList(), Xa()); }).catch(function(n4) { throw e3.isLoggedIn() && (e3._isReady || (Ve.w("".concat(t2, " failed. error:"), n4), e3.triggerReady())), n4; }); } }, { key: "_updateLocalConversationList", value: function(e3) { var t2, n3 = e3.isFromGetConversations, o2 = e3.isInstantMessage, s3 = Date.now(); t2 = this._getTmpConversationListMapping(e3), this._conversationMap = new Map(this._sortConversationList([].concat(m(t2.toBeUpdatedConversationList), m(this._conversationMap)))), n3 || (this._updateUserOrGroupProfile(t2.newConversationList), o2 && this.emitTotalUnreadMessageCountUpdate()), Ve.d("".concat(this._n, "._updateLocalConversationList cost ").concat(Date.now() - s3, " ms")); } }, { key: "_getTmpConversationListMapping", value: function(e3) { for (var t2 = e3.conversationOptionsList, n3 = e3.isFromGetConversations, o2 = e3.isInstantMessage, s3 = e3.isUnreadC2CMessage, a2 = void 0 !== s3 && s3, i2 = e3.updateUnreadCount, r2 = [], u2 = [], c2 = this.getModule(Pn), l2 = this.getModule(bn), d2 = this.isIntl(), p2 = 0, g2 = t2.length; p2 < g2; p2++) { var h2 = new fi(t2[p2], d2), _2 = h2.conversationID; if (_2 !== "".concat(E.CONV_C2C, "@TLS#ERROR") && _2 !== "".concat(E.CONV_C2C, "@TLS#NOT_FOUND")) if (this._conversationMap.has(_2)) { var f2 = this._conversationMap.get(_2), v2 = ["unreadCount", "allowType", "adminForbidType", "payload", "isPinned"]; false === o2 && v2.push("lastMessage"); var m2 = t2[p2].lastMessage, M2 = !it(m2); M2 || t2[p2].type === E.CONV_TOPIC || this._onLastMessageNotExist(t2[p2]), it(o2) && M2 && null === f2.lastMessage.payload && (f2.lastMessage.payload = m2.payload), zt(f2.lastMessage.revoker) || (f2.lastMessage.revoker = null), pt(f2, h2, v2, [null, void 0, "", 0, NaN]), true === i2 && f2.updateUnreadCount({ nextUnreadCount: h2.unreadCount, isFromGetConversations: n3, isUnreadC2CMessage: a2 }), o2 && M2 && (m2.payload && (f2.lastMessage.payload = m2.payload), f2.type === E.CONV_GROUP && (f2.lastMessage.nameCard = m2.nameCard, f2.lastMessage.nick = m2.nick)), M2 && f2.lastMessage.cloudCustomData !== m2.cloudCustomData && (f2.lastMessage.cloudCustomData = m2.cloudCustomData || ""), this._conversationMap.delete(_2), r2.push([_2, f2]); } else { if (h2.type === E.CONV_GROUP && c2) { var y2 = h2.groupProfile.groupID, I2 = c2.getLocalGroupProfile(y2); I2 && (h2.groupProfile = I2, true === i2 && h2.updateUnreadCount({ nextUnreadCount: 0 })); } else if (h2.type === E.CONV_C2C) { var C2 = _2.replace(E.CONV_C2C, ""); l2 && l2.isMyFriend(C2) && (h2.remark = l2.getFriendRemark(C2)); } u2.push(h2), r2.push([_2, h2]); } } var T2 = this.getModule(Fn); return r2.forEach(function(e4) { if (e4[1].type === E.CONV_TOPIC) { var t3 = e4[1], n4 = t3.conversationID, o3 = t3.unreadCount, s4 = t3.groupAtInfoList; T2.onConversationProxy({ topicID: n4.replace(E.CONV_GROUP, ""), unreadCount: o3, groupAtInfoList: zt(s4) ? void 0 : s4 }); } }), { toBeUpdatedConversationList: r2, newConversationList: u2 }; } }, { key: "_onLastMessageNotExist", value: function(e3) { new Aa("lastMessageNotExist").setMessage("".concat(JSON.stringify(e3))).setNetworkType(this.getNetworkType()).end(); } }, { key: "_sortConversationList", value: function(e3) { var t2 = [], n3 = [], o2 = [], s3 = []; return e3.forEach(function(e4) { true === e4[1].isPinned ? zt(e4[1].lastMessage.lastTime) ? n3.push(e4) : t2.push(e4) : zt(e4[1].lastMessage.lastTime) ? s3.push(e4) : o2.push(e4); }), t2.sort(function(e4, t3) { return t3[1].lastMessage.lastTime - e4[1].lastMessage.lastTime; }).concat(n3).concat(o2.sort(function(e4, t3) { return t3[1].lastMessage.lastTime - e4[1].lastMessage.lastTime; })).concat(s3); } }, { key: "_sortConversationListAndEmitEvent", value: function() { this._conversationMap = new Map(this._sortConversationList(m(this._conversationMap))), this.emitConversationUpdate(true, false); } }, { key: "_updateUserOrGroupProfile", value: function(e3) { var t2 = this; if (0 !== e3.length) { var n3 = [], o2 = [], s3 = this.getModule(Gn), a2 = this.getModule(Pn); e3.forEach(function(e4) { if (e4.type === E.CONV_C2C) n3.push(e4.toAccount); else if (e4.type === E.CONV_GROUP) { var t3 = e4.toAccount; a2.hasLocalGroup(t3) ? e4.groupProfile = a2.getLocalGroupProfile(t3) : o2.push(t3); } }), Ve.l("".concat(this._n, "._updateUserOrGroupProfile c2cUserIDList:").concat(n3, " groupIDList:").concat(o2)), n3.length > 0 && s3.getUserProfile({ userIDList: n3 }).then(function(e4) { var n4 = e4.data; at(n4) ? n4.forEach(function(e5) { t2._doUpdateUserProfile("C2C".concat(e5.userID), e5); }) : t2._doUpdateUserProfile("C2C".concat(n4.userID), n4); }), o2.length > 0 && a2.getGroupProfileAdvance({ groupIDList: o2, responseFilter: { groupBaseInfoFilter: ["Type", "Name", "FaceUrl"] } }).then(function(e4) { e4.data.successGroupList.forEach(function(e5) { var n4 = "GROUP".concat(e5.groupID); if (t2._conversationMap.has(n4)) { var o3 = t2._conversationMap.get(n4); pt(o3.groupProfile, e5, [], [null, void 0, "", 0, NaN]), !o3.subType && e5.type && (o3.subType = e5.type); } }); }); } } }, { key: "_doUpdateUserProfile", value: function(e3, t2) { this.hasLocalConversation(e3) && (this.getLocalConversation(e3).userProfile = t2); } }, { key: "_getConversationOptions", value: function(e3) { var n3 = this, o2 = [], s3 = e3.filter(function(e4) { var t2 = e4.type, n4 = e4.userID; return 1 === t2 && "@TLS#NOT_FOUND" !== n4 && "@TLS#ERROR" !== n4 || 2 === t2; }), a2 = this.getMyUserID(), i2 = s3.map(function(e4) { if (it(e4.lastMsg) && (e4.lastMsg = { elements: [] }), 1 === e4.type) { var s4 = { userID: e4.userID, nick: e4.peerNick, avatar: e4.peerAvatar }; return o2.push(s4), { conversationID: "C2C".concat(e4.userID), type: "C2C", lastMessage: { lastTime: e4.time, lastSequence: e4.sequence, fromAccount: e4.lastC2CMsgFromAccount, messageForShow: e4.messageShow, type: e4.lastMsg.elements[0] ? e4.lastMsg.elements[0].type : null, payload: e4.lastMsg.elements[0] ? n3._amendLayersOverLimitProperty(e4.lastMsg.elements[0].content) : null, cloudCustomData: e4.lastMsg.cloudCustomData || "", isRevoked: 8 === e4.lastMessageFlag, onlineOnlyFlag: false, nick: "", nameCard: "", version: 0, isPeerRead: e4.lastC2CMsgFromAccount === a2 && e4.time <= e4.c2cPeerReadTime, revoker: e4.lastMsg.revokerInfo ? e4.lastMsg.revokerInfo.revoker : null }, userProfile: new li(s4), peerReadTime: e4.c2cPeerReadTime, isPinned: 1 === e4.isPinned, messageRemindType: "", customData: e4.customMark || "", markList: Ht(e4.standardMark), conversationGroupList: n3._convGroupHandler.getConvGroupListByID(e4.contactGroupId) }; } return { conversationID: "GROUP".concat(e4.groupID), type: "GROUP", lastMessage: t(t({ lastTime: e4.time, lastSequence: e4.sequence, fromAccount: e4.msgGroupFromAccount, messageForShow: e4.messageShow }, n3._patchTypeAndPayload(e4)), {}, { cloudCustomData: e4.lastMsg.cloudCustomData || "", isRevoked: 2 === e4.lastMessageFlag, onlineOnlyFlag: false, nick: e4.senderNick || "", nameCard: e4.senderNameCard || "", revoker: e4.lastMsg.revokerInfo ? e4.lastMsg.revokerInfo.revoker : null }), groupProfile: new hi({ groupID: e4.groupID, name: e4.groupNick, avatar: e4.groupImage }), unreadCount: e4.unreadCount, peerReadTime: 0, isPinned: 1 === e4.isPinned, messageRemindType: "", version: 0, customData: e4.customMark || "", markList: Ht(e4.standardMark), conversationGroupList: n3._convGroupHandler.getConvGroupListByID(e4.contactGroupId) }; }); o2.length > 0 && this.getModule(Gn).onConversationsProfileUpdated(o2); return i2; } }, { key: "_patchTypeAndPayload", value: function(e3) { var n3 = e3.lastMsg, o2 = n3.event, s3 = void 0 === o2 ? void 0 : o2, a2 = n3.elements, i2 = void 0 === a2 ? [] : a2, r2 = n3.groupTips, u2 = void 0 === r2 ? {} : r2; if (!it(s3) && !zt(u2)) { var c2 = new Wa(u2); c2.setElement({ type: E.MSG_GRP_TIP, content: t(t({}, u2.elements), {}, { groupProfile: u2.groupProfile }) }); var l2 = JSON.parse(JSON.stringify(c2.payload)); return c2 = null, { type: E.MSG_GRP_TIP, payload: l2 }; } return { type: i2[0] ? i2[0].type : null, payload: i2[0] ? this._amendLayersOverLimitProperty(i2[0].content) : null }; } }, { key: "_amendLayersOverLimitProperty", value: function(e3) { var t2 = e3.layersOverLimit; return 0 === t2 ? e3.layersOverLimit = false : 1 === t2 && (e3.layersOverLimit = true), e3; } }, { key: "getLocalMessageList", value: function(e3) { return this._messageListHandler.getLocalMessageList(e3); } }, { key: "deleteLocalMessage", value: function(e3) { e3 instanceof Wa && this._messageListHandler.remove(e3); } }, { key: "onConversationDeleted", value: function(e3) { if (at(e3)) { var t2 = e3.map(function(e4) { var t3 = e4.type, n3 = e4.userID, o2 = e4.groupID; return 1 === t3 ? "".concat(E.CONV_C2C).concat(n3) : 2 === t3 ? "".concat(E.CONV_GROUP).concat(o2) : void 0; }); Ve.l("".concat(this._n, ".onConversationDeleted conversationIDList:").concat(t2)), this.deleteLocalConversationList(t2); } } }, { key: "onConversationPinned", value: function(e3) { var t2 = this; if (at(e3)) { var n3 = false; e3.forEach(function(e4) { var o2, s3 = e4.type, a2 = e4.userID, i2 = e4.groupID; 1 === s3 ? o2 = t2.getLocalConversation("".concat(E.CONV_C2C).concat(a2)) : 2 === s3 && (o2 = t2.getLocalConversation("".concat(E.CONV_GROUP).concat(i2))), o2 && (Ve.l("".concat(t2._n, ".onConversationPinned conversationID:").concat(o2.conversationID, " isPinned:").concat(o2.isPinned)), o2.isPinned || (o2.isPinned = true, n3 = true)); }), n3 && this._sortConversationListAndEmitEvent(); } } }, { key: "onConversationUnpinned", value: function(e3) { var t2 = this; if (at(e3)) { var n3 = false; e3.forEach(function(e4) { var o2, s3 = e4.type, a2 = e4.userID, i2 = e4.groupID; 1 === s3 ? o2 = t2.getLocalConversation("".concat(E.CONV_C2C).concat(a2)) : 2 === s3 && (o2 = t2.getLocalConversation("".concat(E.CONV_GROUP).concat(i2))), o2 && (Ve.l("".concat(t2._n, ".onConversationUnpinned conversationID:").concat(o2.conversationID, " isPinned:").concat(o2.isPinned)), o2.isPinned && (o2.isPinned = false, n3 = true)); }), n3 && this._sortConversationListAndEmitEvent(); } } }, { key: "getMessageList", value: function(e3) { var t2 = this, n3 = e3.conversationID, o2 = e3.nextReqMessageID, s3 = e3.count, a2 = "".concat(this._n, ".getMessageList"), i2 = this.getLocalConversation(n3), r2 = ""; if (i2 && i2.groupProfile && (r2 = i2.groupProfile.type), Tt(r2)) return Ve.l("".concat(a2, " not available in avchatroom. conversationID:").concat(n3)), Xa({ messageList: [], nextReqMessageID: "", isCompleted: true }); (it(s3) || s3 > 15) && (s3 = 15), !o2 && this._isNotInCommunity(n3) && (this._messageListHandler.removeByConversationID(n3), this._completedMap.delete(n3), this._roamingMessageSequenceMap.delete(n3)); var u2 = this._computeRemainingCount({ conversationID: n3, nextReqMessageID: o2 }), c2 = this._completedMap.has(n3); if (Ve.l("".concat(a2, " conversationID:").concat(n3, " nextReqMessageID:").concat(o2) + " remainingCount:".concat(u2, " count:").concat(s3, " isCompleted:").concat(c2)), this._needGetHistory({ conversationID: n3, remainingCount: u2, count: s3 })) return this.getHistoryMessages({ conversationID: n3, nextReqMessageID: o2, count: 20 }).then(function(e4) { var o3 = e4.nextReqID, s4 = e4.storedMessageList, i3 = t2._completedMap.has(n3), r3 = s4; u2 > 0 && (r3 = t2._messageListHandler.getLocalMessageList(n3).slice(0, s4.length + u2)); var c3 = { nextReqMessageID: i3 ? "" : o3, messageList: r3, isCompleted: i3 }; return Ve.l("".concat(a2, " ret.nextReqMessageID:").concat(c3.nextReqMessageID, " ret.isCompleted:").concat(c3.isCompleted, " ret.length:").concat(r3.length)), Ya(c3); }); this.modifyMessageList(n3); var l2 = this._getMessageListFromMemory({ conversationID: n3, nextReqMessageID: o2, count: s3 }); return Xa(l2); } }, { key: "_getMessageListFromMemory", value: function(e3) { var t2 = e3.conversationID, n3 = e3.nextReqMessageID, o2 = e3.count, s3 = "".concat(this._n, "._getMessageListFromMemory"), a2 = this._messageListHandler.getLocalMessageList(t2), i2 = a2.length, r2 = 0, u2 = { isCompleted: false, nextReqMessageID: "", messageList: [] }; return n3 ? (r2 = a2.findIndex(function(e4) { return e4.ID === n3; })) > o2 ? (u2.messageList = a2.slice(r2 - o2, r2), u2.nextReqMessageID = a2[r2 - o2].ID) : (u2.messageList = a2.slice(0, r2), u2.isCompleted = true) : i2 > o2 ? (r2 = i2 - o2, u2.messageList = a2.slice(r2, i2), u2.nextReqMessageID = a2[r2].ID) : (u2.messageList = a2.slice(0, i2), u2.isCompleted = true), Ve.l("".concat(s3, " conversationID:").concat(t2) + " ret.nextReqMessageID:".concat(u2.nextReqMessageID, " ret.isCompleted:").concat(u2.isCompleted, " ret.length:").concat(u2.messageList.length)), u2; } }, { key: "getMessageListHopping", value: function(e3) { var t2 = e3.conversationID, n3 = e3.sequence, o2 = e3.time, s3 = e3.count, a2 = e3.direction, i2 = void 0 === a2 ? 0 : a2; if ((it(s3) || s3 > 15) && (s3 = 15), t2.startsWith(E.CONV_C2C)) { var r2 = this.getModule(Un), u2 = t2.replace(E.CONV_C2C, ""); return r2.getRoamingMessagesHopping({ peerAccount: u2, time: o2, count: s3, direction: i2 }); } if (t2.startsWith(E.CONV_GROUP)) { var c2 = this.getModule(Pn), l2 = t2.replace(E.CONV_GROUP, ""); return c2.getRoamingMessagesHopping({ groupID: l2, sequence: n3, count: s3, direction: i2 }); } } }, { key: "_computeRemainingCount", value: function(e3) { var t2 = e3.conversationID, n3 = e3.nextReqMessageID, o2 = this._messageListHandler.getLocalMessageList(t2), s3 = o2.length; if (!n3) return s3; var a2 = 0; return Et(t2) ? a2 = o2.findIndex(function(e4) { return e4.ID === n3; }) : St(t2) && (a2 = -1 !== n3.indexOf("-") ? o2.findIndex(function(e4) { return e4.ID === n3; }) : o2.findIndex(function(e4) { return e4.sequence === n3; })), -1 === a2 && (a2 = 0), a2; } }, { key: "_getMessageListSize", value: function(e3) { return this._messageListHandler.getLocalMessageList(e3).length; } }, { key: "_needGetHistory", value: function(e3) { var t2 = e3.conversationID, n3 = e3.remainingCount, o2 = e3.count, s3 = this.getLocalConversation(t2), a2 = ""; return s3 && s3.groupProfile && (a2 = s3.groupProfile.type), !Lt(t2) && !Tt(a2) && (!(St(t2) && this._isPagingGetGroupListCompleted() && this._getLocalGroupCount() <= 4e3 && !this._hasLocalGroup(t2) && !this._isTopicConversation(t2)) && (n3 <= o2 && !this._completedMap.has(t2))); } }, { key: "_isTopicConversation", value: function(e3) { var t2 = e3.replace(E.CONV_GROUP, ""); return kt(t2); } }, { key: "getHistoryMessages", value: function(e3) { var t2 = e3.conversationID, n3 = e3.count; if (t2 === E.CONV_SYSTEM) return Xa(); var o2 = 15; n3 > 20 && (o2 = 20); var s3 = null; if (Et(t2)) { var a2 = this._roamingMessageKeyAndTimeMap.has(t2); return (s3 = this.getModule(Un)) ? s3.getRoamingMessage({ conversationID: t2, peerAccount: t2.replace(E.CONV_C2C, ""), count: o2, lastMessageTime: a2 ? this._roamingMessageKeyAndTimeMap.get(t2).lastMessageTime : 0, messageKey: a2 ? this._roamingMessageKeyAndTimeMap.get(t2).messageKey : "" }) : Za({ code: ha.CANNOT_FIND_MODULE }); } if (St(t2)) { if (!(s3 = this.getModule(Pn))) return Za({ code: ha.CANNOT_FIND_MODULE }); var i2 = null; this._conversationMap.has(t2) && (i2 = this._conversationMap.get(t2).lastMessage); var r2 = 0; i2 && (r2 = i2.lastSequence); var u2 = this._roamingMessageSequenceMap.get(t2); return s3.getRoamingMessage({ conversationID: t2, groupID: t2.replace(E.CONV_GROUP, ""), count: o2, sequence: u2 || r2 }); } return Xa(); } }, { key: "patchConversationLastMessage", value: function(e3) { var t2 = this.getLocalConversation(e3); if (t2) { var n3 = t2.lastMessage, o2 = n3.messageForShow, s3 = n3.payload; if (zt(o2) || zt(s3)) { var a2 = this._messageListHandler.getLocalMessageList(e3); if (0 === a2.length) return; var i2 = a2[a2.length - 1]; Ve.l("".concat(this._n, ".patchConversationLastMessage conversationID:").concat(e3, " payload:"), i2.payload), t2.updateLastMessage(i2); } } } }, { key: "onRoamingMessage", value: function() { var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], n3 = arguments.length > 1 ? arguments[1] : void 0, o2 = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2], s3 = n3.startsWith(E.CONV_C2C) ? E.CONV_C2C : E.CONV_GROUP, a2 = null, i2 = [], r2 = [], u2 = 0, c2 = e3.length, l2 = null, d2 = s3 === E.CONV_GROUP, p2 = this.getModule(Kn), g2 = this.getFileDownloadProxy(), h2 = function() { u2 = d2 ? e3.length - 1 : 0, c2 = d2 ? 0 : e3.length; }, _2 = function() { d2 ? --u2 : ++u2; }, f2 = function() { return d2 ? u2 >= c2 : u2 < c2; }; for (h2(); f2(); _2()) if (d2 && 1 === e3[u2].sequence && o2 && this.setCompleted(n3), 1 !== e3[u2].isPlaceMessage) if ((a2 = new Wa(e3[u2])).to = e3[u2].to, s3 !== E.CONV_GROUP || it(e3[u2].topicID) || (a2.to = e3[u2].topicID), a2.isSystemMessage = !!e3[u2].isSystemMessage, a2.conversationType = s3, 4 === e3[u2].event ? l2 = { type: E.MSG_GRP_TIP, content: t(t({}, e3[u2].elements), {}, { groupProfile: e3[u2].groupProfile }) } : (e3[u2].elements = p2.parseElements(e3[u2].elements, e3[u2].from), l2 = e3[u2].elements), d2 || a2.setNickAndAvatar({ nick: e3[u2].nick, avatar: e3[u2].avatar }), zt(l2)) { var v2 = new Aa("emptyMessageBody"); v2.setMessage("from:".concat(a2.from, " to:").concat(a2.to, " sequence:").concat(a2.sequence, " event:").concat(e3[u2].event)), v2.setNetworkType(this.getNetworkType()).setLevel("warning").end(); } else a2.setElement(l2, g2), a2.reInitialize(this.getMyUserID()), i2.push(a2); return h2 = _2 = f2 = null, o2 ? (this._messageListHandler.unshift(i2, r2), i2 = null, r2) : (r2 = null, i2); } }, { key: "findMessage", value: function(e3) { return this._messageListHandler.findMessage(e3); } }, { key: "_isNotInCommunity", value: function(e3) { var t2 = false; if (e3.startsWith(E.CONV_GROUP) && this._isTopicConversation(e3)) { var n3 = xt(e3.replace(E.CONV_GROUP, "")); this.getModule(Pn).hasLocalGroup(n3) || (t2 = true); } return t2; } }, { key: "deleteTopicRoamingMessageInfo", value: function(e3) { var t2 = this; Dt({ groupID: e3 }) && this._messageListHandler.getTopicConversationIDList(e3).forEach(function(e4) { t2._messageListHandler.removeByConversationID(e4), t2._completedMap.delete(e4), t2._roamingMessageSequenceMap.delete(e4); }); } }, { key: "deleteGroupRomaingMessageInfo", value: function(e3) { var t2 = "".concat(E.CONV_GROUP).concat(e3); this._messageListHandler.removeByConversationID(t2), this._completedMap.delete(t2), this._roamingMessageSequenceMap.delete(t2); } }, { key: "setMessageRead", value: function(e3) { var t2 = e3.conversationID, n3 = this.getLocalConversation(t2); if (Ve.l("".concat(this._n, ".setMessageRead conversationID:").concat(t2, " unreadCount:").concat(n3 ? n3.unreadCount : 0)), !n3) return Xa(); if (n3.type !== E.CONV_GROUP && n3.type !== E.CONV_TOPIC || zt(n3.groupAtInfoList) || this.deleteGroupAtTips(t2), 0 === n3.unreadCount) return Xa(); if (n3.type === E.CONV_GROUP && !this._hasLocalGroup(t2)) return 0 !== n3.unreadCount && (n3.unreadCount = 0, this.emitConversationUpdate(true, false)), Xa(); var o2 = this._messageListHandler.getLocalLastMessage(t2), s3 = n3.lastMessage.lastTime; o2 && s3 < o2.time && (s3 = o2.time); var a2 = n3.lastMessage.lastSequence; if (o2 && a2 < o2.sequence && (a2 = o2.sequence), n3.type === E.CONV_TOPIC && it(o2)) { var i2 = this.getModule(Fn), r2 = t2.replace(E.CONV_GROUP, ""), u2 = xt(r2), c2 = i2.getLocalTopic(u2, r2); c2 && (a2 = c2.nextMessageSeq - 1); } var l2 = null; switch (n3.type) { case E.CONV_C2C: return (l2 = this.getModule(Un)) ? l2.setMessageRead({ conversationID: t2, lastMessageTime: s3 }) : Za({ code: ha.CANNOT_FIND_MODULE }); case E.CONV_GROUP: case E.CONV_TOPIC: return (l2 = this.getModule(Pn)) ? l2.setMessageRead({ conversationID: t2, lastMessageSeq: a2 }) : Za({ code: ha.CANNOT_FIND_MODULE }); case E.CONV_SYSTEM: return n3.unreadCount = 0, this.emitConversationUpdate(true, false), Xa(); default: return Xa(); } } }, { key: "setAllMessageRead", value: function() { var e3 = this, t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, n3 = "setAllMessageRead", o2 = "".concat(this._n, ".").concat(n3); t2.scope || (t2.scope = E.READ_ALL_MSG), Ve.l("".concat(o2, " options:"), t2); var s3 = this._createSetAllMessageReadPack(t2); if (0 === s3.readAllC2CMessage && 0 === s3.groupMessageReadInfoList.length) return Xa(); var a2 = new Aa(n3); return this.request({ protocolName: us, requestData: s3 }).then(function(n4) { var o3 = n4.data, s4 = e3._handleAllMessageRead(o3); return a2.setMessage("scope:".concat(t2.scope, " failureGroups:").concat(JSON.stringify(s4))).setNetworkType(e3.getNetworkType()).end(), Xa(); }).catch(function(t3) { return e3.probeNetwork().then(function(e4) { var n4 = v(e4, 2), o3 = n4[0], s4 = n4[1]; a2.setError(t3, o3, s4).end(); }), Ve.w("".concat(o2, " failed. error:"), t3), Za({ code: t3 && t3.code ? t3.code : ha.MESSAGE_UNREAD_ALL_FAIL, message: t3 && t3.message ? t3.message : void 0 }); }); } }, { key: "setConversationCustomData", value: function(e3) { return this._convGroupHandler.setConvCustomData(e3); } }, { key: "markConversation", value: function(e3) { return this._convGroupHandler.markConversation(e3); } }, { key: "getConversationGroupList", value: function() { return this._convGroupHandler.getLocalConvGroupList(); } }, { key: "createConversationGroup", value: function(e3) { return this._convGroupHandler.createConvGroup(e3); } }, { key: "deleteConversationGroup", value: function(e3) { return this._convGroupHandler.deleteConvGroup(e3); } }, { key: "renameConversationGroup", value: function(e3) { return this._convGroupHandler.renameConvGroup(e3); } }, { key: "addConversationsToGroup", value: function(e3) { return this._convGroupHandler.addConvsToGroup(e3); } }, { key: "deleteConversationsFromGroup", value: function(e3) { return this._convGroupHandler.deleteConvsFromGroup(e3); } }, { key: "onConversationMarkUpdated", value: function(e3) { this._convGroupHandler.onConvMarkUpdated(e3); } }, { key: "onConversationGroupCreated", value: function(e3) { this._convGroupHandler.onConvGroupCreated(e3); } }, { key: "onConversationGroupDeleted", value: function(e3) { this._convGroupHandler.onConvGroupDeleted(e3); } }, { key: "onConversationGroupNameUpdated", value: function(e3) { this._convGroupHandler.onConvGroupNameUpdated(e3); } }, { key: "onConversationInGroupUpdated", value: function(e3) { this._convGroupHandler.onConvInGroupUpdated(e3); } }, { key: "onConversationAddedToOrDeletedFromGroup", value: function(e3) { this._convGroupHandler.onConvAddedToOrDeletedFromGroup(e3); } }, { key: "_getConversationLastMessageSequence", value: function(e3) { var t2 = this._messageListHandler.getLocalLastMessage(e3.conversationID), n3 = e3.lastMessage.lastSequence; return t2 && n3 < t2.sequence && (n3 = t2.sequence), n3; } }, { key: "_getConversationLastMessageTime", value: function(e3) { var t2 = this._messageListHandler.getLocalLastMessage(e3.conversationID), n3 = e3.lastMessage.lastTime; return t2 && n3 < t2.time && (n3 = t2.time), n3; } }, { key: "_createSetAllMessageReadPack", value: function(e3) { var t2, n3 = { readAllC2CMessage: 0, groupMessageReadInfoList: [] }, o2 = e3.scope, s3 = D(this._conversationMap); try { for (s3.s(); !(t2 = s3.n()).done; ) { var a2 = v(t2.value, 2)[1]; if (a2.unreadCount > 0) { if (a2.type === E.CONV_C2C && 0 === n3.readAllC2CMessage) { if (o2 === E.READ_ALL_MSG) n3.readAllC2CMessage = 1; else if (o2 === E.READ_ALL_C2C_MSG) { n3.readAllC2CMessage = 1; break; } } else if (a2.type === E.CONV_GROUP && (o2 === E.READ_ALL_GROUP_MSG || o2 === E.READ_ALL_MSG)) { var i2 = this._getConversationLastMessageSequence(a2); n3.groupMessageReadInfoList.push({ groupID: a2.groupProfile.groupID, messageSequence: i2 }); } } } } catch (r2) { s3.e(r2); } finally { s3.f(); } return n3; } }, { key: "onPushedAllMessageRead", value: function(e3) { this._handleAllMessageRead(e3); } }, { key: "_handleAllMessageRead", value: function(e3) { var t2 = e3.groupMessageReadInfoList, n3 = e3.readAllC2CMessage, o2 = this._parseGroupReadInfo(t2); return this._updateAllConversationUnreadCount({ readAllC2CMessage: n3 }) >= 1 && (this.emitConversationUpdate(true, false), this.emitTotalUnreadMessageCountUpdate()), o2; } }, { key: "_parseGroupReadInfo", value: function(e3) { var t2 = []; if (e3 && e3.length) for (var n3 = 0, o2 = e3.length; n3 < o2; n3++) { var s3 = e3[n3], a2 = s3.groupID, i2 = s3.sequence, r2 = s3.retCode, u2 = s3.lastMessageSeq; it(r2) ? this._remoteGroupReadSequenceMap.set(a2, u2) : (this._remoteGroupReadSequenceMap.set(a2, i2), 0 !== r2 && t2.push("".concat(a2, "-").concat(i2, "-").concat(r2))); } return t2; } }, { key: "_updateAllConversationUnreadCount", value: function(e3) { var t2, n3 = e3.readAllC2CMessage, o2 = 0, s3 = D(this._conversationMap); try { for (s3.s(); !(t2 = s3.n()).done; ) { var a2 = v(t2.value, 2), i2 = a2[0], r2 = a2[1]; if (r2.unreadCount >= 1) { if (1 === n3 && r2.type === E.CONV_C2C) { var u2 = this._getConversationLastMessageTime(r2); this.updateIsReadAfterReadReport({ conversationID: i2, lastMessageTime: u2 }); } else if (r2.type === E.CONV_GROUP) { var c2 = i2.replace(E.CONV_GROUP, ""); if (this._remoteGroupReadSequenceMap.has(c2)) { var l2 = this._remoteGroupReadSequenceMap.get(c2), d2 = this._getConversationLastMessageSequence(r2); this.updateIsReadAfterReadReport({ conversationID: i2, remoteReadSequence: l2 }), d2 >= l2 && this._remoteGroupReadSequenceMap.delete(c2); } } this.updateUnreadCount(i2, false) && (o2 += 1); } } } catch (p2) { s3.e(p2); } finally { s3.f(); } return o2; } }, { key: "isRemoteRead", value: function(e3) { var t2 = e3.conversationID, n3 = e3.sequence, o2 = t2.replace(E.CONV_GROUP, ""), s3 = false; if (this._remoteGroupReadSequenceMap.has(o2)) { var a2 = this._remoteGroupReadSequenceMap.get(o2); n3 <= a2 && (s3 = true, Ve.l("".concat(this._n, ".isRemoteRead conversationID:").concat(t2, " messageSequence:").concat(n3, " remoteReadSequence:").concat(a2))), n3 >= a2 + 10 && this._remoteGroupReadSequenceMap.delete(o2); } return s3; } }, { key: "updateIsReadAfterReadReport", value: function(e3) { var t2 = e3.conversationID, n3 = e3.lastMessageSeq, o2 = e3.lastMessageTime, s3 = this._messageListHandler.getLocalMessageList(t2); if (0 !== s3.length) { for (var a2, i2 = s3.length - 1; i2 >= 0; i2--) if (a2 = s3[i2], !(o2 && a2.time > o2 || n3 && a2.sequence > n3)) { if ("in" === a2.flow && a2.isRead) break; a2.setIsRead(true); } } } }, { key: "updateUnreadCount", value: function(e3) { var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = false, o2 = this.getLocalConversation(e3), s3 = this._messageListHandler.getLocalMessageList(e3); if (o2) { var a2 = o2.unreadCount, i2 = s3.filter(function(e4) { return !e4.isRead && !e4._onlineOnlyFlag && !e4.isDeleted; }).length; if (a2 !== i2 && (o2.unreadCount = i2, n3 = true, Ve.l("".concat(this._n, ".updateUnreadCount from ").concat(a2, " to ").concat(i2, ", conversationID:").concat(e3)), true === t2 && (this.emitConversationUpdate(true, false), this.emitTotalUnreadMessageCountUpdate())), n3 && o2.type === E.CONV_TOPIC) { var r2 = o2.unreadCount, u2 = this.getModule(Fn), c2 = e3.replace(E.CONV_GROUP, ""); u2.onConversationProxy({ topicID: c2, unreadCount: r2 }); } return n3; } } }, { key: "clearGroupAtInfoList", value: function(e3) { var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this.getLocalConversation(e3); if (n3 && n3.groupAtInfoList.length > 0) { if (n3.clearGroupAtInfoList(), Ve.l("".concat(this._n, ".clearGroupAtInfoList conversationID:").concat(e3)), n3.type === E.CONV_TOPIC) { var o2 = n3.groupAtInfoList, s3 = this.getModule(Fn), a2 = e3.replace(E.CONV_GROUP, ""); s3.onConversationProxy({ topicID: a2, groupAtInfoList: o2 }); } true === t2 && this.emitConversationUpdate(true, false); } } }, { key: "updateReadReceiptInfo", value: function(e3) { var t2 = this, n3 = e3.userID, o2 = void 0 === n3 ? void 0 : n3, s3 = e3.groupID, a2 = void 0 === s3 ? void 0 : s3, i2 = e3.readReceiptList; if (!zt(i2)) { var r2 = []; if (it(o2)) { if (!it(a2)) { var u2 = "".concat(E.CONV_GROUP).concat(a2); i2.forEach(function(e4) { var n4 = e4.tinyID, o3 = e4.clientTime, s4 = e4.random, i3 = e4.readCount, c3 = e4.unreadCount, l2 = "".concat(n4, "-").concat(o3, "-").concat(s4), d2 = t2._messageListHandler.getLocalMessage(u2, l2), p2 = { groupID: a2, messageID: l2, readCount: 0, unreadCount: 0 }; d2 && (et(i3) && (d2.readReceiptInfo.readCount = i3, p2.readCount = i3), et(c3) && (d2.readReceiptInfo.unreadCount = c3, p2.unreadCount = c3), r2.push(p2)); }); } } else { var c2 = "".concat(E.CONV_C2C).concat(o2); i2.forEach(function(e4) { var n4 = e4.tinyID, s4 = e4.clientTime, a3 = e4.random, i3 = "".concat(n4, "-").concat(s4, "-").concat(a3), u3 = t2._messageListHandler.getLocalMessage(c2, i3); if (u3) { u3.readReceiptInfo.isPeerRead = true; var l2 = { userID: o2, messageID: i3, isPeerRead: true }; r2.push(l2); } }); } r2.length > 0 && this.emitOuterEvent(k.MESSAGE_READ_RECEIPT_RECEIVED, r2); } } }, { key: "recomputeGroupUnreadCount", value: function(e3) { var t2 = e3.conversationID, n3 = e3.count, o2 = this.getLocalConversation(t2); if (o2) { var s3 = o2.unreadCount, a2 = s3 - n3; a2 < 0 && (a2 = 0), o2.unreadCount = a2, Ve.l("".concat(this._n, ".recomputeGroupUnreadCount from ").concat(s3, " to ").concat(a2, ", conversationID:").concat(t2)); } } }, { key: "updateIsRead", value: function(e3) { var t2 = this.getLocalConversation(e3), n3 = this.getLocalMessageList(e3); if (t2 && 0 !== n3.length && !Lt(t2.type)) { for (var o2 = [], s3 = 0, a2 = n3.length; s3 < a2; s3++) "in" !== n3[s3].flow ? "out" !== n3[s3].flow || n3[s3].isRead || n3[s3].setIsRead(true) : o2.push(n3[s3]); var i2 = 0; if (t2.type === E.CONV_C2C) { var r2 = o2.slice(-t2.unreadCount).filter(function(e4) { return e4.isRevoked; }).length; i2 = o2.length - t2.unreadCount - r2; } else i2 = o2.length - t2.unreadCount; for (var u2 = 0; u2 < i2 && !o2[u2].isRead; u2++) o2[u2].setIsRead(true); } } }, { key: "deleteGroupAtTips", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".deleteGroupAtTips"); Ve.l("".concat(n3)); var o2 = this._conversationMap.get(e3); if (!o2) return Promise.resolve(); var s3 = o2.groupAtInfoList; if (0 === s3.length) return Promise.resolve(); var a2 = void 0; e3.startsWith(E.CONV_GROUP) && (a2 = e3.replace(E.CONV_GROUP, "")); var i2 = m(s3); if ((Dt({ groupID: a2 }) || kt(a2)) && 0 === (i2 = s3.filter(function(e4) { return !e4.atTypeArray.includes(E.CONV_AT_ALL); })).length) return this.clearGroupAtInfoList(e3, false), Promise.resolve(); var r2 = this.getMyUserID(); return this.request({ protocolName: Fo, requestData: { messageListToDelete: i2.map(function(e4) { return { from: e4.from, to: r2, messageSeq: e4.__sequence, messageRandom: e4.__random, groupID: it(e4.topicID) ? e4.groupID : e4.topicID }; }) } }).then(function() { return Ve.l("".concat(n3, " ok. count:").concat(s3.length)), t2.clearGroupAtInfoList(e3, false), Promise.resolve(); }).catch(function(e4) { return Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "appendToMessageList", value: function(e3) { this._messageListHandler.pushIn(e3); } }, { key: "setMessageRandom", value: function(e3) { this.singlyLinkedList.set(e3.random); } }, { key: "deleteMessageRandom", value: function(e3) { this.singlyLinkedList.delete(e3.random); } }, { key: "pushIntoMessageList", value: function(e3, t2, n3) { return !(!this._messageListHandler.pushIn(t2, n3) || this._isMessageFromCurrentInstance(t2) && !n3) && (e3.push(t2), true); } }, { key: "_isMessageFromCurrentInstance", value: function(e3) { return this.singlyLinkedList.has(e3.random); } }, { key: "revoke", value: function(e3, t2, n3) { return this._messageListHandler.revoke(e3, t2, n3); } }, { key: "getPeerReadTime", value: function(e3) { return this._peerReadTimeMap.get(e3); } }, { key: "recordPeerReadTime", value: function(e3, t2) { this._peerReadTimeMap.has(e3) ? this._peerReadTimeMap.get(e3) < t2 && this._peerReadTimeMap.set(e3, t2) : this._peerReadTimeMap.set(e3, t2); } }, { key: "updateMessageIsPeerReadProperty", value: function(e3, t2) { if (e3.startsWith(E.CONV_C2C) && t2 > 0) { var n3 = this._messageListHandler.updateMessageIsPeerReadProperty(e3, t2); if (n3.length > 0 && this.emitOuterEvent(k.MESSAGE_READ_BY_PEER, n3), this._conversationMap.has(e3)) { var o2 = this._conversationMap.get(e3).lastMessage; zt(o2) || o2.fromAccount === this.getMyUserID() && o2.lastTime <= t2 && !o2.isPeerRead && (o2.isPeerRead = true, this.emitConversationUpdate(true, false)); } } } }, { key: "updateMessageIsModifiedProperty", value: function(e3) { this._messageListHandler.updateMessageIsModifiedProperty(e3); } }, { key: "setCompleted", value: function(e3) { Ve.l("".concat(this._n, ".setCompleted. conversationID:").concat(e3)), this._completedMap.set(e3, true); } }, { key: "updateRoamingMessageKeyAndTime", value: function(e3, t2, n3) { this._roamingMessageKeyAndTimeMap.set(e3, { messageKey: t2, lastMessageTime: n3 }); } }, { key: "updateRoamingMessageSequence", value: function(e3, t2) { this._roamingMessageSequenceMap.set(e3, t2); } }, { key: "getConversationList", value: function(e3) { var t2 = this, n3 = "getConversationList", o2 = "".concat(this._n, ".").concat(n3), s3 = "pagingStatus:".concat(this._pagingStatus, ", local conversation count:").concat(this._conversationMap.size, ", options:").concat(e3); if (Ve.l("".concat(o2, ". ").concat(s3)), this._pagingStatus === $t.REJECTED) { var a2 = new Aa(n3); return a2.setMessage(s3), this.syncConversationList().then(function() { a2.setNetworkType(t2.getNetworkType()).end(); var n4 = t2._getConversationList(e3); return Ya({ conversationList: n4, isSyncCompleted: t2._isSyncCompleted() }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; a2.setError(e4, o3, s4).end(); }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4); }); } if (0 === this._conversationMap.size) { var i2 = new Aa(n3); return i2.setMessage(s3), this.syncConversationList().then(function() { i2.setNetworkType(t2.getNetworkType()).end(); var n4 = t2._getConversationList(e3); return Ya({ conversationList: n4, isSyncCompleted: t2._isSyncCompleted() }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; i2.setError(e4, o3, s4).end(); }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4); }); } var r2 = this._getConversationList(e3); return Ve.l("".concat(o2, ". returned conversation count:").concat(r2.length)), Xa({ conversationList: r2, isSyncCompleted: this._isSyncCompleted() }); } }, { key: "_getConversationList", value: function(e3) { if (it(e3)) return this.getLocalConversationList(); if (at(e3)) return 0 === e3.length ? [] : this.getLocalConversationList().filter(function(t3) { return e3.includes(t3.conversationID); }); if (st(e3)) { var t2 = e3.type, n3 = e3.markType, o2 = e3.groupName; return this.getLocalConversationList().filter(function(e4) { return (t2 !== E.CONV_C2C && t2 !== E.CONV_GROUP || e4.type === t2) && (!nt(o2) || e4.conversationGroupList.includes(o2)) && (!et(n3) || e4.markList.includes(n3)); }); } return []; } }, { key: "_handleC2CPeerReadTime", value: function() { var e3, t2 = D(this._conversationMap); try { for (t2.s(); !(e3 = t2.n()).done; ) { var n3 = v(e3.value, 2), o2 = n3[0], s3 = n3[1]; s3.type === E.CONV_C2C && (Ve.d("".concat(this._n, "._handleC2CPeerReadTime conversationID:").concat(o2, " peerReadTime:").concat(s3.peerReadTime)), this.recordPeerReadTime(o2, s3.peerReadTime)); } } catch (a2) { t2.e(a2); } finally { t2.f(); } } }, { key: "_isPagingGetGroupListCompleted", value: function() { return this.getModule(Pn).isPagingGetCompleted(); } }, { key: "_getLocalGroupCount", value: function() { return this.getModule(Pn).getLocalGroupList().length; } }, { key: "_hasLocalGroup", value: function(e3) { return this.getModule(Pn).hasLocalGroup(e3.replace(E.CONV_GROUP, "")); } }, { key: "getConversationProfile", value: function(e3) { var t2, n3 = this; if ((t2 = this._conversationMap.has(e3) ? this._conversationMap.get(e3) : new fi({ conversationID: e3, type: e3.slice(0, 3) === E.CONV_C2C ? E.CONV_C2C : E.CONV_GROUP }, this.isIntl()))._isInfoCompleted || t2.type === E.CONV_SYSTEM) return Xa({ conversation: t2 }); if (St(e3) && !this._hasLocalGroup(e3)) return Xa({ conversation: t2 }); var o2 = "".concat(this._n, ".").concat("getConversationProfile"), s3 = new Aa("getConversationProfile"); return Ve.l("".concat(o2, ". conversationID:").concat(e3, " remark:").concat(t2.remark, " lastMessage:"), t2.lastMessage), this._updateUserOrGroupProfileCompletely(t2).then(function(a2) { s3.setNetworkType(n3.getNetworkType()).setMessage("conversationID:".concat(e3, " unreadCount:").concat(a2.data.conversation.unreadCount)).end(); var i2 = n3.getModule(bn); if (i2 && t2.type === E.CONV_C2C) { var r2 = e3.replace(E.CONV_C2C, ""); if (i2.isMyFriend(r2)) { var u2 = i2.getFriendRemark(r2); t2.remark !== u2 && (t2.remark = u2, Ve.l("".concat(o2, ". conversationID:").concat(e3, " patch remark:").concat(t2.remark))); } } return Ve.l("".concat(o2, " ok. conversationID:").concat(e3)), a2; }).catch(function(t3) { return n3.probeNetwork().then(function(n4) { var o3 = v(n4, 2), a2 = o3[0], i2 = o3[1]; s3.setError(t3, a2, i2).setMessage("conversationID:".concat(e3)).end(); }), Ve.e("".concat(o2, " failed. error:"), t3), Za(t3); }); } }, { key: "_updateUserOrGroupProfileCompletely", value: function(e3) { var t2 = this; return e3.type === E.CONV_C2C ? this.getModule(Gn).getUserProfile({ userIDList: [e3.toAccount] }).then(function(n3) { var o2 = n3.data; return 0 === o2.length ? Za(new ja({ code: ha.USER_OR_GROUP_NOT_FOUND })) : (e3.userProfile = o2[0], e3._isInfoCompleted = true, t2._unshiftConversation(e3), Xa({ conversation: e3 })); }) : this.getModule(Pn).getGroupProfile({ groupID: e3.toAccount }).then(function(n3) { return e3.groupProfile = n3.data.group, e3._isInfoCompleted = true, t2._unshiftConversation(e3), Xa({ conversation: e3 }); }); } }, { key: "_unshiftConversation", value: function(e3) { e3 instanceof fi && !this._conversationMap.has(e3.conversationID) && (this._conversationMap = new Map([[e3.conversationID, e3]].concat(m(this._conversationMap))), this._setStorageConversationList(), this.emitConversationUpdate(true, false)); } }, { key: "_onProfileUpdated", value: function(e3) { var t2 = this; e3.data.forEach(function(e4) { var n3 = e4.userID; if (n3 === t2.getMyUserID()) t2._onMyProfileModified({ latestNick: e4.nick, latestAvatar: e4.avatar }); else { var o2 = t2._conversationMap.get("".concat(E.CONV_C2C).concat(n3)); o2 && (o2.userProfile = e4); } }); } }, { key: "_isSyncCompleted", value: function() { return this._pagingStatus === $t.RESOLVED; } }, { key: "_errorLog", value: function(e3, t2, n3, o2) { var s3 = new Error("Params validate failed."), a2 = "".concat(this.getErrorMessage("API_REFER")).concat(e3); throw Ve.w("[".concat(e3, "] | ").concat(t2, " | ").concat(this.getErrorMessage(n3, o2), ", ").concat(a2)), Ve.e("[".concat(e3, "] Invalid ").concat(t2, ": type check failed for ").concat(t2, ".")), s3; } }, { key: "_isValidConversationID", value: function(e3) { return Et(e3) || St(e3) || Lt(e3); } }, { key: "deleteConversation", value: function(e3) { var t2 = this, n3 = "deleteConversation"; return nt(e3) || ot(e3) || this._errorLog(n3, "options", "StringOrObjectRequiredLog"), nt(e3) ? (this._isValidConversationID(e3) || this._errorLog(n3, "options", "InvalidConversationID", e3), Ve.l("".concat(this._n, ".").concat(n3, " conversationID:").concat(e3)), this.deleteConversationList({ conversationIDList: [e3], flag: 1 })) : (at(e3.conversationIDList) || this._errorLog(n3, "conversationIDList", "ArrayRequiredLog"), 0 === e3.conversationIDList.length && this._errorLog(n3, "conversationIDList", "NonEmptyArrayLog"), e3.conversationIDList.forEach(function(e4) { t2._isValidConversationID(e4) || t2._errorLog(n3, "conversationIDList", "InvalidConversationID", e4); }), "clearHistoryMessage" in e3 && "boolean" != typeof e3.clearHistoryMessage && this._errorLog(n3, "clearHistoryMessage", "BooleanRequiredLog"), e3.conversationIDList.length > 100 && (e3.conversationIDList = e3.conversationIDList.slice(0, 100)), this.deleteConversationList(e3)); } }, { key: "deleteConversationList", value: function(e3) { var t2 = this, n3 = e3.conversationIDList, o2 = void 0 === n3 ? [] : n3, s3 = e3.clearHistoryMessage, a2 = void 0 === s3 || s3, i2 = e3.flag, r2 = void 0 === i2 ? 0 : i2, u2 = "".concat(this._n, ".").concat("deleteConversationList"); Ve.l("".concat(u2, " conversationIDList.length:").concat(o2.length, " clearHistoryMessage:").concat(a2)); var c2 = new Aa("deleteConversationList"); return c2.setMessage("conversationIDList:".concat(o2)), Promise.all([this.rmLocalOnlyConversationList(o2), this.rmLocalAndRemoteConversationList(o2, a2)]).then(function(e4) { c2.setNetworkType(t2.getNetworkType()).end(); var n4 = [].concat(m(e4[0]), m(e4[1])); return 0 === n4.length ? Za(new ja({ code: ha.CONVERSATION_NOT_FOUND })) : (Ve.l("".concat(u2, " ok")), Xa(1 === r2 ? { conversationID: n4[0] } : { conversationIDList: n4 })); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; c2.setError(e4, o3, s4).end(); }), Ve.e("".concat(u2, " failed. error:"), e4), Za(e4); }); } }, { key: "rmLocalOnlyConversationList", value: function(e3) { var t2 = this; return e3.filter(function(e4) { if (!t2._conversationMap.has(e4)) return false; var n3 = t2.getLocalConversation(e4).type; return n3 !== E.CONV_GROUP || t2._hasLocalGroup(e4) ? n3 === E.CONV_SYSTEM && (t2.getModule(Pn).deleteGroupSystemNotice({ messageList: t2._messageListHandler.getLocalMessageList(e4) }), t2.deleteLocalConversation(e4), true) : (t2.deleteLocalConversation(e4), true); }); } }, { key: "rmLocalAndRemoteConversationList", value: function(e3, t2) { var n3 = this, o2 = { fromAccount: this.getMyUserID(), conversationList: [], clearHistoryMessage: t2 ? 1 : 0 }; return e3.forEach(function(e4) { if (n3._conversationMap.has(e4)) { var t3 = n3.getLocalConversation(e4).type; t3 === E.CONV_C2C ? o2.conversationList.push({ toAccount: e4.replace(t3, ""), type: 1 }) : t3 === E.CONV_GROUP && n3._hasLocalGroup(e4) && o2.conversationList.push({ toGroupID: e4.replace(t3, ""), type: 2 }); } }), 0 === o2.conversationList.length ? [] : this.request({ protocolName: Po, requestData: o2 }).then(function(e4) { var t3 = []; return e4.data.resultList.length > 0 && e4.data.resultList.map(function(e5) { if (0 === e5.code) { var n4 = 1 === e5.type ? "".concat(E.CONV_C2C).concat(e5.to) : "".concat(E.CONV_GROUP).concat(e5.groupID); t3.push(n4); } }), n3.deleteLocalConversationList(t3), t3; }); } }, { key: "clearHistoryMessage", value: function(e3) { var t2 = this, n3 = { fromAccount: this.getMyUserID(), toAccount: void 0, type: void 0, toGroupID: void 0 }; if (!this._conversationMap.has(e3)) return Za({ code: ha.CONVERSATION_NOT_FOUND }); var o2 = this._conversationMap.get(e3).type; if (o2 === E.CONV_C2C) n3.type = 1, n3.toAccount = e3.replace(E.CONV_C2C, ""); else { if (o2 !== E.CONV_GROUP) return o2 === E.CONV_SYSTEM ? (this.getModule(Pn).deleteGroupSystemNotice({ messageList: this._messageListHandler.getLocalMessageList(e3) }), Xa({ conversationID: e3 })) : Za({ code: ha.CONVERSATION_UN_RECORDED_TYPE }); n3.type = 2, n3.toGroupID = e3.replace(E.CONV_GROUP, ""); } var s3 = "".concat(this._n, ".").concat("clearHistoryMessage"), a2 = new Aa("clearHistoryMessage"); return a2.setMessage("conversationID:".concat(e3)), Ve.l("".concat(s3, ". conversationID:").concat(e3)), this.setMessageRead({ conversationID: e3 }).then(function() { return t2.request({ protocolName: bo, requestData: n3 }); }).then(function() { a2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(s3, " ok")), t2._messageListHandler.removeByConversationID(e3), t2.setCompleted(e3); var n4 = t2.getLocalConversation(e3); return n4 && (n4.updateLastMessage(), t2._sortConversationListAndEmitEvent()), Xa({ conversationID: e3 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; a2.setError(e4, o3, s4).end(); }), Ve.e("".concat(s3, " failed. error:"), e4), Za(e4); }); } }, { key: "pinConversation", value: function(e3) { var t2 = this, n3 = e3.conversationID, o2 = e3.isPinned; if (!this._conversationMap.has(n3)) return Za({ code: ha.CONVERSATION_NOT_FOUND }); var s3 = this.getLocalConversation(n3); if (s3.isPinned === o2) return Xa({ conversationID: n3 }); var a2 = "".concat(this._n, ".").concat("pinConversation"), i2 = new Aa("pinConversation"); i2.setMessage("conversationID:".concat(n3, " isPinned:").concat(o2)), Ve.l("".concat(a2, ". conversationID:").concat(n3, " isPinned:").concat(o2)); var r2 = null; return Et(n3) ? r2 = { type: 1, toAccount: n3.replace(E.CONV_C2C, "") } : St(n3) && (r2 = { type: 2, groupID: n3.replace(E.CONV_GROUP, "") }), this.request({ protocolName: wo, requestData: { fromAccount: this.getMyUserID(), operationType: true === o2 ? 1 : 2, itemList: [r2] } }).then(function() { return i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(a2, " ok")), s3.isPinned !== o2 && (s3.isPinned = o2, t2._sortConversationListAndEmitEvent()), Ya({ conversationID: n3 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; i2.setError(e4, o3, s4).end(); }), Ve.e("".concat(a2, " failed. error:"), e4), Za(e4); }); } }, { key: "setMessageRemindType", value: function(e3) { return this._messageRemindHandler.set(e3); } }, { key: "patchMessageRemindType", value: function(e3) { var t2 = e3.ID, n3 = e3.isC2CConversation, o2 = e3.messageRemindType, s3 = false, a2 = this.getLocalConversation(n3 ? "".concat(E.CONV_C2C).concat(t2) : "".concat(E.CONV_GROUP).concat(t2)); return a2 && a2.messageRemindType !== o2 && (a2.messageRemindType = o2, s3 = true), Ve.d("".concat(this._n, ".patchMessageRemindType options:"), e3, "ret:".concat(s3)), s3; } }, { key: "onC2CMessageRemindTypeSynced", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".onC2CMessageRemindTypeSynced"); Ve.d(n3, e3), e3.dataList.forEach(function(e4) { if (!zt(e4.muteNotificationsSync)) { var o2, s3 = e4.muteNotificationsSync, a2 = s3.to, i2 = s3.updateSequence, r2 = s3.muteFlag; t2._messageRemindHandler.setUpdateSequence(i2), 0 === r2 ? o2 = E.MSG_REMIND_ACPT_AND_NOTE : 1 === r2 ? o2 = E.MSG_REMIND_DISCARD : 2 === r2 && (o2 = E.MSG_REMIND_ACPT_NOT_NOTE); var u2 = 0; t2.patchMessageRemindType({ ID: a2, isC2CConversation: true, messageRemindType: o2 }) && (u2 += 1), Ve.l("".concat(n3, " updateCount:").concat(u2)), u2 >= 1 && t2.emitConversationUpdate(true, false); } }); } }, { key: "onGroupMessageRemindTypeSynced", value: function(e3) { Ve.d("".concat(this._n, ".onGroupMessageRemindTypeSynced options:"), e3), this._messageRemindHandler.onGroupMessageRemindTypeUpdated(e3); } }, { key: "deleteLocalConversation", value: function(e3) { var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this._conversationMap.has(e3); if (Ve.d("".concat(this._n, ".deleteLocalConversation conversationID:").concat(e3, " has:").concat(n3)), n3 && (this._conversationMap.delete(e3), this._roamingMessageKeyAndTimeMap.has(e3) && this._roamingMessageKeyAndTimeMap.delete(e3), this._roamingMessageSequenceMap.has(e3) && this._roamingMessageSequenceMap.delete(e3), this._setStorageConversationList(), this._messageListHandler.removeByConversationID(e3), this._completedMap.delete(e3), t2)) { var o2 = !this._isTopicConversation(e3); this.emitConversationUpdate(o2, false); } } }, { key: "deleteLocalConversationList", value: function(e3) { var t2 = this, n3 = 0, o2 = false; e3.forEach(function(e4) { t2._conversationMap.has(e4) && (n3 += t2._conversationMap.get(e4).unreadCount || 0, t2.deleteLocalConversation(e4, false), o2 = true); }), Ve.l("".concat(this._n, ".deleteLocalConversationList conversationIDList.length:").concat(e3.length, " isConvIDExisted:").concat(o2)), o2 && (this.emitConversationUpdate(true, false), n3 > 0 && this.emitTotalUnreadMessageCountUpdate()); } }, { key: "isMessageSentByCurrentInstance", value: function(e3) { return !(!this._messageListHandler.hasLocalMessage(e3.conversationID, e3.ID) && !this.singlyLinkedList.has(e3.random)); } }, { key: "modifyMessageList", value: function(e3) { if (e3.startsWith(E.CONV_C2C) && this._conversationMap.has(e3)) { var t2 = this._conversationMap.get(e3), n3 = Date.now(); this._messageListHandler.modifyMessageSentByPeer({ conversationID: e3, latestNick: t2.userProfile.nick, latestAvatar: t2.userProfile.avatar }); var o2 = this.getModule(Gn).getNickAndAvatarByUserID(this.getMyUserID()); this._messageListHandler.modifyMessageSentByMe({ conversationID: e3, latestNick: o2.nick, latestAvatar: o2.avatar }), Ve.l("".concat(this._n, ".modifyMessageList conversationID:").concat(e3, " cost ").concat(Date.now() - n3, " ms")); } } }, { key: "updateUserProfileSpecifiedKey", value: function(e3) { Ve.l("".concat(this._n, ".updateUserProfileSpecifiedKey options:"), e3); var t2 = e3.conversationID, n3 = e3.nick, o2 = e3.avatar; if (this._conversationMap.has(t2)) { var s3 = this._conversationMap.get(t2).userProfile; nt(n3) && s3.nick !== n3 && (s3.nick = n3), nt(o2) && s3.avatar !== o2 && (s3.avatar = o2), this.emitConversationUpdate(true, false); } } }, { key: "_onMyProfileModified", value: function(e3) { var n3 = this, o2 = this.getLocalConversationList(), s3 = Date.now(); o2.forEach(function(o3) { n3.modifyMessageSentByMe(t({ conversationID: o3.conversationID }, e3)); }), Ve.l("".concat(this._n, "._onMyProfileModified. modify all messages sent by me, cost ").concat(Date.now() - s3, " ms")); } }, { key: "modifyMessageSentByMe", value: function(e3) { this._messageListHandler.modifyMessageSentByMe(e3); } }, { key: "getLatestMessageSentByMe", value: function(e3) { return this._messageListHandler.getLatestMessageSentByMe(e3); } }, { key: "modifyMessageSentByPeer", value: function(e3) { this._messageListHandler.modifyMessageSentByPeer(e3); } }, { key: "getLatestMessageSentByPeer", value: function(e3) { return this._messageListHandler.getLatestMessageSentByPeer(e3); } }, { key: "pushIntoNoticeResult", value: function(e3, t2) { return !(!this._messageListHandler.pushIn(t2) || this.singlyLinkedList.has(t2.random)) && (e3.push(t2), true); } }, { key: "getLocalLastMessage", value: function(e3) { return this._messageListHandler.getLocalLastMessage(e3); } }, { key: "checkAndPatchRemark", value: function() { var e3 = Promise.resolve(); if (0 === this._conversationMap.size) return e3; var t2 = this.getModule(bn); if (!t2) return e3; var n3 = m(this._conversationMap.values()).filter(function(e4) { return e4.type === E.CONV_C2C; }); if (0 === n3.length) return e3; var o2 = 0; return n3.forEach(function(e4) { var n4 = e4.conversationID.replace(E.CONV_C2C, ""); if (t2.isMyFriend(n4)) { var s3 = t2.getFriendRemark(n4); e4.remark !== s3 && (e4.remark = s3, o2 += 1); } }), Ve.l("".concat(this._n, ".checkAndPatchRemark. c2c conversation count:").concat(n3.length, ", patched count:").concat(o2)), e3; } }, { key: "updateTopicConversation", value: function(e3) { this._updateLocalConversationList({ conversationOptionsList: e3, isFromGetConversations: true }); } }, { key: "sendReadReceipt", value: function(e3) { var t2 = e3[0], n3 = null; return t2.conversationType === E.CONV_C2C ? n3 = this._m.getModule(Un) : t2.conversationType === E.CONV_GROUP && (n3 = this._m.getModule(Pn)), n3 ? n3.sendReadReceipt(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "getReadReceiptList", value: function(e3) { var t2 = e3[0], n3 = null; return t2.conversationType === E.CONV_C2C ? n3 = this._m.getModule(Un) : t2.conversationType === E.CONV_GROUP && (n3 = this._m.getModule(Pn)), n3 ? n3.getReadReceiptList(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "getLastMessageTime", value: function(e3) { var t2 = this.getLocalConversation(e3); return t2 ? t2.lastMessage.lastTime : 0; } }, { key: "getTotalUnreadMessageCount", value: function() { var e3 = this.getLocalConversationList(), t2 = 0; return e3.forEach(function(e4) { e4.type !== E.CONV_SYSTEM && ("" !== e4.messageRemindType && e4.messageRemindType !== E.MSG_REMIND_ACPT_AND_NOTE || (t2 += e4.unreadCount)); }), t2; } }, { key: "emitTotalUnreadMessageCountUpdate", value: function() { var e3 = this.getTotalUnreadMessageCount(); this._convTotalUnreadCount !== e3 && (Ve.l("".concat(this._n, ".emitTotalUnreadMessageCountUpdate from ").concat(this._convTotalUnreadCount, " to ").concat(e3)), this._convTotalUnreadCount = e3, this.emitOuterEvent(k.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED)); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._pagingStatus = $t.NOT_START, this._messageListHandler.reset(), this._messageRemindHandler.reset(), this._roamingMessageKeyAndTimeMap.clear(), this._roamingMessageSequenceMap.clear(), this.singlyLinkedList.reset(), this._peerReadTimeMap.clear(), this._completedMap.clear(), this._conversationMap.clear(), this._pagingTimeStamp = 0, this._pagingStartIndex = 0, this._pagingPinnedTimeStamp = 0, this._pagingPinnedStartIndex = 0, this._remoteGroupReadSequenceMap.clear(), this._convTotalUnreadCount = 0, this._pagingGetCostList.length = 0, this.resetReady(); } }]), s2; }(uo), yi = function() { function e2(t2) { o(this, e2), this._groupModule = t2, this._n = "GroupTipsHandler", this._cachedGroupTipsMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4, this._getTopicPendingMap = /* @__PURE__ */ new Map(); } return a(e2, [{ key: "onCheckTimer", value: function(e3) { e3 % 1 == 0 && this._cachedGroupTipsMap.size > 0 && this._checkCachedGroupTips(); } }, { key: "_checkCachedGroupTips", value: function() { var e3 = this; this._cachedGroupTipsMap.forEach(function(t2, n2) { var o2 = e3._checkCountMap.get(n2), s2 = e3._groupModule.hasLocalGroup(n2); Ve.l("".concat(e3._n, "._checkCachedGroupTips groupID:").concat(n2, " hasLocalGroup:").concat(s2, " checkCount:").concat(o2)), s2 ? (e3._notifyCachedGroupTips(n2), e3._checkCountMap.delete(n2), e3._groupModule.deleteUnjoinedAVChatRoom(n2)) : o2 >= e3.MAX_CHECK_COUNT ? (e3._deleteCachedGroupTips(n2), e3._checkCountMap.delete(n2)) : (o2++, e3._checkCountMap.set(n2, o2)); }); } }, { key: "onNewGroupTips", value: function(e3) { Ve.d("".concat(this._n, ".onReceiveGroupTips count:").concat(e3.dataList.length)); var t2 = this.newGroupTipsStoredAndSummary(e3), n2 = t2.eventDataList, o2 = t2.result, s2 = t2.AVChatRoomMessageList; (s2.length > 0 && this._groupModule.onAVChatRoomMessage(s2), n2.length > 0) && (this._groupModule.updateNextMessageSeq(n2), this._groupModule.getModule(qn).onNewMessage({ conversationOptionsList: n2, isInstantMessage: true })); o2.length > 0 && (this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, o2), this.handleMessageList(o2)); } }, { key: "newGroupTipsStoredAndSummary", value: function(e3) { for (var n2 = this, o2 = e3.event, s2 = e3.dataList, a2 = null, i2 = [], r2 = [], u2 = {}, c2 = [], l2 = function(e4, l3) { var d3 = It(s2[e4]); if (6 === o2) { if (n2._groupModule.isGroupAttributesUpdatedNotice(d3)) return "continue"; if (n2._groupModule.isGroupCountersNotice(d3)) return "continue"; } var p3 = d3.groupProfile, g2 = p3.groupID, h2 = p3.communityType, _2 = void 0 === h2 ? 0 : h2, f2 = p3.topicID, v2 = void 0 === f2 ? void 0 : f2, m2 = p3.invisible, M2 = void 0, y2 = n2._groupModule.isMessageFromTopic(_2, v2); if (y2) { M2 = E.CONV_TOPIC, d3.to = v2; var I2 = n2._groupModule.getModule(Fn); I2.hasLocalTopic(g2, v2) || n2._getTopicPendingMap.has(v2) || (n2._getTopicPendingMap.set(v2, 1), I2.getTopicList({ groupID: g2, topicIDList: [v2] }).finally(function() { n2._getTopicPendingMap.delete(v2); })); } var C2 = n2._groupModule.hasLocalGroup(g2); if (!C2 && n2._groupModule.isUnjoinedAVChatRoom(g2)) return "continue"; if (!C2 && !y2) return n2._cacheGroupTipsAndProbe({ groupID: g2, event: o2, item: d3 }), "continue"; if (n2._groupModule.isMessageFromOrToAVChatroom(g2)) return d3.event = o2, c2.push(d3), "continue"; if (d3.currentUser = n2._groupModule.getMyUserID(), d3.conversationType = E.CONV_GROUP, (a2 = new Wa(d3)).setElement({ type: E.MSG_GRP_TIP, content: t(t({}, d3.elements), {}, { groupProfile: d3.groupProfile }) }), a2.isSystemMessage = false, 1 === m2) return n2._qualityStat(a2), "continue"; var T2 = n2._groupModule.getModule(qn), D2 = a2, k2 = D2.conversationID, S2 = D2.sequence; if (6 === o2) a2._onlineOnlyFlag = true, r2.push(a2); else if (!T2.pushIntoNoticeResult(r2, a2)) return "continue"; if (n2._groupModule.isMessageFromCommunityOfTopic(_2, v2)) return "continue"; if (6 === o2 && T2.getLocalConversation(k2)) return "continue"; 6 !== o2 && n2._qualityStat(a2); var L2 = T2.isRemoteRead({ conversationID: k2, sequence: S2 }); if (it(u2[k2])) { var A2 = 0; "in" === a2.flow && (a2._isExcludedFromUnreadCount || a2._onlineOnlyFlag || L2 || (A2 = 1)), u2[k2] = i2.push({ conversationID: k2, unreadCount: A2, type: it(M2) ? a2.conversationType : M2, subType: a2.conversationSubType, lastMessage: a2._isExcludedFromLastMessage ? "" : a2 }) - 1; } else { var R2 = u2[k2]; i2[R2].type = a2.conversationType, i2[R2].subType = a2.conversationSubType, i2[R2].lastMessage = a2._isExcludedFromLastMessage ? "" : a2, "in" === a2.flow && (a2._isExcludedFromUnreadCount || a2._onlineOnlyFlag || L2 || i2[R2].unreadCount++); } }, d2 = 0, p2 = s2.length; d2 < p2; d2++) l2(d2); return { eventDataList: i2, result: r2, AVChatRoomMessageList: c2 }; } }, { key: "_qualityStat", value: function(e3) { this._groupModule.getModule(eo).addMessageSequence({ key: Ca, message: e3 }); } }, { key: "handleMessageList", value: function(e3) { var t2 = this; e3.forEach(function(e4) { switch (e4.payload.operationType) { case 1: t2._onNewMemberComeIn(e4); break; case 2: t2._onMemberQuit(e4); break; case 3: t2._onMemberKickedOut(e4); break; case 4: t2._onMemberSetAdmin(e4); break; case 5: t2._onMemberCancelledAdmin(e4); break; case 6: t2._onGroupProfileModified(e4); break; case 7: t2._onMemberInfoModified(e4); break; case 8: t2._onTopicProfileUpdated(e4); break; default: Ve.w("".concat(t2._n, ".handleMessageList unknown operationType:").concat(e4.payload.operationType)); } }); } }, { key: "_onNewMemberComeIn", value: function(e3) { var t2 = e3.payload, n2 = t2.memberNum, o2 = t2.groupProfile.groupID, s2 = this._groupModule.getLocalGroupProfile(o2); s2 && et(n2) && s2.memberCount !== n2 && (s2.memberCount = n2, this._updateConversationGroupProfile(s2)); } }, { key: "_onMemberQuit", value: function(e3) { var t2 = e3.payload, n2 = t2.memberNum, o2 = t2.groupProfile.groupID, s2 = this._groupModule.getLocalGroupProfile(o2); s2 && et(n2) && s2.memberCount !== n2 && (s2.memberCount = n2, this._updateConversationGroupProfile(s2)), this._groupModule.getModule(wn).deleteLocalGroupMembers(o2, e3.payload.userIDList); } }, { key: "_onMemberKickedOut", value: function(e3) { var t2 = e3.payload, n2 = t2.memberNum, o2 = t2.groupProfile.groupID, s2 = this._groupModule.getLocalGroupProfile(o2); s2 && et(n2) && s2.memberCount !== n2 && (s2.memberCount = n2, this._updateConversationGroupProfile(s2)), this._groupModule.getModule(wn).deleteLocalGroupMembers(o2, e3.payload.userIDList); } }, { key: "_updateConversationGroupProfile", value: function(e3) { this._groupModule.getModule(qn).updateConversationGroupProfile([e3]); } }, { key: "_onMemberSetAdmin", value: function(e3) { var t2 = e3.payload.groupProfile.groupID, n2 = e3.payload.userIDList, o2 = this._groupModule.getModule(wn); n2.forEach(function(e4) { var n3 = o2.getLocalGroupMemberInfo(t2, e4); n3 && n3.updateRole(E.GRP_MBR_ROLE_ADMIN); }); } }, { key: "_onMemberCancelledAdmin", value: function(e3) { var t2 = e3.payload.groupProfile.groupID, n2 = e3.payload.userIDList, o2 = this._groupModule.getModule(wn); n2.forEach(function(e4) { var n3 = o2.getLocalGroupMemberInfo(t2, e4); n3 && n3.updateRole(E.GRP_MBR_ROLE_MEMBER); }); } }, { key: "_onGroupProfileModified", value: function(e3) { var t2 = this, n2 = e3.payload, o2 = n2.newGroupProfile, s2 = n2.groupProfile.groupID, a2 = this._groupModule.getLocalGroupProfile(s2); Object.keys(o2).forEach(function(e4) { switch (e4) { case "ownerID": t2._ownerChanged(a2, o2); break; case "groupName": a2.name = o2[e4]; break; default: a2[e4] = o2[e4]; } }); var i2 = !a2.isSupportTopic; this._groupModule.emitGroupListUpdate(true, i2); } }, { key: "_ownerChanged", value: function(e3, t2) { var n2 = e3.groupID, o2 = this._groupModule.getLocalGroupProfile(n2), s2 = this._groupModule.getMyUserID(); if (s2 === t2.ownerID) { o2.updateGroup({ selfInfo: { role: E.GRP_MBR_ROLE_OWNER } }); var a2 = this._groupModule.getModule(wn), i2 = a2.getLocalGroupMemberInfo(n2, s2), r2 = this._groupModule.getLocalGroupProfile(n2).ownerID, u2 = a2.getLocalGroupMemberInfo(n2, r2); i2 && i2.updateRole(E.GRP_MBR_ROLE_OWNER), u2 && u2.updateRole(E.GRP_MBR_ROLE_MEMBER); } } }, { key: "_onMemberInfoModified", value: function(e3) { var t2 = e3.to, n2 = e3.payload, o2 = n2.groupProfile, s2 = n2.memberList, a2 = o2.groupID; kt(t2) && this._updateTopicMuteTime(e3); var i2 = this._groupModule.getModule(wn); s2.forEach(function(e4) { var t3 = i2.getLocalGroupMemberInfo(a2, e4.userID); t3 && et(e4.muteTime) && t3.updateMuteUntil(e4.muteTime); }); } }, { key: "_updateTopicMuteTime", value: function(e3) { var t2 = e3.to, n2 = e3.payload, o2 = n2.groupProfile, s2 = n2.memberList, a2 = void 0 === s2 ? [] : s2, i2 = this._groupModule.getModule(Fn), r2 = o2.groupID, u2 = i2.getLocalTopic(r2, t2); if (u2) { for (var c2 = false, l2 = 0; l2 < a2.length; l2++) { var d2 = a2[l2]; if (d2.userID === this._groupModule.getMyUserID() && d2.muteTime >= 0) { u2.updateSelfInfo({ muteTime: d2.muteTime }), c2 = true; break; } } c2 && this._groupModule.emitOuterEvent(k.TOPIC_UPDATED, { groupID: r2, topic: u2 }); } } }, { key: "_onTopicProfileUpdated", value: function(e3) { var n2 = e3.payload, o2 = n2.groupProfile.groupID, s2 = n2.newTopicInfo; this._groupModule.getModule(Fn).onTopicProfileUpdated(t({ groupID: o2, topicID: e3.to }, s2)); } }, { key: "_cacheGroupTips", value: function(e3, t2) { this._cachedGroupTipsMap.has(e3) || this._cachedGroupTipsMap.set(e3, []), this._cachedGroupTipsMap.get(e3).push(t2); } }, { key: "_deleteCachedGroupTips", value: function(e3) { this._cachedGroupTipsMap.has(e3) && this._cachedGroupTipsMap.delete(e3); } }, { key: "_notifyCachedGroupTips", value: function(e3) { var t2 = this, n2 = this._cachedGroupTipsMap.get(e3) || []; n2.forEach(function(e4) { t2.onNewGroupTips(e4); }), this._deleteCachedGroupTips(e3), Ve.l("".concat(this._n, "._notifyCachedGroupTips groupID:").concat(e3, " count:").concat(n2.length)); } }, { key: "_cacheGroupTipsAndProbe", value: function(e3) { var t2 = this, n2 = e3.groupID, o2 = e3.event, s2 = e3.item; this._cacheGroupTips(n2, { event: o2, dataList: [s2] }), this._groupModule.getGroupSimplifiedInfo(n2).then(function(e4) { e4.type === E.GRP_AVCHATROOM ? t2._groupModule.hasLocalGroup(n2) ? t2._notifyCachedGroupTips(n2) : t2._groupModule.setUnjoinedAVChatRoom(n2) : (t2._groupModule.updateGroupMap([e4]), t2._notifyCachedGroupTips(n2)); }), this._checkCountMap.has(n2) || this._checkCountMap.set(n2, 0), Ve.l("".concat(this._n, "._cacheGroupTipsAndProbe groupID:").concat(n2)); } }, { key: "reset", value: function() { this._cachedGroupTipsMap.clear(), this._checkCountMap.clear(), this._getTopicPendingMap.clear(); } }]), e2; }(), Ii = function() { function e2(t2) { o(this, e2), this._groupModule = t2, this._n = "CommonGroupHandler", this.tempConversationList = null, this._cachedGroupMessageMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4, this._getTopicPendingMap = /* @__PURE__ */ new Map(), this._isPagingGetCompleted = false, t2.getInnerEmitterInstance().once(ei, this._initGroupList, this); } return a(e2, [{ key: "onCheckTimer", value: function(e3) { e3 % 1 == 0 && this._cachedGroupMessageMap.size > 0 && this._checkCachedGroupMessage(); } }, { key: "_checkCachedGroupMessage", value: function() { var e3 = this; this._cachedGroupMessageMap.forEach(function(t2, n2) { var o2 = e3._checkCountMap.get(n2), s2 = e3._groupModule.hasLocalGroup(n2); Ve.l("".concat(e3._n, "._checkCachedGroupMessage groupID:").concat(n2, " hasLocalGroup:").concat(s2, " checkCount:").concat(o2)), s2 ? (e3._notifyCachedGroupMessage(n2), e3._checkCountMap.delete(n2), e3._groupModule.deleteUnjoinedAVChatRoom(n2)) : o2 >= e3.MAX_CHECK_COUNT ? (e3._deleteCachedGroupMessage(n2), e3._checkCountMap.delete(n2)) : (o2++, e3._checkCountMap.set(n2, o2)); }); } }, { key: "_initGroupList", value: function() { var e3 = this; Ve.l("".concat(this._n, "._initGroupList")); var t2 = new Aa("getGroupListInStorage"), n2 = this._groupModule.getStorageGroupList(); if (at(n2) && n2.length > 0) { n2.forEach(function(t3) { e3._groupModule.initGroupMap(t3); }), this._groupModule.emitGroupListUpdate(true, false); var o2 = this._groupModule.getLocalGroupList().length; t2.setNetworkType(this._groupModule.getNetworkType()).setMessage("group count:".concat(o2)).end(); } else t2.setNetworkType(this._groupModule.getNetworkType()).setMessage("group count:0").end(); Ve.l("".concat(this._n, "._initGroupList ok")); } }, { key: "handleUpdateGroupLastMessage", value: function(e3) { var n2 = "".concat(this._n, ".handleUpdateGroupLastMessage"); if (Ve.l("".concat(n2, " conversation count:").concat(e3.length, ", local group count:").concat(this._groupModule.getLocalGroupList().length)), 0 !== this._groupModule.getGroupMap().size) { for (var o2, s2, a2, i2 = false, r2 = 0, u2 = e3.length; r2 < u2; r2++) (o2 = e3[r2]).type === E.CONV_GROUP && (s2 = o2.conversationID.split(/^GROUP/)[1], (a2 = this._groupModule.getLocalGroupProfile(s2)) && (a2.lastMessage = t({}, o2.lastMessage), i2 = true)); i2 && (this._groupModule.sortLocalGroupList(), this._groupModule.emitGroupListUpdate(true, false)); } else this.tempConversationList = e3; } }, { key: "onNewGroupMessage", value: function(e3) { Ve.d("".concat(this._n, ".onNewGroupMessage count:").concat(e3.dataList.length)); var t2 = this._newGroupMessageStoredAndSummary(e3), n2 = t2.conversationOptionsList, o2 = t2.messageList, s2 = t2.AVChatRoomMessageList; (s2.length > 0 && this._groupModule.onAVChatRoomMessage(s2), this._groupModule.filterModifiedMessage(o2), n2.length > 0) && (this._groupModule.updateNextMessageSeq(n2), this._groupModule.getModule(qn).onNewMessage({ conversationOptionsList: n2, isInstantMessage: e3.isInstantMessage || true, updateUnreadCount: e3.updateUnreadCount || true })); var a2 = this._groupModule.filterUnmodifiedMessage(o2); a2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, a2), o2.length = 0; } }, { key: "_newGroupMessageStoredAndSummary", value: function(e3) { var t2 = this, n2 = e3.dataList, o2 = e3.event, s2 = e3.isInstantMessage, a2 = null, i2 = [], r2 = [], u2 = [], c2 = {}, l2 = this._groupModule.getModule(Kn), d2 = this._groupModule.getFileDownloadProxy(), p2 = n2.length; p2 > 1 && n2.sort(function(e4, t3) { return e4.sequence - t3.sequence; }); for (var g2 = function(e4) { var p3 = It(n2[e4]), g3 = p3.groupProfile, h3 = g3.groupID, _2 = g3.communityType, f2 = void 0 === _2 ? 0 : _2, v2 = g3.topicID, m2 = void 0 === v2 ? void 0 : v2, M2 = g3.invisible, y2 = void 0, I2 = t2._groupModule.isMessageFromTopic(f2, m2); if (I2) { y2 = E.CONV_TOPIC, p3.to = m2; var C2 = t2._groupModule.getModule(Fn); C2.hasLocalTopic(h3, m2) || t2._getTopicPendingMap.has(m2) || (t2._getTopicPendingMap.set(m2, 1), C2.getTopicList({ groupID: h3, topicIDList: [m2] }).finally(function() { t2._getTopicPendingMap.delete(m2); })); } var T2 = t2._groupModule.hasLocalGroup(h3); if (!T2 && t2._groupModule.isUnjoinedAVChatRoom(h3)) return "continue"; if (!T2 && !I2) return t2._cacheGroupMessageAndProbe({ groupID: h3, event: o2, item: p3 }), "continue"; if (t2._groupModule.isMessageFromOrToAVChatroom(h3)) return p3.event = o2, u2.push(p3), "continue"; if (p3.currentUser = t2._groupModule.getMyUserID(), p3.conversationType = E.CONV_GROUP, p3.isSystemMessage = !!p3.isSystemMessage, a2 = new Wa(p3), p3.elements = l2.parseElements(p3.elements, p3.from), a2.setElement(p3.elements, d2), 1 === M2) return t2._qualityStat(s2, a2), "continue"; var D2 = 1 === n2[e4].isModified, k2 = t2._groupModule.getModule(qn); if (k2.isMessageSentByCurrentInstance(a2) ? a2.isModified = D2 : D2 = false, 1 === p3.onlineOnlyFlag) a2._onlineOnlyFlag = true, k2.isMessageSentByCurrentInstance(a2) || r2.push(a2); else { if (t2._groupModule.isMessageFromCommunityOfTopic(f2, m2)) return r2.push(a2), "continue"; if (!k2.pushIntoMessageList(r2, a2, D2)) return "continue"; t2._qualityStat(s2, a2); var S2 = a2, L2 = S2.conversationID, A2 = S2.sequence, R2 = k2.isRemoteRead({ conversationID: L2, sequence: A2 }); if (it(c2[L2])) { var N2 = 0; "in" === a2.flow && (a2._isExcludedFromUnreadCount || R2 || (N2 = 1)), c2[L2] = i2.push({ conversationID: L2, unreadCount: N2, type: it(y2) ? a2.conversationType : y2, subType: a2.conversationSubType, lastMessage: a2._isExcludedFromLastMessage ? "" : a2 }) - 1; } else { var O2 = c2[L2]; i2[O2].type = it(y2) ? a2.conversationType : y2, i2[O2].subType = a2.conversationSubType, i2[O2].lastMessage = a2._isExcludedFromLastMessage ? "" : a2, "in" === a2.flow && (a2._isExcludedFromUnreadCount || R2 || i2[O2].unreadCount++); } } }, h2 = 0; h2 < p2; h2++) g2(h2); return { conversationOptionsList: i2, messageList: r2, AVChatRoomMessageList: u2 }; } }, { key: "_qualityStat", value: function(e3, t2) { var n2 = this._groupModule.getModule(eo); n2.addMessageSequence({ key: Ca, message: t2 }), e3 && t2.clientTime > 0 && n2.addMessageDelay(t2.clientTime); } }, { key: "onGroupMessageRevoked", value: function(e3) { var t2 = this._groupModule.getModule(qn), n2 = [], o2 = null, s2 = true; e3.dataList.forEach(function(e4) { var a2 = e4.elements.revokedInfos; it(a2) || a2.forEach(function(e5) { var a3 = zt(e5.topicID) ? "GROUP".concat(e5.groupID) : "GROUP".concat(e5.topicID); o2 = t2.revoke(a3, e5.sequence, e5.random); var i2 = e5.revokerInfo && e5.revokerInfo.revoker; if (o2) o2.revoker = i2, n2.push(o2); else { var r2 = { conversationID: a3, to: e5.topicID || "", sequence: e5.sequence, time: e5.time, revoker: i2 }; t2.isLastMessageRevoked(r2) && (n2.push(r2), s2 = false); } }); }), 0 !== n2.length && (t2.onMessageRevoked(n2), true === s2 && (Ve.l("".concat(this._n, ".onGroupMessageRevoked count:").concat(n2.length)), this._groupModule.emitOuterEvent(k.MESSAGE_REVOKED, n2))); } }, { key: "_groupListTreeShaking", value: function(e3) { for (var t2 = new Map(m(this._groupModule.getGroupMap())), n2 = 0, o2 = e3.length; n2 < o2; n2++) t2.delete(e3[n2].groupID); this._groupModule.hasJoinedAVChatRoom() && this._groupModule.getJoinedAVChatRoom().forEach(function(e4) { t2.delete(e4); }); this._groupModule.getGroupMap().forEach(function(e4, n3) { e4.isSupportTopic && t2.delete(n3); }); for (var s2 = m(t2.keys()), a2 = 0, i2 = s2.length; a2 < i2; a2++) this._groupModule.deleteGroup(s2[a2]); } }, { key: "getGroupList", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".").concat("getGroupList"), o2 = new Aa("getGroupList"); Ve.l("".concat(n2)); var s2 = { introduction: "Introduction", notification: "Notification", createTime: "CreateTime", ownerID: "Owner_Account", lastInfoTime: "LastInfoTime", memberNum: "MemberNum", maxMemberNum: "MaxMemberNum", joinOption: "ApplyJoinOption", inviteOption: "InviteJoinOption", muteAllMembers: "ShutUpAllMember" }, a2 = ["Type", "Name", "FaceUrl", "NextMsgSeq", "LastMsgTime", "AtInfoList", "LastRecallTime"], i2 = []; e3 && e3.groupProfileFilter && e3.groupProfileFilter.forEach(function(e4) { s2[e4] && a2.push(s2[e4]); }); var r2 = (e3 || {}).isGroupWithTopicOnly, u2 = void 0 !== r2 && r2; return this._pagingGetGroupList({ limit: 50, offset: 0, groupBaseInfoFilter: a2, groupList: i2, isGroupWithTopicOnly: u2 }).then(function() { Ve.l("".concat(n2, " ok. count:").concat(i2.length, " isGroupWithTopicOnly:").concat(u2)), u2 || t2._groupListTreeShaking(i2), t2._groupModule.updateGroupMap(i2); var e4 = t2._groupModule.getLocalGroupList().length; o2.setNetworkType(t2._groupModule.getNetworkType()).setMessage("remote count:".concat(i2.length, ", after tree shaking, local count:").concat(e4, ", isGroupWithTopicOnly:").concat(u2)).end(), t2.tempConversationList && (t2.handleUpdateGroupLastMessage(t2.tempConversationList), t2.tempConversationList = null), t2._groupModule.patchGroupMessageRemindType(), t2._groupModule.recomputeUnreadCount(), t2._groupModule.emitGroupListUpdate(true, !u2); var s3 = t2._groupModule.getLocalGroupList(); if (u2) { var a3 = s3.filter(function(e5) { return true === e5.isSupportTopic; }); return Ya({ groupList: a3 }); } return t2._isPagingGetCompleted = true, Ya({ groupList: s3 }); }).catch(function(e4) { return t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1]; o2.setError(e4, s3, a3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "isPagingGetCompleted", value: function() { return this._isPagingGetCompleted; } }, { key: "_pagingGetGroupList", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".").concat("_pagingGetGroupList"), o2 = e3.isCommunityRelay, s2 = void 0 !== o2 && o2, a2 = e3.isGroupWithTopicOnly, i2 = void 0 !== a2 && a2, r2 = e3.limit, u2 = e3.offset, c2 = e3.groupBaseInfoFilter, l2 = e3.groupList; if (i2) return this._pagingGetGroupListWithTopic({ limit: r2, offset: u2, groupBaseInfoFilter: c2, groupList: l2 }); var d2 = new Aa("_pagingGetGroupList"); return this._groupModule.request({ protocolName: jo, requestData: { type: s2 ? E.GRP_COMMUNITY : void 0, memberAccount: this._groupModule.getMyUserID(), limit: r2, offset: u2, responseFilter: { groupBaseInfoFilter: c2, selfInfoFilter: ["Role", "JoinTime", "MsgFlag", "MsgSeq"] } } }).then(function(e4) { var o3 = e4.data, a3 = o3.groups, i3 = void 0 === a3 ? [] : a3, p2 = o3.totalCount; l2.push.apply(l2, m(i3)), t2._handleGroupAtInfoWithoutTopic(s2, i3); var g2 = u2 + r2, h2 = !(p2 > g2), _2 = "offset:".concat(u2, " totalCount:").concat(p2, " isCompleted:").concat(h2, " ") + "currentCount:".concat(l2.length, " isCommunityRelay:").concat(s2); return d2.setNetworkType(t2._groupModule.getNetworkType()).setMessage("".concat(_2)).end(), s2 || h2 ? !s2 && h2 ? (Ve.l("".concat(n2, " start to get community list")), u2 = 0, t2._pagingGetGroupList({ limit: r2, offset: u2, groupBaseInfoFilter: c2, groupList: l2, isCommunityRelay: true })) : s2 && !h2 ? (u2 = g2, t2._pagingGetGroupList({ limit: r2, offset: u2, groupBaseInfoFilter: c2, groupList: l2, isCommunityRelay: true })) : (Ve.l("".concat(n2, " ok. totalCount:").concat(l2.length)), Ya({ groupList: l2 })) : (u2 = g2, t2._pagingGetGroupList({ limit: r2, offset: u2, groupBaseInfoFilter: c2, groupList: l2 })); }).catch(function(e4) { return 11e3 !== e4.code && t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], a3 = n3[1]; d2.setMessage("isCommunityRelay:".concat(s2)).setError(e4, o3, a3).end(); }), s2 ? (11e3 === e4.code && (d2 = null, Ve.l("".concat(n2, " ok. community unavailable"))), Xa({ groupList: l2 })) : Za(e4); }); } }, { key: "_pagingGetGroupListWithTopic", value: function(e3) { var t2 = this, n2 = "".concat(this._n, "._pagingGetGroupListWithTopic"), o2 = e3.limit, s2 = e3.offset, a2 = e3.groupBaseInfoFilter, i2 = e3.groupList, r2 = new Aa("pagingGetGroupListWithTopic"); return this._groupModule.request({ protocolName: jo, requestData: { type: E.GRP_COMMUNITY, memberAccount: this._groupModule.getMyUserID(), limit: o2, offset: s2, responseFilter: { groupBaseInfoFilter: a2, selfInfoFilter: ["Role", "JoinTime", "MsgFlag", "MsgSeq"] }, isSupportTopic: 1 } }).then(function(e4) { var u2 = e4.data, c2 = u2.groups, l2 = void 0 === c2 ? [] : c2, d2 = u2.totalCount; i2.push.apply(i2, m(l2)); var p2 = s2 + o2, g2 = !(d2 > p2), h2 = "offset:".concat(s2, " totalCount:").concat(d2, " isCompleted:").concat(g2, " ") + "currentCount:".concat(i2.length); return r2.setNetworkType(t2._groupModule.getNetworkType()).setMessage("".concat(h2)).end(), g2 ? (Ve.l("".concat(n2, " ok. totalCount:").concat(i2.length)), Ya({ groupList: i2 })) : (s2 = p2, t2._pagingGetGroupListWithTopic({ limit: o2, offset: s2, groupBaseInfoFilter: a2, groupList: i2 })); }).catch(function(e4) { return t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; r2.setError(e4, o3, s3).end(); }), Za(e4); }); } }, { key: "_cacheGroupMessage", value: function(e3, t2) { this._cachedGroupMessageMap.has(e3) || this._cachedGroupMessageMap.set(e3, []), this._cachedGroupMessageMap.get(e3).push(t2); } }, { key: "_deleteCachedGroupMessage", value: function(e3) { this._cachedGroupMessageMap.has(e3) && this._cachedGroupMessageMap.delete(e3); } }, { key: "_notifyCachedGroupMessage", value: function(e3) { var t2 = this, n2 = this._cachedGroupMessageMap.get(e3) || []; n2.forEach(function(e4) { t2.onNewGroupMessage(e4); }), this._deleteCachedGroupMessage(e3), Ve.l("".concat(this._n, "._notifyCachedGroupMessage groupID:").concat(e3, " count:").concat(n2.length)); } }, { key: "_cacheGroupMessageAndProbe", value: function(e3) { var t2 = this, n2 = e3.groupID, o2 = e3.event, s2 = e3.item; this._cacheGroupMessage(n2, { event: o2, dataList: [s2] }), this._groupModule.getGroupSimplifiedInfo(n2).then(function(e4) { e4.type === E.GRP_AVCHATROOM ? t2._groupModule.hasLocalGroup(n2) ? t2._notifyCachedGroupMessage(n2) : t2._groupModule.setUnjoinedAVChatRoom(n2) : (t2._groupModule.updateGroupMap([e4]), t2._notifyCachedGroupMessage(n2)); }), this._checkCountMap.has(n2) || this._checkCountMap.set(n2, 0), Ve.l("".concat(this._n, "._cacheGroupMessageAndProbe groupID:").concat(n2)); } }, { key: "_handleGroupAtInfoWithoutTopic", value: function(e3, n2) { var o2 = this; e3 && 0 !== n2.length && n2.forEach(function(e4) { var n3 = e4.groupID, s2 = e4.groupAtInfoList, a2 = []; it(s2) || (s2.forEach(function(e5) { a2.push(t(t({}, e5), {}, { groupID: n3 })); }), o2._groupModule.getModule(qn).onNewGroupAtTips({ dataList: a2 })); }); } }, { key: "reset", value: function() { this._cachedGroupMessageMap.clear(), this._checkCountMap.clear(), this._getTopicPendingMap.clear(), this._isPagingGetCompleted = false, this._groupModule.getInnerEmitterInstance().once(ei, this._initGroupList, this); } }]), e2; }(), Ci = 1, Ti = 2, Di = 3, ki = 4, Ei = 5, Si = function() { function e2(t2) { o(this, e2), this._groupModule = t2, this._n = "GroupAttributesHandler", this._groupAttributesMap = /* @__PURE__ */ new Map(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4, this._groupModule.getInnerEmitterInstance().on(ti, this._onCloudConfigUpdated, this); } return a(e2, [{ key: "_onCloudConfigUpdated", value: function() { var e3 = this._groupModule.getCloudConfig("grp_attr_cache_time"); it(e3) || (this.CACHE_EXPIRE_TIME = Number(e3)); } }, { key: "updateLocalMainSequenceOnReconnected", value: function() { this._groupAttributesMap.forEach(function(e3) { e3.localMainSequence = 0; }); } }, { key: "isGroupAttributesUpdatedNotice", value: function(e3) { var t2 = e3.to, n2 = e3.elements.newGroupProfile, o2 = !it(n2) && !zt(n2.groupAttributeOption); return o2 && this._onGroupAttributesUpdated({ groupID: t2, groupAttributeOption: n2.groupAttributeOption }), o2; } }, { key: "_onGroupAttributesUpdated", value: function(e3) { var t2 = this, n2 = e3.groupID, o2 = e3.groupAttributeOption, s2 = o2.mainSequence, a2 = o2.isWithChangedAttributeInfo, i2 = o2.groupAttributeList, r2 = void 0 === i2 ? [] : i2, u2 = o2.operationType; if (Ve.l("".concat(this._n, ".onGroupAttributesUpdated. ") + "groupID:".concat(n2, " isWithChangedAttributeInfo:").concat(a2, " operationType:").concat(u2)), !it(u2)) { this._groupAttributesCopy = this._getCachedAttributes({ groupID: n2 }); var c2 = s2 - this._getLocalGroupAttributes(n2).localMainSequence; if (0 !== c2) { if (1 === a2 && 1 === c2) return this._refreshCachedGroupAttributes({ groupID: n2, remoteMainSequence: s2, groupAttributeList: r2, operationType: u2 }), void this._emitGroupAttributesUpdated(n2); if (this._hasLocalGroupAttributes(n2)) { var l2 = this._getLocalGroupAttributes(n2).avChatRoomKey; this._getGroupAttributes({ groupID: n2, avChatRoomKey: l2 }).then(function() { t2._emitGroupAttributesUpdated(n2); }); } } } } }, { key: "initGroupAttributesCache", value: function(e3) { var t2 = e3.groupID, n2 = e3.avChatRoomKey, o2 = void 0 === n2 ? void 0 : n2; this._groupAttributesMap.set(t2, { lastUpdateTime: 0, localMainSequence: 0, remoteMainSequence: 0, attributes: /* @__PURE__ */ new Map(), avChatRoomKey: o2 }), Ve.l("".concat(this._n, ".initGroupAttributesCache groupID:").concat(t2, " avChatRoomKey:").concat(o2)); } }, { key: "initGroupAttributes", value: function(e3) { var t2 = this, n2 = e3.groupID, o2 = e3.groupAttributes, s2 = this._getLocalGroupAttributes(n2), a2 = s2.remoteMainSequence, i2 = s2.avChatRoomKey, r2 = new Aa("initGroupAttributes"); return r2.setMessage("groupID:".concat(n2, " avChatRoomKey:").concat(i2, " mainSequence:").concat(a2)), this._groupModule.request({ protocolName: Is, requestData: { groupID: n2, avChatRoomKey: i2, mainSequence: a2, groupAttributeList: this._transformGroupAttributes(o2) } }).then(function(e4) { Ve.l("".concat(t2._n, ".").concat("initGroupAttributes", " ok. groupID:").concat(n2)); var s3 = e4.data, a3 = s3.mainSequence, i3 = m(s3.groupAttributeList); return i3.forEach(function(e5) { e5.value = o2[e5.key]; }), t2._groupAttributesCopy = t2._getCachedAttributes({ groupID: n2 }), t2._refreshCachedGroupAttributes({ groupID: n2, remoteMainSequence: a3, groupAttributeList: i3, operationType: Ci }), t2._emitGroupAttributesUpdated(n2), r2.setNetworkType(t2._groupModule.getNetworkType()).end(), Ya({ groupAttributes: o2 }); }).catch(function(e4) { return t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; r2.setError(e4, o3, s3).end(); }), Za(e4); }); } }, { key: "setGroupAttributes", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".").concat("setGroupAttributes"), o2 = e3.groupID, s2 = e3.groupAttributes, a2 = this._getLocalGroupAttributes(o2), i2 = a2.remoteMainSequence, r2 = a2.avChatRoomKey, u2 = a2.attributes, c2 = this._transformGroupAttributes(s2); c2.forEach(function(e4) { var t3 = e4.key; e4.sequence = 0, u2.has(t3) && (e4.sequence = u2.get(t3).sequence); }); var l2 = new Aa("setGroupAttributes"); return l2.setMessage("groupID:".concat(o2, " groupAttributes:").concat(JSON.stringify(s2))), Ve.l("".concat(n2, ". groupID:").concat(o2, " mainSequence:").concat(i2)), this._groupModule.request({ protocolName: Cs, requestData: { groupID: o2, avChatRoomKey: r2, mainSequence: i2, groupAttributeList: c2 } }).then(function(e4) { Ve.l("".concat(n2, " ok.")); var a3 = e4.data, i3 = a3.mainSequence, r3 = m(a3.groupAttributeList); return r3.forEach(function(e5) { e5.value = s2[e5.key]; }), t2._groupAttributesCopy = t2._getCachedAttributes({ groupID: o2 }), t2._refreshCachedGroupAttributes({ groupID: o2, remoteMainSequence: i3, groupAttributeList: r3, operationType: Ti }), t2._emitGroupAttributesUpdated(o2), l2.setNetworkType(t2._groupModule.getNetworkType()).end(), Ya({ groupAttributes: s2 }); }).catch(function(e4) { return t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; l2.setError(e4, o3, s3).end(); }), Za(e4); }); } }, { key: "deleteGroupAttributes", value: function(e3) { var t2 = this, n2 = e3.groupID, o2 = e3.keyList, s2 = void 0 === o2 ? [] : o2, a2 = this._getLocalGroupAttributes(n2), i2 = a2.remoteMainSequence, r2 = a2.avChatRoomKey, u2 = a2.attributes, c2 = m(u2.keys()), l2 = Ds, d2 = Di, p2 = { groupID: n2, avChatRoomKey: r2, mainSequence: i2 }, g2 = []; s2.length > 0 && (c2 = [], l2 = Ts, d2 = ki, s2.forEach(function(e4) { var t3 = 0; u2.has(e4) && (t3 = u2.get(e4).sequence, c2.push(e4)), g2.push({ key: e4, sequence: t3 }); }), p2.groupAttributeList = g2); var h2 = new Aa("deleteGroupAttributes"); return h2.setMessage("groupID:".concat(n2, " mainSequence:").concat(i2, " keyList:").concat(s2, " protocolName:").concat(l2)), this._groupModule.request({ protocolName: l2, requestData: p2 }).then(function(e4) { Ve.l("".concat(t2._n, ".").concat("deleteGroupAttributes", " ok. groupID:").concat(n2)); var o3 = e4.data.mainSequence; return t2._groupAttributesCopy = t2._getCachedAttributes({ groupID: n2 }), t2._refreshCachedGroupAttributes({ groupID: n2, remoteMainSequence: o3, groupAttributeList: g2, operationType: d2 }), t2._emitGroupAttributesUpdated(n2), h2.setNetworkType(t2._groupModule.getNetworkType()).end(), Ya({ keyList: c2 }); }).catch(function(e4) { return t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; h2.setError(e4, o3, s3).end(); }), Za(e4); }); } }, { key: "getGroupAttributes", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".").concat("getGroupAttributes"), o2 = e3.groupID, s2 = this._getLocalGroupAttributes(o2), a2 = s2.avChatRoomKey, i2 = s2.lastUpdateTime, r2 = s2.localMainSequence, u2 = s2.remoteMainSequence, c2 = new Aa("getGroupAttributes"); if (c2.setMessage("groupID:".concat(o2, " localMainSequence:").concat(r2, " remoteMainSequence:").concat(u2, " keyList:").concat(e3.keyList)), Date.now() - i2 >= this.CACHE_EXPIRE_TIME || r2 < u2) return this._getGroupAttributes({ groupID: o2, avChatRoomKey: a2 }).then(function(s3) { c2.setMoreMessage("get attributes from remote. count:".concat(s3.length)).setNetworkType(t2._groupModule.getNetworkType()).end(), Ve.l("".concat(n2, " from remote. groupID:").concat(o2)); var a3 = t2._getCachedAttributes(e3); return Ya({ groupAttributes: a3 }); }).catch(function(e4) { return t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; c2.setError(e4, o3, s3).end(); }), Za(e4); }); c2.setMoreMessage("get attributes from cache").setNetworkType(this._groupModule.getNetworkType()).end(), Ve.l("".concat(n2, " from cache. groupID:").concat(o2)); var l2 = this._getCachedAttributes(e3); return Xa({ groupAttributes: l2 }); } }, { key: "_getGroupAttributes", value: function(e3) { var n2 = this, o2 = 0; return it(e3.avChatRoomKey) || (o2 = 1), this._groupModule.request({ protocolName: ks, requestData: t(t({}, e3), {}, { groupType: o2 }) }).then(function(t2) { Ve.l("".concat(n2._n, "._getGroupAttributes ok. groupID:").concat(e3.groupID)); var o3 = t2.data, s2 = o3.mainSequence, a2 = o3.groupAttributeList, i2 = m(a2); return it(s2) || n2._refreshCachedGroupAttributes({ groupID: e3.groupID, remoteMainSequence: s2, groupAttributeList: i2, operationType: Ei }), a2; }).catch(function(e4) { return Za(e4); }); } }, { key: "_refreshCachedGroupAttributes", value: function(e3) { var t2 = e3.groupID, n2 = e3.remoteMainSequence, o2 = e3.groupAttributeList, s2 = e3.operationType; if (this._hasLocalGroupAttributes(t2)) { var a2 = this._getLocalGroupAttributes(t2), i2 = a2.localMainSequence; if (s2 === Ei || n2 - i2 == 1) a2.remoteMainSequence = n2, a2.localMainSequence = n2, a2.lastUpdateTime = Date.now(), this._updateCachedAttributes({ groupAttributes: a2, groupAttributeList: o2, operationType: s2 }); else { if (i2 === n2) return; a2.remoteMainSequence = n2; } this._groupAttributesMap.set(t2, a2); var r2 = "operationType:".concat(s2, " localMainSequence:").concat(i2, " remoteMainSequence:").concat(n2); Ve.l("".concat(this._n, "._refreshCachedGroupAttributes. ").concat(r2)); } } }, { key: "_getCachedAttributes", value: function(e3) { var t2 = e3.groupID, n2 = e3.keyList, o2 = void 0 === n2 ? [] : n2, s2 = {}; if (this._hasLocalGroupAttributes(t2)) { var a2 = this._getLocalGroupAttributes(t2).attributes; if (o2.length > 0) o2.forEach(function(e4) { a2.has(e4) && (s2[e4] = a2.get(e4).value); }); else { var i2, r2 = D(a2.keys()); try { for (r2.s(); !(i2 = r2.n()).done; ) { var u2 = i2.value; s2[u2] = a2.get(u2).value; } } catch (c2) { r2.e(c2); } finally { r2.f(); } } } return s2; } }, { key: "_updateCachedAttributes", value: function(e3) { var t2 = e3.groupAttributes, n2 = e3.groupAttributeList, o2 = e3.operationType; o2 !== Di ? o2 !== ki ? (o2 === Ci && t2.attributes.clear(), n2.forEach(function(e4) { var n3 = e4.key, o3 = e4.value, s2 = e4.sequence; t2.attributes.set(n3, { value: o3, sequence: s2 }); })) : n2.forEach(function(e4) { t2.attributes.delete(e4.key); }) : t2.attributes.clear(); } }, { key: "_hasLocalGroupAttributes", value: function(e3) { return this._groupAttributesMap.has(e3); } }, { key: "_getLocalGroupAttributes", value: function(e3) { return this._hasLocalGroupAttributes(e3) || this.initGroupAttributesCache({ groupID: e3 }), this._groupAttributesMap.get(e3); } }, { key: "_transformGroupAttributes", value: function(e3) { var t2 = []; return Object.keys(e3).forEach(function(n2) { t2.push({ key: n2, value: e3[n2] }); }), t2; } }, { key: "_emitGroupAttributesUpdated", value: function(e3) { var t2 = this._getCachedAttributes({ groupID: e3 }), n2 = this._computeAttrChangedInfo(t2), o2 = n2.updatedKeyList, s2 = n2.deletedKeyList; Ve.l("".concat(this._n, "._emitGroupAttributesUpdated update:").concat(o2.length, ", delete:").concat(s2.length)), 0 === o2.length && 0 === s2.length || this._groupModule.emitOuterEvent(k.GROUP_ATTRIBUTES_UPDATED, { groupID: e3, groupAttributes: t2, updatedKeyList: o2, deletedKeyList: s2 }); } }, { key: "_computeAttrChangedInfo", value: function(e3) { var t2 = this, n2 = [], o2 = []; return Object.keys(e3).forEach(function(o3) { e3[o3] !== t2._groupAttributesCopy[o3] && n2.push(o3); }), Object.keys(this._groupAttributesCopy).forEach(function(t3) { it(e3[t3]) && o2.push(t3); }), this._groupAttributesCopy = {}, { updatedKeyList: n2, deletedKeyList: o2 }; } }, { key: "deleteLocalGroupAttributes", value: function(e3) { this._hasLocalGroupAttributes(e3) && this._groupAttributesMap.delete(e3); } }, { key: "reset", value: function() { this._groupAttributesMap.clear(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4; } }]), e2; }(), Li = "Set", Ai = "Increase", Ri = "Decrease", Ni = function() { function e2(t2) { o(this, e2), this._groupModule = t2, this._n = "GroupCountersHandler", this._groupCountersMap = /* @__PURE__ */ new Map(), this.EXPIRE_TIME = 3e4, this._groupModule.getInnerEmitterInstance().on(ti, this._onCloudConfigUpdated, this); } return a(e2, [{ key: "_onCloudConfigUpdated", value: function() { var e3 = this._groupModule.getCloudConfig("grp_counter_expire_time"); it(e3) || (this.EXPIRE_TIME = Number(e3)); } }, { key: "isGroupCountersNotice", value: function(e3) { var t2 = e3.to, n2 = e3.elements.groupCounterInfo, o2 = false; return zt(n2) || (this._onGroupCountersUpdated({ groupID: t2, groupCounterInfo: n2 }), o2 = true), o2; } }, { key: "_onGroupCountersUpdated", value: function(e3) { var t2 = this, n2 = e3.groupID; e3.groupCounterInfo.forEach(function(e4) { var o2 = e4.type, s2 = e4.groupCounterSeq, a2 = e4.counterList, i2 = void 0 === a2 ? [] : a2; 0 !== o2 && 2 !== o2 || (t2._updateLocalGroupCounters({ groupID: n2, groupCounterSeq: s2, counterList: i2 }), i2.forEach(function(e5) { t2._groupModule.emitOuterEvent(k.GROUP_COUNTER_UPDATED, { groupID: n2, key: e5.key, value: e5.value }); })), 1 === o2 && t2._deleteLocalGroupCounters({ groupID: n2, groupCounterSeq: s2, counterList: i2 }); }), Ve.l("".concat(this._n, "._onGroupCountersUpdated groupID:").concat(n2)); } }, { key: "initGroupCountersCache", value: function(e3) { var t2 = e3.groupID, n2 = e3.avChatRoomKey; this._groupCountersMap.set(t2, { lastUpdateTime: 0, groupCounterSeq: 0, counters: /* @__PURE__ */ new Map(), avChatRoomKey: n2 }), Ve.l("".concat(this._n, ".initGroupCountersCache groupID:").concat(t2, " avChatRoomKey:").concat(n2)); } }, { key: "setGroupCounters", value: function(e3) { var t2 = this; if (!this._groupModule.canIUse(B.GRP_COUNTER)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".setGroupCounters"), o2 = e3.groupID, s2 = e3.counters, a2 = this._convertObjectToList(s2), i2 = this._getLocalGroupCounters(o2).avChatRoomKey, r2 = "groupID:".concat(o2, " count:").concat(a2.length), u2 = new Aa("setGroupCounters"); return u2.setMessage("".concat(r2)), Ve.l("".concat(n2, ". ").concat(r2)), this._updateGroupCounters({ groupID: o2, counterList: a2, avChatRoomKey: i2, mode: Li }).then(function(e4) { return u2.end(), Ve.l("".concat(n2, " ok.")), Ya({ counters: e4 }); }).catch(function(e4) { return t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; u2.setError(e4, o3, s3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "increaseGroupCounter", value: function(e3) { var t2 = this; if (!this._groupModule.canIUse(B.GRP_COUNTER)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".increaseGroupCounters"), o2 = e3.groupID, s2 = e3.key, a2 = e3.value, i2 = this._getLocalGroupCounters(o2).avChatRoomKey, r2 = "groupID:".concat(o2, " key:").concat(s2, " value:").concat(a2), u2 = new Aa("increaseGroupCounter"); u2.setMessage("".concat(r2)), Ve.l("".concat(n2, ". ").concat(r2)); var c2 = [{ key: s2, value: a2 }]; return this._updateGroupCounters({ groupID: o2, counterList: c2, avChatRoomKey: i2, mode: Ai }).then(function(e4) { return u2.end(), Ve.l("".concat(n2, " ok.")), Ya({ counters: e4 }); }).catch(function(e4) { return t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; u2.setError(e4, o3, s3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "decreaseGroupCounter", value: function(e3) { var t2 = this; if (!this._groupModule.canIUse(B.GRP_COUNTER)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".decreaseGroupCounter"), o2 = e3.groupID, s2 = e3.key, a2 = e3.value, i2 = this._getLocalGroupCounters(o2).avChatRoomKey, r2 = "groupID:".concat(o2, " key:").concat(s2, " value:").concat(a2), u2 = new Aa("decreaseGroupCounter"); u2.setMessage("".concat(r2)), Ve.l("".concat(n2, ". ").concat(r2)); var c2 = [{ key: s2, value: a2 }]; return this._updateGroupCounters({ groupID: o2, counterList: c2, avChatRoomKey: i2, mode: Ri }).then(function(e4) { return u2.end(), Ve.l("".concat(n2, " ok.")), Ya({ counters: e4 }); }).catch(function(e4) { return t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; u2.setError(e4, o3, s3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "getGroupCounters", value: function(e3) { var t2 = this; if (!this._groupModule.canIUse(B.GRP_COUNTER)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".getGroupCounters"), o2 = e3.groupID, s2 = e3.keyList, a2 = void 0 === s2 ? [] : s2, i2 = this._getLocalGroupCounters(o2), r2 = i2.avChatRoomKey, u2 = i2.lastUpdateTime, c2 = new Aa("getGroupCounters"); if (c2.setMessage("groupID:".concat(o2)), Date.now() - u2 >= this.EXPIRE_TIME) return this._getRemoteGroupCounters({ groupID: o2, avChatRoomKey: r2 }).then(function(e4) { c2.setMoreMessage("from remote. count:".concat(e4.length)).end(), Ve.l("".concat(n2, " from remote. groupID:").concat(o2)); var s3 = t2._getLocalCounters(o2, a2); return Ya({ counters: s3 }); }).catch(function(e4) { return t2._groupModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; c2.setError(e4, o3, s3).end(); }), Za(e4); }); c2.setMoreMessage("from cache").end(), Ve.l("".concat(n2, " from cache. groupID:").concat(o2)); var l2 = this._getLocalCounters(o2, a2); return Xa({ counters: l2 }); } }, { key: "_getRemoteGroupCounters", value: function(e3) { var n2 = this; return this._groupModule.request({ protocolName: Rs, requestData: t({}, e3) }).then(function(t2) { var o2 = t2.data, s2 = o2.counterList, a2 = void 0 === s2 ? [] : s2, i2 = o2.groupCounterSeq; return n2._updateLocalGroupCounters({ groupID: e3.groupID, counterList: a2, groupCounterSeq: i2 }), Ve.l("".concat(n2._n, "._getRemoteGroupCounters ok. groupID:").concat(e3.groupID)), a2; }).catch(function(e4) { return Za(e4); }); } }, { key: "_convertObjectToList", value: function(e3) { var t2 = []; return Object.keys(e3).forEach(function(n2) { t2.push({ key: n2, value: e3[n2] }); }), t2; } }, { key: "_updateGroupCounters", value: function(e3) { var n2 = "".concat(this._n, "._updateGroupCounters"), o2 = e3.groupID, s2 = e3.avChatRoomKey, a2 = e3.mode; return Ve.l("".concat(n2, ". groupID:").concat(o2, " avChatRoomKey:").concat(s2, " mode:").concat(a2)), this._groupModule.request({ protocolName: As, requestData: t({}, e3) }).then(function(e4) { Ve.l("".concat(n2, " ok.")); var t2 = e4.data.counterList, o3 = {}; return (void 0 === t2 ? [] : t2).forEach(function(e5) { var t3 = e5.key, n3 = e5.value; o3[t3] = n3; }), o3; }).catch(function(e4) { return Za(e4); }); } }, { key: "_hasLocalGroupCounters", value: function(e3) { return this._groupCountersMap.has(e3); } }, { key: "_getLocalGroupCounters", value: function(e3) { return this._hasLocalGroupCounters(e3) || this.initGroupCountersCache({ groupID: e3 }), this._groupCountersMap.get(e3); } }, { key: "_updateLocalGroupCounters", value: function(e3) { var t2 = e3.groupID, n2 = e3.counterList, o2 = void 0 === n2 ? [] : n2, s2 = e3.groupCounterSeq; if (this._hasLocalGroupCounters(t2)) { var a2 = this._getLocalGroupCounters(t2), i2 = a2.counters, r2 = a2.avChatRoomKey, u2 = a2.groupCounterSeq; if (s2 > 0 && s2 < u2) return; o2.forEach(function(e4) { var t3 = e4.key, n3 = e4.value; i2.set(t3, n3); }), this._groupCountersMap.set(t2, { lastUpdateTime: Date.now(), groupCounterSeq: s2, counters: i2, avChatRoomKey: r2 }); } } }, { key: "_deleteLocalGroupCounters", value: function(e3) { var t2 = e3.groupID, n2 = e3.counterList, o2 = void 0 === n2 ? [] : n2, s2 = e3.groupCounterSeq; if (this._hasLocalGroupCounters(t2)) { var a2 = this._getLocalGroupCounters(t2), i2 = a2.counters, r2 = a2.avChatRoomKey; o2.forEach(function(e4) { i2.delete(e4.key); }), this._groupCountersMap.set(t2, { lastUpdateTime: Date.now(), groupCounterSeq: s2, counters: i2, avChatRoomKey: r2 }); } } }, { key: "_getLocalCounters", value: function(e3, t2) { var n2 = {}; if (!this._hasLocalGroupCounters(e3)) return n2; var o2 = this._getLocalGroupCounters(e3).counters; if (t2.length > 0) t2.forEach(function(e4) { o2.has(e4) && (n2[e4] = o2.get(e4)); }); else { var s2, a2 = D(o2.keys()); try { for (a2.s(); !(s2 = a2.n()).done; ) { var i2 = s2.value; n2[i2] = o2.get(i2); } } catch (r2) { a2.e(r2); } finally { a2.f(); } } return n2; } }, { key: "reset", value: function() { this._groupCountersMap.clear(), this.EXPIRE_TIME = 3e4; } }]), e2; }(), Oi = function() { function e2(t2) { o(this, e2); var n2 = t2.manager, s2 = t2.groupID, a2 = t2.onInit, i2 = t2.onSuccess, r2 = t2.onFail; this._n = "Polling", this._manager = n2, this._groupModule = n2._groupModule, this._onInit = a2, this._onSuccess = i2, this._onFail = r2, this._groupID = s2, this._timeoutID = -1, this._isRunning = false, this._protocolName = fs; } return a(e2, [{ key: "start", value: function() { var e3 = this._groupModule.isLoggedIn(); e3 || (this._protocolName = vs), Ve.l("".concat(this._n, ".start pollingInterval:").concat(this._manager.getPollingInterval(), " isLoggedIn:").concat(e3)), this._isRunning = true, this._request(); } }, { key: "isRunning", value: function() { return this._isRunning; } }, { key: "_request", value: function() { var e3 = this, t2 = this._onInit(this._groupID); this._groupModule.request({ protocolName: this._protocolName, requestData: t2 }).then(function(t3) { e3._onSuccess(e3._groupID, t3), e3.isRunning() && (clearTimeout(e3._timeoutID), e3._timeoutID = setTimeout(e3._request.bind(e3), e3._manager.getPollingInterval())); }).catch(function(t3) { e3._onFail(e3._groupID, t3), e3.isRunning() && (clearTimeout(e3._timeoutID), e3._timeoutID = setTimeout(e3._request.bind(e3), e3._manager.MAX_POLLING_INTERVAL)); }); } }, { key: "stop", value: function() { Ve.l("".concat(this._n, ".stop")), this._timeoutID > 0 && (clearTimeout(this._timeoutID), this._timeoutID = -1), this._isRunning = false; } }, { key: "getPollingTimerID", value: function() { return this._timeoutID; } }]), e2; }(), Gi = { 3: true, 4: true, 5: true, 6: true, 17: true }, Ui = function() { function e2(t2) { o(this, e2), this._groupModule = t2, this._n = "AVChatRoomHandler", this._joinedGroupMap = /* @__PURE__ */ new Map(), this._pollingRequestInfoMap = /* @__PURE__ */ new Map(), this._pollingInstanceMap = /* @__PURE__ */ new Map(), this.sequencesLinkedList = new pi(200), this.messageIDLinkedList = new pi(100), this.receivedMessageCount = 0, this._reportMessageStackedCount = 0, this._onlineMemberCountMap = /* @__PURE__ */ new Map(), this.DEFAULT_EXPIRE_TIME = 60, this.DEFAULT_POLLING_INTERVAL = 300, this.MAX_POLLING_INTERVAL = 2e3, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0, this._startBroadcastSeq = 1, this._broadcastMessageIDMap = /* @__PURE__ */ new Map(), this.DEFAULT_POLLING_SIMPLIFIED_MSG = 0; } return a(e2, [{ key: "hasJoinedAVChatRoom", value: function() { return this._joinedGroupMap.size > 0; } }, { key: "checkJoinedAVChatRoomByID", value: function(e3) { return this._joinedGroupMap.has(e3); } }, { key: "getJoinedAVChatRoom", value: function() { return this._joinedGroupMap.size > 0 ? m(this._joinedGroupMap.keys()) : null; } }, { key: "_updateRequestData", value: function(e3) { var n2 = this._pollingRequestInfoMap.get(e3); return e3 === m(this._pollingInstanceMap.keys())[0] ? t(t({}, n2), {}, { startBroadcastSeq: this._startBroadcastSeq, simplifiedMessage: this.DEFAULT_POLLING_SIMPLIFIED_MSG }) : t(t({}, n2), {}, { simplifiedMessage: this.DEFAULT_POLLING_SIMPLIFIED_MSG }); } }, { key: "_handleSuccess", value: function(e3, t2) { var n2 = t2.data, o2 = n2.key, s2 = n2.nextSeq, a2 = n2.rspMsgList, i2 = n2.errorCode, r2 = n2.nextBroadcastSeq, u2 = n2.broadcastMessageList; if (0 !== i2) { var c2 = this._pollingRequestInfoMap.get(e3), l2 = new Aa("longPollingAVError"), d2 = c2 ? "".concat(c2.key, "-").concat(c2.startSeq) : "requestInfo is undefined"; l2.setMessage("".concat(e3, "-").concat(d2, "-").concat(t2.errorInfo)).setCode(t2.errorCode).setNetworkType(this._groupModule.getNetworkType()).end(true); } else { if (!this.checkJoinedAVChatRoomByID(e3)) return; nt(o2) && et(s2) && this._pollingRequestInfoMap.set(e3, { key: o2, startSeq: s2 }), et(r2) && r2 > this._startBroadcastSeq && (this._startBroadcastSeq = r2), at(a2) && a2.length > 0 ? (a2.forEach(function(e4) { e4.to = e4.groupID; }), this.onMessage(a2)) : (this._pollingNoMessageCount += 1, this._pollingNoMessageCount === this.DEFAULT_POLLING_NO_MESSAGE_COUNT && (this._pollingInterval = this.DEFAULT_POLLING_INTERVAL + this.DEFAULT_POLLING_INTERVAL_PLUS)), this._onBroadcastMessage(u2); } } }, { key: "_handleFailure", value: function(e3, t2) { } }, { key: "onMessage", value: function(e3) { if (at(e3) && 0 !== e3.length) { 0 !== this._pollingNoMessageCount && (this._pollingNoMessageCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL); var t2 = null, n2 = [], o2 = this._getModule(qn), s2 = this._getModule(eo), a2 = e3.length; a2 > 1 && e3.sort(function(e4, t3) { return e4.sequence - t3.sequence; }); for (var i2 = this._getModule(xn), r2 = 0; r2 < a2; r2++) { var u2 = this.restoreMessageFromSimplified(e3[r2]); if (Gi[u2.event]) { if (6 === u2.event) { if (this._groupModule.isGroupAttributesUpdatedNotice(u2)) continue; if (this._groupModule.isGroupCountersNotice(u2)) continue; } this.receivedMessageCount += 1, t2 = this.packMessage(u2, u2.event); var c2 = 1 === u2.isModified, l2 = 1 === u2.isHistoryMessage; if ((i2.isUnlimitedAVChatRoom() || !this.sequencesLinkedList.has(t2.sequence)) && !this.messageIDLinkedList.has(t2.ID)) { var d2 = t2.conversationID; if (this.receivedMessageCount % 50 == 0 ? this._getModule(Xn).detectFirstRound(d2, this.sequencesLinkedList.data()) : this.receivedMessageCount % 80 == 0 && this._getModule(Xn).detectSecondRound(d2, this.sequencesLinkedList.data()), null !== this.sequencesLinkedList.tail()) { var p2 = this.sequencesLinkedList.tail().value, g2 = t2.sequence - p2; g2 > 1 && g2 <= 20 ? this._getModule(Xn).onMessageMaybeLost(d2, p2 + 1, g2 - 1) : g2 < -1 && g2 >= -20 && this._getModule(Xn).onMessageMaybeLost(d2, t2.sequence + 1, Math.abs(g2) - 1); } this.sequencesLinkedList.set(t2.sequence), this.messageIDLinkedList.set(t2.ID); var h2 = false; if (this._isMessageSentByCurrentInstance(t2) ? c2 && (h2 = true, t2.isModified = c2, o2.updateMessageIsModifiedProperty(t2)) : h2 = true, h2) { if (t2.conversationType === E.CONV_SYSTEM && 5 === t2.payload.operationType && this._onGroupDismissed(t2.payload.groupProfile.groupID), !l2 && t2.conversationType !== E.CONV_SYSTEM) { var _2 = t2.conversationID.replace(E.CONV_GROUP, ""); this._pollingInstanceMap.has(_2) ? this._groupModule.isLoggedIn() && s2.addMessageSequence({ key: Da, message: t2 }) : (t2.type !== E.MSG_GRP_TIP && t2.clientTime > 0 && s2.addMessageDelay(t2.clientTime), s2.addMessageSequence({ key: Ta, message: t2 })); } n2.push(t2); } } } else Ve.w("".concat(this._n, ".onMessage unknown event:").concat(u2.event)); } if (0 !== n2.length) { this._groupModule.filterModifiedMessage(n2); var f2 = this.packConversationOption(n2); if (f2.length > 0) this._getModule(qn).onNewMessage({ conversationOptionsList: f2, isInstantMessage: true }); Ve.d("".concat(this._n, ".onMessage count:").concat(n2.length)), this._checkMessageStacked(n2); var v2 = this._groupModule.filterUnmodifiedMessage(n2); v2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, v2), n2.length = 0; } } } }, { key: "isBroadcastOrNormal", value: function(e3) { return 3 === e3 || 17 === e3; } }, { key: "isGroupTip", value: function(e3) { return 4 === e3 || 6 === e3; } }, { key: "isGroupSystemNotice", value: function(e3) { return 5 === e3; } }, { key: "restoreGroupTipElements", value: function() { var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; e3.groupJoinType || (e3.groupJoinType = 1); var t2 = e3.operatorInfo, n2 = void 0 === t2 ? {} : t2, o2 = e3.operatorID, s2 = e3.userIDList, a2 = void 0 === s2 ? [] : s2, i2 = n2.userID, r2 = void 0 === i2 ? o2 : i2, u2 = n2.avatar, c2 = void 0 === u2 ? "" : u2, l2 = n2.nick, d2 = void 0 === l2 ? "" : l2; e3.operatorInfo = { userID: r2, avatar: c2, nick: d2 }; var p2 = a2.map(function(e4) { return { userID: e4 }; }); return e3.memberInfoList = e3.memberInfoList || p2, e3; } }, { key: "restoreMessageFromSimplified", value: function(e3) { var n2 = e3.event; if (this.isBroadcastOrNormal(n2) && (e3.cloudCustomData = e3.cloudCustomData || "", e3.elements = e3.elements.map(function(e4) { if (e4.type === E.MSG_CUSTOM) { var n3 = e4.content, o3 = void 0 === n3 ? {} : n3; e4.content = t({ data: "", description: "", extension: "" }, o3); } return e4; })), (this.isGroupTip(n2) || this.isGroupSystemNotice(n2)) && (e3.from = e3.from || "@TIM#SYSTEM"), this.isGroupTip(n2)) { e3.elements = this.restoreGroupTipElements(e3.elements); var o2 = e3.elements, s2 = void 0 === o2 ? {} : o2, a2 = s2.operationType, r2 = s2.operatorInfo; if (1 === a2) { var u2 = [{ userID: (void 0 === r2 ? {} : r2).userID }]; s2.memberInfoList = s2.memberInfoList || u2; } } if (this.isGroupSystemNotice(n2)) { var c2 = e3.elements, l2 = c2.memberInfoList, d2 = c2.operatorInfo; l2 || (l2 = void 0 === d2 ? {} : d2), e3.elements.memberInfoList = t({ userID: e3.elements.operatorID, avatar: "", nick: "" }, l2), e3.elements = t({ authentication: "", remarkInfo: "", messageKey: 1e3 * e3.time }, e3.elements); var p2 = Object.keys(e3.elements).filter(function(e4) { return "operatorInfo" !== e4; }).reduce(function(n3, o3) { return t(t({}, n3), {}, i({}, o3, e3.elements[o3])); }, {}); e3.elements = p2; } return e3; } }, { key: "_onGroupDismissed", value: function(e3) { Ve.l("".concat(this._n, "._onGroupDismissed groupID:").concat(e3)), this._groupModule.deleteLocalGroupAndConversation(e3), this.reset(e3); } }, { key: "_checkMessageStacked", value: function(e3) { var t2 = "MessageStacked", n2 = e3.length; n2 >= 100 && (this._groupModule.outputWarning(t2, n2), this._reportMessageStackedCount < 5 && (new Aa(t2).setNetworkType(this._groupModule.getNetworkType()).setMessage("count:".concat(n2, " groupID:").concat(m(this._joinedGroupMap.keys()))).setLevel("warning").end(), this._reportMessageStackedCount += 1)); } }, { key: "_isMessageSentByCurrentInstance", value: function(e3) { return !!this._getModule(qn).isMessageSentByCurrentInstance(e3); } }, { key: "packMessage", value: function(e3, t2) { e3.currentUser = this._groupModule.getMyUserID(), e3.conversationType = 5 === t2 ? E.CONV_SYSTEM : E.CONV_GROUP, e3.isSystemMessage = !!e3.isSystemMessage; var n2 = new Wa(e3), o2 = this.packElements(e3, t2); return n2.setElement(o2, this._groupModule.getFileDownloadProxy()), n2; } }, { key: "packElements", value: function(e3, n2) { return 4 === n2 || 6 === n2 ? (this._updateMemberCountByGroupTips(e3), { type: E.MSG_GRP_TIP, content: t(t({}, e3.elements), {}, { groupProfile: e3.groupProfile }) }) : 5 === n2 ? { type: E.MSG_GRP_SYS_NOTICE, content: t(t({}, e3.elements), {}, { groupProfile: t(t({}, e3.groupProfile), {}, { groupID: e3.groupID }) }) } : this._getModule(Kn).parseElements(e3.elements, e3.from); } }, { key: "packConversationOption", value: function(e3) { for (var t2 = /* @__PURE__ */ new Map(), n2 = 0; n2 < e3.length; n2++) { var o2 = e3[n2], s2 = o2.conversationID; if (t2.has(s2)) { var a2 = t2.get(s2); a2.lastMessage = o2, "in" === o2.flow && a2.unreadCount++; } else t2.set(s2, { conversationID: o2.conversationID, unreadCount: "out" === o2.flow ? 0 : 1, type: o2.conversationType, subType: o2.conversationSubType, lastMessage: o2 }); } return m(t2.values()); } }, { key: "_updateMemberCountByGroupTips", value: function(e3) { var t2 = e3.groupProfile.groupID, n2 = e3.elements.onlineMemberInfo, o2 = void 0 === n2 ? void 0 : n2; if (!zt(o2)) { var s2 = o2.onlineMemberNum, a2 = void 0 === s2 ? 0 : s2, i2 = o2.expireTime, r2 = void 0 === i2 ? this.DEFAULT_EXPIRE_TIME : i2, u2 = this._onlineMemberCountMap.get(t2) || {}, c2 = Date.now(); zt(u2) ? Object.assign(u2, { lastReqTime: 0, lastSyncTime: 0, latestUpdateTime: c2, memberCount: a2, expireTime: r2 }) : (u2.latestUpdateTime = c2, u2.memberCount = a2), Ve.d("".concat(this._n, "._updateMemberCountByGroupTips info:"), u2), this._onlineMemberCountMap.set(t2, u2); } } }, { key: "_onBroadcastMessage", value: function(e3) { if (!zt(e3)) { for (var t2 = [], n2 = e3.length, o2 = null, s2 = 0; s2 < n2; s2++) { var a2 = this.restoreMessageFromSimplified(e3[s2]); Gi[a2.event] ? ((o2 = this.packMessage(a2, a2.event)).isBroadcastMessage = true, this._broadcastMessageIDMap.has(o2.ID) || (t2.push(o2), this._broadcastMessageIDMap.set(o2.ID, 1))) : Ve.w("".concat(this._n, "._onBroadcastMessage unknown event:").concat(a2.event)); } t2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, t2); } } }, { key: "start", value: function(e3) { if (this._pollingInstanceMap.has(e3)) { var t2 = this._pollingInstanceMap.get(e3); t2.isRunning() || t2.start(); } else { var n2 = new Oi({ manager: this, groupID: e3, onInit: this._updateRequestData.bind(this), onSuccess: this._handleSuccess.bind(this), onFail: this._handleFailure.bind(this) }); n2.start(), this._pollingInstanceMap.set(e3, n2), Ve.l("".concat(this._n, ".start groupID:").concat(e3)); } } }, { key: "handleJoinResult", value: function(e3) { var t2 = this; return this._preCheck().then(function() { var n2 = e3.longPollingKey, o2 = e3.group, s2 = o2.groupID; return t2._joinedGroupMap.set(s2, o2), t2._groupModule.updateGroupMap([o2]), t2._groupModule.deleteUnjoinedAVChatRoom(s2), t2._groupModule.emitGroupListUpdate(true, false), it(n2) ? Xa({ status: je, group: o2 }) : Promise.resolve(); }); } }, { key: "startRunLoop", value: function(e3) { var t2 = this; return this.handleJoinResult(e3).then(function() { var n2 = e3.longPollingKey, o2 = e3.group, s2 = e3.startSeq, a2 = void 0 === s2 ? 0 : s2, i2 = o2.groupID; return t2._pollingRequestInfoMap.set(i2, { key: n2, startSeq: a2 }), t2.start(i2), t2._groupModule.isLoggedIn() ? Xa({ status: je, group: o2 }) : Xa({ status: je }); }); } }, { key: "_preCheck", value: function() { if (this._getModule(xn).isUnlimitedAVChatRoom()) return Promise.resolve(); if (!this.hasJoinedAVChatRoom()) return Promise.resolve(); var e3 = v(this._joinedGroupMap.entries().next().value, 2), t2 = e3[0], n2 = e3[1]; if (this._groupModule.isLoggedIn()) { if (!(n2.selfInfo.role === E.GRP_MBR_ROLE_OWNER || n2.ownerID === this._groupModule.getMyUserID())) return this._groupModule.quitGroup(t2); this._groupModule.deleteLocalGroupAndConversation(t2); } else this._groupModule.deleteLocalGroupAndConversation(t2); return this.reset(t2), Promise.resolve(); } }, { key: "joinWithoutAuth", value: function(e3) { var t2 = this, n2 = e3.groupID, o2 = "".concat(this._n, ".").concat("joinWithoutAuth"), s2 = new Aa("joinWithoutAuth"); return this._groupModule.request({ protocolName: $o, requestData: e3 }).then(function(e4) { var a2 = e4.data.longPollingKey; if (t2._groupModule.probeNetwork().then(function(e5) { var t3 = v(e5, 2); t3[0]; var o3 = t3[1]; s2.setNetworkType(o3).setMessage("groupID:".concat(n2, " longPollingKey:").concat(a2)).end(true); }), it(a2)) return Za({ code: ha.CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN }); Ve.l("".concat(o2, " ok. groupID:").concat(n2)), t2._getModule(qn).setCompleted("".concat(E.CONV_GROUP).concat(n2)); var i2 = new hi({ groupID: n2 }); return t2.startRunLoop({ group: i2, longPollingKey: a2 }), Ya({ status: je }); }).catch(function(e4) { return Ve.e("".concat(o2, " failed. groupID:").concat(n2, " error:"), e4), t2._groupModule.probeNetwork().then(function(t3) { var o3 = v(t3, 2), a2 = o3[0], i2 = o3[1]; s2.setError(e4, a2, i2).setMessage("groupID:".concat(n2)).end(true); }), Za(e4); }).finally(function() { t2._groupModule.getModule(Bn).reportAtOnce(); }); } }, { key: "getGroupOnlineMemberCount", value: function(e3) { var t2 = this._onlineMemberCountMap.get(e3) || {}, n2 = Date.now(); return zt(t2) || n2 - t2.lastSyncTime > 1e3 * t2.expireTime && n2 - t2.latestUpdateTime > 1e4 && n2 - t2.lastReqTime > 3e3 ? (t2.lastReqTime = n2, this._onlineMemberCountMap.set(e3, t2), this._getGroupOnlineMemberCount(e3).then(function(e4) { return Ya({ memberCount: e4.memberCount }); }).catch(function(e4) { return Za(e4); })) : Xa({ memberCount: t2.memberCount }); } }, { key: "_getGroupOnlineMemberCount", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".").concat("_getGroupOnlineMemberCount"); return this._groupModule.request({ protocolName: ms, requestData: { groupID: e3 } }).then(function(o2) { var s2 = t2._onlineMemberCountMap.get(e3) || {}, a2 = o2.data, i2 = a2.onlineMemberNum, r2 = void 0 === i2 ? 0 : i2, u2 = a2.expireTime, c2 = void 0 === u2 ? t2.DEFAULT_EXPIRE_TIME : u2; Ve.l("".concat(n2, " ok. groupID:").concat(e3, " memberCount:").concat(r2, " expireTime:").concat(c2)); var l2 = Date.now(); return zt(s2) && (s2.lastReqTime = l2), t2._onlineMemberCountMap.set(e3, Object.assign(s2, { lastSyncTime: l2, latestUpdateTime: l2, memberCount: r2, expireTime: c2 })), { memberCount: r2 }; }).catch(function(o2) { return Ve.w("".concat(n2, " failed. error:"), o2), new Aa("_getGroupOnlineMemberCount").setCode(o2.code).setMessage("groupID:".concat(e3, " error:").concat(JSON.stringify(o2))).setNetworkType(t2._groupModule.getNetworkType()).end(), Promise.reject(o2); }); } }, { key: "_getModule", value: function(e3) { return this._groupModule.getModule(e3); } }, { key: "setPollingInterval", value: function(e3) { it(e3) || (et(e3) ? this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = e3 : this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = parseInt(e3, 10)); } }, { key: "setPollingIntervalPlus", value: function(e3) { it(e3) || (et(e3) ? this.DEFAULT_POLLING_INTERVAL_PLUS = e3 : this.DEFAULT_POLLING_INTERVAL_PLUS = parseInt(e3, 10)); } }, { key: "setPollingNoMessageCount", value: function(e3) { it(e3) || (et(e3) ? this.DEFAULT_POLLING_NO_MESSAGE_COUNT = e3 : this.DEFAULT_POLLING_NO_MESSAGE_COUNT = parseInt(e3, 10)); } }, { key: "setPollingSimplifiedMessage", value: function(e3) { it(e3) || "0" !== e3 && "1" !== e3 || (this.DEFAULT_POLLING_SIMPLIFIED_MSG = parseInt(e3, 10)); } }, { key: "getPollingInterval", value: function() { return this._pollingInterval; } }, { key: "onAVChatRoomMemberBanned", value: function(e3) { var t2 = e3.payload.groupProfile.groupID; Ve.l("".concat(this._n, ".onAVChatRoomMemberBanned groupID:").concat(t2)), this._groupModule.deleteLocalGroupAndConversation(t2), this.reset(t2); } }, { key: "restartPolling", value: function() { Ve.l("".concat(this._n, ".restartPolling count:").concat(this._pollingInstanceMap.size)); var e3, t2 = D(this._pollingInstanceMap.values()); try { for (t2.s(); !(e3 = t2.n()).done; ) { var n2 = e3.value; n2.stop(), n2.start(); } } catch (o2) { t2.e(o2); } finally { t2.f(); } } }, { key: "getPollingTimerID", value: function(e3) { if (!this._pollingInstanceMap.has(e3)) return -1; var t2 = this._pollingInstanceMap.get(e3).getPollingTimerID(); return Ve.l("".concat(this._n, ".getPollingTimerID groupID:").concat(e3, " timerID:").concat(t2)), t2; } }, { key: "reset", value: function(e3) { if (e3) { Ve.l("".concat(this._n, ".reset groupID:").concat(e3)); var t2 = this._pollingInstanceMap.get(e3); t2 && t2.stop(), this._pollingInstanceMap.delete(e3), this._joinedGroupMap.delete(e3), this._pollingRequestInfoMap.delete(e3), this._onlineMemberCountMap.delete(e3); } else { Ve.l("".concat(this._n, ".reset all")); var n2, o2 = D(this._pollingInstanceMap.values()); try { for (o2.s(); !(n2 = o2.n()).done; ) { n2.value.stop(); } } catch (s2) { o2.e(s2); } finally { o2.f(); } this._pollingInstanceMap.clear(), this._joinedGroupMap.clear(), this._pollingRequestInfoMap.clear(), this._onlineMemberCountMap.clear(), this._broadcastMessageIDMap.clear(); } this.sequencesLinkedList.reset(), this.messageIDLinkedList.reset(), this.receivedMessageCount = 0, this._reportMessageStackedCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = 300, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0; } }]), e2; }(), Pi = 1, bi = 15, wi = function() { function e2(t2) { o(this, e2), this._groupModule = t2, this._n = "GroupSystemNoticeHandler", this.pendencyMap = /* @__PURE__ */ new Map(); } return a(e2, [{ key: "onNewGroupSystemNotice", value: function(e3) { var t2 = e3.dataList, n2 = e3.isSyncingEnded, o2 = e3.isInstantMessage; Ve.d("".concat(this._n, ".onReceiveSystemNotice count:").concat(t2.length)); var s2 = this.newSystemNoticeStoredAndSummary({ notifiesList: t2, isInstantMessage: o2 }), a2 = s2.eventDataList, i2 = s2.result; a2.length > 0 && (this._groupModule.getModule(qn).onNewMessage({ conversationOptionsList: a2, isInstantMessage: o2 }), this._onReceivedGroupSystemNotice({ result: i2, isInstantMessage: o2 })); o2 ? i2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, i2) : true === n2 && this._clearGroupSystemNotice(); } }, { key: "newSystemNoticeStoredAndSummary", value: function(e3) { var n2 = e3.notifiesList, o2 = e3.isInstantMessage, s2 = null, a2 = n2.length, i2 = 0, r2 = [], u2 = { conversationID: E.CONV_SYSTEM, unreadCount: 0, type: E.CONV_SYSTEM, subType: null, lastMessage: null }; for (i2 = 0; i2 < a2; i2++) { var c2 = n2[i2], l2 = c2.groupProfile, d2 = l2.communityType, p2 = void 0 === d2 ? 0 : d2, g2 = l2.topicID, h2 = void 0 === g2 ? void 0 : g2, _2 = c2.elements, f2 = _2.topicIDList, v2 = void 0 === f2 ? void 0 : f2, m2 = _2.operationType; if (!(2 !== p2 || zt(h2) && zt(v2))) { if ([17, 18, 20].includes(m2)) { this._handleTopicSystemNotice(c2); continue; } zt(h2) || (c2.to = h2); } if (c2.elements.operationType !== bi) c2.currentUser = this._groupModule.getMyUserID(), c2.conversationType = E.CONV_SYSTEM, c2.conversationID = E.CONV_SYSTEM, (s2 = new Wa(c2)).setElement({ type: E.MSG_GRP_SYS_NOTICE, content: t(t({}, c2.elements), {}, { groupProfile: t({}, c2.groupProfile) }) }), s2.isSystemMessage = true, (1 === s2.sequence && 1 === s2.random || 2 === s2.sequence && 2 === s2.random) && (s2.sequence = _t(), s2.random = _t(), s2.generateMessageID(), Ve.l("".concat(this._n, ".newSystemNoticeStoredAndSummary sequence and random maybe duplicated, regenerate. ID:").concat(s2.ID))), this._groupModule.getModule(qn).pushIntoNoticeResult(r2, s2) && (o2 ? u2.unreadCount++ : s2.setIsRead(true), u2.subType = s2.conversationSubType); } return u2.lastMessage = r2[r2.length - 1], { eventDataList: r2.length > 0 ? [u2] : [], result: r2 }; } }, { key: "_clearGroupSystemNotice", value: function() { var e3 = this; this._getPendencyList().then(function(t2) { t2.forEach(function(t3) { e3.pendencyMap.set("".concat(t3.from, "_").concat(t3.groupID, "_").concat(t3.to), t3); }); var n2 = e3._groupModule.getModule(qn).getLocalMessageList(E.CONV_SYSTEM), o2 = []; n2.forEach(function(t3) { var n3 = t3.payload, s2 = n3.operatorID, a2 = n3.operationType, i2 = n3.groupProfile; if (a2 === Pi) { var r2 = "".concat(s2, "_").concat(i2.groupID, "_").concat(i2.to), u2 = e3.pendencyMap.get(r2); u2 && et(u2.handled) && 0 !== u2.handled && o2.push(t3); } }), e3.deleteGroupSystemNotice({ messageList: o2 }); }); } }, { key: "deleteGroupSystemNotice", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".deleteGroupSystemNotice"); return at(e3.messageList) && 0 !== e3.messageList.length ? (Ve.l("".concat(n2, " ") + e3.messageList.map(function(e4) { return e4.ID; })), this._groupModule.request({ protocolName: _s, requestData: { messageListToDelete: e3.messageList.map(function(e4) { return { from: E.CONV_SYSTEM, messageSeq: e4.clientSequence, messageRandom: e4.random }; }) } }).then(function() { Ve.l("".concat(n2, " ok")); var o2 = t2._groupModule.getModule(qn); return e3.messageList.forEach(function(e4) { o2.deleteLocalMessage(e4); }), Ya(); }).catch(function(e4) { return Ve.e("".concat(n2, " error:"), e4), Za(e4); })) : Xa(); } }, { key: "_getPendencyList", value: function() { var e3 = this, t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, n2 = t2.type, o2 = void 0 === n2 ? void 0 : n2, s2 = t2.startTime, a2 = void 0 === s2 ? 0 : s2, i2 = t2.limit, r2 = void 0 === i2 ? 20 : i2; return this._groupModule.request({ protocolName: hs, requestData: { type: o2, startTime: a2, limit: r2, handleAccount: this._groupModule.getMyUserID() } }).then(function(t3) { var n3 = t3.data.pendencyList; return 0 !== t3.data.nextStartTime ? e3._getPendencyList({ startTime: t3.data.nextStartTime }).then(function(e4) { return [].concat(m(n3), m(e4)); }) : n3; }); } }, { key: "getGroupApplicationList", value: function() { var e3 = this; return this._getPendencyList().then(function(t2) { return e3._getPendencyList({ type: E.GRP_COMMUNITY }).then(function(n2) { return t2.push.apply(t2, m(n2)), e3._handlePendencyResult(t2); }).catch(function(n2) { return e3._handlePendencyResult(t2); }); }); } }, { key: "_handlePendencyResult", value: function(e3) { var t2 = this, n2 = []; return e3.forEach(function(e4) { t2.pendencyMap.set("".concat(e4.from, "_").concat(e4.groupID, "_").concat(e4.to), e4), 0 === e4.handled && n2.push({ applicant: e4.from, applicantNick: e4.fromUserNickName, groupName: e4.groupName, groupID: e4.groupID, authentication: e4.authentication, messageKey: e4.time, applicationType: e4.applicationType, userID: e4.userID }); }), Xa({ applicationList: n2 }); } }, { key: "_onReceivedGroupSystemNotice", value: function(e3) { var t2 = this, n2 = e3.result; e3.isInstantMessage && n2.forEach(function(e4) { switch (e4.payload.operationType) { case 1: break; case 2: t2._onApplyGroupRequestAgreed(e4); break; case 3: break; case 4: t2._onMemberKicked(e4); break; case 5: t2._onGroupDismissed(e4); break; case 6: break; case 7: t2._onInviteGroup(e4); break; case 8: t2._onQuitGroup(e4); break; case 9: t2._onSetManager(e4); break; case 10: t2._onDeleteManager(e4); break; case 11: case 12: case 15: break; case 20: t2._onMessageRemindTypeSynced(e4); break; case 21: t2._groupModule.onAVChatRoomMemberBanned(e4); } }); } }, { key: "_onApplyGroupRequestAgreed", value: function(e3) { var t2 = this, n2 = e3.payload.groupProfile.groupID; this._groupModule.hasLocalGroup(n2) || this._groupModule.getGroupProfile({ groupID: n2 }).then(function(e4) { var n3 = e4.data.group; if (n3) { t2._groupModule.updateGroupMap([n3]); var o2 = !n3.isSupportTopic; t2._groupModule.emitGroupListUpdate(true, o2); } }); } }, { key: "_onMemberKicked", value: function(e3) { var t2 = e3.payload.groupProfile.groupID; this._groupModule.hasLocalGroup(t2) && this._groupModule.deleteLocalGroupAndConversation(t2); } }, { key: "_onGroupDismissed", value: function(e3) { var t2 = e3.payload.groupProfile.groupID; this._groupModule.hasLocalGroup(t2) && this._groupModule.deleteLocalGroupAndConversation(t2); var n2 = this._groupModule._AVChatRoomHandler; n2 && n2.checkJoinedAVChatRoomByID(t2) && n2.reset(t2); } }, { key: "_onInviteGroup", value: function(e3) { var t2 = this, n2 = e3.payload.groupProfile.groupID; this._groupModule.hasLocalGroup(n2) || this._groupModule.getGroupProfile({ groupID: n2 }).then(function(e4) { var n3 = e4.data.group; n3 && (t2._groupModule.updateGroupMap([n3]), t2._groupModule.emitGroupListUpdate()); }); } }, { key: "_onQuitGroup", value: function(e3) { var t2 = e3.payload.groupProfile.groupID; this._groupModule.hasLocalGroup(t2) && this._groupModule.deleteLocalGroupAndConversation(t2); } }, { key: "_onSetManager", value: function(e3) { var t2 = e3.payload.groupProfile, n2 = t2.to, o2 = t2.groupID, s2 = this._groupModule.getModule(wn).getLocalGroupMemberInfo(o2, n2); s2 && s2.updateRole(E.GRP_MBR_ROLE_ADMIN); } }, { key: "_onDeleteManager", value: function(e3) { var t2 = e3.payload.groupProfile, n2 = t2.to, o2 = t2.groupID, s2 = this._groupModule.getModule(wn).getLocalGroupMemberInfo(o2, n2); s2 && s2.updateRole(E.GRP_MBR_ROLE_MEMBER); } }, { key: "_onMessageRemindTypeSynced", value: function(e3) { var t2 = e3.payload.groupProfile.groupID, n2 = e3.payload.messageRemindType; this._groupModule.getModule(qn).onGroupMessageRemindTypeSynced({ groupID: t2, messageRemindType: n2 }); } }, { key: "_handleTopicSystemNotice", value: function(e3) { var t2 = e3.groupProfile, n2 = t2.groupID, o2 = t2.topicID, s2 = e3.elements, a2 = s2.operationType, i2 = s2.topicIDList, r2 = s2.messageRemindType, u2 = this._groupModule.getModule(Fn); 17 === a2 ? u2.onTopicCreated({ groupID: n2, topicID: o2 }) : 18 === a2 ? u2.onTopicDeleted({ groupID: n2, topicIDList: i2 }) : 20 === a2 && u2.onTopicMessageRemindTypeUpdated({ groupID: n2, topicID: o2, messageRemindType: r2 }); } }, { key: "reset", value: function() { this.pendencyMap.clear(); } }]), e2; }(), Fi = ["relayFlag"], qi = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; return o(this, s2), (t2 = n2.call(this, e3))._n = "GroupModule", t2._commonGroupHandler = null, t2._AVChatRoomHandler = null, t2._groupSystemNoticeHandler = null, t2._commonGroupHandler = new Ii(h(t2)), t2._groupAttributesHandler = new Si(h(t2)), t2._groupCountersHandler = new Ni(h(t2)), t2._AVChatRoomHandler = new Ui(h(t2)), t2._groupTipsHandler = new yi(h(t2)), t2._groupSystemNoticeHandler = new wi(h(t2)), t2.groupMap = /* @__PURE__ */ new Map(), t2._unjoinedAVChatRoomList = /* @__PURE__ */ new Map(), t2._receiptDetailCompleteMap = /* @__PURE__ */ new Map(), t2.getInnerEmitterInstance().on(ti, t2._onCloudConfigUpdated, h(t2)), t2; } return a(s2, [{ key: "_onCloudConfigUpdated", value: function() { var e3 = this.getCloudConfig("polling_interval"), t2 = this.getCloudConfig("polling_interval_plus"), n3 = this.getCloudConfig("polling_no_msg_count"), o2 = this.getCloudConfig("polling_simplified_msg"); this._AVChatRoomHandler && (Ve.l("".concat(this._n, "._onCloudConfigUpdated pollingInterval:").concat(e3) + " pollingIntervalPlus:".concat(t2, " pollingNoMessageCount:").concat(n3) + " pollingSimplifiedMessage:".concat(o2)), this._AVChatRoomHandler.setPollingInterval(e3), this._AVChatRoomHandler.setPollingIntervalPlus(t2), this._AVChatRoomHandler.setPollingNoMessageCount(n3), this._AVChatRoomHandler.setPollingSimplifiedMessage(o2)); } }, { key: "onCheckTimer", value: function(e3) { this.isLoggedIn() && (this._commonGroupHandler.onCheckTimer(e3), this._groupTipsHandler.onCheckTimer(e3)); } }, { key: "guardForAVChatRoom", value: function(e3) { var t2 = this; if (e3.conversationType === E.CONV_GROUP) { var n3 = kt(e3.to) ? xt(e3.to) : e3.to; return this.hasLocalGroup(n3) ? Xa() : this.getGroupProfile({ groupID: n3 }).then(function(o2) { var s3 = o2.data.group.type; if (Ve.l("".concat(t2._n, ".guardForAVChatRoom. groupID:").concat(n3, " type:").concat(s3)), s3 === E.GRP_AVCHATROOM) { var a2 = ha.MESSAGE_SEND_FAIL_NOT_IN_AVCHATROOM; return Za(new ja({ code: a2, message: t2.getErrorMessage(a2, e3.from, n3), data: { message: e3 } })); } return Xa(); }); } return Xa(); } }, { key: "checkJoinedAVChatRoomByID", value: function(e3) { return !!this._AVChatRoomHandler && this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e3); } }, { key: "onNewGroupMessage", value: function(e3) { this._commonGroupHandler && this._commonGroupHandler.onNewGroupMessage(e3); } }, { key: "updateNextMessageSeq", value: function(e3) { var t2 = this; if (at(e3)) { var n3 = this.getModule(Fn); e3.forEach(function(e4) { var o2 = e4.conversationID.replace(E.CONV_GROUP, ""); kt(o2) && n3.updateLastMessage(o2, e4.lastMessage), t2.groupMap.has(o2) && (t2.groupMap.get(o2).nextMessageSeq = e4.lastMessage.sequence + 1); }); } } }, { key: "onNewGroupTips", value: function(e3) { this._groupTipsHandler && this._groupTipsHandler.onNewGroupTips(e3); } }, { key: "onGroupMessageRevoked", value: function(e3) { this._commonGroupHandler && this._commonGroupHandler.onGroupMessageRevoked(e3); } }, { key: "onNewGroupSystemNotice", value: function(e3) { this._groupSystemNoticeHandler && this._groupSystemNoticeHandler.onNewGroupSystemNotice(e3); } }, { key: "onGroupMessageReadNotice", value: function(e3) { var t2 = this; e3.dataList.forEach(function(e4) { var n3 = e4.elements.groupMessageReadNotice; if (!it(n3)) { var o2 = t2.getModule(qn); n3.forEach(function(e5) { var n4 = e5.groupID, s3 = e5.topicID, a2 = void 0 === s3 ? void 0 : s3, i2 = e5.lastMessageSeq; Ve.d("".concat(t2._n, ".onGroupMessageReadNotice groupID:").concat(n4, " lastMessageSeq:").concat(i2)); var r2 = "".concat(E.CONV_GROUP).concat(n4), u2 = true; zt(a2) || (r2 = "".concat(E.CONV_GROUP).concat(a2), u2 = false), o2.updateIsReadAfterReadReport({ conversationID: r2, lastMessageSeq: i2 }), o2.updateUnreadCount(r2, u2), o2.clearGroupAtInfoList(r2, u2); }); } }); } }, { key: "onReadReceiptList", value: function(e3) { var t2 = this; Ve.d("".concat(this._n, ".onReadReceiptList options:"), JSON.stringify(e3)), e3.dataList.forEach(function(e4) { var n3 = e4.groupProfile, o2 = e4.elements, s3 = n3.groupID, a2 = t2.getModule(qn), i2 = o2.readReceiptList; a2.updateReadReceiptInfo({ groupID: s3, readReceiptList: i2 }); }); } }, { key: "onGroupMessageModified", value: function(e3) { Ve.d("".concat(this._n, ".onGroupMessageModified options:"), JSON.stringify(e3)); var n3 = this.getModule(qn); e3.dataList.forEach(function(e4) { n3.onMessageModified(t(t({}, e4), {}, { conversationType: E.CONV_GROUP, to: e4.topicID ? e4.topicID : e4.groupID })); }); } }, { key: "deleteGroupSystemNotice", value: function(e3) { this._groupSystemNoticeHandler && this._groupSystemNoticeHandler.deleteGroupSystemNotice(e3); } }, { key: "initGroupMap", value: function(e3) { this.groupMap.set(e3.groupID, new hi(e3)); } }, { key: "deleteGroup", value: function(e3) { this.groupMap.delete(e3); } }, { key: "updateGroupMap", value: function(e3) { var t2, n3 = this, o2 = this.getModule(qn); e3.forEach(function(e4) { t2 = e4.groupID, n3.groupMap.has(t2) ? n3.groupMap.get(t2).updateGroup(e4) : (n3.groupMap.set(t2, new hi(e4)), o2.deleteGroupRomaingMessageInfo(t2)); }); var s3, a2 = this.getMyUserID(), i2 = D(this.groupMap); try { for (i2.s(); !(s3 = i2.n()).done; ) { var r2 = v(s3.value, 2)[1]; r2.selfInfo.userID = a2, "Owner" === r2.selfInfo.role && (r2.ownerID = a2); } } catch (u2) { i2.e(u2); } finally { i2.f(); } this._setStorageGroupList(); } }, { key: "getStorageGroupList", value: function() { return this.getModule(Vn).getItem("groupMap"); } }, { key: "_setStorageGroupList", value: function() { var e3 = this.getLocalGroupList().filter(function(e4) { var t2 = e4.type; return !Tt(t2); }).filter(function(e4) { return !e4.isSupportTopic; }).slice(0, 20).map(function(e4) { return { groupID: e4.groupID, name: e4.name, avatar: e4.avatar, type: e4.type }; }); this.getModule(Vn).setItem("groupMap", e3); } }, { key: "getGroupMap", value: function() { return this.groupMap; } }, { key: "getLocalGroupList", value: function() { return m(this.groupMap.values()); } }, { key: "getLocalGroupProfile", value: function(e3) { return this.groupMap.get(e3); } }, { key: "sortLocalGroupList", value: function() { var e3 = m(this.groupMap).filter(function(e4) { var t2 = v(e4, 2); return t2[0], !zt(t2[1].lastMessage); }); e3.sort(function(e4, t2) { return t2[1].lastMessage.lastTime - e4[1].lastMessage.lastTime; }), this.groupMap = new Map(m(e3)); } }, { key: "updateGroupLastMessage", value: function(e3) { this._commonGroupHandler && this._commonGroupHandler.handleUpdateGroupLastMessage(e3); } }, { key: "emitGroupListUpdate", value: function() { var e3 = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this.getLocalGroupList(); if (e3 && this.emitOuterEvent(k.GROUP_LIST_UPDATED), t2) { var o2 = JSON.parse(JSON.stringify(n3)), s3 = this.getModule(qn); s3.updateConversationGroupProfile(o2); } } }, { key: "patchGroupMessageRemindType", value: function() { var e3 = this.getLocalGroupList(), t2 = this.getModule(qn), n3 = 0; e3.forEach(function(e4) { true === t2.patchMessageRemindType({ ID: e4.groupID, isC2CConversation: false, messageRemindType: e4.selfInfo.messageRemindType }) && (n3 += 1); }), Ve.l("".concat(this._n, ".patchGroupMessageRemindType count:").concat(n3)); } }, { key: "recomputeUnreadCount", value: function() { var e3 = this.getLocalGroupList(), t2 = this.getModule(qn); e3.forEach(function(e4) { var n3 = e4.groupID, o2 = e4.selfInfo, s3 = o2.excludedUnreadSequenceList, a2 = o2.readedSequence; if (at(s3)) { var i2 = 0; s3.forEach(function(t3) { t3 >= a2 && t3 <= e4.nextMessageSeq - 1 && (i2 += 1); }), i2 >= 1 && t2.recomputeGroupUnreadCount({ conversationID: "".concat(E.CONV_GROUP).concat(n3), count: i2 }); } }); } }, { key: "getMyNameCardByGroupID", value: function(e3) { var t2 = this.getLocalGroupProfile(e3); return t2 ? t2.selfInfo.nameCard : ""; } }, { key: "isPagingGetCompleted", value: function() { return !!this._commonGroupHandler && this._commonGroupHandler.isPagingGetCompleted(); } }, { key: "getGroupList", value: function(e3) { return this._commonGroupHandler ? this._commonGroupHandler.getGroupList(e3) : Xa(); } }, { key: "getGroupProfile", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("getGroupProfile"), o2 = new Aa("getGroupProfile"), s3 = e3.groupID, a2 = e3.groupCustomFieldFilter; Ve.l("".concat(n3, " groupID:").concat(s3)); var i2 = { groupIDList: [s3], responseFilter: { groupBaseInfoFilter: ["Type", "Name", "Introduction", "Notification", "FaceUrl", "Owner_Account", "CreateTime", "InfoSeq", "LastInfoTime", "LastMsgTime", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "NextMsgSeq", "ShutUpAllMember", "InviteJoinOption"], groupCustomFieldFilter: a2, memberInfoFilter: ["Role", "JoinTime", "MsgSeq", "MsgFlag", "NameCard"] } }; return this.getGroupProfileAdvance(i2).then(function(e4) { var a3, i3 = e4.data, r2 = i3.successGroupList, u2 = i3.failureGroupList; if (Ve.l("".concat(n3, " ok")), u2.length > 0) return Za(u2[0]); (Tt(r2[0].type) && !t2.hasLocalGroup(s3) ? a3 = new hi(r2[0]) : (t2.updateGroupMap(r2), a3 = t2.getLocalGroupProfile(s3)), a3.isSupportTopic) || t2.getModule(qn).updateConversationGroupProfile([a3]); return o2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(s3, " type:").concat(a3.type, " muteAllMembers:").concat(a3.muteAllMembers, " ownerID:").concat(a3.ownerID)).end(), Ya({ group: a3 }); }).catch(function(s4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), a3 = n4[0], i3 = n4[1]; o2.setError(s4, a3, i3).setMessage("groupID:".concat(e3.groupID)).end(); }), Ve.e("".concat(n3, " failed. error:"), s4), Za(s4); }); } }, { key: "getGroupProfileAdvance", value: function(e3) { var n3 = "".concat(this._n, ".getGroupProfileAdvance"), o2 = e3.groupIDList; at(o2) && o2.length > 50 && (this.outputWarning("GetGroupProfileLimit"), o2.length = 50); var s3 = [], a2 = []; o2.forEach(function(e4) { Dt({ groupID: e4 }) ? a2.push(e4) : s3.push(e4); }); var i2 = []; if (s3.length > 0) { var r2 = this._getGroupProfileAdvance(t(t({}, e3), {}, { groupIDList: s3 })); i2.push(r2); } if (a2.length > 0) { var u2 = this._getGroupProfileAdvance(t(t({}, e3), {}, { groupIDList: a2, relayFlag: s3.length > 0 })); i2.push(u2); } return Promise.all(i2).then(function(e4) { var t2 = [], n4 = []; return e4.forEach(function(e5) { t2.push.apply(t2, m(e5.successGroupList)), n4.push.apply(n4, m(e5.failureGroupList)); }), Ya({ successGroupList: t2, failureGroupList: n4 }); }).catch(function(e4) { return Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "_getGroupProfileAdvance", value: function(e3) { var t2 = this, n3 = e3.relayFlag, o2 = void 0 !== n3 && n3, s3 = g(e3, Fi); return this.request({ protocolName: zo, requestData: s3 }).then(function(e4) { Ve.l("".concat(t2._n, "._getGroupProfileAdvance ok.")); var n4 = e4.data.groups; return { successGroupList: n4.filter(function(e5) { return it(e5.errorCode) || 0 === e5.errorCode; }), failureGroupList: n4.filter(function(e5) { return e5.errorCode && 0 !== e5.errorCode; }).map(function(e5) { return new ja({ code: e5.errorCode, message: e5.errorInfo, data: { groupID: e5.groupID } }); }) }; }).catch(function(t3) { return o2 && Dt({ groupID: e3.groupIDList[0] }) ? { successGroupList: [], failureGroupList: [] } : Za(t3); }); } }, { key: "createGroup", value: function(e3) { var n3 = this, o2 = "".concat(this._n, ".").concat("createGroup"), s3 = e3.type, a2 = e3.groupID; if (e3.name && false === this._filterProfanity("name", e3)) return Za({ code: ha.PROFANITY_FOUND }); if (e3.introduction && false === this._filterProfanity("introduction", e3)) return Za({ code: ha.PROFANITY_FOUND }); if (e3.notification && false === this._filterProfanity("notification", e3)) return Za({ code: ha.PROFANITY_FOUND }); if (!["Public", "Private", "ChatRoom", "AVChatRoom", "Community"].includes(s3)) return Za({ code: ha.ILLEGAL_GROUP_TYPE }); if (!Dt({ type: s3 })) { if (!zt(a2) && Dt({ groupID: a2 })) return Za({ code: ha.ILLEGAL_GROUP_ID }); e3.isSupportTopic = void 0; } if (Tt(s3) && !it(e3.memberList) && e3.memberList.length > 0 && (e3.memberList = void 0), this._canIUseJoinOption(s3) || it(e3.joinOption) || (e3.joinOption = void 0), Dt({ type: s3 })) { if (!zt(a2) && !Dt({ groupID: a2 })) return Za({ code: ha.ILLEGAL_GROUP_ID }); e3.isSupportTopic = true === e3.isSupportTopic ? 1 : 0; } var i2 = new Aa("createGroup"); Ve.l("".concat(o2, " options:"), e3); var r2 = null, u2 = []; return this.request({ protocolName: Jo, requestData: t(t({}, e3), {}, { ownerID: this.getMyUserID(), webPushFlag: 1 }) }).then(function(s4) { var a3 = s4.data, c2 = a3.groupID, l2 = a3.overLimitUserIDList, d2 = void 0 === l2 ? [] : l2; if (r2 = c2, u2 = d2, i2.setNetworkType(n3.getNetworkType()).setMessage("groupType:".concat(e3.type, " groupID:").concat(c2, " overLimitUserIDList=").concat(d2)).end(), Ve.l("".concat(o2, " ok groupID:").concat(c2, " overLimitUserIDList:"), d2), e3.type === E.GRP_AVCHATROOM) return n3.getGroupProfile({ groupID: c2 }); if (e3.type === E.GRP_COMMUNITY && 1 === e3.isSupportTopic) return n3.getGroupProfile({ groupID: c2 }); zt(e3.memberList) || zt(d2) || (e3.memberList = e3.memberList.filter(function(e4) { return -1 === d2.indexOf(e4.userID); })), n3.updateGroupMap([t(t({}, e3), {}, { groupID: c2 })]); var p2 = n3.getModule(Nn), g2 = p2.createCustomMessage({ to: c2, conversationType: E.CONV_GROUP, payload: { data: "group_create", extension: n3.isIntl() ? "".concat(n3.getMyUserID(), " created a group") : "".concat(n3.getMyUserID(), "创建群组") } }); return p2.sendMessageInstance(g2), n3.emitGroupListUpdate(), n3.getGroupProfile({ groupID: c2 }); }).then(function(e4) { var t2 = e4.data.group, n4 = t2.selfInfo, o3 = n4.nameCard, s4 = n4.joinTime; return t2.updateSelfInfo({ nameCard: o3, joinTime: s4, messageRemindType: E.MSG_REMIND_ACPT_AND_NOTE, role: E.GRP_MBR_ROLE_OWNER }), Ya({ group: t2, overLimitUserIDList: u2 }); }).catch(function(s4) { if (i2.setMessage("groupType:".concat(e3.type)), n3.probeNetwork().then(function(e4) { var t2 = v(e4, 2), n4 = t2[0], o3 = t2[1]; i2.setError(s4, n4, o3).end(); }), 10010 === s4.code || 10007 === s4.code) { n3.updateGroupMap([t(t({}, e3), {}, { groupID: r2 })]); var a3 = n3.getLocalGroupProfile(r2); return Ve.l("".concat(o2, " success, but failed to get group profile.")), Ya({ group: a3, overLimitUserIDList: u2 }); } return Ve.e("".concat(o2, " failed. error:"), s4), Za(s4); }); } }, { key: "dismissGroup", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("dismissGroup"); if (this.hasLocalGroup(e3) && this.getLocalGroupProfile(e3).type === E.GRP_WORK) return Za(new ja({ code: ha.CANNOT_DISMISS_WORK })); var o2 = new Aa("dismissGroup"); return o2.setMessage("groupID:".concat(e3)), Ve.l("".concat(n3, " groupID:").concat(e3)), this.request({ protocolName: Xo, requestData: { groupID: e3 } }).then(function() { return o2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), t2.deleteLocalGroupAndConversation(e3), t2.checkJoinedAVChatRoomByID(e3) && t2._AVChatRoomHandler.reset(e3), t2._groupAttributesHandler.deleteLocalGroupAttributes(e3), Ya({ groupID: e3 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), s3 = n4[0], a2 = n4[1]; o2.setError(e4, s3, a2).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "updateGroupProfile", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("updateGroupProfile"); if (this.hasLocalGroup(e3.groupID)) { var o2 = this.getLocalGroupProfile(e3.groupID).type; this._canIUseJoinOption(o2) || it(e3.joinOption) || (Ve.w("".concat(n3, " joinOption is unavailable for Work/Meeting/AVChatRoom")), e3.joinOption = void 0); } if (it(e3.muteAllMembers) || (e3.muteAllMembers ? e3.muteAllMembers = "On" : e3.muteAllMembers = "Off"), e3.name && false === this._filterProfanity("name", e3)) return Za({ code: ha.PROFANITY_FOUND }); if (e3.introduction && false === this._filterProfanity("introduction", e3)) return Za({ code: ha.PROFANITY_FOUND }); if (e3.notification && false === this._filterProfanity("notification", e3)) return Za({ code: ha.PROFANITY_FOUND }); var s3 = new Aa("updateGroupProfile"); return s3.setMessage(JSON.stringify(e3)), Ve.l("".concat(n3, " groupID:").concat(e3.groupID)), this.request({ protocolName: Zo, requestData: e3 }).then(function() { (s3.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), t2.hasLocalGroup(e3.groupID)) && (t2.groupMap.get(e3.groupID).updateGroup(e3), t2._setStorageGroupList()); return Ya({ group: t2.groupMap.get(e3.groupID) }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], a2 = n4[1]; s3.setError(e4, o3, a2).end(); }), Ve.l("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "_filterProfanity", value: function(e3, t2) { var n3 = this.getModule(oo); if (!n3) return true; var o2 = n3.filterText(t2[e3], z), s3 = o2.isAllowedToSend, a2 = o2.modifiedText; return true === s3 && (t2[e3] = a2, true); } }, { key: "joinGroup", value: function(e3) { var t2 = this, n3 = e3.groupID, o2 = e3.type, s3 = "".concat(this._n, ".joinGroup"); if (o2 === E.GRP_WORK) return Za({ code: ha.CANNOT_JOIN_WORK }); if (this.deleteUnjoinedAVChatRoom(n3), this.hasLocalGroup(n3)) { if (!this.isLoggedIn()) return Xa({ status: E.JOIN_STATUS_ALREADY_IN_GROUP }); var a2 = new Aa("applyJoinGroup"); return this.getGroupProfile({ groupID: n3 }).then(function() { return a2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(n3, " joinedStatus:").concat(E.JOIN_STATUS_ALREADY_IN_GROUP)).end(), Xa({ status: E.JOIN_STATUS_ALREADY_IN_GROUP }); }).catch(function(o3) { return a2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(n3, " unjoined")).end(), Ve.w("".concat(s3, " ").concat(n3, " was unjoined, now join!")), t2.groupMap.delete(n3), t2.applyJoinGroup(e3); }); } return Ve.l("".concat(s3, " groupID:").concat(n3)), this.isLoggedIn() ? this.applyJoinGroup(e3) : this._AVChatRoomHandler.joinWithoutAuth(e3); } }, { key: "applyJoinGroup", value: function(e3) { var n3 = this, o2 = "".concat(this._n, ".").concat("applyJoinGroup"), s3 = e3.groupID; if (!zt(e3.applyMessage) && false === this._filterProfanity("applyMessage", e3)) return Za({ code: ha.PROFANITY_FOUND }); var a2 = new Aa("applyJoinGroup"), i2 = t({}, e3), r2 = this.canIUse(B.AVCHATROOM_HISTORY_MSG); return r2 && (i2.historyMessageFlag = 1), this.getModule(qn).deleteTopicRoamingMessageInfo(s3), this.request({ protocolName: Qo, requestData: i2 }).then(function(e4) { var t2 = e4.data, i3 = t2.joinedStatus, u2 = t2.longPollingKey, c2 = t2.startSeq, l2 = t2.avChatRoomFlag, d2 = t2.avChatRoomKey, p2 = t2.messageList, g2 = "groupID:".concat(s3, " joinedStatus:").concat(i3, " longPollingKey:").concat(u2, " startSeq:").concat(c2) + " avChatRoomFlag:".concat(l2, " canGetAVChatRoomHistoryMessage:").concat(r2, ",") + " history message count:".concat(zt(p2) ? 0 : p2.length); switch (a2.setNetworkType(n3.getNetworkType()).setMessage("".concat(g2)).end(), Ve.l("".concat(o2, " ok. ").concat(g2)), i3) { case ze: return Ya({ status: ze }); case je: return n3.getGroupProfile({ groupID: s3 }).then(function(e5) { var t3 = e5.data.group; return n3._handleJoinResult({ group: t3, avChatRoomFlag: l2, longPollingKey: u2, startSeq: c2, avChatRoomKey: d2, messageList: p2 }); }).catch(function() { var e5 = new hi({ groupID: s3 }); return n3._handleJoinResult({ group: e5, avChatRoomFlag: l2, longPollingKey: u2, startSeq: c2, avChatRoomKey: d2, messageList: p2 }); }); default: var h2 = new ja({ code: ha.JOIN_GROUP_FAIL }); return Ve.e("".concat(o2, " failed. error:"), h2), Za(h2); } }).catch(function(e4) { return a2.setMessage("groupID:".concat(s3)), n3.probeNetwork().then(function(t2) { var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1]; a2.setError(e4, o3, s4).end(); }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4); }); } }, { key: "_handleJoinResult", value: function(e3) { var t2, n3 = this, o2 = e3.group, s3 = e3.avChatRoomFlag, a2 = e3.longPollingKey, i2 = e3.startSeq, r2 = e3.avChatRoomKey, u2 = e3.messageList, c2 = o2.groupID; return 1 === s3 ? (this.getModule(qn).setCompleted("".concat(E.CONV_GROUP).concat(c2)), this._groupAttributesHandler.initGroupAttributesCache({ groupID: c2, avChatRoomKey: r2 }), this._groupCountersHandler.initGroupCountersCache({ groupID: c2, avChatRoomKey: r2 }), (t2 = it(a2) ? this._AVChatRoomHandler.handleJoinResult({ group: o2 }) : this._AVChatRoomHandler.startRunLoop({ group: o2, longPollingKey: a2, startSeq: i2 })).then(function() { n3._onAVChatRoomHistoryMessage(u2); }), t2) : (this.emitGroupListUpdate(true, false), Ya({ status: je, group: o2 })); } }, { key: "quitGroup", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("quitGroup"); Ve.l("".concat(n3, " groupID:").concat(e3)); var o2 = this.checkJoinedAVChatRoomByID(e3); if (!o2 && !this.hasLocalGroup(e3)) return Za({ code: ha.MEMBER_NOT_IN_GROUP }); if (o2 && !this.isLoggedIn()) return Ve.l("".concat(n3, " anonymously ok. groupID:").concat(e3)), this.deleteLocalGroupAndConversation(e3), this._AVChatRoomHandler.reset(e3), Xa({ groupID: e3 }); var s3 = new Aa("quitGroup"); return s3.setMessage("groupID:".concat(e3)), this.request({ protocolName: es, requestData: { groupID: e3 } }).then(function() { return s3.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), t2.deleteLocalGroupAndConversation(e3), o2 && t2._AVChatRoomHandler.reset(e3), t2._groupAttributesHandler.deleteLocalGroupAttributes(e3), Ya({ groupID: e3 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], a2 = n4[1]; s3.setError(e4, o3, a2).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "searchGroupByID", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("searchGroupByID"), o2 = { groupIDList: [e3] }, s3 = new Aa("searchGroupByID"); return s3.setMessage("groupID:".concat(e3)), Ve.l("".concat(n3, " groupID:").concat(e3)), this.request({ protocolName: ts, requestData: o2 }).then(function(e4) { var o3 = e4.data.groupProfile; if (0 !== o3[0].errorCode) throw new ja({ code: o3[0].errorCode, message: o3[0].errorInfo }); return s3.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), Ya({ group: new hi(o3[0]) }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], a2 = n4[1]; s3.setError(e4, o3, a2).end(); }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "changeGroupOwner", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("changeGroupOwner"); if (this.hasLocalGroup(e3.groupID) && this.getLocalGroupProfile(e3.groupID).type === E.GRP_AVCHATROOM) return Za({ code: ha.CANNOT_CHANGE_OWNER_IN_AVCHATROOM }); if (e3.newOwnerID === this.getMyUserID()) return Za({ code: ha.CANNOT_CHANGE_OWNER_TO_SELF }); var o2 = new Aa("changeGroupOwner"); return o2.setMessage("groupID:".concat(e3.groupID, " newOwnerID:").concat(e3.newOwnerID)), Ve.l("".concat(n3, " groupID:").concat(e3.groupID)), this.request({ protocolName: ns, requestData: e3 }).then(function() { o2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")); var s3 = e3.groupID, a2 = e3.newOwnerID; t2.groupMap.get(s3).ownerID = a2; var i2 = t2.getModule(wn).getLocalGroupMemberList(s3); if (i2 instanceof Map) { var r2 = i2.get(t2.getMyUserID()); it(r2) || (r2.updateRole("Member"), t2.groupMap.get(s3).selfInfo.role = "Member"); var u2 = i2.get(a2); it(u2) || u2.updateRole("Owner"); } return t2.emitGroupListUpdate(true, false), Ya({ group: t2.groupMap.get(s3) }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), s3 = n4[0], a2 = n4[1]; o2.setError(e4, s3, a2).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "getGroupApplicationList", value: function() { return this._groupSystemNoticeHandler.getGroupApplicationList(); } }, { key: "handleGroupApplication", value: function(e3) { var t2, n3, o2, s3, a2, i2 = this, r2 = "".concat(this._n, ".").concat("handleGroupApplication"), u2 = e3.handleAction, c2 = e3.handleMessage, l2 = e3.message, d2 = e3.application; l2 ? (t2 = l2.payload.operatorID, n3 = l2.payload.groupProfile.groupID, o2 = l2.payload.authentication, s3 = l2.payload.messageKey) : d2 && (t2 = d2.applicant, n3 = d2.groupID, o2 = d2.authentication, s3 = d2.messageKey); var p2 = os2; d2 && 2 === d2.applicationType && (p2 = ss, a2 = d2.userID); var g2 = new Aa("handleGroupApplication"); return g2.setMessage("groupID:".concat(n3)), Ve.l("".concat(r2, " groupID:").concat(n3)), this.request({ protocolName: p2, requestData: { handleAction: u2, handleMessage: c2, applicant: t2, invitee: a2, groupID: n3, authentication: o2, messageKey: s3 } }).then(function() { return g2.setNetworkType(i2.getNetworkType()).end(), Ve.l("".concat(r2, " ok")), l2 && i2._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e3.message] }), Ya({ group: i2.getLocalGroupProfile(n3) }); }).catch(function(e4) { return i2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; g2.setError(e4, o3, s4).end(); }), Ve.e("".concat(r2, " failed. error"), e4), Za(e4); }); } }, { key: "handleGroupInvitation", value: function(e3) { var n3 = this, o2 = "".concat(this._n, ".").concat("handleGroupInvitation"), s3 = e3.message.payload, a2 = s3.groupProfile.groupID, i2 = s3.authentication, r2 = s3.messageKey, u2 = s3.operatorID, c2 = e3.handleAction, l2 = new Aa("handleGroupInvitation"); return l2.setMessage("groupID:".concat(a2, " inviter:").concat(u2, " handleAction:").concat(c2)), Ve.l("".concat(o2, " groupID:").concat(a2, " inviter:").concat(u2, " handleAction:").concat(c2)), this.request({ protocolName: as, requestData: t(t({}, e3), {}, { inviter: u2, groupID: a2, authentication: i2, messageKey: r2 }) }).then(function() { return l2.setNetworkType(n3.getNetworkType()).end(), Ve.l("".concat(o2, " ok")), n3._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e3.message] }), Ya({ group: n3.getLocalGroupProfile(a2) }); }).catch(function(e4) { return n3.probeNetwork().then(function(t2) { var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1]; l2.setError(e4, o3, s4).end(); }), Ve.e("".concat(o2, " failed. error"), e4), Za(e4); }); } }, { key: "getGroupOnlineMemberCount", value: function(e3) { return this._AVChatRoomHandler ? this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e3) ? this._AVChatRoomHandler.getGroupOnlineMemberCount(e3) : Xa({ memberCount: 0 }) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "hasLocalGroup", value: function(e3) { return this.groupMap.has(e3); } }, { key: "deleteLocalGroupAndConversation", value: function(e3) { var t2 = this.checkJoinedAVChatRoomByID(e3); (Ve.l("".concat(this._n, ".deleteLocalGroupAndConversation isJoinedAVChatRoom:").concat(t2)), t2) && this.getModule(qn).deleteLocalConversation("".concat(E.CONV_GROUP).concat(e3)); if (Dt({ groupID: e3 })) { var n3 = this.getLocalGroupProfile(e3); if (n3 && true === n3.isSupportTopic) this.getModule(Fn).deleteTopicListInCommunity(e3); } this._deleteLocalGroup(e3), this.emitGroupListUpdate(true, false); } }, { key: "_deleteLocalGroup", value: function(e3) { this.groupMap.delete(e3), this.getModule(wn).deleteGroupMemberList(e3), this._setStorageGroupList(); } }, { key: "sendMessage", value: function(e3, t2) { if (at(e3._receiverList) && e3._receiverList.length > 0 && !this.canIUse(B.MSG_TO_SPECIFIED_GRP_MBR)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n3 = this.createGroupMessagePack(e3, t2); return this.request(n3); } }, { key: "createGroupMessagePack", value: function(e3, t2) { var n3 = null; t2 && t2.offlinePushInfo && (n3 = t2.offlinePushInfo); var o2 = ""; nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (o2 = e3.cloudCustomData); var s3 = []; if (st(t2) && st(t2.messageControlInfo)) { var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration; true === i2 && s3.push("NoUnread"), true === r2 && s3.push("NoLastMsg"), true === u2 && s3.push("NoMsgCheck"); } var c2 = void 0; at(e3._receiverList) && e3._receiverList.length > 0 && (c2 = e3._receiverList, e3._receiverList.length > 50 && (c2 = e3._receiverList.slice(0, 50), this.outputWarning("ReceiverListLimit"))); var l2 = this.isOnlineMessage(e3, t2) ? 1 : 0, d2 = e3.getGroupAtInfoList(), p2 = { fromAccount: this.getMyUserID(), groupID: e3.to, msgBody: e3.getElements(), cloudCustomData: o2, random: e3.random, priority: e3.priority, clientSequence: e3.clientSequence, groupAtInfo: e3.type !== E.MSG_TEXT || zt(d2) ? void 0 : d2, onlineOnlyFlag: l2, clientTime: e3.clientTime, offlinePushInfo: n3 ? { pushFlag: true === n3.disablePush ? 1 : 0, title: n3.title || "", desc: n3.description || "", ext: n3.extension || "", apnsInfo: { badgeMode: true === n3.ignoreIOSBadge ? 1 : 0, isVoipPush: this._isVoipPush(n3) }, androidInfo: { OPPOChannelID: n3.androidOPPOChannelID || "" } } : void 0, messageControlInfo: 0 === l2 ? s3 : void 0, needReadReceipt: true !== e3.needReadReceipt || this.isMessageFromOrToAVChatroom(e3.to) ? 0 : 1, receiverList: c2, isSupportExtension: true === e3.isSupportExtension ? 1 : 0 }; return kt(e3.to) && (p2.groupID = xt(e3.to), p2.topicID = e3.to), { protocolName: vo, tjgID: this.generateTjgID(e3), requestData: p2 }; } }, { key: "_isVoipPush", value: function(e3) { var t2 = void 0; return it(e3.disableVoipPush) || (t2 = false === e3.disableVoipPush ? 1 : 0), t2; } }, { key: "revokeMessage", value: function(e3) { var t2 = { groupID: e3.to, msgSeqList: [{ msgSeq: e3.sequence }] }; return kt(e3.to) && (t2.groupID = xt(e3.to), t2.topicID = e3.to), this.request({ protocolName: is, requestData: t2 }); } }, { key: "deleteMessage", value: function(e3) { var t2 = e3.to, n3 = e3.keyList; Ve.l("".concat(this._n, ".deleteMessage groupID:").concat(t2, " count:").concat(n3.length)); var o2 = { groupID: t2, deleter: this.getMyUserID(), keyList: n3 }; return kt(t2) && (o2.groupID = xt(t2), o2.topicID = t2), this.request({ protocolName: Ms, requestData: o2 }); } }, { key: "modifyRemoteMessage", value: function(e3) { var t2 = e3.to, n3 = e3.sequence, o2 = e3.payload, s3 = e3.type, a2 = e3.version, i2 = void 0 === a2 ? 0 : a2, r2 = e3.cloudCustomData, u2 = t2, c2 = void 0; kt(t2) && (u2 = xt(t2), c2 = t2); var l2 = void 0; return Bt(s3) && (l2 = []).push({ type: s3, content: o2 }), this.request({ protocolName: ys, requestData: { groupID: u2, topicID: c2, sequence: n3, version: i2, elements: l2, cloudCustomData: r2 } }); } }, { key: "getRoamingMessage", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".getRoamingMessage"), o2 = e3.conversationID, s3 = e3.groupID, a2 = e3.sequence, i2 = new Aa("getGroupRoamingMessages"), r2 = 0, u2 = void 0; return kt(s3) && (s3 = xt(u2 = s3)), this._computeLastSequence({ groupID: s3, topicID: u2, sequence: a2 }).then(function(e4) { return r2 = e4, Ve.l("".concat(n3, " groupID:").concat(s3, " startSequence:").concat(r2)), t2.request({ protocolName: cs, requestData: { groupID: s3, count: 21, sequence: r2, topicID: u2 } }); }).then(function(e4) { var a3 = e4.data, c2 = a3.messageList, l2 = a3.complete, d2 = a3.invisibleSequenceList, p2 = void 0 === d2 ? [] : d2; it(c2) ? Ve.l("".concat(n3, " ok. complete:").concat(l2, " but messageList is undefined!")) : Ve.l("".concat(n3, " ok. complete:").concat(l2, " count:").concat(c2.length)); var g2 = t2._getMinSequence(p2, c2) - 1; i2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(s3, " topicID:").concat(u2, " startSequence:").concat(r2, " complete:").concat(l2, " nextSequence:").concat(g2)).end(); var h2 = t2.getModule(qn), _2 = []; return zt(c2) || (h2.updateRoamingMessageSequence(o2, g2), _2 = h2.onRoamingMessage(c2, o2), h2.updateIsRead(o2), h2.patchConversationLastMessage(o2)), (2 === l2 || g2 <= 1) && (h2.setCompleted(o2), g2 = ""), Ve.l("".concat(n3, " nextReqID:").concat(g2, ", stored message count:").concat(_2.length, ", invisible sequence count:").concat(p2.length)), { nextReqID: g2 + "", storedMessageList: _2 }; }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], a3 = n4[1]; i2.setError(e4, o3, a3).setMessage("groupID:".concat(s3, " topicID:").concat(u2, " startSequence:").concat(r2)).end(); }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "_getGroupIDOfMessage", value: function(e3) { return e3.conversationID.replace(E.CONV_GROUP, ""); } }, { key: "_getMinSequence", value: function(e3, t2) { var n3 = 0; zt(t2) || (n3 = t2[t2.length - 1].sequence); var o2 = 0; zt(e3) || (o2 = e3[e3.length - 1]); return Ve.l("".concat(this._n, "._getMinSequence minVisibleSequence:").concat(n3, " minInvisibleSequence:").concat(o2)), o2 > 0 && o2 < n3 ? o2 : n3; } }, { key: "getReadReceiptList", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("getReadReceiptList"), o2 = this._getGroupIDOfMessage(e3[0]), s3 = this.getMyUserID(), a2 = e3.filter(function(e4) { return e4.from === s3 && true === e4.needReadReceipt; }).map(function(e4) { return { sequence: e4.sequence }; }); if (Ve.l("".concat(n3, " groupID:").concat(o2, " sequenceList:").concat(JSON.stringify(a2))), 0 === a2.length) return Xa({ messageList: e3 }); var i2 = new Aa("getReadReceiptList"); return i2.setMessage("groupID:".concat(o2)), this.request({ protocolName: ls, requestData: { groupID: o2, sequenceList: a2 } }).then(function(t3) { i2.end(), Ve.l("".concat(n3, " ok")); var o3 = t3.data.readReceiptList; return at(o3) && o3.forEach(function(t4) { e3.forEach(function(e4) { 0 === t4.code && t4.sequence === e4.sequence && (e4.readReceiptInfo.readCount = t4.readCount, e4.readReceiptInfo.unreadCount = t4.unreadCount); }); }), Ya({ messageList: e3 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; i2.setError(e4, o3, s4).end(); }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "sendReadReceipt", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("sendReadReceipt"), o2 = this._getGroupIDOfMessage(e3[0]), s3 = new Aa("sendReadReceipt"); s3.setMessage("groupID:".concat(o2)); var a2 = this.getMyUserID(), i2 = e3.filter(function(e4) { return e4.from !== a2 && true === e4.needReadReceipt; }).map(function(e4) { return { sequence: e4.sequence }; }); return 0 === i2.length ? Za({ code: ha.READ_RECEIPT_MESSAGE_LIST_EMPTY }) : (Ve.l("".concat(n3, ". sequenceList:").concat(JSON.stringify(i2))), this.request({ protocolName: ds, requestData: { groupID: o2, sequenceList: i2 } }).then(function(e4) { return s3.end(), Ve.l("".concat(n3, " ok")), Ya(); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], a3 = n4[1]; s3.setError(e4, o3, a3).end(); }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4); })); } }, { key: "getReadReceiptDetail", value: function(e3) { var t2 = this, n3 = e3.message, o2 = e3.filter, s3 = e3.cursor, a2 = e3.count, i2 = this._getGroupIDOfMessage(n3), r2 = n3.ID, u2 = n3.sequence, c2 = "".concat(this._n, ".").concat("getReadReceiptDetail"), l2 = this._receiptDetailCompleteMap.get(r2) || false, d2 = 0 !== o2 && 1 !== o2 ? 0 : o2, p2 = nt(s3) ? s3 : "", g2 = !et(a2) || a2 <= 0 || a2 >= 100 ? 100 : a2, h2 = "groupID:".concat(i2, " sequence:").concat(u2, " cursor:").concat(p2, " filter:").concat(d2, " completeFlag:").concat(l2); Ve.l("".concat(c2, " ").concat(h2)); var _2 = { cursor: "", isCompleted: false, messageID: r2, unreadUserIDList: [], readUserIDList: [] }, f2 = new Aa("getReadReceiptDetail"); return f2.setMessage(h2), this.request({ protocolName: gs, requestData: { groupID: i2, sequence: u2, flag: d2, cursor: p2, count: g2 } }).then(function(e4) { f2.end(); var n4 = e4.data, o3 = n4.cursor, s4 = n4.isCompleted, a3 = n4.unreadUserIDList, i3 = n4.readUserIDList; return _2.cursor = o3, 1 === s4 && (_2.isCompleted = true, t2._receiptDetailCompleteMap.set(r2, true)), 0 === d2 ? _2.readUserIDList = i3.map(function(e5) { return e5.userID; }) : 1 === d2 && (_2.unreadUserIDList = a3.map(function(e5) { return e5.userID; })), Ve.l("".concat(c2, " ok")), Ya(_2); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; f2.setError(e4, o3, s4).end(); }), Ve.w("".concat(c2, " failed. error:"), e4), Za(e4); }); } }, { key: "getRoamingMessagesHopping", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".getRoamingMessagesHopping"), o2 = new Aa("getGroupRoamingMessagesHopping"), s3 = e3.groupID, a2 = e3.count, i2 = e3.sequence, r2 = e3.direction, u2 = i2; 1 === r2 && (u2 = i2 + a2 - 1); var c2 = void 0; kt(s3) && (s3 = xt(c2 = s3)); var l2 = "".concat(c2 ? "topicID:".concat(c2) : "groupID:".concat(s3), " sequence:").concat(i2, " direction:").concat(r2); return Ve.l("".concat(n3, " ").concat(l2)), this.request({ protocolName: cs, requestData: { groupID: s3, topicID: c2, count: a2, sequence: u2 } }).then(function(s4) { var a3 = s4.data, u3 = a3.messageList, c3 = a3.complete, d2 = "complete:".concat(c3, " count:").concat(u3 ? u3.length : 0); if (Ve.l("".concat(n3, " ok. ").concat(d2)), o2.setNetworkType(t2.getNetworkType()).setMessage("".concat(l2, " ").concat(d2)).end(), 2 === c3 || zt(u3)) { var p2 = t2._computeResult(); return Ya(p2); } var g2 = "".concat(E.CONV_GROUP).concat(e3.groupID), h2 = t2.getModule(qn).onRoamingMessage(u3, g2, false), _2 = t2._computeResult({ direction: r2, sequence: i2, remoteMessageList: u3, processedMessageList: h2 }); return Ya(_2); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), r3 = n4[0], u3 = n4[1]; o2.setError(e4, r3, u3).setMessage("groupID:".concat(s3, " sequence:").concat(i2, " count:").concat(a2)).end(); }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "_computeResult", value: function(e3) { var t2 = { messageList: [], isCompleted: false, nextMessageSeq: "" }; if (it(e3)) return t2.isCompleted = true, t2; var n3 = e3.direction, o2 = e3.sequence, s3 = e3.remoteMessageList, a2 = void 0 === s3 ? [] : s3, i2 = e3.processedMessageList, r2 = void 0 === i2 ? [] : i2, u2 = a2.length; return 1 === n3 ? (t2.nextMessageSeq = a2[0].sequence + 1, r2.forEach(function(e4) { e4.sequence >= o2 && t2.messageList.push(e4); }), 0 === t2.messageList.length && a2[0].sequence < o2 && (t2.isCompleted = true, t2.nextMessageSeq = ""), t2) : (t2.nextMessageSeq = a2[u2 - 1].sequence - 1, t2.messageList = m(r2), 0 === t2.nextMessageSeq && (t2.isCompleted = true, t2.nextMessageSeq = ""), t2); } }, { key: "setMessageRead", value: function(e3) { var t2 = this, n3 = e3.conversationID, o2 = e3.lastMessageSeq, s3 = "".concat(this._n, ".setMessageRead"); Ve.l("".concat(s3, " conversationID:").concat(n3, " lastMessageSeq:").concat(o2)), et(o2) || this.outputWarning("DoNotModifyLastSeq"); var a2 = new Aa("setGroupMessageRead"); a2.setMessage("".concat(n3, "-").concat(o2)); var i2 = n3.replace(E.CONV_GROUP, ""), r2 = void 0; return kt(i2) && (i2 = xt(r2 = i2)), this.request({ protocolName: rs, requestData: { groupID: i2, topicID: r2, messageReadSeq: o2 } }).then(function() { a2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(s3, " ok.")); var e4 = t2.getModule(qn); e4.updateIsReadAfterReadReport({ conversationID: n3, lastMessageSeq: o2 }); var u2 = true; if (!it(r2)) { u2 = false; var c2 = t2.getModule(Fn).getLocalTopic(i2, r2); c2 && c2.updateSelfInfo({ readedSequence: o2 }); } return e4.updateUnreadCount(n3, u2), Ya(); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; a2.setError(e4, o3, s4).end(); }), Ve.l("".concat(s3, " failed. error:"), e4), Za(e4); }); } }, { key: "_computeLastSequence", value: function(e3) { var t2 = e3.groupID, n3 = e3.topicID, o2 = void 0 === n3 ? void 0 : n3, s3 = e3.sequence; return s3 > 0 ? Promise.resolve(s3) : it(o2) || this.hasLocalGroup(t2) ? it(o2) ? this.getGroupLastSequence(t2) : this.getTopicLastSequence({ groupID: t2, topicID: o2 }) : Promise.resolve(0); } }, { key: "getGroupLastSequence", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("getGroupLastSequence"), o2 = new Aa("getGroupLastSequence"), s3 = 0, a2 = ""; if (this.hasLocalGroup(e3)) { var i2 = this.getLocalGroupProfile(e3), r2 = i2.lastMessage; if (r2.lastSequence > 0 && false === r2.onlineOnlyFlag) return s3 = r2.lastSequence, a2 = "got lastSequence:".concat(s3, " from local group profile[lastMessage.lastSequence]. groupID:").concat(e3), Ve.l("".concat(n3, " ").concat(a2)), o2.setNetworkType(this.getNetworkType()).setMessage("".concat(a2)).end(), Promise.resolve(s3); if (i2.nextMessageSeq > 1) return s3 = i2.nextMessageSeq - 1, a2 = "got lastSequence:".concat(s3, " from local group profile[nextMessageSeq]. groupID:").concat(e3), Ve.l("".concat(n3, " ").concat(a2)), o2.setNetworkType(this.getNetworkType()).setMessage("".concat(a2)).end(), Promise.resolve(s3); } var u2 = "GROUP".concat(e3), c2 = this.getModule(qn).getLocalConversation(u2); if (c2 && c2.lastMessage.lastSequence && false === c2.lastMessage.onlineOnlyFlag) return s3 = c2.lastMessage.lastSequence, a2 = "got lastSequence:".concat(s3, " from local conversation profile[lastMessage.lastSequence]. groupID:").concat(e3), Ve.l("".concat(n3, " ").concat(a2)), o2.setNetworkType(this.getNetworkType()).setMessage("".concat(a2)).end(), Promise.resolve(s3); var l2 = { groupIDList: [e3], responseFilter: { groupBaseInfoFilter: ["NextMsgSeq"] } }; return this.getGroupProfileAdvance(l2).then(function(i3) { var r3 = i3.data.successGroupList; return zt(r3) ? Ve.l("".concat(n3, " successGroupList is empty. groupID:").concat(e3)) : (s3 = r3[0].nextMessageSeq - 1, a2 = "got lastSequence:".concat(s3, " from getGroupProfileAdvance. groupID:").concat(e3), Ve.l("".concat(n3, " ").concat(a2))), o2.setNetworkType(t2.getNetworkType()).setMessage("".concat(a2)).end(), s3; }).catch(function(s4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), a3 = n4[0], i3 = n4[1]; o2.setError(s4, a3, i3).setMessage("get lastSequence failed from getGroupProfileAdvance. groupID:".concat(e3)).end(); }), Ve.w("".concat(n3, " failed. error:"), s4), Za(s4); }); } }, { key: "getTopicLastSequence", value: function(e3) { var t2 = this, n3 = e3.groupID, o2 = e3.topicID, s3 = "".concat(this._n, ".").concat("getTopicLastSequence"), a2 = new Aa("getTopicLastSequence"), i2 = 0, r2 = "", u2 = this.getModule(Fn); return u2.hasLocalTopic(n3, o2) ? (i2 = u2.getLocalTopic(n3, o2).nextMessageSeq - 1, r2 = "get lastSequence:".concat(i2, " from local topic info[nextMessageSeq]. topicID:").concat(o2), Ve.l("".concat(s3, " ").concat(r2)), a2.setNetworkType(this.getNetworkType()).setMessage("".concat(r2)).end(), Promise.resolve(i2)) : u2.getTopicList({ groupID: n3, topicIDList: [o2] }).then(function(e4) { var n4 = e4.data.successTopicList; return zt(n4) ? Ve.l("".concat(s3, " successTopicList is empty. topicID:").concat(o2)) : (i2 = n4[0].nextMessageSeq - 1, r2 = "get lastSequence:".concat(i2, " from getTopicList. topicID:").concat(o2), Ve.l("".concat(s3, " ").concat(r2))), a2.setNetworkType(t2.getNetworkType()).setMessage("".concat(r2)).end(), i2; }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), s4 = n4[0], i3 = n4[1]; a2.setError(e4, s4, i3).setMessage("get lastSequence failed from getTopicList. topicID:".concat(o2)).end(); }), Ve.w("".concat(s3, " failed. error:"), e4), Za(e4); }); } }, { key: "isMessageFromOrToAVChatroom", value: function(e3) { return !!this._AVChatRoomHandler && this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e3); } }, { key: "hasJoinedAVChatRoom", value: function() { return this._AVChatRoomHandler ? this._AVChatRoomHandler.hasJoinedAVChatRoom() : 0; } }, { key: "getJoinedAVChatRoom", value: function() { return this._AVChatRoomHandler ? this._AVChatRoomHandler.getJoinedAVChatRoom() : []; } }, { key: "isOnlineMessage", value: function(e3, t2) { return !(!this._canIUseOnlineOnlyFlag(e3) || !t2 || true !== t2.onlineUserOnly); } }, { key: "_canIUseOnlineOnlyFlag", value: function(e3) { var t2 = this.getJoinedAVChatRoom(); return !t2 || !t2.includes(e3.to) || e3.conversationType !== E.CONV_GROUP; } }, { key: "_onAVChatRoomHistoryMessage", value: function(e3) { if (!zt(e3)) { Ve.l("".concat(this._n, "._onAVChatRoomHistoryMessage count:").concat(e3.length)); var n3 = []; e3.forEach(function(e4) { n3.push(t(t({}, e4), {}, { isHistoryMessage: 1 })); }), this.onAVChatRoomMessage(n3); } } }, { key: "onAVChatRoomMessage", value: function(e3) { this._AVChatRoomHandler && this._AVChatRoomHandler.onMessage(e3); } }, { key: "onAVChatRoomMemberBanned", value: function(e3) { this._AVChatRoomHandler && this._AVChatRoomHandler.onAVChatRoomMemberBanned(e3); } }, { key: "getGroupSimplifiedInfo", value: function(e3) { var t2 = this, n3 = new Aa("getGroupSimplifiedInfo"), o2 = { groupIDList: [e3], responseFilter: { groupBaseInfoFilter: ["Type", "Name"] } }; return this.getGroupProfileAdvance(o2).then(function(o3) { var s3 = o3.data.successGroupList; return n3.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(e3, " type:").concat(s3[0].type)).end(), s3[0]; }).catch(function(o3) { t2.probeNetwork().then(function(t3) { var s3 = v(t3, 2), a2 = s3[0], i2 = s3[1]; n3.setError(o3, a2, i2).setMessage("groupID:".concat(e3)).end(); }); }); } }, { key: "setUnjoinedAVChatRoom", value: function(e3) { this._unjoinedAVChatRoomList.set(e3, 1); } }, { key: "deleteUnjoinedAVChatRoom", value: function(e3) { this._unjoinedAVChatRoomList.has(e3) && this._unjoinedAVChatRoomList.delete(e3); } }, { key: "isUnjoinedAVChatRoom", value: function(e3) { return this._unjoinedAVChatRoomList.has(e3); } }, { key: "isGroupAttributesUpdatedNotice", value: function(e3) { return this._groupAttributesHandler.isGroupAttributesUpdatedNotice(e3); } }, { key: "updateLocalMainSequenceOnReconnected", value: function() { this._groupAttributesHandler.updateLocalMainSequenceOnReconnected(); } }, { key: "initGroupAttributes", value: function(e3) { return this._groupAttributesHandler.initGroupAttributes(e3); } }, { key: "setGroupAttributes", value: function(e3) { return this._groupAttributesHandler.setGroupAttributes(e3); } }, { key: "deleteGroupAttributes", value: function(e3) { return this._groupAttributesHandler.deleteGroupAttributes(e3); } }, { key: "getGroupAttributes", value: function(e3) { return this._groupAttributesHandler.getGroupAttributes(e3); } }, { key: "isMessageFromTopic", value: function(e3, t2) { return 2 === e3 && !zt(t2); } }, { key: "isMessageFromCommunityOfTopic", value: function(e3, t2) { return 2 === e3 && zt(t2); } }, { key: "getMessageExtensions", value: function(e3, t2) { return Ve.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2)), this.request({ protocolName: Ss, requestData: { groupID: e3.to, messageSequence: e3.sequence, startSequence: t2 } }); } }, { key: "modifyMessageExtensions", value: function(e3, t2) { var n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1; return Ve.l("".concat(this._n, ".modifyMessageExtensions operateType:").concat(n3)), this.request({ protocolName: Es, requestData: { groupID: e3.to, messageSequence: e3.sequence, extensionList: t2, operateType: n3 } }); } }, { key: "getGroupNotify", value: function(e3) { var n3 = this; if (this.hasLocalGroup(e3)) { var o2 = this.getLocalGroupProfile(e3), s3 = o2.type, a2 = o2.isSupportTopic; if (!Tt(s3) && !a2) { var i2 = "".concat(this._n, ".getGroupNotify"), r2 = this._getGroupLastRevokedTime(e3), u2 = 1e3 * Pe(); Ve.l("".concat(i2, " groupID:").concat(e3, " type:").concat(s3, " beginTime:").concat(r2, " endTime:").concat(u2)), this.request({ protocolName: Ls, requestData: { type: Dt({ type: s3, groupID: e3 }) ? E.GRP_COMMUNITY : void 0, groupID: e3, beginTime: r2, endTime: u2 } }).then(function(o3) { var s4 = o3.data, a3 = s4.nextRevokedTime, r3 = s4.notifyList; Ve.l("".concat(i2, " ok. groupID:").concat(e3, " nextRevokedTime:").concat(a3)); var u3 = { dataList: [{ elements: { revokedInfos: [] } }] }; at(r3) && r3.forEach(function(n4) { u3.dataList[0].elements.revokedInfos.push({ groupID: e3, sequence: n4.sequence, random: n4.random, revokerInfo: t({}, n4.revokerInfo) }); }), n3.onGroupMessageRevoked(u3), 0 !== a3 ? (n3._setGroupLastRevokedTime(e3, a3), n3.getGroupNotify(e3)) : n3._setGroupLastRevokedTime(e3, 1e3 * Pe()); }).catch(function(e4) { Ve.e("".concat(i2, " failed. error:"), e4); }); } } } }, { key: "_getGroupLastRevokedTime", value: function(e3) { return this.hasLocalGroup(e3) ? this.getLocalGroupProfile(e3)._lastRevokedTime : 0; } }, { key: "_setGroupLastRevokedTime", value: function(e3, t2) { this.hasLocalGroup(e3) && (this.getLocalGroupProfile(e3)._lastRevokedTime = t2); } }, { key: "isGroupCountersNotice", value: function(e3) { return this._groupCountersHandler.isGroupCountersNotice(e3); } }, { key: "setGroupCounters", value: function(e3) { return this._groupCountersHandler.setGroupCounters(e3); } }, { key: "increaseGroupCounter", value: function(e3) { return this._groupCountersHandler.increaseGroupCounter(e3); } }, { key: "decreaseGroupCounter", value: function(e3) { return this._groupCountersHandler.decreaseGroupCounter(e3); } }, { key: "getGroupCounters", value: function(e3) { return this._groupCountersHandler.getGroupCounters(e3); } }, { key: "restartPolling", value: function() { this._AVChatRoomHandler && this._AVChatRoomHandler.restartPolling(); } }, { key: "getPollingTimerID", value: function(e3) { if (!e3) return -1; var t2 = this.getLocalGroupProfile(e3); return t2 && Tt(t2.type) ? this._AVChatRoomHandler.getPollingTimerID(e3) : -1; } }, { key: "_canIUseJoinOption", value: function(e3) { return function(e4) { return e4 === E.GRP_PUBLIC; }(e3) || Dt({ type: e3 }); } }, { key: "reset", value: function() { this.groupMap.clear(), this._unjoinedAVChatRoomList.clear(), this._receiptDetailCompleteMap.clear(), this._commonGroupHandler.reset(), this._groupSystemNoticeHandler.reset(), this._groupTipsHandler.reset(), this._groupAttributesHandler.reset(), this._groupCountersHandler.reset(), this._AVChatRoomHandler && this._AVChatRoomHandler.reset(); } }]), s2; }(uo), xi = function() { function e2(t2) { o(this, e2), this.userID = "", this.avatar = "", this.nick = "", this.role = "", this.joinTime = "", this.lastSendMsgTime = "", this.nameCard = "", this.muteUntil = 0, this.memberCustomField = [], this._initMember(t2); } return a(e2, [{ key: "_initMember", value: function(e3) { this.updateMember(e3); } }, { key: "updateMember", value: function(e3) { var t2 = [null, void 0, "", 0, NaN]; e3.memberCustomField && Ct(this.memberCustomField, e3.memberCustomField), pt(this, e3, ["memberCustomField", "marks"], t2); } }, { key: "updateRole", value: function(e3) { ["Owner", "Admin", "Member"].indexOf(e3) < 0 || (this.role = e3); } }, { key: "updateMuteUntil", value: function(e3) { it(e3) || (this.muteUntil = Math.floor((Date.now() + 1e3 * e3) / 1e3)); } }, { key: "updateNameCard", value: function(e3) { it(e3) || (this.nameCard = e3); } }, { key: "updateMemberCustomField", value: function(e3) { e3 && Ct(this.memberCustomField, e3); } }]), e2; }(), Vi = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; return o(this, s2), (t2 = n2.call(this, e3))._n = "GroupMemberModule", t2.groupMemberListMap = /* @__PURE__ */ new Map(), t2.getInnerEmitterInstance().on(ni, t2._onProfileUpdated, h(t2)), t2; } return a(s2, [{ key: "_onProfileUpdated", value: function(e3) { for (var t2 = this, n3 = e3.data, o2 = function(e4) { var o3 = n3[e4]; t2.groupMemberListMap.forEach(function(e5) { e5.has(o3.userID) && e5.get(o3.userID).updateMember({ nick: o3.nick, avatar: o3.avatar }); }); }, s3 = 0; s3 < n3.length; s3++) o2(s3); } }, { key: "deleteGroupMemberList", value: function(e3) { this.groupMemberListMap.delete(e3); } }, { key: "getGroupMemberList", value: function(e3) { var t2 = this, n3 = e3.groupID, o2 = e3.offset, s3 = void 0 === o2 ? 0 : o2, a2 = e3.count, i2 = void 0 === a2 ? 15 : a2, r2 = e3.filter, u2 = void 0 === r2 ? void 0 : r2, c2 = "".concat(this._n, ".").concat("getGroupMemberList"), l2 = this.getModule(Pn), d2 = l2.hasLocalGroup(n3); if (Ve.l("".concat(c2, " groupID:").concat(n3, " offset:").concat(s3, " count:").concat(i2, " hasLocalGroup:").concat(d2)), !d2) return Xa({ memberList: [], offset: 0 }); if (l2.getLocalGroupProfile(n3).type === E.GRP_AVCHATROOM) { if (this.canIUse(B.AVCHATROOM_MBR_LIST)) return this._getAVChatRoomMemberList({ groupID: n3, offset: s3, filter: u2 }); this.outputWarning("LiveOnlineMember"); } var p2 = new Aa("getGroupMemberList"), g2 = 0, h2 = { groupID: n3, limit: i2 > 100 ? 100 : i2 }; Dt({ groupID: n3 }) ? h2.next = "".concat(s3) : (h2.offset = s3, g2 = s3 + i2); var _2 = []; return this.request({ protocolName: Ns, requestData: h2 }).then(function(e4) { var o3 = e4.data, s4 = o3.members, a3 = o3.memberNum, i3 = o3.next, r3 = void 0 === i3 ? void 0 : i3; if (it(r3) || (g2 = zt(r3) ? 0 : r3), !at(s4) || 0 === s4.length) return g2 = 0, Promise.resolve([]); var u3 = t2.getModule(Pn); return u3.hasLocalGroup(n3) && (u3.getLocalGroupProfile(n3).memberNum = a3), _2 = t2._updateLocalGroupMemberMap(n3, s4), t2.getModule(Gn).getUserProfile({ userIDList: s4.map(function(e5) { return e5.userID; }), tagList: [He.NICK, He.AVATAR] }); }).then(function(e4) { var o3 = e4.data; if (!at(o3) || 0 === o3.length) return Xa({ memberList: [], offset: g2 }); var a3 = o3.map(function(e5) { return { userID: e5.userID, nick: e5.nick, avatar: e5.avatar }; }); return t2._updateLocalGroupMemberMap(n3, a3), _2.length < i2 && (g2 = 0), p2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(n3, " offset:").concat(s3, " count:").concat(i2)).end(), Ve.l("".concat(c2, " ok.")), Ya({ memberList: _2, offset: g2 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; p2.setError(e4, o3, s4).end(); }), Ve.e("".concat(c2, " failed. error:"), e4), Za(e4); }); } }, { key: "_getAVChatRoomMemberList", value: function(e3) { var t2 = this, n3 = e3.groupID, o2 = e3.offset, s3 = e3.filter, a2 = "".concat(this._n, ".").concat("_getAVChatRoomMemberList"), i2 = new Aa("_getAVChatRoomMemberList"); return i2.setMessage("groupID:".concat(n3, " offset:").concat(o2, " filter:").concat(s3)), this.request({ protocolName: Os, requestData: { groupID: n3, offset: o2, filter: s3 } }).then(function(e4) { var o3 = e4.data, s4 = o3.memberList, r2 = void 0 === s4 ? [] : s4, u2 = o3.offset, c2 = void 0 === u2 ? 0 : u2; i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(a2, " ok. member count:").concat(r2.length, ", next request timestamp:").concat(c2)); var l2 = t2._updateLocalGroupMemberMap(n3, r2); return Ya({ memberList: l2, offset: c2 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; i2.setError(e4, o3, s4).end(); }), Ve.e("".concat(a2, " failed. error:"), e4), Za(e4); }); } }, { key: "getGroupMemberProfile", value: function(e3) { var n3 = this, o2 = "".concat(this._n, ".").concat("getGroupMemberProfile"), s3 = new Aa("getGroupMemberProfile"); s3.setMessage(e3.userIDList.length > 5 ? "userIDList.length:".concat(e3.userIDList.length) : "userIDList:".concat(e3.userIDList)), Ve.l("".concat(o2, " groupID:").concat(e3.groupID, " userIDList:").concat(e3.userIDList.join(","))), e3.userIDList.length > 50 && (e3.userIDList = e3.userIDList.slice(0, 50)); var a2 = e3.groupID, i2 = e3.userIDList; return this._getGroupMemberProfileAdvance(t(t({}, e3), {}, { userIDList: i2 })).then(function(e4) { var t2 = e4.data.members; return at(t2) && 0 !== t2.length ? (n3._updateLocalGroupMemberMap(a2, t2), n3.getModule(Gn).getUserProfile({ userIDList: t2.map(function(e5) { return e5.userID; }), tagList: [He.NICK, He.AVATAR] })) : Xa([]); }).then(function(e4) { var t2 = e4.data.map(function(e5) { return { userID: e5.userID, nick: e5.nick, avatar: e5.avatar }; }); n3._updateLocalGroupMemberMap(a2, t2); var o3 = i2.filter(function(e5) { return n3.hasLocalGroupMember(a2, e5); }).map(function(e5) { return n3.getLocalGroupMemberInfo(a2, e5); }); return s3.setNetworkType(n3.getNetworkType()).end(), Ya({ memberList: o3 }); }); } }, { key: "addGroupMember", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("addGroupMember"), o2 = e3.groupID, s3 = this.getModule(Pn).getLocalGroupProfile(o2), a2 = s3.type, i2 = new Aa("addGroupMember"); if (i2.setMessage("groupID:".concat(o2, " groupType:").concat(a2)), Tt(a2)) { var r2 = new ja({ code: ha.CANNOT_ADD_MEMBER_IN_AVCHATROOM }); return i2.setError(r2, true, this.getNetworkType()).end(), Za(r2); } return e3.userIDList = e3.userIDList.map(function(e4) { return { userID: e4 }; }), Ve.l("".concat(n3, " groupID:").concat(o2)), this.request({ protocolName: Us, requestData: e3 }).then(function(o3) { var a3 = o3.data.members; Ve.l("".concat(n3, " ok")); var r3 = a3.filter(function(e4) { return 1 === e4.result; }).map(function(e4) { return e4.userID; }), u2 = a3.filter(function(e4) { return 0 === e4.result; }).map(function(e4) { return e4.userID; }), c2 = a3.filter(function(e4) { return 2 === e4.result; }).map(function(e4) { return e4.userID; }), l2 = a3.filter(function(e4) { return 4 === e4.result; }).map(function(e4) { return e4.userID; }), d2 = "groupID:".concat(e3.groupID, ", ") + "successUserIDList:".concat(r3, ", ") + "failureUserIDList:".concat(u2, ", ") + "existedUserIDList:".concat(c2, ", ") + "overLimitUserIDList:".concat(l2); return i2.setNetworkType(t2.getNetworkType()).setMoreMessage(d2).end(), 0 === r3.length ? Ya({ successUserIDList: r3, failureUserIDList: u2, existedUserIDList: c2, overLimitUserIDList: l2 }) : (s3.memberCount += r3.length, t2._updateConversationGroupProfile(s3), Ya({ successUserIDList: r3, failureUserIDList: u2, existedUserIDList: c2, overLimitUserIDList: l2, group: s3 })); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; i2.setError(e4, o3, s4).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "deleteGroupMember", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("deleteGroupMember"), o2 = e3.groupID, s3 = e3.userIDList, a2 = this.getModule(Pn).getLocalGroupProfile(o2); if (it(a2)) return Za({ code: ha.CANNOT_FIND_GROUP }); if (Tt(a2.type)) return this.canIUse(B.AVCHATROOM_BAN_MBR) ? this._banAVChatRoomMember(e3) : Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var i2 = new Aa("deleteGroupMember"), r2 = "groupID:".concat(o2, " ").concat(s3.length > 5 ? "userIDList.length:".concat(s3.length) : "userIDList:".concat(s3)); return i2.setMessage(r2), Ve.l("".concat(n3, " groupID:").concat(o2, " userIDList:"), s3), this.request({ protocolName: Ps, requestData: e3 }).then(function() { return i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), a2.memberCount -= 1, t2._updateConversationGroupProfile(a2), t2.deleteLocalGroupMembers(o2, s3), Ya({ group: a2, userIDList: s3 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; i2.setError(e4, o3, s4).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "_updateConversationGroupProfile", value: function(e3) { this.getModule(qn).updateConversationGroupProfile([e3]); } }, { key: "_banAVChatRoomMember", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("deleteGroupMember"), o2 = e3.groupID, s3 = e3.userIDList, a2 = "groupID:".concat(o2, " ").concat(s3.length > 5 ? "userIDList.length:".concat(s3.length) : "userIDList:".concat(s3)), i2 = new Aa("deleteGroupMember"); i2.setMessage(a2), Ve.l("".concat(n3, " groupID:").concat(o2, " userIDList:"), s3); var r2 = this.getModule(Pn).getLocalGroupProfile(o2); return it(e3.duration) || 0 === e3.duration ? Za({ code: ha.BAN_DURATION_INVALID }) : this.request({ protocolName: bs, requestData: e3 }).then(function() { return i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), t2.deleteLocalGroupMembers(o2, s3), Ya({ group: r2, userIDList: s3 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; i2.setError(e4, o3, s4).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "setGroupMemberMuteTime", value: function(e3) { var t2 = this, n3 = e3.groupID, o2 = e3.userID, s3 = e3.muteTime, a2 = "".concat(this._n, ".").concat("setGroupMemberMuteTime"); if (o2 === this.getMyUserID()) return Za(new ja({ code: ha.CANNOT_MUTE_SELF })); Ve.l("".concat(a2, " groupID:").concat(n3, " userID:").concat(o2)); var i2 = new Aa("setGroupMemberMuteTime"); return i2.setMessage("groupID:".concat(n3, " userID:").concat(o2, " muteTime:").concat(s3)), this.modifyGroupMemberInfo({ groupID: n3, userID: o2, muteTime: s3 }).then(function(e4) { i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(a2, " ok")); var o3 = t2.getModule(Pn); return Ya({ group: o3.getLocalGroupProfile(n3), member: e4 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; i2.setError(e4, o3, s4).end(); }), Ve.e("".concat(a2, " failed. error:"), e4), Za(e4); }); } }, { key: "setGroupMemberRole", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("setGroupMemberRole"), o2 = e3.groupID, s3 = e3.userID, a2 = e3.role, i2 = this.getModule(Pn).getLocalGroupProfile(o2); if (i2.selfInfo.role !== E.GRP_MBR_ROLE_OWNER) return Za({ code: ha.NOT_OWNER }); if ([E.GRP_WORK, E.GRP_AVCHATROOM].includes(i2.type)) return Za({ code: ha.CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM }); var r2 = [E.GRP_MBR_ROLE_ADMIN, E.GRP_MBR_ROLE_MEMBER]; if (Dt({ groupID: o2 }) && r2.push(E.GRP_MBR_ROLE_CUSTOM), r2.indexOf(a2) < 0) return Za({ code: ha.INVALID_MEMBER_ROLE }); if (s3 === this.getMyUserID()) return Za({ code: ha.CANNOT_SET_SELF_MEMBER_ROLE }); var u2 = new Aa("setGroupMemberRole"); return u2.setMessage("groupID:".concat(o2, " userID:").concat(s3, " role:").concat(a2)), Ve.l("".concat(n3, " groupID:").concat(o2, " userID:").concat(s3)), this.modifyGroupMemberInfo({ groupID: o2, userID: s3, role: a2 }).then(function(e4) { return u2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), Ya({ group: i2, member: e4 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; u2.setError(e4, o3, s4).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "_filterProfanity", value: function(e3, t2) { var n3 = this.getModule(oo); if (!n3) return true; var o2 = n3.filterText(t2[e3], J), s3 = o2.isAllowedToSend, a2 = o2.modifiedText; return true === s3 && (t2[e3] = a2, true); } }, { key: "setGroupMemberNameCard", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("setGroupMemberNameCard"); if (e3.nameCard && false === this._filterProfanity("nameCard", e3)) return Za({ code: ha.PROFANITY_FOUND }); var o2 = e3.groupID, s3 = e3.userID, a2 = void 0 === s3 ? this.getMyUserID() : s3, i2 = e3.nameCard; Ve.l("".concat(n3, " groupID:").concat(o2, " userID:").concat(a2)); var r2 = new Aa("setGroupMemberNameCard"); return r2.setMessage("groupID:".concat(o2, " userID:").concat(a2, " nameCard:").concat(i2)), this.modifyGroupMemberInfo({ groupID: o2, userID: a2, nameCard: i2 }).then(function(e4) { Ve.l("".concat(n3, " ok")), r2.setNetworkType(t2.getNetworkType()).end(); var s4 = t2.getModule(Pn).getLocalGroupProfile(o2); return a2 === t2.getMyUserID() && s4 && s4.setSelfNameCard(i2), Ya({ group: s4, member: e4 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; r2.setError(e4, o3, s4).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "setGroupMemberCustomField", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("setGroupMemberCustomField"), o2 = e3.groupID, s3 = e3.userID, a2 = void 0 === s3 ? this.getMyUserID() : s3, i2 = e3.memberCustomField; Ve.l("".concat(n3, " groupID:").concat(o2, " userID:").concat(a2)); var r2 = new Aa("setGroupMemberCustomField"); return r2.setMessage("groupID:".concat(o2, " userID:").concat(a2, " memberCustomField:").concat(JSON.stringify(i2))), this.modifyGroupMemberInfo({ groupID: o2, userID: a2, memberCustomField: i2 }).then(function(e4) { r2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")); var s4 = t2.getModule(Pn).getLocalGroupProfile(o2); return Ya({ group: s4, member: e4 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; r2.setError(e4, o3, s4).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "modifyGroupMemberInfo", value: function(e3) { var n3 = this, o2 = e3.groupID, s3 = e3.userID, a2 = void 0; return kt(o2) && (o2 = xt(a2 = o2)), this.request({ protocolName: ws, requestData: t(t({}, e3), {}, { groupID: o2, topicID: a2 }) }).then(function() { if (n3.hasLocalGroupMember(o2, s3)) { var t2 = n3.getLocalGroupMemberInfo(o2, s3); return it(e3.muteTime) || t2.updateMuteUntil(e3.muteTime), it(e3.role) || t2.updateRole(e3.role), it(e3.nameCard) || t2.updateNameCard(e3.nameCard), it(e3.memberCustomField) || t2.updateMemberCustomField(e3.memberCustomField), t2; } return n3.getGroupMemberProfile({ groupID: o2, userIDList: [s3] }).then(function(e4) { return v(e4.data.memberList, 1)[0]; }); }); } }, { key: "markGroupMemberList", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("markGroupMemberList"), o2 = e3.groupID, s3 = e3.markType, a2 = e3.enableMark, i2 = e3.userIDList, r2 = void 0 === i2 ? [] : i2, u2 = "groupID:".concat(o2, " markType:").concat(s3, " enableMark:").concat(a2, " userIDList count: ").concat(r2.length); Ve.l("".concat(n3, " ").concat(u2)); var c2 = 2, l2 = []; true === a2 && (c2 = 1); var d2 = m(r2); r2.length > 500 && (d2 = r2.slice(0, 500), Ve.w("".concat(n3, " ").concat(Wt(500)))), d2.forEach(function(e4) { l2.push({ userID: e4, markType: [s3] }); }), d2 = null; var p2 = new Aa("markGroupMemberList"); return p2.setMessage("".concat(u2)), this.request({ protocolName: Fs, requestData: { groupID: o2, operationType: c2, memberList: l2 } }).then(function(e4) { var o3 = e4.data.memberList, s4 = void 0 === o3 ? [] : o3, a3 = [], i3 = []; s4.length === r2.length ? a3.push.apply(a3, m(r2)) : (s4.forEach(function(e5) { a3.push(e5.userID); }), r2.forEach(function(e5) { a3.includes(e5) || i3.push(e5); })); var u3 = "success count:".concat(a3.length, " fail count:").concat(i3.length); return p2.setNetworkType(t2.getNetworkType()).setMessage(u3).end(), Ve.l("".concat(n3, " ok. ").concat(u3)), Ya({ successUserIDList: a3, failureUserIDList: i3 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; p2.setError(e4, o3, s4).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "_getGroupMemberProfileAdvance", value: function(e3) { return this.request({ protocolName: Gs, requestData: t(t({}, e3), {}, { memberInfoFilter: e3.memberInfoFilter ? e3.memberInfoFilter : ["Role", "JoinTime", "NameCard", "ShutUpUntil"] }) }); } }, { key: "_updateLocalGroupMemberMap", value: function(e3, t2) { var n3 = this; return at(t2) && 0 !== t2.length ? t2.map(function(t3) { return n3.hasLocalGroupMember(e3, t3.userID) ? n3.getLocalGroupMemberInfo(e3, t3.userID).updateMember(t3) : n3.setLocalGroupMember(e3, new xi(t3)), n3.getLocalGroupMemberInfo(e3, t3.userID); }) : []; } }, { key: "deleteLocalGroupMembers", value: function(e3, t2) { var n3 = this.groupMemberListMap.get(e3); n3 && t2.forEach(function(e4) { n3.delete(e4); }); } }, { key: "getLocalGroupMemberInfo", value: function(e3, t2) { return this.groupMemberListMap.has(e3) ? this.groupMemberListMap.get(e3).get(t2) : null; } }, { key: "setLocalGroupMember", value: function(e3, t2) { if (this.groupMemberListMap.has(e3)) this.groupMemberListMap.get(e3).set(t2.userID, t2); else { var n3 = (/* @__PURE__ */ new Map()).set(t2.userID, t2); this.groupMemberListMap.set(e3, n3); } } }, { key: "getLocalGroupMemberList", value: function(e3) { return this.groupMemberListMap.get(e3); } }, { key: "hasLocalGroupMember", value: function(e3, t2) { return this.groupMemberListMap.has(e3) && this.groupMemberListMap.get(e3).has(t2); } }, { key: "hasLocalGroupMemberMap", value: function(e3) { return this.groupMemberListMap.has(e3); } }, { key: "reset", value: function() { this.groupMemberListMap.clear(); } }]), s2; }(uo), Bi = ["topicID", "topicName", "avatar", "introduction", "notification", "unreadCount", "muteAllMembers", "customData", "groupAtInfoList", "nextMessageSeq", "selfInfo"], Hi = function(e2, t2) { return zt(e2) ? { lastTime: 0, lastSequence: 0, fromAccount: "", payload: null, type: "", messageForShow: "", nick: "", version: 0, cloudCustomData: "", isRevoked: false, revoker: null } : { lastTime: e2.time || 0, lastSequence: e2.sequence || 0, fromAccount: e2.from || "", payload: e2.payload || null, type: e2.type || "", messageForShow: Vt(e2.type, e2.payload, t2), nick: e2.nick || "", version: e2.version || 0, cloudCustomData: e2.cloudCustomData || "", isRevoked: e2.isRevoked || false, revoker: e2.revoker || null }; }, Ki = function() { function e2(t2, n2) { o(this, e2), this.topicID = "", this.topicName = "", this.avatar = "", this.introduction = "", this.notification = "", this.unreadCount = 0, this.muteAllMembers = false, this.customData = "", this.groupAtInfoList = [], this.nextMessageSeq = 0, this.lastMessage = Hi(t2.lastMessage, n2), this.selfInfo = { muteTime: 0, readedSequence: 0, messageRemindType: "", excludedUnreadSequenceList: void 0 }, this._initTopic(t2); } return a(e2, [{ key: "_initTopic", value: function(e3) { for (var t2 in e3) Bi.indexOf(t2) < 0 || ("selfInfo" === t2 ? this.updateSelfInfo(e3[t2]) : this[t2] = "muteAllMembers" === t2 ? 1 === e3[t2] : e3[t2]); } }, { key: "updateUnreadCount", value: function() { var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0; this.unreadCount = e3; } }, { key: "updateNextMessageSeq", value: function(e3) { this.nextMessageSeq = e3; } }, { key: "updateLastMessage", value: function(e3) { this.lastMessage = Hi(e3); } }, { key: "updateGroupAtInfoList", value: function(e3) { this.groupAtInfoList = JSON.parse(JSON.stringify(e3)); } }, { key: "updateTopic", value: function(e3) { it(e3.selfInfo) || this.updateSelfInfo(e3.selfInfo), it(e3.muteAllMembers) || (this.muteAllMembers = 1 === e3.muteAllMembers), pt(this, e3, ["groupID", "lastMessageTime", "selfInfo", "muteAllMembers", "lastMsg"]); } }, { key: "updateSelfInfo", value: function(e3) { return 0 !== pt(this.selfInfo, e3, [], [""]); } }, { key: "reduceUnreadCount", value: function() { return this.unreadCount >= 1 && (this.unreadCount -= 1, true); } }, { key: "isLastMessageRevoked", value: function(e3) { return e3.sequence === this.lastMessage.lastSequence; } }, { key: "setLastMessageRevoked", value: function(e3) { this.lastMessage.isRevoked = e3; } }, { key: "setLastMessageRevoker", value: function(e3) { this.lastMessage.revoker = e3; } }]), e2; }(), Wi = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; return o(this, s2), (t2 = n2.call(this, e3))._n = "TopicModule", t2._topicMap = /* @__PURE__ */ new Map(), t2._getTopicTimeMap = /* @__PURE__ */ new Map(), t2.TOPIC_CACHE_TIME = 300, t2.TOPIC_LAST_ACTIVE_TIME = 3600, t2.getInnerEmitterInstance().on(ti, t2._onCloudConfigUpdated, h(t2)), t2; } return a(s2, [{ key: "_onCloudConfigUpdated", value: function() { var e3 = this.getCloudConfig("topic_cache_time"), t2 = this.getCloudConfig("topic_last_active_time"); it(e3) || (this.TOPIC_CACHE_TIME = Number(e3)), it(t2) || (this.TOPIC_LAST_ACTIVE_TIME = Number(t2)); } }, { key: "onTopicCreated", value: function(e3) { var t2 = e3.groupID; this.resetGetTopicTime(t2), this.emitOuterEvent(k.TOPIC_CREATED, e3); } }, { key: "onTopicDeleted", value: function(e3) { var t2 = this, n3 = e3.groupID, o2 = e3.topicIDList; (void 0 === o2 ? [] : o2).forEach(function(e4) { t2._deleteLocalTopic(n3, e4); }), this.emitOuterEvent(k.TOPIC_DELETED, e3); } }, { key: "onTopicMessageRemindTypeUpdated", value: function(e3) { var t2 = e3.groupID, n3 = e3.topicID, o2 = e3.messageRemindType, s3 = this.getLocalTopic(t2, n3); if (s3) { var a2 = s3.updateSelfInfo({ messageRemindType: o2 }); a2 && this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: t2, topic: s3 }), Ve.d("".concat(this._n, ".onTopicMessageRemindTypeUpdated topicID:").concat(n3) + " messageRemindType:".concat(o2, " isTopicUpdated:").concat(a2)); } } }, { key: "onTopicProfileUpdated", value: function(e3) { var t2 = e3.groupID, n3 = e3.topicID, o2 = this.getLocalTopic(t2, n3); o2 && (o2.updateTopic(e3), this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: t2, topic: o2 })); } }, { key: "onConversationProxy", value: function(e3) { var t2 = e3.topicID, n3 = e3.unreadCount, o2 = e3.groupAtInfoList, s3 = xt(t2), a2 = this.getLocalTopic(s3, t2), i2 = false; a2 && (it(n3) || a2.unreadCount === n3 || (a2.updateUnreadCount(n3), i2 = true), it(o2) || (a2.updateGroupAtInfoList(o2), i2 = true)), i2 && this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: s3, topic: a2 }); } }, { key: "onMessageSent", value: function(e3) { var t2 = e3.groupID, n3 = e3.topicID, o2 = e3.lastMessage, s3 = this.getLocalTopic(t2, n3); s3 && (s3.nextMessageSeq += 1, s3.updateLastMessage(o2), this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: t2, topic: s3 })); } }, { key: "onMessageModified", value: function(e3) { var t2 = e3.to, n3 = e3.time, o2 = e3.sequence, s3 = e3.elements, a2 = e3.cloudCustomData, i2 = e3.messageVersion, r2 = xt(t2), u2 = this.getLocalTopic(r2, t2); if (u2) { var c2 = u2.lastMessage; Ve.d("".concat(this._n, ".onMessageModified topicID:").concat(t2, " lastMessage:"), JSON.stringify(c2), "options:", JSON.stringify(e3)), c2 && (null === c2.payload || c2.lastTime === n3 && c2.lastSequence === o2 && c2.version !== i2) && (c2.type = s3[0].type, c2.payload = s3[0].content, c2.messageForShow = Vt(c2.type, c2.payload, this.isIntl()), c2.cloudCustomData = a2, c2.version = i2, c2.lastSequence = o2, c2.lastTime = n3, this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: r2, topic: u2 })); } } }, { key: "onMessageRevoked", value: function(e3) { var t2 = this; if (0 !== e3.length) { var n3 = null, o2 = null, s3 = false; e3.forEach(function(e4) { var a2 = e4.to; o2 = xt(a2), (n3 = t2.getLocalTopic(o2, a2)) && (n3.reduceUnreadCount() && (s3 = true), n3.isLastMessageRevoked(e4) && (n3.setLastMessageRevoked(true), n3.setLastMessageRevoker(e4.revoker), s3 = true)); }), s3 && this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: o2, topic: n3 }); } } }, { key: "isLastMessageRevoked", value: function(e3) { var t2 = e3.topicID, n3 = e3.sequence, o2 = xt(t2), s3 = this.getLocalTopic(o2, t2), a2 = false; return s3 && (a2 = s3.isLastMessageRevoked({ sequence: n3 })), a2; } }, { key: "getJoinedCommunityList", value: function() { return this.getModule(Pn).getGroupList({ isGroupWithTopicOnly: true }).then(function(e3) { var t2 = e3.data.groupList; return Ya({ groupList: void 0 === t2 ? [] : t2 }); }).catch(function(e3) { return Za(e3); }); } }, { key: "createTopicInCommunity", value: function(e3) { var n3 = this, o2 = "".concat(this._n, ".").concat("createTopicInCommunity"), s3 = e3.topicID; if (!it(s3) && !kt(s3)) return Za({ code: ha.ILLEGAL_TOPIC_ID }); if (e3.topicName && false === this._filterProfanity("topicName", e3)) return Za({ code: ha.PROFANITY_FOUND }); if (e3.introduction && false === this._filterProfanity("introduction", e3)) return Za({ code: ha.PROFANITY_FOUND }); if (e3.notification && false === this._filterProfanity("notification", e3)) return Za({ code: ha.PROFANITY_FOUND }); var a2 = new Aa("createTopicInCommunity"); return this.request({ protocolName: ta, requestData: t({}, e3) }).then(function(s4) { var i2 = s4.data.topicID; return a2.setMessage("topicID:".concat(i2)).setNetworkType(n3.getNetworkType()).end(), Ve.l("".concat(o2, " ok")), n3._updateTopicMap([t(t({}, e3), {}, { topicID: i2 })]), Ya({ topicID: i2 }); }).catch(function(e4) { return n3.probeNetwork().then(function(t2) { var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1]; a2.setError(e4, o3, s4).end(); }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4); }); } }, { key: "deleteTopicFromCommunity", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("deleteTopicFromCommunity"), o2 = e3.groupID, s3 = e3.topicIDList, a2 = void 0 === s3 ? [] : s3, i2 = new Aa("deleteTopicFromCommunity"); return i2.setMessage("groupID:".concat(o2, " topicIDList:").concat(a2)), this.request({ protocolName: na, requestData: { groupID: o2, topicIDList: a2 } }).then(function(e4) { var n4 = e4.data.resultList, s4 = [], a3 = []; (void 0 === n4 ? [] : n4).forEach(function(e5) { var t3 = e5.topicID, n5 = e5.errorCode, o3 = e5.errorInfo; 0 === n5 ? s4.push({ topicID: t3 }) : a3.push({ topicID: t3, code: n5, message: o3 }); }); var r2 = "success count:".concat(s4.length, ", fail count:").concat(a3.length); return i2.setMoreMessage("".concat(r2)).setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(r2)), s4.forEach(function(e5) { t2._deleteLocalTopic(o2, e5.topicID); }), Ya({ successTopicList: s4, failureTopicList: a3 }); }).catch(function(e4) { return t2.probeNetwork().then(function(t3) { var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1]; i2.setError(e4, o3, s4).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "updateTopicProfile", value: function(e3) { var n3 = this, o2 = "".concat(this._n, ".").concat("updateTopicProfile"); if (Ve.l("".concat(o2, " options:"), e3), e3.topicName && false === this._filterProfanity("topicName", e3)) return Za({ code: ha.PROFANITY_FOUND }); if (e3.introduction && false === this._filterProfanity("introduction", e3)) return Za({ code: ha.PROFANITY_FOUND }); if (e3.notification && false === this._filterProfanity("notification", e3)) return Za({ code: ha.PROFANITY_FOUND }); var s3 = new Aa("updateTopicProfile"); return s3.setMessage("groupID:".concat(e3.groupID, " topicID:").concat(e3.topicID)), it(e3.muteAllMembers) || (e3.muteAllMembers = true === e3.muteAllMembers ? "On" : "Off"), this.request({ protocolName: oa, requestData: t({}, e3) }).then(function() { return s3.setNetworkType(n3.getNetworkType()).end(), Ve.l("".concat(o2, " ok")), n3._updateTopicMap([e3]), Ya({ topic: n3.getLocalTopic(e3.groupID, e3.topicID) }); }).catch(function(e4) { return n3.probeNetwork().then(function(t2) { var n4 = v(t2, 2), o3 = n4[0], a2 = n4[1]; s3.setError(e4, o3, a2).end(); }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4); }); } }, { key: "getTopicList", value: function(e3) { var n3 = this, o2 = "".concat(this._n, ".").concat("getTopicList"), s3 = e3.groupID, a2 = e3.topicIDList, i2 = void 0 === a2 ? [] : a2, r2 = 0 === i2.length, u2 = new Aa("getTopicList"); if (u2.setMessage("groupID:".concat(s3)), this._getTopicTimeMap.has(s3)) { var c2 = this._getTopicTimeMap.get(s3), l2 = c2.isGetAll, d2 = c2.time; if ((l2 || !l2 && !r2) && Date.now() - d2 < 1e3 * this.TOPIC_CACHE_TIME) { var p2 = this._getLocalTopicList(s3, i2); if (r2 || p2.length === i2.length) return u2.setNetworkType(this.getNetworkType()).setMoreMessage("from cache, topic count:".concat(p2.length)).end(), Ve.l("".concat(o2, " groupID:").concat(s3, " from cache, topic count:").concat(p2.length)), Xa({ successTopicList: p2, failureTopicList: [] }); } } return this.request({ protocolName: sa, requestData: { groupID: s3, topicIDList: i2 } }).then(function(e4) { var a3 = e4.data.topicInfoList, i3 = [], c3 = [], l3 = []; (void 0 === a3 ? [] : a3).forEach(function(e5) { var n4 = e5.topic, o3 = e5.selfInfo, s4 = e5.errorCode, a4 = e5.errorInfo, r3 = n4.topicID; 0 === s4 ? (i3.push(t(t({}, n4), {}, { selfInfo: o3 })), c3.push(r3)) : l3.push({ topicID: r3, code: s4, message: a4 }); }), n3._updateTopicMap(i3), n3._handleTopicAtInfo(i3); var d3 = "success count:".concat(c3.length, ", fail count:").concat(l3.length); u2.setNetworkType(n3.getNetworkType()).setMoreMessage("".concat(d3)).end(), Ve.l("".concat(o2, " groupID:").concat(s3, " from remote, ").concat(d3)); var p3 = []; return zt(c3) || (n3._getTopicTimeMap.set(s3, { time: Date.now(), isGetAll: r2 }), p3 = n3._getLocalTopicList(s3, c3)), Ya({ successTopicList: p3, failureTopicList: l3 }); }).catch(function(e4) { return n3.probeNetwork(e4).then(function(t2) { var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1]; u2.setError(e4, o3, s4).end(); }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4); }); } }, { key: "hasLocalTopic", value: function(e3, t2) { return !!this._topicMap.has(e3) && this._topicMap.get(e3).has(t2); } }, { key: "getLocalTopic", value: function(e3, t2) { var n3 = null; return this._topicMap.has(e3) && (n3 = this._topicMap.get(e3).get(t2)), n3; } }, { key: "_getLocalTopicList", value: function(e3) { var t2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [], n3 = this._topicMap.get(e3), o2 = []; return n3 && (o2 = m(n3.values())), 0 === t2.length ? o2 : o2.filter(function(e4) { return t2.includes(e4.topicID); }); } }, { key: "_deleteLocalTopic", value: function(e3, t2) { this._topicMap.has(e3) && (this._topicMap.get(e3).delete(t2), Ve.l("".concat(this._n, "._deleteLocalTopic groupID:").concat(e3, " topicID:").concat(t2))); } }, { key: "_updateTopicMap", value: function(e3) { var t2 = this, n3 = []; (e3.forEach(function(e4) { var o2 = e4.groupID, s3 = e4.topicID, a2 = null; t2._topicMap.has(o2) || t2._topicMap.set(o2, /* @__PURE__ */ new Map()), t2._topicMap.get(o2).has(s3) ? (a2 = t2._topicMap.get(o2).get(s3)).updateTopic(e4) : (t2._getTopicLastMessage(e4), a2 = new Ki(e4, t2.isIntl()), t2._topicMap.get(o2).set(s3, a2)); var i2 = t2._computeUnreadCount(a2); a2.updateUnreadCount(i2), n3.push({ conversationID: "".concat(E.CONV_GROUP).concat(s3), type: E.CONV_TOPIC, unreadCount: i2 }); }), n3.length > 0) && this.getModule(qn).updateTopicConversation(n3); } }, { key: "resetGetTopicTime", value: function(e3) { var t2 = this; it(e3) ? m(this._getTopicTimeMap.keys()).forEach(function(e4) { t2._getTopicTimeMap.set(e4, 0); }) : this._getTopicTimeMap.set(e3, 0); } }, { key: "getTopicListOnReconnected", value: function() { var e3 = this, t2 = m(this._topicMap.keys()), n3 = []; t2.forEach(function(t3) { var o2 = []; e3._getLocalTopicList(t3).forEach(function(t4) { var n4 = t4.lastMessage.lastTime, s3 = void 0 === n4 ? 0 : n4; Date.now() - 1e3 * s3 < 1e3 * e3.TOPIC_LAST_ACTIVE_TIME && o2.push(t4.topicID); }), o2.length > 0 && n3.push({ groupID: t3, topicIDList: o2 }); }), Ve.l("".concat(this._n, ".getTopicListOnReconnected. active community count:").concat(n3.length)), this._relayGetTopicList(n3); } }, { key: "_relayGetTopicList", value: function(e3) { var t2 = this; if (0 !== e3.length) { var n3 = e3.shift(), o2 = n3.topicIDList.length > 5 ? "topicIDList.length:".concat(n3.topicIDList.length) : "topicIDList:".concat(n3.topicIDList), s3 = new Aa("relayGetTopicList"); s3.setMessage(o2), Ve.l("".concat(this._n, "._relayGetTopicList. ").concat(o2)), this.getTopicList(n3).then(function() { s3.setNetworkType(t2.getNetworkType()).end(), t2._relayGetTopicList(e3); }).catch(function(n4) { t2.probeNetwork().then(function(e4) { var t3 = v(e4, 2), o3 = t3[0], a2 = t3[1]; s3.setError(n4, o3, a2).end(); }), t2._relayGetTopicList(e3); }); } } }, { key: "_handleTopicAtInfo", value: function(e3) { var n3 = this; 0 !== e3.length && e3.forEach(function(e4) { var o2 = e4.groupID, s3 = e4.topicID, a2 = e4.groupAtInfoList, i2 = []; it(a2) || (a2.forEach(function(e5) { i2.push(t(t({}, e5), {}, { groupID: o2, topicID: s3 })); }), n3.getModule(qn).onNewGroupAtTips({ dataList: i2 })); }); } }, { key: "_getTopicLastMessage", value: function(e3) { if (!it(e3.lastMsg)) { var t2 = { time: e3.lastMsg.time, sequence: e3.lastMsg.sequence, from: e3.lastMsg.from, payload: e3.lastMsg.elements[0] ? e3.lastMsg.elements[0].content : null, type: e3.lastMsg.elements[0] ? e3.lastMsg.elements[0].type : "", nick: e3.lastMsg.nick, version: e3.lastMsg.messageVersion, cloudCustomData: e3.lastMsg.cloudCustomData, isRevoked: 2 === e3.lastMsg.isPlaceMessage, revoker: zt(e3.lastMsg.revokerInfo) ? null : e3.lastMsg.revokerInfo.revoker }; e3.lastMessage = t2; } } }, { key: "deleteTopicListInCommunity", value: function(e3) { var t2 = this, n3 = this._getLocalTopicList(e3), o2 = this.getModule(qn); n3.forEach(function(n4) { var s3 = n4.topicID; t2._deleteLocalTopic(e3, s3), t2._getTopicTimeMap.delete(e3), o2.deleteLocalConversation("".concat(E.CONV_GROUP).concat(s3)); }); } }, { key: "_computeUnreadCount", value: function(e3) { var t2 = e3.selfInfo, n3 = t2.excludedUnreadSequenceList, o2 = t2.readedSequence, s3 = e3.nextMessageSeq - e3.selfInfo.readedSequence - 1; if (at(n3)) { var a2 = 0; n3.forEach(function(t3) { t3 >= o2 && t3 <= e3.nextMessageSeq - 1 && (a2 += 1); }), a2 >= 1 && (s3 -= a2); } return s3 < 0 ? 0 : s3; } }, { key: "_filterProfanity", value: function(e3, t2) { var n3 = this.getModule(oo); if (!n3) return true; var o2 = n3.filterText(t2[e3], z), s3 = o2.isAllowedToSend, a2 = o2.modifiedText; return true === s3 && (t2[e3] = a2, true); } }, { key: "updateLastMessage", value: function(e3, t2) { var n3 = xt(e3), o2 = this.getLocalTopic(n3, e3); if (o2) { var s3 = t2.sequence + 1; o2.updateNextMessageSeq(s3), o2.updateLastMessage(t2), this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: n3, topic: o2 }); } } }, { key: "getMessageExtensions", value: function(e3, t2) { Ve.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2)); var n3 = xt(e3.to); return this.request({ protocolName: Ss, requestData: { groupID: n3, topicID: e3.to, messageSequence: e3.sequence, startSequence: t2 } }); } }, { key: "modifyMessageExtensions", value: function(e3, t2) { var n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1; Ve.l("".concat(this._n, ".modifyMessageExtensions operateType:").concat(n3)); var o2 = xt(e3.to); return this.request({ protocolName: Es, requestData: { groupID: o2, topicID: e3.to, messageSequence: e3.sequence, extensionList: t2, operateType: n3 } }); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._topicMap.clear(), this._getTopicTimeMap.clear(), this.TOPIC_CACHE_TIME = 300, this.TOPIC_LAST_ACTIVE_TIME = 3600; } }]), s2; }(uo), Yi = function() { function e2(t2) { o(this, e2), this._userModule = t2, this._n = "ProfileHandler", this.TAG = "profile", this.accountProfileMap = /* @__PURE__ */ new Map(), this.expirationTime = 864e5; } return a(e2, [{ key: "setExpirationTime", value: function(e3) { this.expirationTime = e3; } }, { key: "getUserProfile", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".").concat("getUserProfile"), o2 = e3.userIDList; e3.fromAccount = this._userModule.getMyAccount(), o2.length > 100 && (Ve.w("".concat(n2, " ").concat(Wt(100))), o2.length = 100); for (var s2, a2 = [], i2 = [], r2 = 0, u2 = o2.length; r2 < u2; r2++) s2 = o2[r2], this._userModule.isMyFriend(s2) && this._contains(s2) ? i2.push(this._getProfileFromMap(s2)) : a2.push(s2); if (0 === a2.length) return Xa(i2); e3.toAccount = a2; var c2 = e3.bFromGetMyProfile || false, l2 = []; e3.toAccount.forEach(function(e4) { l2.push({ toAccount: e4, standardSequence: 0, customSequence: 0 }); }), e3.userItem = l2; var d2 = new Aa("getUserProfile"); return d2.setMessage(o2.length > 5 ? "userIDList.length:".concat(o2.length) : "userIDList:".concat(o2)), this._userModule.request({ protocolName: mo, requestData: e3 }).then(function(e4) { d2.setNetworkType(t2._userModule.getNetworkType()).end(), Ve.i("".concat(n2, " ok")); var o3 = t2._handleResponse(e4).concat(i2); return Ya(c2 ? o3[0] : o3); }).catch(function(e4) { return t2._userModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; d2.setError(e4, o3, s3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "getMyProfile", value: function() { var e3 = this._userModule.getMyAccount(), t2 = "".concat(this._n, ".getMyProfile"); if (Ve.l("".concat(t2, " myAccount:").concat(e3)), this._fill(), this._contains(e3)) { var n2 = this._getProfileFromMap(e3); return Ve.d("".concat(t2, " from cache, myProfile:").concat(JSON.stringify(n2))), Xa(n2); } return this.getUserProfile({ fromAccount: e3, userIDList: [e3], bFromGetMyProfile: true }); } }, { key: "_handleResponse", value: function(e3) { var t2 = e3.data.userProfileItem; if (!at(t2)) return []; for (var n2 = [], o2 = Date.now(), s2 = 0, a2 = t2.length; s2 < a2; s2++) { var i2 = t2[s2], r2 = i2.to, u2 = i2.profileItem; if ("@TLS#NOT_FOUND" !== r2 && "" !== r2) { var c2 = this._update(r2, this._getLatestProfileFromResponse(r2, u2)).latestProfile; n2.push(c2); } } return Ve.l("".concat(this._n, "._handleResponse cost ").concat(Date.now() - o2, " ms")), n2; } }, { key: "_getLatestProfileFromResponse", value: function(e3, t2) { var n2 = { userID: e3, profileCustomField: [] }; if (!zt(t2)) for (var o2 = 0, s2 = t2.length; o2 < s2; o2++) if (t2[o2].tag.indexOf("Tag_Profile_Custom") > -1) n2.profileCustomField.push({ key: t2[o2].tag, value: t2[o2].value }); else switch (t2[o2].tag) { case He.NICK: n2.nick = t2[o2].value; break; case He.GENDER: n2.gender = t2[o2].value; break; case He.BIRTHDAY: n2.birthday = t2[o2].value; break; case He.LOCATION: n2.location = t2[o2].value; break; case He.SELFSIGNATURE: n2.selfSignature = t2[o2].value; break; case He.ALLOWTYPE: n2.allowType = t2[o2].value; break; case He.LANGUAGE: n2.language = t2[o2].value; break; case He.AVATAR: n2.avatar = t2[o2].value; break; case He.MESSAGESETTINGS: n2.messageSettings = t2[o2].value; break; case He.ADMINFORBIDTYPE: n2.adminForbidType = t2[o2].value; break; case He.LEVEL: n2.level = t2[o2].value; break; case He.ROLE: n2.role = t2[o2].value; break; default: Ve.w("".concat(this._n, "._getLatestProfileFromResponse unknown tag:"), t2[o2].tag, t2[o2].value); } return n2; } }, { key: "updateMyProfile", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".").concat("updateMyProfile"); if (e3.nick && false === this._userModule.filterProfanity("nick", e3)) return Za({ code: ha.PROFANITY_FOUND }); if (e3.selfSignature && false === this._userModule.filterProfanity("selfSignature", e3)) return Za({ code: ha.PROFANITY_FOUND }); var o2 = new Aa("updateMyProfile"); o2.setMessage(JSON.stringify(e3)); var s2 = new li().validate(e3); if (!s2.valid) return o2.setCode(ha.UPDATE_PROFILE_INVALID_PARAM).setMoreMessage("info:".concat(s2.tips)).setNetworkType(this._userModule.getNetworkType()).end(), Ve.e("".concat(n2, " info:").concat(s2.tips)), Za({ code: ha.UPDATE_PROFILE_INVALID_PARAM }); var a2 = []; for (var i2 in e3) Object.prototype.hasOwnProperty.call(e3, i2) && ("profileCustomField" === i2 ? e3.profileCustomField.forEach(function(e4) { a2.push({ tag: e4.key, value: e4.value }); }) : a2.push({ tag: He[i2.toUpperCase()], value: e3[i2] })); if (0 === a2.length) { var r2 = new ja({ code: ha.UPDATE_PROFILE_NO_KEY }); return o2.setError(r2, true, this._userModule.getNetworkType()).end(), Ve.e("".concat(n2, " failed. error:"), r2), Za(r2); } var u2 = this._userModule.getMyAccount(); return this._userModule.request({ protocolName: Mo, requestData: { fromAccount: u2, profileItem: a2 } }).then(function(s3) { o2.setNetworkType(t2._userModule.getNetworkType()).end(), Ve.i("".concat(n2, " ok")); var a3 = t2._update(u2, e3), i3 = a3.isProfileUpdated, r3 = a3.latestProfile; return true === i3 && t2._userModule.emitOuterEvent(k.PROFILE_UPDATED, [r3]), Xa(r3); }).catch(function(e4) { return t2._userModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1]; o2.setError(e4, s3, a3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "onProfileModified", value: function(e3) { var t2 = e3.dataList; if (!zt(t2)) { var n2, o2 = t2.length; Ve.d("".concat(this._n, ".onProfileModified count:").concat(o2, " dataList:"), e3.dataList); for (var s2 = [], a2 = 0; a2 < o2; a2++) { n2 = t2[a2].userID; var i2 = this._update(n2, this._getLatestProfileFromResponse(n2, t2[a2].profileList)), r2 = i2.isProfileUpdated, u2 = i2.latestProfile; true === r2 && s2.push(u2); } s2.length > 0 && (this._userModule.emitInnerEvent(ni, s2), this._userModule.emitOuterEvent(k.PROFILE_UPDATED, s2)); } } }, { key: "_fill", value: function() { if (0 === this.accountProfileMap.size) { for (var e3 = this._getCachedProfiles(), t2 = Date.now(), n2 = 0, o2 = e3.length; n2 < o2; n2++) t2 - e3[n2].lastUpdatedTime < this.expirationTime && this.accountProfileMap.set(e3[n2].userID, e3[n2]); Ve.l("".concat(this._n, "._fill from cache, size:").concat(this.accountProfileMap.size)); } } }, { key: "_update", value: function(e3, t2) { var n2, o2 = false, s2 = Date.now(); this._contains(e3) ? (n2 = this._getProfileFromMap(e3), t2.profileCustomField && true === Ct(n2.profileCustomField, t2.profileCustomField) && (n2.lastUpdatedTime = s2, o2 = true), pt(n2, t2, ["profileCustomField"]) > 0 && (n2.lastUpdatedTime = s2, o2 = true)) : (n2 = new li(t2), (this._userModule.isMyFriend(e3) || e3 === this._userModule.getMyAccount()) && (n2.lastUpdatedTime = s2, o2 = true, this.accountProfileMap.set(e3, n2))); return this._flush(e3 === this._userModule.getMyAccount()), Ve.l("".concat(this._n, "._update account:").concat(e3, " isProfileUpdated:").concat(o2)), { isProfileUpdated: o2, latestProfile: n2 }; } }, { key: "_flush", value: function(e3) { var t2 = m(this.accountProfileMap.values()), n2 = this._userModule.getStorageModule(); Ve.d("".concat(this._n, "._flush length:").concat(t2.length, " flushAtOnce:").concat(e3)), n2.setItem(this.TAG, t2, e3); } }, { key: "_contains", value: function(e3) { return this.accountProfileMap.has(e3); } }, { key: "_getProfileFromMap", value: function(e3) { return this.accountProfileMap.get(e3); } }, { key: "_getCachedProfiles", value: function() { var e3 = this._userModule.getStorageModule().getItem(this.TAG); return zt(e3) ? [] : e3; } }, { key: "onConversationsProfileUpdated", value: function(e3) { for (var t2, n2, o2, s2 = [], a2 = 0, i2 = e3.length; a2 < i2; a2++) n2 = (t2 = e3[a2]).userID, this._userModule.isMyFriend(n2) && (this._contains(n2) ? (o2 = this._getProfileFromMap(n2), pt(o2, t2) > 0 && s2.push(n2)) : s2.push(t2.userID)); 0 !== s2.length && (Ve.i("".concat(this._n, ".onConversationsProfileUpdated toAccountList:").concat(s2)), this.getUserProfile({ userIDList: s2 })); } }, { key: "getNickAndAvatarByUserID", value: function(e3) { if (this._contains(e3)) { var t2 = this._getProfileFromMap(e3); return { nick: t2.nick, avatar: t2.avatar }; } return { nick: "", avatar: "" }; } }, { key: "reset", value: function() { this._flush(true), this.accountProfileMap.clear(); } }]), e2; }(), ji = a(function e2(t2) { o(this, e2), zt || (this.userID = t2.userID || "", this.timeStamp = t2.timeStamp || 0); }), zi = function() { function e2(t2) { o(this, e2), this._userModule = t2, this._n = "BlacklistHandler", this._blacklistMap = /* @__PURE__ */ new Map(), this.startIndex = 0, this.maxLimited = 100, this.currentSequence = 0; } return a(e2, [{ key: "getLocalBlacklist", value: function() { return m(this._blacklistMap.keys()); } }, { key: "getBlacklist", value: function() { var e3 = this, t2 = "".concat(this._n, ".getBlacklist"), n2 = { fromAccount: this._userModule.getMyAccount(), maxLimited: this.maxLimited, startIndex: 0, lastSequence: this.currentSequence }, o2 = new Aa("getBlacklist"); return this._userModule.request({ protocolName: yo, requestData: n2 }).then(function(n3) { var s2 = n3.data, a2 = s2.blackListItem, i2 = s2.currentSequence, r2 = zt(a2) ? 0 : a2.length; o2.setNetworkType(e3._userModule.getNetworkType()).setMessage("count:".concat(r2)).end(), Ve.i("".concat(t2, " ok")), e3.currentSequence = i2, e3._handleResponse(a2, true), e3._userModule.emitOuterEvent(k.BLACKLIST_UPDATED, m(e3._blacklistMap.keys())); }).catch(function(n3) { return e3._userModule.probeNetwork().then(function(e4) { var t3 = v(e4, 2), s2 = t3[0], a2 = t3[1]; o2.setError(n3, s2, a2).end(); }), Ve.e("".concat(t2, " failed. error:"), n3), Za(n3); }); } }, { key: "addBlacklist", value: function(e3) { var t2 = this, n2 = new Aa("addToBlacklist"), o2 = "".concat(this._n, ".addBlacklist"), s2 = this._userModule.getMyAccount(); if (1 === e3.userIDList.length && e3.userIDList[0] === s2) { var a2 = ha.CANNOT_ADD_SELF_TO_BLACKLIST, i2 = this._userModule.getErrorMessage(a2); n2.setCode(a2).setMessage(i2).setNetworkType(this._userModule.getNetworkType()).end(); var r2 = new ja({ code: a2 }); return Ve.e("".concat(o2, " failed. error:"), r2), Za(r2); } return e3.userIDList.includes(s2) && (e3.userIDList = e3.userIDList.filter(function(e4) { return e4 !== s2; })), e3.fromAccount = this._userModule.getMyAccount(), e3.toAccount = e3.userIDList, this._userModule.request({ protocolName: Io, requestData: e3 }).then(function(s3) { return n2.setNetworkType(t2._userModule.getNetworkType()).setMessage(e3.userIDList.length > 5 ? "userIDList.length:".concat(e3.userIDList.length) : "userIDList:".concat(e3.userIDList)).end(), Ve.i("".concat(o2, " ok")), t2._handleResponse(s3.resultItem, true), Ya(m(t2._blacklistMap.keys())); }).catch(function(e4) { return t2._userModule.probeNetwork().then(function(t3) { var o3 = v(t3, 2), s3 = o3[0], a3 = o3[1]; n2.setError(e4, s3, a3).end(); }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4); }); } }, { key: "_handleResponse", value: function(e3, t2) { if (!zt(e3)) for (var n2, o2, s2, a2 = 0, i2 = e3.length; a2 < i2; a2++) o2 = e3[a2].to, s2 = e3[a2].resultCode, (it(s2) || 0 === s2) && (t2 ? ((n2 = this._blacklistMap.has(o2) ? this._blacklistMap.get(o2) : new ji()).userID = o2, !zt(e3[a2].addBlackTimeStamp) && (n2.timeStamp = e3[a2].addBlackTimeStamp), this._blacklistMap.set(o2, n2)) : this._blacklistMap.has(o2) && (n2 = this._blacklistMap.get(o2), this._blacklistMap.delete(o2))); Ve.l("".concat(this._n, "._handleResponse total:").concat(this._blacklistMap.size, " bAdd:").concat(t2)); } }, { key: "deleteBlacklist", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".deleteBlacklist"), o2 = new Aa("removeFromBlacklist"); return e3.fromAccount = this._userModule.getMyAccount(), e3.toAccount = e3.userIDList, this._userModule.request({ protocolName: Co, requestData: e3 }).then(function(s2) { return o2.setNetworkType(t2._userModule.getNetworkType()).setMessage(e3.userIDList.length > 5 ? "userIDList.length:".concat(e3.userIDList.length) : "userIDList:".concat(e3.userIDList)).end(), Ve.i("".concat(n2, " ok")), t2._handleResponse(s2.data.resultItem, false), Ya(m(t2._blacklistMap.keys())); }).catch(function(e4) { return t2._userModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), s2 = n3[0], a2 = n3[1]; o2.setError(e4, s2, a2).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "onAccountDeleted", value: function(e3) { for (var t2, n2 = [], o2 = 0, s2 = e3.length; o2 < s2; o2++) t2 = e3[o2], this._blacklistMap.has(t2) && (this._blacklistMap.delete(t2), n2.push(t2)); n2.length > 0 && (Ve.l("".concat(this._n, ".onAccountDeleted count:").concat(n2.length, " userIDList:"), n2), this._userModule.emitOuterEvent(k.BLACKLIST_UPDATED, m(this._blacklistMap.keys()))); } }, { key: "onAccountAdded", value: function(e3) { for (var t2, n2 = [], o2 = 0, s2 = e3.length; o2 < s2; o2++) t2 = e3[o2], this._blacklistMap.has(t2) || (this._blacklistMap.set(t2, new ji({ userID: t2 })), n2.push(t2)); n2.length > 0 && (Ve.l("".concat(this._n, ".onAccountAdded count:").concat(n2.length, " userIDList:"), n2), this._userModule.emitOuterEvent(k.BLACKLIST_UPDATED, m(this._blacklistMap.keys()))); } }, { key: "reset", value: function() { this._blacklistMap.clear(), this.startIndex = 0, this.maxLimited = 100, this.currentSequence = 0; } }]), e2; }(), Ji = function(e2) { var t2 = String(e2).replace(/[=]+$/, ""), n2 = ""; if (t2.length % 4 == 1) return ""; for (var o2, s2, a2 = 0, i2 = 0; s2 = t2.charAt(i2++); ~s2 && (o2 = a2 % 4 ? 64 * o2 + s2 : s2, a2++ % 4) ? n2 += String.fromCharCode(255 & o2 >> (-2 * a2 & 6)) : 0) s2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(s2); try { return decodeURIComponent(escape(n2)); } catch (r2) { return ""; } }, Xi = function() { function e2(t2) { o(this, e2), this._userModule = t2, this._n = "UserStatusHandler", this.MAX_QUERY_USER_COUNT = 500, this.MAX_SUBSCRIBE_USER_COUNT = 100, this.MAX_UNSUBSCRIBE_USER_COUNT = 100, this._userModule.getInnerEmitterInstance().on(ti, this._onCloudConfigUpdated, this); } return a(e2, [{ key: "_onCloudConfigUpdated", value: function() { var e3 = this._userModule.getCloudConfig("status_query_count"), t2 = this._userModule.getCloudConfig("status_sub_count"), n2 = this._userModule.getCloudConfig("status_unsub_count"); Ve.l("".concat(this._n, "._onCloudConfigUpdated statusQueryCount:").concat(e3, " statusSubscribeCount:").concat(t2) + " statusUnsubscribeCount:".concat(n2)), it(e3) || (this.MAX_QUERY_USER_COUNT = parseInt(e3, 10)), it(e3) || (this.MAX_SUBSCRIBE_USER_COUNT = parseInt(t2, 10)), it(e3) || (this.MAX_UNSUBSCRIBE_USER_COUNT = parseInt(n2, 10)); } }, { key: "onUserStatusUpdated", value: function(e3) { var t2 = e3.dataList, n2 = this._userModule.getMyUserID(), o2 = this._userModule.getModule(xn), s2 = t2.map(function(e4) { var t3 = e4.to, s3 = e4.statusType, a2 = e4.customStatus, i2 = Ji(a2); return t3 === n2 && o2.setCustomStatus(i2), { userID: t3, statusType: s3, customStatus: i2 }; }); this._userModule.emitOuterEvent(k.USER_STATUS_UPDATED, s2); } }, { key: "setSelfStatus", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".setSelfStatus"); if (false === this._userModule.filterProfanity("customStatus", e3)) return Za({ code: ha.PROFANITY_FOUND }); var o2 = new Aa("setSelfStatus"), s2 = e3.customStatus; return this._userModule.request({ protocolName: aa, requestData: { customStatus: s2 } }).then(function(e4) { return o2.setNetworkType(t2._userModule.getNetworkType()).setMessage("customStatus:".concat(s2)).end(), Ve.l("".concat(n2, " ok. customStatus:").concat(s2)), t2._userModule.getModule(xn).setCustomStatus(s2), Ya({ userID: t2._userModule.getMyUserID(), statusType: 1, customStatus: s2 }); }).catch(function(e4) { return t2._userModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), s3 = n3[0], a2 = n3[1]; o2.setError(e4, s3, a2).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "getUserStatus", value: function(e3) { var t2 = this, n2 = "".concat(this._n, ".getUserStatus"), o2 = e3.userIDList, s2 = void 0 === o2 ? [] : o2, a2 = this._userModule.getMyUserID(), i2 = m(s2), r2 = void 0, u2 = i2.indexOf(a2); if (u2 > -1) { i2.splice(u2, 1); var c2 = this._userModule.getModule(xn).getCustomStatus(); r2 = { userID: a2, statusType: 1, customStatus: c2 }; } if (0 === i2.length) return Xa({ successUserList: [r2], failureUserList: [] }); if (!this._userModule.canIUse(B.USER_STATUS)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); i2.length > this.MAX_QUERY_USER_COUNT && (Ve.w("".concat(n2, " ").concat(Wt(this.MAX_QUERY_USER_COUNT))), i2 = s2.slice(0, this.MAX_QUERY_USER_COUNT)); var l2 = new Aa("getUserStatus"); return this._userModule.request({ protocolName: ia, requestData: { userIDList: i2 } }).then(function(e4) { var o3 = e4.data, a3 = o3.successUserList, i3 = void 0 === a3 ? [] : a3, u3 = o3.failureUserList, c3 = void 0 === u3 ? [] : u3, d2 = i3.map(function(e5) { var t3 = e5.userID, n3 = e5.statusType, o4 = e5.customStatus; return { userID: t3, statusType: n3, customStatus: Ji(o4) }; }), p2 = c3.map(function(e5) { var t3 = e5.userID, n3 = e5.invalidUserID, o4 = e5.errorCode, s3 = e5.errorInfo; return { userID: zt(n3) ? t3 : n3, code: o4, message: s3 }; }); it(r2) || d2.unshift(r2); var g2 = "userID count:".concat(s2.length, ", success count:").concat(d2.length, ", fail count:").concat(p2.length); return l2.setNetworkType(t2._userModule.getNetworkType()).setMessage("".concat(g2)).end(), Ve.l("".concat(n2, " ok. ").concat(g2, ".")), Ya({ successUserList: d2, failureUserList: p2 }); }).catch(function(e4) { return t2._userModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], a3 = n3[1]; l2.setMessage("userID count:".concat(s2.length)).setError(e4, o3, a3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "subscribeUserStatus", value: function(e3) { var t2 = this; if (!this._userModule.canIUse(B.USER_STATUS)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".subscribeUserStatus"), o2 = e3.userIDList, s2 = void 0 === o2 ? [] : o2, a2 = m(s2); a2.length > this.MAX_SUBSCRIBE_USER_COUNT && (Ve.w("".concat(n2, " ").concat(Wt(this.MAX_SUBSCRIBE_USER_COUNT))), a2 = s2.slice(0, this.MAX_SUBSCRIBE_USER_COUNT)); var i2 = new Aa("subscribeUserStatus"), r2 = "userID count:".concat(s2.length); return Ve.l("".concat(n2, " ").concat(r2)), this._userModule.request({ protocolName: ra, requestData: { userIDList: a2 } }).then(function(e4) { var o3 = e4.data.failureUserList, s3 = (void 0 === o3 ? [] : o3).map(function(e5) { var t3 = e5.userID, n3 = e5.invalidUserID, o4 = e5.errorCode, s4 = e5.errorInfo; return { userID: zt(n3) ? t3 : n3, code: o4, message: s4 }; }); return i2.setNetworkType(t2._userModule.getNetworkType()).setMessage("".concat(r2, " fail count:").concat(s3.length)).end(), Ve.l("".concat(n2, " ok. fail count:").concat(s3.length, ".")), Ya({ failureUserList: s3 }); }).catch(function(e4) { return t2._userModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; i2.setMessage("".concat(r2)).setError(e4, o3, s3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "unsubscribeUserStatus", value: function(e3) { var t2 = this; if (!this._userModule.canIUse(B.USER_STATUS)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n2 = "".concat(this._n, ".unsubscribeUserStatus"), o2 = (e3 || {}).userIDList, s2 = void 0 === o2 ? [] : o2, a2 = m(s2); s2.length > this.MAX_UNSUBSCRIBE_USER_COUNT && (Ve.w("".concat(n2, " ").concat(Wt(this.MAX_UNSUBSCRIBE_USER_COUNT))), a2 = s2.slice(0, this.MAX_UNSUBSCRIBE_USER_COUNT)); var i2 = new Aa("unsubscribeUserStatus"), r2 = "userID count:".concat(s2.length); Ve.l("".concat(n2, " ").concat(r2)); var u2 = { userIDList: a2 }; return 0 === a2.length && (u2.userIDList = void 0, u2.unsubscribeAll = 1), this._userModule.request({ protocolName: ua, requestData: u2 }).then(function(e4) { var o3 = e4.data.failureUserList, s3 = (void 0 === o3 ? [] : o3).map(function(e5) { var t3 = e5.userID, n3 = e5.invalidUserID, o4 = e5.errorCode, s4 = e5.errorInfo; return { userID: zt(n3) ? t3 : n3, code: o4, message: s4 }; }); return i2.setNetworkType(t2._userModule.getNetworkType()).setMessage("".concat(r2, " fail count:").concat(s3.length)).end(), Ve.l("".concat(n2, " ok. fail count:").concat(s3.length, ".")), Ya({ failureUserList: s3 }); }).catch(function(e4) { return t2._userModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; i2.setMessage("".concat(r2)).setError(e4, o3, s3).end(); }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4); }); } }, { key: "reset", value: function() { this.MAX_QUERY_USER_COUNT = 500, this.MAX_SUBSCRIBE_USER_COUNT = 100, this.MAX_UNSUBSCRIBE_USER_COUNT = 100; } }]), e2; }(), Zi = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "UserModule", s2._profileHandler = new Yi(h(s2)), s2._blacklistHandler = new zi(h(s2)), s2._userStatusHandler = new Xi(h(s2)), s2.getInnerEmitterInstance().on(ei, s2.onContextUpdated, h(s2)), s2; } return a(n2, [{ key: "onContextUpdated", value: function(e3) { this._profileHandler.getMyProfile(), this._blacklistHandler.getBlacklist(); } }, { key: "onProfileModified", value: function(e3) { this._profileHandler.onProfileModified(e3); } }, { key: "onRelationChainModified", value: function(e3) { var t3 = e3.dataList; if (!zt(t3)) { var n3 = []; t3.forEach(function(e4) { e4.blackListDelAccount && n3.push.apply(n3, m(e4.blackListDelAccount)); }), n3.length > 0 && this._blacklistHandler.onAccountDeleted(n3); var o2 = []; t3.forEach(function(e4) { e4.blackListAddAccount && o2.push.apply(o2, m(e4.blackListAddAccount)); }), o2.length > 0 && this._blacklistHandler.onAccountAdded(o2); } } }, { key: "onConversationsProfileUpdated", value: function(e3) { this._profileHandler.onConversationsProfileUpdated(e3); } }, { key: "getMyAccount", value: function() { return this.getMyUserID(); } }, { key: "getMyProfile", value: function() { return this._profileHandler.getMyProfile(); } }, { key: "getStorageModule", value: function() { return this.getModule(Vn); } }, { key: "filterProfanity", value: function(e3, t3) { var n3 = this.getModule(oo); if (!n3) return true; var o2 = n3.filterText(t3[e3], j), s2 = o2.isAllowedToSend, a2 = o2.modifiedText; return true === s2 && (t3[e3] = a2, true); } }, { key: "isMyFriend", value: function(e3) { var t3 = this.getModule(bn); return !!t3 && t3.isMyFriend(e3); } }, { key: "getUserProfile", value: function(e3) { return this._profileHandler.getUserProfile(e3); } }, { key: "updateMyProfile", value: function(e3) { return this._profileHandler.updateMyProfile(e3); } }, { key: "getNickAndAvatarByUserID", value: function(e3) { return this._profileHandler.getNickAndAvatarByUserID(e3); } }, { key: "getLocalBlacklist", value: function() { var e3 = this._blacklistHandler.getLocalBlacklist(); return Xa(e3); } }, { key: "addBlacklist", value: function(e3) { return this._blacklistHandler.addBlacklist(e3); } }, { key: "deleteBlacklist", value: function(e3) { return this._blacklistHandler.deleteBlacklist(e3); } }, { key: "onUserStatusUpdated", value: function(e3) { this._userStatusHandler.onUserStatusUpdated(e3); } }, { key: "setSelfStatus", value: function(e3) { return this._userStatusHandler.setSelfStatus(e3); } }, { key: "getUserStatus", value: function(e3) { return this._userStatusHandler.getUserStatus(e3); } }, { key: "subscribeUserStatus", value: function(e3) { return this._userStatusHandler.subscribeUserStatus(e3); } }, { key: "unsubscribeUserStatus", value: function(e3) { return this._userStatusHandler.unsubscribeUserStatus(e3); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._profileHandler.reset(), this._blacklistHandler.reset(), this._userStatusHandler.reset(); } }]), n2; }(uo), Qi = function() { function e2(t2, n2) { o(this, e2), this._m = t2, this._isLoggedIn = false, this._SDKAppID = n2.SDKAppID, this._userID = n2.userID || "", this._userSig = n2.userSig || "", this._version = "2.27.6", this._a2Key = "", this._tinyID = "", this._customStatus = "", this._contentType = "json", this._unlimitedAVChatRoom = n2.unlimitedAVChatRoom, this._scene = n2.scene || "", this._oversea = n2.oversea, this._instanceID = n2.instanceID, this._statusInstanceID = 0, this._isDevMode = n2.devMode, this._proxyServer = n2.proxyServer, this._fileUploadProxy = n2.fileUploadProxy, this._fileDownloadProxy = n2.fileDownloadProxy; } return a(e2, [{ key: "isLoggedIn", value: function() { return this._isLoggedIn; } }, { key: "isOversea", value: function() { return this._oversea; } }, { key: "isPrivateNetWork", value: function() { return this._proxyServer; } }, { key: "isDevMode", value: function() { return this._isDevMode; } }, { key: "isSingaporeSite", value: function() { return this._SDKAppID >= 2e7 && this._SDKAppID < 3e7 || this._SDKAppID >= 172e7 && this._SDKAppID < 173e7; } }, { key: "isKoreaSite", value: function() { return this._SDKAppID >= 3e7 && this._SDKAppID < 4e7 || this._SDKAppID >= 173e7 && this._SDKAppID < 174e7; } }, { key: "isGermanySite", value: function() { return this._SDKAppID >= 4e7 && this._SDKAppID < 5e7 || this._SDKAppID >= 174e7 && this._SDKAppID < 175e7; } }, { key: "isIndiaSite", value: function() { return this._SDKAppID >= 5e7 && this._SDKAppID < 6e7 || this._SDKAppID >= 175e7 && this._SDKAppID < 176e7; } }, { key: "isJapanSite", value: function() { return this._SDKAppID >= 6e7 && this._SDKAppID < 7e7 || this._SDKAppID >= 176e7 && this._SDKAppID < 177e7; } }, { key: "isUSASite", value: function() { return this._SDKAppID >= 7e7 && this._SDKAppID < 8e7 || this._SDKAppID >= 177e7 && this._SDKAppID < 178e7; } }, { key: "isIntl", value: function() { return 0 === (e3 = this._SDKAppID) || e3 >= 2e7 && e3 < 8e7 || e3 >= 172e7 && e3 < 178e7; var e3; } }, { key: "isUnlimitedAVChatRoom", value: function() { return this._unlimitedAVChatRoom; } }, { key: "setUserID", value: function(e3) { this._userID = e3; } }, { key: "getUserID", value: function() { return this._userID; } }, { key: "setUserSig", value: function(e3) { this._userSig = e3; } }, { key: "getUserSig", value: function() { return this._userSig; } }, { key: "getSDKAppID", value: function() { return this._SDKAppID; } }, { key: "setTinyID", value: function(e3) { this._tinyID = e3, this._isLoggedIn = true; } }, { key: "getTinyID", value: function() { return this._tinyID; } }, { key: "setCustomStatus", value: function(e3) { this._customStatus = e3; } }, { key: "getCustomStatus", value: function() { return this._customStatus; } }, { key: "getScene", value: function() { return Ae ? window.tencent_cloud_im_csig_flutter_for_web_25F_cy : this._isTUIKit() ? "tuikit" : this._scene; } }, { key: "getInstanceID", value: function() { return this._instanceID; } }, { key: "getStatusInstanceID", value: function() { return this._statusInstanceID; } }, { key: "setStatusInstanceID", value: function(e3) { this._statusInstanceID = e3; } }, { key: "getVersion", value: function() { return this._version; } }, { key: "getA2Key", value: function() { return this._a2Key; } }, { key: "setA2Key", value: function(e3) { this._a2Key = e3; } }, { key: "getContentType", value: function() { return this._contentType; } }, { key: "getProxyServer", value: function() { return this._proxyServer; } }, { key: "getFileUploadProxy", value: function() { return this._fileUploadProxy; } }, { key: "getFileDownloadProxy", value: function() { return this._fileDownloadProxy; } }, { key: "_isTUIKit", value: function() { var e3 = false, t2 = false, n2 = false, o2 = false, s2 = []; ae && (s2 = Object.keys(re)), ie && (s2 = se ? Object.keys(uni) : Object.keys(window)); for (var a2 = 0, i2 = s2.length; a2 < i2; a2++) if (s2[a2].toLowerCase().includes("uikit")) { e3 = true; break; } if (s2 = null, ae && !ut(re.createGamePortal) && ut(getApp) && !it(getApp())) { var r2 = getApp().globalData; st(r2) && true === r2.isTUIKit && (t2 = true); } true === this._m.getModule(Vn).getStorageSync("TIM_".concat(this._SDKAppID, "_isTUIKit")) && (n2 = true); var u2 = null; if (X && !$ && "undefined" == typeof uni && __wxConfig && (u2 = __wxConfig.pages), Q && "undefined" == typeof uni && __qqConfig && (u2 = __qqConfig.pages), at(u2) && u2.length > 0) { for (var c2 = 0, l2 = u2.length; c2 < l2; c2++) if (u2[c2].toLowerCase().includes("tui")) { o2 = true; break; } u2 = null; } return e3 || t2 || n2 || o2; } }, { key: "reset", value: function() { this._isLoggedIn = false, this._userSig = "", this._a2Key = "", this._tinyID = "", this._customStatus = "", this._statusInstanceID = 0; } }]), e2; }(), $i = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "SignModule", s2._helloInterval = 120, s2._lastLoginTs = 0, s2._lastWsHelloTs = 0, s2._isWebUniapp = 0, oi.mixin(h(s2)), s2; } return a(n2, [{ key: "onCheckTimer", value: function(e3) { this.isLoggedIn() && e3 % this._helloInterval == 0 && this._hello(); } }, { key: "login", value: function(e3) { var t3 = ""; if (this.isLoggedIn()) { var n3 = this.getMyUserID(); return (t3 = this.getErrorMessage("RepeatLogin", n3)) && Ve.w(t3), Xa({ actionStatus: "OK", errorCode: 0, errorInfo: t3, repeatLogin: true }); } if (Date.now() - this._lastLoginTs <= 15e3) return this.outputWarning("LoggingIn", e3.userID), Za({ code: ha.REPEAT_LOGIN }); Ve.l("".concat(this._n, ".login userID:").concat(e3.userID)); var o2 = this._checkLoginInfo(e3); if (0 !== o2.code) return Za(o2); var s2 = this.getModule(xn), a2 = e3.userID, i2 = e3.userSig; return s2.setUserID(a2), s2.setUserSig(i2), this.getModule(zn).updateProtocolConfig(), this._login(); } }, { key: "_login", value: function() { var e3 = this, t3 = this.getModule(xn), n3 = t3.getScene(), o2 = 0, s2 = new Aa("login"); s2.setMessage("".concat(n3)).setMoreMessage("identifier:".concat(this.getMyUserID())), se ? "tuikit" === n3 ? s2.setUIPlatform(4) : s2.setUIPlatform(3) : ae ? "tuikit" === n3 ? s2.setUIPlatform(12) : s2.setUIPlatform(11) : ie && (Ae ? "flutter_web_uikit" === n3 ? s2.setUIPlatform(21) : s2.setUIPlatform(20) : this._isReactUIKit() ? Le ? s2.setUIPlatform(25) : s2.setUIPlatform(24) : Le ? "tuikit" === n3 ? s2.setUIPlatform(17) : s2.setUIPlatform(16) : "tuikit" === n3 ? s2.setUIPlatform(14) : s2.setUIPlatform(13)); var a2 = this.getModule(no); if (a2.canIUseOfflinePush()) { this._isWebUniapp = a2.getUniAppPlatform(); var i2 = this._getStatusInstanceID(); t3.setStatusInstanceID(i2), this.getModule(zn).updateProtocolConfig(), o2 = a2.getDeviceBrand(); } var r2 = "".concat(this._n, "._login"); return this._lastLoginTs = Date.now(), this.request({ protocolName: co, requestData: { deviceBrand: o2, isWebUniapp: this._isWebUniapp } }).then(function(o3) { e3._lastLoginTs = 0; var a3 = Date.now(), i3 = null, u2 = o3.data, c2 = u2.a2Key, l2 = u2.tinyID, d2 = u2.helloInterval, p2 = u2.instanceID, g2 = u2.timeStamp, h2 = u2.customStatus, _2 = void 0 === h2 ? "" : h2, f2 = u2.purchaseBits; Ve.l("".concat(r2, " ok. scene:").concat(n3, " helloInterval:").concat(d2, " instanceID:").concat(p2, " timeStamp:").concat(g2)); var v2 = 1e3 * g2, m2 = a3 - s2.getStartTs(), M2 = v2 + parseInt(m2 / 2) - a3, y2 = s2.getStartTs() + M2; if (s2.start(y2), function(e4, t4) { Ue = t4; var n4 = /* @__PURE__ */ new Date(); n4.setTime(e4), Ve.i("baseTime from server:".concat(n4, " offset:").concat(Ue)); }(v2, M2), !l2) throw i3 = new ja({ code: ha.NO_TINYID }), s2.setError(i3, true, e3.getNetworkType()).end(), i3; if (!c2) throw i3 = new ja({ code: ha.NO_A2KEY }), s2.setError(i3, true, e3.getNetworkType()).end(), i3; var I2 = Ji(_2); (s2.setNetworkType(e3.getNetworkType()).setMoreMessage("helloInterval:".concat(d2, " instanceID:").concat(p2, " offset:").concat(M2, " customStatus:").concat(I2)).end(), t3.setA2Key(c2), t3.setTinyID(l2), t3.setStatusInstanceID(p2), t3.setCustomStatus(I2), f2) && e3.getModule(to).onPushedConfig({ errorCode: 0, expiredTime: 0, purchaseBits: f2 }); e3.getModule(zn).updateProtocolConfig(), e3.emitInnerEvent(ei), e3._helloInterval = d2, e3.triggerReady(); var C2 = e3.getModule(no); return C2.canIUseOfflinePush() && (uni.setStorageSync("timUniAppInstanceID", p2), C2.init()), e3._fetchCloudControlConfig(), e3.getModule(oo).init(), o3; }).catch(function(t4) { return e3.probeNetwork().then(function(e4) { var n4 = v(e4, 2), o3 = n4[0], a3 = n4[1]; s2.setError(t4, o3, a3).end(true); }), e3._m.setNotReadyReason(ha.LOGIN_FAILED), Ve.e("".concat(r2, " failed. error:"), t4), e3._lastLoginTs = 0, e3._m.onLoginFailed(), Za(t4); }); } }, { key: "logout", value: function() { var e3 = this, t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0; if (!this.isLoggedIn()) return Za({ code: ha.USER_NOT_LOGGED_IN }); var n3 = new Aa("logout"); n3.setNetworkType(this.getNetworkType()).setMessage("identifier:".concat(this.getMyUserID())).end(true); var o2 = "".concat(this._n, ".logout"); return Ve.i("".concat(o2, " type:").concat(t3)), 0 === t3 && this._m.setNotReadyReason(ha.LOGGED_OUT), this.request({ protocolName: lo, requestData: { type: t3 } }).then(function() { return e3.resetReady(), Xa({}); }).catch(function(t4) { return Ve.e("".concat(o2, " error:"), t4), e3.resetReady(), Xa({}); }); } }, { key: "_fetchCloudControlConfig", value: function() { this.getModule(Zn).fetchConfig(); } }, { key: "_getStatusInstanceID", value: function() { return uni.getStorageSync("timUniAppInstanceID"); } }, { key: "_hello", value: function() { var e3 = this; this._lastWsHelloTs = Date.now(), this.request({ protocolName: po, requestData: { isWebUniapp: this._isWebUniapp } }).catch(function(t3) { Ve.w("".concat(e3._n, "._hello error:"), t3); }); } }, { key: "getLastWsHelloTs", value: function() { return this._lastWsHelloTs; } }, { key: "_checkLoginInfo", value: function(e3) { var t3 = 0; return zt(this.getModule(xn).getSDKAppID()) ? t3 = ha.NO_SDKAPPID : zt(e3.userID) ? t3 = ha.NO_IDENTIFIER : zt(e3.userSig) && (t3 = ha.NO_USERSIG), { code: t3 }; } }, { key: "_isReactUIKit", value: function() { return ie && void 0 !== window.tencent_cloud_im_csig_react_uikit_23F_xa; } }, { key: "onMultipleAccountKickedOut", value: function(e3) { var t3 = this; new Aa("kickedOut").setNetworkType(this.getNetworkType()).setMessage("type:".concat(E.KICKED_OUT_MULT_ACCOUNT, " newInstanceInfo:").concat(JSON.stringify(e3))).end(true), Ve.w("".concat(this._n, ".onMultipleAccountKickedOut userID:").concat(this.getMyUserID(), " newInstanceInfo:"), e3), this.logout(1).then(function() { t3.emitOuterEvent(k.KICKED_OUT, { type: E.KICKED_OUT_MULT_ACCOUNT }), t3._m.setNotReadyReason(ha.KICKED_OUT_MULT_ACCOUNT), t3._m.reset(); }); } }, { key: "onMultipleDeviceKickedOut", value: function(e3) { var t3 = this; new Aa("kickedOut").setNetworkType(this.getNetworkType()).setMessage("type:".concat(E.KICKED_OUT_MULT_DEVICE, " newInstanceInfo:").concat(JSON.stringify(e3))).end(true), Ve.w("".concat(this._n, ".onMultipleDeviceKickedOut userID:").concat(this.getMyUserID(), " newInstanceInfo:"), e3), this.logout(1).then(function() { t3.emitOuterEvent(k.KICKED_OUT, { type: E.KICKED_OUT_MULT_DEVICE }), t3._m.setNotReadyReason(ha.KICKED_OUT_MULT_DEVICE), t3._m.reset(); }); } }, { key: "onUserSigExpired", value: function() { new Aa("kickedOut").setNetworkType(this.getNetworkType()).setMessage(E.KICKED_OUT_USERSIG_EXPIRED).end(true), Ve.w("".concat(this._n, ".onUserSigExpired: userSig expired")), 0 !== this.getModule(xn).getStatusInstanceID() && (this.emitOuterEvent(k.KICKED_OUT, { type: E.KICKED_OUT_USERSIG_EXPIRED }), this._m.setNotReadyReason(ha.KICKED_OUT_USERSIG_EXPIRED), this._m.reset()); } }, { key: "onRestApiKickedOut", value: function(e3) { (new Aa("kickedOut").setNetworkType(this.getNetworkType()).setMessage("type:".concat(E.KICKED_OUT_REST_API, " newInstanceInfo:").concat(JSON.stringify(e3))).end(true), Ve.w("".concat(this._n, ".onRestApiKickedOut userID:").concat(this.getMyUserID(), " newInstanceInfo:"), e3), 0 !== this.getModule(xn).getStatusInstanceID()) && (this.emitOuterEvent(k.KICKED_OUT, { type: E.KICKED_OUT_REST_API }), this._m.setNotReadyReason(ha.KICKED_OUT_REST_API), this._m.reset(), this.getModule(Jn).onRestApiKickedOut()); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this.resetReady(), this._helloInterval = 120, this._lastLoginTs = 0, this._lastWsHelloTs = 0, this._isWebUniapp = 0; } }]), n2; }(uo); function er() { return null; } var tr = function() { function e2(t2) { o(this, e2), this._m = t2, this._n = "StorageModule", this._storageQueue = /* @__PURE__ */ new Map(), this._errorTolerantHandle(); } return a(e2, [{ key: "_errorTolerantHandle", value: function() { ae || !it(window) && this._canIUseCookies() || (this.getItem = er, this.setItem = er, this.removeItem = er, this.clear = er); } }, { key: "onCheckTimer", value: function(e3) { if (e3 % 20 == 0) { if (0 === this._storageQueue.size) return; this._doFlush(); } } }, { key: "_doFlush", value: function() { try { var e3, t2 = D(this._storageQueue); try { for (t2.s(); !(e3 = t2.n()).done; ) { var n2 = v(e3.value, 2), o2 = n2[0], s2 = n2[1]; this._setStorageSync(this._getKey(o2), s2); } } catch (a2) { t2.e(a2); } finally { t2.f(); } this._storageQueue.clear(); } catch (i2) { Ve.w("".concat(this._n, "._doFlush error:"), i2); } } }, { key: "_getPrefix", value: function() { var e3 = this._m.getModule(xn); return "TIM_".concat(e3.getSDKAppID(), "_").concat(e3.getUserID(), "_"); } }, { key: "_getKey", value: function(e3) { return "".concat(this._getPrefix()).concat(e3); } }, { key: "getItem", value: function(e3) { var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; try { var n2 = t2 ? this._getKey(e3) : e3; return this.getStorageSync(n2); } catch (o2) { return Ve.w("".concat(this._n, ".getItem error:"), o2), {}; } } }, { key: "setItem", value: function(e3, t2) { var n2 = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], o2 = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3]; if (n2) { var s2 = o2 ? this._getKey(e3) : e3; this._setStorageSync(s2, t2); } else this._storageQueue.set(e3, t2); } }, { key: "clear", value: function() { try { ae ? re.clearStorageSync() : this._canIUseCookies() && localStorage.clear(); } catch (e3) { Ve.w("".concat(this._n, ".clear error:"), e3); } } }, { key: "removeItem", value: function(e3) { var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; try { var n2 = t2 ? this._getKey(e3) : e3; this._removeStorageSync(n2); } catch (o2) { Ve.w("".concat(this._n, ".removeItem error:"), o2); } } }, { key: "getSize", value: function(e3) { var t2 = this, n2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "b"; try { var o2 = { size: 0, limitSize: 5242880, unit: n2 }; if (Object.defineProperty(o2, "leftSize", { enumerable: true, get: function() { return o2.limitSize - o2.size; } }), ae && (o2.limitSize = 1024 * re.getStorageInfoSync().limitSize), e3) o2.size = JSON.stringify(this.getItem(e3)).length + this._getKey(e3).length; else if (ae) { var s2 = re.getStorageInfoSync(), a2 = s2.keys; a2.forEach(function(e4) { o2.size += JSON.stringify(t2.getStorageSync(e4)).length + t2._getKey(e4).length; }); } else if (this._canIUseCookies()) for (var i2 in localStorage) localStorage.hasOwnProperty(i2) && (o2.size += localStorage.getItem(i2).length + i2.length); return this._convertUnit(o2); } catch (r2) { Ve.w("".concat(this._n, " error:"), r2); } } }, { key: "_convertUnit", value: function(e3) { var t2 = {}, n2 = e3.unit; for (var o2 in t2.unit = n2, e3) "number" == typeof e3[o2] && ("kb" === n2.toLowerCase() ? t2[o2] = Math.round(e3[o2] / 1024) : "mb" === n2.toLowerCase() ? t2[o2] = Math.round(e3[o2] / 1024 / 1024) : t2[o2] = e3[o2]); return t2; } }, { key: "_setStorageSync", value: function(e3, t2) { ae ? te ? my.setStorageSync({ key: e3, data: t2 }) : re.setStorageSync(e3, t2) : this._canIUseCookies() && localStorage.setItem(e3, JSON.stringify(t2)); } }, { key: "getStorageSync", value: function(e3) { return ae ? te ? my.getStorageSync({ key: e3 }).data : re.getStorageSync(e3) : this._canIUseCookies() ? JSON.parse(localStorage.getItem(e3)) : {}; } }, { key: "_removeStorageSync", value: function(e3) { ae ? te ? my.removeStorageSync({ key: e3 }) : re.removeStorageSync(e3) : this._canIUseCookies() && localStorage.removeItem(e3); } }, { key: "_canIUseCookies", value: function() { return navigator && navigator.cookieEnabled && localStorage; } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._doFlush(); } }]), e2; }(), nr = function() { function e2(t2) { o(this, e2), this._n = "SSOLogBody", this._report = []; } return a(e2, [{ key: "pushIn", value: function(e3) { Ve.d("".concat(this._n, ".pushIn"), this._report.length, e3), this._report.push(e3); } }, { key: "backfill", value: function(e3) { var t2; at(e3) && 0 !== e3.length && (Ve.d("".concat(this._n, ".backfill"), this._report.length, e3.length), (t2 = this._report).unshift.apply(t2, m(e3))); } }, { key: "getLogsNumInMemory", value: function() { return this._report.length; } }, { key: "isEmpty", value: function() { return 0 === this._report.length; } }, { key: "_reset", value: function() { this._report.length = 0, this._report = []; } }, { key: "getLogsInMemory", value: function() { var e3 = this._report.slice(); return this._reset(), e3; } }]), e2; }(), or = function(e2) { var t2 = e2.getModule(xn); return { SDKType: 10, SDKAppID: t2.getSDKAppID(), SDKVersion: t2.getVersion(), tinyID: Number(t2.getTinyID()), userID: t2.getUserID(), platform: e2.getPlatform(), instanceID: t2.getInstanceID(), traceID: Pe() }; }, sr = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; o(this, s2), (t2 = n2.call(this, e3))._n = "EventStatModule", t2.TAG = "im-ssolog-event", t2._reportBody = new nr(), t2.MIN_THRESHOLD = 20, t2.MAX_THRESHOLD = 100, t2.WAITING_TIME = 6e4, t2.REPORT_LEVEL = [4, 5, 6], t2.REPORT_SDKAPPID_BLACKLIST = [], t2.REPORT_TINYID_WHITELIST = [], t2._lastReportTime = Date.now(); var a2 = t2.getInnerEmitterInstance(); return a2.on(ei, t2._onLoginSuccess, h(t2)), a2.on(ti, t2._onCloudConfigUpdated, h(t2)), t2; } return a(s2, [{ key: "reportAtOnce", value: function() { Ve.d("".concat(this._n, ".reportAtOnce")), this._report(); } }, { key: "_onLoginSuccess", value: function() { var e3 = this, t2 = this.getModule(Vn), n3 = t2.getItem(this.TAG, false); !zt(n3) && ut(n3.forEach) && (Ve.l("".concat(this._n, "._onLoginSuccess get ssolog in storage, count:").concat(n3.length)), n3.forEach(function(t3) { e3._reportBody.pushIn(t3); }), t2.removeItem(this.TAG, false)); } }, { key: "_onCloudConfigUpdated", value: function() { var e3 = this.getCloudConfig("evt_rpt_threshold"), t2 = this.getCloudConfig("evt_rpt_waiting"), n3 = this.getCloudConfig("evt_rpt_level"), o2 = this.getCloudConfig("evt_rpt_sdkappid_bl"), s3 = this.getCloudConfig("evt_rpt_tinyid_wl"); it(e3) || (this.MIN_THRESHOLD = Number(e3)), it(t2) || (this.WAITING_TIME = Number(t2)), it(n3) || (this.REPORT_LEVEL = n3.split(",").map(function(e4) { return Number(e4); })), it(o2) || (this.REPORT_SDKAPPID_BLACKLIST = o2.split(",").map(function(e4) { return Number(e4); })), it(s3) || (this.REPORT_TINYID_WHITELIST = s3.split(",")); } }, { key: "pushIn", value: function(e3) { e3 instanceof Aa && (e3.updateTimeStamp(), this._reportBody.pushIn(e3), this._reportBody.getLogsNumInMemory() >= this.MIN_THRESHOLD && this._report()); } }, { key: "onCheckTimer", value: function() { Date.now() < this._lastReportTime + this.WAITING_TIME || this._reportBody.isEmpty() || this._report(); } }, { key: "_filterLogs", value: function(e3) { var t2 = this, n3 = this.getModule(xn), o2 = n3.getSDKAppID(), s3 = n3.getTinyID(); return Ft(this.REPORT_SDKAPPID_BLACKLIST, o2) && !qt(this.REPORT_TINYID_WHITELIST, s3) ? [] : e3.filter(function(e4) { return t2.REPORT_LEVEL.includes(e4.level); }); } }, { key: "_report", value: function() { var e3 = this; if (!this._reportBody.isEmpty()) { var n3 = this._reportBody.getLogsInMemory(), o2 = this._filterLogs(n3); if (0 !== o2.length) { var s3 = { header: or(this), event: o2 }; this.request({ protocolName: Bs, requestData: t({}, s3) }).then(function() { e3._lastReportTime = Date.now(); }).catch(function(t2) { Ve.w("".concat(e3._n, ".report failed. networkType:").concat(e3.getNetworkType(), " error:"), t2), e3._reportBody.backfill(n3), e3._reportBody.getLogsNumInMemory() > e3.MAX_THRESHOLD && e3._flushAtOnce(); }); } else this._lastReportTime = Date.now(); } } }, { key: "_flushAtOnce", value: function() { var e3 = this.getModule(Vn), t2 = e3.getItem(this.TAG, false), n3 = this._reportBody.getLogsInMemory(), o2 = "".concat(this._n, "._flushAtOnce"); if (zt(t2)) Ve.l("".concat(o2, " count:").concat(n3.length)), e3.setItem(this.TAG, n3, true, false); else { var s3 = n3.concat(t2); s3.length > this.MAX_THRESHOLD && (s3 = s3.slice(0, this.MAX_THRESHOLD)), Ve.l("".concat(o2, " count:").concat(s3.length)), e3.setItem(this.TAG, s3, true, false); } } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._lastReportTime = 0, this._report(), this.REPORT_SDKAPPID_BLACKLIST = [], this.REPORT_TINYID_WHITELIST = []; } }]), s2; }(uo), ar = "none", ir = "online", rr = [ha.OVER_FREQUENCY_LIMIT, ha.OPEN_SERVICE_OVERLOAD_ERROR], ur = function() { function e2(t2) { o(this, e2), this._m = t2, this._networkType = "", this._n = "NetMonitorModule", this.MAX_WAIT_TIME = 3e3, this._mpNetworkStatusCallback = null, this._webOnlineCallback = null, this._webOfflineCallback = null; } return a(e2, [{ key: "start", value: function() { var e3 = this; ae ? (re.getNetworkType({ success: function(t2) { e3._networkType = t2.networkType || t2.subtype || "", t2.networkType === ar ? Ve.w("".concat(e3._n, ".start no network, please check!")) : Ve.i("".concat(e3._n, ".start networkType:").concat(t2.networkType)); } }), this._mpNetworkStatusCallback = this._onNetworkStatusChange.bind(this), re.onNetworkStatusChange(this._mpNetworkStatusCallback)) : (this._networkType = ir, this._webOnlineCallback = this._onWebOnline.bind(this), this._webOfflineCallback = this._onWebOffline.bind(this), window && (window.addEventListener("online", this._webOnlineCallback), window.addEventListener("offline", this._webOfflineCallback))); } }, { key: "_onWebOnline", value: function() { this._onNetworkStatusChange({ isConnected: true, networkType: ir }); } }, { key: "_onWebOffline", value: function() { this._onNetworkStatusChange({ isConnected: false, networkType: ar }); } }, { key: "_onNetworkStatusChange", value: function(e3) { var t2 = e3.isConnected, n2 = e3.networkType, o2 = "".concat(this._n, "._onNetworkStatusChange"), s2 = false; t2 ? (Ve.i("".concat(o2, " previous:").concat(this._networkType, " current:").concat(n2)), this._networkType !== n2 && (s2 = true, this._m.getModule(Jn).reConnect(true))) : this._networkType !== n2 && (s2 = true, Ve.w("".concat(o2, " no network, please check!")), this._m.getModule(Jn).offline()); s2 && (new Aa("networkChange").setMessage("isConnected:".concat(t2, " previousNetworkType:").concat(this._networkType, " networkType:").concat(n2)).end(), this._networkType = n2); } }, { key: "probe", value: function(e3) { var t2 = this; if (!it(e3) && rr.includes(e3.code)) return Promise.resolve([true, this._networkType]); var n2 = "".concat(this._n, ".probe"); return new Promise(function(e4, o2) { ae ? re.getNetworkType({ success: function(o3) { t2._networkType = o3.networkType, o3.networkType === ar ? (Ve.w("".concat(n2, " no network, please check!")), e4([false, o3.networkType])) : (Ve.i("".concat(n2, " networkType:").concat(o3.networkType)), e4([true, o3.networkType])); } }) : t2._networkType === ar ? e4([false, ar]) : e4([true, ir]); }); } }, { key: "getNetworkType", value: function() { return this._networkType; } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), ae ? null !== this._mpNetworkStatusCallback && (re.offNetworkStatusChange && (oe || $ ? re.offNetworkStatusChange(this._mpNetworkStatusCallback) : re.offNetworkStatusChange()), this._mpNetworkStatusCallback = null) : window && (null !== this._webOnlineCallback && (window.removeEventListener("online", this._webOnlineCallback), this._webOnlineCallback = null), null !== this._onWebOffline && (window.removeEventListener("offline", this._webOfflineCallback), this._webOfflineCallback = null)); } }]), e2; }(); function cr(e2, t2) { return e2(t2 = { exports: {} }, t2.exports), t2.exports; } var lr = cr(function(e2) { var t2 = Object.prototype.hasOwnProperty, n2 = "~"; function o2() { } function s2(e3, t3, n3) { this.fn = e3, this.context = t3, this.once = n3 || false; } function a2(e3, t3, o3, a3, i3) { if ("function" != typeof o3) throw new TypeError("The listener must be a function"); var r3 = new s2(o3, a3 || e3, i3), u2 = n2 ? n2 + t3 : t3; return e3._events[u2] ? e3._events[u2].fn ? e3._events[u2] = [e3._events[u2], r3] : e3._events[u2].push(r3) : (e3._events[u2] = r3, e3._eventsCount++), e3; } function i2(e3, t3) { 0 == --e3._eventsCount ? e3._events = new o2() : delete e3._events[t3]; } function r2() { this._events = new o2(), this._eventsCount = 0; } Object.create && (o2.prototype = /* @__PURE__ */ Object.create(null), new o2().__proto__ || (n2 = false)), r2.prototype.eventNames = function() { var e3, o3, s3 = []; if (0 === this._eventsCount) return s3; for (o3 in e3 = this._events) t2.call(e3, o3) && s3.push(n2 ? o3.slice(1) : o3); return Object.getOwnPropertySymbols ? s3.concat(Object.getOwnPropertySymbols(e3)) : s3; }, r2.prototype.listeners = function(e3) { var t3 = n2 ? n2 + e3 : e3, o3 = this._events[t3]; if (!o3) return []; if (o3.fn) return [o3.fn]; for (var s3 = 0, a3 = o3.length, i3 = new Array(a3); s3 < a3; s3++) i3[s3] = o3[s3].fn; return i3; }, r2.prototype.listenerCount = function(e3) { var t3 = n2 ? n2 + e3 : e3, o3 = this._events[t3]; return o3 ? o3.fn ? 1 : o3.length : 0; }, r2.prototype.emit = function(e3, t3, o3, s3, a3, i3) { var r3 = n2 ? n2 + e3 : e3; if (!this._events[r3]) return false; var u2, c2, l2 = this._events[r3], d2 = arguments.length; if (l2.fn) { switch (l2.once && this.removeListener(e3, l2.fn, void 0, true), d2) { case 1: return l2.fn.call(l2.context), true; case 2: return l2.fn.call(l2.context, t3), true; case 3: return l2.fn.call(l2.context, t3, o3), true; case 4: return l2.fn.call(l2.context, t3, o3, s3), true; case 5: return l2.fn.call(l2.context, t3, o3, s3, a3), true; case 6: return l2.fn.call(l2.context, t3, o3, s3, a3, i3), true; } for (c2 = 1, u2 = new Array(d2 - 1); c2 < d2; c2++) u2[c2 - 1] = arguments[c2]; l2.fn.apply(l2.context, u2); } else { var p2, g2 = l2.length; for (c2 = 0; c2 < g2; c2++) switch (l2[c2].once && this.removeListener(e3, l2[c2].fn, void 0, true), d2) { case 1: l2[c2].fn.call(l2[c2].context); break; case 2: l2[c2].fn.call(l2[c2].context, t3); break; case 3: l2[c2].fn.call(l2[c2].context, t3, o3); break; case 4: l2[c2].fn.call(l2[c2].context, t3, o3, s3); break; default: if (!u2) for (p2 = 1, u2 = new Array(d2 - 1); p2 < d2; p2++) u2[p2 - 1] = arguments[p2]; l2[c2].fn.apply(l2[c2].context, u2); } } return true; }, r2.prototype.on = function(e3, t3, n3) { return a2(this, e3, t3, n3, false); }, r2.prototype.once = function(e3, t3, n3) { return a2(this, e3, t3, n3, true); }, r2.prototype.removeListener = function(e3, t3, o3, s3) { var a3 = n2 ? n2 + e3 : e3; if (!this._events[a3]) return this; if (!t3) return i2(this, a3), this; var r3 = this._events[a3]; if (r3.fn) r3.fn !== t3 || s3 && !r3.once || o3 && r3.context !== o3 || i2(this, a3); else { for (var u2 = 0, c2 = [], l2 = r3.length; u2 < l2; u2++) (r3[u2].fn !== t3 || s3 && !r3[u2].once || o3 && r3[u2].context !== o3) && c2.push(r3[u2]); c2.length ? this._events[a3] = 1 === c2.length ? c2[0] : c2 : i2(this, a3); } return this; }, r2.prototype.removeAllListeners = function(e3) { var t3; return e3 ? (t3 = n2 ? n2 + e3 : e3, this._events[t3] && i2(this, t3)) : (this._events = new o2(), this._eventsCount = 0), this; }, r2.prototype.off = r2.prototype.removeListener, r2.prototype.addListener = r2.prototype.on, r2.prefixed = n2, r2.EventEmitter = r2, e2.exports = r2; }), dr = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "BigDataChannelModule", s2.FILETYPE = { SOUND: 2106, FILE: 2107, VIDEO: 2113 }, s2._bdh_download_server = "grouptalk.c2c.qq.com", s2._BDHBizID = 10001, s2._authKey = "", s2._expireTime = 0, s2.getInnerEmitterInstance().on(ei, s2._getAuthKey, h(s2)), s2; } return a(n2, [{ key: "_getAuthKey", value: function() { var e3 = this; this.isIntl() || this.request({ protocolName: _o }).then(function(t3) { t3.data.authKey && (e3._authKey = t3.data.authKey, e3._expireTime = parseInt(t3.data.expireTime)); }); } }, { key: "_isFromOlderVersion", value: function(e3) { return !(!e3.content || 2 === e3.content.downloadFlag); } }, { key: "parseElements", value: function(e3, t3) { if (!at(e3) || !t3) return []; for (var n3 = [], o2 = null, s2 = 0; s2 < e3.length; s2++) o2 = e3[s2], this._needParse(o2) ? n3.push(this._parseElement(o2, t3)) : n3.push(e3[s2]); return n3; } }, { key: "_needParse", value: function(e3) { return !e3.cloudCustomData && !(!this._isFromOlderVersion(e3) || e3.type !== E.MSG_AUDIO && e3.type !== E.MSG_FILE && e3.type !== E.MSG_VIDEO); } }, { key: "_parseElement", value: function(e3, t3) { switch (e3.type) { case E.MSG_AUDIO: return this._parseAudioElement(e3, t3); case E.MSG_FILE: return this._parseFileElement(e3, t3); case E.MSG_VIDEO: return this._parseVideoElement(e3, t3); } } }, { key: "_parseAudioElement", value: function(e3, t3) { return e3.content.url = this._genAudioUrl(e3.content.uuid, t3), e3; } }, { key: "_parseFileElement", value: function(e3, t3) { return e3.content.url = this._genFileUrl(e3.content.uuid, t3, e3.content.fileName), e3; } }, { key: "_parseVideoElement", value: function(e3, t3) { return e3.content.url = this._genVideoUrl(e3.content.uuid, t3), e3; } }, { key: "_genAudioUrl", value: function(e3, t3) { if ("" === this._authKey) return ""; var n3 = this.getModule(xn).getSDKAppID(); return "https://".concat(this._bdh_download_server, "/asn.com/stddownload_common_file?authkey=").concat(this._authKey, "&bid=").concat(this._BDHBizID, "&subbid=").concat(n3, "&fileid=").concat(e3, "&filetype=").concat(this.FILETYPE.SOUND, "&openid=").concat(t3, "&ver=0"); } }, { key: "_genFileUrl", value: function(e3, t3, n3) { if ("" === this._authKey) return ""; n3 || (n3 = "".concat(Math.floor(1e5 * Math.random()), "-").concat(Date.now())); var o2 = this.getModule(xn).getSDKAppID(); return "https://".concat(this._bdh_download_server, "/asn.com/stddownload_common_file?authkey=").concat(this._authKey, "&bid=").concat(this._BDHBizID, "&subbid=").concat(o2, "&fileid=").concat(e3, "&filetype=").concat(this.FILETYPE.FILE, "&openid=").concat(t3, "&ver=0&filename=").concat(encodeURIComponent(n3)); } }, { key: "_genVideoUrl", value: function(e3, t3) { if ("" === this._authKey) return ""; var n3 = this.getModule(xn).getSDKAppID(); return "https://".concat(this._bdh_download_server, "/asn.com/stddownload_common_file?authkey=").concat(this._authKey, "&bid=").concat(this._BDHBizID, "&subbid=").concat(n3, "&fileid=").concat(e3, "&filetype=").concat(this.FILETYPE.VIDEO, "&openid=").concat(t3, "&ver=0"); } }, { key: "reset", value: function() { this._authKey = "", this.expireTime = 0; } }]), n2; }(uo), pr = ["requestSnapshotUrl"], gr = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; o(this, s2), (t2 = n2.call(this, e3))._n = "UploadModule", t2.TIMUploadPlugin = null, t2.timUploadPlugin = null, t2.COSSDK = null, t2._cosUploadMethod = null, t2.expiredTimeLimit = 600, t2.appid = 0, t2.bucketName = "", t2.ciUrl = "", t2.directory = "", t2.downloadUrl = "", t2.uploadUrl = "", t2.region = "ap-shanghai", t2.cos = null, t2.cosOptions = { secretId: "", secretKey: "", sessionToken: "", expiredTime: 0 }, t2.uploadFileType = "", t2.duration = 900, t2.tryCount = 0, t2.UPLOAD_SIZE_LIMIT = { AUDIO: 20971520, FILE: 104857600, IMAGE: 20971520, VIDEO: 104857600 }; var a2 = t2.getInnerEmitterInstance(); return a2.on(ei, t2._init, h(t2)), a2.on(ti, t2._onCloudConfigUpdated, h(t2)), t2; } return a(s2, [{ key: "_init", value: function() { var e3 = this.getModule(Yn); if (this.TIMUploadPlugin = e3.getPlugin("tim-upload-plugin"), this.TIMUploadPlugin) this._initUploaderMethod(); else { var t2 = ae ? "cos-wx-sdk" : "cos-js-sdk"; this.COSSDK = e3.getPlugin(t2), this.COSSDK ? (this._getAuthorizationKey(), this.outputWarning("CosReplacement", t2)) : this.outputWarning("PluginUndetected"); } } }, { key: "_onCloudConfigUpdated", value: function() { var e3 = "".concat(this._n, "._onCloudConfigUpdated"), t2 = this.getCloudConfig("upload_size_limit"); if (Ve.l("".concat(e3, " uploadSizeLimit:").concat(t2)), !it(t2)) try { var n3 = JSON.parse(t2); this.UPLOAD_SIZE_LIMIT = { AUDIO: n3.a ? 1048576 * parseInt(n3.a) : this.UPLOAD_SIZE_LIMIT.AUDIO, FILE: n3.f ? 1048576 * parseInt(n3.f) : this.UPLOAD_SIZE_LIMIT.FILE, IMAGE: n3.i ? 1048576 * parseInt(n3.i) : this.UPLOAD_SIZE_LIMIT.IMAGE, VIDEO: n3.v ? 1048576 * parseInt(n3.v) : this.UPLOAD_SIZE_LIMIT.VIDEO }; } catch (o2) { Ve.e("".concat(e3, " JSON parse error. uploadSizeLimit:"), t2); } } }, { key: "_getAuthorizationKey", value: function() { var e3 = this, t2 = "".concat(this._n, ".").concat("_getAuthorizationKey"), n3 = new Aa("_getAuthorizationKey"), o2 = Math.ceil(Date.now() / 1e3); this.request({ protocolName: qs, requestData: { duration: this.expiredTimeLimit } }).then(function(s3) { var a2 = s3.data; Ve.l("".concat(t2, " ok. data:"), a2); var i2 = a2.expiredTime - o2; n3.setMessage("requestId:".concat(a2.requestId, " requestTime:").concat(o2, " expiredTime:").concat(a2.expiredTime, " diff:").concat(i2, "s")).setNetworkType(e3.getNetworkType()).end(), !ae && a2.region && (e3.region = a2.region), e3.appid = a2.appid, e3.bucketName = a2.bucketName, e3.ciUrl = a2.ciUrl, e3.directory = a2.directory, e3.downloadUrl = a2.downloadUrl, e3.uploadUrl = a2.uploadUrl, e3.cosOptions = { secretId: a2.secretId, secretKey: a2.secretKey, sessionToken: a2.sessionToken, expiredTime: a2.expiredTime }, Ve.l("".concat(t2, " ok. region:").concat(e3.region, " bucketName:").concat(e3.bucketName)), e3._initUploaderMethod(); }).catch(function(o3) { e3.probeNetwork().then(function(e4) { var t3 = v(e4, 2), s3 = t3[0], a2 = t3[1]; n3.setError(o3, s3, a2).end(); }), Ve.w("".concat(t2, " failed. error:"), o3); }); } }, { key: "_getCosPreSigUrl", value: function(e3) { var t2 = this, n3 = "".concat(this._n, ".").concat("_getCosPreSigUrl"), o2 = Math.ceil(Date.now() / 1e3), s3 = new Aa("_getCosPreSigUrl"); return this.request({ protocolName: xs, requestData: { fileType: e3.fileType, fileName: e3.fileName, uploadMethod: e3.uploadMethod, duration: e3.duration } }).then(function(e4) { t2.tryCount = 0; var a2 = e4.data || {}, i2 = a2.expiredTime - o2; return Ve.l("".concat(n3, " ok. data:"), a2), s3.setMessage("requestId:".concat(a2.requestId, " expiredTime:").concat(a2.expiredTime, " diff:").concat(i2, "s")).setNetworkType(t2.getNetworkType()).end(), a2; }).catch(function(o3) { return -1 === o3.code && (o3.code = ha.COS_GET_SIG_FAIL), t2.probeNetwork().then(function(e4) { var t3 = v(e4, 2), n4 = t3[0], a2 = t3[1]; s3.setError(o3, n4, a2).end(); }), Ve.w("".concat(n3, " failed. error:"), o3), t2.tryCount < 1 ? (t2.tryCount++, t2._getCosPreSigUrl(e3)) : (t2.tryCount = 0, Za({ code: ha.COS_GET_SIG_FAIL })); }); } }, { key: "_initUploaderMethod", value: function() { var e3 = this; if (this.TIMUploadPlugin) return this.timUploadPlugin = new this.TIMUploadPlugin(), void (this._cosUploadMethod = function(t2, n3) { e3.timUploadPlugin.uploadFile(t2, n3); }); this.appid && (this.cos = ae ? new this.COSSDK({ ForcePathStyle: true, getAuthorization: this._getAuthorization.bind(this) }) : new this.COSSDK({ getAuthorization: this._getAuthorization.bind(this) }), this._cosUploadMethod = ae ? function(t2, n3) { e3.cos.postObject(t2, n3); } : function(t2, n3) { e3.cos.uploadFiles(t2, n3); }); } }, { key: "onCheckTimer", value: function(e3) { this.COSSDK && (this.TIMUploadPlugin || this.isLoggedIn() && e3 % 60 == 0 && Math.ceil(Date.now() / 1e3) >= this.cosOptions.expiredTime - 120 && this._getAuthorizationKey()); } }, { key: "_getAuthorization", value: function(e3, t2) { t2({ TmpSecretId: this.cosOptions.secretId, TmpSecretKey: this.cosOptions.secretKey, XCosSecurityToken: this.cosOptions.sessionToken, ExpiredTime: this.cosOptions.expiredTime }); } }, { key: "upload", value: function(e3) { if (true === e3.getRelayFlag()) return Promise.resolve(); var t2 = this.getModule(eo); switch (e3.type) { case E.MSG_IMAGE: return t2.addTotalCount(Ia), this._uploadImage(e3); case E.MSG_FILE: return t2.addTotalCount(Ia), this._uploadFile(e3); case E.MSG_AUDIO: return t2.addTotalCount(Ia), this._uploadAudio(e3); case E.MSG_VIDEO: return t2.addTotalCount(Ia), this._uploadVideo(e3); default: return Promise.resolve(); } } }, { key: "_uploadImage", value: function(e3) { var n3 = this, o2 = this.getModule(Nn), s3 = e3.getElements()[0], a2 = o2.getMessageOption(e3.clientSequence); return this.doUploadImage({ file: a2.payload.file, to: a2.to, onProgress: function(e4) { if (s3.updatePercent(e4), ut(a2.onProgress)) try { a2.onProgress(e4); } catch (t2) { return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR }); } } }).then(function(o3) { var a3, i2, r2 = o3.location, u2 = o3.fileType, c2 = o3.fileSize, l2 = o3.width, d2 = o3.height, p2 = o3.smallImageUrl, g2 = o3.smallImageWidth, h2 = o3.smallImageHeight, _2 = o3.largeImageUrl, f2 = o3.largeImageWidth, v2 = o3.largeImageHeight, m2 = n3.isPrivateNetWork() ? r2 : yt(r2); return s3.updateImageFormat(u2), p2 && _2 ? (a3 = { url: p2, width: g2, height: h2 }, i2 = { url: _2, width: f2, height: v2 }) : (a3 = Ut({ originUrl: m2, originWidth: l2, originHeight: d2, min: 198 }), i2 = Ut({ originUrl: m2, originWidth: l2, originHeight: d2, min: 720 })), s3.updateImageInfoArray([{ size: c2, url: m2, width: l2, height: d2 }, t({}, i2), t({}, a3)]), e3; }); } }, { key: "_uploadFile", value: function(e3) { var t2 = this, n3 = this.getModule(Nn), o2 = e3.getElements()[0], s3 = n3.getMessageOption(e3.clientSequence); return this.doUploadFile({ file: s3.payload.file, to: s3.to, onProgress: function(e4) { if (o2.updatePercent(e4), ut(s3.onProgress)) try { s3.onProgress(e4); } catch (t3) { return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR }); } } }).then(function(n4) { var s4 = n4.location, a2 = t2.isPrivateNetWork() ? s4 : yt(s4); return o2.updateFileUrl(a2), e3; }); } }, { key: "_uploadAudio", value: function(e3) { var t2 = this, n3 = this.getModule(Nn), o2 = e3.getElements()[0], s3 = n3.getMessageOption(e3.clientSequence); return this.doUploadAudio({ file: s3.payload.file, to: s3.to, onProgress: function(e4) { if (o2.updatePercent(e4), ut(s3.onProgress)) try { s3.onProgress(e4); } catch (t3) { return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR }); } } }).then(function(n4) { var s4 = n4.location, a2 = t2.isPrivateNetWork() ? s4 : yt(s4); return o2.updateAudioUrl(a2), e3; }); } }, { key: "_uploadVideo", value: function(e3) { var t2 = this, n3 = this.getModule(Nn), o2 = e3.getElements()[0], s3 = n3.getMessageOption(e3.clientSequence); return this.doUploadVideo({ file: s3.payload.file, to: s3.to, onProgress: function(e4) { if (o2.updatePercent(e4), ut(s3.onProgress)) try { s3.onProgress(e4); } catch (t3) { return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR }); } } }).then(function(n4) { var s4 = n4.location, a2 = n4.snapshotInfo, i2 = t2.isPrivateNetWork() ? s4 : yt(s4); return o2.updateVideoUrl(i2), zt(a2) || o2.updateSnapshotInfo(a2), e3; }); } }, { key: "_checkSizeError", value: function(e3) { return Za({ code: ha["MESSAGE_".concat(e3, "_SIZE_LIMIT")], message: this.getErrorMessage("UploadSizeLimit", e3.toLowerCase(), "".concat(this.UPLOAD_SIZE_LIMIT[e3] / 1048576, " MB")) }); } }, { key: "doUploadImage", value: function(e3) { var t2 = this; if (!e3.file) return Za({ code: ha.MESSAGE_IMAGE_SELECT_FILE_FIRST }); var n3 = this._checkImageType(e3.file); if (true !== n3) return n3; var o2 = this._checkImageSize(e3.file); if (true !== o2) return o2; var s3 = null; return this._setUploadFileType(ii), this.uploadByCOS(e3).then(function(e4) { return s3 = e4, t2.isPrivateNetWork() ? Rt(e4.location) : Rt("https://".concat(e4.location)); }).then(function(e4) { return s3.width = e4.width, s3.height = e4.height, Promise.resolve(s3); }); } }, { key: "_checkImageType", value: function(e3) { var t2 = ""; return t2 = ae ? e3.url.slice(e3.url.lastIndexOf(".") + 1) : e3.files[0].name.slice(e3.files[0].name.lastIndexOf(".") + 1), si.indexOf(t2.toLowerCase()) >= 0 || Za({ code: ha.MESSAGE_IMAGE_TYPES_LIMIT }); } }, { key: "_checkImageSize", value: function(e3) { var t2 = 0; return 0 === (t2 = ae ? e3.size : e3.files[0].size) ? Za({ code: ha.MESSAGE_FILE_IS_EMPTY }) : t2 < this.UPLOAD_SIZE_LIMIT.IMAGE || this._checkSizeError("IMAGE"); } }, { key: "doUploadFile", value: function(e3) { return e3.file ? e3.file.files[0].size > this.UPLOAD_SIZE_LIMIT.FILE ? this._checkSizeError("FILE") : 0 === e3.file.files[0].size ? Za({ code: ha.MESSAGE_FILE_IS_EMPTY }) : (this._setUploadFileType(ci), this.uploadByCOS(e3)) : Za({ code: ha.MESSAGE_FILE_SELECT_FILE_FIRST }); } }, { key: "doUploadVideo", value: function(e3) { return e3.file.videoFile.size > this.UPLOAD_SIZE_LIMIT.VIDEO ? this._checkSizeError("VIDEO") : 0 === e3.file.videoFile.size ? Za({ code: ha.MESSAGE_FILE_IS_EMPTY }) : -1 === ai.indexOf(e3.file.videoFile.type) ? Za({ code: ha.MESSAGE_VIDEO_TYPES_LIMIT }) : (this._setUploadFileType(ri), ae ? this.handleVideoUpload({ file: e3.file.videoFile, onProgress: e3.onProgress }) : ie ? this.handleVideoUpload(e3) : void 0); } }, { key: "handleVideoUpload", value: function(e3) { var t2 = this; return new Promise(function(n3, o2) { t2.uploadByCOS(e3).then(function(e4) { n3(e4); }).catch(function() { t2.uploadByCOS(e3).then(function(e4) { n3(e4); }).catch(function() { o2(new ja({ code: ha.MESSAGE_VIDEO_UPLOAD_FAIL })); }); }); }); } }, { key: "doUploadAudio", value: function(e3) { return e3.file ? e3.file.size > this.UPLOAD_SIZE_LIMIT.AUDIO ? this._checkSizeError("AUDIO") : 0 === e3.file.size ? Za({ code: ha.MESSAGE_FILE_IS_EMPTY }) : (this._setUploadFileType(ui), this.uploadByCOS(e3)) : Za({ code: ha.MESSAGE_AUDIO_UPLOAD_FAIL }); } }, { key: "uploadByCOS", value: function(e3) { var t2 = this; if (!ut(this._cosUploadMethod)) return this.outputWarning("PluginUndetected"), Za({ code: ha.COS_UNDETECTED }); if (this.timUploadPlugin) return this._uploadWithPreSigUrl(e3); var n3 = new Aa("upload"), o2 = "".concat(this._n, ".uploadByCOS"), s3 = Date.now(), a2 = this._getFile(e3); return new Promise(function(i2, r2) { var u2 = ae ? t2._createCosOptionsWXMiniApp(e3) : t2._createCosOptionsWeb(e3), c2 = t2; t2._cosUploadMethod(u2, function(e4, u3) { var l2 = /* @__PURE__ */ Object.create(null); if (u3) { if (e4 || at(u3.files) && u3.files[0].error) { var d2 = new ja({ code: ha.MESSAGE_FILE_UPLOAD_FAIL }); return n3.setError(d2, true, t2.getNetworkType()).end(), Ve.l("".concat(o2, " failed. error:"), u3.files[0].error), 403 === u3.files[0].error.statusCode && (Ve.w("".concat(o2, " failed. cos AccessKeyId was invalid, regain auth key!")), t2._getAuthorizationKey()), void r2(d2); } l2.fileName = a2.name, l2.fileSize = a2.size, l2.fileType = a2.type.slice(a2.type.indexOf("/") + 1).toLowerCase(), l2.location = ae ? u3.Location : u3.files[0].data.Location; var p2 = Date.now() - s3, g2 = c2._formatFileSize(a2.size), h2 = c2._formatSpeed(1e3 * a2.size / p2), _2 = "size:".concat(g2, " time:").concat(p2, "ms speed:").concat(h2); Ve.l("".concat(o2, " success. name:").concat(a2.name, " ").concat(_2)), i2(l2); var f2 = t2.getModule(eo); return f2.addCost(Ia, p2), f2.addFileSize(Ia, a2.size), void n3.setNetworkType(t2.getNetworkType()).setMessage(_2).end(); } var v2 = new ja({ code: ha.MESSAGE_FILE_UPLOAD_FAIL }); n3.setError(v2, true, c2.getNetworkType()).end(), Ve.w("".concat(o2, " failed. error:"), e4), 403 === e4.statusCode && (Ve.w("".concat(o2, " failed. cos AccessKeyId was invalid, regain auth key!")), t2._getAuthorizationKey()), r2(v2); }); }); } }, { key: "_uploadWithPreSigUrl", value: function(e3) { var t2 = this, n3 = "".concat(this._n, "._uploadWithPreSigUrl"), o2 = this._getFile(e3); return this._createCosOptionsPreSigUrl(e3).then(function(e4) { return new Promise(function(s3, a2) { var i2 = new Aa("upload"), r2 = e4.requestSnapshotUrl, u2 = void 0 === r2 ? void 0 : r2, c2 = g(e4, pr), l2 = Date.now(); t2._cosUploadMethod(c2, function(e5, r3) { if (e5 || 403 === r3.statusCode) return i2.setError(new ja(e5), true, t2.getNetworkType()).end(), Ve.l("".concat(n3, " failed, error:"), e5), void a2(new ja({ code: ha.MESSAGE_FILE_UPLOAD_FAIL })); var d2 = /* @__PURE__ */ Object.create(null), p2 = r3.data.location || ""; t2.isPrivateNetWork() || 0 !== p2.indexOf("https://") && 0 !== p2.indexOf("http://") || (p2 = p2.split("//")[1]), d2.fileName = o2.name, d2.fileSize = o2.size, d2.fileType = o2.type.slice(o2.type.indexOf("/") + 1).toLowerCase(), d2.location = p2; var g2 = Date.now() - l2, h2 = t2._formatFileSize(o2.size), _2 = t2._formatSpeed(1e3 * o2.size / g2), f2 = "size:".concat(h2, ",time:").concat(g2, "ms,speed:").concat(_2, " res:").concat(JSON.stringify(r3.data)); Ve.l("".concat(n3, " success name:").concat(o2.name, ",").concat(f2)), i2.setNetworkType(t2.getNetworkType()).setMessage(f2).end(); var v2 = t2.getModule(eo); v2.addCost(Ia, g2), v2.addFileSize(Ia, o2.size); var m2 = []; if (c2.thumbUrl && c2.largeUrl && (m2 = [t2._getSmallImageInfoByUrl(c2.thumbUrl, d2), t2._getLargeImageInfoByUrl(c2.largeUrl, d2)]), u2 && m2.push(t2._getSnapshotInfoByUrl(u2, d2)), m2.length > 0) return Promise.all(m2).then(function() { s3(d2); }); s3(d2); }); }); }); } }, { key: "_getRawOrUploadProxyUrl", value: function(e3) { var t2 = this.getModule(xn).getFileUploadProxy(), n3 = e3; return t2 && (n3 = e3.replace(/^https:\/\/[^/]+/, t2)), n3; } }, { key: "_getFile", value: function(e3) { var t2; return at(e3.file.files) || (t2 = e3.file.files, "filelist" === lt(t2)) ? e3.file.files[0] : e3.file; } }, { key: "_formatFileSize", value: function(e3) { return e3 < 1024 ? e3 + "B" : e3 < 1048576 ? Math.floor(e3 / 1024) + "KB" : Math.floor(e3 / 1048576) + "MB"; } }, { key: "_formatSpeed", value: function(e3) { return e3 <= 1048576 ? wt(e3 / 1024, 1) + "KB/s" : wt(e3 / 1048576, 1) + "MB/s"; } }, { key: "_createCosOptionsWeb", value: function(e3) { var t2 = this._getFile(e3), n3 = t2.name, o2 = n3.slice(n3.lastIndexOf(".")), s3 = this._genFileName("".concat(_t(999999)).concat(o2)); return { files: [{ Bucket: "".concat(this.bucketName, "-").concat(this.appid), Region: this.region, Key: "".concat(this.directory, "/").concat(s3), Body: t2 }], SliceSize: 1048576, onProgress: function(t3) { if ("function" == typeof e3.onProgress) try { e3.onProgress(t3.percent); } catch (n4) { Ve.w("onProgress callback error:", n4); } }, onFileFinish: function(e4, t3, n4) { } }; } }, { key: "_createCosOptionsWXMiniApp", value: function(e3) { var t2 = this._getFile(e3), n3 = this._genFileName(t2.name), o2 = t2.url; return { Bucket: "".concat(this.bucketName, "-").concat(this.appid), Region: this.region, Key: "".concat(this.directory, "/").concat(n3), FilePath: o2, onProgress: function(t3) { if (Ve.l(JSON.stringify(t3)), "function" == typeof e3.onProgress) try { e3.onProgress(t3.percent); } catch (n4) { Ve.w("onProgress callback error:", n4); } } }; } }, { key: "_createCosOptionsPreSigUrl", value: function(e3) { var t2 = this, n3 = "", o2 = "", s3 = 0, a2 = this._getFile(e3); if (ae) n3 = this._genFileName(a2.name), o2 = a2.url, s3 = 1; else { var i2 = a2.name, r2 = i2.slice(i2.lastIndexOf(".")); n3 = this._genFileName("".concat(_t(999999)).concat(r2)), o2 = a2, s3 = 0; } return this._getCosPreSigUrl({ fileType: this.uploadFileType, fileName: n3, uploadMethod: s3, duration: this.duration }).then(function(s4) { var a3 = s4.uploadUrl, i3 = s4.downloadUrl, r3 = s4.requestSnapshotUrl, u2 = void 0 === r3 ? void 0 : r3, c2 = s4.thumbUrl, l2 = s4.largeUrl; return { url: t2._getRawOrUploadProxyUrl(a3), fileType: t2.uploadFileType, fileName: n3, resources: o2, downloadUrl: i3, requestSnapshotUrl: u2, thumbUrl: c2, largeUrl: l2, onProgress: function(t3) { if ("function" == typeof e3.onProgress) try { e3.onProgress(t3.percent); } catch (n4) { Ve.w("onProgress callback error:", n4), Ve.e(n4); } } }; }); } }, { key: "_genFileName", value: function(e3) { return "".concat(Nt(), "-").concat(e3); } }, { key: "_setUploadFileType", value: function(e3) { this.uploadFileType = e3; } }, { key: "_getSnapshotInfoByUrl", value: function(e3, t2) { var n3 = this, o2 = new Aa("getSnapshotInfo"); return this.request({ protocolName: Vs, requestData: { platform: this.getPlatform(), coverName: this._genFileName(_t(99999)), requestSnapshotUrl: e3 } }).then(function(e4) { var n4 = (e4.data || {}).snapshotUrl; return o2.setMessage("snapshotUrl:".concat(n4)).end(), zt(n4) ? {} : Rt(n4).then(function(e5) { t2.snapshotInfo = { snapshotUrl: n4, snapshotWidth: e5.width, snapshotHeight: e5.height }; }); }).catch(function(e4) { return Ve.w("".concat(n3._n, "._getSnapshotInfoByUrl failed. error:"), e4), o2.setCode(e4.errorCode).setMessage(e4.errorInfo).end(), {}; }); } }, { key: "_getSmallImageInfoByUrl", value: function(e3, t2) { return Rt(e3).then(function(n3) { t2.smallImageUrl = e3, t2.smallImageWidth = n3.width, t2.smallImageHeight = n3.height; }); } }, { key: "_getLargeImageInfoByUrl", value: function(e3, t2) { return Rt(e3).then(function(n3) { t2.largeImageUrl = e3, t2.largeImageWidth = n3.width, t2.largeImageHeight = n3.height; }); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")); } }]), s2; }(uo), hr = ["downloadKey", "pbDownloadKey", "messageList"], _r = function() { function e2(t2) { o(this, e2), this._n = "MergerMessageHandler", this._messageModule = t2; } return a(e2, [{ key: "uploadMergerMessage", value: function(e3, t2) { var n2 = this, o2 = "".concat(this._n, ".").concat("uploadMergerMessage"); Ve.d("".concat(o2, " message:"), e3, "messageBytes:".concat(t2)); var s2 = e3.payload.messageList, a2 = s2.length, i2 = new Aa("uploadMergerMessage"); return this._messageModule.request({ protocolName: zs, requestData: { messageList: s2 } }).then(function(e4) { Ve.d("".concat(o2, " ok. response:"), e4.data); var s3 = e4.data, r2 = s3.pbDownloadKey, u2 = s3.downloadKey, c2 = { pbDownloadKey: r2, downloadKey: u2, messageNumber: a2 }; return i2.setNetworkType(n2._messageModule.getNetworkType()).setMessage("".concat(a2, "-").concat(t2, "-").concat(u2)).end(), c2; }).catch(function(e4) { throw Ve.w("".concat(o2, " failed. error:"), e4), n2._messageModule.probeNetwork().then(function(t3) { var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1]; i2.setError(e4, o3, s3).end(); }), e4; }); } }, { key: "downloadMergerMessage", value: function(e3) { var n2 = this, o2 = "".concat(this._n, ".").concat("downloadMergerMessage"); Ve.d("".concat(o2, " message:"), e3); var s2 = e3.payload.downloadKey, a2 = this._messageModule.getFileDownloadProxy(), i2 = new Aa("downloadMergerMessage"); return i2.setMessage("downloadKey:".concat(s2)), this._messageModule.request({ protocolName: Js, requestData: { downloadKey: s2 } }).then(function(s3) { if (Ve.d("".concat(o2, " ok. response:"), s3.data), ut(e3.clearElement)) { var r2 = e3.payload; r2.downloadKey, r2.pbDownloadKey, r2.messageList; var u2 = g(r2, hr); e3.clearElement(), e3.setElement({ type: e3.type, content: t({ messageList: s3.data.messageList }, u2) }, a2); } else { var c2 = []; s3.data.messageList.forEach(function(e4) { if (!zt(e4)) { var t2 = new Ba(e4, a2); c2.push(t2); } }), e3.payload.messageList = c2, e3.payload.downloadKey = "", e3.payload.pbDownloadKey = ""; } return i2.setNetworkType(n2._messageModule.getNetworkType()).end(), e3; }).catch(function(e4) { throw Ve.w("".concat(o2, " failed. key:").concat(s2, " error:"), e4), n2._messageModule.probeNetwork().then(function(t2) { var n3 = v(t2, 2), o3 = n3[0], s3 = n3[1]; i2.setError(e4, o3, s3).end(); }), e4; }); } }, { key: "createMergerMessagePack", value: function(e3, t2, n2) { return e3.conversationType === E.CONV_C2C ? this._createC2CMergerMessagePack(e3, t2, n2) : this._createGroupMergerMessagePack(e3, t2, n2); } }, { key: "_createC2CMergerMessagePack", value: function(e3, t2, n2) { var o2 = null; t2 && (t2.offlinePushInfo && (o2 = t2.offlinePushInfo), true === t2.onlineUserOnly && (o2 ? o2.disablePush = true : o2 = { disablePush: true })); var s2 = []; if (st(t2) && st(t2.messageControlInfo)) { var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration; true === i2 && s2.push("NoUnread"), true === r2 && s2.push("NoLastMsg"), true === u2 && s2.push("NoMsgCheck"); } var c2 = ""; nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (c2 = e3.cloudCustomData); var l2 = n2.pbDownloadKey, d2 = n2.downloadKey, p2 = n2.messageNumber, g2 = e3.payload, h2 = g2.title, _2 = g2.abstractList, f2 = g2.compatibleText, v2 = this._messageModule.getModule(Un), m2 = v2 && v2.isOnlineMessage(e3, t2) ? 0 : void 0; return { protocolName: fo, tjgID: this._messageModule.generateTjgID(e3), requestData: { fromAccount: this._messageModule.getMyUserID(), toAccount: e3.to, msgBody: [{ msgType: e3.type, msgContent: { pbDownloadKey: l2, downloadKey: d2, title: h2, abstractList: _2, compatibleText: f2, messageNumber: p2 } }], cloudCustomData: c2, clientTime: e3.clientTime, msgSeq: e3.sequence, msgRandom: e3.random, msgLifeTime: m2, offlinePushInfo: o2 ? { pushFlag: true === o2.disablePush ? 1 : 0, title: o2.title || "", desc: o2.description || "", ext: o2.extension || "", apnsInfo: { badgeMode: true === o2.ignoreIOSBadge ? 1 : 0 }, androidInfo: { OPPOChannelID: o2.androidOPPOChannelID || "" } } : void 0, messageControlInfo: 0 !== m2 ? s2 : void 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0 } }; } }, { key: "_createGroupMergerMessagePack", value: function(e3, t2, n2) { var o2 = null; t2 && t2.offlinePushInfo && (o2 = t2.offlinePushInfo); var s2 = []; if (st(t2) && st(t2.messageControlInfo)) { var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration; true === i2 && s2.push("NoUnread"), true === r2 && s2.push("NoLastMsg"), true === u2 && s2.push("NoMsgCheck"); } var c2 = ""; nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (c2 = e3.cloudCustomData); var l2 = n2.pbDownloadKey, d2 = n2.downloadKey, p2 = n2.messageNumber, g2 = e3.payload, h2 = g2.title, _2 = g2.abstractList, f2 = g2.compatibleText, v2 = this._messageModule.getModule(Pn), m2 = v2 && v2.isOnlineMessage(e3, t2) ? 1 : 0; return { protocolName: vo, tjgID: this._messageModule.generateTjgID(e3), requestData: { fromAccount: this._messageModule.getMyUserID(), groupID: e3.to, msgBody: [{ msgType: e3.type, msgContent: { pbDownloadKey: l2, downloadKey: d2, title: h2, abstractList: _2, compatibleText: f2, messageNumber: p2 } }], random: e3.random, priority: e3.priority, clientSequence: e3.clientSequence, groupAtInfo: void 0, cloudCustomData: c2, onlineOnlyFlag: m2, offlinePushInfo: o2 ? { pushFlag: true === o2.disablePush ? 1 : 0, title: o2.title || "", desc: o2.description || "", ext: o2.extension || "", apnsInfo: { badgeMode: true === o2.ignoreIOSBadge ? 1 : 0 }, androidInfo: { OPPOChannelID: o2.androidOPPOChannelID || "" } } : void 0, clientTime: e3.clientTime, needReadReceipt: true !== e3.needReadReceipt || v2.isMessageFromOrToAVChatroom(e3.to) ? 0 : 1, messageControlInfo: 0 === m2 ? s2 : void 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0 } }; } }]), e2; }(), fr = { ERR_SVR_COMM_SENSITIVE_TEXT: 80001, ERR_SVR_COMM_BODY_SIZE_LIMIT: 80002, OPEN_SERVICE_OVERLOAD_ERROR: 60022, ERR_SVR_MSG_PKG_PARSE_FAILED: 20001, ERR_SVR_MSG_INTERNAL_AUTH_FAILED: 20002, ERR_SVR_MSG_INVALID_ID: 20003, ERR_SVR_MSG_PUSH_DENY: 20006, ERR_SVR_MSG_IN_PEER_BLACKLIST: 20007, ERR_SVR_MSG_BOTH_NOT_FRIEND: 20009, ERR_SVR_MSG_NOT_PEER_FRIEND: 20010, ERR_SVR_MSG_NOT_SELF_FRIEND: 20011, ERR_SVR_MSG_SHUTUP_DENY: 20012, ERR_SVR_GROUP_INVALID_PARAMETERS: 10004, ERR_SVR_GROUP_PERMISSION_DENY: 10007, ERR_SVR_GROUP_NOT_FOUND: 10010, ERR_SVR_GROUP_INVALID_GROUPID: 10015, ERR_SVR_GROUP_REJECT_FROM_THIRDPARTY: 10016, ERR_SVR_GROUP_SHUTUP_DENY: 10017, MESSAGE_SEND_FAIL: 2100, OVER_FREQUENCY_LIMIT: 2996 }, vr = [ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR, ha.MESSAGE_IMAGE_SELECT_FILE_FIRST, ha.MESSAGE_IMAGE_TYPES_LIMIT, ha.MESSAGE_FILE_IS_EMPTY, ha.MESSAGE_IMAGE_SIZE_LIMIT, ha.MESSAGE_FILE_SELECT_FILE_FIRST, ha.MESSAGE_FILE_SIZE_LIMIT, ha.MESSAGE_VIDEO_SIZE_LIMIT, ha.MESSAGE_VIDEO_TYPES_LIMIT, ha.MESSAGE_AUDIO_UPLOAD_FAIL, ha.MESSAGE_AUDIO_SIZE_LIMIT, ha.COS_UNDETECTED]; function mr(e2) { var t2 = false; return Object.values(fr).includes(e2) && (t2 = true), (e2 >= 120001 && e2 <= 13e4 || e2 >= 10100 && e2 <= 10200) && (t2 = true), t2; } var Mr = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; return o(this, s2), (t2 = n2.call(this, e3))._n = "MessageModule", t2._messageOptionsMap = /* @__PURE__ */ new Map(), t2._mergerMessageHandler = new _r(h(t2)), t2; } return a(s2, [{ key: "createTextMessage", value: function(e3) { var t2 = this.getMyUserID(); e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID(); var n3 = new Wa(e3), o2 = "string" == typeof e3.payload ? e3.payload : e3.payload.text, s3 = new Ra({ text: o2 }), a2 = this._getNickAndAvatarByUserID(t2); return n3.setElement(s3), n3.setNickAndAvatar(a2), n3.setNameCard(this._getNameCardByGroupID(n3)), n3; } }, { key: "createImageMessage", value: function(e3) { var t2 = this.getMyUserID(); e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID(); var n3 = new Wa(e3); if (ae) { var o2 = e3.payload.file; if ($e(o2)) return void this.outputWarning("FileUnsupportedInMP", "createImageMessage"); var s3 = o2.tempFiles[0].path || o2.tempFiles[0].tempFilePath, a2 = { url: s3, name: s3.slice(s3.lastIndexOf("/") + 1), size: o2.tempFiles && o2.tempFiles[0].size || 1, type: s3.slice(s3.lastIndexOf(".") + 1).toLowerCase() }; e3.payload.file = a2; } else if (ie) { if ($e(e3.payload.file)) { var i2 = e3.payload.file; e3.payload.file = { files: [i2] }; } else if (st(e3.payload.file) && "undefined" != typeof uni) { var r2 = e3.payload.file.tempFiles[0]; e3.payload.file = { files: [r2] }; } } var u2 = new Na({ imageFormat: Be.UNKNOWN, uuid: this._generateUUID(e3.payload.file), file: e3.payload.file }), c2 = this._getNickAndAvatarByUserID(t2); return n3.setElement(u2), n3.setNickAndAvatar(c2), n3.setNameCard(this._getNameCardByGroupID(n3)), this._messageOptionsMap.set(n3.clientSequence, e3), n3; } }, { key: "createAudioMessage", value: function(e3) { var t2 = e3.payload.file; if (ae) { var n3 = { url: t2.tempFilePath, name: t2.tempFilePath.slice(t2.tempFilePath.lastIndexOf("/") + 1), size: t2.fileSize, second: parseInt(t2.duration) / 1e3, type: t2.tempFilePath.slice(t2.tempFilePath.lastIndexOf(".") + 1).toLowerCase() }; e3.payload.file = n3; } var o2 = this.getMyUserID(); e3.currentUser = o2, e3.senderTinyID = this.getMyTinyID(); var s3 = new Wa(e3), a2 = new Ga({ second: Math.floor(t2.duration / 1e3), size: t2.fileSize || t2.size, url: t2.tempFilePath, uuid: this._generateUUID(e3.payload.file) }), i2 = this._getNickAndAvatarByUserID(o2); return s3.setElement(a2), s3.setNickAndAvatar(i2), s3.setNameCard(this._getNameCardByGroupID(s3)), this._messageOptionsMap.set(s3.clientSequence, e3), s3; } }, { key: "createVideoMessage", value: function(e3) { var t2 = this.getMyUserID(); e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID(), e3.payload.file.thumbUrl = "", e3.payload.file.thumbSize = 0; var n3 = {}; if (ae) { if (te) return void this.outputWarning("VideoUnsupportedInAlipay"); if ($e(e3.payload.file)) return void this.outputWarning("FileUnsupportedInMP", "createVideoMessage"); var o2 = e3.payload.file; at(o2.tempFiles) && (o2 = o2.tempFiles[0]), n3.url = o2.tempFilePath, n3.name = o2.tempFilePath.slice(o2.tempFilePath.lastIndexOf("/") + 1), n3.size = o2.size || 1, n3.second = o2.duration || 0, n3.type = o2.tempFilePath.slice(o2.tempFilePath.lastIndexOf(".") + 1).toLowerCase(); } else if (ie) { if ($e(e3.payload.file)) { var s3 = e3.payload.file; e3.payload.file.files = [s3]; } else if (st(e3.payload.file) && "undefined" != typeof uni) { var a2 = e3.payload.file.tempFile; e3.payload.file.files = [a2]; } var i2 = e3.payload.file; n3.url = window.URL.createObjectURL(i2.files[0]), n3.name = i2.files[0].name, n3.size = i2.files[0].size || 1, n3.second = i2.files[0].duration || 0, n3.type = i2.files[0].type.split("/")[1]; } e3.payload.file.videoFile = n3; var r2 = new Wa(e3), u2 = new xa({ videoFormat: n3.type, videoSecond: wt(n3.second, 0), videoSize: n3.size, remoteVideoUrl: "", videoUrl: n3.url, videoUUID: this._generateUUID(e3.payload.file.videoFile), thumbUUID: this._generateUUID(e3.payload.file.videoFile), thumbWidth: e3.payload.file.width || 200, thumbHeight: e3.payload.file.height || 200, thumbUrl: e3.payload.file.thumbUrl, thumbSize: e3.payload.file.thumbSize, thumbFormat: e3.payload.file.thumbUrl.slice(e3.payload.file.thumbUrl.lastIndexOf(".") + 1).toLowerCase() }), c2 = this._getNickAndAvatarByUserID(t2); return r2.setElement(u2), r2.setNickAndAvatar(c2), r2.setNameCard(this._getNameCardByGroupID(r2)), this._messageOptionsMap.set(r2.clientSequence, e3), r2; } }, { key: "createCustomMessage", value: function(e3) { var t2 = this.getMyUserID(); e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID(); var n3 = new Wa(e3), o2 = new qa({ data: e3.payload.data, description: e3.payload.description, extension: e3.payload.extension }), s3 = this._getNickAndAvatarByUserID(t2); return n3.setElement(o2), n3.setNickAndAvatar(s3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3; } }, { key: "createFaceMessage", value: function(e3) { var t2 = this.getMyUserID(); e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID(); var n3 = new Wa(e3), o2 = new Oa(e3.payload), s3 = this._getNickAndAvatarByUserID(t2); return n3.setElement(o2), n3.setNickAndAvatar(s3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3; } }, { key: "createMergerMessage", value: function(e3) { var t2 = this.getMyUserID(); e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID(); var n3 = this._getNickAndAvatarByUserID(t2), o2 = new Wa(e3), s3 = new Ha(e3.payload); return o2.setElement(s3), o2.setNickAndAvatar(n3), o2.setNameCard(this._getNameCardByGroupID(o2)), o2.setRelayFlag(true), o2; } }, { key: "createForwardMessage", value: function(e3) { var t2 = e3.to, n3 = e3.conversationType, o2 = e3.priority, s3 = e3.payload, a2 = e3.needReadReceipt, i2 = e3.receiverList, r2 = this.getMyUserID(), u2 = this._getNickAndAvatarByUserID(r2); if (s3.type === E.MSG_GRP_TIP) return Za({ code: ha.MESSAGE_FORWARD_TYPE_INVALID }); var c2 = { to: t2, conversationType: n3, conversationID: "".concat(n3).concat(t2), priority: o2, isPlaceMessage: 0, status: Qt.UNSEND, currentUser: r2, senderTinyID: this.getMyTinyID(), cloudCustomData: e3.cloudCustomData || s3.cloudCustomData || "", needReadReceipt: a2, receiverList: i2, isSupportExtension: e3.isSupportExtension || false }, l2 = new Wa(c2); return l2.setElement(s3.getElements()[0]), l2.setNickAndAvatar(u2), l2.setNameCard(this._getNameCardByGroupID(s3)), l2.setRelayFlag(true), l2; } }, { key: "downloadMergerMessage", value: function(e3) { return this._mergerMessageHandler.downloadMergerMessage(e3); } }, { key: "createFileMessage", value: function(e3) { if (ae) { if (!X && !Q && !oe) return; var n3 = re.getSystemInfoSync().SDKVersion; if (X && Gt(n3, "2.5.0") < 0) return void this.outputWarning("WXChooseMessageFile"); if (Q && Gt(n3, "1.18.0") < 0) return void this.outputWarning("QQChooseMessageFile"); } if (ie || oe) { if ($e(e3.payload.file)) { var o2 = e3.payload.file; e3.payload.file = { files: [o2] }; } else if (st(e3.payload.file) && "undefined" != typeof uni) { var s3 = e3.payload.file, a2 = s3.tempFiles, i2 = s3.files, r2 = null; at(a2) ? r2 = a2[0] : at(i2) && (r2 = i2[0]), e3.payload.file = { files: [r2] }; } } else if (X || Q) { var u2 = e3.payload.file.tempFiles, c2 = t(t({}, u2[0]), {}, { url: u2[0].path }); e3.payload.file = { files: [c2] }; } var l2 = this.getMyUserID(); e3.currentUser = l2, e3.senderTinyID = this.getMyTinyID(); var d2 = new Wa(e3), p2 = new Fa({ uuid: this._generateUUID(e3.payload.file), file: e3.payload.file }), g2 = this._getNickAndAvatarByUserID(l2); return d2.setElement(p2), d2.setNickAndAvatar(g2), d2.setNameCard(this._getNameCardByGroupID(d2)), this._messageOptionsMap.set(d2.clientSequence, e3), d2; } }, { key: "createLocationMessage", value: function(e3) { var t2 = this.getMyUserID(); e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID(); var n3 = new Wa(e3), o2 = new Va(e3.payload), s3 = this._getNickAndAvatarByUserID(t2); return n3.setElement(o2), n3.setNickAndAvatar(s3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3; } }, { key: "_onCannotFindModule", value: function() { return Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "sendMessageInstance", value: function(e3, t2) { var n3 = this; if (false === this.getModule(oo).filterMessage(e3, t2)) return this._onSendMessageFailed(e3, new ja({ code: ha.PROFANITY_FOUND })); var o2, s3 = null; switch (e3.conversationType) { case E.CONV_C2C: if (!(s3 = this.getModule(Un))) return this._onCannotFindModule(); break; case E.CONV_GROUP: if (!(s3 = this.getModule(Pn))) return this._onCannotFindModule(); if (Dt({ groupID: e3.to })) { var a2 = s3.getLocalGroupProfile(e3.to); if (a2 && a2.isSupportTopic) return Za({ code: ha.MESSAGE_SEND_GROUP_WITH_TOPIC_FAIL }); } break; default: return Za({ code: ha.MESSAGE_SEND_INVALID_CONVERSATION_TYPE }); } var i2 = this.getModule(Wn), r2 = this.getModule(Pn); return i2.upload(e3).then(function() { n3._getSendMessageSpecifiedKey(e3) === ya && n3.getModule(eo).addSuccessCount(Ia); return r2.guardForAVChatRoom(e3).then(function() { if (!e3.isSendable()) return Za({ code: ha.MESSAGE_FILE_URL_IS_EMPTY }); n3._addSendMessageTotalCount(e3), o2 = Date.now(); var a3 = function(e4) { var t3 = "utf-8"; ie && document && (t3 = document.charset.toLowerCase()); var n4, o3, s4 = 0; if (o3 = e4.length, "utf-8" === t3 || "utf8" === t3) for (var a4 = 0; a4 < o3; a4++) (n4 = e4.codePointAt(a4)) <= 127 ? s4 += 1 : n4 <= 2047 ? s4 += 2 : n4 <= 65535 ? s4 += 3 : (s4 += 4, a4++); else if ("utf-16" === t3 || "utf16" === t3) for (var i3 = 0; i3 < o3; i3++) (n4 = e4.codePointAt(i3)) <= 65535 ? s4 += 2 : (s4 += 4, i3++); else s4 = e4.replace(/[^\x00-\xff]/g, "aa").length; return s4; }(JSON.stringify(e3)); return e3.type === E.MSG_MERGER && a3 > 11264 ? n3._mergerMessageHandler.uploadMergerMessage(e3, a3).then(function(o3) { var s4 = n3._mergerMessageHandler.createMergerMessagePack(e3, t2, o3); return n3.request(s4); }) : (n3.getModule(qn).setMessageRandom(e3), e3.conversationType === E.CONV_C2C || e3.conversationType === E.CONV_GROUP ? s3.sendMessage(e3, t2) : void 0); }).then(function(a3) { var i3 = a3.data, r3 = i3.time, u2 = i3.sequence, c2 = i3.readReceiptCode; et(c2) && 0 !== c2 && (new Aa("sendMessageWithReceipt").setMessage("from:".concat(e3.from, " to:").concat(e3.to, " sequence:").concat(u2, " readReceiptCode:").concat(c2)).end(), Ve.w("".concat(n3._n, ".sendMessageInstance readReceiptCode:").concat(c2, " message:").concat(n3.getErrorMessage(c2)))); n3._addSendMessageSuccessCount(e3, o2), n3._messageOptionsMap.delete(e3.clientSequence); var l2 = n3.getModule(qn); e3.status = Qt.SUCCESS, e3.time = r3; var d2 = false; if (e3.conversationType === E.CONV_GROUP) e3.sequence = u2; else if (e3.conversationType === E.CONV_C2C) { var p2 = l2.getLatestMessageSentByMe(e3.conversationID); if (p2) { var g2 = p2.nick, h2 = p2.avatar; g2 === e3.nick && h2 === e3.avatar || (d2 = true); } } if (d2 && l2.modifyMessageSentByMe({ conversationID: e3.conversationID, latestNick: e3.nick, latestAvatar: e3.avatar }), s3.isOnlineMessage(e3, t2)) e3._onlineOnlyFlag = true; else { l2.appendToMessageList(e3); var _2 = e3; st(t2) && st(t2.messageControlInfo) && (true === t2.messageControlInfo.excludedFromLastMessage && (e3._isExcludedFromLastMessage = true, _2 = ""), true === t2.messageControlInfo.excludedFromUnreadCount && (e3._isExcludedFromUnreadCount = true)); var f2 = e3.conversationType; if (kt(e3.to)) f2 = E.CONV_TOPIC, n3.getModule(Fn).onMessageSent({ groupID: xt(e3.to), topicID: e3.to, lastMessage: _2 }); l2.onMessageSent({ conversationOptionsList: [{ conversationID: e3.conversationID, unreadCount: 0, type: f2, subType: e3.conversationSubType, lastMessage: _2 }] }); } return e3.getRelayFlag() || "TIMImageElem" !== e3.type || Pt(e3.payload.imageInfoArray), Ya({ message: e3 }); }); }).catch(function(t3) { return n3._onSendMessageFailed(e3, t3); }); } }, { key: "_onSendMessageFailed", value: function(e3, t2) { e3.status = Qt.FAIL, this.getModule(qn).deleteMessageRandom(e3), this._addSendMessageFailCountOnUser(e3, t2); var n3 = new Aa("sendMessage"); return n3.setMessage("tjg_id:".concat(this.generateTjgID(e3), " type:").concat(e3.type, " from:").concat(e3.from, " to:").concat(e3.to)), this.probeNetwork().then(function(e4) { var o2 = v(e4, 2), s3 = o2[0], a2 = o2[1]; n3.setError(t2, s3, a2).end(); }), Ve.e("".concat(this._n, "._onSendMessageFailed error:"), t2), Za(new ja({ code: t2 && t2.code ? t2.code : ha.MESSAGE_SEND_FAIL, message: t2 && t2.message ? t2.message : void 0, data: { message: e3 } })); } }, { key: "_getSendMessageSpecifiedKey", value: function(e3) { if ([E.MSG_IMAGE, E.MSG_AUDIO, E.MSG_VIDEO, E.MSG_FILE].includes(e3.type)) return ya; if (e3.conversationType === E.CONV_C2C) return va; if (e3.conversationType === E.CONV_GROUP) { var t2 = this.getModule(Pn).getLocalGroupProfile(e3.to); if (!t2) return; var n3 = t2.type; return Tt(n3) ? Ma : ma; } } }, { key: "_addSendMessageTotalCount", value: function(e3) { var t2 = this._getSendMessageSpecifiedKey(e3); t2 && this.getModule(eo).addTotalCount(t2); } }, { key: "_addSendMessageSuccessCount", value: function(e3, t2) { var n3 = Math.abs(Date.now() - t2), o2 = this._getSendMessageSpecifiedKey(e3); if (o2) { var s3 = this.getModule(eo); s3.addSuccessCount(o2), s3.addCost(o2, n3); } } }, { key: "_addSendMessageFailCountOnUser", value: function(e3, t2) { var n3, o2, s3 = t2.code, a2 = void 0 === s3 ? -1 : s3, i2 = this.getModule(eo), r2 = this._getSendMessageSpecifiedKey(e3); r2 === ya && (n3 = a2, o2 = false, vr.includes(n3) && (o2 = true), o2) ? i2.addFailedCountOfUserSide(Ia) : mr(a2) && r2 && i2.addFailedCountOfUserSide(r2); } }, { key: "resendMessage", value: function(e3) { return e3.isResend = true, e3.status = Qt.UNSEND, this.sendMessageInstance(e3); } }, { key: "revokeMessage", value: function(e3) { var t2 = this, n3 = null; if (e3.conversationType === E.CONV_C2C ? n3 = this.getModule(Un) : e3.conversationType === E.CONV_GROUP && (n3 = this.getModule(Pn)), !n3) return this._onCannotFindModule(); var o2 = new Aa("revokeMessage"); o2.setMessage("tjg_id:".concat(this.generateTjgID(e3), " type:").concat(e3.type, " from:").concat(e3.from, " to:").concat(e3.to)); var s3 = "".concat(this._n, ".").concat("revokeMessage"); return n3.revokeMessage(e3).then(function(n4) { var a2 = n4.data.recallRetList; if (!zt(a2) && 0 !== a2[0].retCode) { var i2 = new ja({ code: a2[0].retCode, data: { message: e3 } }); return o2.setCode(i2.code).setMoreMessage(i2.message).end(), Za(i2); } return Ve.i("".concat(s3, " ok. ID:").concat(e3.ID)), e3.isRevoked = true, o2.end(), t2.getModule(qn).onMessageRevoked([e3]), Ya({ message: e3 }); }).catch(function(n4) { t2.probeNetwork().then(function(e4) { var t3 = v(e4, 2), s4 = t3[0], a3 = t3[1]; o2.setError(n4, s4, a3).end(); }); var a2 = new ja({ code: n4 && n4.code ? n4.code : ha.MESSAGE_REVOKE_FAIL, message: n4 && n4.message ? n4.message : void 0, data: { message: e3 } }); return Ve.w("".concat(s3, " failed. error:"), n4), Za(a2); }); } }, { key: "deleteMessage", value: function(e3) { var t2 = this, n3 = null, o2 = e3[0], s3 = o2.conversationID, a2 = "", i2 = [], r2 = []; if (o2.conversationType === E.CONV_C2C) n3 = this.getModule(Un), a2 = s3.replace(E.CONV_C2C, ""), e3.forEach(function(e4) { e4 && e4.status === Qt.SUCCESS && e4.conversationID === s3 && (e4._onlineOnlyFlag || i2.push("".concat(e4.sequence, "_").concat(e4.random, "_").concat(e4.time)), r2.push(e4)); }); else if (o2.conversationType === E.CONV_GROUP) n3 = this.getModule(Pn), a2 = s3.replace(E.CONV_GROUP, ""), e3.forEach(function(e4) { e4 && e4.status === Qt.SUCCESS && e4.conversationID === s3 && (e4._onlineOnlyFlag || i2.push("".concat(e4.sequence)), r2.push(e4)); }); else if (o2.conversationType === E.CONV_SYSTEM) return Za({ code: ha.CANNOT_DELETE_GROUP_SYSTEM_NOTICE }); if (!n3) return this._onCannotFindModule(); if (0 === i2.length) return this._onMessageDeleted(r2); i2.length > 30 && (i2 = i2.slice(0, 30), r2 = r2.slice(0, 30)); var u2 = new Aa("deleteMessage"); u2.setMessage("to:".concat(a2, " count:").concat(i2.length)); var c2 = "".concat(this._n, ".").concat("deleteMessage"); return n3.deleteMessage({ to: a2, keyList: i2 }).then(function(e4) { return u2.end(), Ve.i("".concat(c2, " ok")), t2._onMessageDeleted(r2); }).catch(function(e4) { t2.probeNetwork().then(function(t3) { var n5 = v(t3, 2), o3 = n5[0], s4 = n5[1]; u2.setError(e4, o3, s4).end(); }), Ve.w("".concat(c2, " failed. error:"), e4); var n4 = new ja({ code: e4 && e4.code ? e4.code : ha.MESSAGE_DELETE_FAIL, message: e4 && e4.message ? e4.message : void 0 }); return Za(n4); }); } }, { key: "_onMessageDeleted", value: function(e3) { return this.getModule(qn).onMessageDeleted(e3), Xa({ messageList: e3 }); } }, { key: "translateText", value: function(e3) { var n3 = "".concat(this._n, ".").concat("translateText"), o2 = e3.sourceTextList, s3 = e3.sourceLanguage, a2 = e3.targetLanguage, i2 = new Aa("translateText"); return i2.setMessage("sourceLanguage:".concat(s3, " targetLanguage:").concat(a2)), this.request({ protocolName: ga, requestData: { sourceTextList: o2, source: s3 || "auto", target: a2, from: this.getMyTinyID(), SDKAppID: this.getSDKAppID() } }).then(function(e4) { var o3 = e4.data, s4 = o3.error, a3 = o3.requestID, r2 = o3.translatedTextList; if (0 === s4.code) return i2.end(), Ve.i("".concat(n3, " ok. requestID:").concat(a3)), Ya({ translatedTextList: r2 }); throw t(t({}, s4), {}, { requestID: a3 }); }).catch(function(e4) { return i2.setCode(e4.code).setMoreMessage(e4.requestID).end(), Ve.w("".concat(n3, " failed. error:"), e4), Za({ code: ha.TRANSLATE_TEXT_FAIL }); }); } }, { key: "modifyRemoteMessage", value: function(e3) { var t2 = this, n3 = null, o2 = e3.conversationType, s3 = e3.to; if (this.getModule(Pn).isMessageFromOrToAVChatroom(s3)) return Za({ code: ha.MESSAGE_MODIFY_DISABLED_IN_AVCHATROOM, data: { message: e3 } }); if (false === this.getModule(oo).filterMessage(e3)) return Za({ code: ha.PROFANITY_FOUND, data: { message: e3 } }); o2 === E.CONV_C2C ? n3 = this.getModule(Un) : o2 === E.CONV_GROUP && (n3 = this.getModule(Pn)); var a2 = new Aa("modifyMessage"); a2.setMessage("to:".concat(s3)); var i2 = "".concat(this._n, ".modifyRemoteMessage"); return n3.modifyRemoteMessage(e3).then(function(n4) { a2.end(), Ve.i("".concat(i2, " ok")); var o3 = t2._onModifyRemoteMessageResp(e3, n4.data); return Ya({ message: o3 }); }).catch(function(n4) { if (a2.setCode(n4.code).setMoreMessage(n4.message).end(), Ve.w("".concat(i2, " failed. error:"), n4), 20027 === n4.code) { var o3 = t2._onModifyRemoteMessageResp(e3, n4.data); return Za({ code: ha.MESSAGE_MODIFY_CONFLICT, data: { message: o3 } }); } return Za({ code: n4.code, message: n4.message, data: { message: e3 } }); }); } }, { key: "_onModifyRemoteMessageResp", value: function(e3, t2) { Ve.d("".concat(this._n, "._onModifyRemoteMessageResp options:"), t2); var n3 = e3.conversationType, o2 = e3.from, s3 = e3.to, a2 = e3.random, i2 = e3.sequence, r2 = e3.time, u2 = t2.elements, c2 = t2.messageVersion, l2 = t2.cloudCustomData, d2 = void 0 === l2 ? "" : l2; return this.getModule(qn).onMessageModified({ conversationType: n3, from: o2, to: s3, time: r2, random: a2, sequence: i2, elements: u2, cloudCustomData: d2, messageVersion: c2 }); } }, { key: "_generateUUID", value: function(e3) { var t2 = this.getModule(xn), n3 = "".concat(t2.getSDKAppID(), "-").concat(t2.getUserID(), "-").concat(function() { for (var e4 = "", t3 = 32; t3 > 0; --t3) e4 += ft[Math.floor(Math.random() * vt)]; return e4; }()), o2 = e3.name || e3.value || e3.url || e3.tempFilePath, s3 = o2 && o2.slice(o2.lastIndexOf(".") + 1); return s3 && (n3 = "".concat(n3, ".").concat(s3)), n3; } }, { key: "getMessageOption", value: function(e3) { return this._messageOptionsMap.get(e3); } }, { key: "_getNickAndAvatarByUserID", value: function(e3) { return this.getModule(Gn).getNickAndAvatarByUserID(e3); } }, { key: "_getNameCardByGroupID", value: function(e3) { if (e3.conversationType === E.CONV_GROUP) { var t2 = this.getModule(Pn); if (t2) return t2.getMyNameCardByGroupID(e3.to); } return ""; } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._messageOptionsMap.clear(); } }]), s2; }(uo), yr = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "MessageExtensionModule", s2.messageExtensionMap = /* @__PURE__ */ new Map(), s2.globalSeqMap = /* @__PURE__ */ new Map(), s2.getMessageExtensionsMap = /* @__PURE__ */ new Map(), s2; } return a(n2, [{ key: "onMessageExtensionNotify", value: function(e3) { var t3 = this, n3 = e3.dataList, o2 = n3.messageInfo, s2 = n3.operateType, a2 = n3.operateResultList, i2 = n3.tinyID, r2 = n3.globalSequence, u2 = o2.clientTime, c2 = o2.random, l2 = "".concat(i2, "-").concat(u2, "-").concat(c2), d2 = [], p2 = []; Ve.l("".concat(this._n, ".onMessageExtensionNotify messageID:").concat(l2, " operateType:").concat(s2, " globalSequence:").concat(r2)), this._updateGlobalSequence(l2, r2); var g2 = false, h2 = false; a2.forEach(function(e4) { var n4 = e4.extensions, o3 = void 0 === n4 ? [] : n4, a3 = e4.clearSequence; if (1 === s2) g2 = true, o3.forEach(function(e5) { d2.push({ key: e5.key, value: e5.value }); }), t3._updateLocalExtension(l2, o3); else if (2 === s2) h2 = true, o3.forEach(function(e5) { p2.push(e5.key); }), t3._updateLocalExtension(l2, o3); else if (3 === s2) { if (h2 = true, t3._hasLocalExtension(l2)) t3._getLocalExtension(l2).forEach(function(e5, t4) { e5.seq <= a3 && !zt(e5.value) && p2.push(t4); }); t3._clearLocalExtension(l2, a3); } }), g2 && this.emitOuterEvent(k.MESSAGE_EXTENSIONS_UPDATED, { messageID: l2, extensions: d2 }), h2 && this.emitOuterEvent(k.MESSAGE_EXTENSIONS_DELETED, { messageID: l2, keyList: p2 }); } }, { key: "setMessageExtensions", value: function(e3, t3) { var n3 = this; if (!this.canIUse(B.MSG_EXT)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var o2 = "".concat(this._n, ".").concat("setMessageExtensions"), s2 = e3.ID, a2 = e3.conversationID, i2 = e3.sequence, r2 = e3.time, u2 = m(t3); t3.length > 20 && (u2 = t3.slice(0, 20), Ve.w("".concat(o2, ". the length of extensions cannot exceed 20."))); var c2 = "conversationID:".concat(a2, " messageID:").concat(s2, " sequence:").concat(i2, " time:").concat(r2, " count:").concat(u2.length), l2 = new Aa("setMessageExtensions"); return l2.setMessage(c2), Ve.l("".concat(o2, " ").concat(c2)), this._modifyMessageExtensions(e3, u2).then(function(e4) { var t4 = e4.resultList, n4 = e4.successCount, s3 = e4.failureCount, a3 = "success count:".concat(n4, " fail count:").concat(s3); return l2.setMoreMessage(a3).end(), Ve.l("".concat(o2, " ok. ").concat(a3)), Ya({ extensions: t4 }); }).catch(function(e4) { return n3.probeNetwork().then(function(t4) { var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1]; l2.setError(e4, o3, s3).end(); }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4); }); } }, { key: "getMessageExtensions", value: function(e3) { var t3 = this; if (!this.canIUse(B.MSG_EXT)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var n3 = "".concat(this._n, ".").concat("getMessageExtensions"), o2 = e3.ID, s2 = e3.conversationID, a2 = e3.sequence, i2 = e3.time, r2 = "conversationID:".concat(s2, " messageID:").concat(o2, " sequence:").concat(a2, " time:").concat(i2), u2 = new Aa("getMessageExtensions"); u2.setMessage(r2), Ve.l("".concat(n3, " ").concat(r2)); var c2 = void 0; return this.getMessageExtensionsMap.has(o2) && (c2 = this._getGlobalSequence(o2)), this._getMessageExtensions(e3, c2).then(function(e4) { return u2.end(), Ve.l("".concat(n3, " ok. total count:").concat(e4.length)), it(c2) && e4.length > 0 && t3.getMessageExtensionsMap.set(o2, 1), Ya({ extensions: e4 }); }).catch(function(e4) { return t3.probeNetwork().then(function(t4) { var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1]; u2.setError(e4, o3, s3).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "deleteMessageExtensions", value: function(e3, t3) { var n3 = this; if (!this.canIUse(B.MSG_EXT)) return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY }); var o2 = "".concat(this._n, ".").concat("deleteMessageExtensions"), s2 = [], a2 = 3; zt(t3) || (a2 = 2, t3.forEach(function(e4) { s2.push({ key: e4, value: "", seq: 0 }); })); var i2 = e3.ID, r2 = e3.conversationID, u2 = e3.sequence, c2 = e3.time, l2 = "conversationID:".concat(r2, " messageID:").concat(i2, " sequence:").concat(u2, " time:").concat(c2, " operateType:").concat(a2), d2 = new Aa("deleteMessageExtensions"); return d2.setMessage(l2), Ve.l("".concat(o2, " ").concat(l2)), this._modifyMessageExtensions(e3, s2, a2).then(function(e4) { var t4 = e4.resultList, n4 = e4.successCount, s3 = e4.failureCount, i3 = ""; return 2 === a2 && (i3 = "success count:".concat(n4, " fail count:").concat(s3)), d2.setMoreMessage("".concat(i3)).end(), Ve.l("".concat(o2, " ok. ").concat(i3)), Ya({ extensions: t4 }); }).catch(function(e4) { return n3.probeNetwork().then(function(t4) { var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1]; d2.setError(e4, o3, s3).end(); }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4); }); } }, { key: "_modifyMessageExtensions", value: function(e3, t3) { var n3 = this, o2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1, s2 = kt(e3.to) ? E.CONV_TOPIC : e3.conversationType, a2 = void 0; 3 !== o2 && (a2 = this._getRequestExtensions(e3, t3)); var i2 = null; switch (s2) { case E.CONV_C2C: i2 = this.getModule(Un); break; case E.CONV_GROUP: i2 = this.getModule(Pn); break; case E.CONV_TOPIC: i2 = this.getModule(Fn); break; default: return Za({ code: ha.CANNOT_FIND_MODULE }); } return i2.modifyMessageExtensions(e3, a2, o2).then(function(t4) { var o3 = t4.data, s3 = o3.extensions, a3 = o3.seq, i3 = [], r2 = 0, u2 = 0, c2 = []; return (s3 = zt(s3) ? [] : s3).forEach(function(e4) { var t5 = e4.errorCode, n4 = e4.extension, o4 = n4.key, s4 = n4.value, a4 = n4.seq; i3.push({ code: t5, key: o4, value: s4 }), 0 === t5 ? r2++ : u2++, c2.push({ key: o4, value: s4, seq: a4 }); }), n3._updateGlobalSequence(e3.ID, a3), c2.length > 0 && (n3._updateLocalExtension(e3.ID, c2), c2 = null), { resultList: i3, successCount: r2, failureCount: u2 }; }).catch(function(e4) { return Za(e4); }); } }, { key: "_getRequestExtensions", value: function(e3, t3) { var n3 = []; if (this._hasLocalExtension(e3.ID)) { var o2 = this._getLocalExtension(e3.ID); return t3.forEach(function(e4) { var t4 = e4.key, s2 = e4.value, a2 = 0; o2.has(t4) && (a2 = o2.get(t4).seq), n3.push({ key: t4, value: s2, seq: a2 }); }), n3; } return t3.forEach(function(e4) { var t4 = e4.key, o3 = e4.value; n3.push({ key: t4, value: o3, seq: 0 }); }), n3; } }, { key: "_getMessageExtensions", value: function(e3, t3) { var n3 = this, o2 = "".concat(this._n, "._getMessageExtensions"), s2 = e3.ID, a2 = e3.to, i2 = null; switch (kt(a2) ? E.CONV_TOPIC : e3.conversationType) { case E.CONV_C2C: i2 = this.getModule(Un); break; case E.CONV_GROUP: i2 = this.getModule(Pn); break; case E.CONV_TOPIC: i2 = this.getModule(Fn); break; default: return Za({ code: ha.CANNOT_FIND_MODULE }); } return i2.getMessageExtensions(e3, t3).then(function(t4) { var a3 = t4.data, i3 = a3.extensions, r2 = a3.completeFlag, u2 = a3.globalSequence, c2 = a3.clearSequence; if (i3 = zt(i3) ? [] : i3, Ve.l("".concat(o2, " ok. completeFlag:").concat(r2, " globalSequence:").concat(u2, " clearSequence:").concat(c2, " count:").concat(i3.length)), n3._updateLocalExtension(s2, i3), n3._clearLocalExtension(s2, c2), n3._updateGlobalSequence(s2, u2), 1 !== r2) { var l2 = i3.slice(-1)[0].seq + 1; return n3._getMessageExtensions(e3, l2); } return n3._getLocalExtensions(s2); }).catch(function(e4) { return Za(e4); }); } }, { key: "_hasLocalExtension", value: function(e3) { return this.messageExtensionMap.has(e3); } }, { key: "_getLocalExtension", value: function(e3) { return this.messageExtensionMap.get(e3); } }, { key: "_updateLocalExtension", value: function(e3, t3) { this._hasLocalExtension(e3) || this.messageExtensionMap.set(e3, /* @__PURE__ */ new Map()); var n3 = this._getLocalExtension(e3); t3.forEach(function(e4) { var t4 = e4.key, o2 = e4.value, s2 = void 0 === o2 ? "" : o2, a2 = e4.seq; n3.set(t4, { value: s2, seq: a2 }); }); } }, { key: "_clearLocalExtension", value: function(e3, t3) { if (!(t3 <= 0) && this._hasLocalExtension(e3)) { var n3 = this._getLocalExtension(e3); n3.forEach(function(e4, o2) { e4.seq <= t3 && n3.delete(o2); }); } } }, { key: "_getLocalExtensions", value: function(e3) { var t3 = []; this._hasLocalExtension(e3) && this._getLocalExtension(e3).forEach(function(e4, n3) { var o2 = e4.value; zt(o2) || t3.push({ key: n3, value: o2 }); }); return t3; } }, { key: "_getGlobalSequence", value: function(e3) { return this.globalSeqMap.get(e3); } }, { key: "_updateGlobalSequence", value: function(e3, t3) { this.globalSeqMap.set(e3, t3); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this.messageExtensionMap.clear(), this.globalSeqMap.clear(), this.getMessageExtensionsMap.clear(); } }]), n2; }(uo), Ir = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "ComboMessageModule", s2; } return a(n2, [{ key: "sendMessage", value: function(e3) { var t3 = this, n3 = this._constructMessageInstance(e3); if (null === n3) return Za({ code: ha.MESSAGE_SEND_FAIL }); this._addSendMessageTotalCount(n3); var o2 = Date.now(); return this.getModule(qn).setMessageRandom(n3), this._sendComboMessage(n3, e3).then(function(e4) { var s2 = e4.data, a2 = s2.time, i2 = s2.sequence, r2 = s2.readReceiptCode; et(r2) && 0 !== r2 && (new Aa("sendMessageWithReceipt").setMessage("from:".concat(n3.from, " to:").concat(n3.to, " sequence:").concat(i2, " readReceiptCode:").concat(r2)).end(), Ve.w("".concat(t3._n, ".sendMessage readReceiptCode:").concat(r2, " message:").concat(t3.getErrorMessage(r2)))); t3._addSendMessageSuccessCount(n3, o2); var u2 = t3.getModule(qn); n3.status = Qt.SUCCESS, n3.time = a2, n3.conversationType === E.CONV_GROUP && (n3.sequence = i2), u2.appendToMessageList(n3); var c2 = n3; return true === n3._isExcludedFromLastMessage && (c2 = ""), u2.onMessageSent({ conversationOptionsList: [{ conversationID: n3.conversationID, unreadCount: 0, type: n3.conversationType, subType: n3.conversationSubType, lastMessage: c2 }] }), Ya({ message: n3 }); }).catch(function(e4) { return t3._onSendMessageFailed(n3, e4); }); } }, { key: "_sendComboMessage", value: function(e3, t3) { var n3 = this._m.getModule(zn), o2 = ""; return e3.conversationType === E.CONV_C2C && (o2 = "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SEND_MESSAGE)), e3.conversationType === E.CONV_GROUP && (o2 = "".concat(V.NAME.GROUP, ".").concat(V.CMD.SEND_GROUP_MESSAGE)), n3.sendComboMessage({ servcmd: o2, data: t3 }); } }, { key: "_constructMessageInstance", value: function(e3) { var t3 = "".concat(this._n, "._constructMessageInstance"), n3 = null; try { var o2 = this.getMyUserID(), s2 = {}; if (s2.senderTinyID = this.getMyTinyID(), s2.currentUser = o2, s2.from = e3.From_Account || o2, e3.GroupId ? (s2.conversationID = "".concat(E.CONV_GROUP).concat(e3.GroupId), s2.conversationType = E.CONV_GROUP, s2.to = e3.GroupId) : e3.To_Account && (s2.conversationID = "".concat(E.CONV_C2C).concat(e3.To_Account), s2.conversationType = E.CONV_C2C, s2.to = e3.To_Account), s2.time = e3.MsgTimeStamp || 0, s2.random = e3.Random || e3.MsgRandom || 0, s2.priority = e3.MsgPriority, nt(e3.CloudCustomData) && e3.CloudCustomData.length > 0 && (s2.cloudCustomData = e3.CloudCustomData), at(e3.SendMsgControl) && (s2.messageControlInfo = {}, e3.SendMsgControl.includes("NoUnread") && (s2.messageControlInfo.excludedFromUnreadCount = 1), e3.SendMsgControl.includes("NoLastMsg") && (s2.messageControlInfo.excludedFromLastMessage = 1)), s2.conversationType === E.CONV_GROUP && at(e3.To_Account) && e3.To_Account.length > 0) { var a2 = e3.To_Account; e3.To_Account.length > 50 && (a2 = e3.To_Account.slice(0, 50), Ve.w("".concat(t3, " To_Account must be less than or equal to 50."))), s2.receiverList = m(a2), e3.To_Account = m(a2); } 1 !== e3.IsNeedReadReceipt && 1 !== e3.NeedReadReceipt || (s2.needReadReceipt = true), 1 === e3.SupportMessageExtension && (s2.isSupportExtension = true), (n3 = new Wa(s2)).status = Qt.UNSEND, e3.MsgClientTime = n3.clientTime, n3.conversationType === E.CONV_C2C && (e3.MsgSeq = n3.sequence); for (var i2, r2 = e3.MsgBody.length, u2 = 0; u2 < r2; u2++) "TIMTextElem" === (i2 = e3.MsgBody[u2]).MsgType ? n3.setTextElement(i2.MsgContent.Text) : "TIMCustomElem" === i2.MsgType ? n3.setCustomElement({ data: i2.MsgContent.Data || "", description: i2.MsgContent.Desc || "", extension: i2.MsgContent.Ext || "" }) : "TIMFaceElem" === i2.MsgType && n3.setFaceElement({ index: i2.MsgContent.Index, data: i2.MsgContent.Data }); var c2 = n3.getElements(); n3.payload = c2[0].content, n3.type = c2[0].type; } catch (l2) { n3 = null, Ve.e("".concat(t3, " failed. error:"), l2); } return n3; } }, { key: "_onSendMessageFailed", value: function(e3, t3) { e3.status = Qt.FAIL, this.getModule(qn).deleteMessageRandom(e3), this._addSendMessageFailCountOnUser(e3, t3); var n3 = new Aa("sendMessage"); return n3.setMessage("tjg_id:".concat(this.generateTjgID(e3), " type:").concat(e3.type, " from:").concat(e3.from, " to:").concat(e3.to)), this.probeNetwork().then(function(e4) { var o2 = v(e4, 2), s2 = o2[0], a2 = o2[1]; n3.setError(t3, s2, a2).end(); }), Ve.e("".concat(this._n, "._onSendMessageFailed error:"), t3), Za(new ja({ code: t3 && t3.code ? t3.code : ha.MESSAGE_SEND_FAIL, message: t3 && t3.message ? t3.message : void 0, data: { message: e3 } })); } }, { key: "_getSendMessageSpecifiedKey", value: function(e3) { if (e3.conversationType === E.CONV_C2C) return va; if (e3.conversationType === E.CONV_GROUP) { var t3 = this.getModule(Pn).getLocalGroupProfile(e3.to); if (!t3) return; var n3 = t3.type; return Tt(n3) ? Ma : ma; } } }, { key: "_addSendMessageTotalCount", value: function(e3) { var t3 = this._getSendMessageSpecifiedKey(e3); t3 && this.getModule(eo).addTotalCount(t3); } }, { key: "_addSendMessageSuccessCount", value: function(e3, t3) { var n3 = Math.abs(Date.now() - t3), o2 = this._getSendMessageSpecifiedKey(e3); if (o2) { var s2 = this.getModule(eo); s2.addSuccessCount(o2), s2.addCost(o2, n3); } } }, { key: "_addSendMessageFailCountOnUser", value: function(e3, t3) { var n3 = t3.code, o2 = void 0 === n3 ? -1 : n3, s2 = this.getModule(eo), a2 = this._getSendMessageSpecifiedKey(e3); mr(o2) && a2 && s2.addFailedCountOfUserSide(a2); } }]), n2; }(uo), Cr = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "PluginModule", s2.plugins = {}, s2; } return a(n2, [{ key: "registerPlugin", value: function(e3) { var t3 = this; Object.keys(e3).forEach(function(n3) { t3.plugins[n3] = e3[n3]; }), new Aa("registerPlugin").setMessage("".concat(Object.keys(e3))).end(); } }, { key: "getPlugin", value: function(e3) { return this.plugins[e3]; } }, { key: "reset", value: function() { } }]), n2; }(uo), Tr = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; return o(this, s2), (t2 = n2.call(this, e3))._n = "SyncUnreadMessageModule", t2._cookie = "", t2._onlineSyncFlag = false, t2.getInnerEmitterInstance().on(ei, t2._onLoginSuccess, h(t2)), t2; } return a(s2, [{ key: "_onLoginSuccess", value: function(e3) { this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 0 }); } }, { key: "_startSync", value: function(e3) { var n3 = this, o2 = e3.cookie, s3 = e3.syncFlag, a2 = e3.isOnlineSync, i2 = "".concat(this._n, "._startSync"); Ve.l("".concat(i2, " cookie:").concat(o2, " syncFlag:").concat(s3, " isOnlineSync:").concat(a2)), this.request({ protocolName: ho, requestData: { cookie: o2, syncFlag: s3, isOnlineSync: a2 } }).then(function(e4) { var o3 = e4.data, s4 = o3.cookie, a3 = o3.syncFlag; n3._cookie = s4, zt(s4) || (0 === a3 || 1 === a3 ? (n3._dispatchUnreadMessage(t(t({}, e4.data), {}, { isSyncingEnded: false })), n3._startSync({ cookie: s4, syncFlag: a3, isOnlineSync: 0 })) : 2 === a3 && n3._dispatchUnreadMessage(t(t({}, e4.data), {}, { isSyncingEnded: true }))); }).catch(function(e4) { Ve.e("".concat(i2, " failed. error:"), e4); }); } }, { key: "_dispatchUnreadMessage", value: function(e3) { e3.eventArray && this.getModule(zn).onMessage({ head: {}, body: { eventArray: e3.eventArray, isInstantMessage: this._onlineSyncFlag, isSyncingEnded: e3.isSyncingEnded } }); this.getModule(Un).onNewC2CMessage({ dataList: e3.messageList, isInstantMessage: !!e3.isSyncingEnded && this._onlineSyncFlag, C2CRemainingUnreadList: e3.C2CRemainingUnreadList, C2CPairUnreadList: e3.C2CPairUnreadList }); } }, { key: "startOnlineSync", value: function() { Ve.l("".concat(this._n, ".startOnlineSync")), this._onlineSyncFlag = true, this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 1 }); } }, { key: "startSyncOnReconnected", value: function() { Ve.l("".concat(this._n, ".startSyncOnReconnected.")), this._onlineSyncFlag = true, this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 0 }); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._onlineSyncFlag = false, this._cookie = ""; } }]), s2; }(uo), Dr = { request: { toAccount: "To_Account", fromAccount: "From_Account", to: "To_Account", from: "From_Account", groupID: "GroupId", groupAtUserID: "GroupAt_Account", extension: "Ext", data: "Data", description: "Desc", elements: "MsgBody", sizeType: "Type", downloadFlag: "Download_Flag", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", videoUrl: "", imageUrl: "URL", fileUrl: "Url", uuid: "UUID", priority: "MsgPriority", receiverUserID: "To_Account", receiverGroupID: "GroupId", messageSender: "SenderId", messageReceiver: "ReceiverId", nick: "From_AccountNick", avatar: "From_AccountHeadurl", messageNumber: "MsgNum", pbDownloadKey: "PbMsgKey", downloadKey: "JsonMsgKey", applicationType: "PendencyType", userIDList: "To_Account", groupNameList: "GroupName", userID: "To_Account", groupAttributeList: "GroupAttr", mainSequence: "AttrMainSeq", avChatRoomKey: "BytesKey", attributeControl: "AttrControl", sequence: "seq", messageControlInfo: "SendMsgControl", updateSequence: "UpdateSeq", clientTime: "MsgClientTime", sequenceList: "MsgSeqList", topicID: "TopicId", customData: "CustomString", isSupportTopic: "SupportTopic", isWebUniapp: "is_web_uniapp", isSupportExtension: "SupportMessageExtension", messageSequence: "MsgSeq", messageKey: "MsgKey", startSequence: "startSeq", simplifiedMessage: "DownsizeFlag" }, response: { MsgPriority: "priority", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID", Download_Flag: "downloadFlag", GroupId: "groupID", Member_Account: "userID", MsgList: "messageList", SyncFlag: "syncFlag", To_Account: "to", From_Account: "from", MsgSeq: "sequence", MsgRandom: "random", MsgTime: "time", MsgTimeStamp: "time", MsgContent: "content", MsgBody: "elements", From_AccountNick: "nick", From_AccountHeadurl: "avatar", GroupWithdrawInfoArray: "revokedInfos", GroupReadInfoArray: "groupMessageReadNotice", LastReadMsgSeq: "lastMessageSeq", WithdrawC2cMsgNotify: "c2cMessageRevokedNotify", C2cWithdrawInfoArray: "revokedInfos", C2cReadedReceipt: "c2cMessageReadReceipt", ReadC2cMsgNotify: "c2cMessageReadNotice", LastReadTime: "peerReadTime", MsgRand: "random", MsgType: "type", MsgShow: "messageShow", NextMsgSeq: "nextMessageSeq", FaceUrl: "avatar", ProfileDataMod: "profileModify", Profile_Account: "userID", ValueBytes: "value", ValueNum: "value", NoticeSeq: "noticeSequence", NotifySeq: "notifySequence", MsgFrom_AccountExtraInfo: "messageFromAccountExtraInformation", Operator_Account: "operatorID", OpType: "operationType", ReportType: "operationType", UserId: "userID", User_Account: "userID", List_Account: "userIDList", MsgOperatorMemberExtraInfo: "operatorInfo", MsgMemberExtraInfo: "memberInfoList", ImageUrl: "avatar", NickName: "nick", MsgGroupNewInfo: "newGroupProfile", MsgAppDefinedData: "groupCustomField", Owner_Account: "ownerID", GroupFaceUrl: "avatar", GroupIntroduction: "introduction", GroupNotification: "notification", GroupApplyJoinOption: "joinOption", MsgKey: "messageKey", GroupInfo: "groupProfile", ShutupTime: "muteTime", Desc: "description", Ext: "extension", GroupAt_Account: "groupAtUserID", MsgNum: "messageNumber", PbMsgKey: "pbDownloadKey", JsonMsgKey: "downloadKey", MsgModifiedFlag: "isModified", PendencyItem: "applicationItem", PendencyType: "applicationType", AddTime: "time", AddSource: "source", AddWording: "wording", ProfileImImage: "avatar", PendencyAdd: "friendApplicationAdded", FrienPencydDel_Account: "friendApplicationDeletedUserIDList", Peer_Account: "userID", GroupAttr: "groupAttributeList", GroupAttrAry: "groupAttributeList", AttrMainSeq: "mainSequence", seq: "sequence", GroupAttrOption: "groupAttributeOption", BytesChangedKeys: "changedKeyList", GroupAttrInfo: "groupAttributeList", GroupAttrSeq: "mainSequence", PushChangedAttrValFlag: "isWithChangedAttributeInfo", SubKeySeq: "sequence", Val: "value", MsgGroupFromCardName: "senderNameCard", MsgGroupFromNickName: "senderNick", C2cNick: "peerNick", C2cImage: "peerAvatar", SendMsgControl: "messageControlInfo", NoLastMsg: "excludedFromLastMessage", NoUnread: "excludedFromUnreadCount", UpdateSeq: "updateSequence", MuteNotifications: "muteFlag", MsgClientTime: "clientTime", TinyId: "tinyID", GroupMsgReceiptList: "readReceiptList", ReadNum: "readCount", UnreadNum: "unreadCount", TopicId: "topicID", MillionGroupFlag: "communityType", SupportTopic: "isSupportTopic", MsgTopicNewInfo: "newTopicInfo", ShutupAll: "muteAllMembers", CustomString: "customData", TopicFaceUrl: "avatar", TopicIntroduction: "introduction", TopicNotification: "notification", TopicIdArray: "topicIDList", MsgVersion: "messageVersion", C2cMsgModNotifys: "c2cMessageModified", GroupMsgModNotifys: "groupMessageModified", ApplyJoinOption: "joinOption", MsgFlag: "messageRemindType", AtInfoList: "groupAtInfoList", AtFlagList: "groupAtType", AtMsgSeq: "sequence", BanDuration: "duration", BanDescription: "reason", NotVisible: "invisible", BytesTag: "tag", BytesValue: "value", RptBytesValue: "value", LatestSeq: "globalSequence", ClearSeq: "clearSequence", SupportMessageExtension: "isSupportExtension", ExtensionList: "extensions", GroupCounter: "counterList", Revoker_Account: "revoker", MsgExtensionNotify: "messageExtensionNotify", ExtensionC2cMsgInfo: "messageInfo", ExtensionGroupMsgInfo: "messageInfo", MsgOptType: "operateType", SetKVInfo: "operateResultList", DeleteKVInfo: "operateResultList", ClearKVInfo: "operateResultList", MsgKeyValue: "extensions", ClearMsgSeq: "clearSequence", MsgLastSeq: "globalSequence", InviteJoinOption: "inviteOption", MemberList_Account: "inviteeList", MsgMemberExtraInfoList: "inviteeInfoList", E: "event", GInf: "groupProfile", MCT: "clientTime", MR: "random", MP: "priority", MTS: "time", GId: "groupID", MS: "sequence", CCD: "cloudCustomData", F_Account: "from", F_Hd: "avatar", F_NN: "nick", GN: "groupName", GT: "groupType", IsSys: "isSystemMessage", OpInf: "operatorInfo", Img: "avatar", NN: "nick", OnlineInf: "onlineMemberInfo", ET: "expireTime", Num: "onlineMemberNum", Opt: "operationType", O_Account: "operatorID", RT: "operationType", UDF: "userDefinedField", L_Account: "userIDList" }, ignoreKeyWord: ["C2C", "ID", "USP"] }; function kr(e2, t2) { if ("string" != typeof e2 && !Array.isArray(e2)) throw new TypeError("Expected the input to be `string | string[]`"); t2 = Object.assign({ pascalCase: false }, t2); var n2; return 0 === (e2 = Array.isArray(e2) ? e2.map(function(e3) { return e3.trim(); }).filter(function(e3) { return e3.length; }).join("-") : e2.trim()).length ? "" : 1 === e2.length ? t2.pascalCase ? e2.toUpperCase() : e2.toLowerCase() : (e2 !== e2.toLowerCase() && (e2 = Er(e2)), e2 = e2.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, function(e3, t3) { return t3.toUpperCase(); }).replace(/\d+(\w|$)/g, function(e3) { return e3.toUpperCase(); }), n2 = e2, t2.pascalCase ? n2.charAt(0).toUpperCase() + n2.slice(1) : n2); } var Er = function(e2) { for (var t2 = false, n2 = false, o2 = false, s2 = 0; s2 < e2.length; s2++) { var a2 = e2[s2]; t2 && /[a-zA-Z]/.test(a2) && a2.toUpperCase() === a2 ? (e2 = e2.slice(0, s2) + "-" + e2.slice(s2), t2 = false, o2 = n2, n2 = true, s2++) : n2 && o2 && /[a-zA-Z]/.test(a2) && a2.toLowerCase() === a2 ? (e2 = e2.slice(0, s2 - 1) + "-" + e2.slice(s2 - 1), o2 = n2, n2 = false, t2 = true) : (t2 = a2.toLowerCase() === a2 && a2.toUpperCase() !== a2, o2 = n2, n2 = a2.toUpperCase() === a2 && a2.toLowerCase() !== a2); } return e2; }; function Sr(e2, t2) { var n2 = 0; return function e3(t3, o2) { if (++n2 > 100) return n2--, t3; if (at(t3)) { var s2 = t3.map(function(t4) { return ot(t4) ? e3(t4, o2) : t4; }); return n2--, s2; } if (ot(t3)) { var a2 = (i2 = t3, r2 = function(e4, t4) { if (!dt(t4)) return false; if ((s3 = t4) !== kr(s3)) for (var n3 = 0; n3 < Dr.ignoreKeyWord.length && !t4.includes(Dr.ignoreKeyWord[n3]); n3++) ; var s3; return it(o2[t4]) ? function(e5) { return "OPPOChannelID" === e5 ? e5 : e5[0].toUpperCase() + kr(e5).slice(1); }(t4) : o2[t4]; }, u2 = /* @__PURE__ */ Object.create(null), Object.keys(i2).forEach(function(e4) { var t4 = r2(i2[e4], e4); t4 && (u2[t4] = i2[e4]); }), u2); return a2 = At(a2, function(t4, n3) { return at(t4) || ot(t4) ? e3(t4, o2) : t4; }), n2--, a2; } var i2, r2, u2; }(e2, t2); } function Lr(e2, t2) { if (at(e2)) return e2.map(function(e3) { return ot(e3) ? Lr(e3, t2) : e3; }); if (ot(e2)) { var n2 = (o2 = e2, s2 = function(e3, n3) { return it(t2[n3]) ? kr(n3) : t2[n3]; }, a2 = {}, Object.keys(o2).forEach(function(e3) { a2[s2(o2[e3], e3)] = o2[e3]; }), a2); return n2 = At(n2, function(e3) { return at(e3) || ot(e3) ? Lr(e3, t2) : e3; }); } var o2, s2, a2; } var Ar = String.fromCharCode, Rr = function(e2) { var t2 = 0 | e2.charCodeAt(0); if (55296 <= t2) if (t2 < 56320) { var n2 = 0 | e2.charCodeAt(1); if (56320 <= n2 && n2 <= 57343) { if ((t2 = (t2 << 10) + n2 - 56613888 | 0) > 65535) return Ar(240 | t2 >>> 18, 128 | t2 >>> 12 & 63, 128 | t2 >>> 6 & 63, 128 | 63 & t2); } else t2 = 65533; } else t2 <= 57343 && (t2 = 65533); return t2 <= 2047 ? Ar(192 | t2 >>> 6, 128 | 63 & t2) : Ar(224 | t2 >>> 12, 128 | t2 >>> 6 & 63, 128 | 63 & t2); }, Nr = function(e2) { for (var t2 = void 0 === e2 ? "" : ("" + e2).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, Rr), n2 = 0 | t2.length, o2 = new Uint8Array(n2), s2 = 0; s2 < n2; s2 = s2 + 1 | 0) o2[s2] = 0 | t2.charCodeAt(s2); return o2; }, Or = function() { function e2(t2) { o(this, e2), this._handler = t2; var n2 = t2.getURL(); if (this._socket = null, this._workerSocket = null, this._id = _t(), this._handler.getIsWorkerEnabled()) { var s2 = URL.createObjectURL(new Blob([';let _socket = null;onmessage = function(event) { if (event.data.cmd === "start") { const url = event.data.url; _socket = new WebSocket(url); _socket.binaryType = "arraybuffer"; _socket.onopen = function() { postMessage({ callback: "onOpen", extensions: _socket.extensions }); }; _socket.onclose = function(e) { postMessage({ callback: "onOpen", e: { code: e.code, reason: e.reason } }); }; _socket.onmessage = function(e) { postMessage({ callback: "onMessage", data: e.data }); }; _socket.onerror = function(e) { postMessage({ callback: "onError", e: { isTrusted: "true" } }); }; } else if (event.data.cmd === "sendMessage") { if (_socket !== null) { _socket.send(event.data.data); } } else if (event.data.cmd === "stop") { if (_socket !== null) { _socket.close(event.data.code); _socket = null; } }};'], { type: "application/javascript; charset=utf-8" })); this._workerSocket = new Worker(s2); var a2 = this; this._workerSocket.onmessage = function(e3) { var t3 = e3.data, n3 = t3.callback, o2 = t3.e, s3 = t3.extensions; "onOpen" === n3 ? a2._onOpen(s3) : "onClose" === n3 ? a2._onClose(o2) : "onError" === n3 ? a2._onError(o2) : "onMessage" === n3 && a2._onMessage(e3.data); }, this._workerSocket.postMessage({ cmd: "start", id: this._id, url: n2 }); } else ae ? te ? (re.connectSocket({ url: n2, header: { "content-type": "application/json" } }), re.onSocketClose(this._onClose.bind(this)), re.onSocketOpen(this._onOpen.bind(this)), re.onSocketMessage(this._onMessage.bind(this)), re.onSocketError(this._onError.bind(this))) : (this._socket = re.connectSocket({ url: n2, header: { "content-type": "application/json" }, complete: function() { } }), this._socket.onClose(this._onClose.bind(this)), this._socket.onOpen(this._onOpen.bind(this)), this._socket.onMessage(this._onMessage.bind(this)), this._socket.onError(this._onError.bind(this))) : ie && (this._socket = new WebSocket(n2), this._socket.binaryType = "arraybuffer", this._socket.onopen = this._onOpen.bind(this, this._socket.extensions), this._socket.onmessage = this._onMessage.bind(this), this._socket.onclose = this._onClose.bind(this), this._socket.onerror = this._onError.bind(this)); this._canIUseBinaryFrame = t2.canIUseBinaryFrame(); } return a(e2, [{ key: "getID", value: function() { return this._id; } }, { key: "_onOpen", value: function(e3) { this._handler.onOpen({ id: this._id, res: JSON.stringify(e3) }); } }, { key: "_onClose", value: function(e3) { this._handler.onClose({ id: this._id, e: e3 }); } }, { key: "_onMessage", value: function(e3) { var t2; t2 = this._canIUseBinaryFrame ? this._isAppCompressedData(e3.data) ? this._handler.inflate(e3.data) : function(e4) { for (var t3 = new Uint8Array(e4), n2 = "", o2 = 0, s2 = t3.length; o2 < s2; ) { var a2 = t3[o2], i2 = 0, r2 = 0; if (a2 <= 127 ? (i2 = 0, r2 = 255 & a2) : a2 <= 223 ? (i2 = 1, r2 = 31 & a2) : a2 <= 239 ? (i2 = 2, r2 = 15 & a2) : a2 <= 244 && (i2 = 3, r2 = 7 & a2), s2 - o2 - i2 > 0) for (var u2 = 0; u2 < i2; ) r2 = r2 << 6 | 63 & (a2 = t3[o2 + u2 + 1]), u2 += 1; else r2 = 65533, i2 = s2 - o2; n2 += String.fromCodePoint(r2), o2 += i2 + 1; } return n2; }(e3.data) : e3.data, this._handler.onMessage({ data: t2 }); } }, { key: "_isAppCompressedData", value: function(e3) { var t2 = new Uint8Array(e3); return 67 === t2[0] && 79 === t2[1] && 77 === t2[2] && 80 === t2[3]; } }, { key: "_onError", value: function(e3) { this._handler.onError({ id: this._id, e: e3 }); } }, { key: "setIsWorkerEnabled", value: function(e3) { this._isWorkerEnabled = true; } }, { key: "close", value: function(e3) { if (this._workerSocket && (this._workerSocket.postMessage({ cmd: "stop", code: e3 }), this._workerSocket.terminate(), this._workerSocket = null), te) return re.offSocketClose(), re.offSocketMessage(), re.offSocketOpen(), re.offSocketError(), void re.closeSocket(); this._socket && (ae ? (this._socket.onClose(function() { }), this._socket.onOpen(function() { }), this._socket.onMessage(function() { }), this._socket.onError(function() { })) : ie && (this._socket.onopen = null, this._socket.onmessage = null, this._socket.onclose = null, this._socket.onerror = null), ee ? this._socket.close({ code: e3 }) : this._socket.close(e3), this._socket = null); } }, { key: "send", value: function(e3) { if (this._workerSocket) this._workerSocket.postMessage({ cmd: "sendMessage", data: this._canIUseBinaryFrame ? Nr(e3.data).buffer : e3.data }); else { if (te) return void re.sendSocketMessage({ data: e3.data, fail: function() { e3.fail && e3.requestID && e3.fail(e3.requestID); } }); this._socket && (ae ? this._socket.send({ data: this._canIUseBinaryFrame ? Nr(e3.data).buffer : e3.data, fail: function() { e3.fail && e3.requestID && e3.fail(e3.requestID); } }) : ie && this._socket.send(this._canIUseBinaryFrame ? Nr(e3.data) : e3.data)); } } }]), e2; }(), Gr = 4e3, Ur = 4001, Pr = ["keyMap"], br = ["keyMap"], wr = "connected", Fr = "connecting", qr = "disconnected", xr = function() { function e2(t2) { o(this, e2), this._channelModule = t2, this._n = "SocketHandler", this._promiseMap = /* @__PURE__ */ new Map(), this._readyState = qr, this._simpleRequestMap = /* @__PURE__ */ new Map(), this.MAX_SIZE = 100, this._startSequence = _t(), this._startTs = 0, this._reConnectFlag = false, this._nextPingTs = 0, this._reConnectCount = 0, this.MAX_RECONNECT_COUNT = 3, this._socketID = -1, this._random = 0, this._socket = null, this._url = "", this._onOpenTs = 0, this._canIUseBinaryFrame = true, this._isWorkerEnabled = true, this._setWebsocketHost(), this._initConnection(); } return a(e2, [{ key: "_setWebsocketHost", value: function() { var e3 = this._channelModule.getModule(xn), t2 = G; this._channelModule.isOversea() && (t2 = U), e3.isSingaporeSite() ? t2 = P : e3.isKoreaSite() ? t2 = b : e3.isGermanySite() ? t2 = w : e3.isIndiaSite() ? t2 = F : e3.isJapanSite() ? t2 = q : e3.isUSASite() && (t2 = x), V.HOST.setCurrent(t2); } }, { key: "_initConnection", value: function() { it(V.HOST.CURRENT.BACKUP) || "" === this._url ? this._url = V.HOST.CURRENT.DEFAULT : this._url === V.HOST.CURRENT.DEFAULT ? this._url = V.HOST.CURRENT.BACKUP : this._url === V.HOST.CURRENT.BACKUP ? this._url = this._canIUseAnyCast() ? V.HOST.CURRENT.ANYCAST : V.HOST.CURRENT.DEFAULT : this._url === V.HOST.CURRENT.ANYCAST && (V.HOST.CURRENT.ANYCAST = "", this._url = V.HOST.CURRENT.DEFAULT); var e3 = this._channelModule.getModule(xn).getProxyServer(); zt(e3) || (this._url = e3), this._connect(), this._nextPingTs = 0; } }, { key: "_canIUseAnyCast", value: function() { return ie && V.HOST.CURRENT.ANYCAST; } }, { key: "onCheckTimer", value: function(e3) { e3 % 1 == 0 && this._checkPromiseMap(); } }, { key: "_checkPromiseMap", value: function() { var e3 = this; 0 !== this._promiseMap.size && this._promiseMap.forEach(function(t2, n2) { var o2 = t2.reject, s2 = t2.timestamp, a2 = 15e3; -1 !== n2.indexOf(co) ? a2 = 9e4 : -1 !== n2.indexOf(Hs) && (a2 = 3e3), Date.now() - s2 >= a2 && (Ve.l("".concat(e3._n, "._checkPromiseMap request timeout, delete requestID:").concat(n2)), e3._promiseMap.delete(n2), o2(new ja({ code: ha.NETWORK_TIMEOUT })), e3._channelModule.onRequestTimeout(n2)); }); } }, { key: "onOpen", value: function(e3) { if ("" !== this._readyState) { this._onOpenTs = Date.now(); var t2 = e3.id, n2 = e3.res; this._socketID = t2; var o2 = Date.now() - this._startTs, s2 = "socketID:".concat(t2, " res:").concat(n2); Ve.l("".concat(this._n, "._onOpen cost:").concat(o2, " ms. ").concat(s2)), new Aa("wsOnOpen").setMessage(o2).setCostTime(o2).setMoreMessage(s2).end(), e3.id === this._socketID && (this._readyState = wr, this._reConnectCount = 0, this._resend(), true === this._reConnectFlag && (this._channelModule.onReconnected(), this._reConnectFlag = false), this._channelModule.onOpen()); } } }, { key: "onClose", value: function(e3) { var t2 = new Aa("wsOnClose"), n2 = e3.id, o2 = e3.e, s2 = "sourceSocketID:".concat(n2, " currentSocketID:").concat(this._socketID, " code:").concat(o2.code, " reason:").concat(o2.reason), a2 = 0; 0 !== this._onOpenTs && (a2 = Date.now() - this._onOpenTs), t2.setMessage(a2).setCostTime(a2).setMoreMessage(s2).setCode(o2.code).end(), Ve.l("".concat(this._n, "._onClose ").concat(s2, " onlineTime:").concat(a2)), n2 === this._socketID && (this._readyState = qr, a2 < 1e3 ? this._channelModule.onReconnectFailed() : this._channelModule.onClose()); } }, { key: "onError", value: function(e3) { var t2 = e3.id, n2 = e3.e, o2 = "sourceSocketID:".concat(t2, " currentSocketID:").concat(this._socketID); new Aa("wsOnError").setMessage(n2.errMsg || gt(n2)).setMoreMessage(o2).setLevel("error").end(), Ve.w("".concat(this._n, "._onError"), n2, o2), t2 === this._socketID && (this._readyState = "", this._channelModule.onError()); } }, { key: "onMessage", value: function(e3) { var t2; try { t2 = JSON.parse(e3.data); } catch (c2) { new Aa("jsonParseError").setMessage(e3.data).end(); } if (t2 && t2.head) { var n2 = this._getRequestIDFromHead(t2.head), o2 = t2.body; if (!this._isTRTCCommand(n2)) { var s2 = bt(t2.head); o2 = Lr(t2.body, this._getResponseKeyMap(s2)); } if (Ve.d("".concat(this._n, ".onMessage ret:").concat(JSON.stringify(o2), " requestID:").concat(n2, " has:").concat(this._promiseMap.has(n2))), this._setNextPingTs(), this._promiseMap.has(n2)) { var a2 = this._promiseMap.get(n2), i2 = a2.resolve, r2 = a2.reject, u2 = a2.timestamp; return this._promiseMap.delete(n2), this._calcRTT(u2), void (o2.errorCode && 0 !== o2.errorCode ? (this._channelModule.onErrorCodeNotZero(o2), r2(new ja({ code: o2.errorCode, message: o2.errorInfo || "", data: n2.includes(Ro) || n2.includes(ys) ? { elements: o2.elements, messageVersion: o2.messageVersion, cloudCustomData: o2.cloudCustomData } : void 0 }))) : i2(Ya(o2))); } this._channelModule.onMessage({ head: t2.head, body: o2 }); } } }, { key: "_isTRTCCommand", value: function(e3) { for (var t2 = this._channelModule.getModule(so).getCommandList(), n2 = false, o2 = 0; o2 < t2.length; o2++) if (e3.startsWith(t2[o2])) { n2 = true; break; } return n2; } }, { key: "_calcRTT", value: function(e3) { var t2 = Date.now() - e3; this._channelModule.getModule(eo).addRTT(t2); } }, { key: "_connect", value: function() { this._startTs = Date.now(), this._onOpenTs = 0, this._socket = new Or(this), this._socketID = this._socket.getID(), this._readyState = Fr, Ve.l("".concat(this._n, "._connect isWorkerEnabled:").concat(this.getIsWorkerEnabled(), " socketID:").concat(this._socketID, " url:").concat(this.getURL())), new Aa("wsConnect").setMessage("socketID:".concat(this._socketID, " url:").concat(this.getURL())).end(); } }, { key: "getURL", value: function() { this._channelModule.isDevMode() && (this._canIUseBinaryFrame = false); var e3 = Ot(); (te || X && "windows" === e3 || oe) && (this._canIUseBinaryFrame = false); var t2 = -1; "ios" === e3 ? t2 = me || -1 : "android" === e3 && (t2 = ye || -1); var n2 = this._channelModule.getModule(xn), o2 = this._channelModule.getPlatform(), s2 = n2.getSDKAppID(), a2 = n2.getInstanceID(), i2 = "sdkappid=".concat(s2, "&instanceid=").concat(a2, "&random=").concat(this._getRandom(), "&platform=").concat(o2, "&host=").concat(e3) + "&version=".concat(t2, "&sdkversion=").concat("2.27.6"); return Z && (i2 += "&isminigame=1"), this._channelModule.canIUseInflate() && (i2 += "&compress=gzip"), this._canIUseBinaryFrame ? "".concat(this._url, "/binfo?").concat(i2) : "".concat(this._url, "/info?").concat(i2); } }, { key: "_closeConnection", value: function(e3) { Ve.l("".concat(this._n, "._closeConnection socketID:").concat(this._socketID)), this._socket && (this._socket.close(e3), this._socketID = -1, this._socket = null, this._readyState = qr); } }, { key: "_resend", value: function() { var e3 = this; if (Ve.l("".concat(this._n, "._resend reConnectFlag:").concat(this._reConnectFlag), "promiseMap.size:".concat(this._promiseMap.size, " simpleRequestMap.size:").concat(this._simpleRequestMap.size)), this._promiseMap.size > 0 && this._promiseMap.forEach(function(t3, n3) { var o3 = t3.uplinkData, s3 = t3.resolve, a3 = t3.reject; e3._promiseMap.set(n3, { resolve: s3, reject: a3, timestamp: Date.now(), uplinkData: o3 }), e3._execute(n3, o3); }), this._simpleRequestMap.size > 0) { var t2, n2 = D(this._simpleRequestMap); try { for (n2.s(); !(t2 = n2.n()).done; ) { var o2 = v(t2.value, 2), s2 = o2[0], a2 = o2[1]; this._execute(s2, a2); } } catch (i2) { n2.e(i2); } finally { n2.f(); } this._simpleRequestMap.clear(); } } }, { key: "send", value: function(e3) { var t2 = this; e3.head.seq = this._getSequence(), e3.head.reqtime = Math.floor(Date.now() / 1e3), e3.keyMap; var n2 = g(e3, Pr), o2 = this._getRequestIDFromHead(e3.head), s2 = JSON.stringify(n2); return new Promise(function(e4, a2) { (t2._promiseMap.set(o2, { resolve: e4, reject: a2, timestamp: Date.now(), uplinkData: s2 }), Ve.d("".concat(t2._n, ".send uplinkData:").concat(JSON.stringify(n2), " requestID:").concat(o2, " readyState:").concat(t2._readyState)), t2._readyState !== wr) ? t2._reConnect() : (t2._execute(o2, s2), t2._channelModule.getModule(eo).addRequestCount()); }); } }, { key: "simplySend", value: function(e3) { e3.head.seq = this._getSequence(), e3.head.reqtime = Math.floor(Date.now() / 1e3), e3.keyMap; var t2 = g(e3, br), n2 = this._getRequestIDFromHead(e3.head), o2 = JSON.stringify(t2); this._readyState !== wr ? (this._simpleRequestMap.size < this.MAX_SIZE ? this._simpleRequestMap.set(n2, o2) : Ve.l("".concat(this._n, ".simplySend. simpleRequestMap is full, drop request!")), this._reConnect()) : this._execute(n2, o2); } }, { key: "_execute", value: function(e3, t2) { this._socket.send({ data: t2, fail: ae ? this._onSendFail.bind(this) : void 0, requestID: e3 }); } }, { key: "_onSendFail", value: function(e3) { Ve.l("".concat(this._n, "._onSendFail requestID:").concat(e3)); } }, { key: "_getSequence", value: function() { var e3; if (this._startSequence < 2415919103) return e3 = this._startSequence, this._startSequence += 1, 2415919103 === this._startSequence && (this._startSequence = _t()), e3; } }, { key: "_getRequestIDFromHead", value: function(e3) { return e3.servcmd + e3.seq; } }, { key: "_getResponseKeyMap", value: function(e3) { var n2 = this._channelModule.getKeyMap(e3); return t(t({}, Dr.response), n2.response); } }, { key: "_reConnect", value: function() { this._readyState !== wr && this._readyState !== Fr && this.forcedReconnect(); } }, { key: "forcedReconnect", value: function() { var e3 = this, t2 = "".concat(this._n, ".forcedReconnect"); Ve.l("".concat(t2, " count:").concat(this._reConnectCount, " readyState:").concat(this._readyState)), this._reConnectFlag = true, this._resetRandom(), this._reConnectCount < this.MAX_RECONNECT_COUNT ? (this._reConnectCount += 1, this._closeConnection(Ur), this._initConnection()) : (this._reConnectCount = 0, this._channelModule.probeNetwork().then(function(n2) { var o2 = v(n2, 2), s2 = o2[0]; o2[1], s2 ? (Ve.w("".concat(t2, " disconnected from wsserver but network is ok, continue...")), e3._closeConnection(Ur), e3._initConnection()) : e3._channelModule.onReconnectFailed(); })); } }, { key: "getReconnectFlag", value: function() { return this._reConnectFlag; } }, { key: "_setNextPingTs", value: function() { this._nextPingTs = Date.now() + 1e4; } }, { key: "getNextPingTs", value: function() { return this._nextPingTs; } }, { key: "isConnected", value: function() { return this._readyState === wr; } }, { key: "canIUseBinaryFrame", value: function() { return this._canIUseBinaryFrame; } }, { key: "inflate", value: function(e3) { if (this._channelModule.canIUseInflate()) return this._channelModule.getModule(ro).inflate(e3); } }, { key: "setIsWorkerEnabled", value: function(e3) { Ve.l("".concat(this._n, ".setIsWorkerEnabled flag:").concat(e3)), this._isWorkerEnabled = e3; } }, { key: "getIsWorkerEnabled", value: function() { return this._isWorkerEnabled && Se; } }, { key: "_getRandom", value: function() { return 0 === this._random && (this._random = Math.random()), this._random; } }, { key: "_resetRandom", value: function() { this._random = 0; } }, { key: "close", value: function() { Ve.l("".concat(this._n, ".close")), this._closeConnection(Gr), this._promiseMap.clear(), this._startSequence = _t(), this._readyState = qr, this._simpleRequestMap.clear(), this._reConnectFlag = false, this._reConnectCount = 0, this._onOpenTs = 0, this._url = "", this._random = 0, this._canIUseBinaryFrame = true, this._isWorkerEnabled = true; } }]), e2; }(), Vr = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; if (o(this, n2), (s2 = t2.call(this, e3))._n = "ChannelModule", s2._socketHandler = new xr(h(s2)), s2._probing = false, s2._isAppShowing = true, s2._previousState = E.NET_STATE_CONNECTED, ae && "function" == typeof re.onAppShow && "function" == typeof re.onAppHide) { var a2 = s2._onAppHide.bind(h(s2)), i2 = s2._onAppShow.bind(h(s2)); "function" == typeof re.offAppHide && re.offAppHide(a2), "function" == typeof re.offAppShow && re.offAppShow(i2), re.onAppHide(a2), re.onAppShow(i2); } return s2._timerForNotLoggedIn = -1, s2._timerForNotLoggedIn = setInterval(s2.onCheckTimer.bind(h(s2)), 1e3), s2._fatalErrorFlag = false, s2; } return a(n2, [{ key: "onCheckTimer", value: function(e3) { this._socketHandler && (this.isLoggedIn() ? (this._timerForNotLoggedIn > 0 && (clearInterval(this._timerForNotLoggedIn), this._timerForNotLoggedIn = -1), this._socketHandler.onCheckTimer(e3)) : this._socketHandler.onCheckTimer(1), this._checkNextPing()); } }, { key: "onErrorCodeNotZero", value: function(e3) { this.getModule(zn).onErrorCodeNotZero(e3); } }, { key: "onMessage", value: function(e3) { this.getModule(zn).onMessage(e3); } }, { key: "send", value: function(e3) { return this._socketHandler ? this._previousState !== E.NET_STATE_CONNECTED && e3.head.servcmd.includes(Bs) ? (this.reConnect(), this._sendLogViaHTTP(e3)) : this._socketHandler.send(e3) : Promise.reject(); } }, { key: "_sendLogViaHTTP", value: function(e3) { var t3 = V.HOST.CURRENT.STAT; return new Promise(function(n3, o2) { var s2 = "".concat(t3, "/v4/imopenstat/tim_web_report_v2?sdkappid=").concat(e3.head.sdkappid, "&reqtime=").concat(Date.now()), a2 = JSON.stringify(e3.body), i2 = "application/x-www-form-urlencoded;charset=UTF-8"; if (ae) re.request({ url: s2, data: a2, method: "POST", timeout: 3e3, header: { "content-type": i2 }, success: function() { n3(); }, fail: function() { o2(new ja({ code: ha.NETWORK_ERROR })); } }); else { var r2 = new XMLHttpRequest(), u2 = setTimeout(function() { r2.abort(), o2(new ja({ code: ha.NETWORK_TIMEOUT })); }, 3e3); r2.onreadystatechange = function() { 4 === r2.readyState && (clearTimeout(u2), 200 === r2.status || 304 === r2.status ? n3() : o2(new ja({ code: ha.NETWORK_ERROR }))); }, r2.open("POST", s2, true), r2.setRequestHeader("Content-type", i2), r2.send(a2); } }); } }, { key: "simplySend", value: function(e3) { return this._socketHandler ? this._socketHandler.simplySend(e3) : Promise.reject(); } }, { key: "onOpen", value: function() { this._ping(); } }, { key: "onClose", value: function() { this._socketHandler && (this._socketHandler.getReconnectFlag() && this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)); this.reConnect(); } }, { key: "onError", value: function() { ae && !oe && this.outputWarning("DomainNameInMP"), this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED); } }, { key: "getKeyMap", value: function(e3) { return this.getModule(zn).getKeyMap(e3); } }, { key: "_onAppHide", value: function() { this._isAppShowing = false; } }, { key: "_onAppShow", value: function() { this._isAppShowing = true; } }, { key: "onRequestTimeout", value: function(e3) { } }, { key: "onReconnected", value: function() { Ve.l("".concat(this._n, ".onReconnected")), this._m.restartTimer(), this.getModule(zn).onReconnected(), this._emitNetStateChangeEvent(E.NET_STATE_CONNECTED); } }, { key: "onReconnectFailed", value: function() { Ve.l("".concat(this._n, ".onReconnectFailed")), this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED); } }, { key: "setIsWorkerEnabled", value: function(e3) { this._socketHandler && this._socketHandler.setIsWorkerEnabled(false); } }, { key: "offline", value: function() { this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED); } }, { key: "reConnect", value: function() { var e3 = arguments.length > 0 && void 0 !== arguments[0] && arguments[0], t3 = false; this._socketHandler && (t3 = this._socketHandler.getReconnectFlag()); var n3 = "forcedFlag:".concat(e3, " fatalErrorFlag:").concat(this._fatalErrorFlag, " previousState:").concat(this._previousState, " reconnectFlag:").concat(t3); if (Ve.l("".concat(this._n, ".reConnect ").concat(n3)), !this._fatalErrorFlag && this._socketHandler) { if (true === e3) this._socketHandler.forcedReconnect(); else { if (this._previousState === E.NET_STATE_CONNECTING && t3) return; this._socketHandler.forcedReconnect(); } this._emitNetStateChangeEvent(E.NET_STATE_CONNECTING); } } }, { key: "_emitNetStateChangeEvent", value: function(e3) { this._previousState !== e3 && (Ve.l("".concat(this._n, "._emitNetStateChangeEvent from ").concat(this._previousState, " to ").concat(e3)), this._previousState = e3, this.emitOuterEvent(k.NET_STATE_CHANGE, { state: e3 })); } }, { key: "_ping", value: function() { var e3 = this; if (true !== this._probing) { this._probing = true; var t3 = this.getModule(zn).getProtocolData({ protocolName: Hs }); this.send(t3).then(function() { e3._probing = false; }).catch(function(t4) { if (Ve.w("".concat(e3._n, "._ping failed. error:"), t4), e3._probing = false, t4 && 60002 === t4.code) return new Aa("error").setMessage("code:".concat(t4.code, " message:").concat(t4.message)).setNetworkType(e3.getModule(Hn).getNetworkType()).end(), e3._fatalErrorFlag = true, void e3._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED); e3.probeNetwork().then(function(t5) { var n3 = v(t5, 2), o2 = n3[0], s2 = n3[1]; Ve.l("".concat(e3._n, "._ping failed. probe network, isAppShowing:").concat(e3._isAppShowing, " online:").concat(o2, " networkType:").concat(s2)), o2 ? e3.reConnect() : e3._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED); }); }); } } }, { key: "_checkNextPing", value: function() { this._socketHandler && (this._socketHandler.isConnected() && Date.now() >= this._socketHandler.getNextPingTs() && this._ping()); } }, { key: "canIUseInflate", value: function() { return this._m.canIUseInflate(); } }, { key: "dealloc", value: function() { this._socketHandler && (this._socketHandler.close(), this._socketHandler = null), this._timerForNotLoggedIn > -1 && clearInterval(this._timerForNotLoggedIn); } }, { key: "onRestApiKickedOut", value: function() { this._socketHandler && (this._socketHandler.close(), this.reConnect(true)); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._previousState = E.NET_STATE_CONNECTED, this._probing = false, this._fatalErrorFlag = false, this._timerForNotLoggedIn = setInterval(this.onCheckTimer.bind(this), 1e3); } }]), n2; }(uo), Br = ["a2", "tinyid"], Hr = ["a2", "tinyid"], Kr = function() { function e2(t2) { o(this, e2), this._n = "ProtocolHandler", this._sessionModule = t2, this._configMap = /* @__PURE__ */ new Map(), this._fillConfigMap(); } return a(e2, [{ key: "_fillConfigMap", value: function() { this._configMap.clear(); var e3 = this._sessionModule.genCommonHead(), n2 = this._sessionModule.genCosSpecifiedHead(), o2 = this._sessionModule.genSSOReportHead(), s2 = this._sessionModule.isIntl(); this._configMap.set(co, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.LOGIN) }), body: { state: "Online", isWebUniapp: 0, deviceBrand: 0 }, keyMap: { request: { deviceBrand: "InstType" }, response: { InstId: "instanceID", HelloInterval: "helloInterval" } } }; }(e3)), this._configMap.set(lo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.LOGOUT) }), body: { type: 0 }, keyMap: { request: { type: "wslogout_type" } } }; }(e3)), this._configMap.set(po, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.HELLO) }), body: { isWebUniapp: 0 }, keyMap: { response: { NewInstInfo: "newInstanceInfo" } } }; }(e3)), this._configMap.set(go, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.STAT_SERVICE, ".").concat(V.CMD.KICK_OTHER) }), body: {} }; }(e3)), this._configMap.set(qs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_COS_SIGN, ".").concat(V.CMD.COS_SIGN) }), body: { cmd: "open_im_cos_svc", subCmd: "get_cos_token", duration: 300, version: 2 }, keyMap: { request: { userSig: "usersig", subCmd: "sub_cmd", cmd: "cmd", duration: "duration", version: "version" }, response: { expired_time: "expiredTime", bucket_name: "bucketName", session_token: "sessionToken", tmp_secret_id: "secretId", tmp_secret_key: "secretKey" } } }; }(n2)), this._configMap.set(xs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.CUSTOM_UPLOAD, ".").concat(V.CMD.COS_PRE_SIG) }), body: { fileType: void 0, fileName: void 0, uploadMethod: 0, duration: 900 }, keyMap: { request: { userSig: "usersig", fileType: "file_type", fileName: "file_name", uploadMethod: "upload_method" }, response: { expired_time: "expiredTime", request_id: "requestId", head_url: "headUrl", upload_url: "uploadUrl", download_url: "downloadUrl", ci_url: "ciUrl", snapshot_url: "requestSnapshotUrl" } } }; }(n2)), this._configMap.set(Vs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.CUSTOM_UPLOAD, ".").concat(V.CMD.VIDEO_COVER) }), body: { version: 1, platform: void 0, coverName: void 0, requestSnapshotUrl: void 0 }, keyMap: { request: { version: "version", platform: "platform", coverName: "cover_name", requestSnapshotUrl: "snapshot_url" }, response: { error_code: "errorCode", error_msg: "errorInfo", download_url: "snapshotUrl" } } }; }(n2)), this._configMap.set(Qs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_CONFIG_MANAGER, ".").concat(V.CMD.FETCH_COMMERCIAL_CONFIG) }), body: { SDKAppID: 0 }, keyMap: { request: { SDKAppID: "uint32_sdkappid" }, response: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_purchase_bits: "purchaseBits", uint32_expired_time: "expiredTime" } } }; }(e3)), this._configMap.set($s, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_CONFIG_MANAGER, ".").concat(V.CMD.PUSHED_COMMERCIAL_CONFIG) }), body: {}, keyMap: { response: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_purchase_bits: "purchaseBits", uint32_expired_time: "expiredTime" } } }; }(e3)), this._configMap.set(Xs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_CONFIG_MANAGER, ".").concat(V.CMD.FETCH_CLOUD_CONTROL_CONFIG) }), body: { SDKAppID: 0, version: 0 }, keyMap: { request: { SDKAppID: "uint32_sdkappid", version: "uint64_version" }, response: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_json_config: "cloudControlConfig", uint32_expired_time: "expiredTime", uint32_sdkappid: "SDKAppID", uint64_version: "version" } } }; }(e3)), this._configMap.set(Zs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_CONFIG_MANAGER, ".").concat(V.CMD.PUSHED_CLOUD_CONTROL_CONFIG) }), body: {}, keyMap: { response: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_json_config: "cloudControlConfig", uint32_expired_time: "expiredTime", uint32_sdkappid: "SDKAppID", uint64_version: "version" } } }; }(e3)), this._configMap.set(ea, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OVERLOAD_PUSH, ".").concat(V.CMD.OVERLOAD_NOTIFY) }), body: {}, keyMap: { response: { OverLoadServCmd: "overloadCommand", DelaySecs: "waitingTime" } } }; }(e3)), this._configMap.set(ho, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.GET_MESSAGES) }), body: { cookie: "", syncFlag: 0, needAbstract: 1, isOnlineSync: 0, needSignaling: 1 }, keyMap: { request: { fromAccount: "From_Account", toAccount: "To_Account", from: "From_Account", to: "To_Account", time: "MsgTimeStamp", sequence: "MsgSeq", random: "MsgRandom", elements: "MsgBody" }, response: { MsgList: "messageList", SyncFlag: "syncFlag", To_Account: "to", From_Account: "from", ClientSeq: "clientSequence", MsgSeq: "sequence", NoticeSeq: "noticeSequence", NotifySeq: "notifySequence", MsgRandom: "random", MsgTimeStamp: "time", MsgContent: "content", ToGroupId: "to", MsgKey: "messageKey", GroupTips: "groupTips", MsgBody: "elements", MsgType: "type", C2CRemainingUnreadCount: "C2CRemainingUnreadList", C2CPairUnreadCount: "C2CPairUnreadList" } } }; }(e3)), s2 || (this._configMap.set(_o, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.BIG_DATA_HALLWAY_AUTH_KEY) }), body: {} }; }(e3)), this._configMap.set(pa, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_MSG_AUDIT_MGR, ".").concat(V.CMD.GET_RPOFANITY_LIST) }), body: { version: 0, deviceID: "", startIndex: void 0 }, keyMap: { request: { version: "uint64_version", deviceID: "str_device_id", startIndex: "uint64_start_index" }, response: { msg_cmd_error_code: "errorInfo", str_err_msg: "errorMessage", uint32_code: "errorCode", msg_scene_ctl_config: "filterConfig", uint64_c2c_custom_msg_flag: "c2c_custom_message", uint64_c2c_text_msg_flag: "c2c_text_message", uint64_group_custom_msg_flag: "group_custom_message", uint64_group_text_msg_flag: "group_text_message", uint64_group_info_flag: "group_profile", uint64_group_member_info_flag: "group_member_profile", uint64_relation_chain_flag: "sns", uint64_user_info_flag: "user_profile", rpt_msg_dirty_word: "lexicon", str_dirty_word: "profanity", str_replaced_content: "replacement", uint64_filter_type: "filterType", uint64_id: "id", uint64_word_type: "profanityType", uint64_complete_flag: "completeFlag", uint64_next_start_index: "nextStartIndex", uint64_version: "version", uint64_expired_time: "expiredTime" } } }; }(e3))), this._configMap.set(fo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SEND_MESSAGE) }), body: { fromAccount: "", toAccount: "", msgSeq: 0, msgRandom: 0, msgBody: [], cloudCustomData: void 0, nick: "", avatar: "", msgLifeTime: void 0, offlinePushInfo: { pushFlag: 0, title: "", desc: "", ext: "", apnsInfo: { badgeMode: 0, isVoipPush: void 0 }, androidInfo: { OPPOChannelID: "" } }, messageControlInfo: void 0, clientTime: void 0, needReadReceipt: 0, isSupportExtension: 0 }, keyMap: { request: { fromAccount: "From_Account", toAccount: "To_Account", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom", msgBody: "MsgBody", count: "MaxCnt", lastMessageTime: "LastMsgTime", messageKey: "MsgKey", peerAccount: "Peer_Account", data: "Data", description: "Desc", extension: "Ext", type: "MsgType", content: "MsgContent", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", nick: "From_AccountNick", avatar: "From_AccountHeadurl", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", elements: "MsgBody", clientSequence: "ClientSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody", needReadReceipt: "IsNeedReadReceipt" } } }; }(e3)), this._configMap.set(vo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.SEND_GROUP_MESSAGE) }), body: { fromAccount: "", groupID: "", random: 0, clientSequence: 0, priority: "", msgBody: [], cloudCustomData: void 0, onlineOnlyFlag: 0, offlinePushInfo: { pushFlag: 0, title: "", desc: "", ext: "", apnsInfo: { badgeMode: 0, isVoipPush: void 0 }, androidInfo: { OPPOChannelID: "" } }, groupAtInfo: [], messageControlInfo: void 0, clientTime: void 0, needReadReceipt: 0, topicID: void 0, receiverList: void 0, isSupportExtension: 0 }, keyMap: { request: { to: "GroupId", extension: "Ext", data: "Data", description: "Desc", random: "Random", sequence: "ReqMsgSeq", count: "ReqMsgNumber", type: "MsgType", priority: "MsgPriority", content: "MsgContent", elements: "MsgBody", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", clientSequence: "ClientSeq", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody", needReadReceipt: "NeedReadReceipt", receiverList: "To_Account" }, response: { MsgTime: "time", MsgSeq: "sequence" } } }; }(e3)), this._configMap.set(To, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.REVOKE_C2C_MESSAGE) }), body: { msgInfo: { fromAccount: "", toAccount: "", msgTimeStamp: 0, msgSeq: 0, msgRandom: 0 } }, keyMap: { request: { msgInfo: "MsgInfo", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom" } } }; }(e3)), this._configMap.set(is, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.REVOKE_GROUP_MESSAGE) }), body: { groupID: "", msgSeqList: void 0, topicID: "" }, keyMap: { request: { msgSeqList: "MsgSeqList", msgSeq: "MsgSeq" } } }; }(e3)), this._configMap.set(So, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.GET_C2C_ROAM_MESSAGES) }), body: { peerAccount: "", count: 15, lastMessageTime: 0, messageKey: "", withRecalledMessage: 1, direction: 0 }, keyMap: { request: { messageKey: "MsgKey", peerAccount: "Peer_Account", count: "MaxCnt", lastMessageTime: "LastMsgTime", withRecalledMessage: "WithRecalledMsg", direction: "GetDirection" }, response: { LastMsgTime: "lastMessageTime", IsNeedReadReceipt: "needReadReceipt", IsPeerRead: "readReceiptSentByPeer" } } }; }(e3)), this._configMap.set(Ro, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.MODIFY_C2C_MESSAGE) }), body: { from: "", to: "", sequence: 0, random: 0, time: 0, version: 0, elements: void 0, cloudCustomData: void 0 }, keyMap: { request: { sequence: "MsgSeq", random: "MsgRandom", time: "MsgTime", version: "MsgVersion", type: "MsgType", content: "MsgContent" } } }; }(e3)), this._configMap.set(cs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_ROAM_MESSAGES) }), body: { withRecalledMsg: 1, groupID: "", count: 15, sequence: "", topicID: void 0 }, keyMap: { request: { sequence: "ReqMsgSeq", count: "ReqMsgNumber", withRecalledMessage: "WithRecalledMsg" }, response: { Random: "random", MsgTime: "time", MsgSeq: "sequence", ReqMsgSeq: "sequence", RspMsgList: "messageList", IsPlaceMsg: "isPlaceMessage", IsSystemMsg: "isSystemMessage", ToGroupId: "to", EnumFrom_AccountType: "fromAccountType", EnumTo_AccountType: "toAccountType", GroupCode: "groupCode", MsgPriority: "priority", MsgBody: "elements", MsgType: "type", MsgContent: "content", IsFinished: "complete", Download_Flag: "downloadFlag", ClientSeq: "clientSequence", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID", ToTopicId: "topicID", InvisibleMsgSeq: "invisibleSequenceList" } } }; }(e3)), this._configMap.set(Do, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SET_C2C_MESSAGE_READ) }), body: { C2CMsgReaded: void 0 }, keyMap: { request: { lastMessageTime: "LastedMsgTime" } } }; }(e3)), this._configMap.set(ko, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SET_C2C_PEER_MUTE_NOTIFICATIONS) }), body: { userIDList: void 0, muteFlag: 0 }, keyMap: { request: { userIDList: "Peer_Account", muteFlag: "Mute_Notifications" } } }; }(e3)), this._configMap.set(Eo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.GET_C2C_PEER_MUTE_NOTIFICATIONS) }), body: { updateSequence: 0 }, keyMap: { response: { MuteNotificationsList: "muteFlagList" } } }; }(e3)), this._configMap.set(rs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.SET_GROUP_MESSAGE_READ) }), body: { groupID: void 0, messageReadSeq: void 0, topicID: void 0 }, keyMap: { request: { messageReadSeq: "MsgReadedSeq" } } }; }(e3)), this._configMap.set(us, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SET_ALL_MESSAGE_READ) }), body: { readAllC2CMessage: 0, groupMessageReadInfoList: [] }, keyMap: { request: { readAllC2CMessage: "C2CReadAllMsg", groupMessageReadInfoList: "GroupReadInfo", messageSequence: "MsgSeq" }, response: { C2CReadAllMsg: "readAllC2CMessage", GroupReadInfoArray: "groupMessageReadInfoList" } } }; }(e3)), this._configMap.set(Ao, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.DELETE_C2C_MESSAGE) }), body: { fromAccount: "", to: "", keyList: void 0 }, keyMap: { request: { keyList: "MsgKeyList" } } }; }(e3)), this._configMap.set(Ms, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.DELETE_GROUP_MESSAGE) }), body: { groupID: "", deleter: "", keyList: void 0, topicID: void 0 }, keyMap: { request: { deleter: "Deleter_Account", keyList: "Seqs" } } }; }(e3)), this._configMap.set(ga, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_TRANSLATE, ".").concat(V.CMD.TRANSLATE_TEXT) }), body: { sourceTextList: void 0, SDKAppID: 0, from: 0, source: "", target: "" }, keyMap: { request: { sourceTextList: "SourceText", SDKAppID: "SdkAppId", from: "FromAccount" }, response: { TargetText: "translatedTextList", RequestId: "requestID", CmdErrorCode: "error", ErrorCode: "code", ErrorInfo: "message" } } }; }(e3)), this._configMap.set(ys, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.MODIFY_GROUP_MESSAGE) }), body: { groupID: "", topicID: void 0, sequence: 0, version: 0, elements: void 0, cloudCustomData: void 0 }, keyMap: { request: { sequence: "MsgSeq", version: "MsgVersion", type: "MsgType", content: "MsgContent" } } }; }(e3)), this._configMap.set(ls, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_READ_RECEIPT) }), body: { groupID: "", sequenceList: void 0 }, keyMap: { request: { sequence: "MsgSeq" } } }; }(e3)), this._configMap.set(ps, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SEND_C2C_READ_RECEIPT) }), body: { peerAccount: "", messageInfoList: void 0 }, keyMap: { request: { peerAccount: "Peer_Account", messageInfoList: "C2CMsgInfo", fromAccount: "From_Account", toAccount: "To_Account", sequence: "MsgSeq", random: "MsgRandom", time: "MsgTime", clientTime: "MsgClientTime" } } }; }(e3)), this._configMap.set(ds, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.SEND_READ_RECEIPT) }), body: { groupID: "", sequenceList: void 0 }, keyMap: { request: { sequenceList: "MsgSeqList", sequence: "MsgSeq" } } }; }(e3)), this._configMap.set(gs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_READ_RECEIPT_DETAIL) }), body: { groupID: "", sequence: void 0, flag: 0, cursor: 0, count: 0 }, keyMap: { request: { sequence: "MsgSeq", count: "Num" }, response: { ReadList: "readUserIDList", Read_Account: "userID", UnreadList: "unreadUserIDList", Unread_Account: "userID", IsFinish: "isCompleted" } } }; }(e3)), this._configMap.set(No, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM_MSG_EXT, ".").concat(V.CMD.MODIFY_C2C_MESSAGE_EXTENSIONS) }), body: { from: void 0, to: void 0, messageKey: void 0, operateType: void 0, extensionList: void 0 } }; }(e3)), this._configMap.set(Oo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM_MSG_EXT, ".").concat(V.CMD.GET_C2C_MESSAGE_EXTENSIONS) }), body: { from: void 0, to: void 0, messageKey: void 0, startSequence: void 0 } }; }(e3)), this._configMap.set(Es, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM_MSG_EXT, ".").concat(V.CMD.MODIFY_GROUP_MESSAGE_EXTENSIONS) }), body: { groupID: void 0, topicID: void 0, messageSequence: void 0, operateType: void 0, extensionList: void 0 } }; }(e3)), this._configMap.set(Ss, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM_MSG_EXT, ".").concat(V.CMD.GET_GROUP_MESSAGE_EXTENSIONS) }), body: { groupID: void 0, topicID: void 0, messageSequence: void 0, startSequence: void 0 } }; }(e3)), this._configMap.set(Lo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.GET_PEER_READ_TIME) }), body: { userIDList: void 0 }, keyMap: { request: { userIDList: "To_Account" }, response: { ReadTime: "peerReadTimeList" } } }; }(e3)), this._configMap.set(Uo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.GET_CONVERSATION_LIST) }), body: { fromAccount: void 0, count: 0 }, keyMap: { request: {}, response: { SessionItem: "conversations", ToAccount: "groupID", To_Account: "userID", UnreadMsgCount: "unreadCount", MsgGroupReadedSeq: "messageReadSeq", C2cPeerReadTime: "c2cPeerReadTime" } } }; }(e3)), this._configMap.set(Go, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.PAGING_GET_CONVERSATION_LIST) }), body: { fromAccount: void 0, timeStamp: void 0, startIndex: void 0, pinnedTimeStamp: void 0, pinnedStartIndex: void 0, orderType: void 0, messageAssistFlag: 4, assistFlag: 15 }, keyMap: { request: { messageAssistFlag: "MsgAssistFlags", assistFlag: "AssistFlags", pinnedTimeStamp: "TopTimeStamp", pinnedStartIndex: "TopStartIndex" }, response: { SessionItem: "conversations", ToAccount: "groupID", To_Account: "userID", UnreadMsgCount: "unreadCount", MsgGroupReadedSeq: "messageReadSeq", C2cPeerReadTime: "c2cPeerReadTime", LastMsgFlags: "lastMessageFlag", TopFlags: "isPinned", TopTimeStamp: "pinnedTimeStamp", TopStartIndex: "pinnedStartIndex", GroupId: "convGroupID" } } }; }(e3)), this._configMap.set(Po, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.DELETE_CONVERSATION) }), body: { fromAccount: "", conversationList: void 0, clearHistoryMessage: void 0 }, keyMap: { request: { toGroupID: "ToGroupid", clearHistoryMessage: "ClearRamble", conversationList: "ContactItem" }, response: { ResultItem: "resultList", ToGroupid: "groupID", ResultCode: "code", ResultInfo: "info" } } }; }(e3)), this._configMap.set(bo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.CLEAR_HISTORY_MESSAGE) }), body: { fromAccount: "", toAccount: void 0, type: 1, toGroupID: void 0 }, keyMap: { request: { toGroupID: "ToGroupid" } } }; }(e3)), this._configMap.set(wo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.PIN_CONVERSATION) }), body: { fromAccount: "", operationType: 1, itemList: void 0 }, keyMap: { request: { itemList: "RecentContactItem" } } }; }(e3)), this._configMap.set(Fo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.DELETE_GROUP_AT_TIPS) }), body: { messageListToDelete: void 0 }, keyMap: { request: { messageListToDelete: "DelMsgList", messageSeq: "MsgSeq", messageRandom: "MsgRandom" } } }; }(e3)), this._configMap.set(qo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.MARK_CONVERSATION) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { request: { itemList: "MarkItem", operationType: "OptType", groupID: "ToGroupId" }, response: { ToGroupId: "groupID", OptType: "operationType" } } }; }(e3)), this._configMap.set(xo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.MARK_CONVERSATION) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { request: { itemList: "MarkItem", operationType: "OptType", groupID: "ToGroupId" }, response: { ToGroupId: "groupID", OptType: "operationType" } } }; }(e3)), this._configMap.set(Vo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.CREATE_CONVERSATION_GROUP) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { request: { itemList: "GroupContactItem", groupID: "ToGroupId" }, response: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType" } } }; }(e3)), this._configMap.set(Bo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.DELETE_CONVERSATION_GROUP) }), body: { fromAccount: "", groupName: void 0 }, keyMap: { request: {}, response: { GroupId: "convGroupID" } } }; }(e3)), this._configMap.set(Ho, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.UPDATE_CONVERSATION_GROUP) }), body: { fromAccount: "", updateType: void 0, updateGroup: void 0 }, keyMap: { request: { oldName: "OldGroupName", newName: "NewGroupName", groupID: "ToGroupId", operationType: "ContactOptType", groupName: "OldGroupName", updateItem: "ContactUpdateItem" }, response: { ContactOptType: "operationType", ToGroupId: "groupID", GroupId: "convGroupID" } } }; }(e3)), this._configMap.set(Ko, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.UPDATE_CONVERSATION_GROUP) }), body: { fromAccount: "", updateType: void 0, updateGroup: { groupName: void 0, updateGroupType: void 0, updateItem: void 0 } }, keyMap: { request: {}, response: {} } }; }(e3)), this._configMap.set(Wo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.UPDATE_CONVERSATION_GROUP) }), body: { fromAccount: "", updateType: void 0, updateGroup: void 0 }, keyMap: { request: {}, response: {} } }; }(e3)), this._configMap.set(Yo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.GET_CONVERSATION_GROUP_LIST) }), body: { fromAccount: "", startTime: void 0, startIndex: void 0 }, keyMap: { request: {}, response: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType", CustomMark: "customData", ContactGroupId: "convGroupIDList" } } }; }(e3)), this._configMap.set(mo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.PROFILE, ".").concat(V.CMD.PORTRAIT_GET) }), body: { fromAccount: "", userItem: [] }, keyMap: { request: { toAccount: "To_Account", standardSequence: "StandardSequence", customSequence: "CustomSequence" } } }; }(e3)), this._configMap.set(Mo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.PROFILE, ".").concat(V.CMD.PORTRAIT_SET) }), body: { fromAccount: "", profileItem: [{ tag: He.NICK, value: "" }, { tag: He.GENDER, value: "" }, { tag: He.ALLOWTYPE, value: "" }, { tag: He.AVATAR, value: "" }] }, keyMap: { request: { toAccount: "To_Account", standardSequence: "StandardSequence", customSequence: "CustomSequence" } } }; }(e3)), this._configMap.set(yo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.FRIEND, ".").concat(V.CMD.GET_BLACKLIST) }), body: { fromAccount: "", startIndex: 0, maxLimited: 30, lastSequence: 0 }, keyMap: { response: { CurruentSequence: "currentSequence" } } }; }(e3)), this._configMap.set(Io, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.FRIEND, ".").concat(V.CMD.ADD_BLACKLIST) }), body: { fromAccount: "", toAccount: [] } }; }(e3)), this._configMap.set(Co, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.FRIEND, ".").concat(V.CMD.DELETE_BLACKLIST) }), body: { fromAccount: "", toAccount: [] } }; }(e3)), this._configMap.set(aa, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.SET_SELF_STATUS) }), body: { customStatus: "" }, keyMap: {} }; }(e3)), this._configMap.set(ia, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.GET_USER_STATUS) }), body: { userIDList: void 0 }, keyMap: { response: { UserStatusList: "successUserList", ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID", Status: "statusType" } } }; }(e3)), this._configMap.set(ra, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.SUBSCRIBE_USER_STATUS) }), body: { userIDList: void 0 }, keyMap: { response: { ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID" } } }; }(e3)), this._configMap.set(ua, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.UNSUBSCRIBE_USER_STATUS) }), body: { userIDList: void 0, unsubscribeAll: void 0 }, keyMap: { response: { ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID" } } }; }(e3)), this._configMap.set(jo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_JOINED_GROUPS) }), body: { memberAccount: "", limit: void 0, offset: void 0, groupType: void 0, responseFilter: { groupBaseInfoFilter: void 0, selfInfoFilter: void 0 }, isSupportTopic: 0 }, keyMap: { request: { memberAccount: "Member_Account" }, response: { GroupIdList: "groups", NoUnreadSeqList: "excludedUnreadSequenceList", MsgSeq: "readedSequence", LastRecallTime: "_lastRevokedTime" } } }; }(e3)), this._configMap.set(zo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_INFO) }), body: { groupIDList: void 0, responseFilter: { groupBaseInfoFilter: ["Type", "Name", "Introduction", "Notification", "FaceUrl", "Owner_Account", "CreateTime", "InfoSeq", "LastInfoTime", "LastMsgTime", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "NextMsgSeq", "ShutUpAllMember"], groupCustomFieldFilter: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 } }, keyMap: { request: { groupIDList: "GroupIdList", groupCustomField: "AppDefinedData", memberCustomField: "AppMemberDefinedData", groupCustomFieldFilter: "AppDefinedDataFilter_Group", memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, response: { GroupIdList: "groups", AppDefinedData: "groupCustomField", AppMemberDefinedData: "memberCustomField", AppDefinedDataFilter_Group: "groupCustomFieldFilter", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", InfoSeq: "infoSequence", MemberList: "members", GroupInfo: "groups", ShutUpUntil: "muteUntil", ShutUpAllMember: "muteAllMembers" } } }; }(e3)), this._configMap.set(Jo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.CREATE_GROUP) }), body: { type: void 0, name: void 0, groupID: void 0, ownerID: void 0, introduction: void 0, notification: void 0, maxMemberNum: void 0, joinOption: void 0, memberList: void 0, groupCustomField: void 0, memberCustomField: void 0, webPushFlag: 1, avatar: "", isSupportTopic: void 0, inviteOption: void 0 }, keyMap: { request: { ownerID: "Owner_Account", userID: "Member_Account", avatar: "FaceUrl", maxMemberNum: "MaxMemberCount", joinOption: "ApplyJoinOption", groupCustomField: "AppDefinedData", memberCustomField: "AppMemberDefinedData", inviteOption: "InviteJoinOption" }, response: { HugeGroupFlag: "avChatRoomFlag", OverJoinedGroupLimit_Account: "overLimitUserIDList" } } }; }(e3)), this._configMap.set(Xo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.DESTROY_GROUP) }), body: { groupID: void 0 } }; }(e3)), this._configMap.set(Zo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.MODIFY_GROUP_INFO) }), body: { groupID: void 0, name: void 0, introduction: void 0, notification: void 0, avatar: void 0, joinOption: void 0, groupCustomField: void 0, muteAllMembers: void 0, inviteOption: void 0 }, keyMap: { request: { groupCustomField: "AppDefinedData", muteAllMembers: "ShutUpAllMember", joinOption: "ApplyJoinOption", avatar: "FaceUrl", inviteOption: "InviteJoinOption" }, response: { AppDefinedData: "groupCustomField", ShutUpAllMember: "muteAllMembers" } } }; }(e3)), this._configMap.set(Qo, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.APPLY_JOIN_GROUP) }), body: { groupID: void 0, applyMessage: void 0, userDefinedField: void 0, webPushFlag: 1, historyMessageFlag: void 0 }, keyMap: { request: { applyMessage: "ApplyMsg", historyMessageFlag: "HugeGroupHistoryMsgFlag" }, response: { HugeGroupFlag: "avChatRoomFlag", AVChatRoomKey: "avChatRoomKey", RspMsgList: "messageList", ToGroupId: "to" } } }; }(e3)), this._configMap.set($o, function(e4) { return e4.a2, e4.tinyid, { head: t(t({}, g(e4, Br)), {}, { servcmd: "".concat(V.NAME.BIG_GROUP_NO_AUTH, ".").concat(V.CMD.APPLY_JOIN_GROUP) }), body: { groupID: void 0, applyMessage: void 0, userDefinedField: void 0, webPushFlag: 1 }, keyMap: { request: { applyMessage: "ApplyMsg" }, response: { HugeGroupFlag: "avChatRoomFlag" } } }; }(e3)), this._configMap.set(es, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.QUIT_GROUP) }), body: { groupID: void 0 } }; }(e3)), this._configMap.set(ts, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.SEARCH_GROUP_BY_ID) }), body: { groupIDList: void 0, responseFilter: { groupBasePublicInfoFilter: ["Type", "Name", "Introduction", "Notification", "FaceUrl", "CreateTime", "Owner_Account", "LastInfoTime", "LastMsgTime", "NextMsgSeq", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "InviteJoinOption"] } }, keyMap: { response: {} } }; }(e3)), this._configMap.set(ns, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.CHANGE_GROUP_OWNER) }), body: { groupID: void 0, newOwnerID: void 0 }, keyMap: { request: { newOwnerID: "NewOwner_Account" } } }; }(e3)), this._configMap.set(os2, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.HANDLE_APPLY_JOIN_GROUP) }), body: { groupID: void 0, applicant: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, messageKey: void 0, userDefinedField: void 0 }, keyMap: { request: { applicant: "Applicant_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg", messageKey: "MsgKey" } } }; }(e3)), this._configMap.set(ss, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.HANDLE_INVITE_JOIN_GROUP) }), body: { groupID: void 0, applicant: void 0, invitee: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, userDefinedField: void 0 }, keyMap: { request: { applicant: "Applicant_Account", invitee: "Invited_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg" } } }; }(e3)), this._configMap.set(as, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.HANDLE_GROUP_INVITATION) }), body: { groupID: void 0, inviter: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, messageKey: void 0, userDefinedField: void 0 }, keyMap: { request: { inviter: "Inviter_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg", messageKey: "MsgKey" } } }; }(e3)), this._configMap.set(hs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_APPLICATION) }), body: { startTime: void 0, limit: void 0, handleAccount: void 0 }, keyMap: { request: { handleAccount: "Handle_Account" }, response: { To_Account: "userID" } } }; }(e3)), this._configMap.set(_s, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.DELETE_GROUP_SYSTEM_MESSAGE) }), body: { messageListToDelete: void 0 }, keyMap: { request: { messageListToDelete: "DelMsgList", messageSeq: "MsgSeq", messageRandom: "MsgRandom" } } }; }(e3)), this._configMap.set(fs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.BIG_GROUP_LONG_POLLING, ".").concat(V.CMD.AVCHATROOM_LONG_POLL) }), body: { USP: 1, startSeq: 1, startBroadcastSeq: void 0, holdTime: 90, key: void 0, simplifiedMessage: void 0 }, keyMap: { request: { USP: "USP" }, response: { ToGroupId: "groupID", RspBroadcastMsgList: "broadcastMessageList", IsSystemMsg: "isSystemMessage" } } }; }(e3)), this._configMap.set(vs, function(e4) { return e4.a2, e4.tinyid, { head: t(t({}, g(e4, Hr)), {}, { servcmd: "".concat(V.NAME.BIG_GROUP_LONG_POLLING_NO_AUTH, ".").concat(V.CMD.AVCHATROOM_LONG_POLL) }), body: { USP: 1, startSeq: 1, holdTime: 90, key: void 0, simplifiedMessage: void 0 }, keyMap: { request: { USP: "USP" }, response: { ToGroupId: "groupID", RspBroadcastMsgList: "broadcastMessageList", IsSystemMsg: "isSystemMessage" } } }; }(e3)), this._configMap.set(ms, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_ONLINE_MEMBER_NUM) }), body: { groupID: void 0 } }; }(e3)), this._configMap.set(Is, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.SET_GROUP_ATTRIBUTES) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { request: { key: "key", value: "value" } } }; }(e3)), this._configMap.set(Cs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.MODIFY_GROUP_ATTRIBUTES) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { request: { key: "key", value: "value" } } }; }(e3)), this._configMap.set(Ts, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.DELETE_GROUP_ATTRIBUTES) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { request: { key: "key" } } }; }(e3)), this._configMap.set(Ds, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.CLEAR_GROUP_ATTRIBUTES) }), body: { groupID: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] } }; }(e3)), this._configMap.set(ks, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_ATTR, ".").concat(V.CMD.GET_GROUP_ATTRIBUTES) }), body: { groupID: void 0, avChatRoomKey: void 0, groupType: 1 }, keyMap: { request: { avChatRoomKey: "Key", groupType: "GroupType" } } }; }(e3)), this._configMap.set(Ls, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_NOTIFY) }), body: { notifyType: 1, groupID: "", beginTime: 0, endTime: 0, limit: 20 }, keyMap: { request: {}, response: { NextMsgTime: "nextRevokedTime", NotifyMsgList: "notifyList" } } }; }(e3)), this._configMap.set(As, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.UPDATE_GROUP_COUNTER) }), body: { groupID: void 0, counterList: void 0, avChatRoomKey: void 0, mode: void 0 }, keyMap: { request: { counterList: "GroupCounter" } } }; }(e3)), this._configMap.set(Rs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_COUNTER) }), body: { groupID: void 0, keyList: [], avChatRoomKey: void 0 }, keyMap: { request: { keyList: "GroupCounterKeys" } } }; }(e3)), this._configMap.set(ta, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(V.CMD.CREATE_TOPIC) }), body: { groupID: void 0, topicName: void 0, avatar: void 0, customData: void 0, topicID: void 0, notification: void 0, introduction: void 0 }, keyMap: { request: { avatar: "FaceUrl" } } }; }(e3)), this._configMap.set(na, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(V.CMD.DELETE_TOPIC) }), body: { groupID: void 0, topicIDList: void 0 }, keyMap: { request: { topicIDList: "TopicIdList" }, response: { DestroyResultItem: "resultList" } } }; }(e3)), this._configMap.set(oa, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(V.CMD.UPDATE_TOPIC_PROFILE) }), body: { groupID: void 0, topicID: void 0, avatar: void 0, customData: void 0, notification: void 0, introduction: void 0, muteAllMembers: void 0, topicName: void 0 }, keyMap: { request: { avatar: "FaceUrl", muteAllMembers: "ShutUpAllMember" } } }; }(e3)), this._configMap.set(sa, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(V.CMD.GET_TOPIC_LIST) }), body: { groupID: void 0, topicIDList: void 0, MemberInfoFilter: ["NoUnreadSeqList"] }, keyMap: { request: { topicIDList: "TopicIdList" }, response: { TopicAndSelfInfo: "topicInfoList", TopicInfo: "topic", GroupID: "groupID", ShutUpTime: "muteTime", ShutUpAllFlag: "muteAllMembers", LastMsgTime: "lastMessageTime", MsgSeq: "readedSequence", LastMsgSeq: "sequence", NoUnreadSeqList: "excludedUnreadSequenceList" } } }; }(e3)), this._configMap.set(Ns, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_MEMBER_LIST) }), body: { groupID: void 0, limit: 0, offset: void 0, next: void 0, memberRoleFilter: void 0, memberInfoFilter: ["Role", "NameCard", "ShutUpUntil", "JoinTime"], memberCustomFieldFilter: void 0 }, keyMap: { request: { memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, response: { AppMemberDefinedData: "memberCustomField", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", MemberList: "members", ShutUpUntil: "muteUntil" } } }; }(e3)), this._configMap.set(Os, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_AVCHATROOM, ".").concat(V.CMD.GET_AVCHATROOM_MEMBER_LIST) }), body: { groupID: void 0, offset: void 0, filter: void 0 }, keyMap: { request: { offset: "Timestamp", filter: "Mark" }, response: { NextTimestamp: "offset" } } }; }(e3)), this._configMap.set(Gs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_MEMBER_INFO) }), body: { groupID: void 0, userIDList: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 }, keyMap: { request: { userIDList: "Member_List_Account", memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, response: { MemberList: "members", ShutUpUntil: "muteUntil", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", AppMemberDefinedData: "memberCustomField" } } }; }(e3)), this._configMap.set(Us, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.ADD_GROUP_MEMBER) }), body: { groupID: void 0, silence: void 0, userIDList: void 0 }, keyMap: { request: { userID: "Member_Account", userIDList: "MemberList" }, response: { MemberList: "members" } } }; }(e3)), this._configMap.set(Ps, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.DELETE_GROUP_MEMBER) }), body: { groupID: void 0, userIDList: void 0, reason: void 0 }, keyMap: { request: { userIDList: "MemberToDel_Account" } } }; }(e3)), this._configMap.set(bs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.BAN_AVCHATROOM_MEMBER) }), body: { groupID: void 0, userIDList: void 0, duration: void 0, reason: "" }, keyMap: { request: { userIDList: "Members_Account", duration: "Duration", reason: "Description" } } }; }(e3)), this._configMap.set(ws, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.MODIFY_GROUP_MEMBER_INFO) }), body: { groupID: void 0, topicID: void 0, userID: void 0, messageRemindType: void 0, nameCard: void 0, role: void 0, memberCustomField: void 0, muteTime: void 0 }, keyMap: { request: { userID: "Member_Account", memberCustomField: "AppMemberDefinedData", muteTime: "ShutUpTime", messageRemindType: "MsgFlag" } } }; }(e3)), this._configMap.set(Fs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_AVCHATROOM, ".").concat(V.CMD.MARK_AVCHATROOM_MEMBER_INFO) }), body: { groupID: void 0, operationType: 1, memberList: [] }, keyMap: { request: { operationType: "CommandType", memberList: "MemberList", markType: "Marks", userID: "Member_Account" }, response: { CommandType: "operationType", Marks: "markType", Member_Account: "userID" } } }; }(e3)), this._configMap.set(Bs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STAT, ".").concat(V.CMD.TIM_WEB_REPORT_V2) }), body: { header: {}, event: [], quality: [] }, keyMap: { request: { SDKType: "sdk_type", SDKVersion: "sdk_version", deviceType: "device_type", platform: "platform", instanceID: "instance_id", traceID: "trace_id", SDKAppID: "sdk_app_id", userID: "user_id", tinyID: "tiny_id", extension: "extension", timestamp: "timestamp", networkType: "network_type", eventType: "event_type", code: "error_code", message: "error_message", moreMessage: "more_message", duplicate: "duplicate", costTime: "cost_time", level: "level", qualityType: "quality_type", reportIndex: "report_index", wholePeriod: "whole_period", totalCount: "total_count", rttCount: "success_count_business", successRateOfRequest: "percent_business", countLessThan1Second: "success_count_business", percentOfCountLessThan1Second: "percent_business", countLessThan3Second: "success_count_platform", percentOfCountLessThan3Second: "percent_platform", successCountOfBusiness: "success_count_business", successRateOfBusiness: "percent_business", successCountOfPlatform: "success_count_platform", successRateOfPlatform: "percent_platform", successCountOfMessageReceived: "success_count_business", successRateOfMessageReceived: "percent_business", avgRTT: "average_value", avgDelay: "average_value", avgValue: "average_value", uiPlatform: "ui_platform" } } }; }(o2)), this._configMap.set(Hs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.HEARTBEAT, ".").concat(V.CMD.ALIVE) }), body: {} }; }(e3)), this._configMap.set(Ks, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_PUSH, ".").concat(V.CMD.MESSAGE_PUSH) }), body: {}, keyMap: { response: { C2cMsgArray: "C2CMessageArray", GroupMsgArray: "groupMessageArray", GroupTips: "groupTips", C2cNotifyMsgArray: "C2CNotifyMessageArray", C2cMsgInfo: "C2CReadReceiptArray", ClientSeq: "clientSequence", MsgPriority: "priority", NoticeSeq: "noticeSequence", MsgContent: "content", MsgType: "type", MsgBody: "elements", ToGroupId: "to", Desc: "description", Ext: "extension", IsSyncMsg: "isSyncMessage", Flag: "needSync", NeedAck: "needAck", PendencyAdd_Account: "userID", ProfileImNick: "nick", PendencyType: "applicationType", C2CReadAllMsg: "readAllC2CMessage", IsNeedReadReceipt: "needReadReceipt", Status: "statusType" } } }; }(e3)), this._configMap.set(Ws, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_PUSH, ".").concat(V.CMD.MULTI_MESSAGE_PUSH) }), body: {}, keyMap: { response: { GroupMsgArray: "groupMessageArray", GroupTips: "groupTips", ClientSeq: "clientSequence", MsgPriority: "priority", NoticeSeq: "noticeSequence", MsgContent: "content", MsgType: "type", MsgBody: "elements", ToGroupId: "to", Desc: "description", Ext: "extension", IsSyncMsg: "isSyncMessage", Flag: "needSync", NeedAck: "needAck", PendencyType: "applicationType" } } }; }(e3)), this._configMap.set(Ys, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.MESSAGE_PUSH_ACK) }), body: { sessionData: void 0 }, keyMap: { request: { sessionData: "SessionData" } } }; }(e3)), this._configMap.set(js, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.STATUS_FORCE_OFFLINE) }), body: {}, keyMap: { response: { C2cNotifyMsgArray: "C2CNotifyMessageArray", NoticeSeq: "noticeSequence", KickoutMsgNotify: "kickoutMsgNotify", NewInstInfo: "newInstanceInfo" } } }; }(e3)), this._configMap.set(Js, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_LONG_MESSAGE, ".").concat(V.CMD.DOWNLOAD_MERGER_MESSAGE) }), body: { downloadKey: "" }, keyMap: { response: { Data: "data", Desc: "description", Ext: "extension", Download_Flag: "downloadFlag", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID" } } }; }(e3)), this._configMap.set(zs, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_LONG_MESSAGE, ".").concat(V.CMD.UPLOAD_MERGER_MESSAGE) }), body: { messageList: [] }, keyMap: { request: { fromAccount: "From_Account", toAccount: "To_Account", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom", msgBody: "MsgBody", type: "MsgType", content: "MsgContent", data: "Data", description: "Desc", extension: "Ext", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", elements: "MsgBody", clientSequence: "ClientSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody" } } }; }(e3)), this._configMap.set(da, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.SET_TOKEN) }), body: { tokenID: "", pushMsg: 0, sdkAppID: 0, businessID: "", deviceBrand: "", deviceToken: "", isTpns: 0, isWebUniapp: 0 }, keyMap: { request: { tokenID: "TokenID", pushMsg: "PushMsg", sdkAppID: "EnterVersion", businessID: "BusiID", deviceBrand: "InstType", deviceToken: "VarToken", isTpns: "IsTpns" } } }; }(e3)), this._configMap.set(la, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.STAT_FOREGROUND) }), body: { isWebUniapp: 0 } }; }(e3)), this._configMap.set(ca, function(e4) { return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.STAT_BACKGROUND) }), body: { C2CUnread: 0, GroupUnread: 0, isWebUniapp: 0 }, keyMap: { request: { c2cUnreadCount: "C2cUnread", groupUnreadCount: "GrpUnread" } } }; }(e3)); } }, { key: "has", value: function(e3) { return this._configMap.has(e3); } }, { key: "get", value: function(e3) { return this._configMap.get(e3); } }, { key: "update", value: function() { this._fillConfigMap(); } }, { key: "getKeyMap", value: function(e3) { return this.has(e3) ? this.get(e3).keyMap || {} : (Ve.w("".concat(this._n, ".getKeyMap unknown protocolName:").concat(e3)), {}); } }, { key: "getProtocolData", value: function(e3) { var t2 = e3.protocolName, n2 = e3.requestData, o2 = this.get(t2), s2 = null; if (n2) { var a2 = this._simpleDeepCopy(o2), i2 = this._updateService(n2, a2), r2 = i2.body, u2 = /* @__PURE__ */ Object.create(null); for (var c2 in r2) if (Object.prototype.hasOwnProperty.call(r2, c2)) { if (u2[c2] = r2[c2], void 0 === n2[c2]) continue; u2[c2] = n2[c2]; } i2.body = u2, s2 = this._getUplinkData(i2); } else s2 = this._getUplinkData(o2); return s2; } }, { key: "_getUplinkData", value: function(e3) { var t2 = this._requestDataCleaner(e3), n2 = bt(t2.head), o2 = Sr(t2.body, this._getRequestKeyMap(n2)); return t2.body = o2, t2; } }, { key: "_updateService", value: function(e3, t2) { var n2 = bt(t2.head); if (this._isFromGroupRequest(t2)) { var o2 = e3.type, s2 = e3.groupID, a2 = void 0 === s2 ? void 0 : s2, i2 = e3.groupIDList, r2 = void 0 === i2 ? [] : i2; it(a2) && (a2 = r2[0] || ""), Dt({ type: o2, groupID: a2 }) && (t2.head.servcmd = "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(n2)); } return t2; } }, { key: "_isFromGroupRequest", value: function(e3) { return e3.head.servcmd.includes(V.NAME.GROUP) || e3.head.servcmd.includes(V.NAME.GROUP_ATTR); } }, { key: "_getRequestKeyMap", value: function(e3) { var n2 = this.getKeyMap(e3); return t(t({}, Dr.request), n2.request); } }, { key: "_requestDataCleaner", value: function(e3) { var t2 = Array.isArray(e3) ? [] : /* @__PURE__ */ Object.create(null); for (var o2 in e3) Object.prototype.hasOwnProperty.call(e3, o2) && dt(o2) && null !== e3[o2] && void 0 !== e3[o2] && ("object" !== n(e3[o2]) ? t2[o2] = e3[o2] : t2[o2] = this._requestDataCleaner.bind(this)(e3[o2])); return t2; } }, { key: "_simpleDeepCopy", value: function(e3) { for (var t2, n2 = Object.keys(e3), o2 = {}, s2 = 0, a2 = n2.length; s2 < a2; s2++) t2 = n2[s2], at(e3[t2]) ? o2[t2] = Array.from(e3[t2]) : ot(e3[t2]) ? o2[t2] = this._simpleDeepCopy(e3[t2]) : o2[t2] = e3[t2]; return o2; } }]), e2; }(), Wr = [Ys], Yr = function() { function e2(t2) { o(this, e2), this._sessionModule = t2, this._n = "DownlinkHandler", this._eventHandlerMap = /* @__PURE__ */ new Map(), this._eventHandlerMap.set("C2CMessageArray", this._c2cMessageArrayHandler.bind(this)), this._eventHandlerMap.set("groupMessageArray", this._groupMessageArrayHandler.bind(this)), this._eventHandlerMap.set("groupTips", this._groupTipsHandler.bind(this)), this._eventHandlerMap.set("C2CNotifyMessageArray", this._C2CNotifyMessageArrayHandler.bind(this)), this._eventHandlerMap.set("C2CReadReceiptArray", this._C2CReadReceiptArrayHandler.bind(this)), this._eventHandlerMap.set("profileModify", this._profileHandler.bind(this)), this._eventHandlerMap.set("friendListMod", this._relationChainHandler.bind(this)), this._eventHandlerMap.set("recentContactMod", this._recentContactHandler.bind(this)), this._eventHandlerMap.set("readAllC2CMessage", this._allMessageReadHandler.bind(this)), this._eventHandlerMap.set("c2cMessageModified", this._c2cMessageModifiedHandler.bind(this)), this._eventHandlerMap.set("groupMessageModified", this._groupMessageModifiedHandler.bind(this)), this._eventHandlerMap.set("userStatusList", this._userStatusListHandler.bind(this)), this._eventHandlerMap.set("messageExtensionNotify", this._messageExtensionNotifyHandler.bind(this)), this._keys = m(this._eventHandlerMap.keys()); } return a(e2, [{ key: "_c2cMessageArrayHandler", value: function(e3) { var t2 = this._sessionModule.getModule(Un); if (t2) { if (e3.dataList.forEach(function(e4) { if (1 === e4.isSyncMessage) { var t3 = e4.from; e4.from = e4.to, e4.to = t3; } }), 1 === e3.needSync) this._sessionModule.getModule(jn).startOnlineSync(); t2.onNewC2CMessage({ dataList: e3.dataList, isInstantMessage: true }); } } }, { key: "_c2cMessageModifiedHandler", value: function(e3) { var t2 = this._sessionModule.getModule(Un); t2 && t2.onC2CMessageModified(e3); } }, { key: "_groupMessageArrayHandler", value: function(e3) { var t2 = this._sessionModule.getModule(Pn); t2 && t2.onNewGroupMessage({ event: e3.event, dataList: e3.dataList, isInstantMessage: true }); } }, { key: "_groupMessageModifiedHandler", value: function(e3) { var t2 = this._sessionModule.getModule(Pn); t2 && t2.onGroupMessageModified(e3); } }, { key: "_groupTipsHandler", value: function(e3) { var t2 = this._sessionModule.getModule(Pn); if (t2) { var n2 = e3.event, o2 = e3.dataList, s2 = e3.isInstantMessage, a2 = void 0 === s2 || s2, i2 = e3.isSyncingEnded; switch (n2) { case 4: case 6: t2.onNewGroupTips({ event: n2, dataList: o2 }); break; case 5: for (var r2 = 0; r2 < o2.length; r2++) if (at(o2[r2].elements.revokedInfos)) t2.onGroupMessageRevoked({ dataList: o2 }); else if (at(o2[r2].elements.groupMessageReadNotice)) t2.onGroupMessageReadNotice({ dataList: o2 }); else { if (!at(o2[r2].elements.readReceiptList)) { t2.onNewGroupSystemNotice({ dataList: o2, isInstantMessage: a2, isSyncingEnded: i2 }); break; } t2.onReadReceiptList({ dataList: o2 }); } break; case 12: this._sessionModule.getModule(qn).onNewGroupAtTips({ dataList: o2 }); break; default: Ve.l("".concat(this._n, "._groupTipsHandler unknown event:").concat(n2, " dataList:"), o2); } } } }, { key: "_C2CNotifyMessageArrayHandler", value: function(e3) { var t2 = this, n2 = e3.dataList; if (at(n2)) { var o2 = this._sessionModule.getModule(Un); n2.forEach(function(e4) { if (st(e4)) { if (e4.hasOwnProperty("kickoutMsgNotify")) { var s2 = e4.kickoutMsgNotify, a2 = s2.kickType, i2 = s2.newInstanceInfo, r2 = void 0 === i2 ? {} : i2; 1 === a2 ? t2._sessionModule.onMultipleAccountKickedOut(r2) : 2 === a2 ? t2._sessionModule.onMultipleDeviceKickedOut(r2) : 3 === a2 && t2._sessionModule.onRestApiKickedOut(r2); } else if (e4.hasOwnProperty("c2cMessageRevokedNotify")) o2 && o2.onC2CMessageRevoked({ dataList: n2 }); else if (e4.hasOwnProperty("c2cMessageReadReceipt")) o2 && o2.onC2CMessageReadReceipt({ dataList: n2 }); else if (e4.hasOwnProperty("c2cMessageReadNotice")) o2 && o2.onC2CMessageReadNotice({ dataList: n2 }); else if (e4.hasOwnProperty("muteNotificationsSync")) { t2._sessionModule.getModule(qn).onC2CMessageRemindTypeSynced({ dataList: n2 }); } } }); } } }, { key: "_C2CReadReceiptArrayHandler", value: function(e3) { this._sessionModule.getModule(Un).onReadReceiptList(e3); } }, { key: "_profileHandler", value: function(e3) { this._sessionModule.getModule(Gn).onProfileModified({ dataList: e3.dataList }); var t2 = this._sessionModule.getModule(bn); t2 && t2.onFriendProfileModified({ dataList: e3.dataList }); } }, { key: "_relationChainHandler", value: function(e3) { this._sessionModule.getModule(Gn).onRelationChainModified({ dataList: e3.dataList }); var t2 = this._sessionModule.getModule(bn); t2 && t2.onRelationChainModified({ dataList: e3.dataList }); } }, { key: "_recentContactHandler", value: function(e3) { var t2 = e3.dataList; if (at(t2)) { var n2 = this._sessionModule.getModule(qn); n2 && t2.forEach(function(e4) { var t3 = e4.pushType; if (1 === t3) { var o2 = e4.recentContactDeleteItem; n2.onConversationDeleted(o2.recentContactList); } else if (2 === t3) { var s2 = e4.recentContactTopItem; n2.onConversationPinned(s2.recentContactList); } else if (3 === t3) { var a2 = e4.recentContactTopItem; n2.onConversationUnpinned(a2.recentContactList); } else if (4 === t3) { var i2 = e4.recentContactMarkContact; n2.onConversationMarkUpdated(i2.recentContactMarkContactItem); } else if (5 === t3) { var r2 = e4.recentContactCreateContactGroup; n2.onConversationGroupCreated(r2.msgContactGroupContactItem); } else if (6 === t3) { var u2 = e4.recentContactDelContactGroup; n2.onConversationGroupDeleted(u2.msgGroupItem); } else if (7 === t3) { var c2 = e4.recentContactUpdateContactGroup, l2 = c2.updateType, d2 = c2.msgUpdateGroup, p2 = c2.msgUpdateContact; if (1 === l2) { var g2 = d2.updateGroupType; 1 === g2 ? n2.onConversationGroupNameUpdated(d2) : 2 === g2 && n2.onConversationInGroupUpdated(d2); } else 2 === l2 && n2.onConversationAddedToOrDeletedFromGroup(p2); } }); } } }, { key: "_allMessageReadHandler", value: function(e3) { var t2 = e3.dataList, n2 = this._sessionModule.getModule(qn); n2 && n2.onPushedAllMessageRead(t2); } }, { key: "_userStatusListHandler", value: function(e3) { this._sessionModule.getModule(Gn).onUserStatusUpdated(e3); } }, { key: "_messageExtensionNotifyHandler", value: function(e3) { this._sessionModule.getModule(On).onMessageExtensionNotify(e3); } }, { key: "onMessage", value: function(e3) { var t2 = this, n2 = e3.body; if (this._filterMessageFromIMOpenPush(e3)) { var o2 = n2.eventArray, s2 = n2.isInstantMessage, a2 = n2.isSyncingEnded, i2 = n2.needSync; if (at(o2)) for (var r2 = null, u2 = null, c2 = 0, l2 = 0, d2 = o2.length; l2 < d2; l2++) { c2 = (r2 = o2[l2]).event; var p2 = Object.keys(r2).find(function(e4) { return -1 !== t2._keys.indexOf(e4); }); p2 ? (u2 = 14 === c2 ? { readAllC2CMessage: r2[p2], groupMessageReadInfoList: r2.groupMessageReadNotice || [] } : 16 === c2 ? { userID: r2.userID, readReceiptList: r2[p2] } : r2[p2], this._eventHandlerMap.get(p2)({ event: c2, dataList: u2, isInstantMessage: s2, isSyncingEnded: a2, needSync: i2 })) : Ve.l("".concat(this._n, ".onMessage unknown eventItem:").concat(r2)); } } } }, { key: "_filterMessageFromIMOpenPush", value: function(e3) { var t2 = e3.head, n2 = e3.body, o2 = t2.servcmd, s2 = false; if (it(o2) || (s2 = o2.includes(V.NAME.IM_CONFIG_MANAGER) || o2.includes(V.NAME.OVERLOAD_PUSH) || o2.includes(V.NAME.STAT_SERVICE)), !s2) return true; if (o2.includes(V.CMD.PUSHED_CLOUD_CONTROL_CONFIG)) this._sessionModule.getModule(Zn).onPushedCloudControlConfig(n2); else if (o2.includes(V.CMD.PUSHED_COMMERCIAL_CONFIG)) { this._sessionModule.getModule(to).onPushedConfig(n2); } else if (o2.includes(V.CMD.OVERLOAD_NOTIFY)) this._sessionModule.onPushedServerOverload(n2); else if (o2.includes(V.CMD.KICK_OTHER)) { var a2 = Date.now(); this._sessionModule.reLoginOnKickOther(); var i2 = new Aa("kickOther"), r2 = this._sessionModule.getModule(Rn).getLastWsHelloTs(), u2 = a2 - r2; i2.setMessage("last wshello time:".concat(r2, " diff:").concat(u2, "ms")).setNetworkType(this._sessionModule.getNetworkType()).end(); } return false; } }]), e2; }(), jr = [{ cmd: V.CMD.GET_GROUP_INFO, interval: 1, count: 20 }, { cmd: V.CMD.GET_AVCHATROOM_MEMBER_LIST, interval: 3, count: 1 }, { cmd: V.CMD.GET_GROUP_APPLICATION, interval: 1, count: 15 }, { cmd: V.CMD.GET_TOPIC_LIST, interval: 1, count: 10 }, { cmd: V.CMD.SET_GROUP_ATTRIBUTES, interval: 5, count: 10 }, { cmd: V.CMD.MODIFY_GROUP_ATTRIBUTES, interval: 5, count: 10 }, { cmd: V.CMD.DELETE_GROUP_ATTRIBUTES, interval: 5, count: 10 }, { cmd: V.CMD.CLEAR_GROUP_ATTRIBUTES, interval: 5, count: 10 }, { cmd: V.CMD.GET_GROUP_ATTRIBUTES, interval: 5, count: 20 }, { cmd: V.CMD.UPDATE_GROUP_COUNTER, interval: 5, count: 20 }, { cmd: V.CMD.GET_GROUP_COUNTER, interval: 5, count: 20 }, { cmd: V.CMD.SET_ALL_MESSAGE_READ, interval: 1, count: 1 }, { cmd: V.CMD.GET_USER_STATUS, interval: 5, count: 20 }, { cmd: V.CMD.SUBSCRIBE_USER_STATUS, interval: 5, count: 20 }, { cmd: V.CMD.UNSUBSCRIBE_USER_STATUS, interval: 5, count: 20 }], zr = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; return o(this, s2), (t2 = n2.call(this, e3))._n = "SessionModule", t2._platform = t2.getPlatform(), t2._protocolHandler = new Kr(h(t2)), t2._messageDispatcher = new Yr(h(t2)), t2._commandFrequencyLimitMap = /* @__PURE__ */ new Map(), t2._commandRequestInfoMap = /* @__PURE__ */ new Map(), t2._serverOverloadInfoMap = /* @__PURE__ */ new Map(), t2._init(), t2.getInnerEmitterInstance().on(ti, t2._onCloudConfigUpdated, h(t2)), t2; } return a(s2, [{ key: "_init", value: function() { this._updateCommandFrequencyLimitMap(jr); } }, { key: "_onCloudConfigUpdated", value: function() { var e3 = this.getCloudConfig("cmd_frequency_limit"); it(e3) || (e3 = JSON.parse(e3), this._updateCommandFrequencyLimitMap(e3)); } }, { key: "_updateCommandFrequencyLimitMap", value: function(e3) { var t2 = this; e3.forEach(function(e4) { t2._commandFrequencyLimitMap.set(e4.cmd, { interval: e4.interval, count: e4.count }); }); } }, { key: "updateProtocolConfig", value: function() { this._protocolHandler.update(); } }, { key: "request", value: function(e3) { Ve.d("".concat(this._n, ".request options:"), e3); var t2 = e3.protocolName, n3 = e3.tjgID; if (!this._protocolHandler.has(t2)) return Ve.w("".concat(this._n, ".request unknown protocol:").concat(t2)), Za({ code: ha.CANNOT_FIND_PROTOCOL }); var o2 = this.getProtocolData(e3), s3 = o2.head.servcmd; if (this._isFrequencyOverLimit(s3)) return Za({ code: ha.OVER_FREQUENCY_LIMIT }); if (this._isServerOverload(s3)) return Za({ code: ha.OPEN_SERVICE_OVERLOAD_ERROR }); zt(n3) || (o2.head.tjgID = n3); var a2 = this.getModule(Jn); return Wr.includes(t2) ? a2.simplySend(o2) : a2.send(o2); } }, { key: "getKeyMap", value: function(e3) { return this._protocolHandler.getKeyMap(e3); } }, { key: "genCommonHead", value: function() { var e3 = this.getModule(xn); return { ver: "v4", platform: this._platform, websdkappid: O, websdkversion: N, a2: e3.getA2Key() || void 0, tinyid: e3.getTinyID() || void 0, status_instid: e3.getStatusInstanceID(), sdkappid: e3.getSDKAppID(), contenttype: e3.getContentType(), reqtime: 0, identifier: e3.getA2Key() ? void 0 : e3.getUserID(), usersig: e3.getA2Key() ? void 0 : e3.getUserSig(), sdkability: 192371, tjgID: "" }; } }, { key: "genCosSpecifiedHead", value: function() { var e3 = this.getModule(xn); return { ver: "v4", platform: this._platform, websdkappid: O, websdkversion: N, sdkappid: e3.getSDKAppID(), contenttype: e3.getContentType(), reqtime: 0, identifier: e3.getUserID(), usersig: e3.getUserSig(), status_instid: e3.getStatusInstanceID(), sdkability: 192371 }; } }, { key: "genSSOReportHead", value: function() { var e3 = this.getModule(xn); return { ver: "v4", platform: this._platform, websdkappid: O, websdkversion: N, sdkappid: e3.getSDKAppID(), contenttype: "", reqtime: 0, identifier: "", usersig: "", status_instid: e3.getStatusInstanceID(), sdkability: 192371 }; } }, { key: "getProtocolData", value: function(e3) { return this._protocolHandler.getProtocolData(e3); } }, { key: "trans", value: function(e3) { var n3 = e3.servcmd, o2 = e3.data, s3 = { head: t(t({}, this.genCommonHead()), {}, { servcmd: n3 }), body: o2 }; return this.getModule(Jn).send(s3); } }, { key: "sendComboMessage", value: function(e3) { var n3 = e3.servcmd, o2 = e3.data, s3 = { head: t(t({}, this.genCommonHead()), {}, { servcmd: n3 }), body: o2 }; return this.getModule(Jn).send(s3); } }, { key: "onErrorCodeNotZero", value: function(e3) { var t2 = e3.errorCode; if (t2 === ha.HELLO_ANSWER_KICKED_OUT) { var n3 = e3.kickType, o2 = e3.newInstanceInfo, s3 = void 0 === o2 ? {} : o2; 1 === n3 ? this.onMultipleAccountKickedOut(s3) : 2 === n3 ? this.onMultipleDeviceKickedOut(s3) : 3 === n3 && this.onRestApiKickedOut(s3); } t2 !== ha.MESSAGE_A2KEY_EXPIRED && t2 !== ha.ACCOUNT_A2KEY_EXPIRED || (this._onUserSigExpired(), this.getModule(Jn).reConnect()); } }, { key: "onMessage", value: function(e3) { var t2 = e3.body, n3 = t2.needAck, o2 = void 0 === n3 ? 0 : n3, s3 = t2.sessionData; 1 === o2 && this._sendACK(s3), this._messageDispatcher.onMessage(e3); } }, { key: "onReconnected", value: function() { this._reLoginOnReconnected(); } }, { key: "reLoginOnKickOther", value: function() { Ve.l("".concat(this._n, ".reLoginOnKickOther")), this._reLogin(); } }, { key: "_reLoginOnReconnected", value: function() { Ve.l("".concat(this._n, "._reLoginOnReconnected")), this._reLogin(); } }, { key: "_reLogin", value: function() { var e3 = this; if (this.isLoggedIn()) { var t2 = 0, n3 = this.getModule(no); n3.canIUseOfflinePush() && (t2 = n3.getUniAppPlatform()), this.request({ protocolName: co, requestData: { isWebUniapp: t2 } }).then(function(t3) { var n4 = t3.data.instanceID; e3.getModule(xn).setStatusInstanceID(n4), Ve.l("".concat(e3._n, "._reLogin ok.")), e3.getModule(qn).syncConversationList().then(function() { Ve.l("".concat(e3._n, "._reLogin, sync conversation list ok.")), e3.getModule($n).start(); }), e3.getModule(Pn).updateLocalMainSequenceOnReconnected(); var o2 = e3.getModule(Fn); o2.resetGetTopicTime(), o2.getTopicListOnReconnected(); }); } } }, { key: "onMultipleAccountKickedOut", value: function(e3) { this.getModule(Rn).onMultipleAccountKickedOut(e3); } }, { key: "onMultipleDeviceKickedOut", value: function(e3) { this.getModule(Rn).onMultipleDeviceKickedOut(e3); } }, { key: "_onUserSigExpired", value: function() { this.getModule(Rn).onUserSigExpired(); } }, { key: "onRestApiKickedOut", value: function(e3) { this.getModule(Rn).onRestApiKickedOut(e3); } }, { key: "_sendACK", value: function(e3) { this.request({ protocolName: Ys, requestData: { sessionData: e3 } }); } }, { key: "_isFrequencyOverLimit", value: function(e3) { var t2 = e3.split(".")[1]; if (!this._commandFrequencyLimitMap.has(t2)) return false; if (!this._commandRequestInfoMap.has(t2)) return this._commandRequestInfoMap.set(t2, { startTime: Date.now(), requestCount: 1 }), false; var n3 = this._commandFrequencyLimitMap.get(t2), o2 = n3.count, s3 = n3.interval, a2 = this._commandRequestInfoMap.get(t2), i2 = a2.startTime, r2 = a2.requestCount; if (Date.now() - i2 > 1e3 * s3) return this._commandRequestInfoMap.set(t2, { startTime: Date.now(), requestCount: 1 }), false; r2 += 1, this._commandRequestInfoMap.set(t2, { startTime: i2, requestCount: r2 }); var u2 = false; return r2 > o2 && (u2 = true), u2; } }, { key: "_isServerOverload", value: function(e3) { if (!this._serverOverloadInfoMap.has(e3)) return false; var t2 = this._serverOverloadInfoMap.get(e3), n3 = t2.overloadTime, o2 = t2.waitingTime, s3 = false; return Date.now() - n3 <= 1e3 * o2 ? s3 = true : (this._serverOverloadInfoMap.delete(e3), s3 = false), s3; } }, { key: "onPushedServerOverload", value: function(e3) { var t2 = e3.overloadCommand, n3 = e3.waitingTime; this._serverOverloadInfoMap.set(t2, { overloadTime: Date.now(), waitingTime: n3 }), Ve.w("".concat(this._n, ".onPushedServerOverload waitingTime:").concat(n3, "s")); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._updateCommandFrequencyLimitMap(jr), this._commandRequestInfoMap.clear(), this._serverOverloadInfoMap.clear(); } }]), s2; }(uo), Jr = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "MessageLossDetectionModule", s2._maybeLostSequencesMap = /* @__PURE__ */ new Map(), s2._firstRoundRet = [], s2; } return a(n2, [{ key: "onMessageMaybeLost", value: function(e3, t3, n3) { this._maybeLostSequencesMap.has(e3) || this._maybeLostSequencesMap.set(e3, []); for (var o2 = this._maybeLostSequencesMap.get(e3), s2 = 0; s2 < n3; s2++) -1 === o2.indexOf(t3 + s2) && o2.push(t3 + s2); } }, { key: "detectFirstRound", value: function(e3, t3) { var n3 = this._maybeLostSequencesMap.get(e3); if (!zt(n3) && !zt(t3)) { var o2 = n3.filter(function(e4) { return -1 === t3.indexOf(e4); }); 0 === o2.length ? Ve.i("".concat(this._n, ".detectFirstRound no message loss. conversationID:").concat(e3)) : this._firstRoundRet = this._firstRoundRet.concat(o2), n3.length = 0; } } }, { key: "detectSecondRound", value: function(e3, t3) { if (!zt(this._firstRoundRet) && !zt(t3)) { var n3 = this._firstRoundRet.filter(function(e4) { return -1 === t3.indexOf(e4); }); this._firstRoundRet.length = 0; var o2, s2 = n3.length; if (0 !== s2) s2 <= 5 ? o2 = e3 + "-" + n3.join("-") : (n3.sort(function(e4, t4) { return e4 - t4; }), o2 = e3 + " start:" + n3[0] + " end:" + n3[s2 - 1] + " count:" + s2), new Aa("messageLoss").setMessage(o2).setNetworkType(this.getNetworkType()).setLevel("warning").end(), Ve.i("".concat(this._n, ".detectSecondRound message loss detected. conversationID:").concat(e3, " lostSequences:").concat(n3)); } } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._maybeLostSequencesMap.clear(), this._firstRoundRet.length = 0; } }]), n2; }(uo), Xr = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "CloudControlModule", s2._cloudConfig = /* @__PURE__ */ new Map(), s2._expiredTime = 0, s2._version = 0, s2._isFetching = false, s2; } return a(n2, [{ key: "getCloudConfig", value: function(e3) { return it(e3) ? this._cloudConfig : this._cloudConfig.has(e3) ? this._cloudConfig.get(e3) : void 0; } }, { key: "_canFetchConfig", value: function() { return this.isLoggedIn() && !this._isFetching && Date.now() >= this._expiredTime; } }, { key: "fetchConfig", value: function() { var e3 = this, t3 = this._canFetchConfig(); if (Ve.l("".concat(this._n, ".fetchConfig canFetchConfig:").concat(t3)), t3) { var n3 = new Aa("fetchCloudControlConfig"), o2 = this.getModule(xn).getSDKAppID(); this._isFetching = true, this.request({ protocolName: Xs, requestData: { SDKAppID: o2, version: this._version } }).then(function(t4) { e3._isFetching = false, n3.setMessage("version:".concat(e3._version, " newVersion:").concat(t4.data.version, " config:").concat(t4.data.cloudControlConfig)).setNetworkType(e3.getNetworkType()).end(), Ve.l("".concat(e3._n, ".fetchConfig ok")), e3._parseCloudControlConfig(t4.data); }).catch(function(t4) { e3._isFetching = false, e3.probeNetwork().then(function(e4) { var o3 = v(e4, 2), s2 = o3[0], a2 = o3[1]; n3.setError(t4, s2, a2).end(); }), Ve.l("".concat(e3._n, ".fetchConfig failed. error:"), t4), e3._setExpiredTimeOnResponseError(12e4); }); } } }, { key: "onPushedCloudControlConfig", value: function(e3) { Ve.l("".concat(this._n, ".onPushedCloudControlConfig")), new Aa("pushedCloudControlConfig").setNetworkType(this.getNetworkType()).setMessage("newVersion:".concat(e3.version, " config:").concat(e3.cloudControlConfig)).end(), this._parseCloudControlConfig(e3); } }, { key: "onCheckTimer", value: function(e3) { this._canFetchConfig() && this.fetchConfig(); } }, { key: "_parseCloudControlConfig", value: function(e3) { var t3 = this, n3 = "".concat(this._n, "._parseCloudControlConfig"), o2 = e3.errorCode, s2 = e3.errorMessage, a2 = e3.cloudControlConfig, i2 = e3.version, r2 = e3.expiredTime; if (0 === o2) { if (this._version !== i2) { var u2 = null; try { u2 = JSON.parse(a2); } catch (c2) { this.isPrivateNetWork() || Ve.e("".concat(n3, " JSON parse error. cloudControlConfig:"), a2); } u2 && (this._cloudConfig.clear(), Object.keys(u2).forEach(function(e4) { t3._cloudConfig.set(e4, u2[e4]); }), this._version = i2, this.emitInnerEvent(ti)); } this._expiredTime = Date.now() + 1e3 * r2; } else it(o2) ? (Ve.l("".concat(n3, " failed. Invalid message format:"), e3), this._setExpiredTimeOnResponseError(36e5)) : (Ve.e("".concat(n3, " errorCode:").concat(o2, " errorMessage:").concat(s2)), this._setExpiredTimeOnResponseError(12e4)); } }, { key: "_setExpiredTimeOnResponseError", value: function(e3) { this._expiredTime = Date.now() + e3; } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._cloudConfig.clear(), this._expiredTime = 0, this._version = 0, this._isFetching = false; } }]), n2; }(uo), Zr = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "RecoverMessageModule", s2.PULL_LIMIT_COUNT = 15, s2; } return a(n2, [{ key: "start", value: function() { this._recoverGroupChat(), this._recoverC2CChat(); } }, { key: "_recoverGroupChat", value: function() { var e3, t3, n3 = this, o2 = this._getLocalConversationList().filter(function(e4) { return e4.type === E.CONV_GROUP && e4.groupProfile.type !== E.GRP_AVCHATROOM; }), s2 = this.getModule(qn), a2 = 0, i2 = 0, r2 = 0; o2.forEach(function(o3) { var u2 = o3.conversationID, c2 = o3.lastMessage; t3 = u2.replace(E.CONV_GROUP, ""), e3 = s2.getLocalLastMessage(u2), c2 && 0 !== c2.lastSequence && e3 ? (i2 = c2.lastSequence, a2 = e3.sequence, r2 = i2 - a2, a2 > 0 && r2 >= 1 && r2 < 300 ? n3._recoverGroupMessage({ groupID: t3, localLastMessageSequence: a2, remoteLastMessageSequence: i2 }) : n3._getGroupNotify(t3)) : n3._getGroupNotify(t3); }); } }, { key: "_recoverC2CChat", value: function() { var e3, t3 = this, n3 = this._getLocalConversationList().filter(function(e4) { return e4.type === E.CONV_C2C; }), o2 = this.getModule(qn), s2 = 0, a2 = 0, i2 = 0, r2 = [Promise.resolve()]; n3.forEach(function(n4) { var u2 = n4.conversationID, c2 = n4.lastMessage; e3 = o2.getLocalLastMessage(u2), c2 && 0 !== c2.lastTime && e3 && (a2 = c2.lastTime, s2 = e3.time, i2 = a2 - s2, s2 > 0 && i2 >= 1 && i2 <= 600 && r2.push(t3._recoverC2CMessage({ conversationID: u2, localLastMessageTime: s2, remoteLastMessageTime: a2 }))); }), Promise.all(r2).then(function() { Ve.l("".concat(t3._n, "._recoverC2CChat all promise fulfilled, start to sync unread messages")), t3.getModule(jn).startSyncOnReconnected(); }); } }, { key: "_getLocalConversationList", value: function() { return this.getModule(qn).getLocalConversationList(); } }, { key: "_recoverGroupMessage", value: function(e3) { var t3 = this, n3 = "".concat(this._n, "._recoverGroupMessage"); Ve.l("".concat(n3, " options:"), e3); var o2 = e3.groupID, s2 = e3.localLastMessageSequence, a2 = e3.remoteLastMessageSequence; this._getGroupRomaingMessage({ groupID: o2, sequence: s2 }).then(function(e4) { var s3 = e4.data, i2 = s3.complete, r2 = s3.messageList; if (!it(r2)) { var u2 = r2[0].sequence; Ve.l("".concat(n3, " pkgLastMessageSequence:").concat(u2, " complete:").concat(i2)), u2 < a2 && 2 !== i2 && t3._recoverGroupMessage({ groupID: o2, localLastMessageSequence: u2, remoteLastMessageSequence: a2 }), new Aa("recoverMessage").setNetworkType(t3.getNetworkType()).setMessage("groupID:".concat(o2, " complete:").concat(i2, " messageList length:").concat(r2.length)).end(); var c2 = t3.getModule(Pn); r2.length > 1 && r2.sort(function(e5, t4) { return e5.sequence - t4.sequence; }); for (var l2 = 0; l2 < r2.length; l2++) { var d2 = r2[l2]; d2.from !== E.CONV_SYSTEM ? c2.onNewGroupMessage({ dataList: [d2], isInstantMessage: false, updateUnreadCount: false }) : c2.onNewGroupTips({ event: d2.event, dataList: [d2] }); } t3._getGroupNotify(o2); } }); } }, { key: "_getGroupNotify", value: function(e3) { this.getModule(Pn).getGroupNotify(e3); } }, { key: "_getGroupRomaingMessage", value: function(e3) { var t3 = e3.groupID, n3 = e3.sequence; return this.request({ protocolName: cs, requestData: { groupID: t3, count: this.PULL_LIMIT_COUNT, sequence: n3 + this.PULL_LIMIT_COUNT - 1 } }); } }, { key: "_recoverC2CMessage", value: function(e3) { var t3 = this, n3 = "".concat(this._n, "._recoverC2CMessage"); Ve.l("".concat(this._n, "._recoverC2CMessage options:"), e3); var o2 = e3.conversationID, s2 = e3.localLastMessageTime, a2 = e3.remoteLastMessageTime; return this._getC2CRoamingMessage({ conversationID: o2, time: s2 }).then(function(e4) { var s3 = e4.data, i2 = s3.complete, r2 = s3.messageList; if (!it(r2)) { var u2 = r2.length; new Aa("recoverMessage").setNetworkType(t3.getNetworkType()).setMessage("".concat(o2, " complete:").concat(i2, " messageList length:").concat(u2)).end(), t3.getModule(Un).onNewC2CMessage({ dataList: r2, isInstantMessage: true }); var c2 = r2[u2 - 1].time; if (Ve.l("".concat(n3, " pkgLastMessageTime:").concat(c2, " complete:").concat(i2)), c2 < a2 && 1 !== i2) return t3._recoverC2CMessage({ conversationID: o2, localLastMessageTime: c2, remoteLastMessageTime: a2 }); } }); } }, { key: "_getC2CRoamingMessage", value: function(e3) { var t3 = e3.conversationID, n3 = e3.time; return this.request({ protocolName: So, requestData: { peerAccount: t3.replace(E.CONV_C2C, ""), count: this.PULL_LIMIT_COUNT + 1, lastMessageTime: n3, direction: 1 } }); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")); } }]), n2; }(uo), Qr = function() { function e2() { o(this, e2), this._n = "AvgE2EDelay", this._e2eDelayArray = []; } return a(e2, [{ key: "addMessageDelay", value: function(e3) { var t2 = we() - e3; t2 >= 0 && this._e2eDelayArray.push(t2); } }, { key: "_calcAvg", value: function(e3, t2) { if (0 === t2) return 0; var n2 = 0; return e3.forEach(function(e4) { n2 += e4; }), wt(n2 / t2, 1); } }, { key: "_calcCountWithLimit", value: function(e3) { var t2 = e3.e2eDelayArray, n2 = e3.min, o2 = e3.max; return t2.filter(function(e4) { return n2 <= e4 && e4 < o2; }).length; } }, { key: "_calcPercent", value: function(e3, t2) { var n2 = wt(e3 / t2 * 100, 2); return n2 > 100 && (n2 = 100), n2; } }, { key: "_checkE2EDelayException", value: function(e3, t2) { var n2 = e3.filter(function(e4) { return e4 > t2; }); if (n2.length > 0) { var o2 = n2.length, s2 = Math.min.apply(Math, m(n2)), a2 = Math.max.apply(Math, m(n2)), i2 = this._calcAvg(n2, o2), r2 = wt(o2 / e3.length * 100, 2); if (r2 > 50) new Aa("messageE2EDelayException").setMessage("count:".concat(o2, " min:").concat(s2, " max:").concat(a2, " avg:").concat(i2, " percent:").concat(r2)).setLevel("warning").end(); } } }, { key: "getStatResult", value: function() { var e3 = this._e2eDelayArray.length; if (0 === e3) return null; var t2 = m(this._e2eDelayArray), n2 = this._calcCountWithLimit({ e2eDelayArray: t2, min: 0, max: 1 }), o2 = this._calcCountWithLimit({ e2eDelayArray: t2, min: 1, max: 3 }), s2 = this._calcPercent(n2, e3), a2 = this._calcPercent(o2, e3), i2 = this._calcAvg(t2, e3); return this._checkE2EDelayException(t2, 3), t2.length = 0, this.reset(), { totalCount: e3, countLessThan1Second: n2, percentOfCountLessThan1Second: s2, countLessThan3Second: o2, percentOfCountLessThan3Second: a2, avgDelay: i2 }; } }, { key: "reset", value: function() { this._e2eDelayArray.length = 0; } }]), e2; }(), $r = function() { function e2() { o(this, e2), this._n = "AvgRTT", this._requestCount = 0, this._rttArray = []; } return a(e2, [{ key: "addRequestCount", value: function() { this._requestCount += 1; } }, { key: "addRTT", value: function(e3) { this._rttArray.push(e3); } }, { key: "_calcTotalCount", value: function() { return this._requestCount; } }, { key: "_calcRTTCount", value: function(e3) { return e3.length; } }, { key: "_calcSuccessRateOfRequest", value: function(e3, t2) { if (0 === t2) return 0; var n2 = wt(e3 / t2 * 100, 2); return n2 > 100 && (n2 = 100), n2; } }, { key: "_calcAvg", value: function(e3, t2) { if (0 === t2) return 0; var n2 = 0; return e3.forEach(function(e4) { n2 += e4; }), parseInt(n2 / t2); } }, { key: "_calcMax", value: function() { return Math.max.apply(Math, m(this._rttArray)); } }, { key: "_calcMin", value: function() { return Math.min.apply(Math, m(this._rttArray)); } }, { key: "getStatResult", value: function() { var e3 = this._calcTotalCount(), t2 = m(this._rttArray); if (0 === e3) return null; var n2 = this._calcRTTCount(t2), o2 = this._calcSuccessRateOfRequest(n2, e3), s2 = this._calcAvg(t2, n2); return Ve.l("".concat(this._n, ".getStatResult max:").concat(this._calcMax(), " min:").concat(this._calcMin(), " avg:").concat(s2)), this.reset(), { totalCount: e3, rttCount: n2, successRateOfRequest: o2, avgRTT: s2 }; } }, { key: "reset", value: function() { this._requestCount = 0, this._rttArray.length = 0; } }]), e2; }(), eu = function() { function e2() { o(this, e2), this._map = /* @__PURE__ */ new Map(); } return a(e2, [{ key: "initMap", value: function(e3) { var t2 = this; e3.forEach(function(e4) { t2._map.set(e4, { totalCount: 0, successCount: 0, failedCountOfUserSide: 0, costArray: [], fileSizeArray: [] }); }); } }, { key: "addTotalCount", value: function(e3) { return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).totalCount += 1, true); } }, { key: "addSuccessCount", value: function(e3) { return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).successCount += 1, true); } }, { key: "addFailedCountOfUserSide", value: function(e3) { return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).failedCountOfUserSide += 1, true); } }, { key: "addCost", value: function(e3, t2) { return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).costArray.push(t2), true); } }, { key: "addFileSize", value: function(e3, t2) { return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).fileSizeArray.push(t2), true); } }, { key: "_calcSuccessRateOfBusiness", value: function(e3) { if (it(e3) || !this._map.has(e3)) return -1; var t2 = this._map.get(e3), n2 = wt(t2.successCount / t2.totalCount * 100, 2); return n2 > 100 && (n2 = 100), n2; } }, { key: "_calcSuccessRateOfPlatform", value: function(e3) { if (it(e3) || !this._map.has(e3)) return -1; var t2 = this._map.get(e3), n2 = this._calcSuccessCountOfPlatform(e3) / t2.totalCount * 100; return (n2 = wt(n2, 2)) > 100 && (n2 = 100), n2; } }, { key: "_calcTotalCount", value: function(e3) { return it(e3) || !this._map.has(e3) ? -1 : this._map.get(e3).totalCount; } }, { key: "_calcSuccessCountOfBusiness", value: function(e3) { return it(e3) || !this._map.has(e3) ? -1 : this._map.get(e3).successCount; } }, { key: "_calcSuccessCountOfPlatform", value: function(e3) { if (it(e3) || !this._map.has(e3)) return -1; var t2 = this._map.get(e3); return t2.successCount + t2.failedCountOfUserSide; } }, { key: "_calcAvg", value: function(e3) { return it(e3) || !this._map.has(e3) ? -1 : e3 === Ia ? this._calcAvgSpeed(e3) : this._calcAvgCost(e3); } }, { key: "_calcAvgCost", value: function(e3) { var t2 = this._map.get(e3).costArray.length; if (0 === t2) return 0; var n2 = 0; return this._map.get(e3).costArray.forEach(function(e4) { n2 += e4; }), parseInt(n2 / t2); } }, { key: "_calcAvgSpeed", value: function(e3) { var t2 = 0, n2 = 0; return this._map.get(e3).costArray.forEach(function(e4) { t2 += e4; }), this._map.get(e3).fileSizeArray.forEach(function(e4) { n2 += e4; }), parseInt(1e3 * n2 / t2); } }, { key: "getStatResult", value: function(e3) { var t2 = this._calcTotalCount(e3); if (0 === t2) return null; var n2 = this._calcSuccessCountOfBusiness(e3), o2 = this._calcSuccessRateOfBusiness(e3), s2 = this._calcSuccessCountOfPlatform(e3), a2 = this._calcSuccessRateOfPlatform(e3), i2 = this._calcAvg(e3); return this.reset(e3), { totalCount: t2, successCountOfBusiness: n2, successRateOfBusiness: o2, successCountOfPlatform: s2, successRateOfPlatform: a2, avgValue: i2 }; } }, { key: "reset", value: function(e3) { it(e3) ? this._map.clear() : this._map.set(e3, { totalCount: 0, successCount: 0, failedCountOfUserSide: 0, costArray: [], fileSizeArray: [] }); } }]), e2; }(), tu = function() { function e2() { o(this, e2), this._lastMap = /* @__PURE__ */ new Map(), this._currentMap = /* @__PURE__ */ new Map(); } return a(e2, [{ key: "initMap", value: function(e3) { var t2 = this; e3.forEach(function(e4) { t2._lastMap.set(e4, /* @__PURE__ */ new Map()), t2._currentMap.set(e4, /* @__PURE__ */ new Map()); }); } }, { key: "addMessageSequence", value: function(e3) { var t2 = e3.key, n2 = e3.message; if (it(t2) || !this._lastMap.has(t2) || !this._currentMap.has(t2)) return false; var o2 = n2.conversationID, s2 = n2.sequence, a2 = o2.replace(E.CONV_GROUP, ""); if (0 === this._lastMap.get(t2).size) this._addCurrentMap(e3); else if (this._lastMap.get(t2).has(a2)) { var i2 = this._lastMap.get(t2).get(a2), r2 = i2.length - 1; s2 > i2[0] && s2 < i2[r2] ? (i2.push(s2), i2.sort(), this._lastMap.get(t2).set(a2, i2)) : this._addCurrentMap(e3); } else this._addCurrentMap(e3); return true; } }, { key: "_addCurrentMap", value: function(e3) { var t2 = e3.key, n2 = e3.message, o2 = n2.conversationID, s2 = n2.sequence, a2 = o2.replace(E.CONV_GROUP, ""); this._currentMap.get(t2).has(a2) || this._currentMap.get(t2).set(a2, []), this._currentMap.get(t2).get(a2).push(s2); } }, { key: "_copyData", value: function(e3) { if (!it(e3)) { this._lastMap.set(e3, /* @__PURE__ */ new Map()); var t2, n2 = this._lastMap.get(e3), o2 = D(this._currentMap.get(e3)); try { for (o2.s(); !(t2 = o2.n()).done; ) { var s2 = v(t2.value, 2), a2 = s2[0], i2 = s2[1]; n2.set(a2, i2); } } catch (r2) { o2.e(r2); } finally { o2.f(); } n2 = null, this._currentMap.set(e3, /* @__PURE__ */ new Map()); } } }, { key: "getStatResult", value: function(e3) { if (it(this._currentMap.get(e3)) || it(this._lastMap.get(e3))) return null; if (0 === this._lastMap.get(e3).size) return this._copyData(e3), null; var t2 = 0, n2 = 0; if (this._lastMap.get(e3).forEach(function(e4, o3) { var s2 = m(e4.values()), a2 = s2.length, i2 = s2[a2 - 1] - s2[0] + 1; t2 += i2, n2 += a2; }), 0 === t2) return null; var o2 = wt(n2 / t2 * 100, 2); return o2 > 100 && (o2 = 100), this._copyData(e3), { totalCount: t2, successCountOfMessageReceived: n2, successRateOfMessageReceived: o2 }; } }, { key: "reset", value: function() { this._currentMap.clear(), this._lastMap.clear(); } }]), e2; }(), nu = function(e2) { r(s2, e2); var n2 = f(s2); function s2(e3) { var t2; o(this, s2), (t2 = n2.call(this, e3))._n = "QualityStatModule", t2.TAG = "im-ssolog-quality-stat", t2.reportIndex = 0, t2.wholePeriod = false, t2._qualityItems = [_a, fa, va, ma, Ma, ya, Ia, Ca, Ta, Da], t2._messageSentItems = [va, ma, Ma, ya, Ia], t2._messageReceivedItems = [Ca, Ta, Da], t2.REPORT_INTERVAL = 120, t2.REPORT_SDKAPPID_BLACKLIST = [], t2.REPORT_TINYID_WHITELIST = [], t2._statInfoArr = [], t2._avgRTT = new $r(), t2._avgE2EDelay = new Qr(), t2._rateMessageSent = new eu(), t2._rateMessageReceived = new tu(); var a2 = t2.getInnerEmitterInstance(); return a2.on(ei, t2._onLoginSuccess, h(t2)), a2.on(ti, t2._onCloudConfigUpdated, h(t2)), t2; } return a(s2, [{ key: "_onLoginSuccess", value: function() { var e3 = this; this._rateMessageSent.initMap(this._messageSentItems), this._rateMessageReceived.initMap(this._messageReceivedItems); var t2 = this.getModule(Vn), n3 = t2.getItem(this.TAG, false); !zt(n3) && ut(n3.forEach) && (Ve.l("".concat(this._n, "._onLoginSuccess get quality stat logs from local storage, count:").concat(n3.length)), n3.forEach(function(t3) { e3._statInfoArr.push(t3); }), t2.removeItem(this.TAG, false)); } }, { key: "_onCloudConfigUpdated", value: function() { var e3 = this.getCloudConfig("q_rpt_interval"), t2 = this.getCloudConfig("q_rpt_sdkappid_bl"), n3 = this.getCloudConfig("q_rpt_tinyid_wl"); it(e3) || (this.REPORT_INTERVAL = Number(e3)), it(t2) || (this.REPORT_SDKAPPID_BLACKLIST = t2.split(",").map(function(e4) { return Number(e4); })), it(n3) || (this.REPORT_TINYID_WHITELIST = n3.split(",")); } }, { key: "onCheckTimer", value: function(e3) { this.isLoggedIn() && e3 % this.REPORT_INTERVAL == 0 && (this.wholePeriod = true, this._report()); } }, { key: "addRequestCount", value: function() { this._avgRTT.addRequestCount(); } }, { key: "addRTT", value: function(e3) { this._avgRTT.addRTT(e3); } }, { key: "addMessageDelay", value: function(e3) { this._avgE2EDelay.addMessageDelay(e3); } }, { key: "addTotalCount", value: function(e3) { this._rateMessageSent.addTotalCount(e3) || Ve.w("".concat(this._n, ".addTotalCount invalid key:"), e3); } }, { key: "addSuccessCount", value: function(e3) { this._rateMessageSent.addSuccessCount(e3) || Ve.w("".concat(this._n, ".addSuccessCount invalid key:"), e3); } }, { key: "addFailedCountOfUserSide", value: function(e3) { this._rateMessageSent.addFailedCountOfUserSide(e3) || Ve.w("".concat(this._n, ".addFailedCountOfUserSide invalid key:"), e3); } }, { key: "addCost", value: function(e3, t2) { this._rateMessageSent.addCost(e3, t2) || Ve.w("".concat(this._n, ".addCost invalid key or cost:"), e3, t2); } }, { key: "addFileSize", value: function(e3, t2) { this._rateMessageSent.addFileSize(e3, t2) || Ve.w("".concat(this._n, ".addFileSize invalid key or size:"), e3, t2); } }, { key: "addMessageSequence", value: function(e3) { this._rateMessageReceived.addMessageSequence(e3) || Ve.w("".concat(this._n, ".addMessageSequence invalid key:"), e3.key); } }, { key: "_getQualityItem", value: function(e3) { var n3 = {}, o2 = Sa[this.getNetworkType()]; it(o2) && (o2 = 8); var s3 = { qualityType: ka[e3], timestamp: Pe(), networkType: o2, extension: "" }; switch (e3) { case _a: n3 = this._avgRTT.getStatResult(); break; case fa: n3 = this._avgE2EDelay.getStatResult(); break; case va: case ma: case Ma: case ya: case Ia: n3 = this._rateMessageSent.getStatResult(e3); break; case Ca: case Ta: case Da: n3 = this._rateMessageReceived.getStatResult(e3); } return null === n3 ? null : t(t({}, s3), n3); } }, { key: "_report", value: function(e3) { var t2 = this, n3 = [], o2 = null; it(e3) ? this._qualityItems.forEach(function(e4) { null !== (o2 = t2._getQualityItem(e4)) && (o2.reportIndex = t2.reportIndex, o2.wholePeriod = t2.wholePeriod, n3.push(o2)); }) : null !== (o2 = this._getQualityItem(e3)) && (o2.reportIndex = this.reportIndex, o2.wholePeriod = this.wholePeriod, n3.push(o2)), Ve.d("".concat(this._n, "._report"), n3), this._statInfoArr.length > 0 && (n3 = n3.concat(this._statInfoArr), this._statInfoArr = []); var s3 = this.getModule(xn), a2 = s3.getSDKAppID(), i2 = s3.getTinyID(); Ft(this.REPORT_SDKAPPID_BLACKLIST, a2) && !qt(this.REPORT_TINYID_WHITELIST, i2) && (n3 = []), n3.length > 0 && this._doReport(n3); } }, { key: "_doReport", value: function(e3) { var n3 = this, o2 = { header: or(this), quality: e3 }; this.request({ protocolName: Bs, requestData: t({}, o2) }).then(function() { n3.reportIndex++, n3.wholePeriod = false; }).catch(function(t2) { Ve.w("".concat(n3._n, "._doReport, online:").concat(n3.getNetworkType(), " error:"), t2), n3._statInfoArr = n3._statInfoArr.concat(e3), n3._flushAtOnce(); }); } }, { key: "_flushAtOnce", value: function() { var e3 = this.getModule(Vn), t2 = e3.getItem(this.TAG, false), n3 = this._statInfoArr, o2 = "".concat(this._n, "._flushAtOnce"); if (zt(t2)) Ve.l("".concat(o2, " count:").concat(n3.length)), e3.setItem(this.TAG, n3, true, false); else { var s3 = n3.concat(t2); s3.length > 10 && (s3 = s3.slice(0, 10)), Ve.l("".concat(o2, " count:").concat(s3.length)), e3.setItem(this.TAG, s3, true, false); } this._statInfoArr = []; } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._report(), this.reportIndex = 0, this.wholePeriod = false, this.REPORT_SDKAPPID_BLACKLIST = [], this.REPORT_TINYID_WHITELIST = [], this._avgRTT.reset(), this._avgE2EDelay.reset(), this._rateMessageSent.reset(), this._rateMessageReceived.reset(); } }]), s2; }(uo), ou = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "WorkerTimerModule", s2._isWorkerEnabled = true, s2._workerTimer = null, s2._timerID = -1, s2._init(), s2.getInnerEmitterInstance().on(ti, s2._onCloudConfigUpdated, h(s2)), s2; } return a(n2, [{ key: "isWorkerEnabled", value: function() { return this._isWorkerEnabled && Se; } }, { key: "startWorkerTimer", value: function() { Ve.l("".concat(this._n, ".startWorkerTimer")), this._workerTimer && this._workerTimer.postMessage("start"); } }, { key: "stopWorkerTimer", value: function() { Ve.l("".concat(this._n, ".stopWorkerTimer")), this._workerTimer && this._workerTimer.postMessage("stop"); } }, { key: "_init", value: function() { if (Se) { var e3 = URL.createObjectURL(new Blob(['let interval = -1;onmessage = function(event) { if (event.data === "start") { if (interval > 0) { clearInterval(interval); } interval = setInterval(() => { postMessage(""); }, 1000); postMessage(interval); } else if (event.data === "stop") { clearInterval(interval); interval = -1; }};'], { type: "application/javascript; charset=utf-8" })); this._workerTimer = new Worker(e3); var t3 = this; this._workerTimer.onmessage = function(e4) { e4.data ? (t3._timerID = e4.data, Ve.l("".concat(t3._n, "._init seed:").concat(t3._timerID))) : t3._m.onCheckTimer(); }; } } }, { key: "_onCloudConfigUpdated", value: function() { var e3 = this.getCloudConfig("enable_worker"); Ve.l("".concat(this._n, "._onCloudConfigUpdated enableWorker:").concat(e3)), it(e3) || "1" === e3 ? !this._isWorkerEnabled && Se && (this._isWorkerEnabled = true, this.startWorkerTimer(), this._m.onWorkerTimerEnabled()) : this._isWorkerEnabled && Se && (this._isWorkerEnabled = false, this.stopWorkerTimer(), this._m.onWorkerTimerDisabled()); } }, { key: "terminate", value: function() { Ve.l("".concat(this._n, ".terminate")), this._workerTimer && (this._workerTimer.terminate(), this._workerTimer = null, this._timerID = -1); } }, { key: "getTimerID", value: function() { return this._timerID; } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")); } }]), n2; }(uo), su = function() { function e2() { o(this, e2), this._n = "PurchasedFeatureHandler", this._purchasedFeatureMap = /* @__PURE__ */ new Map(); } return a(e2, [{ key: "isValidPurchaseBits", value: function(e3) { return e3 && "string" == typeof e3 && e3.length >= 1 && e3.length <= 64 && /[01]{1,64}/.test(e3); } }, { key: "parsePurchaseBits", value: function(e3) { if (this.isValidPurchaseBits(e3)) { this._purchasedFeatureMap.clear(); for (var t2 = null, n2 = e3.length - 1, o2 = 0; n2 >= 0; n2--, o2++) t2 = o2 < 32 ? new L(0, Math.pow(2, o2)).toString() : new L(Math.pow(2, o2 - 32), 0).toString(), "1" === e3[n2] ? this._purchasedFeatureMap.set(t2, true) : this._purchasedFeatureMap.set(t2, false); } else Ve.w("".concat(this._n, ".parsePurchaseBits invalid purchasebits:").concat(e3)); } }, { key: "hasPurchasedFeature", value: function(e3) { return !!this._purchasedFeatureMap.get(e3); } }, { key: "isFeatureEnabled", value: function(e3) { for (var t2 = parseInt(e3).toString(2), n2 = void 0, o2 = true, s2 = t2.length - 1, a2 = 0; s2 >= 0; s2--, a2++) if ("1" === t2.charAt(s2) && (n2 = a2 < 32 ? new L(0, Math.pow(2, a2)).toString() : new L(Math.pow(2, a2 - 32), 0).toString(), !this._purchasedFeatureMap.get(n2))) { o2 = false; break; } return Ve.l("".concat(this._n, ".isFeatureEnabled decimalNumber:").concat(e3, " binaryString:").concat(t2, " ret:").concat(o2)), Xa({ enabled: o2 }); } }, { key: "clear", value: function() { this._purchasedFeatureMap.clear(); } }]), e2; }(), au = function() { function e2(t2) { o(this, e2), this._m = t2, this._n = "CommercialConfigModule", this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler = new su(); } return a(e2, [{ key: "_canFetch", value: function() { return this._getModule(xn).isLoggedIn() ? !this._isFetching && Date.now() >= this._expiredTime : (this._expiredTime = Date.now() + 2e3, false); } }, { key: "onCheckTimer", value: function(e3) { this._canFetch() && this.fetchConfig(); } }, { key: "fetchConfig", value: function() { var e3 = this, t2 = this._canFetch(), n2 = "".concat(this._n, ".fetchConfig"); if (Ve.l("".concat(n2, " canFetch:").concat(t2)), t2) { var o2 = this._getModule(Hn), s2 = new Aa("fetchCommercialConfig"); s2.setNetworkType(o2.getNetworkType()); var a2 = this._getModule(xn).getSDKAppID(), i2 = this._getModule(zn); this._isFetching = true, i2.request({ protocolName: Qs, requestData: { SDKAppID: a2 } }).then(function(t3) { s2.setMessage("purchaseBits:".concat(t3.data.purchaseBits)).end(), Ve.l("".concat(n2, " ok.")), e3._parseConfig(t3.data), e3._isFetching = false; }).catch(function(t3) { o2.probe().then(function(e4) { var n3 = v(e4, 2), o3 = n3[0], a3 = n3[1]; s2.setError(t3, o3, a3).end(); }), e3._isFetching = false; }); } } }, { key: "onPushedConfig", value: function(e3) { var t2 = "".concat(this._n, ".onPushedConfig data:").concat(JSON.stringify(e3)); Ve.l("".concat(t2)), new Aa("pushedCommercialConfig").setNetworkType(this._getModule(Hn).getNetworkType()).setMessage("purchaseBits:".concat(e3.purchaseBits)).end(), this._parseConfig(e3); } }, { key: "_parseConfig", value: function(e3) { var t2 = "".concat(this._n, "._parseConfig"), n2 = e3.errorCode, o2 = e3.errorMessage, s2 = e3.purchaseBits, a2 = e3.expiredTime; 0 === n2 ? (this._purchasedFeatureHandler.parsePurchaseBits(s2), this._expiredTime = Date.now() + 1e3 * a2) : it(n2) ? (Ve.l("".concat(t2, " failed. Invalid message format:"), e3), this._setExpiredTimeOnResponseError(36e5)) : (Ve.e("".concat(t2, " errorCode:").concat(n2, " errorMessage:").concat(o2)), this._setExpiredTimeOnResponseError(12e4)); } }, { key: "_setExpiredTimeOnResponseError", value: function(e3) { this._expiredTime = Date.now() + e3; } }, { key: "canIUse", value: function(e3) { return this._purchasedFeatureHandler.hasPurchasedFeature(e3); } }, { key: "isFeatureEnabled", value: function(e3) { return this._purchasedFeatureHandler.isFeatureEnabled(e3); } }, { key: "_getModule", value: function(e3) { return this._m.getModule(e3); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler.clear(); } }]), e2; }(), iu = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._m = e3, s2._n = "OfflinePushModule", s2._offlinePushPlugin = void 0, s2._androidPushConfig = { huaweiPushBussinessId: "", xiaomiPushBussinessId: "", xiaomiPushAppId: "", xiaomiPushAppKey: "", meizuPushBussinessId: "", meizuPushAppId: "", meizuPushAppKey: "", vivoPushBussinessId: "", fcmPushBussinessId: "", oppoPushBussinessId: "", oppoPushAppKey: "", oppoPushAppSecret: "", honorPushBussinessId: "" }, s2._deviceToken = "", s2._businessID = 0, s2._iosBusinessID = 0, s2._c2cUnreadCount = 0, s2._groupUnreadCount = 0, s2._isWebUniapp = 0, s2; } return a(n2, [{ key: "registerPlugin", value: function(e3) { if (oe) { this._offlinePushPlugin = e3["tim-offline-push-plugin"]; var t3 = e3.offlinePushConfig || {}, n3 = t3.huaweiBusinessID, o2 = t3.xiaomiBusinessID, s2 = t3.xiaomiAppID, a2 = t3.xiaomiAppKey, i2 = t3.meizuBusinessID, r2 = t3.meizuAppID, u2 = t3.meizuAppKey, c2 = t3.vivoBusinessID, l2 = t3.oppoBusinessID, d2 = t3.oppoAppKey, p2 = t3.oppoAppSecret, g2 = t3.honorBusinessID, h2 = t3.iosBusinessID; this._androidPushConfig.huaweiPushBussinessId = n3, this._androidPushConfig.xiaomiPushBussinessId = o2, this._androidPushConfig.xiaomiPushAppId = s2, this._androidPushConfig.xiaomiPushAppKey = a2, this._androidPushConfig.meizuPushBussinessId = i2, this._androidPushConfig.meizuPushAppId = r2, this._androidPushConfig.meizuPushAppKey = u2, this._androidPushConfig.vivoPushBussinessId = c2, this._androidPushConfig.oppoPushBussinessId = l2, this._androidPushConfig.oppoPushAppKey = d2, this._androidPushConfig.oppoPushAppSecret = p2, this._androidPushConfig.honorPushBussinessId = g2, new Aa("registerPlugin").setMessage("tim-offline-push-plugin").setMoreMessage("isExist:".concat(!it(this._offlinePushPlugin))).end(true), Ve.l("".concat(this._n, ".").concat("registerPlugin", " ok. offlinePushConfig:").concat(JSON.stringify(e3.offlinePushConfig))), this._iosBusinessID = h2, this._setAppShowListener(); } else this.outputWarning("OfflinePushInUniapp"); } }, { key: "init", value: function() { this._isWebUniapp = this.getUniAppPlatform(), this._getDeviceToken(); } }, { key: "_getDeviceToken", value: function() { var e3 = this, t3 = "".concat(this._n, ".").concat("_getDeviceToken"); if (ut(this._offlinePushPlugin.getDeviceToken)) { var n3 = "androidPushConfig:".concat(JSON.stringify(this._androidPushConfig), ", iosBusinessID:").concat(this._iosBusinessID); Ve.l("".concat(t3, " start. ").concat(n3)), new Aa("_getDeviceToken").setMessage("".concat(n3)).end(true), this._offlinePushPlugin.getDeviceToken(this._androidPushConfig, function(o2) { var s2 = new Aa("getDeviceTokenRes"), a2 = o2.code, i2 = o2.msg; if (0 === a2) { var r2 = o2.data, u2 = r2.deviceToken, c2 = r2.deviceBrand, l2 = r2.deviceType, d2 = r2.bussinessId; e3._deviceToken = u2, e3._businessID = d2 || e3._iosBusinessID, n3 = "deviceToken:".concat(u2, ", deviceBrand:").concat(c2 || l2, ", businessID:").concat(e3._businessID), Ve.l("".concat(t3, " ok. ").concat(n3)), s2.setMessage(n3).end(true), e3._setToken(); } else s2.setMessage("code:".concat(a2, ", msg:").concat(i2)).end(true), Ve.e("".concat(t3, " failed. error:"), o2); }); } else Ve.e("".concat(t3, " getDeviceToken is not a function")); } }, { key: "canIUseOfflinePush", value: function() { return oe && !it(this._offlinePushPlugin); } }, { key: "_setAppShowListener", value: function() { var e3 = this, t3 = "".concat(this._n, ".").concat("_setAppShowListener"); it(this._offlinePushPlugin) ? Ve.e("".concat(t3, " offlinePushPlugin is undefined")) : ut(this._offlinePushPlugin.setAppShowListener) ? (new Aa("_setAppShowListener").end(true), Ve.l("".concat(t3, " start")), this._offlinePushPlugin.setAppShowListener(function(n3) { var o2 = (n3 || {}).appShow; new Aa("setAppShowListenerRes").setMessage("appShow:".concat(o2)).end(true), Ve.l("".concat(t3, " ok. appShow:").concat(o2)), e3._m.isReady() && (0 === o2 ? (e3._getConvUnreadCount(), e3._onBackground()) : 1 === o2 && e3._onForeground()); })) : Ve.e("".concat(t3, " setAppShowListener is not a function")); } }, { key: "getDeviceBrand", value: function() { if (!it(this._offlinePushPlugin) && ut(this._offlinePushPlugin.getDeviceType)) { var e3 = (this._offlinePushPlugin.getDeviceType() || {}).deviceType; return Ve.l("".concat(this._n, ".getDeviceBrand ok. deviceType:").concat(e3)), e3; } } }, { key: "_setToken", value: function() { var e3, t3 = this, n3 = "".concat(this._n, "._setToken"), o2 = this.getModule(xn), s2 = 1, a2 = "", i2 = ""; zt(this._deviceToken) && (s2 = 0); var r2 = this.getUniAppPlatform(), u2 = this.getDeviceBrand(); r2 === R.IOS || r2 === R.IPAD || r2 === R.MAC ? i2 = this._deviceToken : r2 === R.ANDROID && (a2 = this._deviceToken); var c2 = new Aa("offlinePushSetToken"); return e3 = "deviceToken:".concat(i2 || a2, ", businessID:").concat(this._businessID, ", ") + "deviceBrand:".concat(u2, ", isWebUniapp:").concat(this._isWebUniapp, ", pushMsg:").concat(s2, ", platform:").concat(r2), c2.setMessage("".concat(e3)), Ve.l("".concat(n3, " ").concat(e3)), this.request({ protocolName: da, requestData: { tokenID: a2, pushMsg: s2, sdkAppID: o2.getSDKAppID(), businessID: parseInt(this._businessID), deviceBrand: u2, deviceToken: i2, isWebUniapp: this._isWebUniapp } }).then(function(e4) { return c2.end(), Ve.l("".concat(n3, " ok")), e4; }).catch(function(e4) { return t3.probeNetwork().then(function(t4) { var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1]; c2.setError(e4, o3, s3).end(); }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4); }); } }, { key: "_getConvUnreadCount", value: function() { var e3 = this; this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this.getModule(qn).getLocalConversationList().forEach(function(t3) { t3.type === E.CONV_C2C && (e3._c2cUnreadCount += t3.unreadCount), t3.type === E.CONV_GROUP && (e3._groupUnreadCount += t3.unreadCount); }); } }, { key: "_onBackground", value: function() { var e3 = this, t3 = "".concat(this._n, ".").concat("_onBackground"), n3 = new Aa("_onBackground"); this.request({ protocolName: ca, requestData: { c2cUnreadCount: this._c2cUnreadCount, groupUnreadCount: this._groupUnreadCount, isWebUniapp: this._isWebUniapp } }).then(function(o2) { return n3.setMessage("c2cUnreadCount: ".concat(e3._c2cUnreadCount, ", groupUnreadCount: ").concat(e3._groupUnreadCount)).end(), Ve.l("".concat(t3, " ok")), o2; }).catch(function(o2) { e3.probeNetwork().then(function(e4) { var t4 = v(e4, 2), s2 = t4[0], a2 = t4[1]; n3.setError(o2, s2, a2).end(); }), Ve.e("".concat(t3, " failed. error:"), o2); }); } }, { key: "_onForeground", value: function() { var e3 = this, t3 = "".concat(this._n, ".").concat("_onForeground"), n3 = new Aa("_onForeground"); this.request({ protocolName: la, requestData: { isWebUniapp: this._isWebUniapp } }).then(function(e4) { return n3.end(), Ve.l("".concat(t3, " ok")), e4; }).catch(function(o2) { e3.probeNetwork().then(function(e4) { var t4 = v(e4, 2), s2 = t4[0], a2 = t4[1]; n3.setError(o2, s2, a2).end(); }), Ve.e("".concat(t3, " failed. error:"), o2); }); } }, { key: "getUniAppPlatform", value: function() { var e3 = uni.getSystemInfoSync().platform, t3 = this.getDeviceBrand(); return "ios" === e3 ? R.IOS : "android" === e3 ? R.ANDROID : 1002 === t3 ? R.IPAD : 1001 === t3 ? R.MAC : void 0; } }, { key: "reset", value: function() { this._deviceToken = "", this._businessID = 0, this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this._isWebUniapp = 0, Ve.l("".concat(this._n, ".reset")); } }]), n2; }(uo), ru = function(e2) { r(n2, e2); var t2 = f(n2); function n2(e3) { var s2; return o(this, n2), (s2 = t2.call(this, e3))._n = "ProfanityFilterModule", s2._plugin = null, s2._filterConfigMap = /* @__PURE__ */ new Map(), s2._startIndex = 0, s2._version = 0, s2._canIUseLexicon = false, s2._isFetching = false, s2._expiredTime = 0, s2; } return a(n2, [{ key: "init", value: function() { var e3 = this.getModule(Yn).getPlugin("tim-profanity-filter-plugin"); e3 ? (this._plugin = new e3({ logger: Ve, isArray: at, isMap: Qe, isDevMode: this.isDevMode() }), this._getLexicon()) : this.outputWarning("ProfanityPluginNotFound"); } }, { key: "onCheckTimer", value: function() { this._plugin && this._canIUseLexicon && this.isLoggedIn() && !this._isFetching && Date.now() >= this._expiredTime && this._getLexicon(); } }, { key: "filterMessage", value: function(e3, t3) { var n3 = true; if (!this._plugin || !this._canIUseLexicon) return n3; if (t3 && t3.messageControlInfo && true === t3.messageControlInfo.excludedFromContentModeration) return n3; var o2 = e3.type, s2 = e3.conversationType; if (o2 !== E.MSG_TEXT && o2 !== E.MSG_CUSTOM) return n3; var a2, i2 = "".concat(this._n, ".filterMessage"); if (Ve.l("".concat(i2)), o2 === E.MSG_TEXT) { if (s2 === E.CONV_C2C ? a2 = H : s2 === E.CONV_GROUP && (a2 = W), !this._isConfigOn(a2)) return n3; var r2 = this._plugin.filter(e3.payload.text), u2 = r2.type, c2 = r2.modifiedText; 1 === u2 ? n3 = false : 2 === u2 && (e3.payload.text = c2); } else if (o2 === E.MSG_CUSTOM) { if (s2 === E.CONV_C2C ? a2 = K : s2 === E.CONV_GROUP && (a2 = Y), !this._isConfigOn(a2)) return n3; var l2 = this._plugin.filter(e3.payload.data), d2 = this._plugin.filter(e3.payload.description), p2 = this._plugin.filter(e3.payload.extension); 1 === l2.type || 1 === d2.type || 1 === p2.type ? n3 = false : (2 === l2.type && (e3.payload.data = l2.modifiedText), 2 === d2.type && (e3.payload.description = d2.modifiedText), 2 === p2.type && (e3.payload.extension = p2.modifiedText)); } return Ve.l("".concat(i2, " done. isAllowedToSend:").concat(n3)), n3; } }, { key: "filterText", value: function(e3, t3) { var n3 = "".concat(this._n, ".filterText"), o2 = { isAllowedToSend: true, modifiedText: e3 }; if (!this._plugin || !this._canIUseLexicon) return o2; if (!this._isConfigOn(t3)) return o2; Ve.l("".concat(n3)); var s2 = this._plugin.filter(e3), a2 = s2.type, i2 = s2.modifiedText; return 1 === a2 ? o2.isAllowedToSend = false : 2 === a2 && (o2.modifiedText = i2), Ve.l("".concat(n3, " done. ret:"), o2), o2; } }, { key: "_getLexicon", value: function() { var e3 = this, t3 = new Aa("profanityFilter"), n3 = "".concat(this._n, "._getLexicon"); this._isFetching = true, this.request({ protocolName: pa, requestData: { startIndex: this._startIndex, version: this._version } }).then(function(o2) { var s2 = o2.data, a2 = s2.errorInfo, i2 = s2.filterConfig, r2 = s2.lexicon, u2 = s2.strToken, c2 = s2.completeFlag, l2 = s2.nextStartIndex, d2 = s2.version, p2 = s2.expiredTime, g2 = a2.errorCode, h2 = a2.errorMessage; return 0 !== g2 ? (e3._isFetching = false, Ve.w("".concat(n3, " failed. error:"), a2), void t3.setCode(g2).setMessage(h2).end()) : (e3._onFilterConfig(i2), e3._getToken(u2), 1 === c2 ? (Ve.l("".concat(n3, " done. version:").concat(d2, " expiredTime:").concat(p2)), e3._version = d2, e3._canIUseLexicon = true, e3._isFetching = false, e3._expiredTime = Date.now() + 1e3 * p2, void e3._plugin.onLexiconCompleted(r2)) : (e3._startIndex = l2, e3._plugin.onLexiconSliced(r2), void e3._getLexicon())); }).catch(function(o2) { e3.probeNetwork().then(function(e4) { var n4 = v(e4, 2), s2 = n4[0], a2 = n4[1]; t3.setError(o2, s2, a2).end(); }), e3._isFetching = false, Ve.l("".concat(n3, " failed. error:"), o2); }); } }, { key: "_onFilterConfig", value: function(e3) { var t3 = this; zt(e3) || (this._filterConfigMap.clear(), Object.keys(e3).forEach(function(n3) { t3._filterConfigMap.set(n3, e3[n3]); }), Ve.l("".concat(this._n, "._onFilterConfig. keys:").concat(Array.from(this._filterConfigMap.keys()), " values:").concat(Array.from(this._filterConfigMap.values())))); } }, { key: "_isConfigOn", value: function(e3) { return 1 === this._filterConfigMap.get(e3); } }, { key: "_getToken", value: function(e3) { if (nt(e3)) { var t3 = e3.length, n3 = ""; if (t3 % 2 == 0) for (var o2 = 0; o2 <= t3 - 1; o2 += 2) n3 += e3[o2 + 1], n3 += e3[o2]; else { for (var s2 = 0; s2 < t3 - 1; s2 += 2) n3 += e3[s2 + 1], n3 += e3[s2]; n3 += e3[t3 - 1]; } this._plugin.onToken(n3); } } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._plugin && (this._plugin.reset(), this._plugin = null), this._filterConfigMap.clear(), this._startIndex = 0, this._version = 0, this._canIUseLexicon = false, this._isFetching = false, this._expiredTime = 0; } }]), n2; }(uo), uu = function() { function e2(t2) { o(this, e2), this._m = t2, this._n = "TransCmdModule", this._TRTCCommandList = ["tui_room_svr.*"], this._m.getInnerEmitterInstance().on(ti, this._onCloudConfigUpdated, this); } return a(e2, [{ key: "_onCloudConfigUpdated", value: function() { var e3 = this, t2 = this._m.getModule(Zn).getCloudConfig("rtc_cmd"); it(t2) || (t2 = JSON.parse(t2)).forEach(function(t3) { e3._TRTCCommandList.includes(t3) || e3._TRTCCommandList.push(t3); }); } }, { key: "sendTRTCCustomData", value: function(e3) { var t2 = e3.serviceCommand, n2 = e3.data, o2 = "".concat(V.NAME.TUIROOM_SVR, ".*"); return it(t2) || (o2 = t2), this._TRTCCommandList.includes(o2) ? this._trans({ servcmd: o2, data: n2 }) : Za({ code: ha.INVALID_TRTC_CMD }); } }, { key: "_trans", value: function(e3) { Ve.d("".concat(this._n, "._trans. options:").concat(JSON.stringify(e3))); var t2 = e3.servcmd, n2 = e3.data; return this._m.getModule(zn).trans({ servcmd: t2, data: nt(n2) ? JSON.parse(n2) : n2 }); } }, { key: "getCommandList", value: function() { return this._TRTCCommandList; } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")); } }]), e2; }(), cu = function() { function e2(t2) { o(this, e2), this._m = t2, this._n = "ErrorMessageModule", this.TIM_ERROR_ASSISTANCE = "tim_error_assistance", this.STORAGE_EXPIRES_TIME = 6048e5, this._map = /* @__PURE__ */ new Map(), this._init(); } return a(e2, [{ key: "_init", value: function() { var e3 = this._getStorageModule().getItem(this.TIM_ERROR_ASSISTANCE, false); if (e3) { var t2; try { t2 = JSON.parse(e3); } catch (n2) { this._getStorageModule().removeItem(this.TIM_ERROR_ASSISTANCE, false), Ve.w("".concat(this._n, "._init error:"), n2); } t2 && (this._needToUpdate(t2) ? this._fetch() : this._fillMap(t2.message)); } else this._fetch(); } }, { key: "_needToUpdate", value: function(e3) { var t2 = e3.localSavedTime, n2 = e3.localSavedVersion, o2 = t2 && (/* @__PURE__ */ new Date()).getTime() - t2 >= this.STORAGE_EXPIRES_TIME, s2 = !n2 || "2.27.6" !== n2; return Ve.l("".concat(this._n, "._needToUpdate isTimeout:").concat(o2, " isDifferentVersion:").concat(s2)), o2 || s2; } }, { key: "_fetch", value: function() { if (!this._m.getModule(xn).isPrivateNetWork()) { var e3 = "https://web.sdk.qcloud.com/im/download/error-message/0.0.1/tim-error-message.txt", t2 = "application/x-www-form-urlencoded;charset=UTF-8", n2 = "".concat(this._n, "._fetch ok in"), o2 = this; if (ae) re.request({ url: e3, method: "GET", timeout: 3e3, header: { "content-type": t2 }, dataType: "text", success: function(e4) { o2._fillAndSave(e4.data), Ve.l("".concat(n2, " mini program")); }, fail: function() { } }); else { var s2 = new XMLHttpRequest(), a2 = setTimeout(function() { s2.abort(); }, 3e3); s2.onreadystatechange = function() { 4 === s2.readyState && (clearTimeout(a2), 200 !== s2.status && 304 !== s2.status || (Ve.l("".concat(n2, " browser")), o2._fillAndSave(s2.responseText))); }, s2.open("GET", e3, true), s2.setRequestHeader("Content-type", t2), s2.send(); } } } }, { key: "_fillAndSave", value: function(e3) { this._fillMap(e3), this._getStorageModule().setItem(this.TIM_ERROR_ASSISTANCE, JSON.stringify({ message: e3, localSavedTime: (/* @__PURE__ */ new Date()).getTime(), localSavedVersion: "2.27.6" }), true, false); } }, { key: "_getStorageModule", value: function() { return this._m.getModule(Vn); } }, { key: "_fillMap", value: function(e3) { this._map.clear(); for (var t2, n2, o2, s2 = e3.split(";\n"), a2 = s2.length, i2 = new RegExp(/'/g), r2 = 0; r2 < a2; r2++) if (t2 = s2[r2].indexOf(":"), n2 = s2[r2].slice(0, t2), o2 = s2[r2].slice(t2 + 1, s2[r2].length), !n2.startsWith("//")) { if (it(o2)) continue; this._map.set(n2, o2.replace(i2, "")); } } }, { key: "get", value: function(e3) { var t2 = e3.isIntl, n2 = e3.key, o2 = e3.replacement1, s2 = e3.replacement2, a2 = "".concat(n2, t2 ? "_en" : "_cn"); !this._map.has(a2) && this._map.has(n2) && (a2 = n2); var i2 = ""; return this._map.has(a2) ? (i2 = this._map.get(a2), it(o2) || (i2 = i2.replace("$replacement1", o2)), it(s2) || (i2 = i2.replace("$replacement2", s2)), i2) : i2; } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")); } }]), e2; }(), lu = cr(function(e2, t2) { var o2 = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array; function s2(e3, t3) { return Object.prototype.hasOwnProperty.call(e3, t3); } t2.assign = function(e3) { for (var t3 = Array.prototype.slice.call(arguments, 1); t3.length; ) { var o3 = t3.shift(); if (o3) { if ("object" !== n(o3)) throw new TypeError(o3 + "must be non-object"); for (var a3 in o3) s2(o3, a3) && (e3[a3] = o3[a3]); } } return e3; }, t2.shrinkBuf = function(e3, t3) { return e3.length === t3 ? e3 : e3.subarray ? e3.subarray(0, t3) : (e3.length = t3, e3); }; var a2 = { arraySet: function(e3, t3, n2, o3, s3) { if (t3.subarray && e3.subarray) e3.set(t3.subarray(n2, n2 + o3), s3); else for (var a3 = 0; a3 < o3; a3++) e3[s3 + a3] = t3[n2 + a3]; }, flattenChunks: function(e3) { var t3, n2, o3, s3, a3, i3; for (o3 = 0, t3 = 0, n2 = e3.length; t3 < n2; t3++) o3 += e3[t3].length; for (i3 = new Uint8Array(o3), s3 = 0, t3 = 0, n2 = e3.length; t3 < n2; t3++) a3 = e3[t3], i3.set(a3, s3), s3 += a3.length; return i3; } }, i2 = { arraySet: function(e3, t3, n2, o3, s3) { for (var a3 = 0; a3 < o3; a3++) e3[s3 + a3] = t3[n2 + a3]; }, flattenChunks: function(e3) { return [].concat.apply([], e3); } }; t2.setTyped = function(e3) { e3 ? (t2.Buf8 = Uint8Array, t2.Buf16 = Uint16Array, t2.Buf32 = Int32Array, t2.assign(t2, a2)) : (t2.Buf8 = Array, t2.Buf16 = Array, t2.Buf32 = Array, t2.assign(t2, i2)); }, t2.setTyped(o2); }); lu.assign, lu.shrinkBuf, lu.setTyped, lu.Buf8, lu.Buf16, lu.Buf32; var du = function(e2, t2, n2, o2) { for (var s2 = 65535 & e2 | 0, a2 = e2 >>> 16 & 65535 | 0, i2 = 0; 0 !== n2; ) { n2 -= i2 = n2 > 2e3 ? 2e3 : n2; do { a2 = a2 + (s2 = s2 + t2[o2++] | 0) | 0; } while (--i2); s2 %= 65521, a2 %= 65521; } return s2 | a2 << 16 | 0; }; var pu = function() { for (var e2, t2 = [], n2 = 0; n2 < 256; n2++) { e2 = n2; for (var o2 = 0; o2 < 8; o2++) e2 = 1 & e2 ? 3988292384 ^ e2 >>> 1 : e2 >>> 1; t2[n2] = e2; } return t2; }(); var gu = function(e2, t2, n2, o2) { var s2 = pu, a2 = o2 + n2; e2 ^= -1; for (var i2 = o2; i2 < a2; i2++) e2 = e2 >>> 8 ^ s2[255 & (e2 ^ t2[i2])]; return -1 ^ e2; }, hu = function(e2, t2) { var n2, o2, s2, a2, i2, r2, u2, c2, l2, d2, p2, g2, h2, _2, f2, v2, m2, M2, y2, I2, C2, T2, D2, k2, E2; n2 = e2.state, o2 = e2.next_in, k2 = e2.input, s2 = o2 + (e2.avail_in - 5), a2 = e2.next_out, E2 = e2.output, i2 = a2 - (t2 - e2.avail_out), r2 = a2 + (e2.avail_out - 257), u2 = n2.dmax, c2 = n2.wsize, l2 = n2.whave, d2 = n2.wnext, p2 = n2.window, g2 = n2.hold, h2 = n2.bits, _2 = n2.lencode, f2 = n2.distcode, v2 = (1 << n2.lenbits) - 1, m2 = (1 << n2.distbits) - 1; e: do { h2 < 15 && (g2 += k2[o2++] << h2, h2 += 8, g2 += k2[o2++] << h2, h2 += 8), M2 = _2[g2 & v2]; t: for (; ; ) { if (g2 >>>= y2 = M2 >>> 24, h2 -= y2, 0 === (y2 = M2 >>> 16 & 255)) E2[a2++] = 65535 & M2; else { if (!(16 & y2)) { if (0 == (64 & y2)) { M2 = _2[(65535 & M2) + (g2 & (1 << y2) - 1)]; continue t; } if (32 & y2) { n2.mode = 12; break e; } e2.msg = "invalid literal/length code", n2.mode = 30; break e; } I2 = 65535 & M2, (y2 &= 15) && (h2 < y2 && (g2 += k2[o2++] << h2, h2 += 8), I2 += g2 & (1 << y2) - 1, g2 >>>= y2, h2 -= y2), h2 < 15 && (g2 += k2[o2++] << h2, h2 += 8, g2 += k2[o2++] << h2, h2 += 8), M2 = f2[g2 & m2]; n: for (; ; ) { if (g2 >>>= y2 = M2 >>> 24, h2 -= y2, !(16 & (y2 = M2 >>> 16 & 255))) { if (0 == (64 & y2)) { M2 = f2[(65535 & M2) + (g2 & (1 << y2) - 1)]; continue n; } e2.msg = "invalid distance code", n2.mode = 30; break e; } if (C2 = 65535 & M2, h2 < (y2 &= 15) && (g2 += k2[o2++] << h2, (h2 += 8) < y2 && (g2 += k2[o2++] << h2, h2 += 8)), (C2 += g2 & (1 << y2) - 1) > u2) { e2.msg = "invalid distance too far back", n2.mode = 30; break e; } if (g2 >>>= y2, h2 -= y2, C2 > (y2 = a2 - i2)) { if ((y2 = C2 - y2) > l2 && n2.sane) { e2.msg = "invalid distance too far back", n2.mode = 30; break e; } if (T2 = 0, D2 = p2, 0 === d2) { if (T2 += c2 - y2, y2 < I2) { I2 -= y2; do { E2[a2++] = p2[T2++]; } while (--y2); T2 = a2 - C2, D2 = E2; } } else if (d2 < y2) { if (T2 += c2 + d2 - y2, (y2 -= d2) < I2) { I2 -= y2; do { E2[a2++] = p2[T2++]; } while (--y2); if (T2 = 0, d2 < I2) { I2 -= y2 = d2; do { E2[a2++] = p2[T2++]; } while (--y2); T2 = a2 - C2, D2 = E2; } } } else if (T2 += d2 - y2, y2 < I2) { I2 -= y2; do { E2[a2++] = p2[T2++]; } while (--y2); T2 = a2 - C2, D2 = E2; } for (; I2 > 2; ) E2[a2++] = D2[T2++], E2[a2++] = D2[T2++], E2[a2++] = D2[T2++], I2 -= 3; I2 && (E2[a2++] = D2[T2++], I2 > 1 && (E2[a2++] = D2[T2++])); } else { T2 = a2 - C2; do { E2[a2++] = E2[T2++], E2[a2++] = E2[T2++], E2[a2++] = E2[T2++], I2 -= 3; } while (I2 > 2); I2 && (E2[a2++] = E2[T2++], I2 > 1 && (E2[a2++] = E2[T2++])); } break; } } break; } } while (o2 < s2 && a2 < r2); o2 -= I2 = h2 >> 3, g2 &= (1 << (h2 -= I2 << 3)) - 1, e2.next_in = o2, e2.next_out = a2, e2.avail_in = o2 < s2 ? s2 - o2 + 5 : 5 - (o2 - s2), e2.avail_out = a2 < r2 ? r2 - a2 + 257 : 257 - (a2 - r2), n2.hold = g2, n2.bits = h2; }, _u = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], fu = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], vu = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], mu = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64], Mu = function(e2, t2, n2, o2, s2, a2, i2, r2) { var u2, c2, l2, d2, p2, g2, h2, _2, f2, v2 = r2.bits, m2 = 0, M2 = 0, y2 = 0, I2 = 0, C2 = 0, T2 = 0, D2 = 0, k2 = 0, E2 = 0, S2 = 0, L2 = null, A2 = 0, R2 = new lu.Buf16(16), N2 = new lu.Buf16(16), O2 = null, G2 = 0; for (m2 = 0; m2 <= 15; m2++) R2[m2] = 0; for (M2 = 0; M2 < o2; M2++) R2[t2[n2 + M2]]++; for (C2 = v2, I2 = 15; I2 >= 1 && 0 === R2[I2]; I2--) ; if (C2 > I2 && (C2 = I2), 0 === I2) return s2[a2++] = 20971520, s2[a2++] = 20971520, r2.bits = 1, 0; for (y2 = 1; y2 < I2 && 0 === R2[y2]; y2++) ; for (C2 < y2 && (C2 = y2), k2 = 1, m2 = 1; m2 <= 15; m2++) if (k2 <<= 1, (k2 -= R2[m2]) < 0) return -1; if (k2 > 0 && (0 === e2 || 1 !== I2)) return -1; for (N2[1] = 0, m2 = 1; m2 < 15; m2++) N2[m2 + 1] = N2[m2] + R2[m2]; for (M2 = 0; M2 < o2; M2++) 0 !== t2[n2 + M2] && (i2[N2[t2[n2 + M2]]++] = M2); if (0 === e2 ? (L2 = O2 = i2, g2 = 19) : 1 === e2 ? (L2 = _u, A2 -= 257, O2 = fu, G2 -= 257, g2 = 256) : (L2 = vu, O2 = mu, g2 = -1), S2 = 0, M2 = 0, m2 = y2, p2 = a2, T2 = C2, D2 = 0, l2 = -1, d2 = (E2 = 1 << C2) - 1, 1 === e2 && E2 > 852 || 2 === e2 && E2 > 592) return 1; for (; ; ) { h2 = m2 - D2, i2[M2] < g2 ? (_2 = 0, f2 = i2[M2]) : i2[M2] > g2 ? (_2 = O2[G2 + i2[M2]], f2 = L2[A2 + i2[M2]]) : (_2 = 96, f2 = 0), u2 = 1 << m2 - D2, y2 = c2 = 1 << T2; do { s2[p2 + (S2 >> D2) + (c2 -= u2)] = h2 << 24 | _2 << 16 | f2 | 0; } while (0 !== c2); for (u2 = 1 << m2 - 1; S2 & u2; ) u2 >>= 1; if (0 !== u2 ? (S2 &= u2 - 1, S2 += u2) : S2 = 0, M2++, 0 == --R2[m2]) { if (m2 === I2) break; m2 = t2[n2 + i2[M2]]; } if (m2 > C2 && (S2 & d2) !== l2) { for (0 === D2 && (D2 = C2), p2 += y2, k2 = 1 << (T2 = m2 - D2); T2 + D2 < I2 && !((k2 -= R2[T2 + D2]) <= 0); ) T2++, k2 <<= 1; if (E2 += 1 << T2, 1 === e2 && E2 > 852 || 2 === e2 && E2 > 592) return 1; s2[l2 = S2 & d2] = C2 << 24 | T2 << 16 | p2 - a2 | 0; } } return 0 !== S2 && (s2[p2 + S2] = m2 - D2 << 24 | 64 << 16 | 0), r2.bits = C2, 0; }; function yu(e2) { return (e2 >>> 24 & 255) + (e2 >>> 8 & 65280) + ((65280 & e2) << 8) + ((255 & e2) << 24); } function Iu() { this.mode = 0, this.last = false, this.wrap = 0, this.havedict = false, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new lu.Buf16(320), this.work = new lu.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0; } function Cu(e2) { var t2; return e2 && e2.state ? (t2 = e2.state, e2.total_in = e2.total_out = t2.total = 0, e2.msg = "", t2.wrap && (e2.adler = 1 & t2.wrap), t2.mode = 1, t2.last = 0, t2.havedict = 0, t2.dmax = 32768, t2.head = null, t2.hold = 0, t2.bits = 0, t2.lencode = t2.lendyn = new lu.Buf32(852), t2.distcode = t2.distdyn = new lu.Buf32(592), t2.sane = 1, t2.back = -1, 0) : -2; } function Tu(e2) { var t2; return e2 && e2.state ? ((t2 = e2.state).wsize = 0, t2.whave = 0, t2.wnext = 0, Cu(e2)) : -2; } function Du(e2, t2) { var n2, o2; return e2 && e2.state ? (o2 = e2.state, t2 < 0 ? (n2 = 0, t2 = -t2) : (n2 = 1 + (t2 >> 4), t2 < 48 && (t2 &= 15)), t2 && (t2 < 8 || t2 > 15) ? -2 : (null !== o2.window && o2.wbits !== t2 && (o2.window = null), o2.wrap = n2, o2.wbits = t2, Tu(e2))) : -2; } function ku(e2, t2) { var n2, o2; return e2 ? (o2 = new Iu(), e2.state = o2, o2.window = null, 0 !== (n2 = Du(e2, t2)) && (e2.state = null), n2) : -2; } var Eu, Su, Lu = true; function Au(e2) { if (Lu) { var t2; for (Eu = new lu.Buf32(512), Su = new lu.Buf32(32), t2 = 0; t2 < 144; ) e2.lens[t2++] = 8; for (; t2 < 256; ) e2.lens[t2++] = 9; for (; t2 < 280; ) e2.lens[t2++] = 7; for (; t2 < 288; ) e2.lens[t2++] = 8; for (Mu(1, e2.lens, 0, 288, Eu, 0, e2.work, { bits: 9 }), t2 = 0; t2 < 32; ) e2.lens[t2++] = 5; Mu(2, e2.lens, 0, 32, Su, 0, e2.work, { bits: 5 }), Lu = false; } e2.lencode = Eu, e2.lenbits = 9, e2.distcode = Su, e2.distbits = 5; } function Ru(e2, t2, n2, o2) { var s2, a2 = e2.state; return null === a2.window && (a2.wsize = 1 << a2.wbits, a2.wnext = 0, a2.whave = 0, a2.window = new lu.Buf8(a2.wsize)), o2 >= a2.wsize ? (lu.arraySet(a2.window, t2, n2 - a2.wsize, a2.wsize, 0), a2.wnext = 0, a2.whave = a2.wsize) : ((s2 = a2.wsize - a2.wnext) > o2 && (s2 = o2), lu.arraySet(a2.window, t2, n2 - o2, s2, a2.wnext), (o2 -= s2) ? (lu.arraySet(a2.window, t2, n2 - o2, o2, 0), a2.wnext = o2, a2.whave = a2.wsize) : (a2.wnext += s2, a2.wnext === a2.wsize && (a2.wnext = 0), a2.whave < a2.wsize && (a2.whave += s2))), 0; } var Nu = { inflateReset: Tu, inflateReset2: Du, inflateResetKeep: Cu, inflateInit: function(e2) { return ku(e2, 15); }, inflateInit2: ku, inflate: function(e2, t2) { var n2, o2, s2, a2, i2, r2, u2, c2, l2, d2, p2, g2, h2, _2, f2, v2, m2, M2, y2, I2, C2, T2, D2, k2, E2 = 0, S2 = new lu.Buf8(4), L2 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; if (!e2 || !e2.state || !e2.output || !e2.input && 0 !== e2.avail_in) return -2; 12 === (n2 = e2.state).mode && (n2.mode = 13), i2 = e2.next_out, s2 = e2.output, u2 = e2.avail_out, a2 = e2.next_in, o2 = e2.input, r2 = e2.avail_in, c2 = n2.hold, l2 = n2.bits, d2 = r2, p2 = u2, T2 = 0; e: for (; ; ) switch (n2.mode) { case 1: if (0 === n2.wrap) { n2.mode = 13; break; } for (; l2 < 16; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } if (2 & n2.wrap && 35615 === c2) { n2.check = 0, S2[0] = 255 & c2, S2[1] = c2 >>> 8 & 255, n2.check = gu(n2.check, S2, 2, 0), c2 = 0, l2 = 0, n2.mode = 2; break; } if (n2.flags = 0, n2.head && (n2.head.done = false), !(1 & n2.wrap) || (((255 & c2) << 8) + (c2 >> 8)) % 31) { e2.msg = "incorrect header check", n2.mode = 30; break; } if (8 != (15 & c2)) { e2.msg = "unknown compression method", n2.mode = 30; break; } if (l2 -= 4, C2 = 8 + (15 & (c2 >>>= 4)), 0 === n2.wbits) n2.wbits = C2; else if (C2 > n2.wbits) { e2.msg = "invalid window size", n2.mode = 30; break; } n2.dmax = 1 << C2, e2.adler = n2.check = 1, n2.mode = 512 & c2 ? 10 : 12, c2 = 0, l2 = 0; break; case 2: for (; l2 < 16; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } if (n2.flags = c2, 8 != (255 & n2.flags)) { e2.msg = "unknown compression method", n2.mode = 30; break; } if (57344 & n2.flags) { e2.msg = "unknown header flags set", n2.mode = 30; break; } n2.head && (n2.head.text = c2 >> 8 & 1), 512 & n2.flags && (S2[0] = 255 & c2, S2[1] = c2 >>> 8 & 255, n2.check = gu(n2.check, S2, 2, 0)), c2 = 0, l2 = 0, n2.mode = 3; case 3: for (; l2 < 32; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } n2.head && (n2.head.time = c2), 512 & n2.flags && (S2[0] = 255 & c2, S2[1] = c2 >>> 8 & 255, S2[2] = c2 >>> 16 & 255, S2[3] = c2 >>> 24 & 255, n2.check = gu(n2.check, S2, 4, 0)), c2 = 0, l2 = 0, n2.mode = 4; case 4: for (; l2 < 16; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } n2.head && (n2.head.xflags = 255 & c2, n2.head.os = c2 >> 8), 512 & n2.flags && (S2[0] = 255 & c2, S2[1] = c2 >>> 8 & 255, n2.check = gu(n2.check, S2, 2, 0)), c2 = 0, l2 = 0, n2.mode = 5; case 5: if (1024 & n2.flags) { for (; l2 < 16; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } n2.length = c2, n2.head && (n2.head.extra_len = c2), 512 & n2.flags && (S2[0] = 255 & c2, S2[1] = c2 >>> 8 & 255, n2.check = gu(n2.check, S2, 2, 0)), c2 = 0, l2 = 0; } else n2.head && (n2.head.extra = null); n2.mode = 6; case 6: if (1024 & n2.flags && ((g2 = n2.length) > r2 && (g2 = r2), g2 && (n2.head && (C2 = n2.head.extra_len - n2.length, n2.head.extra || (n2.head.extra = new Array(n2.head.extra_len)), lu.arraySet(n2.head.extra, o2, a2, g2, C2)), 512 & n2.flags && (n2.check = gu(n2.check, o2, g2, a2)), r2 -= g2, a2 += g2, n2.length -= g2), n2.length)) break e; n2.length = 0, n2.mode = 7; case 7: if (2048 & n2.flags) { if (0 === r2) break e; g2 = 0; do { C2 = o2[a2 + g2++], n2.head && C2 && n2.length < 65536 && (n2.head.name += String.fromCharCode(C2)); } while (C2 && g2 < r2); if (512 & n2.flags && (n2.check = gu(n2.check, o2, g2, a2)), r2 -= g2, a2 += g2, C2) break e; } else n2.head && (n2.head.name = null); n2.length = 0, n2.mode = 8; case 8: if (4096 & n2.flags) { if (0 === r2) break e; g2 = 0; do { C2 = o2[a2 + g2++], n2.head && C2 && n2.length < 65536 && (n2.head.comment += String.fromCharCode(C2)); } while (C2 && g2 < r2); if (512 & n2.flags && (n2.check = gu(n2.check, o2, g2, a2)), r2 -= g2, a2 += g2, C2) break e; } else n2.head && (n2.head.comment = null); n2.mode = 9; case 9: if (512 & n2.flags) { for (; l2 < 16; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } if (c2 !== (65535 & n2.check)) { e2.msg = "header crc mismatch", n2.mode = 30; break; } c2 = 0, l2 = 0; } n2.head && (n2.head.hcrc = n2.flags >> 9 & 1, n2.head.done = true), e2.adler = n2.check = 0, n2.mode = 12; break; case 10: for (; l2 < 32; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } e2.adler = n2.check = yu(c2), c2 = 0, l2 = 0, n2.mode = 11; case 11: if (0 === n2.havedict) return e2.next_out = i2, e2.avail_out = u2, e2.next_in = a2, e2.avail_in = r2, n2.hold = c2, n2.bits = l2, 2; e2.adler = n2.check = 1, n2.mode = 12; case 12: if (5 === t2 || 6 === t2) break e; case 13: if (n2.last) { c2 >>>= 7 & l2, l2 -= 7 & l2, n2.mode = 27; break; } for (; l2 < 3; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } switch (n2.last = 1 & c2, l2 -= 1, 3 & (c2 >>>= 1)) { case 0: n2.mode = 14; break; case 1: if (Au(n2), n2.mode = 20, 6 === t2) { c2 >>>= 2, l2 -= 2; break e; } break; case 2: n2.mode = 17; break; case 3: e2.msg = "invalid block type", n2.mode = 30; } c2 >>>= 2, l2 -= 2; break; case 14: for (c2 >>>= 7 & l2, l2 -= 7 & l2; l2 < 32; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } if ((65535 & c2) != (c2 >>> 16 ^ 65535)) { e2.msg = "invalid stored block lengths", n2.mode = 30; break; } if (n2.length = 65535 & c2, c2 = 0, l2 = 0, n2.mode = 15, 6 === t2) break e; case 15: n2.mode = 16; case 16: if (g2 = n2.length) { if (g2 > r2 && (g2 = r2), g2 > u2 && (g2 = u2), 0 === g2) break e; lu.arraySet(s2, o2, a2, g2, i2), r2 -= g2, a2 += g2, u2 -= g2, i2 += g2, n2.length -= g2; break; } n2.mode = 12; break; case 17: for (; l2 < 14; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } if (n2.nlen = 257 + (31 & c2), c2 >>>= 5, l2 -= 5, n2.ndist = 1 + (31 & c2), c2 >>>= 5, l2 -= 5, n2.ncode = 4 + (15 & c2), c2 >>>= 4, l2 -= 4, n2.nlen > 286 || n2.ndist > 30) { e2.msg = "too many length or distance symbols", n2.mode = 30; break; } n2.have = 0, n2.mode = 18; case 18: for (; n2.have < n2.ncode; ) { for (; l2 < 3; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } n2.lens[L2[n2.have++]] = 7 & c2, c2 >>>= 3, l2 -= 3; } for (; n2.have < 19; ) n2.lens[L2[n2.have++]] = 0; if (n2.lencode = n2.lendyn, n2.lenbits = 7, D2 = { bits: n2.lenbits }, T2 = Mu(0, n2.lens, 0, 19, n2.lencode, 0, n2.work, D2), n2.lenbits = D2.bits, T2) { e2.msg = "invalid code lengths set", n2.mode = 30; break; } n2.have = 0, n2.mode = 19; case 19: for (; n2.have < n2.nlen + n2.ndist; ) { for (; v2 = (E2 = n2.lencode[c2 & (1 << n2.lenbits) - 1]) >>> 16 & 255, m2 = 65535 & E2, !((f2 = E2 >>> 24) <= l2); ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } if (m2 < 16) c2 >>>= f2, l2 -= f2, n2.lens[n2.have++] = m2; else { if (16 === m2) { for (k2 = f2 + 2; l2 < k2; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } if (c2 >>>= f2, l2 -= f2, 0 === n2.have) { e2.msg = "invalid bit length repeat", n2.mode = 30; break; } C2 = n2.lens[n2.have - 1], g2 = 3 + (3 & c2), c2 >>>= 2, l2 -= 2; } else if (17 === m2) { for (k2 = f2 + 3; l2 < k2; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } l2 -= f2, C2 = 0, g2 = 3 + (7 & (c2 >>>= f2)), c2 >>>= 3, l2 -= 3; } else { for (k2 = f2 + 7; l2 < k2; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } l2 -= f2, C2 = 0, g2 = 11 + (127 & (c2 >>>= f2)), c2 >>>= 7, l2 -= 7; } if (n2.have + g2 > n2.nlen + n2.ndist) { e2.msg = "invalid bit length repeat", n2.mode = 30; break; } for (; g2--; ) n2.lens[n2.have++] = C2; } } if (30 === n2.mode) break; if (0 === n2.lens[256]) { e2.msg = "invalid code -- missing end-of-block", n2.mode = 30; break; } if (n2.lenbits = 9, D2 = { bits: n2.lenbits }, T2 = Mu(1, n2.lens, 0, n2.nlen, n2.lencode, 0, n2.work, D2), n2.lenbits = D2.bits, T2) { e2.msg = "invalid literal/lengths set", n2.mode = 30; break; } if (n2.distbits = 6, n2.distcode = n2.distdyn, D2 = { bits: n2.distbits }, T2 = Mu(2, n2.lens, n2.nlen, n2.ndist, n2.distcode, 0, n2.work, D2), n2.distbits = D2.bits, T2) { e2.msg = "invalid distances set", n2.mode = 30; break; } if (n2.mode = 20, 6 === t2) break e; case 20: n2.mode = 21; case 21: if (r2 >= 6 && u2 >= 258) { e2.next_out = i2, e2.avail_out = u2, e2.next_in = a2, e2.avail_in = r2, n2.hold = c2, n2.bits = l2, hu(e2, p2), i2 = e2.next_out, s2 = e2.output, u2 = e2.avail_out, a2 = e2.next_in, o2 = e2.input, r2 = e2.avail_in, c2 = n2.hold, l2 = n2.bits, 12 === n2.mode && (n2.back = -1); break; } for (n2.back = 0; v2 = (E2 = n2.lencode[c2 & (1 << n2.lenbits) - 1]) >>> 16 & 255, m2 = 65535 & E2, !((f2 = E2 >>> 24) <= l2); ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } if (v2 && 0 == (240 & v2)) { for (M2 = f2, y2 = v2, I2 = m2; v2 = (E2 = n2.lencode[I2 + ((c2 & (1 << M2 + y2) - 1) >> M2)]) >>> 16 & 255, m2 = 65535 & E2, !(M2 + (f2 = E2 >>> 24) <= l2); ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } c2 >>>= M2, l2 -= M2, n2.back += M2; } if (c2 >>>= f2, l2 -= f2, n2.back += f2, n2.length = m2, 0 === v2) { n2.mode = 26; break; } if (32 & v2) { n2.back = -1, n2.mode = 12; break; } if (64 & v2) { e2.msg = "invalid literal/length code", n2.mode = 30; break; } n2.extra = 15 & v2, n2.mode = 22; case 22: if (n2.extra) { for (k2 = n2.extra; l2 < k2; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } n2.length += c2 & (1 << n2.extra) - 1, c2 >>>= n2.extra, l2 -= n2.extra, n2.back += n2.extra; } n2.was = n2.length, n2.mode = 23; case 23: for (; v2 = (E2 = n2.distcode[c2 & (1 << n2.distbits) - 1]) >>> 16 & 255, m2 = 65535 & E2, !((f2 = E2 >>> 24) <= l2); ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } if (0 == (240 & v2)) { for (M2 = f2, y2 = v2, I2 = m2; v2 = (E2 = n2.distcode[I2 + ((c2 & (1 << M2 + y2) - 1) >> M2)]) >>> 16 & 255, m2 = 65535 & E2, !(M2 + (f2 = E2 >>> 24) <= l2); ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } c2 >>>= M2, l2 -= M2, n2.back += M2; } if (c2 >>>= f2, l2 -= f2, n2.back += f2, 64 & v2) { e2.msg = "invalid distance code", n2.mode = 30; break; } n2.offset = m2, n2.extra = 15 & v2, n2.mode = 24; case 24: if (n2.extra) { for (k2 = n2.extra; l2 < k2; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } n2.offset += c2 & (1 << n2.extra) - 1, c2 >>>= n2.extra, l2 -= n2.extra, n2.back += n2.extra; } if (n2.offset > n2.dmax) { e2.msg = "invalid distance too far back", n2.mode = 30; break; } n2.mode = 25; case 25: if (0 === u2) break e; if (g2 = p2 - u2, n2.offset > g2) { if ((g2 = n2.offset - g2) > n2.whave && n2.sane) { e2.msg = "invalid distance too far back", n2.mode = 30; break; } g2 > n2.wnext ? (g2 -= n2.wnext, h2 = n2.wsize - g2) : h2 = n2.wnext - g2, g2 > n2.length && (g2 = n2.length), _2 = n2.window; } else _2 = s2, h2 = i2 - n2.offset, g2 = n2.length; g2 > u2 && (g2 = u2), u2 -= g2, n2.length -= g2; do { s2[i2++] = _2[h2++]; } while (--g2); 0 === n2.length && (n2.mode = 21); break; case 26: if (0 === u2) break e; s2[i2++] = n2.length, u2--, n2.mode = 21; break; case 27: if (n2.wrap) { for (; l2 < 32; ) { if (0 === r2) break e; r2--, c2 |= o2[a2++] << l2, l2 += 8; } if (p2 -= u2, e2.total_out += p2, n2.total += p2, p2 && (e2.adler = n2.check = n2.flags ? gu(n2.check, s2, p2, i2 - p2) : du(n2.check, s2, p2, i2 - p2)), p2 = u2, (n2.flags ? c2 : yu(c2)) !== n2.check) { e2.msg = "incorrect data check", n2.mode = 30; break; } c2 = 0, l2 = 0; } n2.mode = 28; case 28: if (n2.wrap && n2.flags) { for (; l2 < 32; ) { if (0 === r2) break e; r2--, c2 += o2[a2++] << l2, l2 += 8; } if (c2 !== (4294967295 & n2.total)) { e2.msg = "incorrect length check", n2.mode = 30; break; } c2 = 0, l2 = 0; } n2.mode = 29; case 29: T2 = 1; break e; case 30: T2 = -3; break e; case 31: return -4; case 32: default: return -2; } return e2.next_out = i2, e2.avail_out = u2, e2.next_in = a2, e2.avail_in = r2, n2.hold = c2, n2.bits = l2, (n2.wsize || p2 !== e2.avail_out && n2.mode < 30 && (n2.mode < 27 || 4 !== t2)) && Ru(e2, e2.output, e2.next_out, p2 - e2.avail_out), d2 -= e2.avail_in, p2 -= e2.avail_out, e2.total_in += d2, e2.total_out += p2, n2.total += p2, n2.wrap && p2 && (e2.adler = n2.check = n2.flags ? gu(n2.check, s2, p2, e2.next_out - p2) : du(n2.check, s2, p2, e2.next_out - p2)), e2.data_type = n2.bits + (n2.last ? 64 : 0) + (12 === n2.mode ? 128 : 0) + (20 === n2.mode || 15 === n2.mode ? 256 : 0), (0 === d2 && 0 === p2 || 4 === t2) && 0 === T2 && (T2 = -5), T2; }, inflateEnd: function(e2) { if (!e2 || !e2.state) return -2; var t2 = e2.state; return t2.window && (t2.window = null), e2.state = null, 0; }, inflateGetHeader: function(e2, t2) { var n2; return e2 && e2.state ? 0 == (2 & (n2 = e2.state).wrap) ? -2 : (n2.head = t2, t2.done = false, 0) : -2; }, inflateSetDictionary: function(e2, t2) { var n2, o2 = t2.length; return e2 && e2.state ? 0 !== (n2 = e2.state).wrap && 11 !== n2.mode ? -2 : 11 === n2.mode && du(1, t2, o2, 0) !== n2.check ? -3 : Ru(e2, t2, o2, o2) ? (n2.mode = 31, -4) : (n2.havedict = 1, 0) : -2; }, inflateInfo: "pako inflate (from Nodeca project)" }, Ou = true, Gu = true; try { String.fromCharCode.apply(null, [0]); } catch (ac) { Ou = false; } try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (ac) { Gu = false; } for (var Uu = new lu.Buf8(256), Pu = 0; Pu < 256; Pu++) Uu[Pu] = Pu >= 252 ? 6 : Pu >= 248 ? 5 : Pu >= 240 ? 4 : Pu >= 224 ? 3 : Pu >= 192 ? 2 : 1; Uu[254] = Uu[254] = 1; function bu(e2, t2) { if (t2 < 65534 && (e2.subarray && Gu || !e2.subarray && Ou)) return String.fromCharCode.apply(null, lu.shrinkBuf(e2, t2)); for (var n2 = "", o2 = 0; o2 < t2; o2++) n2 += String.fromCharCode(e2[o2]); return n2; } var wu = function(e2) { var t2, n2, o2, s2, a2, i2 = e2.length, r2 = 0; for (s2 = 0; s2 < i2; s2++) 55296 == (64512 & (n2 = e2.charCodeAt(s2))) && s2 + 1 < i2 && 56320 == (64512 & (o2 = e2.charCodeAt(s2 + 1))) && (n2 = 65536 + (n2 - 55296 << 10) + (o2 - 56320), s2++), r2 += n2 < 128 ? 1 : n2 < 2048 ? 2 : n2 < 65536 ? 3 : 4; for (t2 = new lu.Buf8(r2), a2 = 0, s2 = 0; a2 < r2; s2++) 55296 == (64512 & (n2 = e2.charCodeAt(s2))) && s2 + 1 < i2 && 56320 == (64512 & (o2 = e2.charCodeAt(s2 + 1))) && (n2 = 65536 + (n2 - 55296 << 10) + (o2 - 56320), s2++), n2 < 128 ? t2[a2++] = n2 : n2 < 2048 ? (t2[a2++] = 192 | n2 >>> 6, t2[a2++] = 128 | 63 & n2) : n2 < 65536 ? (t2[a2++] = 224 | n2 >>> 12, t2[a2++] = 128 | n2 >>> 6 & 63, t2[a2++] = 128 | 63 & n2) : (t2[a2++] = 240 | n2 >>> 18, t2[a2++] = 128 | n2 >>> 12 & 63, t2[a2++] = 128 | n2 >>> 6 & 63, t2[a2++] = 128 | 63 & n2); return t2; }, Fu = function(e2) { for (var t2 = new lu.Buf8(e2.length), n2 = 0, o2 = t2.length; n2 < o2; n2++) t2[n2] = e2.charCodeAt(n2); return t2; }, qu = function(e2, t2) { var n2, o2, s2, a2, i2 = t2 || e2.length, r2 = new Array(2 * i2); for (o2 = 0, n2 = 0; n2 < i2; ) if ((s2 = e2[n2++]) < 128) r2[o2++] = s2; else if ((a2 = Uu[s2]) > 4) r2[o2++] = 65533, n2 += a2 - 1; else { for (s2 &= 2 === a2 ? 31 : 3 === a2 ? 15 : 7; a2 > 1 && n2 < i2; ) s2 = s2 << 6 | 63 & e2[n2++], a2--; a2 > 1 ? r2[o2++] = 65533 : s2 < 65536 ? r2[o2++] = s2 : (s2 -= 65536, r2[o2++] = 55296 | s2 >> 10 & 1023, r2[o2++] = 56320 | 1023 & s2); } return bu(r2, o2); }, xu = function(e2, t2) { var n2; for ((t2 = t2 || e2.length) > e2.length && (t2 = e2.length), n2 = t2 - 1; n2 >= 0 && 128 == (192 & e2[n2]); ) n2--; return n2 < 0 || 0 === n2 ? t2 : n2 + Uu[e2[n2]] > t2 ? n2 : t2; }, Vu = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 }, Bu = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" }; var Hu = function() { this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0; }; var Ku = function() { this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = false; }, Wu = Object.prototype.toString; function Yu(e2) { if (!(this instanceof Yu)) return new Yu(e2); this.options = lu.assign({ chunkSize: 16384, windowBits: 0, to: "" }, e2 || {}); var t2 = this.options; t2.raw && t2.windowBits >= 0 && t2.windowBits < 16 && (t2.windowBits = -t2.windowBits, 0 === t2.windowBits && (t2.windowBits = -15)), !(t2.windowBits >= 0 && t2.windowBits < 16) || e2 && e2.windowBits || (t2.windowBits += 32), t2.windowBits > 15 && t2.windowBits < 48 && 0 == (15 & t2.windowBits) && (t2.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new Hu(), this.strm.avail_out = 0; var n2 = Nu.inflateInit2(this.strm, t2.windowBits); if (n2 !== Vu.Z_OK) throw new Error(Bu[n2]); if (this.header = new Ku(), Nu.inflateGetHeader(this.strm, this.header), t2.dictionary && ("string" == typeof t2.dictionary ? t2.dictionary = wu(t2.dictionary) : "[object ArrayBuffer]" === Wu.call(t2.dictionary) && (t2.dictionary = new Uint8Array(t2.dictionary)), t2.raw && (n2 = Nu.inflateSetDictionary(this.strm, t2.dictionary)) !== Vu.Z_OK)) throw new Error(Bu[n2]); } function ju(e2, t2) { var n2 = new Yu(t2); if (n2.push(e2, true), n2.err) throw n2.msg || Bu[n2.err]; return n2.result; } Yu.prototype.push = function(e2, t2) { var n2, o2, s2, a2, i2, r2 = this.strm, u2 = this.options.chunkSize, c2 = this.options.dictionary, l2 = false; if (this.ended) return false; o2 = t2 === ~~t2 ? t2 : true === t2 ? Vu.Z_FINISH : Vu.Z_NO_FLUSH, "string" == typeof e2 ? r2.input = Fu(e2) : "[object ArrayBuffer]" === Wu.call(e2) ? r2.input = new Uint8Array(e2) : r2.input = e2, r2.next_in = 0, r2.avail_in = r2.input.length; do { if (0 === r2.avail_out && (r2.output = new lu.Buf8(u2), r2.next_out = 0, r2.avail_out = u2), (n2 = Nu.inflate(r2, Vu.Z_NO_FLUSH)) === Vu.Z_NEED_DICT && c2 && (n2 = Nu.inflateSetDictionary(this.strm, c2)), n2 === Vu.Z_BUF_ERROR && true === l2 && (n2 = Vu.Z_OK, l2 = false), n2 !== Vu.Z_STREAM_END && n2 !== Vu.Z_OK) return this.onEnd(n2), this.ended = true, false; r2.next_out && (0 !== r2.avail_out && n2 !== Vu.Z_STREAM_END && (0 !== r2.avail_in || o2 !== Vu.Z_FINISH && o2 !== Vu.Z_SYNC_FLUSH) || ("string" === this.options.to ? (s2 = xu(r2.output, r2.next_out), a2 = r2.next_out - s2, i2 = qu(r2.output, s2), r2.next_out = a2, r2.avail_out = u2 - a2, a2 && lu.arraySet(r2.output, r2.output, s2, a2, 0), this.onData(i2)) : this.onData(lu.shrinkBuf(r2.output, r2.next_out)))), 0 === r2.avail_in && 0 === r2.avail_out && (l2 = true); } while ((r2.avail_in > 0 || 0 === r2.avail_out) && n2 !== Vu.Z_STREAM_END); return n2 === Vu.Z_STREAM_END && (o2 = Vu.Z_FINISH), o2 === Vu.Z_FINISH ? (n2 = Nu.inflateEnd(this.strm), this.onEnd(n2), this.ended = true, n2 === Vu.Z_OK) : o2 !== Vu.Z_SYNC_FLUSH || (this.onEnd(Vu.Z_OK), r2.avail_out = 0, true); }, Yu.prototype.onData = function(e2) { this.chunks.push(e2); }, Yu.prototype.onEnd = function(e2) { e2 === Vu.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = lu.flattenChunks(this.chunks)), this.chunks = [], this.err = e2, this.msg = this.strm.msg; }; var zu = { Inflate: Yu, inflate: ju, inflateRaw: function(e2, t2) { return (t2 = t2 || {}).raw = true, ju(e2, t2); }, ungzip: ju }, Ju = {}; (0, lu.assign)(Ju, zu, Vu); var Xu = Ju, Zu = function() { function e2(t2) { o(this, e2), this._m = t2, this._n = "InflateModule", this._bLogForInflateOK = false, this._bLogForInflateError = false; } return a(e2, [{ key: "inflate", value: function(e3) { var t2, n2 = new Uint8Array(e3).slice(4), o2 = Date.now(); try { t2 = Xu.inflate(n2, { to: "string" }), this._bLogForInflateOK || (this._bLogForInflateOK = true, new Aa("inflateOK").end()); } catch (i2) { if (this._bLogForInflateError) return; return this._bLogForInflateError = true, void new Aa("inflateError").setMessage(i2).end(); } var s2 = n2.length + 4, a2 = t2.length; return Ve.d("inflate ok. zipped:".concat(s2, " unzipped:").concat(a2) + " compression ratio:".concat(Math.round(100 * (a2 - s2) / a2), "% cost:").concat(Date.now() - o2)), t2; } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), this._bLogForInflateOK = false, this._bLogForInflateError = false; } }]), e2; }(), Qu = function() { function e2(t2) { o(this, e2); var n2 = new Aa("sdkConstruct"); this._n = "ModuleManager", this._isReady = false, this._reason = ha.USER_NOT_LOGGED_IN, this._startLoginTs = 0, this._moduleMap = /* @__PURE__ */ new Map(), this._innerEmitter = null, this._outerEmitter = null, this._checkCount = 0, this._checkTimer = -1, this._moduleMap.set(xn, new Qi(this, t2)), this._moduleMap.set(ro, new Zu(this)), this._moduleMap.set(to, new au(this)), this._moduleMap.set(Zn, new Xr(this)), this._moduleMap.set(Qn, new ou(this)), this._moduleMap.set(eo, new nu(this)), this._moduleMap.set(Jn, new Vr(this)), this._moduleMap.set(zn, new zr(this)), this._moduleMap.set(Rn, new $i(this)), this._moduleMap.set(Nn, new Mr(this)), this._moduleMap.set(On, new yr(this)), this._moduleMap.set(ao, new Ir(this)), this._moduleMap.set(Gn, new Zi(this)), this._moduleMap.set(Un, new Qa(this)), this._moduleMap.set(qn, new Mi(this)), this._moduleMap.set(Pn, new qi(this)), this._moduleMap.set(wn, new Vi(this)), this._moduleMap.set(Fn, new Wi(this)), this._moduleMap.set(Vn, new tr(this)), this._moduleMap.set(io, new cu(this)), this._moduleMap.set(Bn, new sr(this)), this._moduleMap.set(Hn, new ur(this)), this._moduleMap.set(Kn, new dr(this)), this._moduleMap.set(Wn, new gr(this)), this._moduleMap.set(Yn, new Cr(this)), this._moduleMap.set(jn, new Tr(this)), this._moduleMap.set(Xn, new Jr(this)), this._moduleMap.set($n, new Zr(this)), this._moduleMap.set(no, new iu(this)), this._moduleMap.set(oo, new ru(this)), this._moduleMap.set(so, new uu(this)), this._eventThrottleMap = /* @__PURE__ */ new Map(); var s2 = t2.instanceID, a2 = t2.oversea, i2 = t2.SDKAppID, r2 = "instanceID:".concat(s2, " SDKAppID:").concat(i2, " host:").concat(Ot(), " oversea:").concat(a2, " inBrowser:").concat(ie, " inMiniApp:").concat(ae) + " canIUseInflate:".concat(this.canIUseInflate()) + " workerAvailable:".concat(Se, " UserAgent:").concat(ue); Aa.bindEventStatModule(this._moduleMap.get(Bn)), n2.setMessage("".concat(r2, " ").concat(function() { var e3 = ""; if (ae) try { var t3 = re.getSystemInfoSync(), n3 = t3.model, o2 = t3.version, s3 = t3.system, a3 = t3.platform, i3 = t3.SDKVersion; e3 = "model:".concat(n3, " version:").concat(o2, " system:").concat(s3, " platform:").concat(a3, " SDKVersion:").concat(i3); } catch (r3) { e3 = ""; } return e3; }())).end(), Ve.i("SDK ".concat(r2)), ja.prototype._getErrorMessage = this.getErrorMessage.bind(this), this._readyList = void 0, this._ssoLogForReady = null, this._initReadyList(); } return a(e2, [{ key: "_startTimer", value: function() { var e3 = this._moduleMap.get(Qn), t2 = e3.isWorkerEnabled(); Ve.l("".concat(this._n, ".startTimer isWorkerEnabled:").concat(t2, " seed:").concat(this._checkTimer)), t2 ? e3.startWorkerTimer() : this._startMainThreadTimer(); } }, { key: "_startMainThreadTimer", value: function() { this._checkTimer < 0 && (this._checkTimer = setInterval(this.onCheckTimer.bind(this), 1e3)), Ve.l("".concat(this._n, "._startMainThreadTimer seed:").concat(this._checkTimer)); } }, { key: "stopTimer", value: function() { var e3 = this._moduleMap.get(Qn), t2 = e3.isWorkerEnabled(); Ve.l("".concat(this._n, ".stopTimer isWorkerEnabled:").concat(t2, " seed:").concat(this._checkTimer)), t2 ? e3.stopWorkerTimer() : this._stopMainThreadTimer(); } }, { key: "_stopMainThreadTimer", value: function() { Ve.l("".concat(this._n, "._stopMainThreadTimer")), this._checkTimer > 0 && (clearInterval(this._checkTimer), this._checkTimer = -1, this._checkCount = 0); } }, { key: "_stopMainThreadSocket", value: function() { Ve.l("".concat(this._n, "._stopMainThreadSocket")); var e3 = this._moduleMap.get(Jn); e3.setIsWorkerEnabled(true), e3.reConnect(); } }, { key: "_startMainThreadSocket", value: function() { Ve.l("".concat(this._n, "._startMainThreadSocket")); var e3 = this._moduleMap.get(Jn); e3.setIsWorkerEnabled(false), e3.reConnect(); } }, { key: "onWorkerTimerEnabled", value: function() { Ve.l("".concat(this._n, ".onWorkerTimerEnabled, disable main thread timer and socket")), this._stopMainThreadTimer(), this._stopMainThreadSocket(); } }, { key: "onWorkerTimerDisabled", value: function() { Ve.l("".concat(this._n, ".onWorkerTimerDisabled, enable main thread timer and socket")), this._startMainThreadTimer(), this._startMainThreadSocket(); } }, { key: "onCheckTimer", value: function() { this._checkCount += 1; var e3, t2 = D(this._moduleMap); try { for (t2.s(); !(e3 = t2.n()).done; ) { var n2 = v(e3.value, 2)[1]; n2.onCheckTimer && n2.onCheckTimer(this._checkCount); } } catch (o2) { t2.e(o2); } finally { t2.f(); } } }, { key: "_initReadyList", value: function() { var e3 = this; this._readyList = [this._moduleMap.get(Rn), this._moduleMap.get(qn)], this._readyList.forEach(function(t2) { t2.ready(function() { return e3._onModuleReady(); }); }); } }, { key: "_onModuleReady", value: function() { var e3 = true; if (this._readyList.forEach(function(t3) { t3.isReady() || (e3 = false); }), e3 && !this._isReady) { this._isReady = true, this._outerEmitter.emit(k.SDK_READY); var t2 = Date.now() - this._startLoginTs; Ve.w("SDK is ready. cost ".concat(t2, " ms")), this._startLoginTs = Date.now(); var n2 = this._moduleMap.get(Hn).getNetworkType(), o2 = this._ssoLogForReady.getStartTs() + Ue; this._ssoLogForReady.setNetworkType(n2).setMessage(t2).start(o2).end(); } } }, { key: "login", value: function() { 0 === this._startLoginTs && (be(), this._startLoginTs = Date.now(), this._startTimer(), this._moduleMap.get(Hn).start(), this._ssoLogForReady = new Aa("sdkReady"), this._reason = ha.LOGGING_IN); } }, { key: "onLoginFailed", value: function() { this._startLoginTs = 0; } }, { key: "getOuterEmitterInstance", value: function() { return null === this._outerEmitter && (this._outerEmitter = new lr(), Ja(this._outerEmitter), this._outerEmitter._emit = this._outerEmitter.emit, this._outerEmitter.emit = (function(e3, t2) { var n2 = this; if (e3 === k.CONVERSATION_LIST_UPDATED || e3 === k.FRIEND_LIST_UPDATED || e3 === k.GROUP_LIST_UPDATED || e3 === k.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED) if (this._eventThrottleMap.has(e3)) { var o2 = Date.now(), s2 = this._eventThrottleMap.get(e3); o2 - s2.last <= 1e3 ? (s2.timeoutID && clearTimeout(s2.timeoutID), s2.timeoutID = setTimeout(function() { s2.last = Date.now(), n2._outerEmitter._emit.apply(n2._outerEmitter, [e3, { name: e3, data: n2._getEventData(e3) }]); }, 1e3)) : (s2.last = o2, this._outerEmitter._emit.apply(this._outerEmitter, [e3, { name: e3, data: this._getEventData(e3) }])); } else this._eventThrottleMap.set(e3, { last: Date.now(), timeoutID: -1 }), this._outerEmitter._emit.apply(this._outerEmitter, [e3, { name: e3, data: this._getEventData(e3) }]); else this._outerEmitter._emit.apply(this._outerEmitter, [e3, { name: e3, data: arguments[1] }]); }).bind(this)), this._outerEmitter; } }, { key: "_getEventData", value: function(e3) { return e3 === k.CONVERSATION_LIST_UPDATED ? this._moduleMap.get(qn).getLocalConversationList() : e3 === k.FRIEND_LIST_UPDATED ? this._moduleMap.get(bn).getLocalFriendList(false) : e3 === k.GROUP_LIST_UPDATED ? this._moduleMap.get(Pn).getLocalGroupList() : e3 === k.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED ? this._moduleMap.get(qn).getTotalUnreadMessageCount() : void 0; } }, { key: "getInnerEmitterInstance", value: function() { return null === this._innerEmitter && (this._innerEmitter = new lr(), this._innerEmitter._emit = this._innerEmitter.emit, this._innerEmitter.emit = (function(e3, t2) { var n2; n2 = st(arguments[1]) && arguments[1].data ? [e3, { name: arguments[0], data: arguments[1].data }] : [e3, { name: arguments[0], data: arguments[1] }], this._innerEmitter._emit.apply(this._innerEmitter, n2); }).bind(this)), this._innerEmitter; } }, { key: "hasModule", value: function(e3) { return this._moduleMap.has(e3); } }, { key: "getModule", value: function(e3) { return this._moduleMap.get(e3); } }, { key: "canIUseInflate", value: function() { return !!this._moduleMap.get(ro); } }, { key: "isReady", value: function() { return this._isReady; } }, { key: "isIntl", value: function() { return this.getModule(xn).isIntl(); } }, { key: "getNotReadyReason", value: function() { return this._reason; } }, { key: "setNotReadyReason", value: function(e3) { this._reason = e3; } }, { key: "getErrorMessage", value: function(e3, t2, n2) { return this._moduleMap.get(io).get({ key: e3, replacement1: t2, replacement2: n2, isIntl: this.isIntl() }); } }, { key: "outputWarning", value: function(e3, t2, n2) { var o2 = this.getErrorMessage(e3, t2, n2); o2 && Ve.w(o2); } }, { key: "onError", value: function(e3) { var t2 = "code:".concat(e3.code, " message:").concat(e3.message); Ve.w("Oops! ".concat(t2)), new Aa("error").setMessage(t2).setNetworkType(this.getModule(Hn).getNetworkType()).setLevel("error").end(), this.getOuterEmitterInstance().emit(k.ERROR, e3); } }, { key: "restartTimer", value: function() { Ve.l("".concat(this._n, ".restartTimer")), this.stopTimer(), this._startTimer(), this.getModule(Pn).restartPolling(); } }, { key: "getTimerID", value: function() { var e3 = this._moduleMap.get(Qn); return e3.isWorkerEnabled() ? e3.getTimerID() : this._checkTimer; } }, { key: "getPollingTimerID", value: function(e3) { return this._moduleMap.get(Pn).getPollingTimerID(e3); } }, { key: "reset", value: function() { Ve.l("".concat(this._n, ".reset")), be(); var e3, t2 = D(this._moduleMap); try { for (t2.s(); !(e3 = t2.n()).done; ) { var n2 = v(e3.value, 2)[1]; n2.reset && n2.reset(); } } catch (i2) { t2.e(i2); } finally { t2.f(); } this._startLoginTs = 0, this._initReadyList(), this._isReady = false, this.stopTimer(), this._outerEmitter.emit(k.SDK_NOT_READY); var o2, s2 = D(this._eventThrottleMap); try { for (s2.s(); !(o2 = s2.n()).done; ) { var a2 = v(o2.value, 2)[1]; a2.timeoutID && clearTimeout(a2.timeoutID); } } catch (i2) { s2.e(i2); } finally { s2.f(); } this._eventThrottleMap.clear(); } }]), e2; }(), $u2 = function() { function e2(t2) { o(this, e2), this._funcMap = /* @__PURE__ */ new Map(), this._m = t2; } return a(e2, [{ key: "defense", value: function(e3, t2) { var n2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0; if ("string" != typeof e3) return null; if (0 === e3.length) return null; if ("function" != typeof t2) return null; if (this._funcMap.has(e3) && this._funcMap.get(e3).has(t2)) return this._funcMap.get(e3).get(t2); this._funcMap.has(e3) || this._funcMap.set(e3, /* @__PURE__ */ new Map()); var o2 = null; return this._funcMap.get(e3).has(t2) ? o2 = this._funcMap.get(e3).get(t2) : (o2 = this._pack(e3, t2, n2), this._funcMap.get(e3).set(t2, o2)), o2; } }, { key: "defenseOnce", value: function(e3, t2) { var n2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0; return "function" != typeof t2 ? null : this._pack(e3, t2, n2); } }, { key: "find", value: function(e3, t2) { return "string" != typeof e3 || 0 === e3.length || "function" != typeof t2 ? null : this._funcMap.has(e3) && this._funcMap.get(e3).has(t2) ? this._funcMap.get(e3).get(t2) : (this._m.outputWarning("ListenerFnNotFound", e3), null); } }, { key: "delete", value: function(e3, t2) { return "function" == typeof t2 && (!!this._funcMap.has(e3) && (!!this._funcMap.get(e3).has(t2) && (this._funcMap.get(e3).delete(t2), 0 === this._funcMap.get(e3).size && this._funcMap.delete(e3), true))); } }, { key: "_pack", value: function(e3, t2, n2) { var o2 = this; return function() { try { t2.apply(n2, Array.from(arguments)); } catch (u2) { var s2 = Object.values(k).indexOf(e3), a2 = "CallbackError"; if (-1 !== s2) { var i2 = Object.keys(k)[s2]; o2._m.outputWarning(a2, i2, u2); } var r2 = new Aa(a2); r2.setMessage("eventName:".concat(e3)).setMoreMessage(u2.message).end(); } }; } }]), e2; }(), ec = function() { function e2(t2) { o(this, e2); var n2 = { SDKAppID: t2.SDKAppID, unlimitedAVChatRoom: t2.unlimitedAVChatRoom || false, scene: t2.scene || "", oversea: t2.oversea || false, instanceID: Nt(), devMode: t2.devMode || false, proxyServer: t2.proxyServer || void 0, fileUploadProxy: t2.fileUploadProxy || void 0, fileDownloadProxy: t2.fileDownloadProxy || t2.fileUploadProxy || void 0 }; this._m = new Qu(n2), this._safetyCallbackFactory = new $u2(this._m); } return a(e2, [{ key: "onError", value: function(e3) { this._m.onError(e3); } }, { key: "login", value: function(e3) { return this._m.login(), this._getModule(Rn).login(e3); } }, { key: "logout", value: function() { var e3 = this; return this._getModule(Rn).logout().then(function(t2) { return e3._m.reset(), t2; }); } }, { key: "isReady", value: function() { return this._m.isReady(); } }, { key: "isIntl", value: function() { return this._m.isIntl(); } }, { key: "getNotReadyReason", value: function() { return this._m.getNotReadyReason(); } }, { key: "getErrorMessage", value: function(e3, t2, n2) { return this._m.getErrorMessage(e3, t2, n2); } }, { key: "_getModule", value: function(e3) { return this._m.getModule(e3); } }, { key: "destroy", value: function() { var e3 = this; return this.logout().finally(function() { e3._m.stopTimer(), e3._getModule(Qn).terminate(), e3._getModule(Jn).dealloc(); var t2 = e3._m.getOuterEmitterInstance(), n2 = e3._getModule(xn); t2.emit(k.SDK_DESTROY, { SDKAppID: n2.getSDKAppID() }); }); } }, { key: "on", value: function(e3, t2, n2) { Ve.d("on", "eventName:".concat(e3)), this._m.getOuterEmitterInstance().on(e3, this._safetyCallbackFactory.defense(e3, t2, n2), n2); } }, { key: "once", value: function(e3, t2, n2) { Ve.d("once", "eventName:".concat(e3)), this._m.getOuterEmitterInstance().once(e3, this._safetyCallbackFactory.defenseOnce(e3, t2, n2), n2 || this); } }, { key: "off", value: function(e3, t2, n2, o2) { Ve.d("off", "eventName:".concat(e3)); var s2 = this._safetyCallbackFactory.find(e3, t2); null !== s2 && (this._m.getOuterEmitterInstance().off(e3, s2, n2, o2), this._safetyCallbackFactory.delete(e3, t2)); } }, { key: "registerPlugin", value: function(e3) { it(e3["tim-offline-push-plugin"]) ? this._getModule(Yn).registerPlugin(e3) : this._getModule(no).registerPlugin(e3); } }, { key: "setLogLevel", value: function(e3) { if (e3 <= 0) { var t2 = this.getErrorMessage("TIM_ASCII_ART"); t2 && formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", t2); var n2 = this.getErrorMessage("API_REFER"); if (n2) { Kt() ? formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", "%c ".concat("IM SDK API ->", " %c"), "background:#ff9d00; padding:1px; border-radius:3px; color: #fff", "background:transparent", n2) : formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", "IM SDK API ->", n2); } var o2 = this.getErrorMessage("DOCS_GUIDE"); o2 && formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", o2); } Ve.setLevel(e3); } }, { key: "createTextMessage", value: function(e3) { return this._getModule(Nn).createTextMessage(e3); } }, { key: "createTextAtMessage", value: function(e3) { return this._getModule(Nn).createTextMessage(e3); } }, { key: "createImageMessage", value: function(e3) { return this._getModule(Nn).createImageMessage(e3); } }, { key: "createAudioMessage", value: function(e3) { return this._getModule(Nn).createAudioMessage(e3); } }, { key: "createVideoMessage", value: function(e3) { return this._getModule(Nn).createVideoMessage(e3); } }, { key: "createCustomMessage", value: function(e3) { return this._getModule(Nn).createCustomMessage(e3); } }, { key: "createFaceMessage", value: function(e3) { return this._getModule(Nn).createFaceMessage(e3); } }, { key: "createFileMessage", value: function(e3) { return this._getModule(Nn).createFileMessage(e3); } }, { key: "createLocationMessage", value: function(e3) { return this._getModule(Nn).createLocationMessage(e3); } }, { key: "createMergerMessage", value: function(e3) { return this._getModule(Nn).createMergerMessage(e3); } }, { key: "downloadMergerMessage", value: function(e3) { return e3.type !== E.MSG_MERGER ? Za({ code: ha.MESSAGE_MERGER_TYPE_INVALID }) : zt(e3.payload.downloadKey) ? Za({ code: ha.MESSAGE_MERGER_KEY_INVALID }) : this._getModule(Nn).downloadMergerMessage(e3).catch(function(e4) { return Za({ code: ha.MESSAGE_MERGER_DOWNLOAD_FAIL }); }); } }, { key: "createForwardMessage", value: function(e3) { return this._getModule(Nn).createForwardMessage(e3); } }, { key: "sendMessage", value: function(e3, t2) { return e3 instanceof Wa ? this._getModule(Nn).sendMessageInstance(e3, t2) : Za({ code: ha.MESSAGE_SEND_NEED_MESSAGE_INSTANCE }); } }, { key: "callExperimentalAPI", value: function(e3, t2) { return "sendComboMessage" === e3 ? this._getModule(ao).sendMessage(t2) : "handleGroupInvitation" === e3 ? this._getModule(Pn).handleGroupInvitation(t2) : "isCommercialAbilityEnabled" === e3 ? this._getModule(to).isFeatureEnabled(t2) : "isIntl" === e3 ? this.isIntl() : "sendTRTCCustomData" === e3 ? this._getModule(so).sendTRTCCustomData(t2) : "getTimerID" === e3 ? this._m.getTimerID() : "getPollingTimerID" === e3 ? this._m.getPollingTimerID(t2) : Za({ code: ha.INVALID_OPERATION }); } }, { key: "revokeMessage", value: function(e3) { return this._getModule(Nn).revokeMessage(e3); } }, { key: "resendMessage", value: function(e3) { return this._getModule(Nn).resendMessage(e3); } }, { key: "deleteMessage", value: function(e3) { return this._getModule(Nn).deleteMessage(e3); } }, { key: "translateText", value: function(e3) { return this._getModule(Nn).translateText(e3); } }, { key: "setMessageExtensions", value: function(e3, t2) { return this._getModule(On).setMessageExtensions(e3, t2); } }, { key: "getMessageExtensions", value: function(e3) { return this._getModule(On).getMessageExtensions(e3); } }, { key: "deleteMessageExtensions", value: function(e3, t2) { return this._getModule(On).deleteMessageExtensions(e3, t2); } }, { key: "modifyMessage", value: function(e3) { return this._getModule(Nn).modifyRemoteMessage(e3); } }, { key: "getMessageList", value: function(e3) { return this._getModule(qn).getMessageList(e3); } }, { key: "getMessageListHopping", value: function(e3) { return this._getModule(qn).getMessageListHopping(e3); } }, { key: "sendMessageReadReceipt", value: function(e3) { return this._getModule(qn).sendReadReceipt(e3); } }, { key: "getMessageReadReceiptList", value: function(e3) { return this._getModule(qn).getReadReceiptList(e3); } }, { key: "getGroupMessageReadMemberList", value: function(e3) { return this._getModule(Pn).getReadReceiptDetail(e3); } }, { key: "findMessage", value: function(e3) { return this._getModule(qn).findMessage(e3); } }, { key: "setMessageRead", value: function(e3) { return this._getModule(qn).setMessageRead(e3); } }, { key: "getConversationList", value: function(e3) { return this._getModule(qn).getConversationList(e3); } }, { key: "getConversationProfile", value: function(e3) { return this._getModule(qn).getConversationProfile(e3); } }, { key: "deleteConversation", value: function(e3) { return this._getModule(qn).deleteConversation(e3); } }, { key: "clearHistoryMessage", value: function(e3) { return this._getModule(qn).clearHistoryMessage(e3); } }, { key: "pinConversation", value: function(e3) { return this._getModule(qn).pinConversation(e3); } }, { key: "setAllMessageRead", value: function(e3) { return this._getModule(qn).setAllMessageRead(e3); } }, { key: "setMessageRemindType", value: function(e3) { return this._getModule(qn).setMessageRemindType(e3); } }, { key: "getTotalUnreadMessageCount", value: function() { return this._getModule(qn).getTotalUnreadMessageCount(); } }, { key: "setConversationCustomData", value: function(e3) { return this._getModule(qn).setConversationCustomData(e3); } }, { key: "markConversation", value: function(e3) { return this._getModule(qn).markConversation(e3); } }, { key: "getConversationGroupList", value: function() { return this._getModule(qn).getConversationGroupList(); } }, { key: "createConversationGroup", value: function(e3) { return this._getModule(qn).createConversationGroup(e3); } }, { key: "deleteConversationGroup", value: function(e3) { return this._getModule(qn).deleteConversationGroup(e3); } }, { key: "renameConversationGroup", value: function(e3) { return this._getModule(qn).renameConversationGroup(e3); } }, { key: "addConversationsToGroup", value: function(e3) { return this._getModule(qn).addConversationsToGroup(e3); } }, { key: "deleteConversationsFromGroup", value: function(e3) { return this._getModule(qn).deleteConversationsFromGroup(e3); } }, { key: "getMyProfile", value: function() { return this._getModule(Gn).getMyProfile(); } }, { key: "getUserProfile", value: function(e3) { return this._getModule(Gn).getUserProfile(e3); } }, { key: "updateMyProfile", value: function(e3) { return this._getModule(Gn).updateMyProfile(e3); } }, { key: "getBlacklist", value: function() { return this._getModule(Gn).getLocalBlacklist(); } }, { key: "addToBlacklist", value: function(e3) { return this._getModule(Gn).addBlacklist(e3); } }, { key: "removeFromBlacklist", value: function(e3) { return this._getModule(Gn).deleteBlacklist(e3); } }, { key: "setSelfStatus", value: function(e3) { return this._getModule(Gn).setSelfStatus(e3); } }, { key: "getUserStatus", value: function(e3) { return this._getModule(Gn).getUserStatus(e3); } }, { key: "subscribeUserStatus", value: function(e3) { return this._getModule(Gn).subscribeUserStatus(e3); } }, { key: "unsubscribeUserStatus", value: function(e3) { return this._getModule(Gn).unsubscribeUserStatus(e3); } }, { key: "getFriendList", value: function() { var e3 = this._getModule(bn); return e3 ? e3.getLocalFriendList() : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "addFriend", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.addFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "deleteFriend", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.deleteFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "checkFriend", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.checkFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "getFriendProfile", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.getFriendProfile(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "updateFriend", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.updateFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "getFriendApplicationList", value: function() { var e3 = this._getModule(bn); return e3 ? e3.getLocalFriendApplicationList() : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "acceptFriendApplication", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.acceptFriendApplication(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "refuseFriendApplication", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.refuseFriendApplication(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "deleteFriendApplication", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.deleteFriendApplication(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "setFriendApplicationRead", value: function() { var e3 = this._getModule(bn); return e3 ? e3.setFriendApplicationRead() : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "getFriendGroupList", value: function() { var e3 = this._getModule(bn); return e3 ? e3.getLocalFriendGroupList() : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "createFriendGroup", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.createFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "deleteFriendGroup", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.deleteFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "addToFriendGroup", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.addToFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "removeFromFriendGroup", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.removeFromFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "renameFriendGroup", value: function(e3) { var t2 = this._getModule(bn); return t2 ? t2.renameFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE }); } }, { key: "getGroupList", value: function(e3) { return this._getModule(Pn).getGroupList(e3); } }, { key: "getGroupProfile", value: function(e3) { return this._getModule(Pn).getGroupProfile(e3); } }, { key: "createGroup", value: function(e3) { return this._getModule(Pn).createGroup(e3); } }, { key: "dismissGroup", value: function(e3) { return this._getModule(Pn).dismissGroup(e3); } }, { key: "updateGroupProfile", value: function(e3) { return this._getModule(Pn).updateGroupProfile(e3); } }, { key: "joinGroup", value: function(e3) { return this._getModule(Pn).joinGroup(e3); } }, { key: "quitGroup", value: function(e3) { return this._getModule(Pn).quitGroup(e3); } }, { key: "searchGroupByID", value: function(e3) { return this._getModule(Pn).searchGroupByID(e3); } }, { key: "getGroupOnlineMemberCount", value: function(e3) { return this._getModule(Pn).getGroupOnlineMemberCount(e3); } }, { key: "changeGroupOwner", value: function(e3) { return this._getModule(Pn).changeGroupOwner(e3); } }, { key: "getGroupApplicationList", value: function() { return this._getModule(Pn).getGroupApplicationList(); } }, { key: "handleGroupApplication", value: function(e3) { return this._getModule(Pn).handleGroupApplication(e3); } }, { key: "initGroupAttributes", value: function(e3) { return this._getModule(Pn).initGroupAttributes(e3); } }, { key: "setGroupAttributes", value: function(e3) { return this._getModule(Pn).setGroupAttributes(e3); } }, { key: "deleteGroupAttributes", value: function(e3) { return this._getModule(Pn).deleteGroupAttributes(e3); } }, { key: "getGroupAttributes", value: function(e3) { return this._getModule(Pn).getGroupAttributes(e3); } }, { key: "setGroupCounters", value: function(e3) { return this._getModule(Pn).setGroupCounters(e3); } }, { key: "increaseGroupCounter", value: function(e3) { return this._getModule(Pn).increaseGroupCounter(e3); } }, { key: "decreaseGroupCounter", value: function(e3) { return this._getModule(Pn).decreaseGroupCounter(e3); } }, { key: "getGroupCounters", value: function(e3) { return this._getModule(Pn).getGroupCounters(e3); } }, { key: "getGroupMemberList", value: function(e3) { return this._getModule(wn).getGroupMemberList(e3); } }, { key: "getGroupMemberProfile", value: function(e3) { return this._getModule(wn).getGroupMemberProfile(e3); } }, { key: "addGroupMember", value: function(e3) { return this._getModule(wn).addGroupMember(e3); } }, { key: "deleteGroupMember", value: function(e3) { return this._getModule(wn).deleteGroupMember(e3); } }, { key: "setGroupMemberMuteTime", value: function(e3) { return this._getModule(wn).setGroupMemberMuteTime(e3); } }, { key: "setGroupMemberRole", value: function(e3) { return this._getModule(wn).setGroupMemberRole(e3); } }, { key: "setGroupMemberNameCard", value: function(e3) { return this._getModule(wn).setGroupMemberNameCard(e3); } }, { key: "setGroupMemberCustomField", value: function(e3) { return this._getModule(wn).setGroupMemberCustomField(e3); } }, { key: "markGroupMemberList", value: function(e3) { return this._getModule(wn).markGroupMemberList(e3); } }, { key: "getJoinedCommunityList", value: function() { return this._getModule(Fn).getJoinedCommunityList(); } }, { key: "createTopicInCommunity", value: function(e3) { return this._getModule(Fn).createTopicInCommunity(e3); } }, { key: "deleteTopicFromCommunity", value: function(e3) { return this._getModule(Fn).deleteTopicFromCommunity(e3); } }, { key: "updateTopicProfile", value: function(e3) { return this._getModule(Fn).updateTopicProfile(e3); } }, { key: "getTopicList", value: function(e3) { return this._getModule(Fn).getTopicList(e3); } }]), e2; }(), tc = { login: 1, logout: 1, destroy: 1, on: 1, off: 1, ready: 1, setLogLevel: 1, joinGroup: 1, quitGroup: 1, registerPlugin: 1, getGroupOnlineMemberCount: 1 }; function nc(e2, t2) { if (e2.isReady() || 1 === tc[t2]) return true; var n2 = e2.getNotReadyReason(), o2 = { code: n2, message: "".concat(e2.getErrorMessage(n2), " | ").concat(t2, " | ").concat(e2.getErrorMessage(ha.SDK_IS_NOT_READY)) }; return e2.onError(o2), o2; } var oc = {}, sc = {}; return sc.create = function(e2) { var n2 = 0, o2 = e2.SDKAppID; if (et(o2)) n2 = o2; else if (n2 = parseInt(o2), isNaN(o2)) return Ve.e("".concat("TIM.create", " failed. Failed to parse the SDKAppID, please check the arguments")), null; if (n2 && oc[n2]) return oc[n2]; Ve.l("".concat("TIM.create")); var s2 = new ec(t(t({}, e2), {}, { SDKAppID: n2 })); s2.on(k.SDK_DESTROY, function(e3) { oc[e3.data.SDKAppID] = null, delete oc[e3.data.SDKAppID]; }); var a2 = function(e3) { var t2 = /* @__PURE__ */ Object.create(null); return Object.keys(An).forEach(function(n3) { if (e3[n3]) { var o3 = new S(); t2[n3] = function() { var t3 = Array.from(arguments); return o3.use(function(t4, o4) { var s3 = nc(e3, n3); return true === s3 ? o4() : Za(s3); }).use(function(e4, t4) { if (true === Jt(e4, Ln[n3], n3)) return t4(); }).use(function(t4, o4) { return e3[n3].apply(e3, t4); }), o3.run(t3); }; } }), t2; }(s2); return oc[n2] = a2, Ln.hookGetAPITips(s2.getErrorMessage.bind(s2)), Ve.l("".concat("TIM.create", " ok")), a2; }, sc.TYPES = E, sc.EVENT = k, sc.VERSION = "2.27.6", Ve.l("TIM.VERSION:".concat(sc.VERSION)), sc; }); })(timWx); var timWxExports = timWx.exports; const TIM = /* @__PURE__ */ getDefaultExportFromCjs(timWxExports); var timUploadPlugin = { exports: {} }; (function(module, exports) { var factory; factory = function() { function e(e2, t2) { var n2 = Object.keys(e2); if (Object.getOwnPropertySymbols) { var o2 = Object.getOwnPropertySymbols(e2); t2 && (o2 = o2.filter(function(t3) { return Object.getOwnPropertyDescriptor(e2, t3).enumerable; })), n2.push.apply(n2, o2); } return n2; } function t(t2) { for (var n2 = 1; n2 < arguments.length; n2++) { var o2 = null != arguments[n2] ? arguments[n2] : {}; n2 % 2 ? e(Object(o2), true).forEach(function(e2) { s(t2, e2, o2[e2]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(o2)) : e(Object(o2)).forEach(function(e2) { Object.defineProperty(t2, e2, Object.getOwnPropertyDescriptor(o2, e2)); }); } return t2; } function n(e2) { return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) { return typeof e3; } : function(e3) { return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3; })(e2); } function o(e2, t2) { if (!(e2 instanceof t2)) throw new TypeError("Cannot call a class as a function"); } function r(e2, t2) { for (var n2 = 0; n2 < t2.length; n2++) { var o2 = t2[n2]; o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e2, o2.key, o2); } } function a(e2, t2, n2) { return t2 && r(e2.prototype, t2), n2 && r(e2, n2), Object.defineProperty(e2, "prototype", { writable: false }), e2; } function s(e2, t2, n2) { return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2; } function i(e2, t2) { if (null == e2) return {}; var n2, o2, r2 = function(e3, t3) { if (null == e3) return {}; var n3, o3, r3 = {}, a3 = Object.keys(e3); for (o3 = 0; o3 < a3.length; o3++) n3 = a3[o3], t3.indexOf(n3) >= 0 || (r3[n3] = e3[n3]); return r3; }(e2, t2); if (Object.getOwnPropertySymbols) { var a2 = Object.getOwnPropertySymbols(e2); for (o2 = 0; o2 < a2.length; o2++) n2 = a2[o2], t2.indexOf(n2) >= 0 || Object.prototype.propertyIsEnumerable.call(e2, n2) && (r2[n2] = e2[n2]); } return r2; } var f = "undefined" != typeof wx && "function" == typeof wx.getSystemInfoSync && Boolean(wx.getSystemInfoSync().fontSizeSetting), u = "undefined" != typeof qq && "function" == typeof qq.getSystemInfoSync && Boolean(qq.getSystemInfoSync().fontSizeSetting), l = "undefined" != typeof tt && "function" == typeof tt.getSystemInfoSync && Boolean(tt.getSystemInfoSync().fontSizeSetting), c = "undefined" != typeof swan && "function" == typeof swan.getSystemInfoSync && Boolean(swan.getSystemInfoSync().fontSizeSetting), y = "undefined" != typeof my && "function" == typeof my.getSystemInfoSync && Boolean(my.getSystemInfoSync().fontSizeSetting), d = "undefined" != typeof uni && "undefined" == typeof window && "function" == typeof requireNativePlugin, p = d && "ios" === uni.getDeviceInfo().platform.toLocaleLowerCase(), g = (d && uni.getDeviceInfo().platform.toLocaleLowerCase(), f || u || l || c || y || d), m = u ? qq : l ? tt : c ? swan : y ? my : f ? wx : d ? uni : {}, h = function(e2) { if ("object" !== n(e2) || null === e2) return false; var t2 = Object.getPrototypeOf(e2); if (null === t2) return true; for (var o2 = t2; null !== Object.getPrototypeOf(o2); ) o2 = Object.getPrototypeOf(o2); return t2 === o2; }; function v(e2) { if (null == e2) return true; if ("boolean" == typeof e2) return false; if ("number" == typeof e2) return 0 === e2; if ("string" == typeof e2) return 0 === e2.length; if ("function" == typeof e2) return 0 === e2.length; if (Array.isArray(e2)) return 0 === e2.length; if (e2 instanceof Error) return "" === e2.message; if (h(e2)) { for (var t2 in e2) if (Object.prototype.hasOwnProperty.call(e2, t2)) return false; return true; } return false; } var b = function() { function e2() { o(this, e2); } return a(e2, [{ key: "request", value: function(e3, t2) { var n2 = this, o2 = e3.downloadUrl || "", r2 = (e3.method || "PUT").toUpperCase(), a2 = e3.url; if (e3.qs) { var s2 = function(e4) { var t3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "&", n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "="; return v(e4) ? "" : h(e4) ? Object.keys(e4).map(function(o3) { var r3 = encodeURIComponent(o3) + n3; return Array.isArray(e4[o3]) ? e4[o3].map(function(e5) { return r3 + encodeURIComponent(e5); }).join(t3) : r3 + encodeURIComponent(e4[o3]); }).filter(Boolean).join(t3) : void 0; }(e3.qs); s2 && (a2 += "".concat(-1 === a2.indexOf("?") ? "?" : "&").concat(s2)); } var i2 = new XMLHttpRequest(); i2.open(r2, a2, true), i2.responseType = e3.dataType || "text"; var f2 = e3.headers || {}; if (!v(f2)) for (var u2 in f2) f2.hasOwnProperty(u2) && "content-length" !== u2.toLowerCase() && "user-agent" !== u2.toLowerCase() && "origin" !== u2.toLowerCase() && "host" !== u2.toLowerCase() && i2.setRequestHeader(u2, f2[u2]); return i2.onload = function() { if (200 === i2.status) t2(null, n2._xhrRes(i2, n2._xhrBody(i2, o2))); else { var e4 = { code: i2.status, message: JSON.stringify(i2.responseText) }; t2(e4, n2._xhrRes(i2, n2._xhrBody(i2))); } }, i2.onerror = function(e4) { var o3 = n2._xhrBody(i2), r3 = { code: i2.status, message: JSON.stringify(i2.responseText) }; o3 || i2.statusText || 0 !== i2.status || (e4.message = "CORS blocked or network error"), t2(r3, n2._xhrRes(i2, o3)), r3 = null; }, e3.onProgress && i2.upload && (i2.upload.onprogress = function(t3) { var n3 = t3.total, o3 = t3.loaded, r3 = Math.floor(100 * o3 / n3); e3.onProgress({ total: n3, loaded: o3, percent: (r3 >= 100 ? 100 : r3) / 100 }); }), i2.send(e3.resources), i2; } }, { key: "_xhrRes", value: function(e3, t2) { var n2 = {}; return e3.getAllResponseHeaders().trim().split("\n").forEach(function(e4) { if (e4) { var t3 = e4.indexOf(":"), o2 = e4.substr(0, t3).trim().toLowerCase(), r2 = e4.substr(t3 + 1).trim(); n2[o2] = r2; } }), { statusCode: e3.status, statusMessage: e3.statusText, headers: n2, data: t2 }; } }, { key: "_xhrBody", value: function(e3, t2) { return 200 === e3.status && t2 ? { location: t2 } : { response: e3.responseText }; } }]), e2; }(), O = ["unknown", "image", "video", "audio", "log"], w = ["name"], S = function() { function e2() { o(this, e2); } return a(e2, [{ key: "request", value: function(e3, n2) { var o2 = this, r2 = e3.resources, a2 = void 0 === r2 ? "" : r2, s2 = e3.headers, f2 = void 0 === s2 ? {} : s2, u2 = e3.url, l2 = e3.downloadUrl, c2 = void 0 === l2 ? "" : l2, d2 = u2, g2 = null, h2 = c2.match(/^(https?:\/\/[^/]+\/)([^/]*\/?)(.*)$/), v2 = decodeURIComponent(h2[3]), b2 = { key: v2.indexOf("?") > -1 ? v2.split("?")[0] : v2, success_action_status: 200, "Content-Type": "" }, S2 = {}; if (p) { var C = u2.split("?sign="); if (C.length > 1) { var P = C[1]; d2 = "".concat(C[0], "?sign=").concat(encodeURIComponent("".concat(P))), S2.sign = decodeURIComponent(P), S2.signature = decodeURIComponent(P); } } var j = { url: d2, header: f2, name: "file", filePath: a2, formData: t(t({}, b2), S2), timeout: e3.timeout || 3e5 }; if (y) { var x = j; x.name, j = t(t({}, i(x, w)), {}, { fileName: "file", fileType: O[e3.fileType] }); } return (g2 = m.uploadFile(t(t({}, j), {}, { success: function(e4) { o2._handleResponse({ response: e4, downloadUrl: c2, callback: n2 }); }, fail: function(e4) { o2._handleResponse({ response: e4, downloadUrl: c2, callback: n2 }); } }))).onProgressUpdate && g2.onProgressUpdate(function(t2) { e3.onProgress && e3.onProgress({ total: t2.totalBytesExpectedToSend, loaded: t2.totalBytesSent, percent: Math.floor(t2.progress) / 100 }); }), g2; } }, { key: "_handleResponse", value: function(e3) { var n2 = e3.downloadUrl, o2 = e3.response, r2 = e3.callback, a2 = o2.header, s2 = {}; if (a2) for (var i2 in a2) a2.hasOwnProperty(i2) && (s2[i2.toLowerCase()] = a2[i2]); var f2 = +o2.statusCode; 200 === f2 ? r2(null, { statusCode: f2, headers: s2, data: t(t({}, o2.data), {}, { location: n2 }) }) : r2({ code: f2, message: JSON.stringify(o2.data) }, { statusCode: f2, headers: s2, data: void 0 }); } }]), e2; }(); return function() { function e2() { o(this, e2), formatAppLog("log", "at node_modules/tim-upload-plugin/index.js:1", "TIMUploadPlugin.VERSION: ".concat("1.2.0")), this.retry = 1, this.tryCount = 0, this.systemClockOffset = 0, this.httpRequest = g ? new S() : new b(); } return a(e2, [{ key: "uploadFile", value: function(e3, t2) { var n2 = this; return this.httpRequest.request(e3, function(o2, r2) { o2 && n2.tryCount < n2.retry && n2.allowRetry(o2) ? (n2.tryCount++, n2.uploadFile(e3, t2)) : (n2.tryCount = 0, t2(o2, r2)); }); } }, { key: "allowRetry", value: function(e3) { var t2 = false, n2 = false; if (e3) { var o2 = e3.headers && (e3.headers.date || e3.headers.Date) || e3.error && e3.error.ServerTime; try { var r2 = e3.error && e3.error.Code, a2 = e3.error && e3.error.Message; ("RequestTimeTooSkewed" === r2 || "AccessDenied" === r2 && "Request has expired" === a2) && (n2 = true); } catch (f2) { } if (n2 && o2) { var s2 = Date.now(), i2 = Date.parse(o2); Math.abs(s2 + this.systemClockOffset - i2) >= 3e4 && (this.systemClockOffset = i2 - s2, t2 = true); } else 5 === Math.floor(e3.statusCode / 100) && (t2 = true); } return t2; } }]), e2; }(); }, module.exports = factory(); })(timUploadPlugin); var timUploadPluginExports = timUploadPlugin.exports; const TIMUploadPlugin = /* @__PURE__ */ getDefaultExportFromCjs(timUploadPluginExports); var aegis_min = { exports: {} }; (function(module, exports) { !function(e, t) { module.exports = t(); }(commonjsGlobal, function() { var n = function(e2, t2) { return (n = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? function(e3, t3) { e3.__proto__ = t3; } : function(e3, t3) { for (var n2 in t3) Object.prototype.hasOwnProperty.call(t3, n2) && (e3[n2] = t3[n2]); }))(e2, t2); }, u = function() { return (u = Object.assign || function(e2) { for (var t2, n2 = 1, o2 = arguments.length; n2 < o2; n2++) for (var i2 in t2 = arguments[n2]) Object.prototype.hasOwnProperty.call(t2, i2) && (e2[i2] = t2[i2]); return e2; }).apply(this, arguments); }; function s(e2, s2, l2, a2) { return new (l2 = l2 || Promise)(function(n2, t2) { function o2(e3) { try { r2(a2.next(e3)); } catch (e4) { t2(e4); } } function i2(e3) { try { r2(a2.throw(e3)); } catch (e4) { t2(e4); } } function r2(e3) { var t3; e3.done ? n2(e3.value) : ((t3 = e3.value) instanceof l2 ? t3 : new l2(function(e4) { e4(t3); })).then(o2, i2); } r2((a2 = a2.apply(e2, s2 || [])).next()); }); } function f(o2, i2) { var r2, s2, l2, a2 = { label: 0, sent: function() { if (1 & l2[0]) throw l2[1]; return l2[1]; }, trys: [], ops: [] }, e2 = { next: t2(0), throw: t2(1), return: t2(2) }; return "function" == typeof Symbol && (e2[Symbol.iterator] = function() { return this; }), e2; function t2(n2) { return function(e3) { var t3 = [n2, e3]; if (r2) throw new TypeError("Generator is already executing."); for (; a2; ) try { if (r2 = 1, s2 && (l2 = 2 & t3[0] ? s2.return : t3[0] ? s2.throw || ((l2 = s2.return) && l2.call(s2), 0) : s2.next) && !(l2 = l2.call(s2, t3[1])).done) return l2; switch (s2 = 0, (t3 = l2 ? [2 & t3[0], l2.value] : t3)[0]) { case 0: case 1: l2 = t3; break; case 4: return a2.label++, { value: t3[1], done: false }; case 5: a2.label++, s2 = t3[1], t3 = [0]; continue; case 7: t3 = a2.ops.pop(), a2.trys.pop(); continue; default: if (!((l2 = 0 < (l2 = a2.trys).length && l2[l2.length - 1]) || 6 !== t3[0] && 2 !== t3[0])) { a2 = 0; continue; } if (3 === t3[0] && (!l2 || t3[1] > l2[0] && t3[1] < l2[3])) a2.label = t3[1]; else if (6 === t3[0] && a2.label < l2[1]) a2.label = l2[1], l2 = t3; else { if (!(l2 && a2.label < l2[2])) { l2[2] && a2.ops.pop(), a2.trys.pop(); continue; } a2.label = l2[2], a2.ops.push(t3); } } t3 = i2.call(o2, a2); } catch (e4) { t3 = [6, e4], s2 = 0; } finally { r2 = l2 = 0; } if (5 & t3[0]) throw t3[1]; return { value: t3[0] ? t3[1] : void 0, done: true }; }; } } function l() { for (var e2 = 0, t2 = 0, n2 = arguments.length; t2 < n2; t2++) e2 += arguments[t2].length; for (var o2 = Array(e2), i2 = 0, t2 = 0; t2 < n2; t2++) for (var r2 = arguments[t2], s2 = 0, l2 = r2.length; s2 < l2; s2++, i2++) o2[i2] = r2[s2]; return o2; } Object.assign || Object.defineProperty(Object, "assign", { enumerable: false, configurable: true, writable: true, value: function(e2) { if (null == e2) throw new TypeError("Cannot convert first argument to object"); for (var t2 = Object(e2), n2 = 1; n2 < arguments.length; n2++) if (null != (o2 = arguments[n2])) for (var o2 = Object(o2), i2 = Object.keys(Object(o2)), r2 = 0, s2 = i2.length; r2 < s2; r2++) { var l2 = i2[r2], a2 = Object.getOwnPropertyDescriptor(o2, l2); null != a2 && a2.enumerable && (t2[l2] = o2[l2]); } return t2; } }); var o, q = ["/collect/offlineAuto", "/aegis-sdk", "/flog.core.min.js", "pingfore.qq.com/pingd", "h.trace.qq.com/kv", "beacon.qq.com", "dmplog.qq.com", "qq.com/report", "report.qqweb.qq.com", "tpstelemetry.tencent.com", "insight.cloud.tencent.com", "www.googletagmanager.com", "report.idqqimg.com", "google-analytics.com", "arms-retcode.aliyuncs.com", "px.effirst.com", "sentry", "hot-update.json", "u.c.b.r.o.w.s.e.r", "report.url.cn", "sockjs-node"], p = ["ext1", "ext2", "ext3", "level", "trace", "tag", "seq", "code"], D = ["static", "fetch"], k = (e.prototype.indexOf = function(e2, t2) { for (var n2 = 0; n2 < e2.length; n2++) if (e2[n2].callback === t2) return n2; return -1; }, e.prototype.on = function(e2, t2, n2) { var o2; if (void 0 === n2 && (n2 = 0), this) return (o2 = this.eventsList[e2]) || (this.eventsList[e2] = [], o2 = this.eventsList[e2]), -1 === this.indexOf(o2, t2) && o2.push({ name: e2, type: n2 || 0, callback: t2 }), this; }, e.prototype.one = function(e2, t2) { this.on(e2, t2, 1); }, e.prototype.remove = function(e2, t2) { if (this) { var n2 = this.eventsList[e2]; if (n2) { if (t2) return n2.length && (t2 = this.indexOf(n2, t2), n2.splice(t2, 1)), this; try { delete this.eventsList[e2]; } catch (e3) { } } return null; } }, e.prototype.clear = function() { this.eventsList = {}; }, e), F = function(e2) { if (!e2 || 0 === e2.length) return "{}"; e2 = Array.isArray(e2) ? e2 : [e2]; var t2 = Object.keys(e2[0]), n2 = {}, o2 = (t2.forEach(function(t3) { n2[t3] = e2.map(function(e3) { return e3[t3]; }); }), n2.count = e2.length, n2); if ("string" == typeof o2) return o2; try { return JSON.stringify(o2, i()) || "undefined"; } catch (o3) { return "error happen when aegis stringify: \n " + o3.message + " \n " + o3.stack; } }; function e() { var s2 = this; this.emit = function(e2, t2) { if (s2) { var n2; if (null != (o2 = s2.eventsList[e2]) && o2.length) for (var o2 = o2.slice(), i2 = 0; i2 < o2.length; i2++) { n2 = o2[i2]; try { var r2 = n2.callback.apply(s2, [t2]); if (1 === n2.type && s2.remove(e2, n2.callback), false === r2) break; } catch (e3) { throw e3; } } return s2; } }, this.eventsList = {}; } (r = o = o || {})[r.number = -1] = "number", r.string = ""; function d(e2) { return "string" == typeof e2 && /^\//.test(e2) ? "https:" === (null === location || void 0 === location ? void 0 : location.protocol) : /^https/.test(e2); } function h(e2, t2, n2) { try { var o2 = "function" == typeof t2 ? t2(e2, null == n2 ? void 0 : n2.url) || "" : e2; return x(o2).slice(0, 102400); } catch (e3) { return ""; } } function g(t2, e2) { return "string" != typeof t2 || !t2 || e2 && -1 < t2.indexOf(e2) || X.test(t2) || q.some(function(e3) { return -1 < t2.indexOf(e3); }); } function m(n2, o2) { var i2, r2 = [], s2 = n2.config; return n2.lifeCycle.on("destroy", function() { r2.length = 0; }), function(e2, t2) { Array.isArray(e2) ? r2 = r2.concat(e2) : r2.push(e2), o2 && r2.length >= o2 || n2.sendNow && 0 < r2.length ? (r2 = z(r2), t2(r2.splice(0, r2.length)), i2 && clearTimeout(i2)) : (i2 && clearTimeout(i2), i2 = setTimeout(function() { i2 = null, 0 < (r2 = z(r2)).length && t2(r2.splice(0, r2.length)); }, s2.delay)); }; } function B(e2, t2) { return Array.isArray(e2) ? t2(e2.map(function(e3) { return t3 = u(u({}, e3), { msg: "string" == typeof e3.msg ? e3.msg : [].concat(e3.msg).map(w).join(" ") }), p.forEach(function(e4) { t3[e4] || delete t3[e4]; }), t3; var t3; })) : t2([u(u({}, e2), { msg: "string" == typeof e2.msg ? e2.msg : w(e2.msg) })]); } function H(a2, c2) { return function(e2, t2) { var n2, o2, i2, r2 = Array.isArray(e2), s2 = r2 ? e2 : [e2], l2 = (a2.lifeCycle.emit("beforeRequest", e2), a2.config.beforeRequest); (s2 = "function" == typeof l2 ? s2.map(function(e3) { try { var t3 = l2({ logs: e3, logType: c2 }); return (null == t3 ? void 0 : t3.logType) === c2 && null != t3 && t3.logs ? t3.logs : false !== t3 && e3; } catch (t4) { return e3; } }).filter(function(e3) { return false !== e3; }) : s2).length && (n2 = s2, e2 = p, !Array.isArray(n2) || n2.length <= 1 || (o2 = [], i2 = [], !(i2 = "string" == typeof e2 ? [e2] : e2)) || i2.length <= 0 || (i2.forEach(function(t3) { n2.forEach(function(e3) { null != e3 && e3[t3] && o2.push(t3); }); }), 0 < o2.length && (n2 = n2.map(function(e3) { var t3 = {}; return o2.forEach(function(e4) { t3[e4] = ""; }), u(u({}, t3), e3); }))), s2 = n2, t2(r2 ? s2 : s2[0])); }; } function a(i2) { return function(e2, t2) { i2.lifeCycle.emit("modifyRequest", e2); var n2 = i2.config.modifyRequest; if ("function" == typeof n2) try { var o2 = n2(e2); "object" == typeof o2 && "url" in o2 && (e2 = o2); } catch (e3) { formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e3); } t2(e2); }; } function c(o2) { return function(e2, t2) { null != (n2 = o2.lifeCycle) && n2.emit("afterRequest", e2); var n2 = (o2.config || {}).afterRequest; "function" == typeof n2 && false === n2(e2) || t2(e2); }; } function y(n2) { if (n2 && n2.reduce && n2.length) return 1 === n2.length ? function(e2, t2) { n2[0](e2, t2 || ee); } : n2.reduce(function(n3, o2) { return function(e2, t2) { return void 0 === t2 && (t2 = ee), n3(e2, function(e3) { return null == o2 ? void 0 : o2(e3, t2); }); }; }); throw new TypeError("createPipeline need at least one function param"); } function v(t2, n2) { Object.getOwnPropertyNames(t2).forEach(function(e2) { "function" == typeof t2[e2] && "constructor" !== e2 && (n2 ? n2[e2] = "sendPipeline" === e2 ? function() { return function() { }; } : function() { } : t2[e2] = function() { }); }); } function M(n2) { var t2, e2 = this, o2 = (r2 = n2.config).uin, i2 = r2.id, r2 = r2.offlineLogLimit; o2 && i2 && (t2 = new G({ limit: void 0 === r2 ? 2e4 : r2 }), n2.lifeCycle.on("beforeWrite", function(e3) { t2.save2Offline(e3 = void 0 === e3 ? [] : e3, n2.config); }), n2.getOfflineLog = function() { var e3 = t2.getLogs({ uin: o2, id: i2 }); return t2.clearLogs(), e3; }, n2.uploadOfflineLogs = function(t3) { return s(e2, void 0, void 0, function() { return f(this, function(e3) { return t3 = Array.isArray(t3) ? t3 : [t3], [2, function(a2, c2) { return s(this, void 0, void 0, function() { var t4, n3, o3, i3, r3, s2, l2; return f(this, function(e4) { return t4 = a2.config, n3 = a2.bean, o3 = t4.offlineUrl, i3 = t4.id, r3 = t4.uin, s2 = (n3 || {}).aid, l2 = void 0 === s2 ? "" : s2, (r3 || l2) && i3 ? (a2.send({ url: o3 + "/offlineAuto", type: O.OFFLINE, log: O.OFFLINE }, function(e5) { var t5 = (null == e5 ? void 0 : e5.data).secretKey; if (t5) try { a2.send({ url: o3 + "/offlineLog", data: { logs: c2, secretKey: t5, id: i3, uin: r3, aid: l2 }, contentType: "application/json", method: "post", type: O.OFFLINE, log: O.OFFLINE }); } catch (e6) { formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e6); } }, function(e5) { formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e5); }), [2]) : [2]; }); }); }(n2, t3)]; }); }); }); } function G(e2) { var o2 = this, e2 = void 0 === (e2 = (void 0 === e2 ? {} : e2).limit) ? 2e4 : e2; this.offlineBuffer = [], this.clearLogs = function() { o2.offlineBuffer = []; }, this.save2Offline = function(e3, t2) { e3 = (e3 = Array.isArray(e3) ? e3 : [e3]).map(function(e4) { return "string" == typeof e4 && (e4 = { msg: e4 }), Object.assign({ id: t2.id, uin: t2.uin, time: +Date.now(), version: t2.version }, e4); }); o2.offlineBuffer = o2.offlineBuffer.concat(e3).slice(0, o2.limitSize); }, this.getLogs = function(t2, e3) { var n2 = o2.offlineBuffer.filter(function(e4) { return e4.id === t2.id && e4.uin === t2.uin; }); return null != e3 && e3(n2), n2; }, this.limitSize = e2; } function J(e2, o2) { return void 0 === o2 && (o2 = {}), new Promise(function(t2, n2) { C || n2(new Error("no available fetch found!")); try { C(u(u({}, o2), { url: e2, type: "text" }), function(e3) { return t2(j(e3)); }); } catch (e3) { n2(e3); } }); } var b, O, R, V, t, W = ["application/xhtml+xml", "application/xml", "application/pdf", "application/pkcs12", "application/javascript", "application/x-javascript", "application/ecmascript", "application/vnd.mspowerpoint", "application/vnd.apple.mpegurl", "application/ogg", "text/css", "text/javascript", "image", "audio", "video", "video/mp2t"], K = /\.(json|js|css|jpg|jpeg|png|svg|apng|webp|gif|bmp|mp4|mp3|ts|mpeg|wav|webm|ogg|flv|m3u8|ttf|woff2|otf|eot|woff|html|htm|shtml|shtm|)$/gi, $ = ["ret", "retcode", "code", "errcode"], i = function() { var n2 = /* @__PURE__ */ new WeakSet(); return function(e2, t2) { if (t2 instanceof Error) return "Error.message: " + t2.message + " \n Error.stack: " + t2.stack; if ("object" == typeof t2 && null !== t2) { if (n2.has(t2)) return "[Circular " + (e2 || "root") + "]"; n2.add(t2); } return t2; }; }, w = function(e2) { if ("string" == typeof e2) return e2; try { return e2 instanceof Error ? (JSON.stringify(e2, i(), 4) || "undefined").replace(/"/gim, "") : JSON.stringify(e2, i(), 4) || "undefined"; } catch (e3) { return "error happen when aegis stringify: \n " + e3.message + " \n " + e3.stack; } }, x = function(r2, s2) { void 0 === s2 && (s2 = 3); var i2, l2, a2, c2 = ""; return Array.isArray(r2) ? (c2 += "[", i2 = r2.length, r2.forEach(function(e2, t2) { var n2, o2; c2 = (c2 += "object" == typeof e2 && 1 < s2 ? x(e2, s2 - 1) : (o2 = "", o2 += "undefined" == (n2 = typeof (e2 = e2)) || "symbol" == n2 || "function" == n2 ? "null" : "string" == n2 || "object" == n2 ? '"' + e2 + '"' : e2)) + (t2 === i2 - 1 ? "" : ","); }), c2 += "]") : r2 instanceof Object ? (c2 = "{", l2 = Object.keys(r2), a2 = l2.length, l2.forEach(function(e2, t2) { var n2, o2, i3; "object" == typeof r2[e2] && 1 < s2 ? c2 += '"' + e2 + '":' + x(r2[e2], s2 - 1) : c2 += (n2 = r2[e2 = e2], i3 = "", "string" == (o2 = typeof n2) || "object" == o2 ? i3 += '"' + e2 + '":"' + n2 + '"' : "function" == typeof n2 ? i3 += '"' + e2 + '":"function ' + n2.name + '"' : "symbol" == typeof n2 ? i3 += '"' + e2 + '":"symbol"' : "number" != typeof n2 && "boolean" != o2 || (i3 += '"' + e2 + '": ' + n2), i3), c2 += t2 === a2 - 1 || t2 < a2 - 1 && void 0 === r2[l2[t2 + 1]] ? "" : ","; }), c2 += "}") : c2 += r2, c2; }, X = /data:(image|text)\/.*;base64/, z = ((r = b = b || {}).INFO_ALL = "-1", r.API_RESPONSE = "1", r.INFO = "2", r.ERROR = "4", r.PROMISE_ERROR = "8", r.AJAX_ERROR = "16", r.SCRIPT_ERROR = "32", r.IMAGE_ERROR = "64", r.CSS_ERROR = "128", r.CONSOLE_ERROR = "256", r.MEDIA_ERROR = "512", r.RET_ERROR = "1024", r.REPORT = "2048", r.PV = "4096", r.EVENT = "8192", r.PAGE_NOT_FOUND_ERROR = "16384", r.WEBSOCKET_ERROR = "32768", r.BRIDGE_ERROR = "65536", (r = O = O || {}).LOG = "log", r.SPEED = "speed", r.PERFORMANCE = "performance", r.OFFLINE = "offline", r.WHITE_LIST = "whiteList", r.VITALS = "vitals", r.PV = "pv", r.CUSTOM_PV = "customPV", r.EVENT = "event", r.CUSTOM = "custom", r.SDK_ERROR = "sdkError", r.SET_DATA = "setData", r.LOAD_PACKAGE = "loadPackage", (r = R = R || {}).production = "production", r.development = "development", r.gray = "gray", r.pre = "pre", r.daily = "daily", r.local = "local", r.test = "test", r.others = "others", function(e2) { return e2.filter(function(n2, o2) { return "static" !== n2.type || !e2.find(function(e3, t2) { return n2.url === e3.url && 200 === n2.status && o2 < t2; }); }); }), Y = function(e2) { e2.level === b.INFO_ALL && (e2.level = b.INFO); }, E = {}, P = {}, T = function(e2) { return E[e2] || (E[e2] = setTimeout(function() { P[e2] = {}, E[e2] = null; }, 6e4)), E[e2]; }, Q = function(e2) { return (Array.isArray(e2) ? e2 : [e2]).map(function(n2) { return Object.getOwnPropertyNames(n2).reduce(function(e3, t2) { return "ctx" !== t2 && (e3[t2] = n2[t2]), e3; }, { level: b.INFO, msg: "" }); }); }, Z = function(o2) { return function(e2) { return o2.sendPipeline([function(e3, n2) { return n2({ url: o2.config.url || "", data: F(Q(e3)), method: "post", contentType: "application/json", type: O.LOG, log: e3, requestConfig: { timeout: 5e3 }, success: function() { var t2 = o2.config.onReport; "function" == typeof t2 && e3.forEach(function(e4) { t2(e4); }), "function" == typeof n2 && n2([]); } }); }], O.LOG)(e2); }; }, ee = function() { }, r = (Object.defineProperty(N.prototype, "__version__", { get: function() { return formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "__version__ has discard, please use version"), "1.36.4"; }, enumerable: false, configurable: true }), Object.defineProperty(N.prototype, "LogType", { get: function() { return formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "LogType has discard, please use logType"), b; }, enumerable: false, configurable: true }), N.prototype.init = function(e2) { this.setConfig(e2); for (var t2 = 0; t2 < N.installedPlugins.length; t2++) try { N.installedPlugins[t2].patch(this); } catch (e3) { this.sendSDKError(e3); } this.lifeCycle.emit("onInited"); }, N.prototype.setConfig = function(e2) { Object.assign(this.config, e2); var e2 = this.config, t2 = e2.id, n2 = e2.uin, o2 = e2.version, i2 = e2.ext1, r2 = e2.ext2, s2 = e2.ext3, l2 = e2.aid, a2 = e2.env, c2 = void 0 === a2 ? "production" : a2, a2 = e2.pageUrl, e2 = this.bean.id !== t2 || this.bean.uin !== n2 || this.bean.aid !== l2; return this.bean.id = t2 || "", this.bean.uin = n2 || "", this.bean.version = o2 || "1.36.4", this.bean.aid = l2 || "", this.bean.env = function() { switch (c2) { case R.production: case R.development: case R.gray: case R.pre: case R.daily: case R.local: case R.test: case R.others: return 1; default: return; } }() ? c2 : R.others, a2 && this.extendBean("from", encodeURIComponent(a2.slice(0, 2048))), i2 && this.extendBean("ext1", encodeURIComponent(i2)), r2 && this.extendBean("ext2", encodeURIComponent(r2)), s2 && this.extendBean("ext3", encodeURIComponent(s2)), e2 && this.lifeCycle.emit("onConfigChange", this.config), this.config; }, N.use = function(e2) { -1 === N.installedPlugins.indexOf(e2) && e2.aegisPlugin && N.installedPlugins.push(e2); }, N.unuse = function(e2) { e2 = N.installedPlugins.indexOf(e2); -1 !== e2 && N.installedPlugins.splice(e2, 1); }, N.prototype.info = function() { for (var e2 = [], t2 = 0; t2 < arguments.length; t2++) e2[t2] = arguments[t2]; var n2 = { level: b.INFO, msg: e2 }; 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0]), { level: b.INFO }), this.normalLogPipeline(n2); }, N.prototype.infoAll = function() { for (var e2 = [], t2 = 0; t2 < arguments.length; t2++) e2[t2] = arguments[t2]; var n2 = { level: b.INFO_ALL, msg: e2 }; 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0]), { level: b.INFO_ALL }), this.normalLogPipeline(n2); }, N.prototype.report = function() { for (var e2 = [], t2 = 0; t2 < arguments.length; t2++) e2[t2] = arguments[t2]; var n2 = { level: b.REPORT, msg: e2 }; 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0])), this.normalLogPipeline(n2); }, N.prototype.error = function() { for (var e2 = [], t2 = 0; t2 < arguments.length; t2++) e2[t2] = arguments[t2]; var n2 = { level: b.ERROR, msg: e2 }; 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0]), { level: b.ERROR }), this.normalLogPipeline(n2); }, N.prototype.speedLogPipeline = function(e2) { throw new Error('You need to override "speedLogPipeline" method'); }, N.prototype.reportPv = function(n2) { var o2, i2 = this; n2 && (formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportPv is deprecated, please use reportEvent"), o2 = "" + Object.getOwnPropertyNames(this.bean).filter(function(e2) { return "id" !== e2; }).map(function(e2) { return e2 + "=" + i2.bean[e2]; }).join("&"), this.sendPipeline([function(e2, t2) { t2({ url: i2.config.url + "/" + n2 + "?" + o2, addBean: false, type: O.CUSTOM_PV }); }], O.CUSTOM_PV)(null)); }, N.prototype.reportEvent = function(e2) { e2 && ((e2 = "string" == typeof e2 ? { name: e2, ext1: this.config.ext1 || "", ext2: this.config.ext2 || "", ext3: this.config.ext3 || "" } : e2).name ? this.eventPipeline(e2) : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportEvent params error")); }, N.prototype.reportTime = function(e2, t2) { if ("object" == typeof e2) return this.reportT(e2); "string" == typeof e2 ? "number" == typeof t2 ? t2 < 0 || 6e4 < t2 ? formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: duration must between 0 and 60000") : this.submitCustomTime(e2, t2) : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: second param must be number") : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: first param must be a string"); }, N.prototype.reportT = function(e2) { var t2 = e2.name, n2 = e2.duration, o2 = e2.ext1, o2 = void 0 === o2 ? "" : o2, i2 = e2.ext2, i2 = void 0 === i2 ? "" : i2, r2 = e2.ext3, r2 = void 0 === r2 ? "" : r2, e2 = e2.from; if ("string" == typeof t2 && "number" == typeof n2 && "string" == typeof o2 && "string" == typeof i2 && "string" == typeof r2) { if (!(n2 < 0 || 6e4 < n2)) return this.submitCustomTime(t2, n2, o2, i2, r2, void 0 === e2 ? "" : e2); formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: duration must between 0 and 60000"); } else formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: params error"); }, N.prototype.time = function(e2) { "string" == typeof e2 ? this.timeMap[e2] ? formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "Timer " + e2 + " already exists") : this.timeMap[e2] = Date.now() : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "time: first param must be a string"); }, N.prototype.timeEnd = function(e2) { "string" == typeof e2 ? this.timeMap[e2] ? (this.submitCustomTime(e2, Date.now() - this.timeMap[e2]), delete this.timeMap[e2]) : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "Timer " + e2 + " does not exist") : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "timeEnd: first param must be a string"); }, N.prototype.submitCustomTime = function(e2, t2, n2, o2, i2, r2) { this.customTimePipeline({ name: e2, duration: t2, ext1: n2 || this.config.ext1, ext2: o2 || this.config.ext2, ext3: i2 || this.config.ext3, from: r2 || void 0 }); }, N.prototype.extendBean = function(e2, t2) { this.bean[e2] = t2; }, N.prototype.sendPipeline = function(e2, t2) { var n2, r2 = this; return y(l([function(e3, t3) { if ("number" != typeof n2.config.random && (formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "random must in [0, 1], default is 1."), n2.config.random = 1), !n2.isHidden || !n2.isGetSample) if (n2.isGetSample) n2.isHidden || t3(e3); else { if (n2.isGetSample = true, Math.random() < n2.config.random) return n2.isHidden = false, t3(e3); n2.isHidden = true; } }, H(n2 = this, t2)], e2, [a(this), function(o2, i2) { r2.request(o2, function() { for (var e3, t3 = [], n3 = 0; n3 < arguments.length; n3++) t3[n3] = arguments[n3]; r2.failRequestCount = 0, i2({ isErr: false, result: t3, logType: null == o2 ? void 0 : o2.type, logs: null == o2 ? void 0 : o2.log }), null != (e3 = null == o2 ? void 0 : o2.success) && e3.call.apply(e3, l([o2], t3)); }, function() { for (var e3, t3 = [], n3 = 0; n3 < arguments.length; n3++) t3[n3] = arguments[n3]; 60 <= ++r2.failRequestCount && r2.destroy(), -1 < ("" + t3[0]).indexOf("403 forbidden") && r2.destroy(), i2({ isErr: true, result: t3, logType: null == o2 ? void 0 : o2.type, logs: null == o2 ? void 0 : o2.log }), null != (e3 = null == o2 ? void 0 : o2.fail) && e3.call.apply(e3, l([o2], t3)); }); }, c(this)])); }, N.prototype.send = function(e2, i2, r2) { var t2 = this; return y([a(this), function(n2, o2) { t2.request(n2, function() { for (var e3 = [], t3 = 0; t3 < arguments.length; t3++) e3[t3] = arguments[t3]; o2({ isErr: false, result: e3, logType: n2.type, logs: n2.log }), null != i2 && i2.apply(void 0, e3); }, function() { for (var e3 = [], t3 = 0; t3 < arguments.length; t3++) e3[t3] = arguments[t3]; o2({ isErr: true, result: e3, logType: n2.type, logs: n2.log }), null != r2 && r2.apply(void 0, e3); }); }, c(this)])(e2); }, N.prototype.ready = function(e2, t2, n2) { throw new Error('You need to override "ready" method'); }, N.prototype.request = function(e2, t2, n2) { throw new Error('You need to override "request" method'); }, N.prototype.sendSDKError = function(e2) { var n2 = this; this.sendPipeline([function(e3, t2) { t2({ url: n2.config.url + "?id=1085&msg[0]=" + encodeURIComponent(w(e3)) + "&level[0]=2&from=" + n2.config.id + "&count=1&version=" + n2.config.id + "(1.36.4)", addBean: false, method: "get", type: O.SDK_ERROR, log: e3 }); }], O.SDK_ERROR)(e2); }, N.prototype.destroy = function(e2) { void 0 === e2 && (e2 = false); var t2, n2, o2 = N.instances.indexOf(this); -1 !== o2 && N.instances.splice(o2, 1); for (var i2 = N.installedPlugins.length - 1; 0 <= i2; i2--) try { N.installedPlugins[i2].unpatch(this); } catch (e3) { this.sendSDKError(e3); } if (this.lifeCycle.emit("destroy"), this.lifeCycle.clear(), e2) t2 = this, n2 = Object.getOwnPropertyDescriptors(t2), Object.keys(n2).forEach(function(e3) { n2[e3].writable && (t2[e3] = null); }), Object.setPrototypeOf(this, null); else { for (var r2 = this; r2.constructor !== Object && v(r2, this), r2 = Object.getPrototypeOf(r2); ) ; 0 === N.instances.length && (o2 = Object.getPrototypeOf(this).constructor, v(o2), v(N)); } }, N.version = "1.36.4", N.instances = [], N.logType = b, N.environment = R, N.installedPlugins = [], N), L = (I.prototype.patch = function(e2) { this.canUse(e2) && this.exist(e2) && (this.instances.push(e2), this.triggerInit(e2), this.triggerOnNewAegis(e2)); }, I.prototype.unpatch = function(e2) { var t2 = this.instances.indexOf(e2); -1 !== t2 && (this.instances.splice(t2, 1), 0 === this.instances.length) && this.uninstall(e2); }, I.prototype.countInstance = function() { return this.instances.length; }, I.prototype.uninstall = function(e2) { var t2; null != (t2 = null == (t2 = this.option) ? void 0 : t2.destroy) && t2.apply(this, [e2]); }, I.prototype.walk = function(n2) { var o2 = this; this.instances.forEach(function(e2) { var t2 = o2.canUse(e2); t2 && n2(e2, t2); }); }, I.prototype.canUse = function(e2) { e2 = this.getConfig(e2); return !(!e2 || "object" != typeof e2) || !!e2; }, I.prototype.getConfig = function(e2) { return null == (e2 = e2.config) ? void 0 : e2[this.name]; }, I.prototype.exist = function(e2) { return -1 === this.instances.indexOf(e2); }, I.prototype.triggerInit = function(e2) { var t2; this.inited || (this.inited = true, null == (t2 = null == (t2 = this.option) ? void 0 : t2.init)) || t2.call(this.option, this.getConfig(e2)); }, I.prototype.triggerOnNewAegis = function(e2) { var t2; null != (t2 = null == (t2 = this.option) ? void 0 : t2.onNewAegis) && t2.call(this.option, e2, this.getConfig(e2)); }, I), te = new L({ name: "offlineLog", onNewAegis: function(t2) { M(t2), t2.lifeCycle.on("onConfigChange", function(e2) { M(t2); }); } }), S = "undefined" != typeof weex && (null === weex || void 0 === weex ? void 0 : weex.requireModule("stream")), C = null == S ? void 0 : S.fetch, j = function(e2) { var t2 = e2.ok, n2 = e2.status, o2 = e2.statusText, i2 = e2.data, r2 = e2.headers; return { ok: t2, status: n2, statusText: o2, body: i2, headers: r2, clone: function() { return j(e2); }, text: function() { return new Promise(function(e3) { return e3(i2); }); }, json: function() { return new Promise(function(e3, t3) { try { e3(JSON.parse(i2)); } catch (e4) { t3(new Error("response body is not JSON")); } }); } }; }, A = [], _ = {}, ne = weex, r = (n(t = U, S = V = r), t.prototype = null === S ? Object.create(S) : (ie.prototype = S.prototype, new ie()), U.prototype.getPlatform = function() { var e2 = ((null == (e2 = null == (e2 = null == (e2 = this.weex) ? void 0 : e2.config) ? void 0 : e2.env) ? void 0 : e2.osName) || "").toLowerCase(); return "android" === e2 ? 1 : "ios" === e2 ? 2 : 100; }, U.prototype.initOfflineLog = function() { U.use(te); }, Object.defineProperty(U.prototype, "getBean", { get: function() { var t2 = this; return Object.getOwnPropertyNames(this.bean).map(function(e2) { return e2 + "=" + t2.bean[e2]; }).join("&"); }, enumerable: false, configurable: true }), U.prototype.reportSpeed = function(e2) { var t2, n2, o2, i2, r2; this.send({ url: "" + this.config.speedUrl, method: "post", data: (t2 = e2, n2 = this.bean, i2 = { fetch: [], static: [], bridge: [] }, r2 = {}, Array.isArray(t2) ? t2.forEach(function(e3) { var t3; null != (t3 = i2[e3.type]) && t3.push(e3); }) : null != (o2 = i2[t2.type]) && o2.push(t2), r2.payload = JSON.stringify(u({ duration: i2 }, n2)), r2), contentType: "application/json", type: O.SPEED, log: e2 }); }, U.prototype.retcode = function(e2) { var t2 = this; "object" == typeof e2 ? e2.url ? 400 <= Object.keys(_).length || (_[e2.url] || (_[e2.url] = 0), _[e2.url] += 1, 3 < _[e2.url]) || (e2 = Object.assign({}, { url: "", isHttps: true, method: "GET", type: "fetch", duration: 0, ret: 0, status: 200 }, e2), A.push(e2), 1 === A.length && setTimeout(function() { t2.reportSpeed(A), A = []; }, 1e3)) : formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "param url can not be empty!") : formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "retcode params should be an object"); }, U.prototype.uploadLogs = function(e2, t2) { this.lifeCycle.emit("uploadLogs", e2 = void 0 === e2 ? {} : e2, t2 = void 0 === t2 ? {} : t2); }, U.prototype.getOfflineLog = function() { }, U.prototype.uploadOfflineLogs = function(e2) { }, U.prototype.getCurrentPageUrl = function(e2) { e2 = e2.pageUrl || (null == (e2 = null == (e2 = this.weex) ? void 0 : e2.config) ? void 0 : e2.bundleUrl) || ""; return encodeURIComponent(e2.slice(0, 2048)); }, U.sessionID = "session-" + Date.now(), U), S = new L({ name: "aid", onNewAegis: function(t2) { var e2, n2 = this; this.aid && true !== this.aid ? (t2.bean.aid = this.aid, t2.config.aid = this.aid) : e2 = setTimeout(function() { n2.getAid(function(e3) { n2.aid = e3, t2.bean.aid = n2.aid, t2.config.aid = n2.aid; }), clearTimeout(e2); }, 0); }, getAid: function(n2) { return s(this, void 0, void 0, function() { var t2; return f(this, function(e2) { switch (e2.label) { case 0: return e2.trys.push([0, 2, , 3]), [4, localStorage.getItem("AEGIS_ID")]; case 1: return (t2 = e2.sent()) || (t2 = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e3) { var t3 = 16 * Math.random() | 0; return ("x" === e3 ? t3 : 3 & t3 | 8).toString(16); }), localStorage.setItem("AEGIS_ID", t2)), null != n2 && n2(t2 || ""), [3, 3]; case 2: return e2.sent(), null != n2 && n2(""), [3, 3]; case 3: return [2]; } }); }); } }), oe = new L({ name: "onError", listening: false, init: function() { this.startListen(); }, startListen: function() { var t2 = this; if (!this.listening) { this.listening = true; try { var n2, e2 = Vue; void 0 !== e2 && e2 && (n2 = e2.config.errorHandler, e2.config.errorHandler = function(e3) { e3 && t2.publishErrorLog({ msg: e3, level: b.ERROR }), "function" == typeof n2 && n2(e3); }); } catch (t3) { this.publishErrorLog({ msg: t3, level: b.ERROR }); } } }, publishErrorLog: function(t2) { this.$walk(function(e2) { e2.normalLogPipeline(t2); }); } }), L = new L({ name: "reportApiSpeed", override: false, fetch: null, weexFetch: null, onNewAegis: function(e2) { var t2, n2; this.override || (this.override = true, this.fetch = e2.fetch, this.weexFetch = e2.weexFetch, t2 = (n2 = this.overrideFetch(e2.config)).fetch, n2 = n2.weexFetch, e2.fetch = t2, e2.weexFetch = n2); }, publishSpeed: function(t2) { this.$walk(function(e2) { e2.speedLogPipeline(t2); }); }, publishNormalLog: function(t2) { this.$walk(function(e2) { e2.normalLogPipeline(t2); }); }, overrideFetch: function(u2) { var e2, t2, l2, n2, f2 = this; if ("function" == typeof this.fetch) return e2 = this.fetch, t2 = this.weexFetch, l2 = function(r2, s2, l3, a2) { var c2, e3, t3, n3; g(l3, u2.hostUrl) || (c2 = { url: l3, isHttps: d(l3), method: (null == a2 ? void 0 : a2.method) || "get", duration: s2, nextHopProtocol: "", type: "fetch", status: r2.status }, "function" == typeof (null == (n3 = u2.api) ? void 0 : n3.resourceTypeHandler) && (e3 = null == (n3 = u2.api) ? void 0 : n3.resourceTypeHandler(r2.url)), -1 === D.indexOf(e3) && (n3 = r2.headers && r2.headers.get("content-type") || "", e3 = r2.ok && (void 0 === (t3 = n3) && (t3 = ""), n3 = (void 0 === l3 ? "" : l3).split("?")[0], K.test(n3) || W.some(function(e4) { return -1 !== String(t3).indexOf(e4); })) ? "static" : "fetch"), "fetch" === e3 ? r2.clone().text().then(function(e4) { var t4 = function(e5, t5, n5) { var o3, i3; try { if ("function" == typeof (null == t5 ? void 0 : t5.retCodeHandler)) return { code: void 0 === (r3 = (i3 = t5.retCodeHandler(e5, null == n5 ? void 0 : n5.url, null == n5 ? void 0 : n5.ctx, null == n5 ? void 0 : n5.payload) || {}).code) ? "unknown" : r3, isErr: i3.isErr }; "string" == typeof e5 && (e5 = JSON.parse(e5)), "function" == typeof (null == (o3 = null == t5 ? void 0 : t5.ret) ? void 0 : o3.join) && ($ = [].concat(t5.ret.map(function(e6) { return e6.toLowerCase(); }))); var r3, s3 = Object.getOwnPropertyNames(e5).filter(function(e6) { return -1 !== $.indexOf(e6.toLowerCase()); }); return s3.length ? { code: "" + (r3 = e5[s3[0]]), isErr: 0 !== r3 && "0" !== r3 } : { code: "unknown", isErr: false }; } catch (e6) { return { code: "unknown", isErr: false }; } }(e4, u2.api, { url: r2.url, ctx: r2, payload: null == a2 ? void 0 : a2.body }) || {}, n4 = t4.code, t4 = t4.isErr, o2 = null == (o2 = u2.api) ? void 0 : o2.apiDetail, i2 = o2 ? h(null == a2 ? void 0 : a2.body, null == (i2 = u2.api) ? void 0 : i2.reqParamHandler, { url: l3 }) : "", e4 = o2 ? h(e4, null == (o2 = u2.api) ? void 0 : o2.resBodyHandler, { url: l3 }) : "", o2 = "req url: " + l3 + " \n \nres status: " + (r2.status || 0) + "\n \nres duration: " + s2 + "ms \n \nreq method: " + ((null == a2 ? void 0 : a2.method) || "get") + " \n \nreq param: " + i2 + " \n \nres retcode: " + n4 + "\n \nres data: " + e4; f2.publishNormalLog({ msg: o2, level: b.API_RESPONSE }), c2.payload = null == a2 ? void 0 : a2.body, c2.ret = n4, c2.isErr = +t4, t4 && f2.publishNormalLog({ msg: o2, level: b.RET_ERROR }); }) : Object.assign(c2, { type: "static", urlQuery: (n3 = r2.url, e3 = true, "string" == typeof n3 ? n3.split("?")[e3 ? 1 : 0] || "" : n3), domainLookup: o.number, connectTime: o.number }), f2.publishSpeed(c2)); }, n2 = function(e3, t3, n3, o2) { var i2; throw g(n3, u2.hostUrl) || (i2 = { url: n3, isHttps: d(n3), method: (null == o2 ? void 0 : o2.method) || "get", duration: t3, nextHopProtocol: "", type: "fetch", status: 0 }, f2.publishSpeed(i2), i2 = null != (i2 = u2.api) && i2.apiDetail ? h(null == o2 ? void 0 : o2.body, null == (i2 = u2.api) ? void 0 : i2.reqParamHandler, { url: n3 }) : "", n3 = "AJAX_ERROR: " + e3 + "\n \nreq url: " + n3 + "\n \nres status: 0\n \nres duration: " + t3 + "ms\n \nreq method: " + ((null == o2 ? void 0 : o2.method) || "get") + "\n \nreq param: " + i2, f2.publishNormalLog({ msg: n3, level: b.AJAX_ERROR })), e3; }, { fetch: function(o2, i2) { var r2 = Date.now(); return e2(o2, i2).then(function(e3) { var t3 = Date.now() - r2, n3 = e3; try { l2(n3, t3, o2, i2); } catch (e4) { } return e3; }).catch(function(e3) { var t3 = Date.now() - r2; try { n2(e3, t3, o2, i2); } catch (e4) { } throw e3; }); }, weexFetch: function(o2, i2, e3) { var r2 = o2.url, s2 = Date.now(); try { t2(o2, function(e4) { var t3 = Date.now() - s2, n3 = j(e4); try { l2(n3, t3, r2, o2); } catch (e5) { } "function" == typeof i2 && i2(e4); }, e3); } catch (i3) { e3 = Date.now() - s2; try { n2(i3, e3, r2, o2); } catch (o3) { } throw i3; } } }; } }); function U(e2) { var s2, l2 = V.call(this, e2) || this; l2.weex = ne, l2.originRequest = J, l2.fetch = J, l2.weexFetch = C, l2.speedLogPipeline = y([(s2 = l2.config, function(e3, t2) { var n2, o2, i2, r2 = "number" == typeof s2.repeat ? s2.repeat : 60; !s2.speedSample || r2 <= 0 ? t2(e3) : (n2 = (null == s2 ? void 0 : s2.id) || "0", o2 = P[n2] || {}, Array.isArray(e3) ? (i2 = e3.filter(function(e4) { var t3 = !o2[e4.url] || o2[e4.url] < r2; return t3 ? (o2[e4.url] = 1 + ~~o2[e4.url], P[n2] = o2) : E[n2] || T(n2), t3; })).length && t2(i2) : !o2[e3.url] || o2[e3.url] < r2 ? (o2[e3.url] = 1 + ~~o2[e3.url], P[n2] = o2, t2(e3)) : E[n2] || T(n2)); }), m(l2), function(e3, t2) { l2.lifeCycle.emit("beforeReportSpeed", e3); var n2 = l2.config.beforeReportSpeed; if ((e3 = "function" == typeof n2 ? e3.filter(function(e4) { return false !== n2(e4); }) : e3).length) return t2(e3); }, function(e3) { l2.reportSpeed(e3); }]), l2.request = function(o2, i2, r2) { var e3, t2, n2, s3; o2 && "string" == typeof o2.url && "" !== o2.url && l2.bean.id && (e3 = o2.url, false !== o2.addBean && (e3 = e3 + (-1 === e3.indexOf("?") ? "?" : "&") + l2.getBean), ("get" === (o2.method || "get").toLocaleLowerCase() ? l2.originRequest((t2 = e3, n2 = o2.data, "string" != typeof t2 ? "" : "object" == typeof n2 && n2 ? (s3 = Object.getOwnPropertyNames(n2).map(function(e4) { var t3 = n2[e4]; return e4 + "=" + ("string" == typeof t3 ? encodeURIComponent(t3) : encodeURIComponent(JSON.stringify(t3))); }).join("&").replace(/eval/gi, "evaI"), t2 + (-1 === t2.indexOf("?") ? "?" : "&") + s3) : t2), u({ method: "GET", headers: {} }, o2.requestConfig)) : ("string" == typeof o2.data ? o2.data = o2.data.replace(/eval/gi, "evaI") : o2.data = JSON.stringify(o2.data), l2.originRequest(e3, u({ method: "POST", body: o2.data, headers: o2.contentType ? { "Content-Type": o2.contentType } : {} }, o2.requestConfig)))).then(function(e4) { var t3, n3; String(e4.status).match(/^20\d+/g) ? null != i2 && i2(e4) : null != r2 && r2(e4), null != (n3 = (t3 = l2.config).reqCallback) && n3.call(t3, e4, o2); }).catch(function(e4) { null != r2 && r2(e4); })); }; try { e2.offlineLog && l2.initOfflineLog(), l2.init(e2), l2.extendBean("sessionId", U.sessionID), l2.extendBean("platform", l2.getPlatform()), l2.extendBean("from", l2.getCurrentPageUrl(e2)), l2.extendBean("referer", encodeURIComponent(e2.referrer || "")); } catch (e3) { formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e3), formatAppLog("log", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "%cThe above error occurred in the process of initializing Aegis, which will affect your normal use of Aegis.\nIt is recommended that you contact aegis-helper for feedback and thank you for your support.", "color: red"), l2.sendSDKError(e3); } return l2; } function ie() { this.constructor = t; } function I(e2) { this.aegisPlugin = true, this.name = "", this.instances = [], this.inited = false, e2.$walk = this.walk.bind(this), e2.$getConfig = this.getConfig.bind(this), this.option = e2, this.name = e2.name; } function N(e2) { var n2, t2, o2, i2, s2, r2, l2, a2, c2, u2, f2, p2, d2, h2, g2 = this; this.isGetSample = false, this.isHidden = false, this.config = { version: 0, delay: 1e3, onError: true, repeat: 60, random: 1, aid: true, device: true, pagePerformance: true, webVitals: true, speedSample: true, onClose: true, reportLoadPackageSpeed: true, hostUrl: "https://aegis.qq.com", env: "production", url: "", offlineUrl: "", whiteListUrl: "", pvUrl: "", speedUrl: "", customTimeUrl: "", performanceUrl: "", webVitalsUrl: "", eventUrl: "", setDataReportUrl: "", reportImmediately: true }, this.isWhiteList = false, this.lifeCycle = new k(), this.bean = {}, this.originFireUrl = "", this.normalLogPipeline = y([m(this, 5), B, function(e3, t3) { var o3 = n2.config; t3(e3 = e3.map(function(e4) { var t4, n3 = o3.maxLength || 102400; try { if (!e4.msg || e4.msg.length <= n3) return e4; e4.msg = null == (t4 = e4.msg) ? void 0 : t4.substring(0, n3); } catch (t5) { e4.msg = w(e4.msg).substring(0, o3.maxLength); } return e4; })); }, (h2 = (n2 = this).config, function(e3, t3) { var n3 = "number" == typeof h2.repeat ? h2.repeat : 60; if (n3 <= 0) return t3(e3); var o3 = (null == h2 ? void 0 : h2.id) + "_error", i3 = P[o3] || {}; t3(e3.filter(function(e4) { if (e4.level === b.ERROR || e4.level === b.PROMISE_ERROR || e4.level === b.AJAX_ERROR || e4.level === b.SCRIPT_ERROR || e4.level === b.IMAGE_ERROR || e4.level === b.CSS_ERROR || e4.level === b.MEDIA_ERROR || e4.level === b.RET_ERROR || e4.level === b.BRIDGE_ERROR || e4.level === b.PAGE_NOT_FOUND_ERROR || e4.level === b.WEBSOCKET_ERROR) { e4 = e4.msg.slice(0, 200); if (i3[e4] > n3) return E[o3] || T(o3), false; i3[e4] = 1 + ~~i3[e4], P[o3] = i3; } return true; })); }), (p2 = this.lifeCycle.emit, d2 = this.config, function(e3, t3) { var n3, o3 = d2.logCreated; return "function" == typeof o3 ? (n3 = e3.filter(function(e4) { return false !== o3(e4); }), p2("beforeWrite", n3), t3(n3)) : (p2("beforeWrite", e3), t3(e3)); }), (f2 = this, setTimeout(function() { var e3 = f2.config.pvUrl, n3 = void 0 === e3 ? "" : e3, e3 = "undefined" != typeof location ? (null === location || void 0 === location ? void 0 : location.pathname) + (null === location || void 0 === location ? void 0 : location.hash) : void 0; n3 && e3 !== f2.originFireUrl && (f2.sendPipeline([function(e4, t3) { t3({ url: n3, type: O.PV }); }], O.PV)(null), e3) && location && (f2.originFireUrl = e3); }, 100), function(e3, t3) { t3(e3); }), (c2 = a2 = l2 = false, u2 = [], (s2 = this).lifeCycle.on("onConfigChange", function() { r2 && clearTimeout(r2), r2 = setTimeout(function() { var e3, n3; !c2 && s2.config && (c2 = true, e3 = s2.config.whiteListUrl, (n3 = void 0 === e3 ? "" : e3) && s2.sendPipeline([function(e4, t3) { t3({ url: n3, type: O.WHITE_LIST, success: function(e5) { a2 = true; try { var t4 = e5.data || JSON.parse(e5), n4 = t4.retcode, o3 = t4.result, i3 = void 0 === o3 ? {} : o3, r3 = (0 === n4 && (l2 = i3.is_in_white_list, s2.isWhiteList = l2, 0 <= i3.rate) && i3.rate <= 1 && (s2.config.random = i3.rate, s2.isGetSample = false), s2.isWhiteList && u2.length ? Z(s2)(u2.splice(0), function() { }) : !s2.isWhiteList && u2.length && (u2.length = 0), s2.config.onWhitelist); "function" == typeof r3 && r3(l2); } catch (e6) { } }, fail: function() { a2 = true; } }); }], O.WHITE_LIST)(null), c2 = false); }, s2.config.uin ? 50 : 500); }), s2.lifeCycle.on("destroy", function() { u2.length = 0; }), function(e3, t3) { var n3; l2 || null != (n3 = null == (n3 = s2.config) ? void 0 : n3.api) && n3.reportRequest ? t3(e3.concat(u2.splice(0)).map(function(e4) { return Y(e4), e4; })) : (n3 = e3.filter(function(e4) { return e4.level !== b.INFO && e4.level !== b.API_RESPONSE ? (Y(e4), true) : (a2 || (u2.push(e4), 200 <= u2.length && (u2.length = 200)), false); })).length && t3(n3); }), function(e3, t3) { try { var n3 = JSON.parse(JSON.stringify(e3)), o3 = (g2.lifeCycle.emit("beforeReport", n3), g2.config.beforeReport); (e3 = "function" == typeof o3 ? e3.filter(function(e4) { return false !== o3(e4); }) : e3).length && t3(e3); } catch (e4) { } }, Z(this)]), this.eventPipeline = y([m(this, 10), (i2 = this, function(e3) { i2.sendPipeline([function(e4, t3) { var n3 = e4.map(function(e5) { return { name: e5.name, ext1: e5.ext1 || i2.config.ext1 || "", ext2: e5.ext2 || i2.config.ext2 || "", ext3: e5.ext3 || i2.config.ext3 || "" }; }); t3({ url: i2.config.eventUrl + "?payload=" + encodeURIComponent(JSON.stringify(n3)), type: O.EVENT, log: e4 }); }], O.EVENT)(e3); })]), this.timeMap = {}, this.failRequestCount = 0, this.customTimePipeline = y([m(this, 10), (o2 = this, function(e3) { return o2.sendPipeline([function(e4, t3) { t3({ url: o2.config.customTimeUrl + "?payload=" + encodeURIComponent(JSON.stringify({ custom: e4 })), type: O.CUSTOM, log: e4 }); }], O.CUSTOM)(e3); })]), this.config = (t2 = this.config, void 0 === (e2 = e2.hostUrl) && (e2 = "https://aegis.qq.com"), t2.url = t2.url || e2 + "/collect", t2.offlineUrl = t2.offlineUrl || e2 + "/offline", t2.whiteListUrl = t2.whiteListUrl || e2 + "/collect/whitelist", t2.pvUrl = t2.pvUrl || e2 + "/collect/pv", t2.eventUrl = t2.eventUrl || e2 + "/collect/events", t2.speedUrl = t2.speedUrl || e2 + "/speed", t2.customTimeUrl = t2.customTimeUrl || e2 + "/speed/custom", t2.performanceUrl = t2.performanceUrl || e2 + "/speed/performance", t2.webVitalsUrl = t2.webVitalsUrl || e2 + "/speed/webvitals", t2.setDataReportUrl = t2.SetDataReportUrl || e2 + "/speed/miniProgramData", t2), N.instances.push(this); } return r.use(oe), r.use(L), r.use(S), r; }); })(aegis_min); var appId = 1400825410; uni.$TUIKit = TIM.create({ SDKAppID: appId }); uni.$TIM = TIM; uni.$TUIKit.registerPlugin({ "tim-upload-plugin": TIMUploadPlugin }); uni.$TUIKit.TUIConversationServer = new TUIConversationServer(); uni.$TUIKit.TUIProfileServer = new TUIProfileServer(); require("./wxcomponents/TUICallKit/TUICallKit/serve/callManager"); const _sfc_main = { onLaunch: function() { this.bindTIMEvent(); uni.$on("refreshIM", () => { this.checkLogin(); }); }, onUnload() { }, onShow() { uni.getSystemInfo({ success: (result) => { result.statusBarHeight + "px"; }, fail: (error2) => { formatAppLog("log", "at App.vue:93", error2); } }); }, methods: { checkLogin() { checkLogin().then( (res) => { if (res.code == 200) { this.imLogin(res.userId); } }, (rej) => { } ); }, imLogin(userId) { var uid = "U-" + userId; var data = { userId: uid }; getTlsSig(data).then( (res) => { formatAppLog("log", "at App.vue:127", data); if (res.code == 200) { var sign = res.data; uni.setStorageSync("sign", sign); uni.$chat_SDKAppID = appId; uni.$chat_userID = uid; uni.$chat_userSig = sign; uni.$TUIKit.login({ userID: uid, userSig: sign }).then((res2) => { formatAppLog("log", "at App.vue:137", "im登录成功"); }); } else { uni.showToast({ icon: "none", title: "请求失败" }); } }, (rej) => { } ); }, bindTIMEvent() { uni.$TUIKit.on(uni.$TIM.EVENT.SDK_READY, this.handleSDKReady); uni.$TUIKit.on(uni.$TIM.EVENT.SDK_NOT_READY, this.handleSDKNotReady); uni.$TUIKit.on(uni.$TIM.EVENT.KICKED_OUT, this.handleKickedOut); }, // sdk ready 以后可调用 API handleSDKReady(event) { uni.$chat_isSDKReady = true; uni.getStorageSync("userId"); var avatar = uni.getStorageSync("avatar"); var nickName = uni.getStorageSync("nickName"); formatAppLog("log", "at App.vue:162", avatar); uni.$TUIKit.updateMyProfile({ nick: nickName, avatar, gender: TIM.TYPES.GENDER_MALE, selfSignature: "我的个性签名", allowType: TIM.TYPES.ALLOW_TYPE_ALLOW_ANY }).then((res) => { formatAppLog("log", "at App.vue:171", "个人信息修改成功"); }); uni.$emit("refreshMsgCount"); }, handleSDKNotReady(event) { formatAppLog("log", "at App.vue:185", "SDK没有准备" + event); }, handleKickedOut(event) { uni.clearStorageSync(); uni.showToast({ title: `${this.kickedOutReason(event.data.type)}被踢出。`, icon: "none" }); }, kickedOutReason(type2) { switch (type2) { case uni.$TIM.TYPES.KICKED_OUT_MULT_ACCOUNT: return "多实例登录"; case uni.$TIM.TYPES.KICKED_OUT_MULT_DEVICE: return "多设备登录"; case uni.$TIM.TYPES.KICKED_OUT_USERSIG_EXPIRED: return "userSig 过期"; case uni.$TIM.TIM.TYPES.KICKED_OUT_REST_API: return "REST API kick 接口踢出"; default: return ""; } } } }; const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/Project/2023/问诊平台/his_user_app/App.vue"]]); const { toString } = Object.prototype; function isArray(val) { return toString.call(val) === "[object Array]"; } function isObject(val) { return val !== null && typeof val === "object"; } function isDate(val) { return toString.call(val) === "[object Date]"; } function isURLSearchParams(val) { return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams; } function forEach(obj, fn) { if (obj === null || typeof obj === "undefined") { return; } if (typeof obj !== "object") { obj = [obj]; } if (isArray(obj)) { for (let i = 0, l = obj.length; i < l; i++) { fn.call(null, obj[i], i, obj); } } else { for (const key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { fn.call(null, obj[key], key, obj); } } } } function isPlainObject(obj) { return Object.prototype.toString.call(obj) === "[object Object]"; } function deepMerge$1() { const result = {}; function assignValue(val, key) { if (typeof result[key] === "object" && typeof val === "object") { result[key] = deepMerge$1(result[key], val); } else if (typeof val === "object") { result[key] = deepMerge$1({}, val); } else { result[key] = val; } } for (let i = 0, l = arguments.length; i < l; i++) { forEach(arguments[i], assignValue); } return result; } function isUndefined(val) { return typeof val === "undefined"; } function encode(val) { return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function buildURL(url2, params) { if (!params) { return url2; } let serializedParams; if (isURLSearchParams(params)) { serializedParams = params.toString(); } else { const parts = []; forEach(params, (val, key) => { if (val === null || typeof val === "undefined") { return; } if (isArray(val)) { key = `${key}[]`; } else { val = [val]; } forEach(val, (v) => { if (isDate(v)) { v = v.toISOString(); } else if (isObject(v)) { v = JSON.stringify(v); } parts.push(`${encode(key)}=${encode(v)}`); }); }); serializedParams = parts.join("&"); } if (serializedParams) { const hashmarkIndex = url2.indexOf("#"); if (hashmarkIndex !== -1) { url2 = url2.slice(0, hashmarkIndex); } url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; } return url2; } function isAbsoluteURL(url2) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); } function combineURLs(baseURL, relativeURL) { return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL; } function buildFullPath(baseURL, requestedURL) { if (baseURL && !isAbsoluteURL(requestedURL)) { return combineURLs(baseURL, requestedURL); } return requestedURL; } function settle(resolve, reject2, response) { const { validateStatus } = response.config; const status = response.statusCode; if (status && (!validateStatus || validateStatus(status))) { resolve(response); } else { reject2(response); } } const mergeKeys$1 = (keys, config2) => { const config3 = {}; keys.forEach((prop) => { if (!isUndefined(config2[prop])) { config3[prop] = config2[prop]; } }); return config3; }; const adapter = (config2) => new Promise((resolve, reject2) => { const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params); const _config = { url: fullPath, header: config2.header, complete: (response) => { config2.fullPath = fullPath; response.config = config2; try { if (typeof response.data === "string") { response.data = JSON.parse(response.data); } } catch (e) { } settle(resolve, reject2, response); } }; let requestTask; if (config2.method === "UPLOAD") { delete _config.header["content-type"]; delete _config.header["Content-Type"]; const otherConfig = { filePath: config2.filePath, name: config2.name }; const optionalKeys = [ "files", "timeout", "formData" ]; requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) }); } else if (config2.method === "DOWNLOAD") { if (!isUndefined(config2.timeout)) { _config.timeout = config2.timeout; } requestTask = uni.downloadFile(_config); } else { const optionalKeys = [ "data", "method", "timeout", "dataType", "responseType", "sslVerify", "firstIpv4" ]; requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) }); } if (config2.getTask) { config2.getTask(requestTask, config2); } }); const dispatchRequest = (config2) => adapter(config2); function InterceptorManager() { this.handlers = []; } InterceptorManager.prototype.use = function use(fulfilled, rejected) { this.handlers.push({ fulfilled, rejected }); return this.handlers.length - 1; }; InterceptorManager.prototype.eject = function eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } }; InterceptorManager.prototype.forEach = function forEach2(fn) { this.handlers.forEach((h) => { if (h !== null) { fn(h); } }); }; const mergeKeys = (keys, globalsConfig, config2) => { const config3 = {}; keys.forEach((prop) => { if (!isUndefined(config2[prop])) { config3[prop] = config2[prop]; } else if (!isUndefined(globalsConfig[prop])) { config3[prop] = globalsConfig[prop]; } }); return config3; }; const mergeConfig = (globalsConfig, config2 = {}) => { const method = config2.method || globalsConfig.method || "GET"; let config3 = { baseURL: globalsConfig.baseURL || "", method, url: config2.url || "", params: config2.params || {}, custom: { ...globalsConfig.custom || {}, ...config2.custom || {} }, header: deepMerge$1(globalsConfig.header || {}, config2.header || {}) }; const defaultToConfig2Keys = ["getTask", "validateStatus"]; config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) }; if (method === "DOWNLOAD") { if (!isUndefined(config2.timeout)) { config3.timeout = config2.timeout; } else if (!isUndefined(globalsConfig.timeout)) { config3.timeout = globalsConfig.timeout; } } else if (method === "UPLOAD") { delete config3.header["content-type"]; delete config3.header["Content-Type"]; const uploadKeys = [ "files", "filePath", "name", "timeout", "formData" ]; uploadKeys.forEach((prop) => { if (!isUndefined(config2[prop])) { config3[prop] = config2[prop]; } }); if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) { config3.timeout = globalsConfig.timeout; } } else { const defaultsKeys = [ "data", "timeout", "dataType", "responseType", "sslVerify", "firstIpv4" ]; config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) }; } return config3; }; const defaults = { baseURL: "", header: {}, method: "GET", dataType: "json", responseType: "text", custom: {}, timeout: 6e4, sslVerify: true, firstIpv4: false, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; } }; var clone = function() { function _instanceof(obj, type2) { return type2 != null && obj instanceof type2; } var nativeMap; try { nativeMap = Map; } catch (_) { nativeMap = function() { }; } var nativeSet; try { nativeSet = Set; } catch (_) { nativeSet = function() { }; } var nativePromise; try { nativePromise = Promise; } catch (_) { nativePromise = function() { }; } function clone2(parent, circular, depth, prototype, includeNonEnumerable) { if (typeof circular === "object") { depth = circular.depth; prototype = circular.prototype; includeNonEnumerable = circular.includeNonEnumerable; circular = circular.circular; } var allParents = []; var allChildren = []; var useBuffer = typeof Buffer != "undefined"; if (typeof circular == "undefined") circular = true; if (typeof depth == "undefined") depth = Infinity; function _clone(parent2, depth2) { if (parent2 === null) return null; if (depth2 === 0) return parent2; var child; var proto; if (typeof parent2 != "object") { return parent2; } if (_instanceof(parent2, nativeMap)) { child = new nativeMap(); } else if (_instanceof(parent2, nativeSet)) { child = new nativeSet(); } else if (_instanceof(parent2, nativePromise)) { child = new nativePromise(function(resolve, reject2) { parent2.then(function(value2) { resolve(_clone(value2, depth2 - 1)); }, function(err) { reject2(_clone(err, depth2 - 1)); }); }); } else if (clone2.__isArray(parent2)) { child = []; } else if (clone2.__isRegExp(parent2)) { child = new RegExp(parent2.source, __getRegExpFlags(parent2)); if (parent2.lastIndex) child.lastIndex = parent2.lastIndex; } else if (clone2.__isDate(parent2)) { child = new Date(parent2.getTime()); } else if (useBuffer && Buffer.isBuffer(parent2)) { if (Buffer.from) { child = Buffer.from(parent2); } else { child = new Buffer(parent2.length); parent2.copy(child); } return child; } else if (_instanceof(parent2, Error)) { child = Object.create(parent2); } else { if (typeof prototype == "undefined") { proto = Object.getPrototypeOf(parent2); child = Object.create(proto); } else { child = Object.create(prototype); proto = prototype; } } if (circular) { var index2 = allParents.indexOf(parent2); if (index2 != -1) { return allChildren[index2]; } allParents.push(parent2); allChildren.push(child); } if (_instanceof(parent2, nativeMap)) { parent2.forEach(function(value2, key) { var keyChild = _clone(key, depth2 - 1); var valueChild = _clone(value2, depth2 - 1); child.set(keyChild, valueChild); }); } if (_instanceof(parent2, nativeSet)) { parent2.forEach(function(value2) { var entryChild = _clone(value2, depth2 - 1); child.add(entryChild); }); } for (var i in parent2) { var attrs = Object.getOwnPropertyDescriptor(parent2, i); if (attrs) { child[i] = _clone(parent2[i], depth2 - 1); } try { var objProperty = Object.getOwnPropertyDescriptor(parent2, i); if (objProperty.set === "undefined") { continue; } child[i] = _clone(parent2[i], depth2 - 1); } catch (e) { if (e instanceof TypeError) { continue; } else if (e instanceof ReferenceError) { continue; } } } if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(parent2); for (var i = 0; i < symbols.length; i++) { var symbol = symbols[i]; var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol); if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { continue; } child[symbol] = _clone(parent2[symbol], depth2 - 1); Object.defineProperty(child, symbol, descriptor); } } if (includeNonEnumerable) { var allPropertyNames = Object.getOwnPropertyNames(parent2); for (var i = 0; i < allPropertyNames.length; i++) { var propertyName = allPropertyNames[i]; var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName); if (descriptor && descriptor.enumerable) { continue; } child[propertyName] = _clone(parent2[propertyName], depth2 - 1); Object.defineProperty(child, propertyName, descriptor); } } return child; } return _clone(parent, depth); } clone2.clonePrototype = function clonePrototype(parent) { if (parent === null) return null; var c = function() { }; c.prototype = parent; return new c(); }; function __objToStr(o) { return Object.prototype.toString.call(o); } clone2.__objToStr = __objToStr; function __isDate(o) { return typeof o === "object" && __objToStr(o) === "[object Date]"; } clone2.__isDate = __isDate; function __isArray(o) { return typeof o === "object" && __objToStr(o) === "[object Array]"; } clone2.__isArray = __isArray; function __isRegExp(o) { return typeof o === "object" && __objToStr(o) === "[object RegExp]"; } clone2.__isRegExp = __isRegExp; function __getRegExpFlags(re) { var flags = ""; if (re.global) flags += "g"; if (re.ignoreCase) flags += "i"; if (re.multiline) flags += "m"; return flags; } clone2.__getRegExpFlags = __getRegExpFlags; return clone2; }(); class Request { /** * @param {Object} arg - 全局配置 * @param {String} arg.baseURL - 全局根路径 * @param {Object} arg.header - 全局header * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式 * @param {String} arg.dataType = [json] - 全局默认的dataType * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持 * @param {Object} arg.custom - 全局默认的自定义参数 * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序 * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+) * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+) * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+) * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300 */ constructor(arg = {}) { if (!isPlainObject(arg)) { arg = {}; formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object"); } this.config = clone({ ...defaults, ...arg }); this.interceptors = { request: new InterceptorManager(), response: new InterceptorManager() }; } /** * @Function * @param {Request~setConfigCallback} f - 设置全局默认配置 */ setConfig(f) { this.config = f(this.config); } middleware(config2) { config2 = mergeConfig(this.config, config2); const chain = [dispatchRequest, void 0]; let promise2 = Promise.resolve(config2); this.interceptors.request.forEach((interceptor) => { chain.unshift(interceptor.fulfilled, interceptor.rejected); }); this.interceptors.response.forEach((interceptor) => { chain.push(interceptor.fulfilled, interceptor.rejected); }); while (chain.length) { promise2 = promise2.then(chain.shift(), chain.shift()); } return promise2; } /** * @Function * @param {Object} config - 请求配置项 * @prop {String} options.url - 请求路径 * @prop {Object} options.data - 请求参数 * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型 * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse * @prop {Object} [options.header = config.header] - 请求header * @prop {Object} [options.method = config.method] - 请求方法 * @returns {Promise} */ request(config2 = {}) { return this.middleware(config2); } get(url2, options = {}) { return this.middleware({ url: url2, method: "GET", ...options }); } post(url2, data, options = {}) { return this.middleware({ url: url2, data, method: "POST", ...options }); } put(url2, data, options = {}) { return this.middleware({ url: url2, data, method: "PUT", ...options }); } delete(url2, data, options = {}) { return this.middleware({ url: url2, data, method: "DELETE", ...options }); } options(url2, data, options = {}) { return this.middleware({ url: url2, data, method: "OPTIONS", ...options }); } upload(url2, config2 = {}) { config2.url = url2; config2.method = "UPLOAD"; return this.middleware(config2); } download(url2, config2 = {}) { config2.url = url2; config2.method = "DOWNLOAD"; return this.middleware(config2); } } class Router { constructor() { this.config = { type: "navigateTo", url: "", delta: 1, // navigateBack页面后退时,回退的层数 params: {}, // 传递的参数 animationType: "pop-in", // 窗口动画,只在APP有效 animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效 intercept: false // 是否需要拦截 }; this.route = this.route.bind(this); } // 判断url前面是否有"/",如果没有则加上,否则无法跳转 addRootPath(url2) { return url2[0] === "/" ? url2 : `/${url2}`; } // 整合路由参数 mixinParam(url2, params) { url2 = url2 && this.addRootPath(url2); let query = ""; if (/.*\/.*\?.*=.*/.test(url2)) { query = uni.$u.queryParams(params, false); return url2 += `&${query}`; } query = uni.$u.queryParams(params); return url2 += query; } // 对外的方法名称 async route(options = {}, params = {}) { let mergeConfig2 = {}; if (typeof options === "string") { mergeConfig2.url = this.mixinParam(options, params); mergeConfig2.type = "navigateTo"; } else { mergeConfig2 = uni.$u.deepMerge(this.config, options); mergeConfig2.url = this.mixinParam(options.url, options.params); } if (mergeConfig2.url === uni.$u.page()) return; if (params.intercept) { this.config.intercept = params.intercept; } mergeConfig2.params = params; mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2); if (typeof uni.$u.routeIntercept === "function") { const isNext = await new Promise((resolve, reject2) => { uni.$u.routeIntercept(mergeConfig2, resolve); }); isNext && this.openPage(mergeConfig2); } else { this.openPage(mergeConfig2); } } // 执行路由跳转 openPage(config2) { const { url: url2, type: type2, delta, animationType, animationDuration } = config2; if (config2.type == "navigateTo" || config2.type == "to") { uni.navigateTo({ url: url2, animationType, animationDuration }); } 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; 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; } } function colorToRgba(color2, alpha) { color2 = rgbToHex(color2); const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; let sColor = String(color2).toLowerCase(); if (sColor && reg.test(sColor)) { if (sColor.length === 4) { let sColorNew = "#"; for (let i = 1; i < 4; i += 1) { sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)); } sColor = sColorNew; } const sColorChange = []; for (let i = 1; i < 7; i += 2) { sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`)); } return `rgba(${sColorChange.join(",")},${alpha})`; } return sColor; } const colorGradient$1 = { colorGradient, hexToRgb, rgbToHex, colorToRgba }; 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[23456789]\d{9}$/.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(value2) { if (!value2) return false; if (number(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(value2) { return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2); } function string(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$1(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(value2) { if (typeof Array.isArray === "function") { return Array.isArray(value2); } return Object.prototype.toString.call(value2) === "[object Array]"; } function object(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(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 = { email, mobile, url, date, dateISO, number, digits, idCard, carNo, amount, chinese, letter, enOrNum, contains, range: range$1, rangeLength, empty, isEmpty: empty, jsonString, landline, object, array, code, func, promise, video, image, regExp, string }; 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); } } 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/uview-plus/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, ratio) { const base = Math.pow(10, ratio); let result = divide(Math.round(Math.abs(times(num, base))), base); if (num < 0 && result !== 0) { result = times(result, -1); } return result; } function range(min = 0, max = 0, value2 = 0) { return Math.max(min, Math.min(max, Number(value2))); } function getPx(value2, unit = false) { if (test.number(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 (test.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 = "") { if (!unit) { unit = uni.$u.config.unit || "px"; } value2 = String(value2); return test.number(value2) ? `${value2}${unit}` : value2; } function deepClone(obj) { if ([null, void 0, NaN, false].includes(obj)) return obj; if (typeof obj !== "object" && typeof obj !== "function") { return obj; } const o = test.array(obj) ? [] : {}; for (const i in obj) { if (obj.hasOwnProperty(i)) { o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i]; } } return o; } function deepMerge(target = {}, source = {}) { target = deepClone(target); if (typeof target !== "object" || typeof source !== "object") return false; for (const prop in source) { if (!source.hasOwnProperty(prop)) continue; if (prop in target) { if (typeof target[prop] !== "object") { target[prop] = source[prop]; } else if (typeof source[prop] !== "object") { target[prop] = source[prop]; } else if (target[prop].concat && source[prop].concat) { target[prop] = target[prop].concat(source[prop]); } else { target[prop] = deepMerge(target[prop], source[prop]); } } else { target[prop] = source[prop]; } } return target; } function error(err) { { formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`); } } function randomArray(array3 = []) { return array3.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 date3; if (!dateTime) { date3 = /* @__PURE__ */ new Date(); } else if (/^\d{10}$/.test(dateTime.toString().trim())) { date3 = new Date(dateTime * 1e3); } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) { date3 = new Date(Number(dateTime)); } else { date3 = new Date( typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime ); } const timeSource = { "y": date3.getFullYear().toString(), // 年 "m": (date3.getMonth() + 1).toString().padStart(2, "0"), // 月 "d": date3.getDate().toString().padStart(2, "0"), // 日 "h": date3.getHours().toString().padStart(2, "0"), // 时 "M": date3.getMinutes().toString().padStart(2, "0"), // 分 "s": date3.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(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") { number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, ""); const n = !isFinite(+number3) ? 0 : +number3; 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(n, prec) + "" : `${Math.round(n)}`).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 = uni.$u.$parent.call(instance, "u-form-item"); const form = uni.$u.$parent.call(instance, "u-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() { const pages2 = getCurrentPages(); return `/${pages2[pages2.length - 1].route || ""}`; } function pages() { const pages2 = getCurrentPages(); return pages2; } function setConfig({ props: props2 = {}, config: config2 = {}, color: color2 = {}, zIndex: zIndex2 = {} }) { const { deepMerge: deepMerge2 } = uni.$u; uni.$u.config = deepMerge2(uni.$u.config, config2); uni.$u.props = deepMerge2(uni.$u.props, props2); uni.$u.color = deepMerge2(uni.$u.color, color2); uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2); } const index = { range, getPx, sleep, os, sys, random, guid, $parent, addStyle, addUnit, deepClone, deepMerge, error, randomArray, timeFormat, timeFrom, trim, queryParams, toast, type2icon, priceFormat, getDuration, padZero, formValidate, getProperty, setProperty, page, pages, setConfig }; const zIndex = { toast: 10090, noNetwork: 10080, // popup包含popup,actionsheet,keyboard,picker的值 popup: 10075, mask: 10070, navbar: 980, topTips: 975, sticky: 970, indexListSticky: 965 }; let platform = "none"; platform = "vue3"; platform = "plus"; const platform$1 = platform; const $u = { route, date: index.timeFormat, // 另名date colorGradient: colorGradient$1.colorGradient, hexToRgb: colorGradient$1.hexToRgb, rgbToHex: colorGradient$1.rgbToHex, colorToRgba: colorGradient$1.colorToRgba, test, type: ["primary", "success", "error", "warning", "info"], http: new Request(), config: config$2, // uView配置信息相关,比如版本号 zIndex, debounce, throttle, mixin, mpMixin, props: props$y, ...index, color, platform: platform$1 }; uni.$u = $u; const install = (Vue2) => { Vue2.config.globalProperties.$u = $u; Vue2.config.globalProperties.$nextTick = (cb) => { cb(); }; Vue2.mixin(mixin); }; const uviewPlus = { install }; function isEmpty(obj) { if (obj == "undefined" || obj == null || obj == "") { return true; } else { return false; } } function isLogin() { return new Promise((resolve, reject2) => { checkLogin().then( (res) => { if (res.code == 200) { resolve(true); } else { resolve(false); } }, (rej) => { } ); }); } function getDictLabelName(dicts, dictValue) { if (dictValue == null) { return ""; } var name = ""; dicts.forEach(function(item, index2, array3) { if (dictValue.toString() == item.dictValue.toString()) { name = item.dictLabel; } }); return name; } function parseText(txt, len) { if (txt.length > len) { var text = txt.substr(0, len) + "..."; return text; } return txt; } function parseIDCardInfo(idCard2) { var reg = /^\d{17}[\dXx]$/; if (reg.test(idCard2)) { var birthday = idCard2.substring(6, 14); var year = birthday.substring(0, 4); var month = birthday.substring(4, 6); var day = birthday.substring(6, 8); var currentYear = (/* @__PURE__ */ new Date()).getFullYear(); var age = currentYear - parseInt(year); var genderCode = parseInt(idCard2.charAt(16)); var gender = genderCode % 2 === 0 ? "女" : "男"; return { birthday: year + "-" + month + "-" + day, age, gender }; } return null; } function getProvider(service) { return new Promise((resolve, reject2) => { uni.getProvider({ service: service || "oauth", success: function(res) { if (res.provider) { resolve(res.provider[0]); } }, fail() { reject2("获取环境服务商失败"); } }); }).catch((error2) => { formatAppLog("log", "at utils/common.js:149", "167", error2); }); } function parsePhone(mobile2) { formatAppLog("log", "at utils/common.js:154", mobile2); if (mobile2 != null) { var str = mobile2.substr(0, 3) + "****" + mobile2.substr(7); return str; } } function getAge(strBirthday) { var returnAge, strBirthdayArr = strBirthday.split("-"), birthYear = strBirthdayArr[0], birthMonth = strBirthdayArr[1], birthDay = strBirthdayArr[2], d = /* @__PURE__ */ new Date(), nowYear = d.getFullYear(), nowMonth = d.getMonth() + 1, nowDay = d.getDate(); if (nowYear == birthYear) { returnAge = 0; } else { var ageDiff = nowYear - birthYear; if (ageDiff > 0) { if (nowMonth == birthMonth) { var dayDiff = nowDay - birthDay; if (dayDiff < 0) { returnAge = ageDiff - 1; } else { returnAge = ageDiff; } } else { var monthDiff = nowMonth - birthMonth; if (monthDiff < 0) { returnAge = ageDiff - 1; } else { returnAge = ageDiff; } } } else { returnAge = -1; } } return returnAge; } function parseIdCard(idCard2) { var str = idCard2.substr(0, 4) + "****" + idCard2.substr(8); return str; } function urlToObj(url2) { let obj = {}; let str = url2.slice(url2.indexOf("?") + 1); let arr = str.split("&"); for (let j = arr.length, i = 0; i < j; i++) { let arr_temp = arr[i].split("="); obj[arr_temp[0]] = arr_temp[1]; } return obj; } function logout() { uni.setStorageSync("AppToken", null); } function clearHisSearch() { var searchList = []; uni.setStorageSync("hisSearch", JSON.stringify(searchList)); } function getHisSearch() { var search = uni.getStorageSync("hisSearch"); if (search != null && search != void 0 && search != "") { var search = JSON.parse(search); return search; } else { var data = []; return data; } } function addHisSearch(searchVal) { var search = uni.getStorageSync("hisSearch"); var searchList = []; formatAppLog("log", "at utils/common.js:240", searchList); if (search != null && search != void 0 && search != "") { searchList = JSON.parse(search); } searchList.push(searchVal); const uniqueArr = [...new Set(searchList)]; uni.setStorageSync("hisSearch", JSON.stringify(uniqueArr)); } function createApp() { const app = vue.createVueApp(App); app.config.globalProperties.$getProvider = getProvider; app.config.globalProperties.$parsePhone = parsePhone; app.config.globalProperties.$isLogin = isLogin; app.config.globalProperties.$isEmpty = isEmpty; app.config.globalProperties.$getAge = getAge; app.config.globalProperties.$parseIdCard = parseIdCard; app.config.globalProperties.$getDictLabelName = getDictLabelName; app.config.globalProperties.$logout = logout; app.config.globalProperties.$clearHisSearch = clearHisSearch; app.config.globalProperties.$getHisSearch = getHisSearch; app.config.globalProperties.$addHisSearch = addHisSearch; app.config.globalProperties.$urlToObj = urlToObj; app.config.globalProperties.$parseText = parseText; app.config.globalProperties.$parseIDCardInfo = parseIDCardInfo; app.use(uviewPlus); 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);