This commit is contained in:
@zuopngfei 2025-06-24 18:39:49 +08:00
parent 8148fb528c
commit 8acd2266b4
50 changed files with 10816 additions and 1528 deletions

View File

@ -24,10 +24,10 @@ function request(url, method = 'GET', data = {}) {
setTimeout(() => {
if(res.data.code && res.data.code == 10103){
wx.removeStorageSync('access_token');
wx.switchTab({
url: '/pages/my/index',
})
// wx.removeStorageSync('access_token');
// wx.switchTab({
// url: '/pages/my/index',
// })
reject(res.data);
} else {
console.log(res.data)

View File

@ -5,28 +5,25 @@
},
"subpackages": [
{
"root": "pages/my/info-edit",
"name": "edit",
"pages": ["index"]
},
{
"root": "pages/login",
"name": "login",
"pages": ["login"]
},
{
"root": "pages/loginCode",
"name": "loginCode",
"pages": ["loginCode"]
},
{
"root": "pages/home",
"name": "home",
"pages": ["index"]
}
},
{
"root": "pages/followUp",
"name": "followUp",
"pages": ["index"]
}
],
"window": {

BIN
assets/images/my/doctor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4945922 */
src: url('//at.alicdn.com/t/c/font_4945922_ou2nla6911e.woff2?t=1750598435466') format('woff2'),
url('//at.alicdn.com/t/c/font_4945922_ou2nla6911e.woff?t=1750598435466') format('woff'),
url('//at.alicdn.com/t/c/font_4945922_ou2nla6911e.ttf?t=1750598435466') format('truetype');
src: url('//at.alicdn.com/t/c/font_4945922_o43abax97g.woff2?t=1750755738154') format('woff2'),
url('//at.alicdn.com/t/c/font_4945922_o43abax97g.woff?t=1750755738154') format('woff'),
url('//at.alicdn.com/t/c/font_4945922_o43abax97g.ttf?t=1750755738154') format('truetype');
}
.iconfont {
@ -13,6 +13,26 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-gouxuan:before {
content: "\e608";
}
.icon-yisheng1:before {
content: "\e60d";
}
.icon-yisheng3:before {
content: "\e603";
}
.icon-mima:before {
content: "\e630";
}
.icon-mima1:before {
content: "\e7d1";
}
.icon-fanhui:before {
content: "\e601";
}
@ -80,3 +100,6 @@
.icon-xiangji:before {
content: "\e609";
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -11,6 +11,11 @@ export declare const classNames: (...args: any[]) => string;
export declare const styles: (styleObj: any) => string;
export declare const getAnimationFrame: (context: any, cb: Function) => any;
export declare const getRect: (context: any, selector: string, needAll?: boolean) => Promise<any>;
interface TreeNode {
children?: TreeNode[];
[key: string]: any;
}
export declare const getTreeDepth: (tree: TreeNode[], key?: string) => any;
export declare const isIOS: () => boolean;
export declare const addUnit: (value?: string | number) => string | undefined;
export declare const getCharacterLength: (type: string, char: string | number, max?: number) => {

View File

@ -1 +1 @@
import{prefix}from"./config";import{isString,isNumber,isDef,isBoolean,isObject}from"./validator";import{getWindowInfo,getAppBaseInfo,getDeviceInfo}from"./wechat";export const systemInfo=getWindowInfo();export const appBaseInfo=getAppBaseInfo();export const deviceInfo=getDeviceInfo();export const debounce=function(e,t=500){let n;return function(...o){n&&clearTimeout(n),n=setTimeout((()=>{e.apply(this,o)}),t)}};export const throttle=(e,t=100,n=null)=>{let o=0,r=null;return n||(n={leading:!0}),function(...s){const c=Date.now();o||n.leading||(o=c);const i=this;t-(c-o)<=0&&(r&&(clearTimeout(r),r=null),o=c,e.apply(i,s))}};export const classNames=function(...e){const t={}.hasOwnProperty,n=[];return e.forEach((e=>{if(!e)return;const o=typeof e;if("string"===o||"number"===o)n.push(e);else if(Array.isArray(e)&&e.length){const t=classNames(...e);t&&n.push(t)}else if("object"===o)for(const o in e)t.call(e,o)&&e[o]&&n.push(o)})),n.join(" ")};export const styles=function(e){return Object.keys(e).map((t=>`${t}: ${e[t]}`)).join("; ")};export const getAnimationFrame=function(e,t){return e.createSelectorQuery().selectViewport().boundingClientRect().exec((()=>{t()}))};export const getRect=function(e,t,n=!1){return new Promise(((o,r)=>{e.createSelectorQuery()[n?"selectAll":"select"](t).boundingClientRect((e=>{e?o(e):r(e)})).exec()}))};export const isIOS=function(){var e;return!!((null===(e=null==deviceInfo?void 0:deviceInfo.system)||void 0===e?void 0:e.toLowerCase().search("ios"))+1)};export const addUnit=function(e){if(isDef(e))return e=String(e),isNumber(e)?`${e}px`:e};export const getCharacterLength=(e,t,n)=>{const o=String(null!=t?t:"");if(0===o.length)return{length:0,characters:""};if("maxcharacter"===e){let e=0;for(let t=0;t<o.length;t+=1){let r=0;if(r=o.charCodeAt(t)>127||94===o.charCodeAt(t)?2:1,e+r>n)return{length:e,characters:o.slice(0,t)};e+=r}return{length:e,characters:o}}if("maxlength"===e){const e=o.length>n?n:o.length;return{length:e,characters:o.slice(0,e)}}return{length:o.length,characters:o}};export const chunk=(e,t)=>Array.from({length:Math.ceil(e.length/t)},((n,o)=>e.slice(o*t,o*t+t)));export const getInstance=function(e,t){if(!e){const t=getCurrentPages(),n=t[t.length-1];e=n.$$basePage||n}const n=e?e.selectComponent(t):null;return n||(console.warn("未找到组件,请检查selector是否正确"),null)};export const unitConvert=e=>{var t;return"string"==typeof e?e.includes("rpx")?parseInt(e,10)*(null!==(t=null==systemInfo?void 0:systemInfo.screenWidth)&&void 0!==t?t:750)/750:parseInt(e,10):null!=e?e:0};export const setIcon=(e,t,n)=>t?"string"==typeof t?{[`${e}Name`]:t,[`${e}Data`]:{}}:"object"==typeof t?{[`${e}Name`]:"",[`${e}Data`]:t}:{[`${e}Name`]:n,[`${e}Data`]:{}}:{[`${e}Name`]:"",[`${e}Data`]:{}};export const toCamel=e=>e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()));export const getCurrentPage=function(){const e=getCurrentPages();return e[e.length-1]};export const uniqueFactory=e=>{let t=0;return()=>{const n=`${prefix}_${e}_${t}`;return t+=1,n}};export const calcIcon=(e,t)=>e&&(isBoolean(e)&&t||isString(e))?{name:isBoolean(e)?t:e}:isObject(e)?e:null;export const isOverSize=(e,t)=>{var n;if(!t)return!1;const o=1e3,r={B:1,KB:o,MB:1e6,GB:1e9};return e>("number"==typeof t?t*o:(null==t?void 0:t.size)*r[null!==(n=null==t?void 0:t.unit)&&void 0!==n?n:"KB"])};export const rpx2px=e=>Math.floor(systemInfo.windowWidth*e/750);export const nextTick=()=>new Promise((e=>{wx.nextTick((()=>{e()}))}));
import{prefix}from"./config";import{isString,isNumber,isDef,isBoolean,isObject}from"./validator";import{getWindowInfo,getAppBaseInfo,getDeviceInfo}from"./wechat";export const systemInfo=getWindowInfo();export const appBaseInfo=getAppBaseInfo();export const deviceInfo=getDeviceInfo();export const debounce=function(e,t=500){let n;return function(...o){n&&clearTimeout(n),n=setTimeout((()=>{e.apply(this,o)}),t)}};export const throttle=(e,t=100,n=null)=>{let o=0,r=null;return n||(n={leading:!0}),function(...c){const s=Date.now();o||n.leading||(o=s);const i=this;t-(s-o)<=0&&(r&&(clearTimeout(r),r=null),o=s,e.apply(i,c))}};export const classNames=function(...e){const t={}.hasOwnProperty,n=[];return e.forEach((e=>{if(!e)return;const o=typeof e;if("string"===o||"number"===o)n.push(e);else if(Array.isArray(e)&&e.length){const t=classNames(...e);t&&n.push(t)}else if("object"===o)for(const o in e)t.call(e,o)&&e[o]&&n.push(o)})),n.join(" ")};export const styles=function(e){return Object.keys(e).map((t=>`${t}: ${e[t]}`)).join("; ")};export const getAnimationFrame=function(e,t){return e.createSelectorQuery().selectViewport().boundingClientRect().exec((()=>{t()}))};export const getRect=function(e,t,n=!1){return new Promise(((o,r)=>{e.createSelectorQuery()[n?"selectAll":"select"](t).boundingClientRect((e=>{e?o(e):r(e)})).exec()}))};export const getTreeDepth=(e,t)=>e.reduce(((e,n)=>n[null!=t?t:"children"]&&n[null!=t?t:"children"].length>0?Math.max(e,getTreeDepth(n[null!=t?t:"children"],t)+1):Math.max(e,1)),0);export const isIOS=function(){var e;return!!((null===(e=null==deviceInfo?void 0:deviceInfo.system)||void 0===e?void 0:e.toLowerCase().search("ios"))+1)};export const addUnit=function(e){if(isDef(e))return e=String(e),isNumber(e)?`${e}px`:e};export const getCharacterLength=(e,t,n)=>{const o=String(null!=t?t:"");if(0===o.length)return{length:0,characters:""};if("maxcharacter"===e){let e=0;for(let t=0;t<o.length;t+=1){let r=0;if(r=o.charCodeAt(t)>127||94===o.charCodeAt(t)?2:1,e+r>n)return{length:e,characters:o.slice(0,t)};e+=r}return{length:e,characters:o}}if("maxlength"===e){const e=o.length>n?n:o.length;return{length:e,characters:o.slice(0,e)}}return{length:o.length,characters:o}};export const chunk=(e,t)=>Array.from({length:Math.ceil(e.length/t)},((n,o)=>e.slice(o*t,o*t+t)));export const getInstance=function(e,t){if(!e){const t=getCurrentPages(),n=t[t.length-1];e=n.$$basePage||n}const n=e?e.selectComponent(t):null;return n||(console.warn("未找到组件,请检查selector是否正确"),null)};export const unitConvert=e=>{var t;return"string"==typeof e?e.includes("rpx")?parseInt(e,10)*(null!==(t=null==systemInfo?void 0:systemInfo.screenWidth)&&void 0!==t?t:750)/750:parseInt(e,10):null!=e?e:0};export const setIcon=(e,t,n)=>t?"string"==typeof t?{[`${e}Name`]:t,[`${e}Data`]:{}}:"object"==typeof t?{[`${e}Name`]:"",[`${e}Data`]:t}:{[`${e}Name`]:n,[`${e}Data`]:{}}:{[`${e}Name`]:"",[`${e}Data`]:{}};export const toCamel=e=>e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()));export const getCurrentPage=function(){const e=getCurrentPages();return e[e.length-1]};export const uniqueFactory=e=>{let t=0;return()=>{const n=`${prefix}_${e}_${t}`;return t+=1,n}};export const calcIcon=(e,t)=>e&&(isBoolean(e)&&t||isString(e))?{name:isBoolean(e)?t:e}:isObject(e)?e:null;export const isOverSize=(e,t)=>{var n;if(!t)return!1;const o=1e3,r={B:1,KB:o,MB:1e6,GB:1e9};return e>("number"==typeof t?t*o:(null==t?void 0:t.size)*r[null!==(n=null==t?void 0:t.unit)&&void 0!==n?n:"KB"])};export const rpx2px=e=>Math.floor(systemInfo.windowWidth*e/750);export const nextTick=()=>new Promise((e=>{wx.nextTick((()=>{e()}))}));

View File

@ -1 +1 @@
<wxs src="../common/utils.wxs" module="_"/><t-picker style="{{_._style([style, customStyle])}}" class="class {{prefix}}-class {{classPrefix}}" visible="{{visible}}" value="{{columnsValue}}" header="{{header}}" title="{{title}}" auto-close="{{autoClose}}" confirm-btn="{{confirmBtn || locale.confirm}}" cancel-btn="{{cancelBtn || locale.cancel}}" use-popup="{{usePopup}}" popup-props="{{ popupProps }}" bind:pick="onColumnChange" bind:change="onConfirm" bind:cancel="onCancel" bind:visible-change="onVisibleChange" bind:close="onClose"><slot slot="header" name="header"/><t-picker-item wx:for="{{columns}}" wx:key="index" class="{{_.cls(classPrefix + '__item', [['roomly', columns.length >= 5 && index == 0]])}}" options="{{item}}" index="index" format="{{formatter}}"/><slot slot="footer" name="footer"/></t-picker>
<wxs src="../common/utils.wxs" module="_"/><t-picker style="{{_._style([style, customStyle])}}" class="class {{prefix}}-class {{classPrefix}}" visible="{{visible}}" value="{{columnsValue}}" header="{{header}}" title="{{title}}" auto-close="{{autoClose}}" confirm-btn="{{confirmBtn || locale.confirm}}" cancel-btn="{{cancelBtn || locale.cancel}}" use-popup="{{usePopup}}" popup-props="{{ popupProps }}" bind:pick="onColumnChange" bind:confirm="onConfirm" bind:cancel="onCancel" bind:visible-change="onVisibleChange" bind:close="onClose"><slot slot="header" name="header"/><t-picker-item wx:for="{{columns}}" wx:key="index" class="{{_.cls(classPrefix + '__item', [['roomly', columns.length >= 5 && index == 0]])}}" options="{{item}}" index="index" format="{{formatter}}"/><slot slot="footer" name="footer"/></t-picker>

View File

@ -1 +1 @@
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import useCustomNavbar from"../mixins/using-custom-navbar";import{unitConvert,systemInfo}from"../common/utils";const{prefix:prefix}=config,name=`${prefix}-fab`,baseButtonProps={size:"large",shape:"circle",theme:"primary",tClass:`${prefix}-fab__button`};let Fab=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[useCustomNavbar],this.properties=props,this.externalClasses=["class",`${prefix}-class`,`${prefix}-class-button`],this.data={prefix:prefix,classPrefix:name,buttonData:baseButtonProps,moveStyle:null},this.observers={"buttonProps.**, icon, text, ariaLabel, yBounds"(){var t;this.setData({buttonData:Object.assign(Object.assign(Object.assign(Object.assign({},baseButtonProps),{shape:this.properties.text?"round":"circle",icon:this.properties.icon}),this.properties.buttonProps),{content:this.properties.text,ariaLabel:this.properties.ariaLabel})},null===(t=this.computedSize)||void 0===t?void 0:t.bind(this))}},this.methods={onTplButtonTap(t){this.triggerEvent("click",t)},onStart(t){this.triggerEvent("dragstart",t.detail.e)},onMove(t){const{yBounds:e}=this.properties,{distanceTop:o}=this.data,{x:s,y:i,rect:r}=t.detail,a=systemInfo.windowWidth-r.width,n=systemInfo.windowHeight-Math.max(o,unitConvert(e[0]))-r.height,p=Math.max(0,Math.min(s,a)),m=Math.max(0,unitConvert(e[1]),Math.min(i,n));this.setData({moveStyle:`right: ${p}px; bottom: ${m}px;`})},onEnd(t){this.triggerEvent("dragend",t.detail.e)},computedSize(){var t,e;if(!this.properties.draggable)return;const o=this.selectComponent("#draggable");(null===(e=null===(t=this.properties)||void 0===t?void 0:t.yBounds)||void 0===e?void 0:e[1])?this.setData({moveStyle:`bottom: ${unitConvert(this.properties.yBounds[1])}px`},o.computedRect):o.computedRect()}}}};Fab=__decorate([wxComponent()],Fab);export default Fab;
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import useCustomNavbar from"../mixins/using-custom-navbar";import{unitConvert,systemInfo}from"../common/utils";const{prefix:prefix}=config,name=`${prefix}-fab`,baseButtonProps={size:"large",shape:"circle",theme:"primary",tClass:`${prefix}-fab__button`};let Fab=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[useCustomNavbar],this.properties=props,this.externalClasses=["class",`${prefix}-class`,`${prefix}-class-button`],this.data={prefix:prefix,classPrefix:name,buttonData:baseButtonProps,moveStyle:null},this.observers={"buttonProps.**, icon, text, ariaLabel, yBounds"(){var t;this.setData({buttonData:Object.assign(Object.assign(Object.assign(Object.assign({},baseButtonProps),{shape:this.properties.text?"round":"circle"}),this.properties.buttonProps),{icon:this.properties.icon,content:this.properties.text,ariaLabel:this.properties.ariaLabel})},null===(t=this.computedSize)||void 0===t?void 0:t.bind(this))}},this.methods={onTplButtonTap(t){this.triggerEvent("click",t)},onStart(t){this.triggerEvent("dragstart",t.detail.e)},onMove(t){const{yBounds:e}=this.properties,{distanceTop:o}=this.data,{x:s,y:i,rect:r}=t.detail,a=systemInfo.windowWidth-r.width,n=systemInfo.windowHeight-Math.max(o,unitConvert(e[0]))-r.height,p=Math.max(0,Math.min(s,a)),m=Math.max(0,unitConvert(e[1]),Math.min(i,n));this.setData({moveStyle:`right: ${p}px; bottom: ${m}px;`})},onEnd(t){this.triggerEvent("dragend",t.detail.e)},computedSize(){var t,e;if(!this.properties.draggable)return;const o=this.selectComponent("#draggable");(null===(e=null===(t=this.properties)||void 0===t?void 0:t.yBounds)||void 0===e?void 0:e[1])?this.setData({moveStyle:`bottom: ${unitConvert(this.properties.yBounds[1])}px`},o.computedRect):o.computedRect()}}}};Fab=__decorate([wxComponent()],Fab);export default Fab;

View File

@ -1 +1 @@
<import src="../../common/template/button.wxml"/><wxs src="../../common/utils.wxs" module="_"/><template name="draggable"><t-draggable id="draggable" style="right: 16px; bottom: 32px; {{_._style([style, customStyle, moveStyle])}}" direction="{{draggable === true ? 'all' : draggable}}" bind:start="onStart" bind:move="onMove" bind:end="onEnd"><template is="button" data="{{useDefaultSlot: true, ...buttonData}}"/></t-draggable></template>
<import src="../../common/template/button.wxml"/><wxs src="../../common/utils.wxs" module="_"/><template name="draggable"><t-draggable id="draggable" style="right: 16px; bottom: 32px; {{_._style([style, customStyle, moveStyle])}}" direction="{{draggable === true ? 'all' : draggable}}" bind:start="onStart" bind:move="onMove" bind:end="onEnd"><slot wx:if="{{!buttonData.content && !buttonData.icon}}"/><template wx:else is="button" data="{{useDefaultSlot: true, ...buttonData}}"/></t-draggable></template>

View File

@ -1 +1 @@
<import src="../../common/template/button.wxml"/><wxs src="../../common/utils.wxs" module="_"/><template name="view"><view class="{{classPrefix}} class {{prefix}}-class" style="right: 16px; bottom: 32px; {{_._style([style, customStyle])}}"><template is="button" data="{{useDefaultSlot: true, ...buttonData}}"/></view></template>
<import src="../../common/template/button.wxml"/><wxs src="../../common/utils.wxs" module="_"/><template name="view"><view class="{{classPrefix}} class {{prefix}}-class" style="right: 16px; bottom: 32px; {{_._style([style, customStyle])}}"><slot wx:if="{{!buttonData.content && !buttonData.icon}}"/><template wx:else is="button" data="{{useDefaultSlot: true, ...buttonData}}"/></view></template>

View File

@ -26,10 +26,12 @@ export default class PickerItem extends SuperComponent {
created(): void;
};
methods: {
onClickItem(event: WechatMiniprogram.TouchEvent): void;
onTouchStart(event: any): void;
onTouchMove(event: any): void;
onTouchEnd(event: any): void;
formatOption(options: PickerItemOption[], columnIndex: number, format: any): any[];
updateSelected(index: number, trigger: boolean): void;
update(): void;
getCount(): any;
};

View File

@ -1 +1 @@
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-picker-item`,ANIMATION_DURATION=1e3,INERTIA_TIME=300,INERTIA_DISTANCE=15,range=function(t,e,i){return Math.min(Math.max(t,e),i)},momentum=(t,e)=>{let i=t;return i=Math.abs(i/e)/.005*(i<0?-1:1),i};let PickerItem=class extends SuperComponent{constructor(){super(...arguments),this.relations={"../picker/picker":{type:"parent",linked(t){if("keys"in t.data){const{keys:e}=t.data;if(null===e||JSON.stringify(this.data.pickerKeys)===JSON.stringify(e))return;this.setData({pickerKeys:e})}}}},this.options={multipleSlots:!0},this.externalClasses=[`${prefix}-class`],this.properties=props,this.observers={"options, pickerKeys"(){this.update()}},this.data={prefix:prefix,classPrefix:name,offset:0,duration:0,value:"",curIndex:0,columnIndex:0,pickerKeys:{value:"value",label:"label"},formatOptions:props.options.value},this.lifetimes={created(){this.StartY=0,this.StartOffset=0,this.startTime=0}},this.methods={onTouchStart(t){this.StartY=t.touches[0].clientY,this.StartOffset=this.data.offset,this.startTime=Date.now(),this.setData({duration:0})},onTouchMove(t){const{StartY:e,StartOffset:i}=this,{pickItemHeight:s}=this.data,o=t.touches[0].clientY-e,n=range(i+o,-this.getCount()*s,0);this.setData({offset:n})},onTouchEnd(t){const{offset:e,pickerKeys:i,columnIndex:s,pickItemHeight:o,formatOptions:n}=this.data,{startTime:a}=this;if(e===this.StartOffset)return;let r=0;const l=t.changedTouches[0].clientY-this.StartY,d=Date.now()-a;d<300&&Math.abs(l)>15&&(r=momentum(l,d));const c=range(e+r,-this.getCount()*o,0),u=range(Math.round(-c/o),0,this.getCount()-1);this.setData({offset:-u*o,duration:1e3,curIndex:u}),u!==this._selectedIndex&&(this._selectedIndex=u,wx.nextTick((()=>{var t,e,o;this._selectedIndex=u,this._selectedValue=null===(t=n[u])||void 0===t?void 0:t[null==i?void 0:i.value],this._selectedLabel=null===(e=n[u])||void 0===e?void 0:e[null==i?void 0:i.label],null===(o=this.$parent)||void 0===o||o.triggerColumnChange({index:u,column:s})})))},formatOption:(t,e,i)=>"function"!=typeof i?t:t.map((t=>i(t,e))),update(){var t,e,i,s;const{options:o,value:n,pickerKeys:a,pickItemHeight:r,format:l,columnIndex:d}=this.data,c=this.formatOption(o,d,l),u=c.findIndex((t=>t[null==a?void 0:a.value]===n)),h=u>0?u:0;this._selectedIndex=h,this._selectedValue=null===(t=c[h])||void 0===t?void 0:t[null==a?void 0:a.value],this._selectedLabel=null===(e=c[h])||void 0===e?void 0:e[null==a?void 0:a.label],this.setData({formatOptions:c,offset:-h*r,curIndex:h}),this._selectedIndex=h,this._selectedValue=null===(i=o[h])||void 0===i?void 0:i[null==a?void 0:a.value],this._selectedLabel=null===(s=o[h])||void 0===s?void 0:s[null==a?void 0:a.label]},getCount(){var t,e;return null===(e=null===(t=this.data)||void 0===t?void 0:t.options)||void 0===e?void 0:e.length}}}};PickerItem=__decorate([wxComponent()],PickerItem);export default PickerItem;
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-picker-item`,ANIMATION_DURATION=1e3,INERTIA_TIME=300,INERTIA_DISTANCE=15,range=function(t,e,i){return Math.min(Math.max(t,e),i)},momentum=(t,e)=>{let i=t;return i=Math.abs(i/e)/.005*(i<0?-1:1),i};let PickerItem=class extends SuperComponent{constructor(){super(...arguments),this.relations={"../picker/picker":{type:"parent",linked(t){if("keys"in t.data){const{keys:e}=t.data;if(null===e||JSON.stringify(this.data.pickerKeys)===JSON.stringify(e))return;this.setData({pickerKeys:e})}}}},this.options={multipleSlots:!0},this.externalClasses=[`${prefix}-class`],this.properties=props,this.observers={"options, pickerKeys"(){this.update()}},this.data={prefix:prefix,classPrefix:name,offset:0,duration:0,value:"",curIndex:0,columnIndex:0,pickerKeys:{value:"value",label:"label"},formatOptions:props.options.value},this.lifetimes={created(){this.StartY=0,this.StartOffset=0,this.startTime=0}},this.methods={onClickItem(t){const{index:e}=t.currentTarget.dataset,{pickItemHeight:i}=this.data,s=range(e,0,this.getCount()-1);s!==this._selectedIndex&&this.setData({offset:-s*i,curIndex:s,duration:200}),this.updateSelected(s,!0)},onTouchStart(t){this.StartY=t.touches[0].clientY,this.StartOffset=this.data.offset,this.startTime=Date.now(),this.setData({duration:0})},onTouchMove(t){const{StartY:e,StartOffset:i}=this,{pickItemHeight:s}=this.data,o=t.touches[0].clientY-e,n=range(i+o,-this.getCount()*s,0);this.setData({offset:n})},onTouchEnd(t){const{offset:e,pickItemHeight:i}=this.data,{startTime:s}=this;if(e===this.StartOffset)return;let o=0;const n=t.changedTouches[0].clientY-this.StartY,a=Date.now()-s;a<300&&Math.abs(n)>15&&(o=momentum(n,a));const r=range(e+o,-this.getCount()*i,0),c=range(Math.round(-r/i),0,this.getCount()-1);this.setData({offset:-c*i,duration:1e3,curIndex:c}),c!==this._selectedIndex&&this.updateSelected(c,!0)},formatOption:(t,e,i)=>"function"!=typeof i?t:t.map((t=>i(t,e))),updateSelected(t,e){var i,s,o;const{columnIndex:n,pickerKeys:a,formatOptions:r}=this.data;this._selectedIndex=t,this._selectedValue=null===(i=r[t])||void 0===i?void 0:i[null==a?void 0:a.value],this._selectedLabel=null===(s=r[t])||void 0===s?void 0:s[null==a?void 0:a.label],e&&(null===(o=this.$parent)||void 0===o||o.triggerColumnChange({index:t,column:n}))},update(){const{options:t,value:e,pickerKeys:i,pickItemHeight:s,format:o,columnIndex:n}=this.data,a=this.formatOption(t,n,o),r=a.findIndex((t=>t[null==i?void 0:i.value]===e)),c=r>0?r:0;this.updateSelected(c,!1),this.setData({formatOptions:a,offset:-c*s,curIndex:c})},getCount(){var t,e;return null===(e=null===(t=this.data)||void 0===t?void 0:t.options)||void 0===e?void 0:e.length}}}};PickerItem=__decorate([wxComponent()],PickerItem);export default PickerItem;

View File

@ -1 +1 @@
<wxs src="../common/utils.wxs" module="_"/><view style="{{_._style([style, customStyle])}}" class="{{_.cls(classPrefix + '__group', [])}} class {{prefix}}-class" bind:touchstart="onTouchStart" catch:touchmove="onTouchMove" bind:touchend="onTouchEnd" bind:touchcancel="onTouchEnd"><view class="{{classPrefix}}__wrapper" style="transition: transform {{ duration }}ms cubic-bezier(0.215, 0.61, 0.355, 1); transform: translate3d(0, {{ offset }}px, 0)"><view class="{{_.cls(classPrefix + '__item', [['active', curIndex == index]])}}" style="height: {{pickItemHeight}}px" wx:for="{{formatOptions}}" wx:key="index" wx:for-item="option" data-index="{{ index }}"><text class="{{classPrefix}}__item-label">{{option[pickerKeys.label]}}</text><slot name="label-suffix--{{index}}"></slot></view></view></view>
<wxs src="../common/utils.wxs" module="_"/><view style="{{_._style([style, customStyle])}}" class="{{_.cls(classPrefix + '__group', [])}} class {{prefix}}-class" bind:touchstart="onTouchStart" catch:touchmove="onTouchMove" bind:touchend="onTouchEnd" bind:touchcancel="onTouchEnd"><view class="{{classPrefix}}__wrapper" style="transition: transform {{ duration }}ms cubic-bezier(0.215, 0.61, 0.355, 1); transform: translate3d(0, {{ offset }}px, 0)"><view class="{{_.cls(classPrefix + '__item', [['active', curIndex == index]])}}" style="height: {{pickItemHeight}}px" wx:for="{{formatOptions}}" wx:key="index" wx:for-item="option" data-index="{{ index }}" bind:tap="onClickItem"><text class="{{classPrefix}}__item-label">{{option[pickerKeys.label]}}</text><slot name="label-suffix--{{index}}"></slot></view></view></view>

View File

@ -1 +1 @@
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import{rpx2px}from"../common/utils";import config from"../common/config";import props from"./props";import useCustomNavbar from"../mixins/using-custom-navbar";const{prefix:prefix}=config,name=`${prefix}-picker`;let Picker=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[useCustomNavbar],this.properties=props,this.externalClasses=[`${prefix}-class`,`${prefix}-class-confirm`,`${prefix}-class-cancel`,`${prefix}-class-title`],this.options={multipleSlots:!0},this.relations={"../picker-item/picker-item":{type:"child",linked(){this.updateChildren()}}},this.observers={"value, visible"(){this.updateChildren()}},this.lifetimes={attached(){this.setData({pickItemHeight:rpx2px(this.properties.itemHeight)})}},this.data={prefix:prefix,classPrefix:name,defaultPopUpProps:{},defaultPopUpzIndex:11500,pickItemHeight:0},this.methods={updateChildren(){const{pickItemHeight:e}=this.data,{value:t,defaultValue:i}=this.properties;this.$children.forEach(((s,r)=>{var l,o;s.setData({value:null!==(o=null!==(l=null==t?void 0:t[r])&&void 0!==l?l:null==i?void 0:i[r])&&void 0!==o?o:"",columnIndex:r,pickItemHeight:e}),s.update()}))},getSelectedValue(){return[this.$children.map((e=>e._selectedValue)),this.$children.map((e=>e._selectedLabel))]},getColumnIndexes(){return this.$children.map(((e,t)=>({column:t,index:e._selectedIndex})))},onConfirm(){const[e,t]=this.getSelectedValue(),i=this.getColumnIndexes();this.close("confirm-btn"),this.triggerEvent("change",{value:e,label:t,columns:i}),this.triggerEvent("confirm",{value:e,label:t,columns:i})},triggerColumnChange({column:e,index:t}){const[i,s]=this.getSelectedValue();this.triggerEvent("pick",{value:i,label:s,column:e,index:t})},onCancel(){this.close("cancel-btn"),this.triggerEvent("cancel")},onPopupChange(e){const{visible:t}=e.detail;this.close("overlay"),this.triggerEvent("visible-change",{visible:t})},close(e){this.data.autoClose&&this.setData({visible:!1}),this.triggerEvent("close",{trigger:e})}}}ready(){this.$children.map(((e,t)=>e.columnIndex=t))}};Picker=__decorate([wxComponent()],Picker);export default Picker;
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import{rpx2px}from"../common/utils";import config from"../common/config";import props from"./props";import useCustomNavbar from"../mixins/using-custom-navbar";const{prefix:prefix}=config,name=`${prefix}-picker`;let Picker=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[useCustomNavbar],this.properties=props,this.externalClasses=[`${prefix}-class`,`${prefix}-class-confirm`,`${prefix}-class-cancel`,`${prefix}-class-title`],this.options={multipleSlots:!0},this.relations={"../picker-item/picker-item":{type:"child",linked(){this.updateChildren()}}},this.observers={"value, visible"(){this.updateChildren()}},this.lifetimes={attached(){this.setData({pickItemHeight:rpx2px(this.properties.itemHeight)})}},this.data={prefix:prefix,classPrefix:name,defaultPopUpProps:{},defaultPopUpzIndex:11500,pickItemHeight:0},this.methods={updateChildren(){const{pickItemHeight:e}=this.data,{value:t,defaultValue:i}=this.properties;this.$children.forEach(((s,r)=>{var l,n;s.setData({value:null!==(n=null!==(l=null==t?void 0:t[r])&&void 0!==l?l:null==i?void 0:i[r])&&void 0!==n?n:"",columnIndex:r,pickItemHeight:e}),s.update()}))},getSelectedValue(){return[this.$children.map((e=>e._selectedValue)),this.$children.map((e=>e._selectedLabel))]},getColumnIndexes(){return this.$children.map(((e,t)=>({column:t,index:e._selectedIndex})))},onConfirm(){const[e,t]=this.getSelectedValue(),i=this.getColumnIndexes();this.close("confirm-btn"),this.triggerEvent("confirm",{value:e,label:t,columns:i}),JSON.stringify(this.data.value)!==JSON.stringify(e)&&this.triggerEvent("change",{value:e,label:t,columns:i})},triggerColumnChange({column:e,index:t}){const[i,s]=this.getSelectedValue();this.triggerEvent("pick",{value:i,label:s,column:e,index:t})},onCancel(){this.close("cancel-btn"),this.triggerEvent("cancel")},onPopupChange(e){const{visible:t}=e.detail;this.close("overlay"),this.triggerEvent("visible-change",{visible:t})},close(e){this.data.autoClose&&this.setData({visible:!1}),this.triggerEvent("close",{trigger:e})}}}ready(){this.$children.map(((e,t)=>e.columnIndex=t))}};Picker=__decorate([wxComponent()],Picker);export default Picker;

View File

@ -1 +1 @@
<wxs src="../common/utils.wxs" module="_"/><view slot="content" style="{{_._style([style, customStyle])}}" class="{{classPrefix}} {{prefix}}-class"><view class="{{classPrefix}}__toolbar" wx:if="{{header}}"><view class="{{classPrefix}}__cancel {{prefix}}-class-cancel" wx:if="{{cancelBtn}}" bindtap="onCancel">{{cancelBtn}}</view><view class="{{classPrefix}}__title {{prefix}}-class-title">{{title}}</view><view class="{{classPrefix}}__confirm {{prefix}}-class-confirm" wx:if="{{confirmBtn}}" bindtap="onConfirm">{{confirmBtn}}</view></view><slot name="header"/><view class="{{_.cls(classPrefix + '__main', [])}}"><slot/><view class="{{classPrefix}}__mask {{classPrefix}}__mask--top"/><view class="{{classPrefix}}__mask {{classPrefix}}__mask--bottom"/><view class="{{classPrefix}}__indicator" style="height: {{pickItemHeight}}px"></view></view><slot name="footer"/></view>
<wxs src="../common/utils.wxs" module="_"/><view slot="content" style="{{_._style([style, customStyle])}}" class="{{classPrefix}} {{prefix}}-class"><view class="{{classPrefix}}__toolbar" wx:if="{{header}}"><view class="{{classPrefix}}__cancel {{prefix}}-class-cancel" wx:if="{{cancelBtn}}" bindtap="onCancel">{{cancelBtn}}</view><view class="{{classPrefix}}__title {{prefix}}-class-title">{{title}}</view><view class="{{classPrefix}}__confirm {{prefix}}-class-confirm" wx:if="{{confirmBtn}}" bindtap="onConfirm">{{confirmBtn}}</view></view><slot name="header"/><slot name="content"/><view class="{{_.cls(classPrefix + '__main', [])}}"><slot/><view class="{{classPrefix}}__mask {{classPrefix}}__mask--top"/><view class="{{classPrefix}}__mask {{classPrefix}}__mask--bottom"/><view class="{{classPrefix}}__indicator" style="height: {{pickItemHeight}}px"></view></view><slot name="footer"/></view>

View File

@ -1 +1 @@
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import{unitConvert,getRect}from"../common/utils";const{prefix:prefix}=config,name=`${prefix}-rate`;let Rate=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`,`${prefix}-class-icon`,`${prefix}-class-text`],this.properties=props,this.controlledProps=[{key:"value",event:"change"}],this.data={prefix:prefix,classPrefix:name,defaultTexts:["极差","失望","一般","满意","惊喜"],tipsVisible:!1,tipsLeft:0,actionType:"",scaleIndex:-1,isVisibleToScreenReader:!1},this.methods={onTouch(e,t){const{count:i,allowHalf:s,gap:o,value:a,size:n}=this.properties,[r]=e.changedTouches,c=unitConvert(o);getRect(this,`.${name}__wrapper`).then((e=>{const{width:p,left:h}=e,l=(p-(i-1)*c)/i,d=(r.pageX-h+c)/(l+c),m=d%1,u=d-m;let T=m<=.5&&s?u+.5:u+1;if(T>i?T=i:T<0&&(T=0),"move"===t||"tap"===t&&s){const e=Math.ceil(T-1)*(unitConvert(o)+unitConvert(n))+.5*unitConvert(n);this.setData({tipsVisible:!0,actionType:t,scaleIndex:Math.ceil(T),tipsLeft:Math.max(e,0)})}T!==a&&this._trigger("change",{value:T}),this.touchEnd&&this.hideTips()}))},onTap(e){const{disabled:t}=this.properties;t||this.onTouch(e,"tap")},onTouchStart(){this.touchEnd=!1},onTouchMove(e){this.onTouch(e,"move"),this.showAlertText()},onTouchEnd(){this.touchEnd=!0,this.hideTips()},hideTips(){"move"===this.data.actionType&&this.setData({tipsVisible:!1,scaleIndex:-1})},onSelect(e){const{value:t}=e.currentTarget.dataset,{actionType:i}=this.data;"move"!==i&&(this._trigger("change",{value:t}),setTimeout((()=>this.setData({tipsVisible:!1,scaleIndex:-1})),300))},showAlertText(){!0!==this.data.isVisibleToScreenReader&&(this.setData({isVisibleToScreenReader:!0}),setTimeout((()=>{this.setData({isVisibleToScreenReader:!1})}),2e3))}}}};Rate=__decorate([wxComponent()],Rate);export default Rate;
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import{unitConvert,getRect}from"../common/utils";const{prefix:prefix}=config,name=`${prefix}-rate`;let Rate=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`,`${prefix}-class-icon`,`${prefix}-class-text`],this.properties=props,this.controlledProps=[{key:"value",event:"change"}],this.data={prefix:prefix,classPrefix:name,defaultTexts:["极差","失望","一般","满意","惊喜"],tipsVisible:!1,tipsLeft:0,actionType:"",scaleIndex:-1,isVisibleToScreenReader:!1},this.methods={onTouch(e,t){const{count:i,allowHalf:s,gap:o,value:a,size:n}=this.properties,[r]=e.changedTouches,c=unitConvert(o);getRect(this,`.${name}__wrapper`).then((e=>{const{width:p,left:h}=e,l=(p-(i-1)*c)/i,d=(r.pageX-h+c)/(l+c),u=d%1,m=d-u;let T=u<=.5&&s?m+.5:m+1;T>i?T=i:T<0&&(T=0);const x=Math.ceil(T-1)*(unitConvert(o)+unitConvert(n))+.5*unitConvert(n);this.setData({tipsVisible:!0,actionType:t,scaleIndex:Math.ceil(T),tipsLeft:Math.max(x,0)}),T!==a&&this._trigger("change",{value:T}),this.touchEnd&&this.hideTips()}))},onTap(e){const{disabled:t}=this.properties;t||this.onTouch(e,"tap")},onTouchStart(){this.touchEnd=!1},onTouchMove(e){this.onTouch(e,"move"),this.showAlertText()},onTouchEnd(){this.touchEnd=!0,this.hideTips()},hideTips(){"move"===this.data.actionType&&this.setData({tipsVisible:!1,scaleIndex:-1})},onSelect(e){const{value:t}=e.currentTarget.dataset,{actionType:i}=this.data;"move"!==i&&(this._trigger("change",{value:t}),setTimeout((()=>this.setData({tipsVisible:!1,scaleIndex:-1})),300))},showAlertText(){!0!==this.data.isVisibleToScreenReader&&(this.setData({isVisibleToScreenReader:!0}),setTimeout((()=>{this.setData({isVisibleToScreenReader:!1})}),2e3))}}}};Rate=__decorate([wxComponent()],Rate);export default Rate;

View File

@ -1 +1 @@
@import '../common/style/index.wxss';.t-toast{position:fixed;right:-50%;left:50%;transform:translate(-50%,-50%);z-index:12001;opacity:1;transition:opacity .3s ease;background-color:var(--td-toast-bg-color,var(--td-font-gray-2,rgba(0,0,0,.6)));border-radius:var(--td-toast-radius,8rpx);font-size:28rpx;color:var(--td-toast-color,var(--td-text-color-anti,var(--td-font-white-1,#fff)));max-width:var(--td-toast-max-width,374rpx);width:fit-content;box-sizing:border-box}.t-toast--column{padding:48rpx;min-width:160rpx;min-height:160rpx;border-radius:16rpx;display:flex;align-items:center;justify-content:center}.t-toast--loading.t-toast--with-text{min-width:204rpx;min-height:204rpx;padding-top:0;padding-bottom:0}.t-toast__content{align-items:center;line-height:44rpx}.t-toast__content--row{display:flex;text-align:left;padding:28rpx 44rpx}.t-toast__content--column{display:flex;flex-direction:column;justify-content:center;align-items:center}.t-toast__icon--row{display:flex;font-size:var(--td-toast-row-icon-size,48rpx)}.t-toast__icon--column{font-size:var(--td-toast-column-icon-size,64rpx)}.t-toast__text{overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;display:-webkit-box;-webkit-box-orient:vertical;white-space:pre-line}.t-toast__text--column:not(:empty):not(:only-child){margin-top:16rpx}.t-toast__text--row:not(:empty):not(:only-child){margin-left:16rpx}.t-toast.t-fade-enter,.t-toast.t-fade-leave-to{opacity:0}
@import '../common/style/index.wxss';.t-toast{position:fixed;left:50%;transform:translate(-50%,-50%);z-index:12001;opacity:1;transition:opacity .3s ease;background-color:var(--td-toast-bg-color,var(--td-font-gray-2,rgba(0,0,0,.6)));border-radius:var(--td-toast-radius,8rpx);font-size:28rpx;color:var(--td-toast-color,var(--td-text-color-anti,var(--td-font-white-1,#fff)));max-width:var(--td-toast-max-width,374rpx);min-height:0;width:auto;display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box}.t-toast--column{padding:48rpx;min-width:160rpx;min-height:160rpx;border-radius:16rpx;display:flex;align-items:center;justify-content:center}.t-toast--loading.t-toast--with-text{min-width:204rpx;min-height:204rpx;padding-top:0;padding-bottom:0}.t-toast__content{align-items:center;line-height:44rpx}.t-toast__content--row{display:flex;text-align:left;padding:28rpx 44rpx}.t-toast__content--column{display:flex;flex-direction:column;justify-content:center;align-items:center}.t-toast__icon--row{display:flex;font-size:var(--td-toast-row-icon-size,48rpx)}.t-toast__icon--column{font-size:var(--td-toast-column-icon-size,64rpx)}.t-toast__text{overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;display:-webkit-box;-webkit-box-orient:vertical;white-space:pre-line}.t-toast__text--column:not(:empty):not(:only-child){margin-top:16rpx}.t-toast__text--row:not(:empty):not(:only-child){margin-left:16rpx}.t-toast.t-fade-enter,.t-toast.t-fade-leave-to{opacity:0}

View File

@ -1 +1 @@
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import{isDef}from"../common/validator";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-tree-select`;let TreeSelect=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`,`${prefix}-class-left-column`,`${prefix}-class-left-item`,`${prefix}-class-middle-item`,`${prefix}-class-right-column`,`${prefix}-class-right-item`,`${prefix}-class-right-item-label`],this.options={multipleSlots:!0},this.data={prefix:prefix,classPrefix:name,scrollIntoView:null},this.properties=props,this.controlledProps=[{key:"value",event:"change"}],this.observers={"value, customValue, options, keys, multiple"(){this.buildTreeOptions()}},this.lifetimes={ready(){this.getScrollIntoView("init")}},this.methods={buildTreeOptions(){var e,l;const{options:t,value:i,customValue:o,multiple:n,keys:s}=this.data;if(!t.length)return;const r=[];let a=-1,c={children:t};for(;null==c?void 0:c.children;){a+=1;const t=c.children.map((e=>({label:e[(null==s?void 0:s.label)||"label"],value:e[(null==s?void 0:s.value)||"value"],disabled:e[(null==s?void 0:s.disabled)||"disabled"],children:e[(null==s?void 0:s.children)||"children"]})));r.push(t);const n=null!==(e=null==o?void 0:o[a])&&void 0!==e?e:null==i?void 0:i[a];c=n&&null!==(l=t.find((e=>e.value===n)))&&void 0!==l?l:t[0]}1===r.length&&(r.push([]),a+=1);const u=Math.max(0,a),d=o||r.map(((e,l)=>{var t,o,s;const a=l===r.length-1&&n?[null===(t=e[0])||void 0===t?void 0:t.value]:null===(o=e[0])||void 0===o?void 0:o.value;return null!==(s=null==i?void 0:i[l])&&void 0!==s?s:a}));this.setData({innerValue:d,leafLevel:u,treeOptions:r})},getScrollIntoView(e){const{value:l,customValue:t,scrollIntoView:i}=this.data;if("init"===e){const e=t||l,i=Array.isArray(e)?e.map((e=>Array.isArray(e)?e[0]:e)):[e];this.setData({scrollIntoView:i})}else{if(null===i)return;this.setData({scrollIntoView:null})}},onRootChange(e){const{innerValue:l}=this.data,{value:t}=e.detail;this.getScrollIntoView("none"),l[0]=t,this._trigger("change",{value:l,level:0})},handleTreeClick(e){const{level:l,value:t}=e.currentTarget.dataset,{innerValue:i}=this.data;i[l]=t,this.getScrollIntoView("none"),this._trigger("change",{value:i,level:1})},handleChange(e){const{innerValue:l}=this.data,{level:t,type:i}=e.target.dataset,{value:o}="multiple"===i?e.detail.context:e.detail;if("multiple"===i){isDef(l[t])||(l[t]=[]);const e=l[t].indexOf(o);-1===e?l[t].push(o):l[t].splice(e,1)}else l[t]=o;this.getScrollIntoView("none"),this._trigger("change",{value:l,level:t})}}}};TreeSelect=__decorate([wxComponent()],TreeSelect);export default TreeSelect;
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import{isDef}from"../common/validator";import config from"../common/config";import{getTreeDepth}from"../common/utils";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-tree-select`;let TreeSelect=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`,`${prefix}-class-left-column`,`${prefix}-class-left-item`,`${prefix}-class-middle-item`,`${prefix}-class-right-column`,`${prefix}-class-right-item`,`${prefix}-class-right-item-label`],this.options={multipleSlots:!0},this.data={prefix:prefix,classPrefix:name,scrollIntoView:null},this.properties=props,this.controlledProps=[{key:"value",event:"change"}],this.observers={"value, customValue, options, keys, multiple"(){this.buildTreeOptions()}},this.lifetimes={ready(){this.getScrollIntoView("init")}},this.methods={buildTreeOptions(){var e,l;const{options:t,value:i,customValue:o,multiple:n,keys:s}=this.data;if(!t.length)return;const r=[];let a=-1,c={children:t};for(;null==c?void 0:c.children;){a+=1;const t=c.children.map((e=>({label:e[(null==s?void 0:s.label)||"label"],value:e[(null==s?void 0:s.value)||"value"],disabled:e[(null==s?void 0:s.disabled)||"disabled"],children:e[(null==s?void 0:s.children)||"children"]})));r.push(t);const n=null!==(e=null==o?void 0:o[a])&&void 0!==e?e:null==i?void 0:i[a];c=n&&null!==(l=t.find((e=>e.value===n)))&&void 0!==l?l:t[0]}const u=getTreeDepth(t,null==s?void 0:s.children);for(;r.length<u;)r.push([]),a+=1;const d=Math.max(0,a),p=o||r.map(((e,l)=>{var t,o,s;const a=l===r.length-1&&n?[null===(t=e[0])||void 0===t?void 0:t.value]:null===(o=e[0])||void 0===o?void 0:o.value;return null!==(s=null==i?void 0:i[l])&&void 0!==s?s:a}));this.setData({innerValue:p,leafLevel:d,treeOptions:r})},getScrollIntoView(e){const{value:l,customValue:t,scrollIntoView:i}=this.data;if("init"===e){const e=t||l,i=Array.isArray(e)?e.map((e=>Array.isArray(e)?e[0]:e)):[e];this.setData({scrollIntoView:i})}else{if(null===i)return;this.setData({scrollIntoView:null})}},onRootChange(e){const{innerValue:l}=this.data,{value:t}=e.detail;this.getScrollIntoView("none"),l[0]=t,this._trigger("change",{value:l,level:0})},handleTreeClick(e){const{level:l,value:t}=e.currentTarget.dataset,{innerValue:i}=this.data;i[l]=t,this.getScrollIntoView("none"),this._trigger("change",{value:i,level:1})},handleChange(e){const{innerValue:l}=this.data,{level:t,type:i}=e.target.dataset,{value:o}="multiple"===i?e.detail.context:e.detail;if("multiple"===i){isDef(l[t])||(l[t]=[]);const e=l[t].indexOf(o);-1===e?l[t].push(o):l[t].splice(e,1)}else l[t]=o;this.getScrollIntoView("none"),this._trigger("change",{value:l,level:t})}}}};TreeSelect=__decorate([wxComponent()],TreeSelect);export default TreeSelect;

View File

@ -1 +1 @@
const props={addBtn:{type:Boolean,value:!0},addContent:{type:String},allowUploadDuplicateFile:{type:Boolean,value:!1},config:{type:Object},disabled:{type:null,value:void 0},draggable:{type:null},files:{type:Array,value:null},defaultFiles:{type:Array},gridConfig:{type:Object},gutter:{type:Number,value:16},imageProps:{type:Object},max:{type:Number,value:0},mediaType:{type:Array,value:["image","video"]},removeBtn:{type:Boolean,value:!0},requestMethod:{type:null},sizeLimit:{type:null},source:{type:String,value:"media"},transition:{type:Object,value:{backTransition:!0,duration:300,timingFunction:"ease"}}};export default props;
const props={addBtn:{type:Boolean,value:!0},addContent:{type:String},allowUploadDuplicateFile:{type:Boolean,value:!1},config:{type:Object},disabled:{type:null,value:void 0},draggable:{type:null},files:{type:Array,value:null},defaultFiles:{type:Array},gridConfig:{type:Object},gutter:{type:Number,value:16},imageProps:{type:Object},max:{type:Number,value:0},mediaType:{type:Array,value:["image","video"]},preview:{type:Boolean,value:!0},removeBtn:{type:Boolean,value:!0},requestMethod:{type:null},sizeLimit:{type:null},source:{type:String,value:"media"},transition:{type:Object,value:{backTransition:!0,duration:300,timingFunction:"ease"}}};export default props;

View File

@ -59,6 +59,10 @@ export interface TdUploadProps {
type: ArrayConstructor;
value?: Array<MediaType>;
};
preview?: {
type: BooleanConstructor;
value?: boolean;
};
removeBtn?: {
type: BooleanConstructor;
value?: boolean;

File diff suppressed because one or more lines are too long

122
pages/followUp/index.js Normal file
View File

@ -0,0 +1,122 @@
import request from "~/api/request"
Page({
/**
* 页面的初始数据
*/
data: {
visible: false,
radio1: true,
detail: {},
followUpList: [],
followUpDetail: {},
imageVisible: false,
imageList: [],
imageIndex: 1,
},
openSelect(){
this.setData({
visible: true
})
},
close(){
this.setData({
visible: false
})
},
confirm(){
this.setData({
visible: false
})
},
async getlist(){
const res = await request('doctor/patient/questionnaires/1')
this.setData({
followUpList: res.list
})
if(res.list.length > 0){
this.setData({
followUpDetail: res.list[0]
})
this.getDetail(res.list[0].id)
}
},
async getDetail(id){
const res = await request('doctor/patient/questionnaire_info', 'post', {patient_id: 1, questionnaire_id: id})
this.setData({
detail: res
})
},
handleClick(e){
const id = e.currentTarget.dataset.id
this.setData({
followUpDetail: this.data.followUpList.find(item => item.id === id)
})
this.getDetail(id)
},
handleImagePreview(e){
const { mode } = e.currentTarget.dataset;
this.setData({
imageList: this.data.detail[mode].split(',').filter(el => el !== ''),
imageVisible: true
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getlist();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,8 @@
{
"usingComponents": {
"t-col": "tdesign-miniprogram/col/col",
"t-row": "tdesign-miniprogram/row/row",
"t-image-viewer": "tdesign-miniprogram/image-viewer/image-viewer",
"t-popup": "tdesign-miniprogram/popup/popup"
}
}

132
pages/followUp/index.less Normal file
View File

@ -0,0 +1,132 @@
.container{
padding: 24rpx;
.follow-up{
background-color: #fff;
border-radius: 24rpx;
padding: 24rpx;
position: relative;
.follow-up-time{
font-size: 32rpx;
color: var(--td-text-color);
margin-bottom: 12rpx;
}
.follow-name{
font-size: 28rpx;
color: #909399;
}
.iconfont{
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
}
}
.follow-item{
background-color: #fff;
border-radius: 24rpx;
padding: 24rpx;
margin-top: 24rpx;
.item-title{
font-size: 32rpx;
margin-bottom: 20rpx;
}
.follow-item-tit{
display: flex;
justify-content: space-between;
height: 100rpx;
line-height: 100rpx;
border-bottom: 2rpx solid #f5f5f5;
.label{
font-size: 30rpx;
color: #606266;
}
.value{
font-size: 30rpx;
color: var(--td-text-color);
}
}
.follow-item-tit:last-child{
border-bottom: none;
}
.follow-images{
.report-image{
width: 196rpx;
height: 196rpx;
background: #F8F8F8;
border-radius: 16rpx;
border: 1rpx solid #EEEEEE;
position: relative;
image{
width: 100%;
height: 100%;
}
.more{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
border-radius: 16rpx;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 48rpx;
}
}
}
}
}
.block {
width: 100vw;
min-height: 30vh;
min-height: 60vh;
overflow-y: auto;
background: #F8F8F8;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
.select-box{
padding: 24rpx;
}
}
.header {
display: flex;
align-items: center;
height: 116rpx;
}
.title {
flex: 1;
text-align: center;
font-weight: 600;
font-size: 36rpx;
color: var(--td-text-color-primary);
}
.btn {
font-size: 32rpx;
padding: 32rpx;
}
.btn--cancel {
color: var(--td-text-color-secondary);
}
.btn--confirm {
color: #0052d9;
}
.custom-style{
background-color: #F8F8F8;
}
.select-box{
.follow-up{
margin-bottom: 24rpx;
.iconfont{
color: var(--td-brand-color);
}
}
}

387
pages/followUp/index.wxml Normal file
View File

@ -0,0 +1,387 @@
<!-- pages/followUp/index.wxml -->
<view class="container">
<view class="follow-up" bind:tap="openSelect">
<view class="follow-up-time">{{followUpDetail.follow_date}}</view>
<view class="follow-name">{{followUpDetail.follow_name}}</view>
<text class="iconfont icon-youjiantou"></text>
</view>
<view class="follow-item">
<view class="item-title">随访信息</view>
<view class="follow-item-tit">
<text class="label">随访名称</text>
<text class="value">{{detail.follow_name}}</text>
</view>
<view class="follow-item-tit">
<text class="label">随访日期</text>
<text class="value">{{detail.follow_date}}</text>
</view>
<view class="follow-item-tit">
<text class="label">随访医院</text>
<text class="value">{{detail.follow_hospital}}</text>
</view>
</view>
<view class="follow-item">
<view class="item-title">生长指数</view>
<view class="follow-item-tit">
<text class="label">身高</text>
<text class="value">{{detail.height}}(CM)</text>
</view>
<view class="follow-item-tit">
<text class="label">体重</text>
<text class="value">{{detail.weight}}(KG)</text>
</view>
<view class="follow-item-tit">
<text class="label">头围</text>
<text class="value">{{detail.head_circumference}}(CM)</text>
</view>
<view class="follow-item-tit">
<text class="label">上臀围</text>
<text class="value">{{detail.high_hip}}(CM)</text>
</view>
</view>
<view class="follow-item">
<view class="item-title">肝功能</view>
<view class="follow-images">
<t-row gutter="16">
<t-col span="8">
<view class="report-image" data-mode="liver_function_image" bind:tap="handleImagePreview">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
<view class="more">+3</view>
</view>
</t-col>
</t-row>
</view>
<view class="follow-item-tit">
<text class="label">总胆红素</text>
<text class="value">{{detail.total_bilirubin}}(µmol/L)</text>
</view>
<view class="follow-item-tit">
<text class="label">直接胆红素</text>
<text class="value">{{detail.direct_bilirubin}}(µmol/L)</text>
</view>
<view class="follow-item-tit">
<text class="label">总胆汁酸</text>
<text class="value">{{detail.total_bile_acid}}(g/L)</text>
</view>
<view class="follow-item-tit">
<text class="label">白蛋白</text>
<text class="value">{{detail.albumin}}g/L</text>
</view>
<view class="follow-item-tit">
<text class="label">谷草</text>
<text class="value">{{detail.grain_grass}}U/L</text>
</view>
<view class="follow-item-tit">
<text class="label">谷丙</text>
<text class="value">{{detail.gu_bing}}U/L</text>
</view>
<view class="follow-item-tit">
<text class="label">GGT</text>
<text class="value">{{detail.ggt}}U/L</text>
</view>
<view class="follow-item-tit">
<text class="label">ALP</text>
<text class="value">{{detail.alp}}U/L</text>
</view>
</view>
<view class="follow-item">
<view class="item-title">凝血功能</view>
<view class="follow-images">
<t-row gutter="16">
<t-col span="8">
<view class="report-image" data-mode="coagulation_function_image" bind:tap="handleImagePreview">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
<view class="more">+3</view>
</view>
</t-col>
</t-row>
</view>
<view class="follow-item-tit">
<text class="label">CRP</text>
<text class="value"></text>
</view>
<view class="follow-item-tit">
<text class="label">DDR</text>
<text class="value"></text>
</view>
<view class="follow-item-tit">
<text class="label">INR</text>
<text class="value"></text>
</view>
<view class="follow-item-tit">
<text class="label">PT</text>
<text class="value"></text>
</view>
<view class="follow-item-tit">
<text class="label">PTA</text>
<text class="value"></text>
</view>
<view class="follow-item-tit">
<text class="label">APTT</text>
<text class="value"></text>
</view>
<view class="follow-item-tit">
<text class="label">TT</text>
<text class="value"></text>
</view>
<view class="follow-item-tit">
<text class="label">FIB</text>
<text class="value"></text>
</view>
<view class="follow-item-tit">
<text class="label">NPDP</text>
<text class="value">mg/L</text>
</view>
<view class="follow-item-tit">
<text class="label">MMP-7</text>
<text class="value">{{}}ng/mL</text>
</view>
</view>
<view class="follow-item">
<view class="item-title">血常规</view>
<view class="follow-images">
<t-row gutter="16">
<t-col span="8">
<view class="report-image" data-mode="blood_routine_image" bind:tap="handleImagePreview">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
<view class="more">+3</view>
</view>
</t-col>
</t-row>
</view>
<view class="follow-item-tit">
<text class="label">血小板</text>
<text class="value">{{detail.platelets}}10^9/L)</text>
</view>
<view class="follow-item-tit">
<text class="label">血红蛋白</text>
<text class="value">{{detail.hemoglobin}} (g/L)</text>
</view>
<view class="follow-item-tit">
<text class="label">白细胞</text>
<text class="value">{{detail.white_blood_cells}} (10^9/L)</text>
</view>
<view class="follow-item-tit">
<text class="label">红细胞</text>
<text class="value">{{detail.red_blood_cells}} (10^9/L)</text>
</view>
</view>
<view class="follow-item">
<view class="item-title">营养指标</view>
<view class="follow-images">
<t-row gutter="16">
<t-col span="8">
<view class="report-image" data-mode="nutritional_indicator_image" bind:tap="handleImagePreview">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
<view class="more">+3</view>
</view>
</t-col>
</t-row>
</view>
<view class="follow-item-tit">
<text class="label">25-(OH)D3</text>
<text class="value">{{detail.oh_d3}}(ng/ml)</text>
</view>
<view class="follow-item-tit">
<text class="label">25-(OH)D2</text>
<text class="value">{{detail.oh_d2}}(ng/ml)</text>
</view>
<view class="follow-item-tit">
<text class="label">25-(OH)D</text>
<text class="value">{{detail.oh_d}}(ng/ml)</text>
</view>
<view class="follow-item-tit">
<text class="label">维生素A</text>
<text class="value">{{detail.vitamin_a}}(ng/ml)</text>
</view>
<view class="follow-item-tit">
<text class="label">维生素K</text>
<text class="value">{{detail.vitamin_k}}(ng/ml)</text>
</view>
<view class="follow-item-tit">
<text class="label">维生素E</text>
<text class="value">{{detail.vitamin_e}}(ng/ml)</text>
</view>
</view>
<view class="follow-item">
<view class="item-title">B超</view>
<view class="follow-images">
<t-row gutter="16">
<t-col span="8">
<view class="report-image" data-mode="b_mode_image" bind:tap="handleImagePreview">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
<view class="more">+3</view>
</view>
</t-col>
</t-row>
</view>
<view class="follow-item-tit">
<text class="label">肝肋下</text>
<text class="value">{{detail.under_the_liver_rib}}(mm)</text>
</view>
<view class="follow-item-tit">
<text class="label">肝剑突下</text>
<text class="value">{{detail.under_the_xiphoid_liver}}(mm)</text>
</view>
<view class="follow-item-tit">
<text class="label">脾肋下</text>
<text class="value">{{detail.spleen_rib_area}}(mm)</text>
</view>
<view class="follow-item-tit">
<text class="label">门静脉主干内径</text>
<text class="value">{{detail.main_portal_vein}}(mm)</text>
</view>
<view class="follow-item-tit">
<text class="label">肝回声</text>
<text class="value">{{detail.liver_echo}}</text>
</view>
<view class="follow-item-tit">
<text class="label">胆囊大小</text>
<text class="value">{{detail.gallbladder_size}}(mm)</text>
</view>
<view class="follow-item-tit">
<text class="label">胆总管</text>
<text class="value">{{detail.common_bile_duct}}(mm)</text>
</view>
<view class="follow-item-tit">
<text class="label">纤维块大小</text>
<text class="value">{{detail.fiber_block_size}}(mm)</text>
</view>
<view class="follow-item-tit">
<text class="label">门静脉流速</text>
<text class="value">{{detail.pvv}}</text>
</view>
<view class="follow-item-tit">
<text class="label">肝弹性值</text>
<text class="value">{{detail.liver_elasticity_value}}</text>
</view>
<view class="follow-item-tit">
<text class="label">有无肝囊肿</text>
<text class="value">{{detail.is_have_cyst == 1 '有':'无'}}</text>
</view>
<view class="follow-item-tit">
<text class="label">有无腹水</text>
<text class="value">{{detail.is_have_ascites == 1 '有':'无'}}</text>
</view>
<view class="follow-item-tit">
<text class="label">弹性成像最小值</text>
<text class="value">{{detail.elastography_median}}(kPa)</text>
</view>
<view class="follow-item-tit">
<text class="label">弹性成像最大值</text>
<text class="value">{{detail.elastography_maximum}}(kPa)</text>
</view>
<view class="follow-item-tit">
<text class="label">弹性成像中位数</text>
<text class="value">{{detail.elastography_median}}(kPa)</text>
</view>
</view>
<view class="follow-item">
<view class="item-title">MDT 电子病历</view>
<view class="follow-images">
<t-row gutter="16">
<t-col span="8">
<view class="report-image" data-mode="mdt_image" bind:tap="handleImagePreview">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
</view>
</t-col>
<t-col span="8">
<view class="report-image">
<image class="image" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png" mode=""></image>
<view class="more">+3</view>
</view>
</t-col>
</t-row>
</view>
</view>
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="bottom" custom-style="custom-style" prevent-scroll-through="{{true}}">
<view class="block">
<view class="header">
<view class="btn btn--cancel" aria-role="button" bindtap="close">取消</view>
<view class="title"></view>
<view class="btn btn--confirm" aria-role="button" bindtap="confirm">确定</view>
</view>
<view class="select-box">
<view class="follow-up" wx:for="{{followUpList}}" wx:key="id" data-id="{{item.id}}" bind:tap="handleClick">
<view class="follow-up-time">{{item.follow_date}}</view>
<view class="follow-name">{{item.follow_name}}</view>
<text class="iconfont icon-gouxuan" wx:if="{{item.id == followUpDetail.id}}"></text>
</view>
</view>
</view>
</t-popup>
<t-image-viewer
usingCustomNavbar
deleteBtn="{{false}}"
closeBtn="{{false}}"
showIndex="{{true}}"
initial-index="{{imageIndex}}"
visible="{{imageVisible}}"
images="{{imageList}}"
bind:change="onChange"
bind:delete="onDelete"
bind:close="onClose"
></t-image-viewer>
</view>

View File

@ -1,170 +1,74 @@
import request from '~/api/request';
import aesCryptoJS from '~/utils/aesCryptoJS';
Page({
data: {
code: '',
phoneNumber: '',
isPhoneNumber: false,
isCheck: false,
isSubmit: false,
isPasswordLogin: false,
passwordInfo: {
account: '',
password: '',
},
radioValue: '',
code: ''
},
onLoad() {
wx.login({
success(res) {
console.log(res.code)
if (res.code) {
//发起网络请求
timer: null,
getCodeText: '获取验证码',
mobile: '13888888888',
password: 'doctor2025',
} else {
console.log('登录失败!' + res.errMsg)
}
}
},
onLoad(options) {
},
bindKeyInput(e){
const { mode } = e.currentTarget.dataset;
this.setData({
[mode]: e.detail.value
})
},
async getPhoneNumber(e) {
// console.log(e.detail.code) // 动态令牌
// console.log(e.detail.errMsg) // 回调信息(成功失败都会返回)
// console.log(e.detail.errno) // 错误码(失败时返回)
if (e.detail.code) {
const res = await request('doctor/quick_login', 'post', {
code: e.detail.code
})
await wx.setStorageSync('access_token', res.token);
if (res.is_personal_information_complete) {
wx.switchTab({
url: `/pages/my/index`,
});
} else {
wx.navigateTo({
url: `/pages/my/info-edit/index`,
});
}
} else {
wx.showToast({
title: '登录失败',
icon: 'none'
})
}
},
/* 自定义功能函数 */
changeSubmit() {
if (this.data.isPasswordLogin) {
if (this.data.passwordInfo.account !== '' && this.data.passwordInfo.password !== '' && this.data.isCheck) {
this.setData({
isSubmit: true
});
} else {
this.setData({
isSubmit: false
});
}
} else if (this.data.isPhoneNumber && this.data.isCheck) {
this.setData({
isSubmit: true
});
} else {
this.setData({
isSubmit: false
});
}
},
// 手机号变更
onPhoneInput(e) {
const isPhoneNumber = /^[1][3,4,5,7,8,9][0-9]{9}$/.test(e.detail.value);
this.setData({
isPhoneNumber,
phoneNumber: e.detail.value,
});
this.changeSubmit();
},
// 用户协议选择变更
onCheckChange(e) {
const {
value
} = e.detail;
this.setData({
radioValue: value,
isCheck: value === 'agree',
});
this.changeSubmit();
},
onCodeInput(e) {
this.setData({
code: e.detail.value
});
},
onAccountChange(e) {
this.setData({
passwordInfo: {
...this.data.passwordInfo,
account: e.detail.value
}
});
this.changeSubmit();
},
onPasswordChange(e) {
this.setData({
passwordInfo: {
...this.data.passwordInfo,
password: e.detail.value
}
});
this.changeSubmit();
},
// 切换登录方式
changeLogin() {
this.setData({
isPasswordLogin: !this.data.isPasswordLogin,
isSubmit: false
});
},
toLoginCode(){
wx.navigateTo({
url: `/pages/loginCode/loginCode`,
});
},
async login() {
// 验证手机号
if (!this.data.mobile) {
wx.showToast({
title: '请输入手机号',
icon: 'none'
});
return;
}
// 验证手机号格式
if (!/^1[3-9]\d{9}$/.test(this.data.mobile)) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none'
});
return;
}
// 验证验证码
if (!this.data.password) {
wx.showToast({
title: '请输入密码',
icon: 'none'
});
return;
}
const res = await request('patient/code_login', 'post', {
code: this.data.code,
mobile: this.data.phoneNumber
const res = await request('doctor/login', 'post', {
password: aesCryptoJS(this.data.password),
mobile: this.data.mobile
});
await wx.setStorageSync('access_token', res.token);
if (res.is_personal_information_complete) {
wx.switchTab({
url: `/pages/my/index`,
});
} else {
wx.navigateTo({
url: `/pages/my/info-edit/index`,
});
}
// if (res.is_personal_information_complete) {
// wx.switchTab({
// url: `/pages/my/index`,
// });
// } else {
// wx.navigateTo({
// url: `/pages/my/info-edit/index`,
// });
// }
},
},
// 获取验证码
async getCode() {
const res = await request('patient/send_code', 'post', {
mobile: this.data.phoneNumber,
type: 1
});
},
uploadPass() {
wx.navigateTo({
url: `/pages/forGetPassword/index`,
})
}
});

View File

@ -1,12 +1,9 @@
{
"navigationStyle": "custom",
"usingComponents": {
"t-navbar": "tdesign-miniprogram/navbar/navbar",
"t-input": "tdesign-miniprogram/input/input",
"t-icon": "tdesign-miniprogram/icon/icon",
"t-link": "tdesign-miniprogram/link/link",
"t-button": "tdesign-miniprogram/button/button",
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group",
"t-radio": "tdesign-miniprogram/radio/radio"
}
"t-button": "tdesign-miniprogram/button/button"
},
"navigationStyle": "custom"
}

View File

@ -1,59 +1,157 @@
.page {
background-color: rgba(255,255,255,1.000000);
position: relative;
width: 750rpx;
height: 1624rpx;
overflow: hidden;
display: flex;
flex-direction: column;
}
.image-wrapper_1 {
background: url('/assets/images/top-bg.png') center center no-repeat;
background-size: 100% 100%;
padding-bottom: 80rpx;
.box_1 {
background-color: rgba(255,255,255,1.000000);
padding-bottom: 12rpx;
display: flex;
flex-direction: column;
position: relative;
image{
position: relative;
z-index: 1;
}
.image_4{
position: absolute;
width: 100%;
height: 100%;
z-index: 0;
}
}
.image_1 {
width: 750rpx;
height: 88rpx;
}
.image-wrapper_1 {
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 12rpx 12rpx 0 32rpx;
}
.image_2 {
width: 174rpx;
height: 64rpx;
margin: 12rpx 12rpx 0 564rpx;
width: 24rpx;
height: 48rpx;
margin: 8rpx 0 8rpx 0;
}
.image_3 {
width: 160rpx;
height: 160rpx;
align-self: center;
margin-top: 196rpx;
border-radius: 160px;
width: 174rpx;
height: 64rpx;
}
.box_1 {
.box_2 {
display: flex;
flex-direction: column;
padding: 40rpx 64rpx 36rpx 64rpx;
padding: 60rpx 64rpx 36rpx 64rpx;
}
.text-group_1 {
margin-right: 238rpx;
display: flex;
flex-direction: column;
}
.text_1 {
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 48rpx;
font-family: Alibaba-PuHuiTi-M;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 48rpx;
margin-right: 146rpx;
}
.text_2 {
overflow-wrap: break-word;
color: rgba(153,153,153,1);
font-size: 26rpx;
font-family: Alibaba-PuHuiTi-R;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 26rpx;
margin-top: 20rpx;
}
.section_1 {
background-color: rgba(245,245,245,1.000000);
border-radius: 24rpx;
margin-top: 90rpx;
display: flex;
flex-direction: row;
padding: 34rpx 34rpx 34rpx 40rpx;
}
.image-text_1 {
flex-direction: row;
display: flex;
justify-content: space-between;
width: 100%;
}
.thumbnail_1 {
font-size: 40rpx;
margin-right: 8rpx;
width: 50rpx;
transform: translateY(4rpx);
}
.text-group_2 {
overflow-wrap: break-word;
// color: rgba(170,170,170,1);
font-size: 32rpx;
letter-spacing: 0rpx;
font-family: Alibaba-PuHuiTi-R;
font-weight: normal;
white-space: nowrap;
line-height: 32rpx;
flex: auto;
}
.section_2 {
background-color: rgba(245,245,245,1.000000);
border-radius: 24rpx;
margin-top: 32rpx;
flex-direction: row;
display: flex;
justify-content: flex-center;
padding: 32rpx 40rpx 34rpx 40rpx;
}
.image-text_2 {
flex-direction: row;
display: flex;
justify-content: space-between;
}
.thumbnail_2 {
font-size: 40rpx;
margin-right: 10rpx;
width: 50rpx;
transform: translateY(4rpx);
}
.text-group_3 {
overflow-wrap: break-word;
// color: rgba(170,170,170,1);
font-size: 32rpx;
letter-spacing: 0rpx;
font-family: Alibaba-PuHuiTi-R;
font-weight: normal;
white-space: nowrap;
line-height: 32rpx;
margin-top: 2rpx;
}
.block_1 {
background-color: rgba(187,187,187,1.000000);
width: 2rpx;
height: 32rpx;
display: flex;
flex-direction: column;
margin: 2rpx 0 0 0;
}
.text_3 {
overflow-wrap: break-word;
color: rgba(0,91,162,1);
font-size: 32rpx;
font-family: Alibaba-PuHuiTi-R;
font-weight: normal;
text-align: right;
white-space: nowrap;
line-height: 32rpx;
margin: 2rpx 0 0 34rpx;
}
.text-wrapper_1 {
background-color: rgba(0,91,162,1.000000);
border-radius: 24rpx;
margin-top: 80rpx;
display: flex;
flex-direction: column;
padding: 34rpx 190rpx 32rpx 192rpx;
justify-content: center;
padding: 34rpx;
}
.text_1 {
.text_4 {
overflow-wrap: break-word;
color: rgba(255,255,255,1);
font-size: 34rpx;
@ -64,26 +162,7 @@
white-space: nowrap;
line-height: 34rpx;
}
.text-wrapper_2 {
border-radius: 24rpx;
border: 1px solid rgba(232,232,232,1);
margin-top: 40rpx;
display: flex;
flex-direction: column;
padding: 34rpx 190rpx 32rpx 192rpx;
}
.text_2 {
overflow-wrap: break-word;
color: rgba(34,34,34,1);
font-size: 34rpx;
letter-spacing: 0rpx;
font-family: Alibaba-PuHuiTi-M;
font-weight: normal;
text-align: right;
white-space: nowrap;
line-height: 34rpx;
}
.text_3 {
.text_5 {
overflow-wrap: break-word;
color: rgba(144,147,153,1);
font-size: 26rpx;
@ -95,14 +174,14 @@
align-self: center;
margin-top: 40rpx;
}
.text-wrapper_3 {
.text-wrapper_2 {
width: 520rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 552rpx 50rpx 0 52rpx;
margin: 600rpx 50rpx 0 52rpx;
}
.text_4 {
.text_6 {
overflow-wrap: break-word;
color: rgba(136,136,136,1);
font-size: 24rpx;
@ -113,7 +192,7 @@
white-space: nowrap;
line-height: 24rpx;
}
.text_5 {
.text_7 {
overflow-wrap: break-word;
color: rgba(33,80,159,1);
font-size: 24rpx;

View File

@ -1,20 +1,35 @@
<view class="page">
<view class="image-wrapper_1">
<image src="" class="image_1"></image>
<image src="" class="image_2"></image>
<image src="../../assets/images/logo.jpg" class="image_3"></image>
<image src="../../assets/images/top-bg.png" class="image_4"></image>
</view>
<view class="box_1">
<button class="text-wrapper_1" open-type="getPhoneNumber" bind:getphonenumber="getPhoneNumber">
<text lines="1" class="text_1">手机号快捷登录</text>
</button>
<view class="text-wrapper_2" bind:tap="toLoginCode">
<text lines="1" class="text_2">手机号登录/注册</text>
<view class="image_1"></view>
<view class="image-wrapper_1">
<text class="iconfont icon-fanhui image_2"></text>
</view>
<view class="text-wrapper_3">
<text lines="1" class="text_4">登录或注册完成即代表您同意</text>
<text lines="1" class="text_5">《用户服务协议》</text>
</view>
<view class="box_2">
<view class="text-group_1">
<text lines="1" class="text_1">密码登录</text>
<text lines="1" class="text_2">请使用账号密码登录</text>
</view>
<view class="section_1">
<view class="image-text_1">
<text class="iconfont icon-shouji thumbnail_1"></text>
<input lines="1" type="number" class="text-group_2" maxlength="11" placeholder="请输入手机号" data-mode="mobile" value="{{mobile}}"></input>
</view>
</view>
<view class="section_2">
<view class="image-text_2">
<text class="iconfont icon-mima thumbnail_2"></text>
<input lines="1" type="number" class="text-group_3" placeholder="请输入密码" data-mode="password" value="{{password}}"></input>
</view>
<!-- <view class="block_1"></view>
<text lines="1" class="text_3" bind:tap="getCode">{{getCodeText}}</text> -->
</view>
<view class="text-wrapper_1" bind:tap="login">
<text lines="1" class="text_4">登录</text>
</view>
<view class="text-wrapper_2">
<text lines="1" class="text_6">登录或注册完成即代表您同意</text>
<text lines="1" class="text_7">《用户服务协议》</text>
</view>
</view>
</view>

View File

@ -1,129 +0,0 @@
import request from '~/api/request';
Page({
data: {
code: '',
phoneNumber: '',
timer: null,
getCodeText: '获取验证码',
},
onLoad(options) {
},
bindKeyInput(e){
const { mode } = e.currentTarget.dataset;
this.setData({
[mode]: e.detail.value
})
},
async getCode(){
if (!this.data.phoneNumber) {
wx.showToast({
title: '请输入手机号',
icon: 'none'
});
return;
}
// 验证手机号格式
if (!/^1[3-9]\d{9}$/.test(this.data.phoneNumber)) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none'
});
return;
}
// 如果正在倒计时,不允许重复获取
if (this.data.timer) {
return;
}
// 发送验证码
const res = await request('patient/send_code', 'post', {
mobile: this.data.phoneNumber,
type: 1
})
console.log('验证码已发送');
wx.showToast({
title: '验证码已发送',
icon: 'success'
});
// 开始倒计时
let countdown = 60;
this.setData({
getCodeText: `${countdown}s后重新获取`
});
this.data.timer = setInterval(() => {
countdown--;
if (countdown <= 0) {
clearInterval(this.data.timer);
this.setData({
timer: null,
getCodeText: '获取验证码'
});
} else {
this.setData({
getCodeText: `${countdown}s后重新获取`
});
}
}, 1000);
},
async login() {
// 验证手机号
if (!this.data.phoneNumber) {
wx.showToast({
title: '请输入手机号',
icon: 'none'
});
return;
}
// 验证手机号格式
if (!/^1[3-9]\d{9}$/.test(this.data.phoneNumber)) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none'
});
return;
}
// 验证验证码
if (!this.data.code) {
wx.showToast({
title: '请输入验证码',
icon: 'none'
});
return;
}
// 验证验证码格式假设验证码为6位数字
if (!/^\d{6}$/.test(this.data.code)) {
wx.showToast({
title: '请输入6位数字验证码',
icon: 'none'
});
return;
}
const res = await request('patient/code_login', 'post', {
code: this.data.code,
mobile: this.data.phoneNumber
});
await wx.setStorageSync('access_token', res.token);
if (res.is_personal_information_complete) {
wx.switchTab({
url: `/pages/my/index`,
});
} else {
wx.navigateTo({
url: `/pages/my/info-edit/index`,
});
}
},
});

View File

@ -1,9 +0,0 @@
{
"usingComponents": {
"t-navbar": "tdesign-miniprogram/navbar/navbar",
"t-input": "tdesign-miniprogram/input/input",
"t-link": "tdesign-miniprogram/link/link",
"t-button": "tdesign-miniprogram/button/button"
},
"navigationBarTitleText": "登录"
}

View File

@ -1,213 +0,0 @@
.page {
background-color: rgba(255,255,255,1.000000);
position: relative;
width: 750rpx;
height: 1624rpx;
overflow: hidden;
display: flex;
flex-direction: column;
}
.box_1 {
background-color: rgba(255,255,255,1.000000);
padding-bottom: 12rpx;
display: flex;
flex-direction: column;
}
.image_1 {
width: 750rpx;
height: 88rpx;
}
.image-wrapper_1 {
width: 706rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 12rpx 12rpx 0 32rpx;
}
.image_2 {
width: 24rpx;
height: 48rpx;
margin: 8rpx 0 8rpx 0;
}
.image_3 {
width: 174rpx;
height: 64rpx;
}
.box_2 {
display: flex;
flex-direction: column;
padding: 60rpx 64rpx 36rpx 64rpx;
}
.text-group_1 {
margin-right: 238rpx;
display: flex;
flex-direction: column;
}
.text_1 {
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 48rpx;
font-family: Alibaba-PuHuiTi-M;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 48rpx;
margin-right: 146rpx;
}
.text_2 {
overflow-wrap: break-word;
color: rgba(153,153,153,1);
font-size: 26rpx;
font-family: Alibaba-PuHuiTi-R;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 26rpx;
margin-top: 20rpx;
}
.section_1 {
background-color: rgba(245,245,245,1.000000);
border-radius: 24rpx;
margin-top: 90rpx;
display: flex;
flex-direction: row;
padding: 34rpx 34rpx 34rpx 40rpx;
}
.image-text_1 {
flex-direction: row;
display: flex;
justify-content: space-between;
width: 100%;
}
.thumbnail_1 {
font-size: 40rpx;
margin-right: 8rpx;
width: 50rpx;
transform: translateY(4rpx);
}
.text-group_2 {
overflow-wrap: break-word;
// color: rgba(170,170,170,1);
font-size: 32rpx;
letter-spacing: 0rpx;
font-family: Alibaba-PuHuiTi-R;
font-weight: normal;
white-space: nowrap;
line-height: 32rpx;
flex: auto;
}
.section_2 {
background-color: rgba(245,245,245,1.000000);
border-radius: 24rpx;
margin-top: 32rpx;
flex-direction: row;
display: flex;
justify-content: flex-center;
padding: 32rpx 40rpx 34rpx 40rpx;
}
.image-text_2 {
flex-direction: row;
display: flex;
justify-content: space-between;
}
.thumbnail_2 {
font-size: 40rpx;
margin-right: 10rpx;
width: 50rpx;
transform: translateY(4rpx);
}
.text-group_3 {
overflow-wrap: break-word;
// color: rgba(170,170,170,1);
font-size: 32rpx;
letter-spacing: 0rpx;
font-family: Alibaba-PuHuiTi-R;
font-weight: normal;
white-space: nowrap;
line-height: 32rpx;
margin-top: 2rpx;
}
.block_1 {
background-color: rgba(187,187,187,1.000000);
width: 2rpx;
height: 32rpx;
display: flex;
flex-direction: column;
margin: 2rpx 0 0 0;
}
.text_3 {
overflow-wrap: break-word;
color: rgba(0,91,162,1);
font-size: 32rpx;
font-family: Alibaba-PuHuiTi-R;
font-weight: normal;
text-align: right;
white-space: nowrap;
line-height: 32rpx;
margin: 2rpx 0 0 34rpx;
}
.text-wrapper_1 {
background-color: rgba(0,91,162,1.000000);
border-radius: 24rpx;
margin-top: 80rpx;
display: flex;
flex-direction: column;
padding: 34rpx 232rpx 32rpx 234rpx;
}
.text_4 {
overflow-wrap: break-word;
color: rgba(255,255,255,1);
font-size: 34rpx;
letter-spacing: 0rpx;
font-family: Alibaba-PuHuiTi-M;
font-weight: normal;
text-align: right;
white-space: nowrap;
line-height: 34rpx;
}
.text_5 {
overflow-wrap: break-word;
color: rgba(144,147,153,1);
font-size: 26rpx;
font-family: PingFangSC-Regular;
font-weight: normal;
text-align: right;
white-space: nowrap;
line-height: 26rpx;
align-self: center;
margin-top: 40rpx;
}
.text-wrapper_2 {
width: 520rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 600rpx 50rpx 0 52rpx;
}
.text_6 {
overflow-wrap: break-word;
color: rgba(136,136,136,1);
font-size: 24rpx;
letter-spacing: 1rpx;
font-family: PingFangSC-Regular;
font-weight: normal;
text-align: center;
white-space: nowrap;
line-height: 24rpx;
}
.text_7 {
overflow-wrap: break-word;
color: rgba(33,80,159,1);
font-size: 24rpx;
letter-spacing: 1rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 24rpx;
}
.image_4 {
width: 750rpx;
height: 68rpx;
margin-top: -2rpx;
}

View File

@ -1,36 +0,0 @@
<view class="page">
<view class="box_1">
<image src="https://lanhu-oss-2537-2.lanhuapp.com/SketchPngc7eafd88f05e3acc51a4c7ba25ac5d8858a9aaac00d7c68d603489d8e173d890" class="image_1"></image>
<view class="image-wrapper_1">
<image src="https://lanhu-oss-2537-2.lanhuapp.com/SketchPngf1d54de0848dc82606ca0a16f317ad38594ba02bce6208c871534a0b25940b90" class="image_2"></image>
<image src="https://lanhu-oss-2537-2.lanhuapp.com/SketchPng2e60a3b7b2cf506a5f57e1f715583164f2b1c3ebfdb48ed093bfea66a8490f11" class="image_3"></image>
</view>
</view>
<view class="box_2">
<view class="text-group_1">
<text lines="1" class="text_1">验证码登录</text>
<text lines="1" class="text_2">未注册的手机号验证后将自动注册</text>
</view>
<view class="section_1">
<view class="image-text_1">
<text class="iconfont icon-shouji thumbnail_1"></text>
<input lines="1" type="number" class="text-group_2" maxlength="11" placeholder="请输入手机号" data-mode="phoneNumber" value="{{phoneNumber}}" bindinput="bindKeyInput"></input>
</view>
</view>
<view class="section_2">
<view class="image-text_2">
<text class="iconfont icon-xiaoxi thumbnail_2"></text>
<input lines="1" type="number" class="text-group_3" placeholder="请输入密码" data-mode="code" value="{{code}}" bindinput="bindKeyInput"></input>
</view>
<!-- <view class="block_1"></view>
<text lines="1" class="text_3" bind:tap="getCode">{{getCodeText}}</text> -->
</view>
<view class="text-wrapper_1">
<text lines="1" class="text_4" bind:tap="login">登录/注册</text>
</view>
<view class="text-wrapper_2">
<text lines="1" class="text_6">登录或注册完成即代表您同意</text>
<text lines="1" class="text_7">《用户服务协议》</text>
</view>
</view>
</view>

View File

@ -1,107 +0,0 @@
import request from '~/api/request';
import useToastBehavior from '~/behaviors/useToast';
Page({
behaviors: [useToastBehavior],
data: {
isLoad: true,
service: [],
personalInfo: {
name: '邹方成'
},
gridList: [
{
name: '全部发布',
icon: 'root-list',
type: 'all',
url: '',
},
{
name: '审核中',
icon: 'search',
type: 'progress',
url: '',
},
{
name: '已发布',
icon: 'upload',
type: 'published',
url: '',
},
{
name: '草稿箱',
icon: 'file-copy',
type: 'draft',
url: '',
},
],
settingList: [
{ label: '用药方案', path: '/pages/therapeuticRegimen/index', icon: 'service', type: 'text' },
{ label: '健康教育', path: '/pages/articleList/index', icon: 'setting', type: 'text' },
],
},
onLoad() {
// this.getServiceList();
},
handelClick(e) {
console.log(e)
},
async onShow() {
const Token = wx.getStorageSync('access_token');
if (Token) {
const personalInfo = await this.getPersonalInfo();
this.setData({
isLoad: false,
personalInfo: personalInfo,
settingList: [
{ label: '用药方案', path: '/pages/therapeuticRegimen/index', icon: 'service', type: 'text' },
{ label: '健康教育', path: '/pages/articleList/index', icon: 'setting', type: 'text' },
],
});
} else {
this.setData({
isLoad: true,
settingList: [
{ label: '用药方案', path: '', icon: 'service', type: 'text' },
{ label: '健康教育', path: '', icon: 'setting', type: 'text' },
],
});
}
},
getServiceList() {
request('/api/getServiceList').then((res) => {
const { service } = res.data.data;
this.setData({ service });
});
},
async getPersonalInfo() {
const info = await request('patient/basic/0').then((res) => res);
return info;
},
onLogin(e) {
wx.navigateTo({
url: '/pages/login/login',
});
},
onNavigateTo() {
wx.navigateTo({ url: `/pages/my/info-edit/index` });
},
onEleClick(e) {
const { name, url } = e.currentTarget.dataset.data;
if (url) return;
this.onShowToast('#t-toast', name);
},
});

View File

@ -1,128 +0,0 @@
.my {
height: calc(100vh - 56px);
overflow-y: auto;
--td-navbar-bg-color: transparent;
.nav-bg {
width: 750rpx;
height: 200rpx;
position: fixed;
top: 0;
}
&-info,
&-service,
&-setting {
background-color: #fff;
}
&-info {
border-radius: 24rpx;
margin: 8rpx 32rpx 0rpx 32rpx;
// padding-bottom: 32rpx;
overflow: hidden;
.cell-class-title {
font-weight: 600 !important;
}
.cell-class-center {
display: flex;
align-items: center !important;
}
.divider-class {
margin-top: 0 !important;
margin-bottom: 0 !important;
}
.grid-class {
margin-top: 40rpx;
}
.grid-item .t-grid-item__content {
padding: 0px !important;
}
.split-line {
border-right: 1px solid #e7e7e7;
}
// 头像margin-right
--td-spacer-1: 32rpx;
&__person {
.name {
line-height: 48rpx;
font-size: 32rpx;
color: #000000e6;
font-weight: 600;
}
.tags {
display: flex;
margin-top: 16rpx;
--td-text-color-primary: #000000e6;
--td-tag-medium-font-size: 20rpx;
--td-tag-medium-icon-size: 24rpx;
}
.tag:not(:last-child) {
margin-right: 16rpx;
}
}
}
&-service {
border-radius: 24rpx;
margin: 32rpx;
padding-bottom: 8rpx;
overflow: hidden;
&__list-item {
.t-grid-item__content {
padding-bottom: 16rpx !important;
}
.t-grid-item__text {
height: 40rpx !important;
}
}
&--tips {
height: 44rpx;
line-height: 44rpx;
padding-left: 40rpx;
margin-top: 32rpx;
color: #000000e6;
font-size: 28rpx;
font-weight: 600;
}
}
.my-cell{
margin-top: 30rpx;
}
.my-info__person{
position: relative;
text{
font-size: 24rpx;
margin-left: 20rpx;
color: #666;
}
.edit{
position: absolute;
right: -20rpx;
top: 0;
}
}
.time{
font-size: 26rpx;
}
.peld{
font-size: 26rpx;
color: red;
.tag{
margin-left: 20rpx;
}
}
}

View File

@ -1,44 +0,0 @@
<t-toast id="t-toast" />
<view class="my">
<nav title-text="我的" />
<view class="my-info">
<t-cell-group>
<t-cell wx:if="{{!isLoad}}" bordered="{{false}}">
<t-avatar image="{{personalInfo.image}}" slot="left-icon" size="large" />
<view class="my-info__person" slot="description">
<view class="name">{{personalInfo.username}}
<text wx:if="{{personalInfo.sex == 1}}">男</text>
<text wx:if="{{personalInfo.sex == 2}}">女</text>
<text>{{personalInfo.age}}</text>
<t-icon class="edit" slot="right-icon" name="edit" size="36rpx" color="#000000e6" bindtap="onNavigateTo" />
</view>
<view class="time">胆道闭锁手术时间:{{personalInfo.operative_date}}</view>
<view class="peld">PELD评分{{personalInfo.risk_value}}
<t-tag wx:if="{{personalInfo.risk_type == 1}}" class="tag" theme="success" size="small">低危</t-tag>
<t-tag wx:if="{{personalInfo.risk_type == 2}}" class="tag" theme="warning" size="small">中危</t-tag>
<t-tag wx:if="{{personalInfo.risk_type == 3}}" class="tag" theme="danger" size="small">高危</t-tag>
</view>
</view>
</t-cell>
<t-cell wx:if="{{isLoad}}" title="请先登录/注册" bordered="{{false}}" t-class-title="cell-class-title" t-class-center="cell-class-center" bindtap="onLogin">
<t-avatar slot="left-icon" icon="user" size="128rpx" />
</t-cell>
</t-cell-group>
</view>
<view class="my-cell">
<t-cell-group theme="card">
<t-cell wx:for="{{settingList}}" wx:for-item="item" wx:key="type" title="{{item.label}}" url="{{item.path}}" arrow />
</t-cell-group>
</view>
</view>

View File

@ -1,119 +1,45 @@
import request from '~/api/request';
import useToastBehavior from '~/behaviors/useToast';
Page({
behaviors: [useToastBehavior],
data: {
isLoad: true,
service: [],
personalInfo: {
name: '邹方成'
},
gridList: [
{
name: '全部发布',
icon: 'root-list',
type: 'all',
url: '',
},
{
name: '审核中',
icon: 'search',
type: 'progress',
url: '',
},
{
name: '已发布',
icon: 'upload',
type: 'published',
url: '',
},
{
name: '草稿箱',
icon: 'file-copy',
type: 'draft',
url: '',
},
],
isLogin: true,
settingList: [
{ label: '用药方案', path: '/pages/therapeuticRegimen/index', icon: 'service', type: 'text' },
{ label: '健康教育', path: '/pages/articleList/index', icon: 'setting', type: 'text' },
],
},
onLoad() {
// this.getServiceList();
this.getToken();
},
async getToken() {
const Token = await wx.getStorageSync('access_token');
console.log(Token)
this.setData({
isLogin: Token ? true : false,
})
},
handelClick(e) {
console.log(e)
},
async onShow() {
const Token = wx.getStorageSync('access_token');
if (Token) {
const personalInfo = await this.getPersonalInfo();
this.setData({
isLoad: false,
personalInfo: personalInfo,
settingList: [
{ label: '用药方案', path: '/pages/therapeuticRegimen/index', icon: 'service', type: 'text' },
{ label: '健康教育', path: '/pages/articleList/index', icon: 'setting', type: 'text' },
],
});
} else {
this.setData({
isLoad: true,
settingList: [
{ label: '用药方案', path: '', icon: 'service', type: 'text' },
{ label: '健康教育', path: '', icon: 'setting', type: 'text' },
],
});
}
this.getToken();
},
getServiceList() {
request('/api/getServiceList').then((res) => {
const { service } = res.data.data;
this.setData({ service });
});
onReady(){
this.getToken();
},
async getPersonalInfo() {
const info = await request('patient/basic/0').then((res) => res);
return info;
},
onLogin(e) {
onLogin(){
wx.navigateTo({
url: '/pages/login/login',
});
},
onNavigateTo() {
wx.navigateTo({ url: `/pages/my/info-edit/index` });
},
onEleClick(e) {
const { name, url } = e.currentTarget.dataset.data;
if (url) return;
this.onShowToast('#t-toast', name);
},
toPath(e){
wx.navigateTo({
url: e.currentTarget.dataset.url,
})
},
logOut(){
wx.removeStorageSync('access_token');
this.setData({
isLoad: true,
isLogin: false,
})
}

View File

@ -1,7 +1,7 @@
<view class="page">
<view class="block_1">
<view class="box_1">
<view class="text-wrapper_1" wx:if="{{!isLoad}}" bind:tap="logOut">
<view class="text-wrapper_1" wx:if="{{isLogin}}" bind:tap="logOut">
<text lines="1" class="text_1">退出登录</text>
</view>
</view>
@ -10,65 +10,31 @@
<view class="block_3">
<image src="../../assets/images/my/my-top-bg.png" class="image_3"></image>
<view class="section_2" wx:if="{{!isLoad}}" bind:tap="onNavigateTo">
<view class="section_2" wx:if="{{isLogin}}" >
<view class="image_5">
<image src="../../assets/images/my/baby.png" class=""></image>
<image src="../../assets/images/my/doctor.png" class=""></image>
</view>
<view class="block_4">
<view class="text-group_4">
<text lines="1" class="text_3">{{personalInfo.username}}<text lines="1" decode="true" class="text_5">{{personalInfo.sex == 1 ? '男': '女'}}&nbsp;·&nbsp;{{personalInfo.age}}</text></text>
<text lines="1" class="text_4">胆道闭锁手术时间:{{personalInfo.operative_date}}</text>
</view>
<view class="group_1">
<view class="image-text_4">
<text class="iconfont icon-gantanhao_icon thumbnail_1"></text>
<text lines="1" class="text-group_5">PELD评分{{personalInfo.risk_value}}</text>
</view>
<view class="text-wrapper_2 scuess" wx:if="{{personalInfo.risk_type == 1}}">
<text lines="1" class="text_6">低危</text>
</view>
<view class="text-wrapper_2 waring" wx:if="{{personalInfo.risk_type == 2}}">
<text lines="1" class="text_6">中危</text>
</view>
<view class="text-wrapper_2 danger" wx:if="{{personalInfo.risk_type == 3}}">
<text lines="1" class="text_6">高危</text>
<text lines="1" class="text_3">医生端</text>
</view>
</view>
</view>
<text class="iconfont icon-youjiantou label_4"></text>
</view>
<view class="section_2" wx:if="{{isLoad}}" bind:tap="onLogin">
<view class="section_2" wx:if="{{!isLogin}}" bind:tap="onLogin">
<view class="image_5">
<image src="../../assets/images/my/baby.png" class=""></image>
<image src="../../assets/images/my/doctor.png" class=""></image>
</view>
<view class="block_4">
<view class="text-group_4">
<text lines="1" class="text_3 noLogin">请先登录/注册</text>
<text lines="1" class="text_3 noLogin">请先登录</text>
</view>
</view>
<text class="iconfont icon-youjiantou label_4"></text>
</view>
<view class="section_3">
<view class="block_5" data-url="/pages/therapeuticRegimen/index" bind:tap="toPath">
<view class="image-text_5">
<image src="../../assets/images/my/yyfa.svg" class="thumbnail_2"></image>
<text lines="1" class="text-group_6">用药方案</text>
</view>
<text class="iconfont icon-youjiantou thumbnail_3"></text>
</view>
<view class="block_6"></view>
<view class="block_7" data-url="/pages/articleList/index" bind:tap="toPath">
<view class="image-text_6">
<image src="../../assets/images/my/jkjy.svg" class="thumbnail_4"></image>
<text lines="1" class="text-group_7">健康教育</text>
</view>
<text class="iconfont icon-youjiantou thumbnail_3"></text>
</view>
</view>
</view>
</view>

View File

@ -1,280 +0,0 @@
import request from '~/api/request';
let mode = ''
let modeText = ''
Page({
data: {
personInfo: {
username: '',
sex: 1,
id_number: '',
birthday: '',
operative_date: '',
delivery_type: '',
prenatal_check_type: '',
gestational_week: '',
conception_type: '',
birth_number: '',
parity_number: '',
birth_weight: '',
prenatal_check_remark: ''
},
genderOptions: [
{
label: '男',
value: 1,
},
{
label: '女',
value: 2,
}
],
birthVisible: false,
birthStart: '1970-01-01',
birthEnd: new Date().toISOString().split('T')[0],
birthTime: 0,
birthFilter: (type, options) => (type === 'year' ? options.sort((a, b) => b.value - a.value) : options),
addressText: '',
addressVisible: false,
provinces: [],
cities: [],
gridConfig: {
column: 3,
width: 160,
height: 160,
},
timeValue: '',
timePicker:new Date().toISOString().split('T')[0],
idError: false,
numberError: false,
weekError: false,
numberFormat: (v) => {
const isNumber = /^\d+(\.\d+)?$/.test(v);
if (isNumber) {
return parseFloat(v).toFixed(2);
}
return v;
},
// 下拉
selectList: [],
selectValue: '',
selectVisible: false,
deliveryList:[{label: '顺产', value: 1},{label: '剖腹产', value: 2}],
prenatal_checkList: [{label: '有', value: 1},{label: '无', value: 2}],
parity_numberList: [{label: '1胎', value: 1},{label: '2胎', value: 2},{label: '3胎', value: 3},{label: '大于等于4胎', value: 4}],
birth_numberList:[{label: '1产', value: 1},{label: '2产', value: 2},{label: '大于等于3产', value: 3}],
conception_typeList: [{label: '自然受孕', value: 1},{label: '辅助生殖技术', value: 2}]
},
onLoad() {
// this.initAreaData();
this.getPersonalInfo()
},
async getPersonalInfo() {
const info = await request('patient/basic/0')
this.setData({
personInfo: {
username: info.username,
sex: info.sex,
id_number: info.id_number,
birthday: info.birthday || '',
operative_date: info.operative_date,
delivery_type: info.delivery_type,
prenatal_check_type: info.prenatal_check_type,
gestational_week: info.gestational_week,
conception_type: info.conception_type,
birth_number: info.birth_number,
parity_number: info.parity_number,
birth_weight: info.birth_weight,
prenatal_check_remark: info.prenatal_check_remark
}
})
},
getAreaOptions(data, filter) {
const res = Object.keys(data).map((key) => ({ value: key, label: data[key] }));
return typeof filter === 'function' ? res.filter(filter) : res;
},
getCities(provinceValue) {
return this.getAreaOptions(
areaList.cities,
(city) => `${city.value}`.slice(0, 2) === `${provinceValue}`.slice(0, 2),
);
},
initAreaData() {
const provinces = this.getAreaOptions(areaList.provinces);
const cities = this.getCities(provinces[0].value);
this.setData({ provinces, cities });
},
onAreaPick(e) {
const { column, index } = e.detail;
const { provinces } = this.data;
// 更改省份则更新城市列表
if (column === 0) {
const cities = this.getCities(provinces[index].value);
this.setData({ cities });
}
},
showPicker(e) {
mode = e.currentTarget.dataset.mode;
if(mode == "birth"){
this.setData({
birthVisible: true,
timePicker: this.data.personInfo.birthday ? this.data.personInfo.birthday : new Date().toISOString().split('T')[0]
});
} else {
this.setData({
birthVisible: true,
timePicker: this.data.personInfo.operative_date ? this.data.personInfo.operative_date : new Date().toISOString().split('T')[0]
});
}
},
hidePicker(e) {
const { mode } = e.currentTarget.dataset;
this.setData({
[`${mode}Visible`]: false,
});
},
onPickerChange(e) {
const { value, label } = e.detail;
console.log(mode, mode == 'birth')
if(mode == 'birth'){
this.setData({
['personInfo.birthday']: value
})
}else{
this.setData({
['personInfo.operative_date']:value
})
}
},
personInfoFieldChange(field, e) {
const { value } = e.detail;
this.setData({
[`personInfo.${field}`]: value,
});
},
onNameChange(e) {
this.personInfoFieldChange('username', e);
},
onGenderChange(e) {
this.personInfoFieldChange('sex', e);
},
// onYearChange(e) {
// this.personInfoFieldChange('yearType', e);
// },
onIntroductionChange(e) {
this.personInfoFieldChange('introduction', e);
},
onPhotosRemove(e) {
const { index } = e.detail;
// const { photos } = this.data.personInfo;
// photos.splice(index, 1);
// this.setData({
// 'personInfo.photos': photos,
// });
},
onPhotosSuccess(e) {
const { files } = e.detail;
// this.setData({
// 'personInfo.photos': files,
// });
},
onPhotosDrop(e) {
const { files } = e.detail;
// this.setData({
// 'personInfo.photos': files,
// });
},
async onSaveInfo() {
// console.log(this.data.personInfo);
const res = await request('patient/set_personal_information', 'get', {
data: this.data.personInfo
})
wx.switchTab({
url: `/pages/my/index`,
});
},
onIdInput(e){
// 18位身份证正则
const { idError } = this.data;
const reg18 = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/.test(e.detail.value);
if (idError == reg18) {
this.setData({
idError: !reg18,
});
}
this.personInfoFieldChange('id_number', e);
},
onWeightInput(e){
const { numberError } = this.data;
const isNumber = /^\d+(\.\d+)?$/.test(e.detail.value);
if (numberError === isNumber) {
this.setData({
numberError: !isNumber,
});
}
this.personInfoFieldChange('birth_weight', e);
},
onWeekInput(e){
const { weekError } = this.data;
const isNumber = /^\d+(\.\d+)?$/.test(e.detail.value);
if (weekError === isNumber) {
this.setData({
weekError: !isNumber,
});
}
this.personInfoFieldChange('gestational_week', e);
},
showSelect(e){
const { mode, list } = e.currentTarget.dataset;
modeText = mode
this.setData({
selectVisible: true,
selectValue: this.data.personInfo[mode] ? this.data.personInfo[mode] : '',
selectList: list
})
},
onSelectChange(e){
const { value, label } = e.detail;
this.setData({
[`personInfo.${modeText}`]: value[0]
})
},
onSaveInfo(){
console.log(this.data.personInfo)
let obj = this.data.personInfo
obj.birth_weight = Number(obj.birth_weight)
obj.gestational_week = Number(obj.gestational_week)
if( obj.prenatal_check_type == 2){
obj.prenatal_check_remark = '无'
}
request('patient/set_personal_information', 'post', obj)
}
});

View File

@ -1,16 +0,0 @@
{
"navigationStyle": "custom",
"usingComponents": {
"t-navbar": "tdesign-miniprogram/navbar/navbar",
"t-input": "tdesign-miniprogram/input/input",
"t-cell": "tdesign-miniprogram/cell/cell",
"t-radio": "tdesign-miniprogram/radio/radio",
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group",
"t-textarea": "tdesign-miniprogram/textarea/textarea",
"t-upload": "tdesign-miniprogram/upload/upload",
"t-button": "tdesign-miniprogram/button/button",
"t-picker": "tdesign-miniprogram/picker/picker",
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
"t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker"
}
}

View File

@ -1,46 +0,0 @@
page {
background-color: #fff;
}
.info-edit {
--td-input-vertical-padding: 0;
}
.info-edit__cell {
.t-cell__title {
flex: none;
width: 162rpx;
}
}
.info-edit__gender {
--td-radio-vertical-padding: 0;
width: 100%;
display: flex;
justify-content: space-between;
}
.info-edit__introduction {
width: 100%;
padding: 0 !important;
height: 200rpx;
}
.info-edit__photos {
width: 100%;
}
.info-edit__save {
padding: 28rpx;
// position: fixed;
// left: 32rpx;
// right: 32rpx;
// bottom: calc(env(safe-area-inset-bottom) + 32rpx);
}
.info-edit__gender {
width: 45%;
}
.t-textarea{
height: 140rpx;
}

View File

@ -1,94 +0,0 @@
<t-navbar left-arrow title="个人信息" />
<view class="info-edit">
<t-cell class="info-edit__cell" required title="姓名">
<t-input bind:change="onNameChange" align="right" borderless placeholder="请输入患者姓名" slot="note" value="{{personInfo.username}}" />
</t-cell>
<t-cell class="info-edit__cell" required title="性别">
<t-radio-group
bind:change="onGenderChange"
borderless
defaultValue="{{personInfo.sex}}"
options="{{genderOptions}}"
slot="note"
t-class="info-edit__gender"
value="{{personInfo.sex}}"
/>
</t-cell>
<t-cell class="info-edit__cell" title="身份证号">
<t-input bind:change="onIdInput" align="right" borderless placeholder="请输入身份证号" slot="note" value="{{personInfo.id_number}}"
tips="{{idError ? '身份证号输入不正确' : ''}}"
/>
</t-cell>
<t-cell required arrow bind:click="showPicker" data-mode="birth" note="{{personInfo.birthday || '请选择'}}" title="出生日期" />
<t-cell class="info-edit__cell" align="right" required title="年龄" note="{{personInfo.age}}">
</t-cell>
<t-cell class="info-edit__cell" required title="出生体重">
<t-input align="right" bind:change="onWeightInput" borderless placeholder="请输入" slot="note" value="{{personInfo.birth_weight}}" suffix="g"
format="{{numberFormat}}"
tips="{{numberError ? '请输入正确的体重' : ''}}"
/>
</t-cell>
<t-cell required arrow bind:click="showPicker" data-mode="operative" note="{{personInfo.operative_date || '请选择'}}" title="胆道闭锁手术时间" />
<t-cell title="胎次" required arrow bind:click="showSelect" data-mode="parity_number" data-list="{{parity_numberList}}" note="{{personInfo.parity_number ? (parity_numberList[personInfo.parity_number - 1].label) : '请选择'}}">
</t-cell>
<t-cell title="产次" required arrow bind:click="showSelect" data-mode="birth_number" data-list="{{birth_numberList}}" note="{{personInfo.birth_number ? (birth_numberList[personInfo.birth_number - 1].label) : '请选择'}}">
</t-cell>
<t-cell title="受孕方式" required arrow bind:click="showSelect" data-mode="conception_type" data-list="{{conception_typeList}}" note="{{personInfo.conception_type ? (conception_typeList[personInfo.conception_type - 1].label) : '请选择'}}">
</t-cell>
<t-cell class="info-edit__cell" required title="孕周">
<t-input align="right" suffix="周" bind:change="onWeekInput" borderless placeholder="请输入" slot="note" value="{{personInfo.gestational_week}}"
format="{{numberFormat}}"
tips="{{weekError ? '请输入正确的孕周' : ''}}" />
</t-cell>
<t-cell title="产检是否有异常(如有,请填写)" required arrow bind:click="showSelect" data-mode="prenatal_check_type" data-list="{{prenatal_checkList}}" note="{{personInfo.prenatal_check_type ? (prenatal_checkList[personInfo.prenatal_check_type - 1].label) : '请选择'}}">
</t-cell>
<t-textarea t-class="external-class" wx:if="{{personInfo.prenatal_check_type == 1}}" placeholder="请输入异常描述" disableDefaultPadding="{{true}}" value="{{personInfo.prenatal_check_remark}}" />
<t-cell title="分娩方式" required arrow bind:click="showSelect" data-mode="delivery_type" data-list="{{deliveryList}}" note="{{personInfo.delivery_type ? (deliveryList[personInfo.delivery_type - 1].label) : '请选择'}}">
</t-cell>
</view>
<view class="info-edit__save">
<t-button bind:tap="onSaveInfo" block size="medium" theme="primary">保存</t-button>
</view>
<t-date-time-picker
auto-close
bind:cancel="hidePicker"
bind:change="onPickerChange"
cancelBtn="取消"
confirmBtn="确认"
data-mode="birth"
defaultValue="{{timePicker}}"
end="{{birthEnd}}"
filter="{{birthFilter}}"
format="YYYY-MM-DD"
mode="date"
popup-props="{{ { usingCustomNavbar: true } }}"
start="{{birthStart}}"
title="选择生日"
value="{{timeValue}}"
visible="{{birthVisible}}"
/>
<!-- 下拉选择 -->
<t-picker
visible="{{selectVisible}}"
value="{{selectValue}}"
data-key="value"
cancelBtn="取消"
confirmBtn="确认"
usingCustomNavbar
bindchange="onSelectChange"
bindcancel="onPickerCancel"
>
<t-picker-item options="{{selectList}}"></t-picker-item>
</t-picker>

View File

@ -1,11 +1,11 @@
// pages/patients/index.js
import request from '~/api/request'
Page({
/**
* 页面的初始数据
*/
data: {
list: []
},
handleClick(e){
@ -13,6 +13,14 @@ Page({
url: '/pages/home/index',
})
},
async getList() {
const res = await request('doctor/patients')
this.setData({
list: res.list
})
},
/**
* 生命周期函数--监听页面加载
*/
@ -31,7 +39,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.getList();
},
/**

View File

@ -82,23 +82,25 @@
border-radius: 24rpx;
display: flex;
flex-direction: column;
padding: 32rpx 230rpx 40rpx 24rpx;
padding: 32rpx;
margin-bottom: 24rpx;
}
.image-text_2 {
width: 356rpx;
margin-right: 92rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
}
.box_5 {
border-radius: 100%;
background-image: url(https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/0541ba31b7264f1ab9115b54b31a4f09_mergeImage.png);
width: 84rpx;
height: 84rpx;
border-radius: 84rpx;
border: 1px solid rgba(248,248,248,1);
display: flex;
flex-direction: column;
image{
width: 100%;
height: 100%;
border-radius: 84rpx;
}
}
.text-group_2 {
margin-bottom: 8rpx;
@ -106,20 +108,16 @@
flex-direction: column;
}
.text-wrapper_1 {
width: 256rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
}
.text_2 {
overflow-wrap: break-word;
color: rgba(17,17,17,1);
font-size: 32rpx;
font-family: Alibaba-PuHuiTi-M;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 32rpx;
margin-left: 20rpx;
}
.text_3 {
overflow-wrap: break-word;
@ -127,21 +125,17 @@
font-size: 24rpx;
font-family: Alibaba-PuHuiTi-R;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 24rpx;
margin-top: 8rpx;
}
.text_4 {
overflow-wrap: break-word;
color: rgba(96,98,102,1);
font-size: 28rpx;
font-family: Alibaba-PuHuiTi-R;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 28rpx;
margin: 16rpx 74rpx 0 0;
padding-left: 20rpx;
}
.text_5 {
overflow-wrap: break-word;

View File

@ -13,25 +13,34 @@
</view>
</view>
<view class="box_4">
<view class="block_1" bind:tap="handleClick">
<view class="block_1" wx:for="{{list}}" bind:tap="handleClick">
<view class="image-text_2">
<view class="box_5"></view>
<view class="box_5">
<image :src="{{item.avatar}}" class="label_1"></image>
</view>
<view class="text-group_2">
<view class="text-wrapper_1">
<text lines="1" class="text_2">张知梦</text>
<text lines="1" decode="true" class="text_3">女&nbsp;·&nbsp;2岁5个月</text>
<text lines="1" class="text_2">{{item.username}}</text>
<text lines="1" decode="true" class="text_3">{{item.sex == 1 ? '男':'女'}}&nbsp;·&nbsp;{{item.age}}</text>
</view>
<text lines="1" class="text_4">PELD评分12</text>
<text lines="1" class="text_4">PELD评分{{item.risk_value}}</text>
</view>
</view>
<text lines="1" class="text_5">下次随访时间:2025-12-12</text>
<text lines="1" class="text_5">下次随访时间:{{item.next_follow_date}}</text>
<view class="box_6">
<view class="text-wrapper_2">
<view class="text-wrapper_2" wx:if="{{item.risk_type == 3}}">
<text lines="1" class="text_6">高危</text>
</view>
<view class="text-wrapper_3">
<text lines="1" class="text_7">术后3月</text>
<view class="text-wrapper_5" wx:if="{{item.risk_type == 2}}">
<text lines="1" class="text_12">中危</text>
</view>
<view class="text-wrapper_8" wx:if="{{item.risk_type == 1}}">
<text lines="1" class="text_18">低危</text>
</view>
<view class="text-wrapper_3">
<text lines="1" class="text_7">术后{{item.postoperative_duration}}</text>
</view>
</view>
</view>
<view class="block_2">

2433
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,12 +2,19 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "随访问卷",
"pathName": "pages/followUp/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/my/index",
"pathName": "pages/my/index",
"query": "",
"scene": null,
"launchMode": "default"
"launchMode": "default",
"scene": null
},
{
"name": "pages/home/index",

6
utils/aesCryptoJS.js Normal file
View File

@ -0,0 +1,6 @@
import CryptoJS from "crypto-js";
const aesCryptoJS = function (text) {
return CryptoJS.MD5(text).toString()
}
export default aesCryptoJS;