diff --git a/.agents/skills/figma-design-to-code/SKILL.md b/.agents/skills/figma-design-to-code/SKILL.md new file mode 100644 index 0000000..6554fca --- /dev/null +++ b/.agents/skills/figma-design-to-code/SKILL.md @@ -0,0 +1,148 @@ +--- +name: figma-design-to-code +description: >- + Implement integration-ready UI code from a Figma selection or a provided nodeId using TemPad Dev MCP as the only source of design evidence (code snapshot, structure, assets, tokens, codegen config). Detect the target repo stack and conventions first, then translate TemPad Dev’s Tailwind-like JSX/Vue IR into project-native code without adding new dependencies. Never guess key styles or measurements. If required evidence is missing/contradictory or assets cannot be handled under repo policy, stop or ship a safe base with explicit warnings and omissions. +--- + +# TemPad Dev: Figma Design to Code + +This skill requires TemPad Dev MCP. If `tempad-dev:*` tools are unavailable/inactive/unauthorized, stop and tell the user to install TemPad Dev MCP and ensure it is activated in the TemPad Dev panel in the Figma design file. + +TemPad Dev outputs Tailwind-like IR in either JSX or Vue. Treat MCP outputs as design facts. Never guess key styles. + +## Evidence rules + +Priority order: + +1. `tempad-dev:get_code` (authoritative: explicit values, layout intent, warnings, assets, tokens, codegen, lang) +2. `tempad-dev:get_structure` (hierarchy, overlap, bounds clarification) + +Never invent: colors, typography (size/weight/line-height/letter-spacing), spacing, radius, borders, shadows, gradients, opacity/overlays, blur. + +Do not output `data-hint-*` attributes. + +Treat advanced/rare style output as high-confidence evidence from TemPad codegen. Preserve it unless it directly conflicts with repo constraints. + +## Workflow + +### 1) Detect repo conventions + +From the repo (do not assume), identify what is needed to integrate cleanly: + +- Framework/runtime and file conventions (React/Vue, TS/JS, SFC conventions, naming) +- Styling integration rules (utility allowed? class sorting? linting? extraction patterns?) +- Token/theme system (CSS variables, token files, naming, dark mode/modes) +- Asset policy (public folder vs imports, icon pipeline, hashing, directory rules) +- Existing primitives/components (buttons, inputs, typography, layout wrappers), import path conventions + +Only if the repo actually uses Tailwind (or Tailwind-compat tooling), also detect Tailwind version and conventions that affect class syntax/formatting. + +If uncertain, ask up to 3 minimal questions; otherwise proceed and warn where inferred. + +### 2) Fetch baseline design snapshot + +Call `tempad-dev:get_code` with: + +- `resolveTokens: false` +- pass `nodeId` only if user provided one; otherwise rely on the tool’s default behavior (current selection) +- `preferredLang`: choose what matches the repo (jsx or vue) + +Important: `get_code.lang` is the language actually used by MCP after considering TemPad Dev plugin/config priority. A plugin may override `preferredLang`. Use returned `lang` plus `codegen` facts to interpret the IR correctly, then translate to the repo’s required output. + +Record as design facts: + +- `code`, `lang` +- `warnings` +- `assets` (if present) +- `tokens` (if present) +- `codegen` (e.g. scale, length units, rootRem, and other normalization settings) + +### 3) Resolve warnings and uncertainty + +If warnings indicate missing/partial/uncertain evidence, act immediately: + +- `depth-cap`: call `get_code` once per listed subtree root `nodeId` and stitch results before implementing. + - If warning data indicates overflow (for example `cappedNodeOverflow=true`), treat evidence as incomplete and stop full implementation. Ask for narrower scope or user-prioritized subtrees. +- output budget exceeded error: pass a smaller subtree `nodeId` to narrow scope, then retry `get_code`. + - Always report current consumption, limit, and overage from the error text when asking for scope changes (for example `current ~7800 tokens / 31240 bytes; limit ~6000 tokens / 24000 bytes; over by ~1800 tokens / 7240 bytes`). +- Layout/overlap uncertainty: call `get_structure` to resolve contradictions. + - If contradictions remain after structure (or cannot be narrowed), stop. + +Retry policy: + +- Retry once only for transient transport/connectivity failures (e.g. timeout/disconnect/no active extension after reconnect/activation). +- Do not blind-retry deterministic errors (`depth-cap`, budget exceeded, invalid selection, node not visible). Change scope or inputs first. + +### 4) Assets handling (only if `assets` exists) + +Follow repo asset policy first: + +- Download bytes via TemPad-provided `asset.url`, save into repo at policy-correct path, reference with repo conventions. +- If policy forbids storing assets, you may reference TemPad URLs but must warn output depends on the local TemPad asset server. +- Do not read image/SVG bytes into LLM context for analysis. Treat assets as files to download/reference, not text evidence to parse. + +Never download assets from the public internet. Only TemPad-provided `asset.url`. + +### 5) Tokens mapping (only if `tokens` exists) + +Token evidence shape: + +- `tokens` is a record keyed by canonical CSS variable names (e.g. `--...`). +- Each token’s value is either a string or a record keyed by `Collection:Mode` strings whose values are strings. +- Any value string may reference other variables; preserve references. + +Mapping goal: integrate with repo tokens when safe; otherwise keep explicit values from `get_code`. + +Rules: + +1. Prefer existing repo tokens when you can justify equivalence using value equivalence (including references) plus semantic alignment in the repo. + Token naming can be supporting evidence, but do not map solely because names look similar. +2. Add new tokens only if the repo already has an established token workflow and this change is expected. +3. If mode selection or mapping remains ambiguous, keep explicit values and warn. + +Hints may be used only for reasoning about mode selection when present; never output hint attributes. + +### 6) Implement repo-native code + +Translate TemPad Dev IR into the repo’s conventions: + +- Utility-first repo (Tailwind/UnoCSS): keep utility classes; adjust ordering/formatting to match repo rules. If Tailwind is used, respect the repo’s Tailwind version/config before changing class syntax. +- Non-utility repo: translate utilities into the repo’s styling approach (CSS Modules/scoped CSS/Sass/CSS-in-JS) while preserving explicit values. + +Constraints: + +- Do not introduce new frameworks or styling systems. +- New runtime/build dependencies require user confirmation unless the user explicitly says no confirmation is needed. +- Implement base state only unless variants/states are provable from repo conventions or evidence. +- Preserve high-fidelity style details from `get_code` (including pseudo-elements/pseudo-classes, uncommon style properties, filters/masks/blend/backdrop effects, and non-default compositing details). Do not simplify them away unless required by repo constraints. + +Component extraction and primitives: + +- Extract only when repetition + repo patterns justify it. +- Prefer existing repo primitives/components when they match intended semantics and do not require guessing styles. + +### 7) Semantics and accessibility minimums + +Only apply when the IR would otherwise require plain container semantics (e.g. clickable `div`) and you are not already using an appropriate repo primitive/component: + +- Use native elements where appropriate (`button`, `a`, `input/label`). +- Ensure keyboard interaction and focusability. +- Add accessible names when needed (`aria-label`, `alt`). + +Assume the repo’s existing CSS reset/normalize. Do not add new reset libraries or global CSS unless the repo already has a defined pattern for it. + +### 8) Exit and wrap-up + +Stop (do not ship code) when: + +- TemPad Dev MCP is unavailable/unauthorized, or target cannot be read +- Evidence is contradictory and cannot be resolved via structure or narrower scope +- Required assets cannot be retrieved/stored under repo policy + +Otherwise, ship the best-evidence base implementation and end with: + +- Evidence caveats: any `warnings`, omissions, or inferred repo conventions +- Assets: stored vs TemPad URLs, and any policy-driven constraints +- Tokens: mapped vs explicit values, and any ambiguity +- Dependencies: whether any were added (and whether user confirmation was obtained) +- If stopped: next required info (max 3 items) diff --git a/.trae/skills/figma-design-to-code/SKILL.md b/.trae/skills/figma-design-to-code/SKILL.md new file mode 100644 index 0000000..6554fca --- /dev/null +++ b/.trae/skills/figma-design-to-code/SKILL.md @@ -0,0 +1,148 @@ +--- +name: figma-design-to-code +description: >- + Implement integration-ready UI code from a Figma selection or a provided nodeId using TemPad Dev MCP as the only source of design evidence (code snapshot, structure, assets, tokens, codegen config). Detect the target repo stack and conventions first, then translate TemPad Dev’s Tailwind-like JSX/Vue IR into project-native code without adding new dependencies. Never guess key styles or measurements. If required evidence is missing/contradictory or assets cannot be handled under repo policy, stop or ship a safe base with explicit warnings and omissions. +--- + +# TemPad Dev: Figma Design to Code + +This skill requires TemPad Dev MCP. If `tempad-dev:*` tools are unavailable/inactive/unauthorized, stop and tell the user to install TemPad Dev MCP and ensure it is activated in the TemPad Dev panel in the Figma design file. + +TemPad Dev outputs Tailwind-like IR in either JSX or Vue. Treat MCP outputs as design facts. Never guess key styles. + +## Evidence rules + +Priority order: + +1. `tempad-dev:get_code` (authoritative: explicit values, layout intent, warnings, assets, tokens, codegen, lang) +2. `tempad-dev:get_structure` (hierarchy, overlap, bounds clarification) + +Never invent: colors, typography (size/weight/line-height/letter-spacing), spacing, radius, borders, shadows, gradients, opacity/overlays, blur. + +Do not output `data-hint-*` attributes. + +Treat advanced/rare style output as high-confidence evidence from TemPad codegen. Preserve it unless it directly conflicts with repo constraints. + +## Workflow + +### 1) Detect repo conventions + +From the repo (do not assume), identify what is needed to integrate cleanly: + +- Framework/runtime and file conventions (React/Vue, TS/JS, SFC conventions, naming) +- Styling integration rules (utility allowed? class sorting? linting? extraction patterns?) +- Token/theme system (CSS variables, token files, naming, dark mode/modes) +- Asset policy (public folder vs imports, icon pipeline, hashing, directory rules) +- Existing primitives/components (buttons, inputs, typography, layout wrappers), import path conventions + +Only if the repo actually uses Tailwind (or Tailwind-compat tooling), also detect Tailwind version and conventions that affect class syntax/formatting. + +If uncertain, ask up to 3 minimal questions; otherwise proceed and warn where inferred. + +### 2) Fetch baseline design snapshot + +Call `tempad-dev:get_code` with: + +- `resolveTokens: false` +- pass `nodeId` only if user provided one; otherwise rely on the tool’s default behavior (current selection) +- `preferredLang`: choose what matches the repo (jsx or vue) + +Important: `get_code.lang` is the language actually used by MCP after considering TemPad Dev plugin/config priority. A plugin may override `preferredLang`. Use returned `lang` plus `codegen` facts to interpret the IR correctly, then translate to the repo’s required output. + +Record as design facts: + +- `code`, `lang` +- `warnings` +- `assets` (if present) +- `tokens` (if present) +- `codegen` (e.g. scale, length units, rootRem, and other normalization settings) + +### 3) Resolve warnings and uncertainty + +If warnings indicate missing/partial/uncertain evidence, act immediately: + +- `depth-cap`: call `get_code` once per listed subtree root `nodeId` and stitch results before implementing. + - If warning data indicates overflow (for example `cappedNodeOverflow=true`), treat evidence as incomplete and stop full implementation. Ask for narrower scope or user-prioritized subtrees. +- output budget exceeded error: pass a smaller subtree `nodeId` to narrow scope, then retry `get_code`. + - Always report current consumption, limit, and overage from the error text when asking for scope changes (for example `current ~7800 tokens / 31240 bytes; limit ~6000 tokens / 24000 bytes; over by ~1800 tokens / 7240 bytes`). +- Layout/overlap uncertainty: call `get_structure` to resolve contradictions. + - If contradictions remain after structure (or cannot be narrowed), stop. + +Retry policy: + +- Retry once only for transient transport/connectivity failures (e.g. timeout/disconnect/no active extension after reconnect/activation). +- Do not blind-retry deterministic errors (`depth-cap`, budget exceeded, invalid selection, node not visible). Change scope or inputs first. + +### 4) Assets handling (only if `assets` exists) + +Follow repo asset policy first: + +- Download bytes via TemPad-provided `asset.url`, save into repo at policy-correct path, reference with repo conventions. +- If policy forbids storing assets, you may reference TemPad URLs but must warn output depends on the local TemPad asset server. +- Do not read image/SVG bytes into LLM context for analysis. Treat assets as files to download/reference, not text evidence to parse. + +Never download assets from the public internet. Only TemPad-provided `asset.url`. + +### 5) Tokens mapping (only if `tokens` exists) + +Token evidence shape: + +- `tokens` is a record keyed by canonical CSS variable names (e.g. `--...`). +- Each token’s value is either a string or a record keyed by `Collection:Mode` strings whose values are strings. +- Any value string may reference other variables; preserve references. + +Mapping goal: integrate with repo tokens when safe; otherwise keep explicit values from `get_code`. + +Rules: + +1. Prefer existing repo tokens when you can justify equivalence using value equivalence (including references) plus semantic alignment in the repo. + Token naming can be supporting evidence, but do not map solely because names look similar. +2. Add new tokens only if the repo already has an established token workflow and this change is expected. +3. If mode selection or mapping remains ambiguous, keep explicit values and warn. + +Hints may be used only for reasoning about mode selection when present; never output hint attributes. + +### 6) Implement repo-native code + +Translate TemPad Dev IR into the repo’s conventions: + +- Utility-first repo (Tailwind/UnoCSS): keep utility classes; adjust ordering/formatting to match repo rules. If Tailwind is used, respect the repo’s Tailwind version/config before changing class syntax. +- Non-utility repo: translate utilities into the repo’s styling approach (CSS Modules/scoped CSS/Sass/CSS-in-JS) while preserving explicit values. + +Constraints: + +- Do not introduce new frameworks or styling systems. +- New runtime/build dependencies require user confirmation unless the user explicitly says no confirmation is needed. +- Implement base state only unless variants/states are provable from repo conventions or evidence. +- Preserve high-fidelity style details from `get_code` (including pseudo-elements/pseudo-classes, uncommon style properties, filters/masks/blend/backdrop effects, and non-default compositing details). Do not simplify them away unless required by repo constraints. + +Component extraction and primitives: + +- Extract only when repetition + repo patterns justify it. +- Prefer existing repo primitives/components when they match intended semantics and do not require guessing styles. + +### 7) Semantics and accessibility minimums + +Only apply when the IR would otherwise require plain container semantics (e.g. clickable `div`) and you are not already using an appropriate repo primitive/component: + +- Use native elements where appropriate (`button`, `a`, `input/label`). +- Ensure keyboard interaction and focusability. +- Add accessible names when needed (`aria-label`, `alt`). + +Assume the repo’s existing CSS reset/normalize. Do not add new reset libraries or global CSS unless the repo already has a defined pattern for it. + +### 8) Exit and wrap-up + +Stop (do not ship code) when: + +- TemPad Dev MCP is unavailable/unauthorized, or target cannot be read +- Evidence is contradictory and cannot be resolved via structure or narrower scope +- Required assets cannot be retrieved/stored under repo policy + +Otherwise, ship the best-evidence base implementation and end with: + +- Evidence caveats: any `warnings`, omissions, or inferred repo conventions +- Assets: stored vs TemPad URLs, and any policy-driven constraints +- Tokens: mapped vs explicit values, and any ambiguity +- Dependencies: whether any were added (and whether user confirmation was obtained) +- If stopped: next required info (max 3 items) diff --git a/eslint.config.mjs b/eslint.config.mjs index dc39439..3149fb5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -10,14 +10,14 @@ export default antfu( stylistic: false, parserOptions: { project: ['./tsconfig.json'] }, globals: { - wx: true, - App: true, - Page: true, - getCurrentPages: true, - getApp: true, - Component: true, - requirePlugin: true, - requireMiniProgram: true, + wx: 'readonly', + App: 'readonly', + Page: 'readonly', + getCurrentPages: 'readonly', + getApp: 'readonly', + Component: 'readonly', + requirePlugin: 'readonly', + requireMiniProgram: 'readonly', }, rules: { 'eslint-comments/no-unlimited-disable': 'off', diff --git a/skills-lock.json b/skills-lock.json new file mode 100644 index 0000000..d121b85 --- /dev/null +++ b/skills-lock.json @@ -0,0 +1,10 @@ +{ + "version": 1, + "skills": { + "figma-design-to-code": { + "source": "ecomfe/tempad-dev", + "sourceType": "github", + "computedHash": "3c4e79fb7fe6095d2fa1a27698e9c701547c595a67c48b3ce38716c6ed48803c" + } + } +} diff --git a/src/app.ts b/src/app.ts index 549972a..9df5a17 100644 --- a/src/app.ts +++ b/src/app.ts @@ -30,11 +30,10 @@ App({ imageUrl: 'https://app.yd.hbraas.com/images/', // pro - // appid:wx96104303877e3fd9 老的正式环境,已弃用 // appid:wxfc95e2961d481f58 - // url: 'https://m.hbgene.hbsaas.com', - // upFileUrl: 'https://m.hbgene.hbsaas.com/', - // imageUrl: 'https://m.hbgene.hbsaas.com/GeneB/', + // url: 'https://app.yd.hbsaas.com', + // upFileUrl: 'https://app.yd.hbsaas.com/', + // imageUrl: 'https://app.yd.hbsaas.com/images/', Timestamp: new Date().getTime(), diff --git a/src/components/pickerArea/index.wxml b/src/components/pickerArea/index.wxml index f4b30a8..7897165 100644 --- a/src/components/pickerArea/index.wxml +++ b/src/components/pickerArea/index.wxml @@ -9,11 +9,11 @@ {{ProvinceName || '请选择省份'}} - + {{CityName || '请选择城市'}} - + 确定 diff --git a/src/components/uploadFile/index.js b/src/components/uploadFile/index.js index 27e45ed..c6beeb4 100644 --- a/src/components/uploadFile/index.js +++ b/src/components/uploadFile/index.js @@ -86,7 +86,7 @@ Component({ }) wx.previewMedia({ current: index, - sources: sources, + sources, }) } else if (params.fileType !== 'audio') { wx.downloadFile({ @@ -120,7 +120,7 @@ Component({ icon: 'none', }) wx.downloadFile({ - url: item.fileUrl, + url: item.url || item.fileUrl, success(res) { if (item.type === 'image') { wx.saveImageToPhotosAlbum({ @@ -164,7 +164,7 @@ Component({ wx.uploadFile({ filePath: item.tempFilePath, name: 'file', - url: url, + url, success: (res) => { let data = JSON.parse(res.data) let expandJson = { @@ -191,11 +191,11 @@ Component({ }) }, GetExtensionFileName(pathfilename) { - var reg = /(\\+)/g - var pString = pathfilename.replace(reg, '#') //用正则表达式来将\或\\替换成# - var arr = pString.split('#') // 以“#”为分隔符,将字符分解为数组 例如 D Program Files bg.png - var lastString = arr[arr.length - 1] //取最后一个字符 - var arr2 = lastString.split('.') // 再以"."作为分隔符 + let reg = /(\\+)/g + let pString = pathfilename.replace(reg, '#') //用正则表达式来将\或\\替换成# + let arr = pString.split('#') // 以“#”为分隔符,将字符分解为数组 例如 D Program Files bg.png + let lastString = arr[arr.length - 1] //取最后一个字符 + let arr2 = lastString.split('.') // 再以"."作为分隔符 return arr2[arr2.length - 1] //将后缀名返回出来 }, upFile(data) { @@ -246,7 +246,7 @@ Component({ } wx.chooseMedia({ mediaType: ['image', 'video'], - count: count, + count, sourceType: ['album', 'camera'], sizeType: ['original'], success: (res) => { @@ -267,7 +267,7 @@ Component({ count = maxNum - fileList.length } wx.chooseMessageFile({ - count: count, + count, type: 'file', extension: ['doc', 'docx', 'pdf', 'xlsx', 'xls', 'ppt', 'pptx'], success: (res) => { diff --git a/src/components/uploadFile/index.scss b/src/components/uploadFile/index.scss index 3c63d8c..e69de29 100644 --- a/src/components/uploadFile/index.scss +++ b/src/components/uploadFile/index.scss @@ -1,91 +0,0 @@ -/* components/uploadFile/index.wxss */ -.upload-list { - display: grid; - grid-template-columns: repeat(3, minmax(160rpx, 200rpx)); - gap: 18rpx; - - .item { - height: 180rpx; - position: relative; - line-height: 0; - background-color: rgba(247, 247, 250, 1); - border-radius: 12rpx; - display: flex; - align-items: center; - justify-content: center; - .item_mask { - position: absolute; - width: 100%; - height: 100%; - left: 0; - top: 0; - display: flex; - justify-content: center; - align-items: center; - .item_mask_icon { - border-radius: 100%; - overflow: hidden; - background: #fff; - font-size: 0; - } - } - .image { - width: 100%; - height: 100%; - border-radius: 12rpx; - } - .sub-image { - width: 104rpx; - height: 104rpx; - } - .clear { - position: absolute; - right: 0; - top: 0; - width: 36rpx; - height: 36rpx; - z-index: 9; - } - } - - .btn { - width: 188rpx; - height: 188rpx; - border-radius: 12rpx; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - background-color: rgba(247, 247, 250, 1); - .name { - margin-top: 12rpx; - font-size: 28rpx; - color: rgba(207, 209, 213, 1); - } - } -} - -.popup { - padding: 102rpx 48rpx calc(102rpx + env(safe-area-inset-bottom)); - display: flex; - align-items: center; - gap: 30rpx; - justify-content: space-between; - background-color: rgba(247, 247, 250, 1); - .item { - padding: 32rpx; - flex: 1; - border-radius: 36rpx; - background-color: #fff; - text-align: center; - .title { - margin-top: 16rpx; - font-size: 32rpx; - color: rgba(1, 1, 5, 1); - } - .icon { - width: 136rpx; - height: 136rpx; - } - } -} diff --git a/src/doctor/pages/article/index.scss b/src/doctor/pages/article/index.scss index 4f77500..befb70b 100644 --- a/src/doctor/pages/article/index.scss +++ b/src/doctor/pages/article/index.scss @@ -26,7 +26,7 @@ page { .content { margin-top: 32rpx; font-size: 32rpx; - color: #afaba9; + color: #8F8D8C; } .page-footer { position: fixed; @@ -51,7 +51,7 @@ page { } .num { font-size: 32rpx; - color: #b7b7b7; + color: #8F8D8C; } } } diff --git a/src/doctor/pages/article/index.wxml b/src/doctor/pages/article/index.wxml index 03077d6..87f24b6 100644 --- a/src/doctor/pages/article/index.wxml +++ b/src/doctor/pages/article/index.wxml @@ -16,6 +16,7 @@ + 123 diff --git a/src/doctor/pages/articleList/index.scss b/src/doctor/pages/articleList/index.scss index f9a1ede..4bfd5c8 100644 --- a/src/doctor/pages/articleList/index.scss +++ b/src/doctor/pages/articleList/index.scss @@ -22,9 +22,12 @@ page { font-size: 28rpx; color: #342317; line-height: 48rpx; + min-width: 25vw; + box-sizing: border-box; &.active { position: relative; color: #ff8a4c; + font-size: 32rpx; &::after { position: absolute; bottom: 0; diff --git a/src/doctor/pages/home/index.scss b/src/doctor/pages/home/index.scss index f544a50..cdc43af 100644 --- a/src/doctor/pages/home/index.scss +++ b/src/doctor/pages/home/index.scss @@ -20,7 +20,6 @@ page { margin: 48rpx 0 0 32rpx; display: flex; justify-content: space-between; - align-items: start; gap: 20rpx; .avatar { flex-shrink: 0; @@ -35,13 +34,16 @@ page { .name { font-size: 36rpx; color: #ffffff; + display: flex; + align-items: center; + gap: 12rpx; .label { margin-top: 8rpx; - padding: 0 12rpx; + padding: 4rpx 12rpx; display: inline-block; font-size: 28rpx; color: #ffffff; - line-height: 36rpx; + line-height: 1; border-radius: 6rpx; background: linear-gradient(84deg, #fece55 0%, #ffb700 100%); } @@ -57,22 +59,66 @@ page { } } .code { - padding: 16rpx 28rpx; - border: 1px solid #fff; - border-radius: 24rpx 0 0 24rpx; - border-right: none; - background: linear-gradient(180deg, #f57b3d 0%, #ffa64d 100%); - display: flex; - align-items: center; - gap: 8rpx; .icon { display: block; - width: 52rpx; - height: 52rpx; + width: 152rpx; + height: 84rpx; } - .arrow { + } + } + .todo-data { + margin: 32rpx; + padding: 32rpx; + background: linear-gradient(180deg, #ffeede 0%, #ffffff 27.84%, #ffffff 100%); + border-radius: 24rpx 24rpx 24rpx 24rpx; + border: 2rpx solid #ffffff; + .t-header { + display: flex; + align-items: center; + justify-content: space-between; + .title { + font-size: 36rpx; + color: #342317; + font-weight: bold; + } + .tip { font-size: 28rpx; - color: #ffffff; + color: #b7b7b7; + } + } + .row { + margin: 32rpx 0 0; + padding: 24rpx; + background: linear-gradient(90deg, #ff8a4c 0%, #fece55 100%); + border-radius: 16rpx 16rpx 16rpx 16rpx; + display: flex; + justify-content: space-between; + align-items: center; + .col { + flex: 1; + border-right: 1px solid rgba(245, 244, 243, 0.47); + display: flex; + flex-direction: column; + align-items: center; + &:last-child { + border-right: none; + } + .name { + min-width: 4em; + font-size: 28rpx; + color: #ffffff; + line-height: 36rpx; + white-space: pre-line; + text-align: left; + } + .num { + width: 100%; + margin-top: 8rpx; + font-size: 44rpx; + color: #ffffff; + line-height: 48rpx; + text-align: left; + } } } } @@ -183,7 +229,7 @@ page { } } .chat-data { - margin: 32rpx 32rpx; + margin: 32rpx 32rpx 0; padding: 32rpx; background: linear-gradient(180deg, #fff6ed 0%, #ffffff 7.03%, #ffffff 100%); border-radius: 24rpx 24rpx 24rpx 24rpx; diff --git a/src/doctor/pages/home/index.wxml b/src/doctor/pages/home/index.wxml index 3b123a3..6520a65 100644 --- a/src/doctor/pages/home/index.wxml +++ b/src/doctor/pages/home/index.wxml @@ -1,7 +1,7 @@ 特诺雅 - ® + ® @@ -21,8 +21,33 @@ 入组时间:2026/02/03 - - + + + + + + 待处理事项 + 实时数据 + + + + + 待处理\n患者数 + 25 + + + + + 跳转证明\n待上传 + 25 + + + + + 入组证明\n待上传 + 25 + + diff --git a/src/doctor/pages/invite/index.scss b/src/doctor/pages/invite/index.scss index 914afbb..a77263b 100644 --- a/src/doctor/pages/invite/index.scss +++ b/src/doctor/pages/invite/index.scss @@ -57,7 +57,7 @@ text-align: center; } .bg { - margin: -12rpx auto 0; + margin: -14rpx auto 0; width: 140rpx; height: 16rpx; background: linear-gradient(90deg, #fdd260 0%, rgba(253, 210, 96, 0.07) 100%); diff --git a/src/doctor/pages/patientList/index.scss b/src/doctor/pages/patientList/index.scss index 20191b8..82f14ba 100644 --- a/src/doctor/pages/patientList/index.scss +++ b/src/doctor/pages/patientList/index.scss @@ -124,7 +124,7 @@ page { .card { margin: 32rpx; padding: 32rpx; - background: linear-gradient(0deg, #fff6ed 0%, #ffffff 21.63%, #ffffff 100%); + background: linear-gradient(180deg, #fff6ed 0%, #ffffff 21.63%, #ffffff 100%); border-radius: 24rpx 24rpx 24rpx 24rpx; border: 2rpx solid #ffffff; .user { diff --git a/src/doctor/pages/patientList/index.wxml b/src/doctor/pages/patientList/index.wxml index 302f9ee..e0a36f7 100644 --- a/src/doctor/pages/patientList/index.wxml +++ b/src/doctor/pages/patientList/index.wxml @@ -1,6 +1,7 @@ - 特诺雅® + 特诺雅 + ® @@ -60,7 +61,7 @@ - + @@ -105,7 +106,7 @@ - + @@ -131,7 +132,7 @@ 2026/01/10 16:27:35 驳回 - 重新提交 + 重新提交 材料信息不全 @@ -151,7 +152,7 @@ - + @@ -186,13 +187,17 @@ - 未跳转 + 已入组 2026/01/10 16:27:35 + + 审核通过 + 查看提交材料 + diff --git a/src/doctor/pages/stat/index.scss b/src/doctor/pages/stat/index.scss index f928e4d..79af3cf 100644 --- a/src/doctor/pages/stat/index.scss +++ b/src/doctor/pages/stat/index.scss @@ -117,7 +117,7 @@ page { } } .m-container { - padding-top: 46rpx; + padding-top: 44rpx; .date { font-size: 32rpx; color: #4a5555; diff --git a/src/ground/pages/home/index.scss b/src/ground/pages/home/index.scss index 4d58a36..2ae5895 100644 --- a/src/ground/pages/home/index.scss +++ b/src/ground/pages/home/index.scss @@ -20,7 +20,7 @@ page { margin: 48rpx 0 0 32rpx; display: flex; justify-content: space-between; - align-items: start; + align-items: center; gap: 20rpx; .avatar { flex-shrink: 0; @@ -30,7 +30,6 @@ page { border: 1px solid #fff; } .wrap { - padding-top: 8rpx; flex: 1; .name { font-size: 36rpx; @@ -38,32 +37,20 @@ page { } .label { margin-top: 8rpx; - padding: 0 12rpx; + padding: 4rpx 12rpx; display: inline-block; font-size: 28rpx; color: #ffffff; - line-height: 36rpx; + line-height: 1; border-radius: 6rpx; background: linear-gradient(86deg, #fcd675 0%, #ffb700 100%); } } .code { - padding: 16rpx 28rpx; - border: 1px solid #fff; - border-radius: 24rpx 0 0 24rpx; - border-right: none; - background: linear-gradient(193deg, #4a8dff 0%, #3bddc9 100%); - display: flex; - align-items: center; - gap: 8rpx; .icon { display: block; - width: 52rpx; - height: 52rpx; - } - .arrow { - font-size: 28rpx; - color: #ffffff; + width: 152rpx; + height: 84rpx; } } } @@ -136,7 +123,8 @@ page { border-radius: 16rpx 16rpx 0 0; .col { flex: 1; - padding: 28rpx 34rpx; + padding: 28rpx 0; + text-indent: 1em; .name { font-size: 28rpx; color: #ffffff; @@ -196,6 +184,29 @@ page { } } } + .chat-switch-btns { + margin: 24rpx 32rpx 0; + display: flex; + align-items: center; + gap: 24rpx; + padding: 12rpx; + background: linear-gradient(180deg, #eff5ff 0%, #ffffff 100%); + border-radius: 96rpx 96rpx 96rpx 96rpx; + border: 2rpx solid #ffffff; + .btn { + flex: 1; + width: 148rpx; + height: 72rpx; + display: flex; + align-items: center; + justify-content: center; + border-radius: 1748rpx 1748rpx 1748rpx 1748rpx; + &.active { + background-color: #4a8dff; + color: #fff; + } + } + } .chat-data { margin: 32rpx 32rpx; padding: 32rpx; @@ -211,31 +222,8 @@ page { color: #1a2020; font-weight: bold; } - .switch-btns { - flex: 1; - display: flex; - align-items: center; - gap: 24rpx; - .btn { - flex: 1; - width: 148rpx; - height: 56rpx; - display: flex; - align-items: center; - justify-content: center; - background: #ffffff; - border-radius: 1748rpx 1748rpx 1748rpx 1748rpx; - border: 1px solid #edf2f2; - &.active { - background-color: #4a8dff; - color: #fff; - border-color: #4a8dff; - } - } - } } .c-options { - margin-top: 28rpx; display: flex; align-items: center; justify-content: space-between; diff --git a/src/ground/pages/home/index.wxml b/src/ground/pages/home/index.wxml index 8236317..1f1434e 100644 --- a/src/ground/pages/home/index.wxml +++ b/src/ground/pages/home/index.wxml @@ -1,7 +1,7 @@ 特诺雅 - ® + ® @@ -18,7 +18,6 @@ - @@ -110,13 +109,13 @@ + + 月统计 + 日统计 + - - 月统计 - 日统计 - diff --git a/src/ground/pages/invite/index.scss b/src/ground/pages/invite/index.scss index 69782fa..3c7abd5 100644 --- a/src/ground/pages/invite/index.scss +++ b/src/ground/pages/invite/index.scss @@ -57,7 +57,7 @@ text-align: center; } .bg { - margin: -12rpx auto 0; + margin: -14rpx auto 0; width: 140rpx; height: 16rpx; background: linear-gradient(90deg, #fdd260 0%, rgba(253, 210, 96, 0.07) 100%); diff --git a/src/ground/pages/pharmacist/index.scss b/src/ground/pages/pharmacist/index.scss index fe4d2df..2b2cb4e 100644 --- a/src/ground/pages/pharmacist/index.scss +++ b/src/ground/pages/pharmacist/index.scss @@ -38,27 +38,44 @@ page { color: #b5b8bb; } } - .options { - margin-top: 8rpx; + .range { + margin: 32rpx 0 0; + border-radius: 12rpx; display: flex; align-items: center; justify-content: space-between; - .date { - padding: 24rpx 22rpx; + .label { + flex-shrink: 0; + font-size: 32rpx; + color: #342317; + } + .r-wrap { + flex: 1; display: flex; align-items: center; - font-size: 32rpx; - color: #1a2020; - .icon { - width: 48rpx; - height: 48rpx; + justify-content: space-between; + background-color: #f8fafa; + border-radius: 12rpx; + .picker { + flex: 1; + .date { + padding: 10rpx 0; + text-align: center; + font-size: 32rpx; + color: #b5b8bb; + line-height: 44rpx; + } } - } - .total { - font-size: 32rpx; - color: #1a2020; - .num { - color: #4a8dff; + .line { + margin: 0 10rpx; + width: 24rpx; + height: 1px; + background-color: rgba(181, 184, 187, 0.25); + } + .icon { + margin-right: 16rpx; + width: 44rpx; + height: 44rpx; } } } @@ -66,8 +83,16 @@ page { .page-container { padding: 32rpx; + .total { + text-align: right; + font-size: 32rpx; + color: #1a2020; + .num { + color: #4a8dff; + } + } .pharmacist-card { - margin-bottom: 32rpx; + margin-top: 32rpx; padding: 32rpx 32rpx 0; background: linear-gradient(0deg, #ffffff 0%, #ffffff 73.04%, #eff5ff 100%); border-radius: 24rpx 24rpx 24rpx 24rpx; @@ -76,6 +101,7 @@ page { /* 药师基本信息 */ .user { display: flex; + align-items: center; gap: 20rpx; .avatar { flex-shrink: 0; @@ -118,6 +144,7 @@ page { justify-content: space-between; border-bottom: 1px solid #fff; background-color: #f8fafa; + border-radius: 24rpx; .stat-item { flex: 1; diff --git a/src/ground/pages/pharmacist/index.wxml b/src/ground/pages/pharmacist/index.wxml index 7eb844e..21efa15 100644 --- a/src/ground/pages/pharmacist/index.wxml +++ b/src/ground/pages/pharmacist/index.wxml @@ -1,7 +1,7 @@ 特诺雅 - ® + ® @@ -19,21 +19,26 @@ bindconfirm="handleSearch" /> - - - - 时间筛选 - - - - - 已邀约总人数: - 28 - 人 + + 时间筛选: + + + 开始时间 + + + + 开始时间 + + + + 已邀约总人数: + 28 + 人 + diff --git a/src/ground/pages/stat/index.scss b/src/ground/pages/stat/index.scss index 7b7172f..55d7f92 100644 --- a/src/ground/pages/stat/index.scss +++ b/src/ground/pages/stat/index.scss @@ -118,7 +118,7 @@ page { } } .m-container { - padding-top: 46rpx; + padding-top: 42rpx; .date { font-size: 32rpx; color: #4a5555; diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index ece4210..997aa6b 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -1,3 +1,6 @@ +page { + background-color: #f8fafa; +} .page-title { font-weight: 900; font-size: 44rpx; @@ -31,7 +34,7 @@ filter: blur(16.5px); } .prompt-title { - margin-top: 104rpx; + margin-top: 84rpx; display: block; font-weight: 600; font-size: 36rpx; @@ -113,6 +116,42 @@ } } } + .complete { + margin-top: 48rpx; + padding: 104rpx 40rpx 58rpx; + background: #ffffff; + border-radius: 24rpx 24rpx 24rpx 24rpx; + border: 1rpx solid #edf2f2; + .bg { + margin: 0 auto; + display: block; + width: 514rpx; + height: 370rpx; + } + .title { + margin-top: -30rpx; + text-align: center; + font-size: 36rpx; + color: #1a2020; + font-weight: bold; + } + .content { + margin-top: 20rpx; + font-size: 36rpx; + color: #94a3a3; + text-align: center; + } + .jump { + margin-top: 72rpx; + height: 96rpx; + font-size: 36rpx; + color: #ffffff; + text-align: center; + line-height: 96rpx; + background: #00b2a9; + border-radius: 102rpx 102rpx 102rpx 102rpx; + } + } .work { position: fixed; bottom: 120rpx; diff --git a/src/pages/index/index.ts b/src/pages/index/index.ts index 7611922..8c7bc9f 100644 --- a/src/pages/index/index.ts +++ b/src/pages/index/index.ts @@ -23,7 +23,7 @@ Page({ }, // 生命周期函数:页面加载 - onLoad(options) { + onLoad() { const app = getApp() app.waitLogin().then(() => { // 登录后调用页面所需的接口 diff --git a/src/pages/index/index.wxml b/src/pages/index/index.wxml index bb87407..6ffe7d3 100644 --- a/src/pages/index/index.wxml +++ b/src/pages/index/index.wxml @@ -12,31 +12,43 @@ - 请确认您是特诺雅®的已处方患者 - 本品为注射针剂,需遵医嘱使用,请根据您的处方选择您的适应症 - - + + + + + 同意 + 《用户与隐私保护协议》 - - - - - - 同意 - 《用户与隐私保护协议》 + + + + 您已参加此项目 + 您选择适应症:斑块状银屑病 + 去腾讯药箱看看 我是工作人员 diff --git a/src/pages/start/index.json b/src/pages/start/index.json index b16ef3e..e3ceeb9 100644 --- a/src/pages/start/index.json +++ b/src/pages/start/index.json @@ -1,4 +1,7 @@ { "navigationStyle": "custom", - "usingComponents": {} + "usingComponents": { + "popup": "/components/popup/index", + "navbar": "/components/navbar/index" + } } diff --git a/src/pages/start/index.scss b/src/pages/start/index.scss index 7017829..a5d2a3a 100644 --- a/src/pages/start/index.scss +++ b/src/pages/start/index.scss @@ -1,4 +1,29 @@ -.page{ - width: 100vw; - height: 100vh; +page { + background-color: #f8fafa; +} +.page-title { + font-weight: 900; + font-size: 44rpx; + line-height: 52rpx; + color: #00b2a9; +} + +.page { + .page-banner { + width: 100vw; + height: 1108rpx; + display: block; + } + .page-options { + margin-top: 68rpx; + display: flex; + align-items: center; + .o-item { + flex: 1; + border-right: 1px solid rgba(148, 163, 163, 0.29); + text-align: center; + font-size: 32rpx; + color: #94a3a3; + } + } } diff --git a/src/pages/start/index.ts b/src/pages/start/index.ts index b5dd00d..9b693b4 100644 --- a/src/pages/start/index.ts +++ b/src/pages/start/index.ts @@ -8,15 +8,16 @@ Page({ const { doctorId } = parseScene(options.scene) as { doctorId: string } app.globalData.waitBindDoctorId = doctorId } + // app.waitLogin().then(() => { // const initLoginInfo = app.globalData.initLoginInfo || {} // wx.reLaunch({ // url: '/pages/index/index', // }) // }) - wx.reLaunch({ - url: '/pages/index/index', - }) + // wx.reLaunch({ + // url: '/pages/index/index', + // }) }, }) diff --git a/src/pages/start/index.wxml b/src/pages/start/index.wxml index c07334d..a01a2c8 100644 --- a/src/pages/start/index.wxml +++ b/src/pages/start/index.wxml @@ -1 +1,11 @@ - + + 华观健康 + + + + + + 我是药店工作人员 + 我是地推人员 + +