This commit is contained in:
Your Name
2026-08-11 17:41:36 +08:00
parent cfe4c82c90
commit 03fe4ddf9d
18771 changed files with 3617239 additions and 0 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"version":3,"file":"tab-bar-dock.js","sources":["components/app-tab-bar/tab-bar-dock.vue","../../../soft/HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDovd2ViL3p5dC9Ub25namlVbmlBcHAvY29tcG9uZW50cy9hcHAtdGFiLWJhci90YWItYmFyLWRvY2sudnVl"],"sourcesContent":["<template>\r\n <view class=\"tab-dock\">\r\n <view class=\"tab-dock__inner\">\r\n <view class=\"tab-dock__item tab-dock__item--center\" @click=\"goWeekly\">\r\n <view class=\"tab-dock__fab\" :class=\"{ 'tab-dock__fab--active': active === 0 }\">\r\n <text class=\"tab-dock__fab-text\">糖</text>\r\n </view>\r\n <text class=\"tab-dock__label tab-dock__label--center\" :style=\"{ color: active === 0 ? activeColor : color }\">血糖</text>\r\n </view>\r\n\r\n <view class=\"tab-dock__item\" @click=\"goUser\">\r\n <image\r\n class=\"tab-dock__icon\"\r\n :src=\"active === 1 ? '/static/user/user_no.png' : '/static/user/user.png'\"\r\n mode=\"aspectFit\"\r\n />\r\n <text class=\"tab-dock__label\" :style=\"{ color: active === 1 ? activeColor : color }\">我的</text>\r\n </view>\r\n </view>\r\n <view class=\"tab-dock__safe\" />\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\nconst props = defineProps({\r\n /** 0 血糖 1 我的 */\r\n active: {\r\n type: Number,\r\n default: 0\r\n }\r\n})\r\n\r\nconst color = '#8a8a8a'\r\nconst activeColor = '#204e2b'\r\n\r\nfunction goUser() {\r\n if (props.active === 1) return\r\n uni.redirectTo({ url: '/pages/user/user' })\r\n}\r\n\r\nfunction goWeekly() {\r\n if (props.active === 0) return\r\n uni.redirectTo({ url: '/tongji/pages/weekly' })\r\n}\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n.tab-dock {\r\n position: fixed;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: 999;\r\n background: #ffffff;\r\n border-top: 1rpx solid rgba(0, 0, 0, 0.06);\r\n box-shadow: 0 -6rpx 20rpx rgba(0, 0, 0, 0.04);\r\n}\r\n\r\n.tab-dock__inner {\r\n display: flex;\r\n align-items: flex-end;\r\n height: 100rpx;\r\n}\r\n\r\n.tab-dock__item {\r\n flex: 1;\r\n height: 100rpx;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.tab-dock__item--center {\r\n justify-content: flex-end;\r\n padding-bottom: 6rpx;\r\n}\r\n\r\n.tab-dock__icon {\r\n width: 46rpx;\r\n height: 46rpx;\r\n}\r\n\r\n.tab-dock__label {\r\n margin-top: 6rpx;\r\n font-size: 22rpx;\r\n line-height: 1.2;\r\n}\r\n\r\n.tab-dock__label--center {\r\n margin-top: 8rpx;\r\n}\r\n\r\n.tab-dock__fab {\r\n width: 96rpx;\r\n height: 96rpx;\r\n margin-top: -48rpx;\r\n border-radius: 50%;\r\n background: linear-gradient(180deg, #2d7340 0%, #204e2b 100%);\r\n border: 6rpx solid #ffffff;\r\n box-shadow: 0 10rpx 24rpx rgba(32, 78, 43, 0.35);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.tab-dock__fab--active {\r\n transform: scale(1.04);\r\n box-shadow: 0 12rpx 28rpx rgba(32, 78, 43, 0.42);\r\n}\r\n\r\n.tab-dock__fab-text {\r\n color: #ffffff;\r\n font-size: 38rpx;\r\n font-weight: 700;\r\n line-height: 1;\r\n}\r\n\r\n.tab-dock__safe {\r\n height: env(safe-area-inset-bottom);\r\n background: #ffffff;\r\n}\r\n</style>\r\n","import Component from 'D:/web/zyt/TongjiUniApp/components/app-tab-bar/tab-bar-dock.vue'\nwx.createComponent(Component)"],"names":["uni"],"mappings":";;AAgCA,MAAM,QAAQ;AACd,MAAM,cAAc;;;;;;;;;;;AATpB,UAAM,QAAQ;AAWd,aAAS,SAAS;AACd,UAAI,MAAM,WAAW;AAAG;AACxBA,oBAAAA,MAAI,WAAW,EAAE,KAAK,mBAAkB,CAAE;AAAA,IAC9C;AAEA,aAAS,WAAW;AAChB,UAAI,MAAM,WAAW;AAAG;AACxBA,oBAAAA,MAAI,WAAW,EAAE,KAAK,uBAAsB,CAAE;AAAA,IAClD;;;;;;;;;;;;;;AC1CA,GAAG,gBAAgB,SAAS;"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"version":3,"file":"VoiceSpeakMascot.js","sources":["../../../soft/HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDovd2ViL3p5dC9Ub25namlVbmlBcHAvdG9uZ2ppL2NvbXBvbmVudHMvVm9pY2VTcGVha01hc2NvdC52dWU"],"sourcesContent":["import Component from 'D:/web/zyt/TongjiUniApp/tongji/components/VoiceSpeakMascot.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,GAAG,gBAAgB,SAAS;"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"version":3,"file":"useGameAuth.js","sources":["tongji/endless-game/composables/useGameAuth.js"],"sourcesContent":["/**\r\n * 识糖小课堂独立登录适配层。复用主小程序账号,但不依赖 tongji 其他页面代码。\r\n */\r\nexport function useGameAuth(proxy) {\r\n let loginPromise = null\r\n\r\n function hasToken() {\r\n return !!String(uni.getStorageSync('token') || '').trim()\r\n }\r\n\r\n function clearToken() {\r\n uni.removeStorageSync('token')\r\n }\r\n\r\n function wxLoginCode() {\r\n return new Promise((resolve, reject) => {\r\n uni.login({\r\n provider: 'weixin',\r\n success: (res) => res?.code ? resolve(res.code) : reject(new Error('微信登录未返回 code')),\r\n fail: reject\r\n })\r\n })\r\n }\r\n\r\n async function loginWithCode(code) {\r\n const res = await proxy.apiUrl({\r\n url: '/api/login/mnpLogin',\r\n method: 'POST',\r\n data: { code }\r\n }, false)\r\n if (res?.code !== 1 || !res.data?.token) {\r\n clearToken()\r\n throw new Error(res?.msg || '登录失败')\r\n }\r\n uni.setStorageSync('token', res.data.token)\r\n uni.setStorageSync('userData', res.data)\r\n return true\r\n }\r\n\r\n async function verifyOrLogin() {\r\n if (hasToken()) {\r\n try {\r\n const res = await proxy.apiUrl({ url: '/api/user/info', method: 'POST' }, false)\r\n if (res?.code === 1 && res.data) {\r\n uni.setStorageSync('userData', res.data)\r\n return true\r\n }\r\n // 只有明确的登录失效才重新换取 token;其他业务错误先保留原登录。\r\n if (res?.code !== -1) return true\r\n } catch (_) {\r\n // 断网不清除仍可能有效的 token,成绩由离线队列稍后补传。\r\n return true\r\n }\r\n clearToken()\r\n }\r\n const code = await wxLoginCode()\r\n return loginWithCode(code)\r\n }\r\n\r\n async function ensureLoggedIn() {\r\n if (loginPromise) return loginPromise\r\n loginPromise = verifyOrLogin()\r\n .then(ok => !!ok)\r\n .catch(() => false)\r\n // 只合并同时发生的登录;成功结果不能永久缓存,否则 token 过期后无法恢复。\r\n .finally(() => { loginPromise = null })\r\n return loginPromise\r\n }\r\n\r\n return { ensureLoggedIn }\r\n}\r\n"],"names":["uni"],"mappings":";;AAGO,SAAS,YAAY,OAAO;AAC/B,MAAI,eAAe;AAEnB,WAAS,WAAW;AAChB,WAAO,CAAC,CAAC,OAAOA,oBAAI,eAAe,OAAO,KAAK,EAAE,EAAE,KAAM;AAAA,EAC5D;AAED,WAAS,aAAa;AAClBA,kBAAG,MAAC,kBAAkB,OAAO;AAAA,EAChC;AAED,WAAS,cAAc;AACnB,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACpCA,oBAAAA,MAAI,MAAM;AAAA,QACN,UAAU;AAAA,QACV,SAAS,CAAC,SAAQ,2BAAK,QAAO,QAAQ,IAAI,IAAI,IAAI,OAAO,IAAI,MAAM,cAAc,CAAC;AAAA,QAClF,MAAM;AAAA,MACtB,CAAa;AAAA,IACb,CAAS;AAAA,EACJ;AAED,iBAAe,cAAc,MAAM;;AAC/B,UAAM,MAAM,MAAM,MAAM,OAAO;AAAA,MAC3B,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,MAAM,EAAE,KAAM;AAAA,IACjB,GAAE,KAAK;AACR,SAAI,2BAAK,UAAS,KAAK,GAAC,SAAI,SAAJ,mBAAU,QAAO;AACrC,iBAAY;AACZ,YAAM,IAAI,OAAM,2BAAK,QAAO,MAAM;AAAA,IACrC;AACDA,kBAAAA,MAAI,eAAe,SAAS,IAAI,KAAK,KAAK;AAC1CA,kBAAAA,MAAI,eAAe,YAAY,IAAI,IAAI;AACvC,WAAO;AAAA,EACV;AAED,iBAAe,gBAAgB;AAC3B,QAAI,SAAQ,GAAI;AACZ,UAAI;AACA,cAAM,MAAM,MAAM,MAAM,OAAO,EAAE,KAAK,kBAAkB,QAAQ,OAAQ,GAAE,KAAK;AAC/E,aAAI,2BAAK,UAAS,KAAK,IAAI,MAAM;AAC7BA,wBAAAA,MAAI,eAAe,YAAY,IAAI,IAAI;AACvC,iBAAO;AAAA,QACV;AAED,aAAI,2BAAK,UAAS;AAAI,iBAAO;AAAA,MAChC,SAAQ,GAAG;AAER,eAAO;AAAA,MACV;AACD,iBAAY;AAAA,IACf;AACD,UAAM,OAAO,MAAM,YAAa;AAChC,WAAO,cAAc,IAAI;AAAA,EAC5B;AAED,iBAAe,iBAAiB;AAC5B,QAAI;AAAc,aAAO;AACzB,mBAAe,cAAe,EACzB,KAAK,QAAM,CAAC,CAAC,EAAE,EACf,MAAM,MAAM,KAAK,EAEjB,QAAQ,MAAM;AAAE,qBAAe;AAAA,KAAM;AAC1C,WAAO;AAAA,EACV;AAED,SAAO,EAAE,eAAgB;AAC7B;;"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"version":3,"file":"svgDataUrl.js","sources":["tongji/utils/svgDataUrl.js"],"sourcesContent":["/**\r\n * 将 SVG 字符串转为小程序可用的 data URL(base64 在真机上更稳定)\r\n */\r\n\r\nfunction utf8ToBytes(str) {\r\n const encoded = encodeURIComponent(str)\r\n const bytes = []\r\n for (let i = 0; i < encoded.length; i++) {\r\n if (encoded.charCodeAt(i) === 37) {\r\n bytes.push(parseInt(encoded.substring(i + 1, i + 3), 16))\r\n i += 2\r\n } else {\r\n bytes.push(encoded.charCodeAt(i))\r\n }\r\n }\r\n return new Uint8Array(bytes)\r\n}\r\n\r\nfunction bytesToBase64(bytes) {\r\n if (typeof uni !== 'undefined' && typeof uni.arrayBufferToBase64 === 'function') {\r\n return uni.arrayBufferToBase64(bytes.buffer)\r\n }\r\n if (typeof btoa !== 'undefined') {\r\n let binary = ''\r\n for (let i = 0; i < bytes.length; i++) {\r\n binary += String.fromCharCode(bytes[i])\r\n }\r\n return btoa(binary)\r\n }\r\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\r\n let result = ''\r\n for (let i = 0; i < bytes.length; i += 3) {\r\n const a = bytes[i]\r\n const b = i + 1 < bytes.length ? bytes[i + 1] : 0\r\n const c = i + 2 < bytes.length ? bytes[i + 2] : 0\r\n result += chars[a >> 2]\r\n result += chars[((a & 3) << 4) | (b >> 4)]\r\n result += i + 1 < bytes.length ? chars[((b & 15) << 2) | (c >> 6)] : '='\r\n result += i + 2 < bytes.length ? chars[c & 63] : '='\r\n }\r\n return result\r\n}\r\n\r\nexport function svgToDataUrl(svg) {\r\n const normalized = String(svg || '').trim()\r\n if (!normalized) return ''\r\n const base64 = bytesToBase64(utf8ToBytes(normalized))\r\n return `data:image/svg+xml;base64,${base64}`\r\n}\r\n"],"names":["uni"],"mappings":";;AAIA,SAAS,YAAY,KAAK;AACtB,QAAM,UAAU,mBAAmB,GAAG;AACtC,QAAM,QAAQ,CAAE;AAChB,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACrC,QAAI,QAAQ,WAAW,CAAC,MAAM,IAAI;AAC9B,YAAM,KAAK,SAAS,QAAQ,UAAU,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AACxD,WAAK;AAAA,IACjB,OAAe;AACH,YAAM,KAAK,QAAQ,WAAW,CAAC,CAAC;AAAA,IACnC;AAAA,EACJ;AACD,SAAO,IAAI,WAAW,KAAK;AAC/B;AAEA,SAAS,cAAc,OAAO;AAC1B,MAAI,OAAOA,cAAG,UAAK,eAAe,OAAOA,cAAAA,MAAI,wBAAwB,YAAY;AAC7E,WAAOA,oBAAI,oBAAoB,MAAM,MAAM;AAAA,EAC9C;AACD,MAAI,OAAO,SAAS,aAAa;AAC7B,QAAI,SAAS;AACb,aAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACnC,gBAAU,OAAO,aAAa,MAAM,CAAC,CAAC;AAAA,IACzC;AACD,WAAO,KAAK,MAAM;AAAA,EACrB;AACD,QAAM,QAAQ;AACd,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,GAAG;AACtC,UAAM,IAAI,MAAM,CAAC;AACjB,UAAM,IAAI,IAAI,IAAI,MAAM,SAAS,MAAM,IAAI,CAAC,IAAI;AAChD,UAAM,IAAI,IAAI,IAAI,MAAM,SAAS,MAAM,IAAI,CAAC,IAAI;AAChD,cAAU,MAAM,KAAK,CAAC;AACtB,cAAU,OAAQ,IAAI,MAAM,IAAM,KAAK,CAAE;AACzC,cAAU,IAAI,IAAI,MAAM,SAAS,OAAQ,IAAI,OAAO,IAAM,KAAK,CAAE,IAAI;AACrE,cAAU,IAAI,IAAI,MAAM,SAAS,MAAM,IAAI,EAAE,IAAI;AAAA,EACpD;AACD,SAAO;AACX;AAEO,SAAS,aAAa,KAAK;AAC9B,QAAM,aAAa,OAAO,OAAO,EAAE,EAAE,KAAM;AAC3C,MAAI,CAAC;AAAY,WAAO;AACxB,QAAM,SAAS,cAAc,YAAY,UAAU,CAAC;AACpD,SAAO,6BAA6B,MAAM;AAC9C;;"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"version":3,"file":"treeSpecies.js","sources":["tongji/utils/treeSpecies.js"],"sourcesContent":["import { TREE_LEVELS, TREE_MAX_LEVEL, TREE_XP_PER_LEVEL } from './treeLevels.js'\r\n\r\n/** 可选树种:每级 emoji 与 treeLevels.js Lv.09 一一对应 */\r\nexport const TREE_SPECIES_LIST = [\r\n {\r\n id: 'classic',\r\n name: '稳糖灵树',\r\n tagline: '经典路线,从种子到圆满',\r\n stages: TREE_LEVELS.map((l) => l.emoji)\r\n },\r\n {\r\n id: 'bonsai',\r\n name: '雅韵盆景',\r\n tagline: '小巧精致,书桌旁的温柔陪伴',\r\n stages: ['🫘', '🌱', '🪴', '🎋', '🪴', '🌳', '🎍', '🌸', '🏵️', '🏆']\r\n },\r\n {\r\n id: 'pine',\r\n name: '苍劲青松',\r\n tagline: '挺拔向上,越记越稳',\r\n stages: ['🫘', '🌱', '🌿', '🌲', '🌲', '🌲', '⛰️', '🌲', '🏔️', '🏆']\r\n },\r\n {\r\n id: 'sakura',\r\n name: '樱花小树',\r\n tagline: '坚持打卡,枝头渐开',\r\n stages: ['🫘', '🌱', '🌿', '🌳', '🌸', '🌸', '🌸', '🌸', '🌺', '🏆']\r\n },\r\n {\r\n id: 'ginkgo',\r\n name: '金秋银杏',\r\n tagline: '叶色渐变,见证每一天',\r\n stages: ['🫘', '🌱', '🍃', '🌳', '🍂', '🍂', '🌳', '🍁', '🌟', '🏆']\r\n }\r\n]\r\n\r\nexport const TREE_SPECIES_STORAGE_KEY = 'tongji_tree_species_v1'\r\n\r\n/** 四项任务全勤时每日最多可领积分(与后端 taskDefs 一致) */\r\nexport const DAILY_MAX_TASK_POINTS = 40\r\n\r\nexport function getTreeSpecies(id) {\r\n return TREE_SPECIES_LIST.find((s) => s.id === id) || TREE_SPECIES_LIST[0]\r\n}\r\n\r\nexport function speciesEmojiAtLevel(speciesId, level) {\r\n const sp = getTreeSpecies(speciesId)\r\n const lv = Math.min(TREE_MAX_LEVEL, Math.max(0, Number(level) || 0))\r\n return sp.stages[lv] || sp.stages[0] || '🌱'\r\n}\r\n\r\n/** 当前树种成长路线图(供选择面板展示) */\r\nexport function speciesGrowthRoadmap(speciesId) {\r\n const sp = getTreeSpecies(speciesId)\r\n return TREE_LEVELS.map((meta, i) => {\r\n const xpTotal = i * TREE_XP_PER_LEVEL\r\n const daysHint = i === 0\r\n ? 0\r\n : Math.max(1, Math.ceil(xpTotal / DAILY_MAX_TASK_POINTS))\r\n return {\r\n level: i,\r\n name: meta.name,\r\n emoji: sp.stages[i] || meta.emoji,\r\n desc: meta.desc,\r\n xpTotal,\r\n daysHint\r\n }\r\n })\r\n}\r\n\r\n/** 全勤打卡大约多少天满级 */\r\nexport function estimateDaysToMaxLevel() {\r\n const totalXp = TREE_MAX_LEVEL * TREE_XP_PER_LEVEL\r\n return Math.max(1, Math.ceil(totalXp / DAILY_MAX_TASK_POINTS))\r\n}\r\n"],"names":["TREE_LEVELS","TREE_MAX_LEVEL","TREE_XP_PER_LEVEL"],"mappings":";;AAGY,MAAC,oBAAoB;AAAA,EAC7B;AAAA,IACI,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQA,wBAAW,YAAC,IAAI,CAAC,MAAM,EAAE,KAAK;AAAA,EACzC;AAAA,EACD;AAAA,IACI,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,OAAO,IAAI;AAAA,EACvE;AAAA,EACD;AAAA,IACI,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,OAAO,IAAI;AAAA,EACvE;AAAA,EACD;AAAA,IACI,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,IAAI;AAAA,EACtE;AAAA,EACD;AAAA,IACI,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,IAAI;AAAA,EACtE;AACL;AAKO,MAAM,wBAAwB;AAE9B,SAAS,eAAe,IAAI;AAC/B,SAAO,kBAAkB,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,kBAAkB,CAAC;AAC5E;AAEO,SAAS,oBAAoB,WAAW,OAAO;AAClD,QAAM,KAAK,eAAe,SAAS;AACnC,QAAM,KAAK,KAAK,IAAIC,wBAAc,gBAAE,KAAK,IAAI,GAAG,OAAO,KAAK,KAAK,CAAC,CAAC;AACnE,SAAO,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK;AAC5C;AAGO,SAAS,qBAAqB,WAAW;AAC5C,QAAM,KAAK,eAAe,SAAS;AACnC,SAAOD,oCAAY,IAAI,CAAC,MAAM,MAAM;AAChC,UAAM,UAAU,IAAIE,wBAAiB;AACrC,UAAM,WAAW,MAAM,IACjB,IACA,KAAK,IAAI,GAAG,KAAK,KAAK,UAAU,qBAAqB,CAAC;AAC5D,WAAO;AAAA,MACH,OAAO;AAAA,MACP,MAAM,KAAK;AAAA,MACX,OAAO,GAAG,OAAO,CAAC,KAAK,KAAK;AAAA,MAC5B,MAAM,KAAK;AAAA,MACX;AAAA,MACA;AAAA,IACH;AAAA,EACT,CAAK;AACL;AAGO,SAAS,yBAAyB;AACrC,QAAM,UAAUD,wBAAAA,iBAAiBC,wBAAiB;AAClD,SAAO,KAAK,IAAI,GAAG,KAAK,KAAK,UAAU,qBAAqB,CAAC;AACjE;;;;;;"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"version":3,"file":"uni-icons.js","sources":["uni_modules/uni-icons/components/uni-icons/uni-icons.vue","../../../soft/HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDovd2ViL3p5dC9Ub25namlVbmlBcHAvdW5pX21vZHVsZXMvdW5pLWljb25zL2NvbXBvbmVudHMvdW5pLWljb25zL3VuaS1pY29ucy52dWU"],"sourcesContent":["<template>\r\n\t<!-- #ifdef APP-NVUE -->\r\n\t<text :style=\"styleObj\" class=\"uni-icons\" @click=\"_onClick\">{{unicode}}</text>\r\n\t<!-- #endif -->\r\n\t<!-- #ifndef APP-NVUE -->\r\n\t<text :style=\"styleObj\" class=\"uni-icons\" :class=\"['uniui-'+type,customPrefix,customPrefix?type:'']\" @click=\"_onClick\">\r\n\t\t<slot></slot>\r\n\t</text>\r\n\t<!-- #endif -->\r\n</template>\r\n\r\n<script>\r\n\timport { fontData } from './uniicons_file_vue.js';\r\n\r\n\tconst getVal = (val) => {\r\n\t\tconst reg = /^[0-9]*$/g\r\n\t\treturn (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;\r\n\t}\r\n\r\n\t// #ifdef APP-NVUE\r\n\tvar domModule = weex.requireModule('dom');\r\n\timport iconUrl from './uniicons.ttf'\r\n\tdomModule.addRule('fontFace', {\r\n\t\t'fontFamily': \"uniicons\",\r\n\t\t'src': \"url('\" + iconUrl + \"')\"\r\n\t});\r\n\t// #endif\r\n\r\n\t/**\r\n\t * Icons 图标\r\n\t * @description 用于展示 icons 图标\r\n\t * @tutorial https://ext.dcloud.net.cn/plugin?id=28\r\n\t * @property {Number} size 图标大小\r\n\t * @property {String} type 图标图案,参考示例\r\n\t * @property {String} color 图标颜色\r\n\t * @property {String} customPrefix 自定义图标\r\n\t * @event {Function} click 点击 Icon 触发事件\r\n\t */\r\n\texport default {\r\n\t\tname: 'UniIcons',\r\n\t\temits: ['click'],\r\n\t\tprops: {\r\n\t\t\ttype: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: ''\r\n\t\t\t},\r\n\t\t\tcolor: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: '#333333'\r\n\t\t\t},\r\n\t\t\tsize: {\r\n\t\t\t\ttype: [Number, String],\r\n\t\t\t\tdefault: 16\r\n\t\t\t},\r\n\t\t\tcustomPrefix: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: ''\r\n\t\t\t},\r\n\t\t\tfontFamily: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: ''\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\ticons: fontData\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: {\r\n\t\t\tunicode() {\r\n\t\t\t\tlet code = this.icons.find(v => v.font_class === this.type)\r\n\t\t\t\tif (code) {\r\n\t\t\t\t\treturn code.unicode\r\n\t\t\t\t}\r\n\t\t\t\treturn ''\r\n\t\t\t},\r\n\t\t\ticonSize() {\r\n\t\t\t\treturn getVal(this.size)\r\n\t\t\t},\r\n\t\t\tstyleObj() {\r\n\t\t\t\tif (this.fontFamily !== '') {\r\n\t\t\t\t\treturn `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`\r\n\t\t\t\t}\r\n\t\t\t\treturn `color: ${this.color}; font-size: ${this.iconSize};`\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t_onClick() {\r\n\t\t\t\tthis.$emit('click')\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\t/* #ifndef APP-NVUE */\r\n\t@import './uniicons.css';\r\n\r\n\t@font-face {\r\n\t\tfont-family: uniicons;\r\n\t\tsrc: url('./uniicons.ttf');\r\n\t}\r\n\r\n\t/* #endif */\r\n\t.uni-icons {\r\n\t\tfont-family: uniicons;\r\n\t\ttext-decoration: none;\r\n\t\ttext-align: center;\r\n\t}\r\n</style>\n","import Component from 'D:/web/zyt/TongjiUniApp/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'\nwx.createComponent(Component)"],"names":["fontData"],"mappings":";;;AAcC,MAAM,SAAS,CAAC,QAAQ;AACvB,QAAM,MAAM;AACZ,SAAQ,OAAO,QAAQ,YAAY,IAAI,KAAK,GAAG,IAAK,MAAM,OAAO;AAClE;AAqBA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACN,MAAM;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA,IACD,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA,IACD,MAAM;AAAA,MACL,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACT;AAAA,IACD,cAAc;AAAA,MACb,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA,IACD,YAAY;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACA;AAAA,EACD,OAAO;AACN,WAAO;AAAA,MACN,OAAOA,2DAAO;AAAA,IACf;AAAA,EACA;AAAA,EACD,UAAU;AAAA,IACT,UAAU;AACT,UAAI,OAAO,KAAK,MAAM,KAAK,OAAK,EAAE,eAAe,KAAK,IAAI;AAC1D,UAAI,MAAM;AACT,eAAO,KAAK;AAAA,MACb;AACA,aAAO;AAAA,IACP;AAAA,IACD,WAAW;AACV,aAAO,OAAO,KAAK,IAAI;AAAA,IACvB;AAAA,IACD,WAAW;AACV,UAAI,KAAK,eAAe,IAAI;AAC3B,eAAO,UAAU,KAAK,KAAK,gBAAgB,KAAK,QAAQ,kBAAkB,KAAK,UAAU;AAAA,MAC1F;AACA,aAAO,UAAU,KAAK,KAAK,gBAAgB,KAAK,QAAQ;AAAA,IACzD;AAAA,EACA;AAAA,EACD,SAAS;AAAA,IACR,WAAW;AACV,WAAK,MAAM,OAAO;AAAA,IACnB;AAAA,EACD;AACD;;;;;;;;;;;AC1FD,GAAG,gBAAgB,SAAS;"}
+165
View File
@@ -0,0 +1,165 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
if (!Math) {
"./tongji/pages/weekly.js";
"./pages/user/user.js";
"./pages/user/userinfo.js";
"./pages/Card/Card.js";
"./pages/Card/edit_card.js";
"./pages/Card/contact.js";
"./tongji/pages/index.js";
"./tongji/pages/more.js";
"./tongji/endless-game/index.js";
"./training/pages/grip-ring.js";
"./training/pages/pilates-ring.js";
"./training/pages/foot-pedal.js";
"./training/pages/dumbbell.js";
"./training/pages/metronome.js";
}
const _sfc_main = {
__name: "App",
setup(__props) {
const { proxy } = common_vendor.getCurrentInstance();
common_vendor.onLaunch(() => {
try {
common_vendor.index.setInnerAudioOption({
obeyMuteSwitch: false,
mixWithOther: true
});
} catch (e) {
common_vendor.index.__f__("warn", "at App.vue:16", "setInnerAudioOption failed:", e);
}
common_vendor.index.login({
provider: "weixin",
success: function(loginRes) {
if (common_vendor.index.getStorageSync("token")) {
userinfo(loginRes.code);
} else {
wxcode(loginRes.code);
}
}
});
});
const wxcode = async (code) => {
try {
const res = await proxy.apiUrl(
{
url: "/api/login/mnpLogin",
method: "POST",
data: {
code
}
},
false
);
if (res && res.data && res.data.token) {
common_vendor.index.setStorageSync("token", res.data.token);
common_vendor.index.setStorageSync("userData", res.data);
}
} catch (err) {
}
};
const userinfo = async (code) => {
try {
const res = await proxy.apiUrl(
{
url: "/api/user/info",
method: "POST"
},
false
);
if (res.code == -1) {
wxcode(code);
return;
}
if (res && res.data) {
common_vendor.index.setStorageSync("userData", res.data);
}
} catch (err) {
}
};
return () => {
};
}
};
var baseUrl = "https://admin.zhenyangtang.com.cn/";
function joinApiUrl(base, path) {
const b = String(base || "").replace(/\/+$/, "");
const p = String(path || "").replace(/^\/+/, "");
return p ? `${b}/${p}` : b;
}
function apiUrl(promise, Loading = true) {
const token = common_vendor.index.getStorageSync("token");
const header = {
token,
"content-type": "application/x-www-form-urlencoded",
...promise.header || {}
};
const data = promise.data || {};
const url = joinApiUrl(baseUrl, promise.url || "");
return new Promise((resolve, reject) => {
if (Loading) {
common_vendor.index.showLoading({ title: "加载中...", mask: true });
}
common_vendor.index.request({
url,
data,
timeout: promise.timeout != null ? promise.timeout : 15e3,
method: promise.method || "POST",
header,
sslVerify: false,
success: (res) => {
const data2 = res.data;
if (data2.code === -1) {
common_vendor.index.removeStorageSync("token");
}
resolve(data2);
},
fail: (e) => {
reject(e);
},
complete: (e) => {
if (Loading) {
common_vendor.index.hideLoading();
}
}
});
});
}
function parsePageParams(options) {
const params = {};
if (!options)
return params;
if (options.scene) {
try {
const decodedScene = decodeURIComponent(options.scene);
decodedScene.split("&").forEach((item) => {
const [key, value] = item.split("=");
if (key && value) {
params[key] = value;
}
});
} catch (error) {
common_vendor.index.__f__("error", "at main.js:126", "解析scene参数失败:", error);
}
}
Object.keys(options).forEach((key) => {
if (key !== "scene" && options[key]) {
params[key] = options[key];
}
});
return params;
}
function createApp() {
const app = common_vendor.createSSRApp(_sfc_main);
app.config.globalProperties.$url = baseUrl;
app.config.globalProperties.apiUrl = apiUrl;
app.config.globalProperties.$parsePageParams = parsePageParams;
return {
app
};
}
createApp().app.mount("#app");
exports.createApp = createApp;
//# sourceMappingURL=../.sourcemap/mp-weixin/app.js.map
+42
View File
@@ -0,0 +1,42 @@
{
"pages": [
"tongji/pages/weekly",
"pages/user/user",
"pages/user/userinfo",
"pages/Card/Card",
"pages/Card/edit_card",
"pages/Card/contact",
"tongji/pages/index",
"tongji/pages/more",
"tongji/endless-game/index"
],
"subPackages": [
{
"root": "training",
"pages": [
"pages/grip-ring",
"pages/pilates-ring",
"pages/foot-pedal",
"pages/dumbbell",
"pages/metronome"
]
}
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "甄养堂血糖管理",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"lazyCodeLoading": "requiredComponents",
"requiredBackgroundModes": [
"audio"
],
"plugins": {
"WechatSI": {
"version": "0.3.5",
"provider": "wx069ba97219f66d99"
}
},
"usingComponents": {}
}
+7
View File
@@ -0,0 +1,7 @@
/* 全局基础 */
page {
background-color: #f4fbf4;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
sans-serif;
}
page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,40 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const color = "#8a8a8a";
const activeColor = "#204e2b";
const _sfc_main = {
__name: "tab-bar-dock",
props: {
/** 0 血糖 1 我的 */
active: {
type: Number,
default: 0
}
},
setup(__props) {
const props = __props;
function goUser() {
if (props.active === 1)
return;
common_vendor.index.redirectTo({ url: "/pages/user/user" });
}
function goWeekly() {
if (props.active === 0)
return;
common_vendor.index.redirectTo({ url: "/tongji/pages/weekly" });
}
return (_ctx, _cache) => {
return {
a: __props.active === 0 ? 1 : "",
b: __props.active === 0 ? activeColor : color,
c: common_vendor.o(goWeekly, "40"),
d: __props.active === 1 ? "/static/user/user_no.png" : "/static/user/user.png",
e: __props.active === 1 ? activeColor : color,
f: common_vendor.o(goUser, "79")
};
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c3efacf5"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/app-tab-bar/tab-bar-dock.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="tab-dock data-v-c3efacf5"><view class="tab-dock__inner data-v-c3efacf5"><view class="tab-dock__item tab-dock__item--center data-v-c3efacf5" bindtap="{{c}}"><view class="{{['tab-dock__fab', 'data-v-c3efacf5', a && 'tab-dock__fab--active']}}"><text class="tab-dock__fab-text data-v-c3efacf5">糖</text></view><text class="tab-dock__label tab-dock__label--center data-v-c3efacf5" style="{{'color:' + b}}">血糖</text></view><view class="tab-dock__item data-v-c3efacf5" bindtap="{{f}}"><image class="tab-dock__icon data-v-c3efacf5" src="{{d}}" mode="aspectFit"/><text class="tab-dock__label data-v-c3efacf5" style="{{'color:' + e}}">我的</text></view></view><view class="tab-dock__safe data-v-c3efacf5"/></view>
@@ -0,0 +1,90 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.tab-dock.data-v-c3efacf5 {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
background: #ffffff;
border-top: 1rpx solid rgba(0, 0, 0, 0.06);
box-shadow: 0 -6rpx 20rpx rgba(0, 0, 0, 0.04);
}
.tab-dock__inner.data-v-c3efacf5 {
display: flex;
align-items: flex-end;
height: 100rpx;
}
.tab-dock__item.data-v-c3efacf5 {
flex: 1;
height: 100rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.tab-dock__item--center.data-v-c3efacf5 {
justify-content: flex-end;
padding-bottom: 6rpx;
}
.tab-dock__icon.data-v-c3efacf5 {
width: 46rpx;
height: 46rpx;
}
.tab-dock__label.data-v-c3efacf5 {
margin-top: 6rpx;
font-size: 22rpx;
line-height: 1.2;
}
.tab-dock__label--center.data-v-c3efacf5 {
margin-top: 8rpx;
}
.tab-dock__fab.data-v-c3efacf5 {
width: 96rpx;
height: 96rpx;
margin-top: -48rpx;
border-radius: 50%;
background: linear-gradient(180deg, #2d7340 0%, #204e2b 100%);
border: 6rpx solid #ffffff;
box-shadow: 0 10rpx 24rpx rgba(32, 78, 43, 0.35);
display: flex;
align-items: center;
justify-content: center;
}
.tab-dock__fab--active.data-v-c3efacf5 {
transform: scale(1.04);
box-shadow: 0 12rpx 28rpx rgba(32, 78, 43, 0.42);
}
.tab-dock__fab-text.data-v-c3efacf5 {
color: #ffffff;
font-size: 38rpx;
font-weight: 700;
line-height: 1;
}
.tab-dock__safe.data-v-c3efacf5 {
height: env(safe-area-inset-bottom);
background: #ffffff;
}
@@ -0,0 +1,89 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
props: {
bottom: { default: 200 },
inline: { type: Boolean, default: false },
tone: { default: "default" }
},
setup(__props) {
const trainingItems = [
{ url: "/training/pages/dumbbell", title: "哑铃", sub: "力量塑形", icon: "dumbbell", iconClass: "menu-icon--dumbbell" },
{ url: "/training/pages/foot-pedal", title: "脚蹬器", sub: "下肢有氧", icon: "pedal", iconClass: "menu-icon--pedal" },
{ url: "/training/pages/pilates-ring", title: "瑜伽环", sub: "核心塑形", icon: "pilates", iconClass: "menu-icon--pilates" },
{ url: "/training/pages/grip-ring", title: "握力环", sub: "握力训练", icon: "grip", iconClass: "menu-icon--grip" },
{ url: "/training/pages/metronome", title: "耗糖节拍器", sub: "健走配速", icon: "metro", iconClass: "menu-icon--metro", featured: true }
];
const props = __props;
const inlineItems = common_vendor.computed(() => {
if (props.tone !== "weekly")
return trainingItems;
const metro = trainingItems.find((i) => i.icon === "metro");
const rest = trainingItems.filter((i) => i.icon !== "metro");
return metro ? [metro, ...rest] : trainingItems;
});
const visible = common_vendor.ref(true);
const expanded = common_vendor.ref(false);
const toggle = () => {
expanded.value = !expanded.value;
};
const goto = (url) => {
expanded.value = false;
common_vendor.index.navigateTo({ url });
};
return (_ctx, _cache) => {
return common_vendor.e({
a: visible.value && props.inline
}, visible.value && props.inline ? common_vendor.e({
b: props.tone === "weekly"
}, props.tone === "weekly" ? {} : {}, {
c: common_vendor.f(inlineItems.value, (item, k0, i0) => {
return common_vendor.e({
a: item.featured
}, item.featured ? {} : {}, {
b: item.icon === "dumbbell"
}, item.icon === "dumbbell" ? {} : item.icon === "pedal" ? {} : item.icon === "pilates" ? {} : item.icon === "grip" ? {} : item.icon === "metro" ? {} : {}, {
c: item.icon === "pedal",
d: item.icon === "pilates",
e: item.icon === "grip",
f: item.icon === "metro",
g: common_vendor.n(item.iconClass),
h: common_vendor.t(item.title),
i: common_vendor.t(item.sub),
j: item.url,
k: common_vendor.o(($event) => goto(item.url), item.url)
});
}),
d: props.tone === "weekly"
}, props.tone === "weekly" ? {} : {}, {
e: props.tone === "weekly" ? 1 : ""
}) : visible.value ? common_vendor.e({
g: expanded.value
}, expanded.value ? {
h: common_vendor.o(($event) => goto("/training/pages/dumbbell"), "fd"),
i: common_vendor.o(($event) => goto("/training/pages/foot-pedal"), "a5"),
j: common_vendor.o(($event) => goto("/training/pages/pilates-ring"), "3f"),
k: common_vendor.o(($event) => goto("/training/pages/grip-ring"), "23"),
l: common_vendor.o(($event) => goto("/training/pages/metronome"), "ca"),
m: common_vendor.o(() => {
}, "26")
} : {}, {
n: !expanded.value
}, !expanded.value ? {} : {}, {
o: !expanded.value
}, !expanded.value ? {} : {}, {
p: expanded.value
}, expanded.value ? {} : {}, {
q: expanded.value ? 1 : "",
r: common_vendor.o(toggle, "98"),
s: props.bottom + "rpx"
}) : {}, {
f: visible.value
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-17534d15"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/dev-training-entry/index.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,489 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.dev-entry-wrap.data-v-17534d15 {
position: fixed;
right: 24rpx;
z-index: 999;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 18rpx;
}
/* ============================================================
* 主浮动按钮
* ============================================================ */
.fab-container.data-v-17534d15 {
position: relative;
width: 108rpx;
height: 108rpx;
}
.entry-fab.data-v-17534d15 {
position: absolute;
inset: 0;
border-radius: 50%;
background: linear-gradient(140deg, #34d399 0%, #047857 100%);
box-shadow: 0 8rpx 20rpx rgba(16, 185, 129, 0.42), 0 2rpx 6rpx rgba(15, 23, 42, 0.12), inset 0 -8rpx 16rpx rgba(0, 0, 0, 0.12), inset 0 8rpx 16rpx rgba(255, 255, 255, 0.18);
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}
.entry-fab.data-v-17534d15:active {
transform: scale(0.92);
}
.entry-fab.expanded.data-v-17534d15 {
background: linear-gradient(140deg, #94a3b8 0%, #475569 100%);
transform: rotate(135deg);
box-shadow: 0 6rpx 16rpx rgba(15, 23, 42, 0.2), inset 0 -6rpx 14rpx rgba(0, 0, 0, 0.12), inset 0 6rpx 14rpx rgba(255, 255, 255, 0.12);
}
.entry-fab .fab-icon.data-v-17534d15 {
width: 60rpx;
height: 60rpx;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='2,12 7,12 9.5,7 12,17 14.5,9 16.5,12 22,12'/></svg>");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
filter: drop-shadow(0 2rpx 6rpx rgba(0, 0, 0, 0.22));
animation: fab-icon-beat-17534d15 1.6s ease-in-out infinite;
}
@keyframes fab-icon-beat-17534d15 {
0%, 60%, 100% {
transform: scale(1);
}
20% {
transform: scale(1.12);
}
40% {
transform: scale(1);
}
}
/* 关闭态 X 图标 (CSS 几何) */
.icon-close.data-v-17534d15 {
position: relative;
width: 36rpx;
height: 36rpx;
}
.icon-close .cross-bar.data-v-17534d15 {
position: absolute;
top: 50%;
left: 0;
width: 100%;
height: 5rpx;
background: #fff;
border-radius: 3rpx;
transform-origin: center;
}
.icon-close .bar-1.data-v-17534d15 {
transform: translateY(-50%) rotate(45deg);
}
.icon-close .bar-2.data-v-17534d15 {
transform: translateY(-50%) rotate(-45deg);
}
/* 呼吸光环(2 圈错相位扩散) */
.fab-pulse.data-v-17534d15 {
position: absolute;
inset: 0;
border-radius: 50%;
background: rgba(16, 185, 129, 0.25);
animation: fab-ring-17534d15 2.4s ease-out infinite;
pointer-events: none;
}
.fab-pulse-2.data-v-17534d15 {
animation-delay: 1.2s;
}
@keyframes fab-ring-17534d15 {
0% {
transform: scale(0.95);
opacity: 0.7;
}
100% {
transform: scale(1.55);
opacity: 0;
}
}
/* ============================================================
* 展开菜单
* ============================================================ */
.menu-list.data-v-17534d15 {
display: flex;
flex-direction: column;
gap: 14rpx;
animation: slide-up-17534d15 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slide-up-17534d15 {
from {
opacity: 0;
transform: translateY(20rpx) scale(0.92);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.menu-item.data-v-17534d15 {
display: flex;
align-items: center;
gap: 16rpx;
background: rgba(255, 255, 255, 0.96);
padding: 14rpx 20rpx 14rpx 14rpx;
border-radius: 999rpx;
box-shadow: 0 8rpx 24rpx rgba(15, 23, 42, 0.1), 0 1rpx 2rpx rgba(15, 23, 42, 0.06);
min-width: 280rpx;
transition: transform 0.15s;
-webkit-backdrop-filter: blur(12rpx);
backdrop-filter: blur(12rpx);
}
.menu-item.data-v-17534d15:active {
transform: scale(0.97);
background: #f0fdf4;
}
.menu-icon.data-v-17534d15 {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
box-shadow: 0 2rpx 8rpx rgba(16, 185, 129, 0.32);
}
.menu-icon--train.data-v-17534d15 {
background: linear-gradient(140deg, #34d399, #047857);
}
.menu-icon--dumbbell.data-v-17534d15 {
background: linear-gradient(140deg, #93c5fd, #3b82f6);
box-shadow: 0 2rpx 8rpx rgba(59, 130, 246, 0.36);
}
.menu-icon--pedal.data-v-17534d15 {
background: linear-gradient(140deg, #fdba74, #f97316);
box-shadow: 0 2rpx 8rpx rgba(249, 115, 22, 0.36);
}
.menu-icon--pilates.data-v-17534d15 {
background: linear-gradient(140deg, #c4b5fd, #8b5cf6);
box-shadow: 0 2rpx 8rpx rgba(139, 92, 246, 0.36);
}
.menu-icon--grip.data-v-17534d15 {
background: linear-gradient(140deg, #5eead4, #14b8a6);
box-shadow: 0 2rpx 8rpx rgba(20, 184, 166, 0.36);
}
.menu-icon--metro.data-v-17534d15 {
background: linear-gradient(140deg, #fbbf24, #d97706);
box-shadow: 0 2rpx 8rpx rgba(245, 158, 11, 0.36);
gap: 4rpx;
}
.menu-icon-text.data-v-17534d15 {
font-size: 32rpx;
line-height: 1;
}
/* 哑铃小 icon */
.dumbbell-shape.data-v-17534d15 {
width: 40rpx;
height: 20rpx;
display: flex;
align-items: center;
justify-content: center;
}
.dumbbell-plate.data-v-17534d15 {
width: 10rpx;
height: 18rpx;
background: #fff;
border-radius: 3rpx;
box-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.18);
}
.dumbbell-bar.data-v-17534d15 {
width: 16rpx;
height: 5rpx;
background: #fff;
border-radius: 2rpx;
margin: 0 2rpx;
box-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.18);
}
/* 脚蹬器小 icon: 左右踏板 */
.foot-pedal-shape.data-v-17534d15 {
width: 40rpx;
height: 28rpx;
display: flex;
align-items: flex-end;
justify-content: center;
gap: 6rpx;
}
.pedal-bar.data-v-17534d15 {
width: 14rpx;
background: #fff;
border-radius: 4rpx 4rpx 2rpx 2rpx;
box-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.18);
}
.pedal-bar-left.data-v-17534d15 {
height: 18rpx;
transform: rotate(-12deg);
}
.pedal-bar-right.data-v-17534d15 {
height: 22rpx;
transform: rotate(12deg);
}
/* 瑜伽环小 icon: 双弧阻力环 */
.pilates-ring-shape.data-v-17534d15 {
width: 36rpx;
height: 36rpx;
border-radius: 50%;
border: 5rpx solid #fff;
position: relative;
box-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.18), inset 0 1rpx 2rpx rgba(255, 255, 255, 0.6);
}
.pilates-ring-shape.data-v-17534d15::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 18rpx;
height: 18rpx;
transform: translate(-50%, -50%);
border-radius: 50%;
border: 3rpx solid rgba(255, 255, 255, 0.85);
}
/* 握力环小 icon: 白色描边的环(甜甜圈) */
.grip-ring-shape.data-v-17534d15 {
width: 32rpx;
height: 32rpx;
border-radius: 50%;
border: 7rpx solid #fff;
box-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.18), inset 0 1rpx 2rpx rgba(255, 255, 255, 0.6);
}
/* 节拍器小 icon: 3 根高低柱模拟均衡器/节拍 */
.metro-bar.data-v-17534d15 {
width: 4rpx;
background: #fff;
border-radius: 2rpx;
box-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.18);
}
.metro-bar-1.data-v-17534d15 {
height: 16rpx;
}
.metro-bar-2.data-v-17534d15 {
height: 28rpx;
}
.metro-bar-3.data-v-17534d15 {
height: 22rpx;
}
.menu-info.data-v-17534d15 {
display: flex;
flex-direction: column;
gap: 2rpx;
flex: 1;
}
.menu-title.data-v-17534d15 {
font-size: 28rpx;
color: #0f172a;
font-weight: 700;
letter-spacing: 1rpx;
}
.menu-sub.data-v-17534d15 {
font-size: 20rpx;
color: #94a3b8;
letter-spacing: 0.5rpx;
}
.menu-arrow.data-v-17534d15 {
font-size: 32rpx;
color: #cbd5e1;
font-weight: 300;
line-height: 1;
margin-left: 4rpx;
}
.menu-icon--metro-inner.data-v-17534d15 {
display: flex;
align-items: flex-end;
justify-content: center;
gap: 4rpx;
width: 100%;
height: 100%;
}
/* ============================================================
* 内嵌模块(weekly 等)
* ============================================================ */
.dev-entry-inline.data-v-17534d15 {
width: 100%;
box-sizing: border-box;
}
.dev-entry-inline--weekly.data-v-17534d15 {
padding: 32rpx 28rpx 24rpx;
border-radius: 48rpx;
background: var(--surface-container-lowest, #fff);
border: 1rpx solid rgba(0, 108, 73, 0.12);
box-shadow: 0 24rpx 60rpx -20rpx rgba(0, 108, 73, 0.08), 0 8rpx 20rpx -8rpx rgba(0, 0, 0, 0.03);
}
.inline-hero.data-v-17534d15 {
display: flex;
align-items: center;
gap: 20rpx;
margin-bottom: 24rpx;
}
.inline-hero-icon.data-v-17534d15 {
width: 88rpx;
height: 88rpx;
border-radius: 24rpx;
background: rgba(0, 108, 73, 0.1);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.inline-hero-wave.data-v-17534d15 {
width: 52rpx;
height: 52rpx;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23006c49' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='2,12 7,12 9.5,7 12,17 14.5,9 16.5,12 22,12'/></svg>");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
.inline-hero-text.data-v-17534d15 {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 6rpx;
}
.inline-hero-title-row.data-v-17534d15 {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10rpx;
}
.inline-title.data-v-17534d15 {
font-size: 32rpx;
font-weight: 700;
color: #0f172a;
line-height: 1.25;
}
.inline-pill.data-v-17534d15 {
font-size: 20rpx;
font-weight: 700;
color: #006c49;
padding: 4rpx 12rpx;
border-radius: 999rpx;
background: rgba(0, 108, 73, 0.1);
line-height: 1.2;
}
.inline-sub.data-v-17534d15 {
font-size: 26rpx;
font-weight: 500;
color: #475569;
line-height: 1.4;
}
.inline-scroll.data-v-17534d15 {
width: 100%;
white-space: nowrap;
}
.inline-scroll-track.data-v-17534d15 {
display: inline-flex;
flex-direction: row;
align-items: stretch;
gap: 16rpx;
padding: 4rpx 2rpx 8rpx;
}
.inline-card.data-v-17534d15 {
position: relative;
display: inline-flex;
flex-direction: column;
align-items: flex-start;
width: 212rpx;
min-height: 220rpx;
padding: 20rpx 18rpx 18rpx;
border-radius: 28rpx;
background: #f4f7f5;
border: 1rpx solid rgba(0, 108, 73, 0.1);
box-sizing: border-box;
flex-shrink: 0;
transition: transform 0.2s ease, background 0.2s ease;
}
.inline-card.data-v-17534d15:active {
transform: scale(0.98);
background: #e8f3ee;
}
.inline-card .menu-icon.data-v-17534d15 {
width: 72rpx;
height: 72rpx;
margin-bottom: 14rpx;
flex-shrink: 0;
}
.inline-card-badge.data-v-17534d15 {
position: absolute;
top: 12rpx;
right: 12rpx;
padding: 4rpx 10rpx;
border-radius: 8rpx;
background: #006c49;
}
.inline-card-badge text.data-v-17534d15 {
font-size: 18rpx;
font-weight: 700;
color: #fff;
line-height: 1.2;
}
.inline-card-title.data-v-17534d15 {
font-size: 28rpx;
font-weight: 700;
color: #0f172a;
line-height: 1.25;
width: 100%;
}
.inline-card-sub.data-v-17534d15 {
margin-top: 6rpx;
font-size: 22rpx;
font-weight: 500;
color: #64748b;
line-height: 1.35;
width: 100%;
}
.inline-card-go.data-v-17534d15 {
margin-top: auto;
padding-top: 12rpx;
font-size: 22rpx;
font-weight: 700;
color: #006c49;
line-height: 1.2;
}
.inline-scroll-hint.data-v-17534d15 {
display: block;
margin-top: 14rpx;
font-size: 22rpx;
font-weight: 600;
color: #94a3b8;
text-align: center;
line-height: 1.35;
}
@media (prefers-reduced-motion: reduce) {
.inline-card.data-v-17534d15:active {
transform: none;
}
}
@@ -0,0 +1,150 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
_easycom_uni_icons2();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
if (!Math) {
_easycom_uni_icons();
}
const _sfc_main = {
__name: "Card",
setup(__props) {
const { proxy } = common_vendor.getCurrentInstance();
const cardList = common_vendor.ref([]);
const loading = common_vendor.ref(false);
common_vendor.onMounted(() => {
loadCardList();
});
common_vendor.onShow(() => {
loadCardList();
});
const loadCardList = async () => {
var _a;
loading.value = true;
try {
const token = common_vendor.index.getStorageSync("token");
if (!token) {
common_vendor.index.showToast({ title: "请先登录", icon: "none" });
return;
}
const userData = common_vendor.index.getStorageSync("userData");
const patientId = (_a = userData == null ? void 0 : userData.diagnosis) == null ? void 0 : _a.patient_id;
if (!patientId) {
return;
}
const res = await proxy.apiUrl({
url: "/api/tcm/getCardList",
method: "GET",
data: {
patient_id: patientId
}
});
if (res.code === 1) {
cardList.value = res.data || [];
} else {
common_vendor.index.showToast({ title: res.msg || "获取失败", icon: "none" });
}
} catch (err) {
common_vendor.index.__f__("error", "at pages/Card/Card.vue:139", "加载就诊卡列表失败:", err);
} finally {
loading.value = false;
}
};
const viewCardDetail = (card) => {
common_vendor.index.navigateTo({
url: `/pages/Card/edit_card?id=${card.id}`
});
};
const viewDailyRecord = (card) => {
const url = `/tongji/pages/index?diagnosis_id=${card.id}&patient_id=${card.patient_id || ""}&patient_name=${encodeURIComponent(card.patient_name || "")}&age=${card.age || ""}&gender=${card.gender || ""}`;
common_vendor.index.navigateTo({ url });
};
const createCard = () => {
const token = common_vendor.index.getStorageSync("token");
if (!token) {
common_vendor.index.showToast({ title: "请先登录", icon: "none" });
return;
}
common_vendor.index.navigateTo({
url: "/pages/Card/edit_card?add=1"
});
};
const getStatusText = (status) => {
return status === 1 ? "启用" : "禁用";
};
const getStatusClass = (status) => {
return status === 1 ? "status-confirmed" : "status-pending";
};
const diagnosisTypeMap = {
"first_visit": "初诊",
"follow_up": "复诊",
"consultation": "会诊"
};
const syndromeTypeMap = {
"qi_deficiency": "气虚",
"blood_deficiency": "血虚",
"yin_deficiency": "阴虚",
"yang_deficiency": "阳虚",
"qi_stagnation": "气滞",
"blood_stasis": "血瘀",
"phlegm_dampness": "痰湿",
"damp_heat": "湿热",
"cold_dampness": "寒湿",
"wind_cold": "风寒",
"wind_heat": "风热"
};
const getDiagnosisTypeName = (type) => {
return diagnosisTypeMap[type] || type || "-";
};
const getSyndromeTypeName = (type) => {
return syndromeTypeMap[type] || type || "-";
};
const formatDate = (timestamp) => {
if (!timestamp)
return "-";
const date = new Date(timestamp * 1e3);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
return `${year}-${month}-${day}`;
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.f(cardList.value, (card, k0, i0) => {
return {
a: common_vendor.t(card.id),
b: common_vendor.t(card.status_desc || getStatusText(card.status)),
c: common_vendor.n(getStatusClass(card.status)),
d: common_vendor.t(card.patient_name || "-"),
e: common_vendor.t(card.gender_desc || "-"),
f: common_vendor.t(card.age),
g: common_vendor.t(getDiagnosisTypeName(card.diagnosis_type)),
h: common_vendor.t(getSyndromeTypeName(card.syndrome_type)),
i: common_vendor.t(card.diagnosis_date_text || formatDate(card.diagnosis_date)),
j: common_vendor.t(card.create_time || "-"),
k: common_vendor.o(($event) => viewDailyRecord(card), card.id),
l: common_vendor.o(($event) => viewCardDetail(card), card.id),
m: card.id,
n: common_vendor.o(($event) => viewCardDetail(card), card.id)
};
}),
b: !loading.value && cardList.value.length === 0
}, !loading.value && cardList.value.length === 0 ? {
c: common_vendor.p({
type: "wallet",
size: "80",
color: "#1890ff"
}),
d: common_vendor.o(createCard, "df")
} : {}, {
e: loading.value
}, loading.value ? {} : {});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f80331d8"]]);
_sfc_main.__runtimeHooks = 2;
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Card/Card.js.map
@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "就诊卡",
"usingComponents": {
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
}
}
@@ -0,0 +1 @@
<view class="card-container data-v-f80331d8"><view class="card-list data-v-f80331d8"><view wx:for="{{a}}" wx:for-item="card" wx:key="m" class="card-item data-v-f80331d8" bindtap="{{card.n}}"><view class="card-header data-v-f80331d8"><view class="card-id data-v-f80331d8"><text class="label data-v-f80331d8">诊单编号:</text><text class="value data-v-f80331d8">{{card.a}}</text></view><view class="{{['data-v-f80331d8', 'status-badge', card.c]}}">{{card.b}}</view></view><view class="card-info data-v-f80331d8"><view class="info-row data-v-f80331d8"><text class="info-label data-v-f80331d8">患者姓名:</text><text class="info-value data-v-f80331d8">{{card.d}}</text></view><view class="info-row data-v-f80331d8"><text class="info-label data-v-f80331d8">性别年龄:</text><text class="info-value data-v-f80331d8">{{card.e}} / {{card.f}}岁</text></view><view class="info-row data-v-f80331d8"><text class="info-label data-v-f80331d8">诊断类型:</text><text class="info-value data-v-f80331d8">{{card.g}}</text></view><view class="info-row data-v-f80331d8"><text class="info-label data-v-f80331d8">证型:</text><text class="info-value data-v-f80331d8">{{card.h}}</text></view></view><view class="card-footer data-v-f80331d8"><view class="time-info data-v-f80331d8"><text class="time-label data-v-f80331d8">诊断日期:</text><text class="time-value data-v-f80331d8">{{card.i}}</text></view><view class="time-info data-v-f80331d8"><text class="time-label data-v-f80331d8">创建时间:</text><text class="time-value data-v-f80331d8">{{card.j}}</text></view></view><view class="card-actions data-v-f80331d8"><view class="card-action-btn primary data-v-f80331d8" catchtap="{{card.k}}"><text class="card-action-icon data-v-f80331d8">📈</text><text class="card-action-text data-v-f80331d8">日常记录</text></view><view class="card-action-btn data-v-f80331d8" catchtap="{{card.l}}"><text class="card-action-icon data-v-f80331d8">📝</text><text class="card-action-text data-v-f80331d8">查看 / 编辑</text></view></view></view><view wx:if="{{b}}" class="empty-state data-v-f80331d8"><uni-icons wx:if="{{c}}" class="data-v-f80331d8" u-i="f80331d8-0" bind:__l="__l" u-p="{{c}}"></uni-icons><text class="empty-text data-v-f80331d8">暂无就诊卡</text><view class="add-card-btn data-v-f80331d8" bindtap="{{d}}">新建就诊卡</view></view><view wx:if="{{e}}" class="loading-state data-v-f80331d8"><text class="loading-text data-v-f80331d8">加载中...</text></view></view></view>
@@ -0,0 +1,189 @@
/* 适老化设计:50-80岁 - 大字号、高对比、大触控区 */
.card-container.data-v-f80331d8 {
min-height: 100vh;
background: linear-gradient(180deg, #e8f0fa 0%, #ffffff 100%);
padding-bottom: 56rpx;
}
.header.data-v-f80331d8 {
background: #ffffff;
padding: 48rpx 40rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
}
.header .header-title.data-v-f80331d8 {
font-size: 48rpx;
font-weight: bold;
color: #1890ff;
}
.card-list.data-v-f80331d8 {
padding: 40rpx;
}
.card-item.data-v-f80331d8 {
background: #ffffff;
border-radius: 28rpx;
padding: 44rpx;
margin-bottom: 36rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
transition: all 0.3s;
min-height: 200rpx;
}
.card-item.data-v-f80331d8:active {
transform: scale(0.98);
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
}
.card-header.data-v-f80331d8 {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
padding-bottom: 28rpx;
border-bottom: 4rpx solid #e8eaed;
}
.card-id .label.data-v-f80331d8 {
font-size: 34rpx;
color: #555;
}
.card-id .value.data-v-f80331d8 {
font-size: 40rpx;
font-weight: bold;
color: #1a1a1a;
}
.status-badge.data-v-f80331d8 {
padding: 12rpx 28rpx;
border-radius: 28rpx;
font-size: 32rpx;
font-weight: 500;
}
.status-badge.status-confirmed.data-v-f80331d8 {
background: #f6ffed;
color: #204e2b;
border: 4rpx solid #204e2b;
}
.status-badge.status-pending.data-v-f80331d8 {
background: #fff7e6;
color: #fa8c16;
border: 4rpx solid #ffd591;
}
.card-info.data-v-f80331d8 {
margin-bottom: 28rpx;
}
.info-row.data-v-f80331d8 {
display: flex;
align-items: center;
margin-bottom: 24rpx;
}
.info-row .info-label.data-v-f80331d8 {
font-size: 34rpx;
color: #555;
min-width: 200rpx;
}
.info-row .info-value.data-v-f80331d8 {
font-size: 36rpx;
color: #1a1a1a;
font-weight: 500;
}
.card-footer.data-v-f80331d8 {
padding-top: 28rpx;
border-top: 4rpx solid #e8eaed;
}
.card-actions.data-v-f80331d8 {
display: flex;
gap: 20rpx;
margin-top: 28rpx;
padding-top: 28rpx;
border-top: 4rpx solid #e8eaed;
}
.card-action-btn.data-v-f80331d8 {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
padding: 24rpx 12rpx;
background: #f6faff;
border-radius: 20rpx;
border: 2rpx solid #d6e6fb;
min-height: 80rpx;
transition: all 0.2s;
}
.card-action-btn.data-v-f80331d8:active {
transform: scale(0.98);
opacity: 0.85;
}
.card-action-btn.primary.data-v-f80331d8 {
background: linear-gradient(135deg, #1890ff, #0ea5a4);
border-color: transparent;
}
.card-action-btn.primary .card-action-icon.data-v-f80331d8,
.card-action-btn.primary .card-action-text.data-v-f80331d8 {
color: #ffffff;
}
.card-action-icon.data-v-f80331d8 {
font-size: 36rpx;
color: #1890ff;
}
.card-action-text.data-v-f80331d8 {
font-size: 30rpx;
color: #1890ff;
font-weight: 500;
}
.time-info.data-v-f80331d8 {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.time-info .time-label.data-v-f80331d8 {
font-size: 30rpx;
color: #555;
min-width: 180rpx;
}
.time-info .time-value.data-v-f80331d8 {
font-size: 32rpx;
color: #555;
}
.view-count.data-v-f80331d8 {
display: flex;
align-items: center;
margin-top: 12rpx;
}
.view-count .count-icon.data-v-f80331d8 {
font-size: 34rpx;
margin-right: 12rpx;
}
.view-count .count-text.data-v-f80331d8 {
font-size: 30rpx;
color: #555;
}
.empty-state.data-v-f80331d8 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 160rpx 0;
}
.empty-state .empty-icon.data-v-f80331d8 {
font-size: 140rpx;
margin-bottom: 40rpx;
}
.empty-state .empty-text.data-v-f80331d8 {
font-size: 40rpx;
color: #555;
margin-bottom: 56rpx;
}
.add-card-btn.data-v-f80331d8 {
padding: 36rpx 88rpx;
background: #1890ff;
color: #ffffff;
font-size: 40rpx;
font-weight: 500;
border-radius: 56rpx;
min-height: 100rpx;
}
.loading-state.data-v-f80331d8 {
display: flex;
justify-content: center;
padding: 120rpx 0;
}
.loading-state .loading-text.data-v-f80331d8 {
font-size: 36rpx;
color: #555;
}
@@ -0,0 +1,46 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
__name: "contact",
setup(__props) {
const { proxy } = common_vendor.getCurrentInstance();
const data = common_vendor.ref({});
const loading = common_vendor.ref(false);
const type = common_vendor.ref("");
common_vendor.onMounted(() => {
loadCardList();
});
const loadCardList = async () => {
loading.value = true;
try {
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
type.value = currentPage.options.type;
const res = await proxy.apiUrl({
url: "/api/index/policy",
method: "GET",
data: {
type: type.value
}
});
data.value = res.data;
common_vendor.index.setNavigationBarTitle({
title: res.data.title
});
} catch (err) {
common_vendor.index.__f__("error", "at pages/Card/contact.vue:54", "加载就诊卡列表失败:", err);
} finally {
loading.value = false;
}
};
return (_ctx, _cache) => {
return {
a: common_vendor.t(data.value.title),
b: data.value.content
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9c9e5aa4"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Card/contact.js.map
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "服务",
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="card-container data-v-9c9e5aa4"><view class="header data-v-9c9e5aa4"><text class="header-title data-v-9c9e5aa4">{{a}}</text></view><view class="card-list data-v-9c9e5aa4"><rich-text class="data-v-9c9e5aa4" nodes="{{b}}"/></view></view>
@@ -0,0 +1,136 @@
.card-container.data-v-9c9e5aa4 {
min-height: 100vh;
background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
padding-bottom: 40rpx;
}
.header.data-v-9c9e5aa4 {
background: #ffffff;
padding: 40rpx 30rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
}
.header .header-title.data-v-9c9e5aa4 {
font-size: 40rpx;
font-weight: bold;
color: #1890ff;
}
.card-list.data-v-9c9e5aa4 {
padding: 30rpx;
}
.card-item.data-v-9c9e5aa4 {
background: #ffffff;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
transition: all 0.3s;
}
.card-item.data-v-9c9e5aa4:active {
transform: scale(0.98);
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.card-header.data-v-9c9e5aa4 {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
padding-bottom: 20rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.card-id .label.data-v-9c9e5aa4 {
font-size: 28rpx;
color: #666666;
}
.card-id .value.data-v-9c9e5aa4 {
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.status-badge.data-v-9c9e5aa4 {
padding: 8rpx 20rpx;
border-radius: 20rpx;
font-size: 24rpx;
font-weight: 500;
}
.status-badge.status-confirmed.data-v-9c9e5aa4 {
background: #f6ffed;
color: #52c41a;
border: 2rpx solid #b7eb8f;
}
.status-badge.status-pending.data-v-9c9e5aa4 {
background: #fff7e6;
color: #fa8c16;
border: 2rpx solid #ffd591;
}
.card-info.data-v-9c9e5aa4 {
margin-bottom: 20rpx;
}
.info-row.data-v-9c9e5aa4 {
display: flex;
align-items: center;
margin-bottom: 16rpx;
}
.info-row .info-label.data-v-9c9e5aa4 {
font-size: 28rpx;
color: #666666;
min-width: 160rpx;
}
.info-row .info-value.data-v-9c9e5aa4 {
font-size: 30rpx;
color: #333333;
font-weight: 500;
}
.card-footer.data-v-9c9e5aa4 {
padding-top: 20rpx;
border-top: 2rpx solid #f0f0f0;
}
.time-info.data-v-9c9e5aa4 {
display: flex;
align-items: center;
margin-bottom: 12rpx;
}
.time-info .time-label.data-v-9c9e5aa4 {
font-size: 24rpx;
color: #999999;
min-width: 140rpx;
}
.time-info .time-value.data-v-9c9e5aa4 {
font-size: 26rpx;
color: #666666;
}
.view-count.data-v-9c9e5aa4 {
display: flex;
align-items: center;
margin-top: 8rpx;
}
.view-count .count-icon.data-v-9c9e5aa4 {
font-size: 28rpx;
margin-right: 8rpx;
}
.view-count .count-text.data-v-9c9e5aa4 {
font-size: 24rpx;
color: #999999;
}
.empty-state.data-v-9c9e5aa4 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 0;
}
.empty-state .empty-icon.data-v-9c9e5aa4 {
font-size: 120rpx;
margin-bottom: 30rpx;
}
.empty-state .empty-text.data-v-9c9e5aa4 {
font-size: 32rpx;
color: #999999;
}
.loading-state.data-v-9c9e5aa4 {
display: flex;
justify-content: center;
padding: 80rpx 0;
}
.loading-state .loading-text.data-v-9c9e5aa4 {
font-size: 28rpx;
color: #999999;
}
@@ -0,0 +1,857 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
_easycom_uni_icons2();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
if (!Math) {
_easycom_uni_icons();
}
const _sfc_main = {
__name: "edit_card",
setup(__props) {
const { proxy } = common_vendor.getCurrentInstance();
const loading = common_vendor.ref(false);
const submitting = common_vendor.ref(false);
const agreedToTerms = common_vendor.ref(true);
const showDatePicker = common_vendor.ref(false);
const diagnosisId = common_vendor.ref(null);
const patientId = common_vendor.ref(null);
const isAddMode = common_vendor.ref(false);
const returnUrl = common_vendor.ref("");
const formData = common_vendor.ref({
patient_name: "",
id_card: "",
gender: 1,
age: "",
// 生命体征
height: "",
weight: "",
systolic_pressure: "",
diastolic_pressure: "",
fasting_blood_sugar: "",
// 主诉
diabetes_discovery_year: "",
local_hospital_diagnosis: [],
local_hospital_name: "",
local_hospital_visit_date: "",
// 诊断信息
diagnosis_date: "",
diagnosis_type: "",
syndrome_type: "",
diabetes_type: "",
// 现病史
appetite: "",
water_intake: "",
diet_condition: [],
weight_change: "",
body_feeling: [],
sleep_condition: [],
eye_condition: [],
head_feeling: [],
sweat_condition: [],
skin_condition: [],
urine_condition: [],
stool_condition: [],
kidney_condition: [],
fatty_liver_degree: "",
// 既往史
past_history: [],
trauma_history: 0,
surgery_history: 0,
allergy_history: 0,
family_history: 0,
pregnancy_history: 0,
// 临床信息
symptoms: "",
tongue_coating: "",
tongue_images: [],
report_files: [],
pulse: "",
treatment_principle: "",
prescription: "",
doctor_advice: "",
remark: ""
});
const diagnosisTypeOptions = common_vendor.ref([]);
const syndromeTypeOptions = common_vendor.ref([]);
const diabetesTypeOptions = common_vendor.ref([]);
const pastHistoryOptions = common_vendor.ref([]);
const appetiteOptions = common_vendor.ref([]);
const waterIntakeOptions = common_vendor.ref([]);
const dietConditionOptions = common_vendor.ref([]);
const weightChangeOptions = common_vendor.ref([]);
const bodyFeelingOptions = common_vendor.ref([]);
const sleepConditionOptions = common_vendor.ref([]);
const eyeConditionOptions = common_vendor.ref([]);
const headFeelingOptions = common_vendor.ref([]);
const sweatConditionOptions = common_vendor.ref([]);
const skinConditionOptions = common_vendor.ref([]);
const urineConditionOptions = common_vendor.ref([]);
const stoolConditionOptions = common_vendor.ref([]);
const kidneyConditionOptions = common_vendor.ref([]);
const fattyLiverDegreeOptions = common_vendor.ref([]);
const datePickerValue = common_vendor.ref([0, 0, 0]);
const yearRange = common_vendor.ref([]);
const monthRange = common_vendor.ref(Array.from({ length: 12 }, (_, i) => i + 1));
const dayRange = common_vendor.ref(Array.from({ length: 31 }, (_, i) => i + 1));
common_vendor.onMounted(() => {
loadDictOptions();
loadCardDetail();
initDatePicker();
});
const loadDictOptions = async () => {
try {
const dictTypes = [
"diagnosis_type",
"syndrome_type",
"diabetes_type",
"past_history",
"appetite",
"water_intake",
"diet_condition",
"weight_change",
"body_feeling",
"sleep_condition",
"eye_condition",
"head_feeling",
"sweat_condition",
"skin_condition",
"urine_condition",
"stool_condition",
"kidney_condition",
"fatty_liver_degree"
];
const results = await Promise.all(
dictTypes.map(
(type) => proxy.apiUrl({
url: "/api/tcm/getDict",
method: "GET",
data: { type }
})
)
);
results.forEach((res, index) => {
const type = dictTypes[index];
if (res.code === 1 && res.data) {
const data = res.data[type] || [];
const options = Array.isArray(data) ? data : Object.entries(data).map(([key, value]) => ({
value: key,
name: value
}));
switch (type) {
case "diagnosis_type":
diagnosisTypeOptions.value = options;
break;
case "syndrome_type":
syndromeTypeOptions.value = options;
break;
case "diabetes_type":
diabetesTypeOptions.value = options;
break;
case "past_history":
pastHistoryOptions.value = options;
break;
case "appetite":
appetiteOptions.value = options;
break;
case "water_intake":
waterIntakeOptions.value = options;
break;
case "diet_condition":
dietConditionOptions.value = options;
break;
case "weight_change":
weightChangeOptions.value = options;
break;
case "body_feeling":
bodyFeelingOptions.value = options;
break;
case "sleep_condition":
sleepConditionOptions.value = options;
break;
case "eye_condition":
eyeConditionOptions.value = options;
break;
case "head_feeling":
headFeelingOptions.value = options;
break;
case "sweat_condition":
sweatConditionOptions.value = options;
break;
case "skin_condition":
skinConditionOptions.value = options;
break;
case "urine_condition":
urineConditionOptions.value = options;
break;
case "stool_condition":
stoolConditionOptions.value = options;
break;
case "kidney_condition":
kidneyConditionOptions.value = options;
break;
case "fatty_liver_degree":
fattyLiverDegreeOptions.value = options;
break;
}
}
});
} catch (err) {
common_vendor.index.__f__("error", "at pages/Card/edit_card.vue:979", "加载字典数据失败:", err);
}
};
const initDatePicker = () => {
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
yearRange.value = Array.from({ length: 100 }, (_, i) => currentYear - 50 + i);
};
const initDatePickerValue = (dateStr) => {
if (!dateStr)
return;
try {
const parts = dateStr.split("-");
if (parts.length !== 3)
return;
const year = parseInt(parts[0]);
const month = parseInt(parts[1]);
const day = parseInt(parts[2]);
const yearIndex = yearRange.value.indexOf(year);
if (yearIndex === -1)
return;
const monthIndex = month - 1;
const dayIndex = day - 1;
datePickerValue.value = [yearIndex, monthIndex, dayIndex];
} catch (err) {
common_vendor.index.__f__("error", "at pages/Card/edit_card.vue:1014", "初始化日期选择器失败:", err);
}
};
const loadCardDetail = async () => {
var _a;
loading.value = true;
try {
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const options = currentPage.options || {};
diagnosisId.value = options.id;
isAddMode.value = options.add === "1" || options.add === 1;
if (options.returnUrl) {
try {
returnUrl.value = decodeURIComponent(String(options.returnUrl));
} catch (e) {
returnUrl.value = String(options.returnUrl);
}
}
const userData = common_vendor.index.getStorageSync("userData");
patientId.value = (_a = userData == null ? void 0 : userData.diagnosis) == null ? void 0 : _a.patient_id;
if (isAddMode.value) {
const token = common_vendor.index.getStorageSync("token");
if (!token) {
common_vendor.index.showToast({ title: "请先登录", icon: "none" });
setTimeout(() => common_vendor.index.redirectTo({ url: "/tongji/pages/weekly" }), 1500);
return;
}
loading.value = false;
return;
}
if (!patientId.value) {
common_vendor.index.showToast({ title: "请先登录", icon: "none" });
setTimeout(() => common_vendor.index.redirectTo({ url: "/tongji/pages/weekly" }), 1500);
return;
}
if (!diagnosisId.value) {
common_vendor.index.showToast({ title: "诊单ID不存在", icon: "none" });
setTimeout(() => common_vendor.index.navigateBack(), 1500);
return;
}
const res = await proxy.apiUrl({
url: "/api/tcm/diagnosisDetail",
method: "GET",
data: {
id: diagnosisId.value,
user_id: patientId.value
}
});
if (res.code === 1) {
const diagnosis = res.data;
const arrayFields = ["diet_condition", "body_feeling", "sleep_condition", "eye_condition", "head_feeling", "sweat_condition", "skin_condition", "urine_condition", "stool_condition", "kidney_condition", "past_history", "local_hospital_diagnosis", "report_files", "tongue_images"];
arrayFields.forEach((field) => {
if (typeof diagnosis[field] === "string" && diagnosis[field]) {
diagnosis[field] = diagnosis[field].split(",");
} else if (!diagnosis[field]) {
diagnosis[field] = [];
}
});
formData.value = diagnosis;
const ddy = diagnosis.diabetes_discovery_year;
formData.value.diabetes_discovery_year = ddy == null || ddy === "" ? "" : String(ddy);
if (!diagnosis.local_hospital_visit_date && diagnosis.diagnosis_date) {
formData.value.local_hospital_visit_date = diagnosis.diagnosis_date;
}
if (formData.value.local_hospital_visit_date) {
initDatePickerValue(formData.value.local_hospital_visit_date);
}
} else {
common_vendor.index.showToast({ title: res.msg || "获取失败", icon: "none" });
setTimeout(() => common_vendor.index.navigateBack(), 1500);
}
} catch (err) {
common_vendor.index.__f__("error", "at pages/Card/edit_card.vue:1109", "加载诊单详情失败:", err);
common_vendor.index.showToast({ title: "加载失败", icon: "none" });
setTimeout(() => common_vendor.index.navigateBack(), 1500);
} finally {
loading.value = false;
}
};
const toggleMultiCheckbox = (field, value) => {
const index = formData.value[field].indexOf(value);
if (index > -1) {
formData.value[field].splice(index, 1);
} else {
formData.value[field].push(value);
}
};
const calculateAgeFromIdCard = (idCard) => {
if (!idCard || idCard.length !== 18) {
return "";
}
const year = parseInt(idCard.substring(6, 10));
const month = parseInt(idCard.substring(10, 12));
const day = parseInt(idCard.substring(12, 14));
const today = /* @__PURE__ */ new Date();
const currentYear = today.getFullYear();
const currentMonth = today.getMonth() + 1;
const currentDay = today.getDate();
let age = currentYear - year;
if (currentMonth < month || currentMonth === month && currentDay < day) {
age--;
}
return age;
};
const handleIdCardChange = () => {
if (formData.value.id_card && formData.value.id_card.length === 18) {
const age = calculateAgeFromIdCard(formData.value.id_card);
if (age) {
formData.value.age = age;
}
}
};
const onDateChange = (e) => {
datePickerValue.value = e.detail.value;
};
const confirmDate = () => {
const year = yearRange.value[datePickerValue.value[0]];
const month = String(monthRange.value[datePickerValue.value[1]]).padStart(2, "0");
const day = String(dayRange.value[datePickerValue.value[2]]).padStart(2, "0");
formData.value.local_hospital_visit_date = `${year}-${month}-${day}`;
showDatePicker.value = false;
};
const openAgreement = (type) => {
common_vendor.index.navigateTo({
url: "/pages/Card/contact?type=" + type
});
};
const submitForm = async () => {
var _a;
if (!agreedToTerms.value) {
common_vendor.index.showToast({ title: "请先阅读并同意相关协议", icon: "none" });
return;
}
if (!formData.value.patient_name) {
common_vendor.index.showToast({ title: "患者姓名不能为空", icon: "none" });
return;
}
if (formData.value.gender === null || formData.value.gender === void 0) {
common_vendor.index.showToast({ title: "请选择性别", icon: "none" });
return;
}
if (!formData.value.weight) {
common_vendor.index.showToast({ title: "体重不能为空", icon: "none" });
return;
}
if (!formData.value.height) {
common_vendor.index.showToast({ title: "身高不能为空", icon: "none" });
return;
}
if (!formData.value.fasting_blood_sugar) {
common_vendor.index.showToast({ title: "空腹血糖不能为空", icon: "none" });
return;
}
if (!String(formData.value.diabetes_discovery_year ?? "").trim()) {
common_vendor.index.showToast({ title: "发现糖尿病患病史不能为空", icon: "none" });
return;
}
if (String(formData.value.diabetes_discovery_year).trim().length > 50) {
common_vendor.index.showToast({ title: "发现糖尿病患病史最多50个字", icon: "none" });
return;
}
if (!formData.value.local_hospital_diagnosis || formData.value.local_hospital_diagnosis.length === 0) {
common_vendor.index.showToast({ title: "当地医院诊断结果不能为空", icon: "none" });
return;
}
if (!formData.value.local_hospital_name) {
common_vendor.index.showToast({ title: "当地就诊医院名称不能为空", icon: "none" });
return;
}
if (!formData.value.local_hospital_visit_date) {
common_vendor.index.showToast({ title: "当地医院就诊时间不能为空", icon: "none" });
return;
}
submitting.value = true;
try {
const submitData = { ...formData.value };
submitData.diabetes_discovery_year = String(submitData.diabetes_discovery_year ?? "").trim();
const arrayFields = ["diet_condition", "body_feeling", "sleep_condition", "eye_condition", "head_feeling", "sweat_condition", "skin_condition", "urine_condition", "stool_condition", "kidney_condition", "past_history", "local_hospital_diagnosis", "report_files", "tongue_images"];
arrayFields.forEach((field) => {
if (Array.isArray(submitData[field])) {
submitData[field] = submitData[field].join(",");
}
});
if (submitData.local_hospital_visit_date) {
submitData.diagnosis_date = submitData.local_hospital_visit_date;
}
const apiUrl = isAddMode.value ? "/api/tcm/addCard" : "/api/tcm/updateCard";
const apiData = isAddMode.value ? { ...submitData, ...patientId.value ? { patient_id: patientId.value } : {} } : { id: diagnosisId.value, patient_id: patientId.value, ...submitData };
const res = await proxy.apiUrl({
url: apiUrl,
method: "POST",
data: apiData
});
if (res.code === 1) {
if (isAddMode.value && ((_a = res.data) == null ? void 0 : _a.patient_id)) {
const userData = common_vendor.index.getStorageSync("userData") || {};
if (!userData.diagnosis)
userData.diagnosis = {};
userData.diagnosis.patient_id = res.data.patient_id;
common_vendor.index.setStorageSync("userData", userData);
}
common_vendor.index.showToast({ title: isAddMode.value ? "创建成功" : "保存成功", icon: "success" });
setTimeout(() => {
const back = returnUrl.value;
if (back && back.startsWith("/")) {
common_vendor.index.redirectTo({ url: back });
} else {
common_vendor.index.navigateBack();
}
}, 1500);
} else {
common_vendor.index.showToast({ title: res.msg || "保存失败", icon: "none" });
}
} catch (err) {
common_vendor.index.__f__("error", "at pages/Card/edit_card.vue:1324", "保存失败:", err);
common_vendor.index.showToast({ title: "保存失败", icon: "none" });
} finally {
submitting.value = false;
}
};
const uploadTonguePhoto = () => {
var _a;
const maxCount = 9 - (((_a = formData.value.tongue_images) == null ? void 0 : _a.length) || 0);
common_vendor.index.chooseImage({
count: maxCount,
sizeType: ["compressed"],
sourceType: ["album", "camera"],
success: async (res) => {
const tempFilePaths = res.tempFilePaths;
try {
common_vendor.index.showLoading({ title: "上传中..." });
const token = common_vendor.index.getStorageSync("token");
const $url = proxy.$url;
if (!formData.value.tongue_images) {
formData.value.tongue_images = [];
}
for (let i = 0; i < tempFilePaths.length; i++) {
const uploadRes = await new Promise((resolve, reject) => {
common_vendor.index.uploadFile({
url: $url + "/api/upload/image",
filePath: tempFilePaths[i],
name: "file",
header: {
token,
"content-type": "multipart/form-data"
},
success: (res2) => {
const data = JSON.parse(res2.data);
resolve(data);
},
fail: (err) => {
reject(err);
}
});
});
if (uploadRes.code === 1) {
formData.value.tongue_images.push(uploadRes.data.uri || uploadRes.data);
common_vendor.index.__f__("log", "at pages/Card/edit_card.vue:1377", "-", formData);
}
}
common_vendor.index.hideLoading();
common_vendor.index.showToast({ title: "上传成功", icon: "success" });
} catch (err) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/Card/edit_card.vue:1385", "上传照片失败:", err);
common_vendor.index.showToast({ title: "上传失败", icon: "none" });
}
},
fail: (err) => {
common_vendor.index.__f__("error", "at pages/Card/edit_card.vue:1390", "选择图片失败:", err);
common_vendor.index.showToast({ title: "选择图片失败", icon: "none" });
}
});
};
const deleteTonguePhoto = (index) => {
common_vendor.index.showModal({
title: "提示",
content: "确定要删除这张舌苔照片吗?",
success: (res) => {
if (res.confirm) {
formData.value.tongue_images.splice(index, 1);
common_vendor.index.showToast({ title: "已删除", icon: "success" });
}
}
});
};
const uploadExaminationReport = () => {
var _a;
const maxCount = 9 - (((_a = formData.value.report_files) == null ? void 0 : _a.length) || 0);
common_vendor.index.chooseImage({
count: maxCount,
sizeType: ["compressed"],
sourceType: ["album", "camera"],
success: async (res) => {
const tempFilePaths = res.tempFilePaths;
try {
common_vendor.index.showLoading({ title: "上传中..." });
const token = common_vendor.index.getStorageSync("token");
const $url = proxy.$url;
if (!formData.value.report_files) {
formData.value.report_files = [];
}
for (let i = 0; i < tempFilePaths.length; i++) {
const uploadRes = await new Promise((resolve, reject) => {
common_vendor.index.uploadFile({
url: $url + "/api/upload/image",
filePath: tempFilePaths[i],
name: "file",
header: {
token,
"content-type": "multipart/form-data"
},
success: (res2) => {
const data = JSON.parse(res2.data);
resolve(data);
},
fail: (err) => {
reject(err);
}
});
});
if (uploadRes.code === 1) {
formData.value.report_files.push(uploadRes.data.uri || uploadRes.data);
}
}
common_vendor.index.hideLoading();
common_vendor.index.showToast({ title: "上传成功", icon: "success" });
} catch (err) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/Card/edit_card.vue:1471", "上传检查报告失败:", err);
common_vendor.index.showToast({ title: "上传失败", icon: "none" });
}
},
fail: (err) => {
common_vendor.index.__f__("error", "at pages/Card/edit_card.vue:1476", "选择图片失败:", err);
common_vendor.index.showToast({ title: "选择图片失败", icon: "none" });
}
});
};
const deleteExaminationReport = (index) => {
common_vendor.index.showModal({
title: "提示",
content: "确定要删除这张图片吗?",
success: (res) => {
if (res.confirm) {
formData.value.report_files.splice(index, 1);
common_vendor.index.showToast({ title: "已删除", icon: "success" });
}
}
});
};
const previewImages = (urls, current) => {
common_vendor.index.previewImage({
urls,
current
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: loading.value
}, loading.value ? {} : common_vendor.e({
b: formData.value.patient_name,
c: common_vendor.o(($event) => formData.value.patient_name = $event.detail.value, "d0"),
d: common_vendor.t(formData.value.gender === 1 ? "✓" : ""),
e: formData.value.gender === 1 ? 1 : "",
f: common_vendor.o(($event) => formData.value.gender = 1, "38"),
g: common_vendor.t(formData.value.gender === 0 ? "✓" : ""),
h: formData.value.gender === 0 ? 1 : "",
i: common_vendor.o(($event) => formData.value.gender = 0, "0f"),
j: common_vendor.o(handleIdCardChange, "47"),
k: formData.value.id_card,
l: common_vendor.o(($event) => formData.value.id_card = $event.detail.value, "f0"),
m: formData.value.age,
n: common_vendor.o(($event) => formData.value.age = $event.detail.value, "ef"),
o: formData.value.weight,
p: common_vendor.o(common_vendor.m(($event) => formData.value.weight = $event.detail.value, {
number: true
}), "f1"),
q: formData.value.height,
r: common_vendor.o(common_vendor.m(($event) => formData.value.height = $event.detail.value, {
number: true
}), "7f"),
s: formData.value.systolic_pressure,
t: common_vendor.o(common_vendor.m(($event) => formData.value.systolic_pressure = $event.detail.value, {
number: true
}), "52"),
v: formData.value.diastolic_pressure,
w: common_vendor.o(common_vendor.m(($event) => formData.value.diastolic_pressure = $event.detail.value, {
number: true
}), "7e"),
x: formData.value.fasting_blood_sugar,
y: common_vendor.o(common_vendor.m(($event) => formData.value.fasting_blood_sugar = $event.detail.value, {
number: true
}), "75"),
z: formData.value.diabetes_discovery_year,
A: common_vendor.o(($event) => formData.value.diabetes_discovery_year = $event.detail.value, "f7"),
B: formData.value.local_hospital_diagnosis.includes("糖尿病") ? 1 : "",
C: common_vendor.o(($event) => toggleMultiCheckbox("local_hospital_diagnosis", "糖尿病"), "e0"),
D: formData.value.local_hospital_diagnosis.includes("消渴病") ? 1 : "",
E: common_vendor.o(($event) => toggleMultiCheckbox("local_hospital_diagnosis", "消渴病"), "79"),
F: formData.value.local_hospital_diagnosis.includes("糖尿病前期") ? 1 : "",
G: common_vendor.o(($event) => toggleMultiCheckbox("local_hospital_diagnosis", "糖尿病前期"), "f6"),
H: formData.value.local_hospital_name,
I: common_vendor.o(($event) => formData.value.local_hospital_name = $event.detail.value, "20"),
J: common_vendor.t(formData.value.local_hospital_visit_date || "请选择确诊时间"),
K: common_vendor.o(($event) => showDatePicker.value = true, "1b"),
L: common_vendor.f(appetiteOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.appetite === item.value ? 1 : "",
d: common_vendor.o(($event) => formData.value.appetite = item.value, item.value)
};
}),
M: common_vendor.f(dietConditionOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.diet_condition.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("diet_condition", item.value), item.value)
};
}),
N: common_vendor.f(waterIntakeOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.water_intake === item.value ? 1 : "",
d: common_vendor.o(($event) => formData.value.water_intake = item.value, item.value)
};
}),
O: common_vendor.f(weightChangeOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.weight_change === item.value ? 1 : "",
d: common_vendor.o(($event) => formData.value.weight_change = item.value, item.value)
};
}),
P: common_vendor.f(fattyLiverDegreeOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.fatty_liver_degree === item.value ? 1 : "",
d: common_vendor.o(($event) => formData.value.fatty_liver_degree = item.value, item.value)
};
}),
Q: common_vendor.f(bodyFeelingOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.body_feeling.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("body_feeling", item.value), item.value)
};
}),
R: common_vendor.f(sleepConditionOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.sleep_condition.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("sleep_condition", item.value), item.value)
};
}),
S: common_vendor.f(eyeConditionOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.eye_condition.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("eye_condition", item.value), item.value)
};
}),
T: common_vendor.f(headFeelingOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.head_feeling.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("head_feeling", item.value), item.value)
};
}),
U: common_vendor.f(sweatConditionOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.sweat_condition.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("sweat_condition", item.value), item.value)
};
}),
V: common_vendor.f(skinConditionOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.skin_condition.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("skin_condition", item.value), item.value)
};
}),
W: common_vendor.f(urineConditionOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.urine_condition.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("urine_condition", item.value), item.value)
};
}),
X: common_vendor.f(stoolConditionOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.stool_condition.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("stool_condition", item.value), item.value)
};
}),
Y: common_vendor.f(kidneyConditionOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.kidney_condition.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("kidney_condition", item.value), item.value)
};
}),
Z: common_vendor.f(pastHistoryOptions.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: item.value,
c: formData.value.past_history.includes(item.value) ? 1 : "",
d: common_vendor.o(($event) => toggleMultiCheckbox("past_history", item.value), item.value)
};
}),
aa: formData.value.trauma_history === 1 ? 1 : "",
ab: common_vendor.o(($event) => formData.value.trauma_history = 1, "5e"),
ac: formData.value.trauma_history === 0 ? 1 : "",
ad: common_vendor.o(($event) => formData.value.trauma_history = 0, "db"),
ae: formData.value.surgery_history === 1 ? 1 : "",
af: common_vendor.o(($event) => formData.value.surgery_history = 1, "f6"),
ag: formData.value.surgery_history === 0 ? 1 : "",
ah: common_vendor.o(($event) => formData.value.surgery_history = 0, "69"),
ai: formData.value.allergy_history === 1 ? 1 : "",
aj: common_vendor.o(($event) => formData.value.allergy_history = 1, "b7"),
ak: formData.value.allergy_history === 0 ? 1 : "",
al: common_vendor.o(($event) => formData.value.allergy_history = 0, "f0"),
am: formData.value.family_history === 1 ? 1 : "",
an: common_vendor.o(($event) => formData.value.family_history = 1, "e3"),
ao: formData.value.family_history === 0 ? 1 : "",
ap: common_vendor.o(($event) => formData.value.family_history = 0, "18"),
aq: formData.value.pregnancy_history === 1 ? 1 : "",
ar: common_vendor.o(($event) => formData.value.pregnancy_history = 1, "71"),
as: formData.value.pregnancy_history === 0 ? 1 : "",
at: common_vendor.o(($event) => formData.value.pregnancy_history = 0, "a3"),
av: formData.value.tongue_images && formData.value.tongue_images.length > 0
}, formData.value.tongue_images && formData.value.tongue_images.length > 0 ? {
aw: common_vendor.f(formData.value.tongue_images, (img, index, i0) => {
return {
a: img,
b: common_vendor.o(($event) => previewImages(formData.value.tongue_images, index), index),
c: common_vendor.o(($event) => deleteTonguePhoto(index), index),
d: index
};
})
} : {}, {
ax: formData.value.tongue_images.length < 9
}, formData.value.tongue_images.length < 9 ? {
ay: common_vendor.p({
type: "camera",
size: "30"
}),
az: common_vendor.o(uploadTonguePhoto, "ec")
} : {}, {
aA: formData.value.report_files && formData.value.report_files.length > 0
}, formData.value.report_files && formData.value.report_files.length > 0 ? {
aB: common_vendor.f(formData.value.report_files, (img, index, i0) => {
return {
a: img,
b: common_vendor.o(($event) => previewImages(formData.value.report_files, index), index),
c: common_vendor.o(($event) => deleteExaminationReport(index), index),
d: index
};
})
} : {}, {
aC: formData.value.report_files.length < 9
}, formData.value.report_files.length < 9 ? {
aD: common_vendor.p({
type: "camera",
size: "30"
}),
aE: common_vendor.o(uploadExaminationReport, "6a")
} : {}, {
aF: formData.value.remark,
aG: common_vendor.o(($event) => formData.value.remark = $event.detail.value, "c8"),
aH: agreedToTerms.value
}, agreedToTerms.value ? {} : {}, {
aI: agreedToTerms.value ? 1 : "",
aJ: !agreedToTerms.value
}, !agreedToTerms.value ? {} : {}, {
aK: !agreedToTerms.value ? 1 : "",
aL: common_vendor.o(($event) => agreedToTerms.value = false, "2e"),
aM: common_vendor.o(($event) => openAgreement("service"), "98"),
aN: common_vendor.o(($event) => openAgreement("privacy"), "cc"),
aO: common_vendor.o(($event) => agreedToTerms.value = true, "db"),
aP: common_vendor.t(submitting.value ? "保存中..." : "我已确认无误,提交给医生"),
aQ: common_vendor.o(submitForm, "17"),
aR: submitting.value || !agreedToTerms.value
}), {
aS: showDatePicker.value
}, showDatePicker.value ? {
aT: common_vendor.o(($event) => showDatePicker.value = false, "4e"),
aU: common_vendor.o(confirmDate, "61"),
aV: common_vendor.f(yearRange.value, (year, k0, i0) => {
return {
a: common_vendor.t(year),
b: year
};
}),
aW: common_vendor.f(monthRange.value, (month, k0, i0) => {
return {
a: common_vendor.t(String(month).padStart(2, "0")),
b: month
};
}),
aX: common_vendor.f(dayRange.value, (day, k0, i0) => {
return {
a: common_vendor.t(String(day).padStart(2, "0")),
b: day
};
}),
aY: datePickerValue.value,
aZ: common_vendor.o(onDateChange, "78")
} : {});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-47b8e7b0"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Card/edit_card.js.map
@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "修改就诊卡",
"usingComponents": {
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,858 @@
.edit-container.data-v-47b8e7b0 {
min-height: 100vh;
background: #f5f5f5;
}
.loading-state.data-v-47b8e7b0 {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-size: 36rpx;
color: #999999;
}
.form-wrapper.data-v-47b8e7b0 {
padding: 20rpx;
padding-bottom: 280rpx; /* 为固定按钮留出空间 */
}
.form-section.data-v-47b8e7b0 {
background: #ffffff;
border-radius: 12rpx;
padding: 24rpx;
margin-bottom: 20rpx;
}
.section-title.data-v-47b8e7b0 {
font-size: 34rpx;
font-weight: 600;
color: #333333;
margin-bottom: 20rpx;
display: block;
padding-bottom: 12rpx;
border-bottom: 1rpx solid #e8e8e8;
}
/* 行布局 */
.form-row.data-v-47b8e7b0 {
display: flex;
align-items: center;
margin-bottom: 20rpx;
gap: 20rpx;
}
.form-row-single.data-v-47b8e7b0 {
display: flex;
align-items: center;
margin-bottom: 20rpx;
flex-wrap: wrap;
}
.form-col-left.data-v-47b8e7b0 {
flex: 1;
display: flex;
align-items: center;
}
.form-col-right.data-v-47b8e7b0 {
flex: 1;
display: flex;
align-items: center;
}
.form-col-large.data-v-47b8e7b0 {
flex: 2;
display: flex;
align-items: center;
}
.form-col-small.data-v-47b8e7b0 {
flex: 1;
display: flex;
align-items: center;
}
/* 标签样式 */
.form-label.data-v-47b8e7b0 {
font-size: 28rpx;
color: #666666;
white-space: nowrap;
margin-right: 8rpx;
}
.form-labels.data-v-47b8e7b0 {
font-size: 32rpx;
color: #222222;
white-space: nowrap;
margin-right: 8rpx;
font-weight: 700;
}
.form-label-number.data-v-47b8e7b0 {
font-size: 32rpx;
color: #333333;
font-weight: 600;
margin-right: 4rpx;
}
.required.data-v-47b8e7b0 {
color: #ff4d4f;
margin-right: 4rpx;
font-size: 32rpx;
}
.form-value.data-v-47b8e7b0 {
font-size: 28rpx;
color: #333333;
}
/* 行内输入框 */
.form-input-inline.data-v-47b8e7b0 {
flex: 1;
padding: 12rpx 16rpx;
border: none;
border-bottom: 1rpx solid #e8e8e8;
font-size: 28rpx;
color: #333333;
background: transparent;
}
.form-input-inline.data-v-47b8e7b0:disabled {
color: #999999;
background: #f5f5f5;
}
.form-input-inline.data-v-47b8e7b0::-webkit-input-placeholder {
color: #cccccc;
font-size: 30rpx;
}
.form-input-inline.data-v-47b8e7b0::placeholder {
color: #cccccc;
font-size: 30rpx;
}
.form-unit.data-v-47b8e7b0 {
font-size: 30rpx;
color: #999999;
margin-left: 8rpx;
white-space: nowrap;
}
/* 性别选择 - 行内样式 */
.gender-inline.data-v-47b8e7b0 {
display: flex;
gap: 30rpx;
margin-left: 10rpx;
}
.gender-radio.data-v-47b8e7b0 {
display: flex;
align-items: center;
gap: 8rpx;
font-size: 32rpx;
color: #666666;
}
.gender-radio.active.data-v-47b8e7b0 {
color: #386641;
}
.radio-icon.data-v-47b8e7b0 {
width: 40rpx;
height: 40rpx;
border: 2rpx solid #d9d9d9;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #ffffff;
background: #ffffff;
}
.gender-radio.active .radio-icon.data-v-47b8e7b0 {
background: #386641;
border-color: #386641;
}
.form-tip.data-v-47b8e7b0 {
font-size: 28rpx;
color: #ff4d4f;
margin-top: 8rpx;
}
/* 块级表单项 */
.form-item-block.data-v-47b8e7b0 {
margin-bottom: 30rpx;
}
.form-label-block.data-v-47b8e7b0 {
display: flex;
align-items: center;
margin-bottom: 16rpx;
}
/* 按钮网格布局 */
.button-grid.data-v-47b8e7b0 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0;
margin-bottom: 16rpx;
}
.button-grid-single.data-v-47b8e7b0 {
display: grid;
grid-template-columns: 1fr;
}
.button-grid-three.data-v-47b8e7b0 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0;
}
.grid-button.data-v-47b8e7b0 {
padding: 4rpx 20rpx;
border: 2rpx solid #e8e8e8;
border-radius: 0;
text-align: center;
font-size: 32rpx;
color: #555555;
background: #ffffff;
transition: all 0.2s;
min-height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: -2rpx;
margin-bottom: 10rpx;
position: relative;
}
.grid-button.data-v-47b8e7b0:first-child {
margin-left: 0;
border-top-left-radius: 8rpx;
border-bottom-left-radius: 8rpx;
}
.grid-button.data-v-47b8e7b0:last-child {
border-top-right-radius: 8rpx;
border-bottom-right-radius: 8rpx;
}
.button-grid-three .grid-button.data-v-47b8e7b0:nth-child(3n+1) {
border-top-left-radius: 8rpx;
border-bottom-left-radius: 8rpx;
margin-left: 0;
}
.button-grid-three .grid-button.data-v-47b8e7b0:nth-child(3n) {
border-top-right-radius: 8rpx;
border-bottom-right-radius: 8rpx;
}
.button-grid-three .grid-button.data-v-47b8e7b0:nth-child(3n+2) {
border-radius: 0;
}
.grid-button.active.data-v-47b8e7b0 {
border-color: #386641;
background: #386641;
color: #ffffff;
font-weight: 500;
z-index: 1;
}
/* 选中按钮右侧的白色分隔线 */
.grid-button.active.data-v-47b8e7b0::after {
content: '';
position: absolute;
right: -2rpx;
top: 0;
bottom: 0;
width: 2rpx;
background: #ffffff;
z-index: 2;
}
/* 选中按钮左侧的白色分隔线 */
.grid-button.active.data-v-47b8e7b0::before {
content: '';
position: absolute;
left: -2rpx;
top: 0;
bottom: 0;
width: 2rpx;
background: #ffffff;
z-index: 2;
}
/* 如果是第一个按钮被选中,不显示左侧白线 */
.grid-button.active.data-v-47b8e7b0:first-child::before,
.button-grid-three .grid-button.active.data-v-47b8e7b0:nth-child(3n+1)::before {
display: none;
}
/* 如果是最后一个按钮被选中,不显示右侧白线 */
.grid-button.active.data-v-47b8e7b0:last-child::after,
.button-grid-three .grid-button.active.data-v-47b8e7b0:nth-child(3n)::after {
display: none;
}
/* 全宽输入框 */
.form-input-full.data-v-47b8e7b0 {
width: 100%;
padding: 20rpx;
border: none;
border-bottom: 1rpx solid #e8e8e8;
font-size: 32rpx;
color: #333333;
background: transparent;
box-sizing: border-box;
min-height: 80rpx;
display: block;
}
.form-input-full.data-v-47b8e7b0::-webkit-input-placeholder {
color: #cccccc;
font-size: 30rpx;
}
.form-input-full.data-v-47b8e7b0::placeholder {
color: #cccccc;
font-size: 30rpx;
}
/* 全宽日期选择器 */
.date-input-full.data-v-47b8e7b0 {
display: flex;
align-items: center;
padding: 20rpx;
border: none;
border-bottom: 1rpx solid #e8e8e8;
background: transparent;
min-height: 80rpx;
box-sizing: border-box;
}
.date-icon-left.data-v-47b8e7b0 {
font-size: 36rpx;
color: #999999;
margin-right: 12rpx;
flex-shrink: 0;
}
.date-text.data-v-47b8e7b0 {
flex: 1;
font-size: 32rpx;
color: #333333;
word-break: break-word;
}
.date-arrow.data-v-47b8e7b0 {
font-size: 40rpx;
color: #cccccc;
margin-left: 12rpx;
flex-shrink: 0;
}
/* 原有表单组样式 - 保留用于其他部分 */
.form-group.data-v-47b8e7b0 {
margin-bottom: 24rpx;
}
.form-group.data-v-47b8e7b0:last-child {
margin-bottom: 0;
}
.form-input.data-v-47b8e7b0 {
width: 100%;
padding: 24rpx;
border: 2rpx solid #386641;
border-radius: 12rpx;
font-size: 34rpx;
line-height: 1.5;
color: #333333;
background: #fffaf5;
box-sizing: border-box;
display: block;
height: auto;
min-height: 80rpx;
}
.form-input.data-v-47b8e7b0::-webkit-input-placeholder {
color: #cccccc;
font-size: 32rpx;
}
.form-input.data-v-47b8e7b0::placeholder {
color: #cccccc;
font-size: 32rpx;
}
.form-textarea.data-v-47b8e7b0 {
width: 100%;
padding: 24rpx;
border: 2rpx solid #386641;
border-radius: 12rpx;
font-size: 34rpx;
line-height: 1.6;
color: #333333;
background: #fffaf5;
box-sizing: border-box;
min-height: 180rpx;
display: block;
font-family: inherit;
}
.form-textarea.data-v-47b8e7b0::-webkit-input-placeholder {
color: #cccccc;
font-size: 32rpx;
}
.form-textarea.data-v-47b8e7b0::placeholder {
color: #cccccc;
font-size: 32rpx;
}
.gender-group.data-v-47b8e7b0 {
display: flex;
gap: 16rpx;
}
.gender-btn.data-v-47b8e7b0 {
flex: 1;
padding: 22rpx 24rpx;
border: 2rpx solid #386641;
border-radius: 12rpx;
text-align: center;
font-size: 34rpx;
line-height: 1.5;
color: #666666;
background: #fffaf5;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
min-height: 80rpx;
}
.gender-btn.active.data-v-47b8e7b0 {
border-color: #386641;
background: #fff4e6;
color: #386641;
font-weight: 600;
}
.radio-group.data-v-47b8e7b0 {
display: flex;
gap: 16rpx;
}
.radio-item.data-v-47b8e7b0 {
flex: 1;
padding: 20rpx 24rpx;
border: 2rpx solid #386641;
border-radius: 12rpx;
text-align: center;
font-size: 32rpx;
color: #666666;
background: #fffaf5;
transition: all 0.2s;
min-height: 70rpx;
display: flex;
align-items: center;
justify-content: center;
}
.radio-item.active.data-v-47b8e7b0 {
border-color: #386641;
background: #fff4e6;
color: #386641;
font-weight: 600;
}
.checkbox-group.data-v-47b8e7b0 {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
}
.checkbox-item.data-v-47b8e7b0 {
padding: 18rpx 28rpx;
border: 2rpx solid #386641;
border-radius: 24rpx;
font-size: 32rpx;
color: #666666;
background: #fffaf5;
transition: all 0.2s;
}
.checkbox-item.active.data-v-47b8e7b0 {
border-color: #386641;
background: #fff4e6;
color: #386641;
font-weight: 600;
}
.multi-checkbox-group.data-v-47b8e7b0 {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
}
.multi-checkbox-item.data-v-47b8e7b0 {
padding: 18rpx 28rpx;
border: 2rpx solid #386641;
border-radius: 24rpx;
font-size: 32rpx;
color: #666666;
background: #fffaf5;
transition: all 0.2s;
}
.multi-checkbox-item.active.data-v-47b8e7b0 {
border-color: #386641;
background: #fff4e6;
color: #386641;
font-weight: 600;
}
.date-input.data-v-47b8e7b0 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx;
border: 2rpx solid #386641;
border-radius: 12rpx;
background: #fffaf5;
font-size: 34rpx;
line-height: 1.5;
color: #333333;
min-height: 80rpx;
}
.date-icon.data-v-47b8e7b0 {
font-size: 40rpx;
margin-left: 12rpx;
color: #386641;
}
.picker-item.data-v-47b8e7b0 {
display: flex;
justify-content: center;
align-items: center;
height: 50px;
font-size: 34rpx;
color: #333333;
}
/* 上传组件样式 */
.upload-container.data-v-47b8e7b0 {
margin-top: 16rpx;
}
.upload-layout.data-v-47b8e7b0 {
display: flex;
gap: 20rpx;
margin-top: 20rpx;
align-items: flex-start;
}
.upload-left.data-v-47b8e7b0 {
flex-shrink: 0;
width: 600rpx;
}
.upload-right.data-v-47b8e7b0 {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
gap: 12rpx;
}
.upload-label.data-v-47b8e7b0 {
font-size: 32rpx;
color: #333333;
font-weight: 600;
}
.upload-desc.data-v-47b8e7b0 {
font-size: 28rpx;
color: #999999;
line-height: 1.5;
}
.more-images.data-v-47b8e7b0 {
display: flex;
gap: 12rpx;
margin-top: 12rpx;
flex-wrap: wrap;
}
.more-item.data-v-47b8e7b0 {
width: 80rpx;
height: 80rpx;
border-radius: 8rpx;
overflow: hidden;
border: 2rpx solid #386641;
}
.more-item image.data-v-47b8e7b0 {
width: 100%;
height: 100%;
}
.upload-btn-single.data-v-47b8e7b0 {
width: 200rpx;
height: 200rpx;
display: flex;
align-items: center;
justify-content: center;
border: 2rpx dashed #386641;
border-radius: 12rpx;
background: #fffaf5;
transition: all 0.2s;
}
.upload-btn-single.data-v-47b8e7b0:active {
background: #fff4e6;
border-color: #386641;
}
.upload-btn.data-v-47b8e7b0 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60rpx 40rpx;
border: 2rpx dashed #386641;
border-radius: 12rpx;
background: #fffaf5;
transition: all 0.2s;
}
.upload-btn.data-v-47b8e7b0:active {
background: #fff4e6;
border-color: #386641;
}
.upload-icon.data-v-47b8e7b0 {
font-size: 80rpx;
margin-bottom: 16rpx;
}
.upload-text.data-v-47b8e7b0 {
font-size: 28rpx;
color: #999999;
}
.upload-tip.data-v-47b8e7b0 {
font-size: 24rpx;
color: #cccccc;
margin-top: 8rpx;
}
.form-label-tip.data-v-47b8e7b0 {
font-size: 24rpx;
color: #999999;
margin-bottom: 16rpx;
display: block;
line-height: 1.5;
}
.image-preview.data-v-47b8e7b0 {
position: relative;
border-radius: 12rpx;
overflow: hidden;
border: 2rpx solid #386641;
width: 100%;
height: 100%;
}
.preview-image.data-v-47b8e7b0 {
width: 200rpx;
height: 200rpx;
display: block;
}
.image-actions.data-v-47b8e7b0 {
position: absolute;
bottom: 0;
left: 0;
right: 0;
display: flex;
justify-content: space-around;
padding: 12rpx;
background: rgba(0, 0, 0, 0.6);
gap: 8rpx;
}
.action-btn.data-v-47b8e7b0 {
padding: 8rpx 16rpx;
border-radius: 6rpx;
font-size: 24rpx;
color: #ffffff;
background: rgba(255, 140, 0, 0.8);
border: none;
transition: all 0.2s;
flex: 1;
text-align: center;
}
.action-btn.data-v-47b8e7b0:active {
background: rgba(255, 140, 0, 1);
}
.action-btn.delete.data-v-47b8e7b0 {
color: #ffffff;
background: rgba(255, 77, 79, 0.8);
}
.action-btn.delete.data-v-47b8e7b0:active {
background: rgba(255, 77, 79, 1);
}
/* 多图片列表样式 */
.image-list.data-v-47b8e7b0 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16rpx;
margin-bottom: 20rpx;
}
.image-item.data-v-47b8e7b0 {
position: relative;
width: 100%;
padding-bottom: 100%;
border-radius: 12rpx;
overflow: hidden;
border: 2rpx solid #386641;
}
.item-image.data-v-47b8e7b0 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.delete-icon.data-v-47b8e7b0 {
position: absolute;
top: 8rpx;
right: 8rpx;
width: 48rpx;
height: 48rpx;
background: rgba(255, 77, 79, 0.9);
color: #ffffff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 40rpx;
line-height: 1;
font-weight: bold;
z-index: 10;
}
.upload-btn-small.data-v-47b8e7b0 {
width: 100%;
padding-bottom: 100%;
position: relative;
border: 2rpx dashed #386641;
border-radius: 12rpx;
background: #fffaf5;
display: flex;
align-items: center;
justify-content: center;
}
.upload-icon-small.data-v-47b8e7b0 {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 60rpx;
color: #386641;
}
.picker-input.data-v-47b8e7b0 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx;
border: 2rpx solid #386641;
border-radius: 12rpx;
background: #fffaf5;
font-size: 34rpx;
line-height: 1.5;
color: #333333;
min-height: 80rpx;
}
.picker-icon.data-v-47b8e7b0 {
font-size: 28rpx;
color: #386641;
margin-left: 12rpx;
}
.button-group.data-v-47b8e7b0 {
display: flex;
gap: 20rpx;
margin-top: 40rpx;
margin-bottom: 40rpx;
padding: 0 20rpx;
}
.button-fixed.data-v-47b8e7b0 {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 12rpx 20rpx 16rpx 20rpx;
background: #ffffff;
box-shadow: 0 -4rpx 12rpx rgba(0, 0, 0, 0.1);
z-index: 100;
box-sizing: border-box;
}
.agreement-section.data-v-47b8e7b0 {
margin-bottom: 16rpx;
}
.agreement-radio-group.data-v-47b8e7b0 {
display: flex;
align-items: center;
gap: 12rpx;
flex-wrap: wrap;
}
.radio-option.data-v-47b8e7b0 {
display: flex;
align-items: center;
gap: 8rpx;
cursor: pointer;
}
.radio-icon.data-v-47b8e7b0 {
width: 36rpx;
height: 36rpx;
border: 2rpx solid #d9d9d9;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.2s;
background: #ffffff;
}
.radio-icon.checked.data-v-47b8e7b0 {
border-color: #52c41a;
}
.radio-dot.data-v-47b8e7b0 {
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background: #52c41a;
}
.radio-label.data-v-47b8e7b0 {
font-size: 28rpx;
color: #333333;
font-weight: 500;
}
.agreement-text.data-v-47b8e7b0 {
font-size: 26rpx;
color: #333333;
line-height: 1.6;
}
.agreement-link.data-v-47b8e7b0 {
color: #1890ff;
text-decoration: underline;
}
.agreement-link.data-v-47b8e7b0:active {
opacity: 0.7;
}
.btn.data-v-47b8e7b0 {
width: 100%;
padding: 10rpx;
border-radius: 12rpx;
font-size: 32rpx;
font-weight: 600;
border: none;
cursor: pointer;
transition: all 0.2s;
min-height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 30rpx;
}
.btn.data-v-47b8e7b0:active {
transform: scale(0.98);
}
.btn.data-v-47b8e7b0:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.btn-cancel.data-v-47b8e7b0 {
background: #f5f5f5;
color: #666666;
border: 2rpx solid #e8e8e8;
}
.btn-submit.data-v-47b8e7b0 {
background: #389e0d;
color: #ffffff;
}
.btn-submit.data-v-47b8e7b0:active:not(:disabled) {
background: linear-gradient(135deg, #389e0d 0%, #237804 100%);
}
.date-picker-overlay.data-v-47b8e7b0 {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
justify-content: flex-end;
z-index: 999;
}
.date-picker-container.data-v-47b8e7b0 {
background: #ffffff;
border-radius: 20rpx 20rpx 0 0;
overflow: hidden;
}
.date-picker-header.data-v-47b8e7b0 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 30rpx;
border-bottom: 2rpx solid #ffe4cc;
}
.date-btn-cancel.data-v-47b8e7b0,
.date-btn-confirm.data-v-47b8e7b0 {
font-size: 34rpx;
color: #386641;
font-weight: 600;
}
.date-picker-view.data-v-47b8e7b0 {
height: 320rpx;
}
.picker-item.data-v-47b8e7b0 {
display: flex;
justify-content: center;
align-items: center;
height: 50px;
font-size: 34rpx;
color: #333333;
}
@@ -0,0 +1,122 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const DevTrainingEntry = () => "../../components/dev-training-entry/index.js";
const TabBarDock = () => "../../components/app-tab-bar/tab-bar-dock.js";
const _sfc_main = {
name: "profileB",
components: { DevTrainingEntry, TabBarDock },
data() {
return {
userInfo: {
avatar: "",
nickname: "",
userId: "",
balance: "0",
points: "0",
coupons: "5"
},
orderTypes: [
{
name: "待付款",
image: "/static/images/my/payment.png",
path: "/pages/order/list?type=1",
count: 2
},
{
name: "待发货",
image: "/static/images/my/delivery.png",
path: "/pages/order/list?type=2",
count: 1
},
{
name: "待收货",
image: "/static/images/my/shipping.png",
path: "/pages/order/list?type=3",
count: 0
},
{
name: "待评价",
image: "/static/images/my/review.png",
path: "/pages/order/list?type=4",
count: 3
},
{
name: "退换/售后",
image: "/static/images/my/after-sale.png",
path: "/pages/order/list?type=5",
count: 0
}
],
allServices: [
{ name: "就诊卡", icon: "folder-add", path: "/pages/Card/Card", class: "bg-cyan" },
{ name: "设置", icon: "gear", path: "/pages/user/userinfo", class: "bg-gray" }
// ,
// { name: '客服中心', icon: 'headphones', path: '/pages/service/index', class: 'bg-orange', desc: '在线客服' }
]
};
},
onShow() {
this.userInfo = common_vendor.index.getStorageSync("userData");
},
methods: {
navigateTo(path) {
common_vendor.index.navigateTo({ url: path });
},
showQRCode() {
}
}
};
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _component_dev_training_entry = common_vendor.resolveComponent("dev-training-entry");
const _component_TabBarDock = common_vendor.resolveComponent("TabBarDock");
(_easycom_uni_icons2 + _component_dev_training_entry + _component_TabBarDock)();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
if (!Math) {
_easycom_uni_icons();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.userInfo.avatar,
b: common_vendor.t($data.userInfo.nickname || "未登录"),
c: common_vendor.t($data.userInfo.balance || 0),
d: common_vendor.t($data.userInfo.points || 0),
e: common_vendor.t($data.userInfo.coupons || 0),
f: common_vendor.o(($event) => $options.navigateTo("/pages/user/userinfo"), "39"),
g: common_vendor.f($data.allServices, (item, index, i0) => {
return common_vendor.e({
a: "0f7520f0-0-" + i0,
b: common_vendor.p({
type: item.icon,
size: "28",
color: "#fff"
}),
c: common_vendor.n(item.class),
d: common_vendor.t(item.name),
e: item.desc
}, item.desc ? {
f: common_vendor.t(item.desc)
} : {}, {
g: "0f7520f0-1-" + i0,
h: index,
i: common_vendor.o(($event) => $options.navigateTo(item.path), index)
});
}),
h: common_vendor.p({
type: "right",
size: "20",
color: "#666"
}),
i: common_vendor.p({
bottom: 360
}),
j: common_vendor.p({
active: 1
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0f7520f0"]]);
_sfc_main.__runtimeHooks = 2;
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/user/user.js.map
@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "我的",
"backgroundColor": "#e8eaed",
"backgroundColorTop": "#e8eaed",
"usingComponents": {
"dev-training-entry": "../../components/dev-training-entry/index",
"tab-bar-dock": "../../components/app-tab-bar/tab-bar-dock",
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
}
}
@@ -0,0 +1 @@
<view class="mine-page data-v-0f7520f0"><view class="user-card data-v-0f7520f0" bindtap="{{f}}"><view class="user-header data-v-0f7520f0"><image class="avatar data-v-0f7520f0" src="{{a}}" mode="aspectFill"/><view class="user-info data-v-0f7520f0"><text class="nickname data-v-0f7520f0">{{b}}</text></view></view><view class="stat-row data-v-0f7520f0"><view class="stat-item data-v-0f7520f0"><text class="value data-v-0f7520f0">{{c}}</text><text class="label data-v-0f7520f0">钱包(元)</text></view><view class="stat-item data-v-0f7520f0"><text class="value data-v-0f7520f0">{{d}}</text><text class="label data-v-0f7520f0">积分</text></view><view class="stat-item data-v-0f7520f0"><text class="value data-v-0f7520f0">{{e}}</text><text class="label data-v-0f7520f0">优惠券</text></view></view></view><view class="service-list data-v-0f7520f0"><view wx:for="{{g}}" wx:for-item="item" wx:key="h" class="service-item data-v-0f7520f0" bindtap="{{item.i}}"><view class="left data-v-0f7520f0"><view class="{{['service-icon', 'data-v-0f7520f0', item.c]}}"><uni-icons wx:if="{{item.b}}" class="data-v-0f7520f0" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uni-icons></view><text class="service-name data-v-0f7520f0">{{item.d}}</text></view><view class="right data-v-0f7520f0"><text wx:if="{{item.e}}" class="desc data-v-0f7520f0">{{item.f}}</text><uni-icons wx:if="{{h}}" class="data-v-0f7520f0" u-i="{{item.g}}" bind:__l="__l" u-p="{{h}}"></uni-icons></view></view></view><dev-training-entry wx:if="{{i}}" class="data-v-0f7520f0" u-i="0f7520f0-2" bind:__l="__l" u-p="{{i}}"/><tab-bar-dock wx:if="{{j}}" class="data-v-0f7520f0" u-i="0f7520f0-3" bind:__l="__l" u-p="{{j}}"/></view>
@@ -0,0 +1,261 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
/* 适老化设计:50-80岁老人 - 大字号、高对比、大触控区 */
.mine-page.data-v-0f7520f0 {
min-height: 100vh;
background: #e8eaed;
padding: 40rpx;
padding-bottom: calc(240rpx + env(safe-area-inset-bottom));
}
.user-card.data-v-0f7520f0 {
background: #fff;
border-radius: 28rpx;
padding: 48rpx;
margin-bottom: 40rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
}
.user-card .user-header.data-v-0f7520f0 {
display: flex;
align-items: center;
margin-bottom: 48rpx;
}
.user-card .user-header .avatar.data-v-0f7520f0 {
width: 160rpx;
height: 160rpx;
border-radius: 80rpx;
margin-right: 36rpx;
border: 4rpx solid #e0e0e0;
}
.user-card .user-header .user-info.data-v-0f7520f0 {
flex: 1;
}
.user-card .user-header .user-info .nickname.data-v-0f7520f0 {
font-size: 48rpx;
font-weight: 600;
color: #1a1a1a;
margin-bottom: 16rpx;
display: block;
letter-spacing: 1rpx;
}
.user-card .user-header .user-info .vip-tag.data-v-0f7520f0 {
background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
color: #fff;
font-size: 28rpx;
padding: 6rpx 20rpx;
border-radius: 24rpx;
display: inline-block;
}
.user-card .user-header .qr-code.data-v-0f7520f0 {
width: 88rpx;
height: 88rpx;
border-radius: 44rpx;
background: #f5f6fa;
display: flex;
align-items: center;
justify-content: center;
}
.user-card .stat-row.data-v-0f7520f0 {
display: flex;
padding-top: 40rpx;
border-top: 4rpx solid #e8eaed;
}
.user-card .stat-row .stat-item.data-v-0f7520f0 {
flex: 1;
text-align: center;
min-height: 120rpx;
}
.user-card .stat-row .stat-item .value.data-v-0f7520f0 {
font-size: 52rpx;
font-weight: 600;
color: #1a1a1a;
margin-bottom: 12rpx;
display: block;
}
.user-card .stat-row .stat-item .label.data-v-0f7520f0 {
font-size: 32rpx;
color: #555;
font-weight: 500;
}
.order-card.data-v-0f7520f0 {
background: #fff;
border-radius: 24rpx;
padding: 40rpx;
margin-bottom: 30rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
}
.order-card .card-header.data-v-0f7520f0 {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 40rpx;
}
.order-card .card-header .title.data-v-0f7520f0 {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.order-card .card-header .more.data-v-0f7520f0 {
display: flex;
align-items: center;
}
.order-card .card-header .more text.data-v-0f7520f0 {
font-size: 26rpx;
color: #999;
margin-right: 8rpx;
}
.order-card .order-list.data-v-0f7520f0 {
display: flex;
justify-content: space-between;
}
.order-card .order-list .order-item.data-v-0f7520f0 {
flex: 1;
text-align: center;
}
.order-card .order-list .order-item .icon-wrapper.data-v-0f7520f0 {
width: 100rpx;
height: 100rpx;
margin: 0 auto 0;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.order-card .order-list .order-item .icon-wrapper .count-badge.data-v-0f7520f0 {
position: absolute;
top: -10rpx;
right: -10rpx;
background: #ff4d4f;
color: #fff;
font-size: 20rpx;
min-width: 32rpx;
height: 32rpx;
line-height: 32rpx;
text-align: center;
border-radius: 16rpx;
padding: 0 8rpx;
}
.order-card .order-list .order-item .icon-wrapper .order-icon.data-v-0f7520f0 {
width: 56rpx;
height: 56rpx;
}
.order-card .order-list .order-item .order-name.data-v-0f7520f0 {
font-size: 26rpx;
color: #666;
}
.quick-actions.data-v-0f7520f0 {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 30rpx;
margin-bottom: 30rpx;
}
.quick-actions .action-item.data-v-0f7520f0 {
background: #fff;
border-radius: 24rpx;
padding: 30rpx 20rpx;
text-align: center;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
}
.quick-actions .action-item .action-icon.data-v-0f7520f0 {
width: 80rpx;
height: 80rpx;
border-radius: 40rpx;
margin: 0 auto 16rpx;
display: flex;
align-items: center;
justify-content: center;
}
.quick-actions .action-item .action-name.data-v-0f7520f0 {
font-size: 26rpx;
color: #666;
}
.service-list.data-v-0f7520f0 {
background: #fff;
border-radius: 28rpx;
padding: 20rpx 40rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
}
.service-list .service-item.data-v-0f7520f0 {
display: flex;
align-items: center;
justify-content: space-between;
padding: 44rpx 0;
border-bottom: 4rpx solid #e8eaed;
min-height: 120rpx;
}
.service-list .service-item.data-v-0f7520f0:last-child {
border-bottom: none;
}
.service-list .service-item .left.data-v-0f7520f0 {
display: flex;
align-items: center;
}
.service-list .service-item .left .service-icon.data-v-0f7520f0 {
width: 88rpx;
height: 88rpx;
border-radius: 44rpx;
margin-right: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
.service-list .service-item .left .service-name.data-v-0f7520f0 {
font-size: 38rpx;
color: #1a1a1a;
font-weight: 500;
}
.service-list .service-item .right.data-v-0f7520f0 {
display: flex;
align-items: center;
}
.service-list .service-item .right .desc.data-v-0f7520f0 {
font-size: 30rpx;
color: #555;
margin-right: 20rpx;
}
.bg-red.data-v-0f7520f0 {
background: #ff4d4f;
}
.bg-blue.data-v-0f7520f0 {
background: #1890ff;
}
.bg-green.data-v-0f7520f0 {
background: #52c41a;
}
.bg-purple.data-v-0f7520f0 {
background: #722ed1;
}
.bg-orange.data-v-0f7520f0 {
background: #fa8c16;
}
.bg-cyan.data-v-0f7520f0 {
background: #13c2c2;
}
.bg-pink.data-v-0f7520f0 {
background: #eb2f96;
}
.bg-gray.data-v-0f7520f0 {
background: #666666;
}
@@ -0,0 +1,193 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
_easycom_uni_icons2();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
if (!Math) {
_easycom_uni_icons();
}
const _sfc_main = {
__name: "userinfo",
setup(__props) {
const { proxy } = common_vendor.getCurrentInstance();
const instance = common_vendor.getCurrentInstance();
const $url = instance.appContext.config.globalProperties.$url;
const loading = common_vendor.ref(false);
const submitting = common_vendor.ref(false);
const formData = common_vendor.ref({
avatar: "",
patient_name: "",
phone: "",
nickname: "",
sex: 1,
age: ""
});
common_vendor.onMounted(() => {
loadUserInfo();
});
const loadUserInfo = async () => {
loading.value = true;
try {
const res = await proxy.apiUrl({
url: "/api/user/info",
method: "GET",
data: {}
});
if (res.code === 1) {
const userInfo = res.data;
formData.value = {
avatar: userInfo.avatar || "",
patient_name: userInfo.patient_name || userInfo.nickname || "",
phone: userInfo.phone || "",
nickname: userInfo.nickname || "",
sex: userInfo.sex == "男" ? 1 : 2,
age: userInfo.age || ""
};
} else {
common_vendor.index.showToast({ title: res.msg || "加载失败", icon: "none" });
}
} catch (err) {
common_vendor.index.__f__("error", "at pages/user/userinfo.vue:142", "加载用户信息失败:", err);
common_vendor.index.showToast({ title: "加载失败", icon: "none" });
} finally {
loading.value = false;
}
};
const uploadAvatar = () => {
common_vendor.index.chooseImage({
count: 1,
sizeType: ["compressed"],
sourceType: ["album", "camera"],
success: async (res) => {
const tempFilePath = res.tempFilePaths[0];
try {
common_vendor.index.showLoading({ title: "上传中..." });
const token = common_vendor.index.getStorageSync("token");
const uploadRes = await new Promise((resolve, reject) => {
common_vendor.index.uploadFile({
url: $url + "/api/upload/image",
filePath: tempFilePath,
name: "file",
header: {
token,
"content-type": "multipart/form-data"
},
success: (res2) => {
const data = JSON.parse(res2.data);
resolve(data);
},
fail: (err) => {
reject(err);
}
});
});
common_vendor.index.hideLoading();
if (uploadRes.code === 1) {
formData.value.avatar = uploadRes.data.uri || uploadRes.data;
common_vendor.index.showToast({ title: "头像上传成功", icon: "success" });
} else {
common_vendor.index.showToast({ title: uploadRes.msg || "上传失败", icon: "none" });
}
} catch (err) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/user/userinfo.vue:195", "上传头像失败:", err);
common_vendor.index.showToast({ title: "上传失败", icon: "none" });
}
},
fail: (err) => {
common_vendor.index.__f__("error", "at pages/user/userinfo.vue:200", "选择图片失败:", err);
common_vendor.index.showToast({ title: "选择图片失败", icon: "none" });
}
});
};
const validatePhone = (phone) => {
if (!phone)
return true;
return /^1[3-9]\d{9}$/.test(phone);
};
const submitForm = async () => {
if (!formData.value.patient_name) {
common_vendor.index.showToast({ title: "姓名不能为空", icon: "none" });
return;
}
if (formData.value.phone && !validatePhone(formData.value.phone)) {
common_vendor.index.showToast({ title: "手机号格式不正确", icon: "none" });
return;
}
submitting.value = true;
try {
const res = await proxy.apiUrl({
url: "/api/user/setInfo",
method: "POST",
data: {
avatar: formData.value.avatar,
phone: formData.value.phone,
nickname: formData.value.nickname,
sex: formData.value.sex,
age: formData.value.age,
patient_name: formData.value.patient_name
}
});
if (res.code === 1) {
const userData = common_vendor.index.getStorageSync("userData");
const updatedData = {
...userData,
avatar: formData.value.avatar,
phone: formData.value.phone,
nickname: formData.value.nickname,
sex: formData.value.sex,
age: formData.value.age,
patient_name: formData.value.patient_name,
diagnosis: {
...userData.diagnosis,
patient_name: formData.value.patient_name
}
};
common_vendor.index.setStorageSync("userData", updatedData);
common_vendor.index.showToast({ title: "保存成功", icon: "success" });
setTimeout(() => {
common_vendor.index.navigateBack();
}, 1500);
} else {
common_vendor.index.showToast({ title: res.msg || "保存失败", icon: "none" });
}
} catch (err) {
common_vendor.index.__f__("error", "at pages/user/userinfo.vue:269", "保存失败:", err);
common_vendor.index.showToast({ title: "保存失败", icon: "none" });
} finally {
submitting.value = false;
}
};
return (_ctx, _cache) => {
return common_vendor.e({
a: loading.value
}, loading.value ? {} : {
b: formData.value.avatar,
c: common_vendor.p({
type: "upload-filled",
size: "24",
color: "#FFA500"
}),
d: common_vendor.o(uploadAvatar, "bf"),
e: formData.value.nickname,
f: common_vendor.o(($event) => formData.value.nickname = $event.detail.value, "6d"),
g: formData.value.sex === 1 ? 1 : "",
h: common_vendor.o(($event) => formData.value.sex = 1, "e9"),
i: formData.value.sex === 2 ? 1 : "",
j: common_vendor.o(($event) => formData.value.sex = 2, "53"),
k: formData.value.age,
l: common_vendor.o(common_vendor.m(($event) => formData.value.age = $event.detail.value, {
number: true
}), "cf"),
m: common_vendor.t(submitting.value ? "保存中..." : "保存修改"),
n: common_vendor.o(submitForm, "84"),
o: submitting.value
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-103261b1"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/user/userinfo.js.map
@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "个人资料",
"usingComponents": {
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
}
}
@@ -0,0 +1 @@
<view class="userinfo-container data-v-103261b1"><view wx:if="{{a}}" class="loading-state data-v-103261b1"><text class="data-v-103261b1">加载中...</text></view><view wx:else class="form-wrapper data-v-103261b1"><view class="form-section data-v-103261b1"><view class="form-group data-v-103261b1"><text class="form-label data-v-103261b1">头像</text><view class="avatar-container data-v-103261b1"><image src="{{b}}" class="avatar-image data-v-103261b1" mode="aspectFill"/><view class="avatar-upload data-v-103261b1" bindtap="{{d}}"><uni-icons wx:if="{{c}}" class="upload-icon data-v-103261b1" u-i="103261b1-0" bind:__l="__l" u-p="{{c}}"></uni-icons><text class="upload-text data-v-103261b1">更换头像</text></view></view></view></view><view class="form-section data-v-103261b1"><text class="section-title data-v-103261b1">基本信息</text><view class="form-group data-v-103261b1"><text class="form-label data-v-103261b1">昵称</text><input class="form-input data-v-103261b1" placeholder="请输入昵称" maxlength="50" value="{{e}}" bindinput="{{f}}"/></view><view class="form-group data-v-103261b1"><text class="form-label data-v-103261b1">性别</text><view class="sex-group data-v-103261b1"><view class="{{['sex-btn', 'data-v-103261b1', g && 'active']}}" bindtap="{{h}}"> 男 </view><view class="{{['sex-btn', 'data-v-103261b1', i && 'active']}}" bindtap="{{j}}"> 女 </view></view></view><view class="form-group data-v-103261b1"><text class="form-label data-v-103261b1">年龄</text><input class="form-input data-v-103261b1" type="number" placeholder="请输入年龄" min="0" max="150" value="{{k}}" bindinput="{{l}}"/></view></view><view class="button-group data-v-103261b1"><button class="btn btn-submit data-v-103261b1" bindtap="{{n}}" disabled="{{o}}">{{m}}</button></view></view></view>
@@ -0,0 +1,188 @@
/* 适老化设计:50-80岁 - 大字号、高对比、大触控区 */
.userinfo-container.data-v-103261b1 {
min-height: 100vh;
background: #e8eaed;
}
.header.data-v-103261b1 {
display: flex;
justify-content: space-between;
align-items: center;
background: #ffffff;
padding: 24rpx 40rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
}
.header-back.data-v-103261b1 {
font-size: 48rpx;
color: #FFA500;
width: 88rpx;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header-title.data-v-103261b1 {
font-size: 44rpx;
font-weight: bold;
color: #1a1a1a;
flex: 1;
text-align: center;
}
.header-placeholder.data-v-103261b1 {
width: 88rpx;
}
.loading-state.data-v-103261b1 {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-size: 36rpx;
color: #555;
}
.form-wrapper.data-v-103261b1 {
padding: 40rpx;
}
.form-section.data-v-103261b1 {
background: #ffffff;
border-radius: 24rpx;
padding: 40rpx;
margin-bottom: 36rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
}
.section-title.data-v-103261b1 {
font-size: 40rpx;
font-weight: bold;
color: #FFA500;
margin-bottom: 32rpx;
display: block;
padding-bottom: 24rpx;
border-bottom: 4rpx solid #f0f0f0;
}
.form-group.data-v-103261b1 {
margin-bottom: 36rpx;
}
.form-group.data-v-103261b1:last-child {
margin-bottom: 0;
}
.form-label.data-v-103261b1 {
display: block;
font-size: 36rpx;
color: #1a1a1a;
font-weight: 500;
margin-bottom: 20rpx;
line-height: 1.6;
}
.form-input.data-v-103261b1 {
width: 100%;
padding: 28rpx;
border: 4rpx solid #e0e0e0;
border-radius: 16rpx;
font-size: 36rpx;
line-height: 1.6;
color: #1a1a1a;
background: #ffffff;
box-sizing: border-box;
display: block;
height: auto;
min-height: 96rpx;
}
.form-input.data-v-103261b1::-webkit-input-placeholder {
color: #999;
font-size: 34rpx;
}
.form-input.data-v-103261b1::placeholder {
color: #999;
font-size: 34rpx;
}
.avatar-container.data-v-103261b1 {
display: flex;
align-items: center;
gap: 32rpx;
}
.avatar-image.data-v-103261b1 {
width: 160rpx;
height: 160rpx;
border-radius: 80rpx;
background: #f0f0f0;
border: 4rpx solid #e0e0e0;
}
.avatar-upload.data-v-103261b1 {
flex: 1;
padding: 36rpx;
border: 4rpx dashed #FFA500;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16rpx;
min-height: 120rpx;
}
.upload-icon.data-v-103261b1 {
font-size: 56rpx;
}
.upload-text.data-v-103261b1 {
font-size: 34rpx;
color: #FFA500;
font-weight: 500;
}
.sex-group.data-v-103261b1 {
display: flex;
gap: 28rpx;
}
.sex-btn.data-v-103261b1 {
flex: 1;
padding: 32rpx;
border: 4rpx solid #e0e0e0;
border-radius: 16rpx;
text-align: center;
font-size: 38rpx;
line-height: 1.5;
color: #555;
background: #ffffff;
transition: all 0.3s;
display: flex;
align-items: center;
justify-content: center;
min-height: 96rpx;
}
.sex-btn.active.data-v-103261b1 {
border-color: #FFA500;
background: #fff7e6;
color: #FFA500;
font-weight: bold;
}
.button-group.data-v-103261b1 {
display: flex;
gap: 28rpx;
margin-top: 56rpx;
margin-bottom: 56rpx;
}
.btn.data-v-103261b1 {
flex: 1;
padding: 36rpx;
border-radius: 20rpx;
font-size: 40rpx;
font-weight: bold;
border: none;
cursor: pointer;
transition: all 0.3s;
min-height: 100rpx;
}
.btn.data-v-103261b1:active {
transform: scale(0.98);
}
.btn.data-v-103261b1:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.btn-cancel.data-v-103261b1 {
background: #f0f0f0;
color: #555;
}
.btn-submit.data-v-103261b1 {
background: #FFA500;
color: #ffffff;
}
.btn-submit.data-v-103261b1:active:not(:disabled) {
background: #e69500;
}
@@ -0,0 +1,37 @@
{
"description": "项目配置文件。",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": false,
"es6": true,
"postcss": false,
"minified": true,
"newFeature": true,
"bigPackageSizeSupport": true,
"minifyWXML": true
},
"compileType": "miniprogram",
"libVersion": "",
"appid": "wx79b9a0bfbfe7cbcd",
"projectname": "tongji-uniapp",
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
}
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="375px" height="268px" viewBox="0 0 375 268" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>背景</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="50%" y1="81.9277858%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#006EFF" offset="0%"></stop>
<stop stop-color="#00C8DC" offset="100%"></stop>
</linearGradient>
</defs>
<g id="浅色版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="主页" fill="url(#linearGradient-1)">
<g id="编组-4" transform="translate(-315.000000, -732.000000)">
<circle id="蒙版" cx="500" cy="500" r="500"></circle>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

@@ -0,0 +1,86 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
TongjiIcon();
}
const TongjiIcon = () => "./TongjiIcon.js";
const _sfc_main = {
__name: "CelebrateBurst",
props: {
show: { type: Boolean, default: false },
title: { type: String, default: "" },
subtitle: { type: String, default: "" }
},
setup(__props) {
const props = __props;
const particles = common_vendor.ref([]);
const cardPop = common_vendor.ref(false);
const COLORS = ["#204E2B", "#386641", "#AFE2B3", "#FBBF24", "#727970", "#DC2626"];
function buildParticles() {
const list = [];
for (let i = 0; i < 18; i++) {
const left = 8 + Math.random() * 84;
const delay = Math.random() * 0.35;
const hue = COLORS[i % COLORS.length];
const size = 10 + Math.floor(Math.random() * 14);
list.push({
id: `${Date.now()}_${i}`,
style: {
left: `${left}%`,
width: `${size}rpx`,
height: `${size}rpx`,
background: hue,
animationDelay: `${delay}s`
}
});
}
return list;
}
common_vendor.watch(
() => props.show,
(v) => {
if (v) {
particles.value = buildParticles();
cardPop.value = false;
setTimeout(() => {
cardPop.value = true;
}, 30);
} else {
particles.value = [];
cardPop.value = false;
}
}
);
return (_ctx, _cache) => {
return common_vendor.e({
a: __props.show
}, __props.show ? common_vendor.e({
b: common_vendor.f(particles.value, (p, k0, i0) => {
return {
a: p.id,
b: common_vendor.s(p.style)
};
}),
c: __props.title
}, __props.title ? common_vendor.e({
d: common_vendor.p({
name: "sparkles",
size: "lg",
color: "#204E2B"
}),
e: common_vendor.t(__props.title),
f: __props.subtitle
}, __props.subtitle ? {
g: common_vendor.t(__props.subtitle)
} : {}, {
h: cardPop.value ? 1 : ""
}) : {}, {
i: common_vendor.o(() => {
}, "49")
}) : {});
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-313f45d6"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/tongji/components/CelebrateBurst.js.map
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"tongji-icon": "./TongjiIcon"
}
}
@@ -0,0 +1 @@
<view wx:if="{{a}}" class="celebrate-root data-v-313f45d6" catchtouchmove="{{i}}"><view wx:for="{{b}}" wx:for-item="p" wx:key="a" class="celebrate-particle data-v-313f45d6" style="{{p.b}}"/><view wx:if="{{c}}" class="{{['celebrate-card', 'data-v-313f45d6', h && 'pop']}}"><view class="celebrate-card-glow data-v-313f45d6"/><tongji-icon wx:if="{{d}}" class="data-v-313f45d6" u-i="313f45d6-0" bind:__l="__l" u-p="{{d}}"/><text class="celebrate-card-title data-v-313f45d6">{{e}}</text><text wx:if="{{f}}" class="celebrate-card-sub data-v-313f45d6">{{g}}</text></view></view>
@@ -0,0 +1,95 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.celebrate-root.data-v-313f45d6 {
position: fixed;
inset: 0;
z-index: 9999;
pointer-events: none;
overflow: hidden;
}
.celebrate-particle.data-v-313f45d6 {
position: absolute;
top: -20rpx;
border-radius: 4rpx;
opacity: 0.9;
animation: celebrate-fall-313f45d6 1.6s ease-in forwards;
}
@keyframes celebrate-fall-313f45d6 {
0% {
transform: translateY(0) rotate(0deg) scale(1);
opacity: 1;
}
100% {
transform: translateY(110vh) rotate(540deg) scale(0.4);
opacity: 0;
}
}
.celebrate-card.data-v-313f45d6 {
position: absolute;
left: 50%;
top: 38%;
transform: translate(-50%, -50%) scale(0.82);
width: 78%;
max-width: 560rpx;
padding: 36rpx 32rpx 32rpx;
background: rgba(255, 255, 255, 0.96);
border-radius: 28rpx;
box-shadow: 0 20rpx 60rpx rgba(8, 145, 178, 0.22);
border: 2rpx solid rgba(8, 145, 178, 0.12);
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
opacity: 0;
transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
.celebrate-card.pop.data-v-313f45d6 {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
.celebrate-card-glow.data-v-313f45d6 {
position: absolute;
inset: -20rpx;
border-radius: 36rpx;
background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 70%);
pointer-events: none;
}
.celebrate-card-title.data-v-313f45d6 {
position: relative;
z-index: 1;
margin-top: 16rpx;
font-size: 36rpx;
font-weight: 800;
color: #1b1c1a;
}
.celebrate-card-sub.data-v-313f45d6 {
position: relative;
z-index: 1;
margin-top: 10rpx;
font-size: 26rpx;
color: #475569;
line-height: 1.45;
}
@@ -0,0 +1,100 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const tongji_utils_svgDataUrl = require("../utils/svgDataUrl.js");
const tongji_utils_treeLevels = require("../utils/treeLevels.js");
const _sfc_main = {
__name: "SugarTreeGraphic",
props: {
level: { type: Number, default: 0 },
size: { type: String, default: "md" },
watering: { type: Boolean, default: false }
},
setup(__props) {
const MAX_LEVEL = tongji_utils_treeLevels.TREE_MAX_LEVEL;
const treeUseFallback = common_vendor.ref(true);
const props = __props;
const clampedLevel = common_vendor.computed(() => Math.min(MAX_LEVEL, Math.max(0, Number(props.level) || 0)));
const visualTier = common_vendor.computed(() => {
const lv = clampedLevel.value;
if (lv <= 0)
return 0;
if (lv <= 2)
return 1;
if (lv <= 4)
return 2;
if (lv <= 6)
return 3;
if (lv <= 8)
return 4;
return 5;
});
const treeEmoji = common_vendor.computed(() => (tongji_utils_treeLevels.TREE_LEVELS[clampedLevel.value] || tongji_utils_treeLevels.TREE_LEVELS[0]).emoji);
function buildTreeSvg(level) {
const pot = `
<ellipse cx="24" cy="50" rx="15" ry="3" fill="#204e2b" opacity="0.12"/>
<path d="M11 46h26c1.2 0 2 1 2 2.2v3.8c0 1-.8 1.8-1.8 1.8H10.8c-1 0-1.8-.8-1.8-1.8v-3.8c0-1.2.8-2.2 2-2.2z" fill="#E7E5E4"/>
<path d="M12.5 46h23c.8 0 1.5.7 1.5 1.5v2.2c0 .6-.5 1.1-1.1 1.1H12.1c-.6 0-1.1-.5-1.1-1.1v-2.2c0-.8.7-1.5 1.5-1.5z" fill="#D6D3D1"/>
<ellipse cx="24" cy="46.5" rx="9" ry="1.6" fill="#A8A29E" opacity="0.35"/>
`;
const soil = `<ellipse cx="24" cy="44.5" rx="8" ry="2.2" fill="#386641" opacity="0.18"/>`;
if (level <= 0) {
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 56" fill="none">
${pot}${soil}
<circle cx="24" cy="41.5" r="2.2" fill="#a8a29e" opacity="0.7"/>
<path d="M24 41.5v3.5" stroke="#78716c" stroke-width="1" stroke-linecap="round"/>
</svg>`;
}
const trunkH = level >= 6 ? 16 : level >= 3 ? 14 : 10;
const trunkY = 46 - trunkH;
const trunk = `<rect x="22.2" y="${trunkY}" width="3.6" height="${trunkH}" rx="1.8" fill="#78716C"/>
<rect x="22.6" y="${trunkY + 1}" width="2.8" height="${trunkH - 1}" rx="1.4" fill="#A8A29E" opacity="0.35"/>`;
const leaf = (cx, cy, r, fill, opacity = 1) => `<circle cx="${cx}" cy="${cy}" r="${r}" fill="${fill}" opacity="${opacity}"/>
<circle cx="${cx - r * 0.25}" cy="${cy - r * 0.2}" r="${r * 0.35}" fill="#eef6ef" opacity="0.55"/>`;
const bloom = level >= 7 ? leaf(17, 18, 3, "#fda4af", 0.95) + leaf(31, 17, 2.8, "#f9a8d4", 0.9) + leaf(24, 13, 3.2, "#fb7185", 0.95) + `<circle cx="24" cy="12" r="1.3" fill="#fef3c7"/>` : "";
const crown = level >= 9 ? leaf(12, 22, 6, "#34d399", 0.9) + leaf(36, 22, 6, "#34d399", 0.9) + leaf(24, 10, 7, "#386641", 0.95) + bloom : bloom;
let canopy = "";
if (level === 1) {
canopy = leaf(24, 38, 4, "#afe2b3") + `<path d="M24 38v-5" stroke="#386641" stroke-width="1.2" stroke-linecap="round"/>`;
} else if (level === 2) {
canopy = leaf(24, 32, 5.5, "#34d399") + leaf(20, 34, 3.5, "#6ee7b7", 0.9);
} else if (level <= 4) {
canopy = leaf(24, 28, 7, "#34d399") + leaf(17, 30, 5, "#6ee7b7", 0.9) + leaf(31, 30, 5, "#6ee7b7", 0.9);
} else if (level <= 6) {
canopy = leaf(24, 24, 9, "#22c55e") + leaf(14, 26, 7, "#4ade80", 0.92) + leaf(34, 26, 7, "#4ade80", 0.92) + leaf(24, 16, 6, "#386641", 0.88);
} else {
canopy = leaf(24, 20, 10, "#204e2b") + leaf(13, 24, 8, "#34d399", 0.95) + leaf(35, 24, 8, "#34d399", 0.95) + crown;
}
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 56" fill="none">${pot}${soil}${trunk}${canopy}</svg>`;
}
const treeImageSrc = common_vendor.computed(() => tongji_utils_svgDataUrl.svgToDataUrl(buildTreeSvg(clampedLevel.value)));
return (_ctx, _cache) => {
return common_vendor.e({
a: clampedLevel.value >= 7
}, clampedLevel.value >= 7 ? {} : {}, {
b: !treeUseFallback.value
}, !treeUseFallback.value ? {
c: treeImageSrc.value,
d: common_vendor.o(($event) => treeUseFallback.value = true, "20")
} : {
e: common_vendor.t(treeEmoji.value)
}, {
f: clampedLevel.value >= 7
}, clampedLevel.value >= 7 ? {} : {}, {
g: clampedLevel.value >= 8
}, clampedLevel.value >= 8 ? {} : {}, {
h: clampedLevel.value >= common_vendor.unref(MAX_LEVEL)
}, clampedLevel.value >= common_vendor.unref(MAX_LEVEL) ? {} : {}, {
i: common_vendor.n(`lv-${clampedLevel.value}`),
j: common_vendor.n(`tier-${visualTier.value}`),
k: common_vendor.n(`size-${__props.size}`),
l: common_vendor.n({
watering: __props.watering,
"is-max": clampedLevel.value >= common_vendor.unref(MAX_LEVEL)
})
});
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-d91cb5e7"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/tongji/components/SugarTreeGraphic.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="{{['sugar-tree-graphic', 'data-v-d91cb5e7', i, j, k, l]}}"><view class="stg-glow data-v-d91cb5e7"/><view wx:if="{{a}}" class="stg-aura data-v-d91cb5e7"/><image wx:if="{{b}}" class="stg-image data-v-d91cb5e7" src="{{c}}" mode="aspectFit" binderror="{{d}}"/><text wx:else class="stg-emoji data-v-d91cb5e7">{{e}}</text><view wx:if="{{f}}" class="stg-sparkle stg-sparkle-a data-v-d91cb5e7"/><view wx:if="{{g}}" class="stg-sparkle stg-sparkle-b data-v-d91cb5e7"/><view wx:if="{{h}}" class="stg-sparkle stg-sparkle-c data-v-d91cb5e7"/></view>
@@ -0,0 +1,153 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.sugar-tree-graphic.data-v-d91cb5e7 {
position: relative;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.size-sm.data-v-d91cb5e7 {
width: 64rpx;
height: 72rpx;
}
.size-md.data-v-d91cb5e7 {
width: 80rpx;
height: 88rpx;
}
.size-lg.data-v-d91cb5e7 {
width: 112rpx;
height: 124rpx;
}
.stg-glow.data-v-d91cb5e7 {
position: absolute;
inset: 6%;
border-radius: 50%;
background: radial-gradient(circle, rgba(32, 78, 43, 0.22) 0%, transparent 68%);
pointer-events: none;
}
.lv-0 .stg-glow.data-v-d91cb5e7 {
background: radial-gradient(circle, rgba(148, 163, 184, 0.25) 0%, transparent 70%);
}
.tier-4 .stg-glow.data-v-d91cb5e7,
.tier-5 .stg-glow.data-v-d91cb5e7,
.is-max .stg-glow.data-v-d91cb5e7 {
background: radial-gradient(circle, rgba(251, 191, 36, 0.3) 0%, rgba(32, 78, 43, 0.15) 55%, transparent 72%);
}
.stg-aura.data-v-d91cb5e7 {
position: absolute;
inset: -8%;
border-radius: 50%;
border: 2rpx solid rgba(253, 224, 71, 0.35);
animation: stg-aura-pulse-d91cb5e7 2.4s ease-in-out infinite;
pointer-events: none;
}
@keyframes stg-aura-pulse-d91cb5e7 {
0%, 100% {
transform: scale(0.92);
opacity: 0.5;
}
50% {
transform: scale(1.05);
opacity: 1;
}
}
.stg-image.data-v-d91cb5e7 {
position: relative;
z-index: 1;
width: 100%;
height: 100%;
transition: transform 0.35s ease;
}
.sugar-tree-graphic.watering .stg-image.data-v-d91cb5e7,
.sugar-tree-graphic.watering .stg-emoji.data-v-d91cb5e7 {
animation: stg-water-bounce-d91cb5e7 0.65s ease;
}
.stg-emoji.data-v-d91cb5e7 {
position: relative;
z-index: 1;
line-height: 1;
font-size: 72rpx;
}
.size-sm .stg-emoji.data-v-d91cb5e7 {
font-size: 48rpx;
}
.size-md .stg-emoji.data-v-d91cb5e7 {
font-size: 60rpx;
}
.size-lg .stg-emoji.data-v-d91cb5e7 {
font-size: 88rpx;
}
@keyframes stg-water-bounce-d91cb5e7 {
0%, 100% {
transform: scale(1);
}
35% {
transform: scale(1.1) translateY(-6rpx);
}
60% {
transform: scale(0.96) translateY(2rpx);
}
}
.stg-sparkle.data-v-d91cb5e7 {
position: absolute;
z-index: 2;
width: 8rpx;
height: 8rpx;
border-radius: 50%;
background: #fde68a;
box-shadow: 0 0 6rpx rgba(253, 224, 71, 0.8);
pointer-events: none;
animation: stg-sparkle-twinkle-d91cb5e7 1.8s ease-in-out infinite;
}
.stg-sparkle-a.data-v-d91cb5e7 {
top: 4%;
right: 16%;
}
.stg-sparkle-b.data-v-d91cb5e7 {
top: 12%;
left: 10%;
width: 6rpx;
height: 6rpx;
animation-delay: 0.4s;
}
.stg-sparkle-c.data-v-d91cb5e7 {
top: 22%;
right: 28%;
width: 10rpx;
height: 10rpx;
animation-delay: 0.8s;
}
@keyframes stg-sparkle-twinkle-d91cb5e7 {
0%, 100% {
opacity: 0.4;
transform: scale(0.8);
}
50% {
opacity: 1;
transform: scale(1.2);
}
}
@@ -0,0 +1,129 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const tongji_utils_svgDataUrl = require("../utils/svgDataUrl.js");
const _sfc_main = {
__name: "TongjiIcon",
props: {
name: { type: String, required: true },
size: { type: String, default: "md" },
color: { type: String, default: "#204E2B" }
},
setup(__props) {
const props = __props;
const useFallback = common_vendor.ref(false);
const ICON_PATHS = {
view: '<path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',
ticket: '<path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"/><path d="M13 5v2"/><path d="M13 17v2"/><path d="M13 11v2"/>',
calendar: '<rect width="18" height="18" x="3" y="4" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/>',
flame: '<path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z"/>',
"check-circle": '<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><path d="m9 11 3 3L22 4"/>',
glucose: '<path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"/>',
heart: '<path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/>',
activity: '<path d="M22 12h-4l-3 9L9 3l-3 9H2"/>',
users: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>',
user: '<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',
person: '<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',
send: '<path d="m22 2-7 20-4-9-9-4Z"/><path d="M22 2 11 13"/>',
"alert-triangle": '<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><path d="M12 9v4"/><path d="M12 17h.01"/>',
minus: '<path d="M5 12h14"/>',
droplet: '<path d="M12 22a7 7 0 0 0 7-7c0-2-1-3.5-2.5-5.5C15 7 12 2 12 2S9 7 7.5 9.5 5 13 5 15a7 7 0 0 0 7 7z"/>',
sparkles: '<path d="m12 3-1.9 5.8L4 12l5.8 1.9L12 21l1.9-5.8L20 12l-5.8-1.9L12 3Z"/><path d="M5 3v4M19 17v4M3 5h4M17 19h4"/>',
trophy: '<path d="M6 9H4.5a2.5 2.5 0 0 1 0-5H6M18 9h1.5a2.5 2.5 0 0 0 0-5H18M4 22h16M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20 7 22M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20 17 22M18 2H6v7a6 6 0 0 0 12 0V2Z"/>',
share: '<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8M16 6l-4-4-4 4M12 2v13"/>',
plus: '<path d="M5 12h14M12 5v14"/>',
refresh: '<path d="M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8M3 3v5h5M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16M21 21v-5h-5"/>',
volume: '<path d="M11 5 6 9H2v6h4l5 4V5zM15.54 8.46a5 5 0 0 1 0 7.07M19.07 4.93a10 10 0 0 1 0 14.14"/>',
pause: '<rect width="4" height="16" x="14" y="4" rx="1"/><rect width="4" height="16" x="6" y="4" rx="1"/>',
play: '<polygon points="6 3 20 12 6 21 6 3"/>',
info: '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/>',
sun: '<circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41-1.41M17.66 6.34l1.41-1.41M6.34 4.93l1.41 1.41"/>',
moon: '<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>',
sunset: '<path d="M12 10V2M18.364 5.636l-2.12 2.12M5.636 18.364l2.12-2.12M22 18h-3M5 18H2M18.364 18.364l-2.12-2.12M5.636 5.636l2.12 2.12M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/>',
mic: '<path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"/><path d="M19 10v2a7 7 0 0 1-14 0v-2"/><line x1="12" x2="12" y1="19" y2="22"/>',
camera: '<path d="M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"/><circle cx="12" cy="13" r="3"/>',
bulb: '<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1.3.5 2.6 1.5 3.5.8.8 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/>',
leaf: '<path d="M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z"/><path d="M2 21c0-3 1.85-5.36 5.08-6"/>',
utensils: '<path d="M3 2v7c0 1.1.9 2 2 2a2 2 0 0 0 2-2V2"/><path d="M7 2v20"/><path d="M21 15V2a5 5 0 0 0-3 4.5v6a2 2 0 0 0 2 2h1Z"/><path d="M18 15v7"/>',
egg: '<path d="M12 22c4.97 0 8-3.27 8-7.31C20 9.65 16.42 2 12 2S4 9.65 4 14.69C4 18.73 7.03 22 12 22Z"/>',
home: '<path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/>',
"plus-circle": '<circle cx="12" cy="12" r="10"/><path d="M8 12h8M12 8v8"/>',
"chevron-right": '<path d="m9 18 6-6-6-6"/>',
"chevron-left": '<path d="m15 18-6-6 6-6"/>',
check: '<path d="M20 6 9 17l-5-5"/>',
settings: '<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>',
syringe: '<path d="m18 2 4 4"/><path d="m17 7 3-3"/><path d="M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5"/><path d="m9 11 4 4"/><path d="m5 19-3 3"/><path d="m14 4 6 6"/>',
zap: '<path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"/>'
};
const ICON_FALLBACK = {
view: "👁",
ticket: "🎫",
calendar: "📅",
flame: "🔥",
"check-circle": "✓",
glucose: "💧",
heart: "❤",
activity: "🏃",
users: "👥",
user: "👤",
person: "👤",
send: "➤",
"alert-triangle": "⚠",
minus: "—",
droplet: "💧",
sparkles: "✨",
trophy: "🏆",
share: "↗",
plus: "",
refresh: "↻",
volume: "🔊",
pause: "⏸",
play: "▶",
info: "!",
sun: "☀",
moon: "🌙",
sunset: "☀",
mic: "🎤",
camera: "📷",
bulb: "💡",
leaf: "🥬",
utensils: "🍴",
egg: "🍳",
home: "🏠",
"plus-circle": "⊕",
"chevron-right": "",
"chevron-left": "",
check: "✓",
settings: "⚙",
syringe: "💉",
zap: "⚡"
};
const strokeColor = common_vendor.computed(() => {
const c = String(props.color || "#204E2B").trim();
return /^#[0-9A-Fa-f]{3,8}$/.test(c) ? c : "#204E2B";
});
const iconSrc = common_vendor.computed(() => {
const path = ICON_PATHS[props.name] || ICON_PATHS.view;
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="${strokeColor.value}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${path}</svg>`;
return tongji_utils_svgDataUrl.svgToDataUrl(svg);
});
common_vendor.computed(() => ICON_FALLBACK[props.name] || ICON_FALLBACK.view);
function onImageError() {
useFallback.value = true;
}
return (_ctx, _cache) => {
return common_vendor.e({
a: !useFallback.value
}, !useFallback.value ? {
b: common_vendor.n(`tj-icon--${__props.name}`),
c: common_vendor.n(`tj-icon--${__props.size}`),
d: iconSrc.value,
e: common_vendor.o(onImageError, "4d")
} : {}, {
f: common_vendor.n(`tj-icon-wrap--${__props.size}`)
});
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f41c6626"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/tongji/components/TongjiIcon.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="{{['tj-icon-wrap', 'data-v-f41c6626', f]}}"><image wx:if="{{a}}" class="{{['tj-icon', 'data-v-f41c6626', b, c]}}" src="{{d}}" mode="aspectFit" binderror="{{e}}"/></view>
@@ -0,0 +1,75 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.tj-icon-wrap.data-v-f41c6626 {
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.tj-icon-wrap--sm.data-v-f41c6626 {
width: 32rpx;
height: 32rpx;
}
.tj-icon-wrap--md.data-v-f41c6626 {
width: 40rpx;
height: 40rpx;
}
.tj-icon-wrap--lg.data-v-f41c6626 {
width: 48rpx;
height: 48rpx;
}
.tj-icon-wrap--xl.data-v-f41c6626 {
width: 56rpx;
height: 56rpx;
}
.tj-icon.data-v-f41c6626 {
display: block;
width: 100%;
height: 100%;
}
/* Lucide send 路径重心偏右上,微调使圆形按钮内视觉居中 */
.tj-icon--send.data-v-f41c6626 {
transform: translate(-10%, 10%);
}
.tj-icon-fallback.data-v-f41c6626 {
display: block;
line-height: 1;
font-weight: 700;
text-align: center;
}
.tj-icon-fallback--sm.data-v-f41c6626 {
font-size: 24rpx;
}
.tj-icon-fallback--md.data-v-f41c6626 {
font-size: 30rpx;
}
.tj-icon-fallback--lg.data-v-f41c6626 {
font-size: 36rpx;
}
.tj-icon-fallback--xl.data-v-f41c6626 {
font-size: 42rpx;
}
@@ -0,0 +1,28 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
__name: "VoiceSpeakMascot",
props: {
/** 正在按住说话 / 录音中 */
active: { type: Boolean, default: false },
/** 深色条背景上使用浅色卡通 */
onDark: { type: Boolean, default: false },
size: { type: String, default: "md" }
},
setup(__props) {
return (_ctx, _cache) => {
return common_vendor.e({
a: __props.active
}, __props.active ? {} : {}, {
b: common_vendor.n(`vsm--${__props.size}`),
c: common_vendor.n({
"vsm--active": __props.active,
"vsm--on-dark": __props.onDark
})
});
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e1de3b0a"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/tongji/components/VoiceSpeakMascot.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="{{['vsm', 'data-v-e1de3b0a', b, c]}}"><view class="vsm-body data-v-e1de3b0a"><view class="vsm-leaf data-v-e1de3b0a" aria-hidden="true"/><view class="vsm-face data-v-e1de3b0a"><view class="vsm-eye vsm-eye--l data-v-e1de3b0a"/><view class="vsm-eye vsm-eye--r data-v-e1de3b0a"/><view class="vsm-blush vsm-blush--l data-v-e1de3b0a"/><view class="vsm-blush vsm-blush--r data-v-e1de3b0a"/><view class="vsm-mouth data-v-e1de3b0a"/></view><view wx:if="{{a}}" class="vsm-waves data-v-e1de3b0a" aria-hidden="true"><view class="vsm-wave vsm-wave--1 data-v-e1de3b0a"/><view class="vsm-wave vsm-wave--2 data-v-e1de3b0a"/><view class="vsm-wave vsm-wave--3 data-v-e1de3b0a"/></view></view></view>
@@ -0,0 +1,230 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.vsm.data-v-e1de3b0a {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.vsm--md.data-v-e1de3b0a {
width: 72rpx;
height: 72rpx;
}
.vsm--sm.data-v-e1de3b0a {
width: 64rpx;
height: 64rpx;
}
.vsm-body.data-v-e1de3b0a {
position: relative;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.vsm-leaf.data-v-e1de3b0a {
position: absolute;
top: 2rpx;
left: 50%;
width: 16rpx;
height: 16rpx;
margin-left: -8rpx;
border-radius: 0 100% 0 100%;
background: #34d399;
transform: rotate(-18deg);
z-index: 2;
}
.vsm--on-dark .vsm-leaf.data-v-e1de3b0a {
background: #a7f3d0;
}
.vsm-face.data-v-e1de3b0a {
position: relative;
width: 52rpx;
height: 52rpx;
border-radius: 50%;
background: #fef9c3;
border: 3rpx solid #047857;
box-shadow: 0 4rpx 10rpx rgba(4, 120, 87, 0.18);
z-index: 1;
}
.vsm--sm .vsm-face.data-v-e1de3b0a {
width: 46rpx;
height: 46rpx;
}
.vsm--on-dark .vsm-face.data-v-e1de3b0a {
background: #fffbeb;
border-color: rgba(255, 255, 255, 0.85);
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.12);
}
.vsm-eye.data-v-e1de3b0a {
position: absolute;
top: 16rpx;
width: 6rpx;
height: 8rpx;
border-radius: 50%;
background: #064e3b;
}
.vsm--sm .vsm-eye.data-v-e1de3b0a {
top: 14rpx;
width: 5rpx;
height: 7rpx;
}
.vsm--on-dark .vsm-eye.data-v-e1de3b0a {
background: #134e4a;
}
.vsm-eye--l.data-v-e1de3b0a {
left: 12rpx;
}
.vsm-eye--r.data-v-e1de3b0a {
right: 12rpx;
}
.vsm--sm .vsm-eye--l.data-v-e1de3b0a {
left: 10rpx;
}
.vsm--sm .vsm-eye--r.data-v-e1de3b0a {
right: 10rpx;
}
.vsm-blush.data-v-e1de3b0a {
position: absolute;
top: 24rpx;
width: 10rpx;
height: 6rpx;
border-radius: 50%;
background: rgba(251, 113, 133, 0.45);
opacity: 0.85;
}
.vsm--sm .vsm-blush.data-v-e1de3b0a {
top: 21rpx;
width: 8rpx;
height: 5rpx;
}
.vsm-blush--l.data-v-e1de3b0a {
left: 6rpx;
}
.vsm-blush--r.data-v-e1de3b0a {
right: 6rpx;
}
.vsm--on-dark .vsm-blush.data-v-e1de3b0a {
background: rgba(255, 255, 255, 0.35);
}
.vsm-mouth.data-v-e1de3b0a {
position: absolute;
left: 50%;
bottom: 10rpx;
width: 18rpx;
height: 8rpx;
margin-left: -9rpx;
border-radius: 0 0 18rpx 18rpx;
background: #047857;
transform-origin: center top;
}
.vsm--sm .vsm-mouth.data-v-e1de3b0a {
bottom: 9rpx;
width: 16rpx;
height: 7rpx;
margin-left: -8rpx;
}
.vsm--on-dark .vsm-mouth.data-v-e1de3b0a {
background: #ecfdf5;
}
.vsm-waves.data-v-e1de3b0a {
position: absolute;
right: -2rpx;
top: 50%;
display: flex;
align-items: flex-end;
gap: 4rpx;
height: 28rpx;
margin-top: -14rpx;
z-index: 0;
}
.vsm-wave.data-v-e1de3b0a {
width: 5rpx;
border-radius: 4rpx;
background: #047857;
animation: vsm-wave-jump-e1de3b0a 0.72s ease-in-out infinite;
}
.vsm--on-dark .vsm-wave.data-v-e1de3b0a {
background: rgba(255, 255, 255, 0.9);
}
.vsm-wave--1.data-v-e1de3b0a {
height: 10rpx;
animation-delay: 0s;
}
.vsm-wave--2.data-v-e1de3b0a {
height: 18rpx;
animation-delay: 0.12s;
}
.vsm-wave--3.data-v-e1de3b0a {
height: 12rpx;
animation-delay: 0.24s;
}
.vsm--active .vsm-body.data-v-e1de3b0a {
animation: vsm-bob-e1de3b0a 0.9s ease-in-out infinite;
}
.vsm--active .vsm-mouth.data-v-e1de3b0a {
animation: vsm-talk-e1de3b0a 0.32s ease-in-out infinite alternate;
}
.vsm--active .vsm-eye.data-v-e1de3b0a {
animation: vsm-blink-e1de3b0a 2.4s ease-in-out infinite;
}
@keyframes vsm-bob-e1de3b0a {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-4rpx);
}
}
@keyframes vsm-talk-e1de3b0a {
0% {
transform: scaleY(0.45);
border-radius: 0 0 18rpx 18rpx;
}
100% {
transform: scaleY(1.15);
height: 12rpx;
border-radius: 50%;
}
}
@keyframes vsm-blink-e1de3b0a {
0%, 42%, 46%, 100% {
transform: scaleY(1);
}
44% {
transform: scaleY(0.15);
}
}
@keyframes vsm-wave-jump-e1de3b0a {
0%, 100% {
transform: scaleY(0.45);
opacity: 0.55;
}
50% {
transform: scaleY(1);
opacity: 1;
}
}

Some files were not shown because too many files have changed in this diff Show More