儿科患者端
@ -1,7 +1,5 @@
|
||||
import config from '~/config';
|
||||
const baseUrl = 'http://1.15.53.35:9998/';
|
||||
|
||||
const baseUrl = 'https://ddbs.1024tool.vip/';
|
||||
const delay = config.isMock ? 500 : 0;
|
||||
function request(url, method = 'GET', data = {}) {
|
||||
const header = {
|
||||
'content-type': 'application/json',
|
||||
@ -20,29 +18,24 @@ function request(url, method = 'GET', data = {}) {
|
||||
dataType: 'json', // 微信官方文档中介绍会对数据进行一次JSON.parse
|
||||
header,
|
||||
success(res) {
|
||||
console.log(res)
|
||||
setTimeout(() => {
|
||||
|
||||
if(res.data.code && res.data.code == 10103){
|
||||
if (res.data.code) {
|
||||
if (res.data.code == 10103) {
|
||||
wx.removeStorageSync('access_token');
|
||||
wx.switchTab({
|
||||
url: '/pages/my/index',
|
||||
})
|
||||
reject(res.data);
|
||||
} else {
|
||||
console.log(res.data)
|
||||
resolve(res.data);
|
||||
}
|
||||
reject(res.data);
|
||||
} else {
|
||||
resolve(res.data);
|
||||
}
|
||||
|
||||
}, delay);
|
||||
},
|
||||
fail(err) {
|
||||
setTimeout(() => {
|
||||
console.log(err)
|
||||
// 断网、服务器挂了都会fail回调,直接reject即可
|
||||
|
||||
reject(err);
|
||||
}, delay);
|
||||
console.log(err)
|
||||
// 断网、服务器挂了都会fail回调,直接reject即可
|
||||
reject(err);
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
import request from './request'
|
||||
|
||||
export const userLogin = () => {
|
||||
return request({
|
||||
url: 'patient/password_login',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
41
app.js
@ -1,12 +1,11 @@
|
||||
// app.js
|
||||
import config from './config';
|
||||
import Mock from './mock/index';
|
||||
// import Mock from './mock/index';
|
||||
import createBus from './utils/eventBus';
|
||||
import { connectSocket, fetchUnreadNum } from './mock/chat';
|
||||
// import { connectSocket, fetchUnreadNum } from './mock/chat';
|
||||
|
||||
if (config.isMock) {
|
||||
Mock();
|
||||
}
|
||||
// if (config.isMock) {
|
||||
// Mock();
|
||||
// }
|
||||
|
||||
App({
|
||||
onLaunch() {
|
||||
@ -28,39 +27,15 @@ App({
|
||||
});
|
||||
});
|
||||
|
||||
this.getUnreadNum();
|
||||
this.connect();
|
||||
},
|
||||
globalData: {
|
||||
userInfo: null,
|
||||
unreadNum: 0, // 未读消息数量
|
||||
socket: null, // SocketTask 对象
|
||||
// userInfo: null,
|
||||
// unreadNum: 0, // 未读消息数量
|
||||
// socket: null, // SocketTask 对象
|
||||
},
|
||||
|
||||
/** 全局事件总线 */
|
||||
eventBus: createBus(),
|
||||
|
||||
/** 初始化WebSocket */
|
||||
connect() {
|
||||
const socket = connectSocket();
|
||||
socket.onMessage((data) => {
|
||||
data = JSON.parse(data);
|
||||
if (data.type === 'message' && !data.data.message.read) this.setUnreadNum(this.globalData.unreadNum + 1);
|
||||
});
|
||||
this.globalData.socket = socket;
|
||||
},
|
||||
|
||||
/** 获取未读消息数量 */
|
||||
getUnreadNum() {
|
||||
fetchUnreadNum().then(({ data }) => {
|
||||
this.globalData.unreadNum = data;
|
||||
this.eventBus.emit('unread-num-change', data);
|
||||
});
|
||||
},
|
||||
|
||||
/** 设置未读消息数量 */
|
||||
setUnreadNum(unreadNum) {
|
||||
this.globalData.unreadNum = unreadNum;
|
||||
this.eventBus.emit('unread-num-change', unreadNum);
|
||||
},
|
||||
});
|
||||
|
||||
11
app.json
@ -22,13 +22,6 @@
|
||||
"pages": ["loginCode"]
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"root": "pages/forGetPassword",
|
||||
"name": "forGetPassword",
|
||||
"pages": ["index"]
|
||||
},
|
||||
{
|
||||
"root": "pages/clockIn",
|
||||
"name": "clockIn",
|
||||
@ -72,6 +65,10 @@
|
||||
"root": "pages/mmp-7",
|
||||
"name": "mmp-7",
|
||||
"pages": ["index"]
|
||||
},{
|
||||
"root": "pages/diagnosticResults",
|
||||
"name": "diagnosticResults",
|
||||
"pages": ["index"]
|
||||
}
|
||||
],
|
||||
"window": {
|
||||
|
||||
23
app.less
@ -14,7 +14,23 @@ page {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.t-input{
|
||||
padding: 20rpx 38rpx;
|
||||
}
|
||||
.t-cell{
|
||||
.t-input{
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.info-edit{
|
||||
.t-cell{
|
||||
padding: 28rpx 0rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.user-info{
|
||||
.t-input{
|
||||
padding: 28rpx 38rpx;
|
||||
}
|
||||
}
|
||||
.t-input__label:not(:empty) {
|
||||
max-width: 10rem;
|
||||
@ -31,6 +47,13 @@ page {
|
||||
.t-image-viewer {
|
||||
top: 0;
|
||||
}
|
||||
.t-navbar__content{
|
||||
background-color: transparent;
|
||||
}
|
||||
.t-overlay {
|
||||
top: 0!important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
BIN
assets/images/diagnosticResults/bg.png
Normal file
|
After Width: | Height: | Size: 120 KiB |
BIN
assets/images/diagnosticResults/icon_1.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
assets/images/diagnosticResults/icon_2.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/images/diagnosticResults/icon_3.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
assets/images/diagnosticResults/icon_4.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/images/diagnosticResults/img1.png
Normal file
|
After Width: | Height: | Size: 87 KiB |
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>生长曲线备份</title>
|
||||
<defs>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="97.7014374%" id="linearGradient-1">
|
||||
<stop stop-color="#54A4E6" offset="0%"></stop>
|
||||
<stop stop-color="#1C71B3" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<rect id="path-2" x="0" y="0" width="18" height="18" rx="4"></rect>
|
||||
</defs>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="02首页-00" transform="translate(-22.000000, -100.000000)">
|
||||
<g id="宝宝生长曲线" transform="translate(12.000000, 100.000000)">
|
||||
<g id="生长曲线备份" transform="translate(10.000000, 0.000000)">
|
||||
<mask id="mask-3" fill="white">
|
||||
<use xlink:href="#path-2"></use>
|
||||
</mask>
|
||||
<use id="蒙版" fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
|
||||
<path d="M13.2887481,8.84531617 C14.1171752,8.84531617 14.7887481,9.51688904 14.7887481,10.3453162 L14.7887481,13.9183441 C14.7887481,14.7467712 14.1171752,15.4183441 13.2887481,15.4183441 L13.0022341,15.4183441 C12.173807,15.4183441 11.5022341,14.7467712 11.5022341,13.9183441 L11.5022341,10.3453162 C11.5022341,9.51688904 12.173807,8.84531617 13.0022341,8.84531617 L13.2887481,8.84531617 Z M4.08650902,12.1308664 C4.91493615,12.1308664 5.58650902,12.8024393 5.58650902,13.6308664 L5.58650902,13.9173803 C5.58650902,14.7458075 4.91493615,15.4173803 4.08650902,15.4173803 L3.79999507,15.4173803 C2.97156795,15.4173803 2.29999507,14.7458075 2.29999507,13.9173803 L2.29999507,13.6308664 C2.29999507,12.8024393 2.97156795,12.1308664 3.79999507,12.1308664 L4.08650902,12.1308664 Z M8.68762856,10.8150892 C9.51605568,10.8150892 10.1876286,11.486662 10.1876286,12.3150892 L10.1876286,13.9162087 C10.1876286,14.7446358 9.51605568,15.4162087 8.68762856,15.4162087 L8.40111461,15.4162087 C7.57268748,15.4162087 6.90111461,14.7446358 6.90111461,13.9162087 L6.90111461,12.3150892 C6.90111461,11.486662 7.57268748,10.8150892 8.40111461,10.8150892 L8.68762856,10.8150892 Z M16.1174277,3.43416352 C16.1291426,3.55601781 16.1183842,3.67898747 16.0856874,3.79695624 L15.2775434,6.71271375 C15.1300309,7.24493411 14.5789985,7.55680143 14.0467782,7.40928892 C13.8518339,7.35525732 13.6778605,7.24337219 13.5478287,7.08840633 L12.9656075,6.3972697 C10.1188007,8.87646671 7.4276443,9.86144651 3.86551098,9.93934871 L3.48661779,9.94422682 L2.98876335,9.94281924 C2.55314138,9.94281924 2.2,9.58967786 2.2,9.15405589 C2.2,8.78914098 2.44902966,8.47819263 2.79724606,8.38965382 L2.90453675,8.3699329 L2.9893466,8.36529383 L3.51583083,8.36645753 C6.88597863,8.34509504 9.31054469,7.49628332 11.9523661,5.18796425 L11.3441794,4.46219937 C10.9891777,4.0391247 11.0443616,3.40836911 11.4674363,3.05336731 C11.6224021,2.92333552 11.8131611,2.84336034 12.0145262,2.82400131 L15.0263196,2.53445076 C15.5760696,2.48159839 16.0645753,2.88441352 16.1174277,3.43416352 Z" id="形状结合" fill="#FFFFFF" mask="url(#mask-3)"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>健康教育</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="04我的-00-00" transform="translate(-28.000000, -273.000000)">
|
||||
<g id="编组-11备份-3" transform="translate(12.000000, 204.000000)">
|
||||
<g id="健康教育" transform="translate(0.000000, 53.000000)">
|
||||
<g transform="translate(16.000000, 16.000000)">
|
||||
<rect id="矩形" fill="#FFFFFF" opacity="0.00999999978" x="0" y="0" width="20" height="20"></rect>
|
||||
<g id="编组-4" transform="translate(2.000000, 2.000000)">
|
||||
<path d="M14,6.08333333 C14.345178,6.08333333 14.657678,6.22324435 14.8838835,6.44944986 C15.110089,6.67565536 15.25,6.98815536 15.25,7.33333333 L15.25,7.33333333 L15.25,14 C15.25,14.345178 15.110089,14.657678 14.8838835,14.8838835 C14.657678,15.110089 14.345178,15.25 14,15.25 L14,15.25 L11.8649104,15.25 L11.8649104,6.08333333 Z" id="蒙版备份" stroke="#333333" stroke-width="1.5"></path>
|
||||
<path d="M9.44444444,0.75 C10.0657648,0.75 10.6282648,1.00183983 11.0354347,1.40900974 C11.4426046,1.81617966 11.6944444,2.37867966 11.6944444,3 L11.6944444,3 L11.6944444,15.25 L3,15.25 C2.37867966,15.25 1.81617966,14.9981602 1.40900974,14.5909903 C1.00183983,14.1838203 0.75,13.6213203 0.75,13 L0.75,13 L0.75,3 C0.75,2.37867966 1.00183983,1.81617966 1.40900974,1.40900974 C1.81617966,1.00183983 2.37867966,0.75 3,0.75 L3,0.75 Z" id="蒙版" stroke="#333333" stroke-width="1.5"></path>
|
||||
<g id="编组-2" transform="translate(3.111111, 3.400000)" fill="#005BA2">
|
||||
<rect id="矩形" x="0" y="2.44444444" width="6.22222222" height="1.33333333" rx="0.666666667"></rect>
|
||||
<path d="M0.666666667,2.44444444 L5.55555556,2.44444444 C5.92374539,2.44444444 6.22222222,2.74292128 6.22222222,3.11111111 C6.22222222,3.47930094 5.92374539,3.77777778 5.55555556,3.77777778 L0.666666667,3.77777778 C0.298476833,3.77777778 3.64153152e-14,3.47930094 3.64153152e-14,3.11111111 C3.64153152e-14,2.74292128 0.298476833,2.44444444 0.666666667,2.44444444 Z" id="矩形" transform="translate(3.111111, 3.111111) rotate(90.000000) translate(-3.111111, -3.111111) "></path>
|
||||
</g>
|
||||
<rect id="矩形备份" fill="#005BA2" x="2.66666667" y="11.2" width="7.11111111" height="1.33333333" rx="0.666666667"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 39 KiB |
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>用药方案</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="04我的-00-00" transform="translate(-28.000000, -220.000000)">
|
||||
<g id="编组-11备份-3" transform="translate(12.000000, 204.000000)">
|
||||
<g id="用药方案" transform="translate(16.000000, 16.000000)">
|
||||
<rect id="Rectangle-3" fill-opacity="0.01" fill="#EEEEEE" x="0" y="0" width="20" height="20"></rect>
|
||||
<g id="编组-14" transform="translate(3.600000, 2.000000)">
|
||||
<rect id="矩形" stroke="#333333" stroke-width="1.5" x="2.25980392" y="0.75" width="8.31372549" height="2.625" rx="1"></rect>
|
||||
<path d="M10.1646069,3.5 L11.8771593,6.09940994 C12.0116516,6.30354996 12.0833333,6.54264578 12.0833333,6.78710705 L12.0833333,6.78710705 L12.0833333,14.5 C12.0833333,14.845178 11.9434223,15.157678 11.7172168,15.3838835 C11.4910113,15.610089 11.1785113,15.75 10.8333333,15.75 L10.8333333,15.75 L2,15.75 C1.65482203,15.75 1.34232203,15.610089 1.11611652,15.3838835 C0.889911016,15.157678 0.75,14.845178 0.75,14.5 L0.75,14.5 L0.75,6.78710705 C0.75,6.54264578 0.821681769,6.30354996 0.95617402,6.09940994 L0.95617402,6.09940994 L2.66872645,3.5 L10.1646069,3.5 Z" id="矩形" stroke="#333333" stroke-width="1.5"></path>
|
||||
<rect id="矩形" x="0" y="7.5625" width="12.8333333" height="6.1875"></rect>
|
||||
<g id="编组-24" transform="translate(3.666667, 7.235119)" fill="#005BA2">
|
||||
<rect id="矩形" x="0" y="2.0625" width="5.5" height="1.375" rx="0.6875"></rect>
|
||||
<path d="M0.6875,2.0625 L4.8125,2.0625 C5.19219577,2.0625 5.5,2.37030423 5.5,2.75 C5.5,3.12969577 5.19219577,3.4375 4.8125,3.4375 L0.6875,3.4375 C0.307804235,3.4375 -1.13686838e-13,3.12969577 -1.13686838e-13,2.75 C-1.13686838e-13,2.37030423 0.307804235,2.0625 0.6875,2.0625 Z" id="矩形" transform="translate(2.750000, 2.750000) rotate(90.000000) translate(-2.750000, -2.750000) "></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
BIN
assets/images/qr_code.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 11 KiB |
186
assets/js/heightWeight.js
Normal file
@ -0,0 +1,186 @@
|
||||
export const heightList = {
|
||||
boy: [
|
||||
[47.6, 54.8],
|
||||
[51.3, 59.0],
|
||||
[54.9, 63.0],
|
||||
[58.0, 66.4],
|
||||
[60.5, 69.1],
|
||||
[62.5, 71.3],
|
||||
[64.2, 73.2],
|
||||
[65.7, 74.9],
|
||||
[67.1, 76.4],
|
||||
[68.3, 77.8],
|
||||
[69.5, 79.1],
|
||||
[70.7, 80.4],
|
||||
[71.7, 81.6],
|
||||
[72.8, 82.8],
|
||||
[73.8, 84.0],
|
||||
[74.8, 85.1],
|
||||
[75.8, 86.3],
|
||||
[76.8, 87.4],
|
||||
[77.7, 88.5],
|
||||
[78.6, 89.6],
|
||||
[79.6, 90.6],
|
||||
[80.5, 91.7],
|
||||
[81.4, 92.8],
|
||||
[82.2, 93.7],
|
||||
[82.4, 94.0],
|
||||
[84.8, 96.8],
|
||||
[87.0, 99.4],
|
||||
[89.0, 101.9],
|
||||
[90.9, 104.1],
|
||||
[92.7, 106.2],
|
||||
[94.4, 108.3],
|
||||
[96.0, 110.2],
|
||||
[97.6, 112.2],
|
||||
[99.2, 114.1],
|
||||
[100.8, 116.0],
|
||||
[102.4, 117.9],
|
||||
[104.1, 119.9],
|
||||
[105.7, 121.8],
|
||||
[107.2, 123.7],
|
||||
[108.8, 125.5],
|
||||
[110.3, 127.3],
|
||||
[111.7, 129.1],
|
||||
[113.1, 130.9],
|
||||
[114.5, 132.5]
|
||||
],
|
||||
girl: [
|
||||
[46.8, 53.8],
|
||||
[50.4, 57.8],
|
||||
[53.8, 61.6],
|
||||
[56.7, 64.8],
|
||||
[59.1, 67.4],
|
||||
[61.0, 69.6],
|
||||
[62.7, 71.5],
|
||||
[64.2, 73.5],
|
||||
[65.6, 74.7],
|
||||
[66.8, 76.1],
|
||||
[68.1, 77.5],
|
||||
[69.2, 78.8],
|
||||
[70.4, 80.1],
|
||||
[71.4, 81.4],
|
||||
[72.5, 82.6],
|
||||
[73.4, 83.8],
|
||||
[74.6, 84.9],
|
||||
[75.5, 86.1],
|
||||
[76.5, 87.2],
|
||||
[77.5, 88.3],
|
||||
[78.4, 89.4],
|
||||
[79.3, 90.4],
|
||||
[80.2, 91.5],
|
||||
[81.1, 92.5],
|
||||
[81.2, 92.8],
|
||||
[83.6, 95.5],
|
||||
[85.7, 98.1],
|
||||
[87.7, 100.5],
|
||||
[89.7, 102.7],
|
||||
[91.5, 104.9],
|
||||
[93.2, 106.9],
|
||||
[94.9, 108.9],
|
||||
[96.5, 110.9],
|
||||
[98.1, 112.8],
|
||||
[99.7, 114.7],
|
||||
[101.3, 116.7],
|
||||
[103.0, 118.6],
|
||||
[104.6, 120.6],
|
||||
[106.1, 122.4],
|
||||
[107.6, 124.2],
|
||||
[109.0, 126.0],
|
||||
[110.4, 127.7],
|
||||
[111.8, 129.4],
|
||||
[113.2, 131.0]
|
||||
]
|
||||
}
|
||||
|
||||
export const weightList = {
|
||||
boy: [
|
||||
[2.8, 4.2],
|
||||
[3.7, 5.6],
|
||||
[4.7, 7.1],
|
||||
[5.5, 8.3],
|
||||
[6.1, 9.2],
|
||||
[6.6, 9.8],
|
||||
[6.9, 10.3],
|
||||
[7.2, 10.8],
|
||||
[7.5, 11.1],
|
||||
[7.7, 11.5],
|
||||
[7.9, 11.8],
|
||||
[8.1, 12.0],
|
||||
[8.3, 12.3],
|
||||
[8.4, 12.5],
|
||||
[8.6, 12.8],
|
||||
[8.8, 13.2],
|
||||
[9.0, 13.5],
|
||||
[9.1, 13.8],
|
||||
[9.3, 14.0],
|
||||
[9.5, 14.3],
|
||||
[9.7, 14.6],
|
||||
[9.8, 14.8],
|
||||
[10.3, 15.5],
|
||||
[10.7, 16.2],
|
||||
[11.1, 16.9],
|
||||
[11.5, 17.7],
|
||||
[12.0, 18.4],
|
||||
[12.4, 19.1],
|
||||
[12.8, 19.8],
|
||||
[13.1, 20.5],
|
||||
[13.5, 21.1],
|
||||
[13.9, 21.9],
|
||||
[14.3, 22.6],
|
||||
[14.7, 23.4],
|
||||
[15.1, 24.3],
|
||||
[15.5, 25.1],
|
||||
[15.9, 26.0],
|
||||
[16.3, 26.8],
|
||||
[16.7, 27.6],
|
||||
[17.0, 28.5],
|
||||
[17.4, 29.3]
|
||||
],
|
||||
girl: [
|
||||
[2.7, 4.1],
|
||||
[3.5, 5.3],
|
||||
[4.4, 6.6],
|
||||
[5.1, 7.6],
|
||||
[5.6, 8.4],
|
||||
[6.0, 9.1],
|
||||
[6.4, 9.6],
|
||||
[6.7, 10.0],
|
||||
[6.9, 10.4],
|
||||
[7.2, 10.8],
|
||||
[7.4, 11.1],
|
||||
[7.6, 11.4],
|
||||
[7.7, 11.6],
|
||||
[7.9, 11.9],
|
||||
[8.1, 12.2],
|
||||
[8.3, 12.4],
|
||||
[8.4, 12.7],
|
||||
[8.6, 12.9],
|
||||
[8.8, 13.2],
|
||||
[9.0, 13.5],
|
||||
[9.1, 13.8],
|
||||
[9.3, 14.0],
|
||||
[9.5, 14.3],
|
||||
[9.7, 14.6],
|
||||
[9.8, 14.8],
|
||||
[10.3, 15.5],
|
||||
[10.7, 16.2],
|
||||
[11.1, 16.9],
|
||||
[11.5, 17.7],
|
||||
[12.0, 18.4],
|
||||
[12.4, 19.1],
|
||||
[12.8, 19.8],
|
||||
[13.1, 20.5],
|
||||
[13.5, 21.1],
|
||||
[13.9, 21.9],
|
||||
[14.3, 22.6],
|
||||
[14.7, 23.4],
|
||||
[15.1, 24.3],
|
||||
[15.5, 25.1],
|
||||
[15.9, 26.0],
|
||||
[16.3, 26.8],
|
||||
[16.7, 27.6],
|
||||
[17.0, 28.5],
|
||||
[17.4, 29.3]
|
||||
]
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
Component({
|
||||
properties: {
|
||||
url: String,
|
||||
desc: String,
|
||||
tags: Array,
|
||||
},
|
||||
data: {},
|
||||
methods: {},
|
||||
});
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-image": "tdesign-miniprogram/image/image",
|
||||
"t-tag": "tdesign-miniprogram/tag/tag"
|
||||
}
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
@import '/variable.less';
|
||||
|
||||
.home-card {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
width: 340rpx;
|
||||
height: 488rpx;
|
||||
border-radius: 9px;
|
||||
background: @bg-color-white;
|
||||
|
||||
&__image {
|
||||
width: 340rpx;
|
||||
height: 340rpx;
|
||||
}
|
||||
|
||||
&__info {
|
||||
padding: 32rpx;
|
||||
font-weight: 400;
|
||||
font-size: @font-size-small;
|
||||
}
|
||||
|
||||
&__tag-group {
|
||||
display: flex;
|
||||
gap: 16rpx;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
<view class="home-card">
|
||||
<t-image t-class="home-card__image" src="{{url}}" mode="aspectFill" />
|
||||
<view class="home-card__info">
|
||||
<text>{{desc}}</text>
|
||||
<view class="home-card__tag-group">
|
||||
<t-tag wx:for="{{tags}}" wx:key="index" size="small" variant="light" theme="{{item.theme}}">{{item.text}}</t-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -1,109 +0,0 @@
|
||||
Component({
|
||||
options: {
|
||||
styleIsolation: 'shared',
|
||||
},
|
||||
properties: {
|
||||
navType: {
|
||||
type: String,
|
||||
value: 'title',
|
||||
},
|
||||
titleText: String,
|
||||
},
|
||||
data: {
|
||||
visible: false,
|
||||
sidebar: [
|
||||
{
|
||||
title: '首页',
|
||||
url: 'pages/home/index',
|
||||
isSidebar: true,
|
||||
},
|
||||
{
|
||||
title: '搜索页',
|
||||
url: 'pages/search/index',
|
||||
isSidebar: false,
|
||||
},
|
||||
{
|
||||
title: '发布页',
|
||||
url: 'pages/release/index',
|
||||
isSidebar: false,
|
||||
},
|
||||
{
|
||||
title: '消息列表页',
|
||||
url: 'pages/message/index',
|
||||
isSidebar: true,
|
||||
},
|
||||
{
|
||||
title: '对话页',
|
||||
url: 'pages/chat/index',
|
||||
isSidebar: false,
|
||||
},
|
||||
{
|
||||
title: '个人中心页',
|
||||
url: 'pages/my/index',
|
||||
isSidebar: true,
|
||||
},
|
||||
{
|
||||
title: '个人信息表单页',
|
||||
url: 'pages/my/info-edit/index',
|
||||
isSidebar: false,
|
||||
},
|
||||
{
|
||||
title: '设置页',
|
||||
url: 'pages/setting/index',
|
||||
isSidebar: false,
|
||||
},
|
||||
{
|
||||
title: '数据图表页',
|
||||
url: 'pages/dataCenter/index',
|
||||
isSidebar: false,
|
||||
},
|
||||
{
|
||||
title: '登录注册页',
|
||||
url: 'pages/login/login',
|
||||
isSidebar: false,
|
||||
},
|
||||
],
|
||||
statusHeight: 0,
|
||||
},
|
||||
lifetimes: {
|
||||
ready() {
|
||||
const statusHeight = wx.getWindowInfo().statusBarHeight;
|
||||
this.setData({ statusHeight });
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
openDrawer() {
|
||||
this.setData({
|
||||
visible: true,
|
||||
});
|
||||
},
|
||||
itemClick(e) {
|
||||
const that = this;
|
||||
const { isSidebar, url } = e.detail.item;
|
||||
if (isSidebar) {
|
||||
wx.switchTab({
|
||||
url: `/${url}`,
|
||||
}).then(() => {
|
||||
// 防止点回tab时,sidebar依旧是展开模式
|
||||
that.setData({
|
||||
visible: false,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: `/${url}`,
|
||||
}).then(() => {
|
||||
that.setData({
|
||||
visible: false,
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
searchTurn() {
|
||||
wx.navigateTo({
|
||||
url: `/pages/search/index`,
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
@ -1,9 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"t-drawer": "tdesign-miniprogram/drawer/drawer",
|
||||
"t-search": "tdesign-miniprogram/search/search"
|
||||
}
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
@import '/variable.less';
|
||||
|
||||
.home-navbar {
|
||||
.t-navbar {
|
||||
&__left {
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&__icon {
|
||||
padding: 12rpx;
|
||||
}
|
||||
|
||||
&__left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 16rpx;
|
||||
|
||||
.t-search {
|
||||
--td-search-height: 64rpx;
|
||||
--td-search-font-size: @font-size-mini;
|
||||
width: 375rpx;
|
||||
|
||||
.t-icon {
|
||||
font-size: @font-size-default !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
--td-drawer-title-font-size: 48rpx;
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
<view class="home-navbar">
|
||||
<t-navbar title="{{ titleText }}">
|
||||
<!-- <view slot="left">
|
||||
<view class="home-navbar__left">
|
||||
<t-icon class="home-navbar__icon" bind:tap="openDrawer" name="view-list" size="48rpx" />
|
||||
<t-search
|
||||
shape="round"
|
||||
placeholder="请搜索你想要的内容"
|
||||
bindtap="searchTurn"
|
||||
wx:if="{{navType === 'search'}}"
|
||||
/>
|
||||
</view>
|
||||
</view> -->
|
||||
</t-navbar>
|
||||
<!-- <t-drawer
|
||||
style="padding-top: {{statusHeight}}px;"
|
||||
visible="{{visible}}"
|
||||
items="{{sidebar}}"
|
||||
placement="left"
|
||||
title="页面目录"
|
||||
bind:item-click="itemClick"
|
||||
/> -->
|
||||
</view>
|
||||
@ -1,57 +0,0 @@
|
||||
const app = getApp();
|
||||
|
||||
Component({
|
||||
data: {
|
||||
value: '', // 初始值设置为空,避免第一次加载时闪烁
|
||||
unreadNum: 0, // 未读消息数量
|
||||
list: [
|
||||
{
|
||||
icon: 'home',
|
||||
value: 'index',
|
||||
label: '首页',
|
||||
},
|
||||
{
|
||||
icon: 'chat',
|
||||
value: 'notice',
|
||||
label: '随访',
|
||||
},
|
||||
{
|
||||
icon: 'user',
|
||||
value: 'my',
|
||||
label: '我1的',
|
||||
},
|
||||
],
|
||||
},
|
||||
lifetimes: {
|
||||
ready() {
|
||||
const pages = getCurrentPages();
|
||||
const curPage = pages[pages.length - 1];
|
||||
if (curPage) {
|
||||
const nameRe = /pages\/(\w+)\/index/.exec(curPage.route);
|
||||
if (nameRe === null) return;
|
||||
if (nameRe[1] && nameRe) {
|
||||
this.setData({
|
||||
value: nameRe[1],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 同步全局未读消息数量
|
||||
this.setUnreadNum(app.globalData.unreadNum);
|
||||
app.eventBus.on('unread-num-change', (unreadNum) => {
|
||||
this.setUnreadNum(unreadNum);
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleChange(e) {
|
||||
const { value } = e.detail;
|
||||
wx.switchTab({ url: `/pages/${value}/index` });
|
||||
},
|
||||
|
||||
/** 设置未读消息数量 */
|
||||
setUnreadNum(unreadNum) {
|
||||
this.setData({ unreadNum });
|
||||
},
|
||||
},
|
||||
});
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar",
|
||||
"t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item"
|
||||
}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
@import '/variable.less';
|
||||
|
||||
.custom-tab-bar {
|
||||
--td-tab-bar-height: @tab-bar-height;
|
||||
|
||||
&-item {
|
||||
margin: 0;
|
||||
padding: 16rpx 24rpx;
|
||||
}
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
<t-tab-bar value="{{ value }}" theme="tag" split="{{ false }}" bind:change="handleChange">
|
||||
<t-tab-bar-item icon="home" value="home">首页</t-tab-bar-item>
|
||||
<t-tab-bar-item icon="chat" value="message">随访</t-tab-bar-item>
|
||||
<t-tab-bar-item icon="user" value="my">我的</t-tab-bar-item>
|
||||
</t-tab-bar>
|
||||
@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 4945922 */
|
||||
src: url('//at.alicdn.com/t/c/font_4945922_6mzvl34xg5m.woff2?t=1750861347404') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_4945922_6mzvl34xg5m.woff?t=1750861347404') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_4945922_6mzvl34xg5m.ttf?t=1750861347404') format('truetype');
|
||||
src: url('//at.alicdn.com/t/c/font_4945922_tich5e9231m.woff2?t=1751263412822') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_4945922_tich5e9231m.woff?t=1751263412822') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_4945922_tich5e9231m.ttf?t=1751263412822') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@ -13,6 +13,30 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-xiaoxi1:before {
|
||||
content: "\e61c";
|
||||
}
|
||||
|
||||
.icon-gouxuan1:before {
|
||||
content: "\e61b";
|
||||
}
|
||||
|
||||
.icon-fare:before {
|
||||
content: "\e63a";
|
||||
}
|
||||
|
||||
.icon-xiaohuaneike:before {
|
||||
content: "\e613";
|
||||
}
|
||||
|
||||
.icon-dabianhui:before {
|
||||
content: "\e604";
|
||||
}
|
||||
|
||||
.icon-dabianhong:before {
|
||||
content: "\e605";
|
||||
}
|
||||
|
||||
.icon-x:before {
|
||||
content: "\e602";
|
||||
}
|
||||
@ -112,3 +136,6 @@
|
||||
.icon-xiangji:before {
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
30284
miniprogram_npm/@antv/g2/index.js
Normal file
1
miniprogram_npm/@antv/g2/index.js.map
Normal file
7365
miniprogram_npm/crypto-js/index.js
Normal file
1
miniprogram_npm/crypto-js/index.js.map
Normal file
@ -1,19 +0,0 @@
|
||||
/* eslint-disable */
|
||||
var __request = wx.request;
|
||||
var Mock = require('./mock.js');
|
||||
Object.defineProperty(wx, 'request', { writable: true });
|
||||
wx.request = function (config) {
|
||||
if (typeof Mock._mocked[config.url] == 'undefined') {
|
||||
__request(config);
|
||||
return;
|
||||
}
|
||||
var resTemplate = Mock._mocked[config.url].template;
|
||||
var response = Mock.mock(resTemplate);
|
||||
if (typeof config.success == 'function') {
|
||||
config.success(response);
|
||||
}
|
||||
if (typeof config.complete == 'function') {
|
||||
config.complete(response);
|
||||
}
|
||||
};
|
||||
module.exports = Mock;
|
||||
140
mock/chat.js
@ -1,140 +0,0 @@
|
||||
/** 模拟网络请求的延迟 */
|
||||
function delay(ms = 500) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
// 模拟聊天数据
|
||||
const mockData = [
|
||||
{
|
||||
userId: 1,
|
||||
name: 'Sean',
|
||||
avatar: '/static/chat/avatar-Sean.png',
|
||||
messages: [
|
||||
{ messageId: 1, from: 1, content: '那明天准时见哦😊', time: 1690646400000, read: true },
|
||||
{ messageId: 2, from: 0, content: '好的,我会记得的', time: 1690646400000, read: true },
|
||||
{ messageId: 3, from: 1, content: '在吗?', time: Date.now() - 3600000, read: false },
|
||||
{
|
||||
messageId: 4,
|
||||
from: 1,
|
||||
content: '有个问题想咨询一下,关于TDesign组件库如何更好地使用',
|
||||
time: Date.now() - 3600000,
|
||||
read: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
userId: 2,
|
||||
name: 'Mollymolly',
|
||||
avatar: '/static/chat/avatar-Mollymolly.png',
|
||||
messages: [{ messageId: 5, from: 1, content: '好久不见,最近咋样?', time: 1692100800000, read: true }],
|
||||
},
|
||||
{
|
||||
userId: 3,
|
||||
name: 'Andrew',
|
||||
avatar: '/static/chat/avatar-Andrew.png',
|
||||
messages: [{ messageId: 6, from: 0, content: '现在没空,晚点再联系你哈', time: 1690084800000, read: true }],
|
||||
},
|
||||
{
|
||||
userId: 4,
|
||||
name: 'Kingdom',
|
||||
avatar: '/static/chat/avatar-Kingdom.png',
|
||||
messages: [{ messageId: 7, from: 1, content: '真的吗?', time: 1656880200000, read: true }],
|
||||
},
|
||||
{
|
||||
userId: 5,
|
||||
name: 'Paige',
|
||||
avatar: '/static/chat/avatar-Paige.png',
|
||||
messages: [
|
||||
{ messageId: 8, from: 1, content: '此次要评审的首页和专区页改版的交互方案', time: 1652963880000, read: true },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
// 模拟新增一条消息
|
||||
function addNewMessage(userId, from, content) {
|
||||
const index = mockData.map((item) => item.userId).indexOf(userId);
|
||||
const user = mockData.splice(index, 1)[0];
|
||||
mockData.unshift(user);
|
||||
let messageId = 0;
|
||||
mockData.forEach((item) => {
|
||||
messageId += item.messages.length;
|
||||
});
|
||||
const message = { messageId, from, content, time: Date.now(), read: from === 0 };
|
||||
user.messages.push(message);
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
/** 模拟SocketTask */
|
||||
class MockSocketTask {
|
||||
constructor(url) {
|
||||
this.url = url;
|
||||
this.onopen = () => {};
|
||||
this.onmessage = () => {};
|
||||
this.onclose = () => {};
|
||||
delay(1000).then(() => {
|
||||
this.onopen();
|
||||
});
|
||||
}
|
||||
|
||||
onOpen(callback) {
|
||||
if (typeof callback === 'function') this.onopen = callback;
|
||||
}
|
||||
|
||||
onMessage(callback) {
|
||||
if (typeof callback === 'function') this.onmessage = callback;
|
||||
}
|
||||
|
||||
send(data) {
|
||||
data = JSON.parse(data);
|
||||
if (data.type === 'message') {
|
||||
const { userId, content } = data.data;
|
||||
delay().then(() => {
|
||||
const message = addNewMessage(userId, 0, content);
|
||||
this.onmessage(JSON.stringify({ type: 'message', data: { userId, message } }));
|
||||
});
|
||||
// 模拟3秒后对方回复消息
|
||||
delay(3000).then(() => {
|
||||
const message = addNewMessage(userId, 1, ['收到', '好的', '知道了', '👌OK'].at(Math.floor(Math.random() * 4)));
|
||||
this.onmessage(JSON.stringify({ type: 'message', data: { userId, message } }));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 连接WebSocket,返回SocketTask对象 */
|
||||
export function connectSocket() {
|
||||
// return wx.connectSocket({ url: 'url' })
|
||||
return new MockSocketTask('ws://localhost:8080');
|
||||
}
|
||||
|
||||
/** 获取未读消息数量 */
|
||||
export function fetchUnreadNum() {
|
||||
let unreadNum = 0;
|
||||
mockData.forEach((item) => {
|
||||
unreadNum += item.messages.filter((message) => !message.read).length;
|
||||
});
|
||||
return delay().then(() => ({ code: 200, data: unreadNum }));
|
||||
}
|
||||
|
||||
/** 获取完整消息列表 */
|
||||
export function fetchMessageList() {
|
||||
return delay().then(() => ({ code: 200, data: JSON.parse(JSON.stringify(mockData)) }));
|
||||
}
|
||||
|
||||
/** 将某个用户的所有消息标记为已读 */
|
||||
export function markMessagesRead(userId) {
|
||||
let index = 0;
|
||||
while (index < mockData.length) {
|
||||
const user = mockData[index];
|
||||
if (user.userId === userId) {
|
||||
user.messages.forEach((message) => {
|
||||
message.read = true;
|
||||
});
|
||||
break;
|
||||
}
|
||||
index += 1;
|
||||
}
|
||||
}
|
||||
@ -1,98 +0,0 @@
|
||||
export default {
|
||||
path: '/dataCenter/area',
|
||||
data: {
|
||||
returnType: 'succ',
|
||||
generateType: 'template',
|
||||
manual: {
|
||||
succ: {
|
||||
resStr: {
|
||||
data: '',
|
||||
statusCode: '',
|
||||
header: '',
|
||||
},
|
||||
},
|
||||
fail: {
|
||||
resStr: {
|
||||
errMsg: 'request:fail 填写错误信息',
|
||||
},
|
||||
},
|
||||
},
|
||||
template: {
|
||||
succ: {
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
标题: '视频A',
|
||||
全球: '4442',
|
||||
华北: '456',
|
||||
华东: '456',
|
||||
},
|
||||
{
|
||||
标题: '视频A',
|
||||
全球: '4442',
|
||||
华北: '456',
|
||||
华东: '456',
|
||||
},
|
||||
{
|
||||
标题: '视频A',
|
||||
全球: '4442',
|
||||
华北: '456',
|
||||
华东: '456',
|
||||
},
|
||||
{
|
||||
标题: '视频A',
|
||||
全球: '4442',
|
||||
华北: '456',
|
||||
华东: '456',
|
||||
},
|
||||
{
|
||||
标题: '视频A',
|
||||
全球: '4442',
|
||||
华北: '456',
|
||||
华东: '456',
|
||||
},
|
||||
{
|
||||
标题: '视频A',
|
||||
全球: '4442',
|
||||
华北: '456',
|
||||
华东: '456',
|
||||
},
|
||||
{
|
||||
标题: '视频A',
|
||||
全球: '4442',
|
||||
华北: '456',
|
||||
华东: '456',
|
||||
},
|
||||
{
|
||||
标题: '视频A',
|
||||
全球: '4442',
|
||||
华北: '456',
|
||||
华东: '456',
|
||||
},
|
||||
{
|
||||
标题: '视频A',
|
||||
全球: '4442',
|
||||
华北: '456',
|
||||
华东: '456',
|
||||
},
|
||||
{
|
||||
标题: '视频A',
|
||||
全球: '4442',
|
||||
华北: '456',
|
||||
华东: '456',
|
||||
},
|
||||
],
|
||||
},
|
||||
statusCode: 200,
|
||||
header: {
|
||||
'content-type': 'application/json; charset=utf-8',
|
||||
},
|
||||
},
|
||||
fail: {
|
||||
templateStr: {
|
||||
errMsg: 'request:fail 填写错误信息',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,62 +0,0 @@
|
||||
export default {
|
||||
path: '/dataCenter/complete-rate',
|
||||
data: {
|
||||
returnType: 'succ',
|
||||
generateType: 'template',
|
||||
manual: {
|
||||
succ: {
|
||||
resStr: {
|
||||
data: '',
|
||||
statusCode: '',
|
||||
header: '',
|
||||
},
|
||||
},
|
||||
fail: {
|
||||
resStr: {
|
||||
errMsg: 'request:fail 填写错误信息',
|
||||
},
|
||||
},
|
||||
},
|
||||
template: {
|
||||
succ: {
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
time: '12:00',
|
||||
percentage: '80',
|
||||
},
|
||||
{
|
||||
time: '14:00',
|
||||
percentage: '60',
|
||||
},
|
||||
{
|
||||
time: '16:00',
|
||||
percentage: '85',
|
||||
},
|
||||
{
|
||||
time: '18:00',
|
||||
percentage: '43',
|
||||
},
|
||||
{
|
||||
time: '20:00',
|
||||
percentage: '60',
|
||||
},
|
||||
{
|
||||
time: '22:00',
|
||||
percentage: '95',
|
||||
},
|
||||
],
|
||||
},
|
||||
statusCode: 200,
|
||||
header: {
|
||||
'content-type': 'application/json; charset=utf-8',
|
||||
},
|
||||
},
|
||||
fail: {
|
||||
templateStr: {
|
||||
errMsg: 'request:fail 填写错误信息',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,32 +0,0 @@
|
||||
export default {
|
||||
path: '/dataCenter/interaction',
|
||||
data: {
|
||||
returnType: 'succ',
|
||||
generateType: 'template',
|
||||
manual: {
|
||||
succ: {
|
||||
resStr: { data: '', statusCode: '', header: '' },
|
||||
},
|
||||
fail: {
|
||||
resStr: { errMsg: 'request:fail 填写错误信息' },
|
||||
},
|
||||
},
|
||||
template: {
|
||||
succ: {
|
||||
data: {
|
||||
list: [
|
||||
{ name: '浏览量', number: '919' },
|
||||
{ name: '点赞量', number: '887' },
|
||||
{ name: '分享量', number: '104' },
|
||||
{ name: '收藏', number: '47' },
|
||||
],
|
||||
},
|
||||
statusCode: 200,
|
||||
header: { 'content-type': 'application/json; charset=utf-8' },
|
||||
},
|
||||
fail: {
|
||||
templateStr: { errMsg: 'request:fail 填写错误信息' },
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,50 +0,0 @@
|
||||
export default {
|
||||
path: '/dataCenter/member',
|
||||
data: {
|
||||
returnType: 'succ',
|
||||
generateType: 'template',
|
||||
manual: {
|
||||
succ: {
|
||||
resStr: {
|
||||
data: '',
|
||||
statusCode: '',
|
||||
header: '',
|
||||
},
|
||||
},
|
||||
fail: {
|
||||
resStr: {
|
||||
errMsg: 'request:fail 填写错误信息',
|
||||
},
|
||||
},
|
||||
},
|
||||
template: {
|
||||
succ: {
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
name: '浏览量',
|
||||
number: '202W',
|
||||
},
|
||||
{
|
||||
name: 'PV',
|
||||
number: '233W',
|
||||
},
|
||||
{
|
||||
name: 'UV',
|
||||
number: '102W',
|
||||
},
|
||||
],
|
||||
},
|
||||
statusCode: 200,
|
||||
header: {
|
||||
'content-type': 'application/json; charset=utf-8',
|
||||
},
|
||||
},
|
||||
fail: {
|
||||
templateStr: {
|
||||
errMsg: 'request:fail 填写错误信息',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,6 +0,0 @@
|
||||
import getDataCenterArea from './getArea';
|
||||
import getDataCenterMember from './getMember';
|
||||
import getDataCompleteRate from './getCompleteRate';
|
||||
import getDataInteraction from './getInteraction';
|
||||
|
||||
export default [getDataCenterArea, getDataCenterMember, getDataCompleteRate, getDataInteraction];
|
||||
@ -1,79 +0,0 @@
|
||||
export default {
|
||||
path: '/home/cards',
|
||||
data: {
|
||||
code: 200,
|
||||
message: '请求成功',
|
||||
data: [
|
||||
{
|
||||
url: '/static/home/card0.png',
|
||||
desc: '少年,星空与梦想',
|
||||
tags: [
|
||||
{
|
||||
text: 'AI绘画',
|
||||
theme: 'primary',
|
||||
},
|
||||
{
|
||||
text: '版权素材',
|
||||
theme: 'success',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
url: '/static/home/card1.png',
|
||||
desc: '仰望星空的少女',
|
||||
tags: [
|
||||
{
|
||||
text: 'AI绘画',
|
||||
theme: 'primary',
|
||||
},
|
||||
{
|
||||
text: '版权素材',
|
||||
theme: 'success',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
url: '/static/home/card3.png',
|
||||
desc: '仰望星空的少年',
|
||||
tags: [
|
||||
{
|
||||
text: 'AI绘画',
|
||||
theme: 'primary',
|
||||
},
|
||||
{
|
||||
text: '版权素材',
|
||||
theme: 'success',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
url: '/static/home/card2.png',
|
||||
desc: '少年,星空与梦想',
|
||||
tags: [
|
||||
{
|
||||
text: 'AI绘画',
|
||||
theme: 'primary',
|
||||
},
|
||||
{
|
||||
text: '版权素材',
|
||||
theme: 'success',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
url: '/static/home/card4.png',
|
||||
desc: '多彩的天空',
|
||||
tags: [
|
||||
{
|
||||
text: 'AI绘画',
|
||||
theme: 'primary',
|
||||
},
|
||||
{
|
||||
text: '版权素材',
|
||||
theme: 'success',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@ -1,8 +0,0 @@
|
||||
export default {
|
||||
path: '/home/swipers',
|
||||
data: {
|
||||
code: 200,
|
||||
message: '请求成功',
|
||||
data: new Array(6).fill('/static/home/swiper0.png'),
|
||||
},
|
||||
};
|
||||
@ -1,4 +0,0 @@
|
||||
import getHomeCards from './getHomeCards';
|
||||
import getHomeSwipers from './getHomeSwipers';
|
||||
|
||||
export default [getHomeCards, getHomeSwipers];
|
||||
@ -1,15 +0,0 @@
|
||||
import Mock from './WxMock';
|
||||
// 导入包含path和data的对象
|
||||
import loginMock from './login/index';
|
||||
import homeMock from './home/index';
|
||||
import searchMock from './search/index';
|
||||
import dataCenter from './dataCenter/index';
|
||||
import my from './my/index';
|
||||
|
||||
export default () => {
|
||||
// 在这里添加新的mock数据
|
||||
const mockData = [...loginMock, ...homeMock, ...searchMock, ...dataCenter, ...my];
|
||||
mockData.forEach((item) => {
|
||||
Mock.mock(item.path, { code: 200, success: true, data: item.data });
|
||||
});
|
||||
};
|
||||
@ -1,6 +0,0 @@
|
||||
export default {
|
||||
path: '/login/getSendMessage',
|
||||
data: {
|
||||
message: '发送成功',
|
||||
},
|
||||
};
|
||||
@ -1,5 +0,0 @@
|
||||
import getSendMessage from './getSendMessage';
|
||||
import postCodeVerify from './postCodeVerify';
|
||||
import postPasswordLogin from './postPasswordLogin';
|
||||
|
||||
export default [getSendMessage, postCodeVerify, postPasswordLogin];
|
||||
@ -1,7 +0,0 @@
|
||||
export default {
|
||||
path: '/login/postCodeVerify',
|
||||
data: {
|
||||
message: '验证码正确',
|
||||
token: '@guid()',
|
||||
},
|
||||
};
|
||||
@ -1,7 +0,0 @@
|
||||
export default {
|
||||
path: '/login/postPasswordLogin',
|
||||
data: {
|
||||
message: '登录成功',
|
||||
token: '@guid()',
|
||||
},
|
||||
};
|
||||
9189
mock/mock.js
@ -1,21 +0,0 @@
|
||||
import { getLocalUrl } from '~/utils/util.js';
|
||||
|
||||
export default {
|
||||
path: '/api/genPersonalInfo',
|
||||
data: {
|
||||
code: 200,
|
||||
message: 'success',
|
||||
data: {
|
||||
image: '/static/avatar1.png',
|
||||
name: '小小轩',
|
||||
star: '天枰座',
|
||||
gender: 0,
|
||||
birth: '1994-09-27',
|
||||
address: ['440000', '440300'],
|
||||
brief: '在你身边,为你设计',
|
||||
photos: [
|
||||
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,19 +0,0 @@
|
||||
export default {
|
||||
path: '/api/getServiceList',
|
||||
data: {
|
||||
code: 200,
|
||||
message: 'success',
|
||||
data: {
|
||||
service: [
|
||||
{ image: '/static/icon_wx.png', name: '微信', type: 'weixin', url: '' },
|
||||
{ image: '/static/icon_qq.png', name: 'QQ', type: 'QQ', url: '' },
|
||||
{ image: '/static/icon_doc.png', name: '腾讯文档', type: 'document', url: '' },
|
||||
{ image: '/static/icon_map.png', name: '腾讯地图', type: 'map', url: '' },
|
||||
{ image: '/static/icon_td.png', name: '数据中心', type: 'data', url: '/pages/dataCenter/index' },
|
||||
{ image: '/static/icon_td.png', name: '数据中心', type: 'data', url: '/pages/dataCenter/index' },
|
||||
{ image: '/static/icon_td.png', name: '数据中心', type: 'data', url: '/pages/dataCenter/index' },
|
||||
{ image: '/static/icon_td.png', name: '数据中心', type: 'data', url: '/pages/dataCenter/index' },
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,4 +0,0 @@
|
||||
import getServiceList from './getServiceList';
|
||||
import getPersonalInfo from './getPersonalInfo';
|
||||
|
||||
export default [getServiceList, getPersonalInfo];
|
||||
@ -1,21 +0,0 @@
|
||||
import service from './service/index';
|
||||
|
||||
const failResponse = {
|
||||
code: null,
|
||||
data: null,
|
||||
message: 'invaild path',
|
||||
};
|
||||
|
||||
export const request = (url, data) =>
|
||||
new Promise((resolve, reject) => {
|
||||
const waitTime = Math.random() * 300 + 200;
|
||||
const target = service.find((item) => item.path === url);
|
||||
setTimeout(() => {
|
||||
if (target) {
|
||||
const { response } = target;
|
||||
resolve(typeof response === 'function' ? response(data) : response);
|
||||
} else {
|
||||
reject(failResponse);
|
||||
}
|
||||
}, waitTime); // 200-500ms
|
||||
});
|
||||
@ -1,8 +0,0 @@
|
||||
export default {
|
||||
path: '/api/searchHistory',
|
||||
code: 200,
|
||||
message: '请求成功',
|
||||
data: {
|
||||
historyWords: ['AI绘画', 'Stable Diffusion', '版权素材', '星空', 'illustration', '原创'],
|
||||
},
|
||||
};
|
||||
@ -1,15 +0,0 @@
|
||||
export default {
|
||||
path: '/api/searchPopular',
|
||||
code: 200,
|
||||
message: '请求成功',
|
||||
data: {
|
||||
popularWords: [
|
||||
'考研和靠边同时上岸应该怎么选?有哪些参考建议',
|
||||
'日常饮食中,如何选择优质蛋白',
|
||||
'你有没有网购维权成功的经历?求分享经验',
|
||||
'夏季带孩子旅游,你的必备物品有哪些',
|
||||
'在海外越卖越贵,中国汽车做对了什么',
|
||||
'当HR问你离职原因,怎么回答最能被接受',
|
||||
],
|
||||
},
|
||||
};
|
||||
@ -1,4 +0,0 @@
|
||||
import getSearchHistory from './getSearchHistory';
|
||||
import getSearchPopular from './getSearchPopular';
|
||||
|
||||
export default [getSearchHistory, getSearchPopular];
|
||||
@ -18,6 +18,7 @@
|
||||
"license": "MIT",
|
||||
"description": "a start-kit for wechat miniprogram powerby TDesign miniprogram",
|
||||
"dependencies": {
|
||||
"@antv/g2": "^5.3.3",
|
||||
"crypto-js": "^4.2.0",
|
||||
"tdesign-miniprogram": "^1.8.6"
|
||||
},
|
||||
|
||||
@ -16,15 +16,17 @@ Page({
|
||||
"name": "",
|
||||
"dose": "",
|
||||
"frequency": "",
|
||||
"time": "饭前"
|
||||
"time": "饭前",
|
||||
|
||||
}],
|
||||
reminder: {
|
||||
"morning": "08:00",
|
||||
"noon": "12:00",
|
||||
"evening": "18:00"
|
||||
},
|
||||
start_date: '',
|
||||
end_date: '',
|
||||
reminder: {
|
||||
"morning": "08:00",
|
||||
"noon": "12:00",
|
||||
"evening": "18:00"
|
||||
},
|
||||
|
||||
// 下拉
|
||||
selectList: [],
|
||||
selectValue: '',
|
||||
@ -100,26 +102,7 @@ Page({
|
||||
};
|
||||
},
|
||||
|
||||
originFiles: [
|
||||
{
|
||||
url: 'https://tdesign.gtimg.com/mobile/demos/example4.png',
|
||||
name: 'uploaded1.png',
|
||||
type: 'image',
|
||||
removeBtn: true,
|
||||
},
|
||||
{
|
||||
url: 'https://tdesign.gtimg.com/mobile/demos/example6.png',
|
||||
name: 'uploaded2.png',
|
||||
type: 'image',
|
||||
removeBtn: true,
|
||||
},
|
||||
{
|
||||
url: 'https://tdesign.gtimg.com/mobile/demos/example5.png',
|
||||
name: 'uploaded3.png',
|
||||
type: 'image',
|
||||
removeBtn: true,
|
||||
},
|
||||
],
|
||||
|
||||
gridConfig: {
|
||||
column: 4,
|
||||
width: 160,
|
||||
@ -245,6 +228,34 @@ Page({
|
||||
})
|
||||
},
|
||||
async saveData(){
|
||||
if(!this.data.start_date || !this.data.end_date){
|
||||
wx.showToast({
|
||||
title: '请选择用药周期',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// 校验 detail 是否有空缺项
|
||||
const hasDetailEmpty = this.data.detail.some(item => {
|
||||
return !item.name || !item.dose || !item.frequency || !item.time;
|
||||
});
|
||||
if (hasDetailEmpty) {
|
||||
wx.showToast({
|
||||
title: '请完整填写所有用药信息',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 校验 reminder 是否有空缺项
|
||||
const reminder = this.data.reminder;
|
||||
if (!reminder.morning || !reminder.noon || !reminder.evening) {
|
||||
wx.showToast({
|
||||
title: '请设置完整的提醒时间',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.data.id){
|
||||
const res = await request(`patient/medicine_scheme/${this.data.id}`,'put',{
|
||||
detail: JSON.stringify(this.data.detail),
|
||||
@ -295,7 +306,7 @@ Page({
|
||||
|
||||
|
||||
const formData = {
|
||||
key: file.name, //上传文件名称
|
||||
key: 'upload_file/' + file.name, //上传文件名称
|
||||
policy: res.policy, //表单域
|
||||
'x-oss-signature-version': res.x_oss_signature_version, //指定签名的版本和算法
|
||||
'x-oss-credential': res.x_oss_credential, //指明派生密钥的参数集
|
||||
@ -316,7 +327,7 @@ Page({
|
||||
success(res) {
|
||||
console.log('上传响应:', res);
|
||||
if (res.statusCode === 200) {
|
||||
callback(null, 'https://image-fudan.oss-cn-beijing.aliyuncs.com/'+ file.name); // 上传成功
|
||||
callback(null, 'https://image-fudan.oss-cn-beijing.aliyuncs.com/upload_file/'+ file.name); // 上传成功
|
||||
} else {
|
||||
console.error('上传失败,状态码:', res.statusCode);
|
||||
console.error('失败响应:', res);
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
"t-row": "tdesign-miniprogram/row/row",
|
||||
"t-col": "tdesign-miniprogram/col/col",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-upload": "tdesign-miniprogram/upload/upload",
|
||||
"t-radio": "tdesign-miniprogram/radio/radio",
|
||||
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group",
|
||||
"t-tag": "tdesign-miniprogram/tag/tag",
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
}
|
||||
}
|
||||
.title{
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-left: 30rpx;
|
||||
display: flex;
|
||||
@ -29,6 +30,12 @@
|
||||
.iconfont{
|
||||
color: #A8A8A8;
|
||||
}
|
||||
.title-text::after{
|
||||
content: '*';
|
||||
color: red;
|
||||
font-size: 32rpx;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
}
|
||||
.therapeuticRegimen-item{
|
||||
border-radius: 24rpx;
|
||||
@ -49,11 +56,12 @@
|
||||
.input-example {
|
||||
// background-color: var(--bg-color-demo);
|
||||
// padding: 10rpx 0;
|
||||
padding-bottom: 20rpx;
|
||||
position: relative;
|
||||
.tip{
|
||||
position: absolute;
|
||||
right: -36rpx;
|
||||
top: 34rpx;
|
||||
top: 24rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
@ -110,10 +118,17 @@
|
||||
}
|
||||
}
|
||||
.day-time{
|
||||
margin-top: 24rpx;
|
||||
background-color: #fff;
|
||||
padding: 24rpx;
|
||||
padding-right: 0;
|
||||
border-radius: 24rpx;
|
||||
.day-title{
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
.day-time-item{
|
||||
margin-top: 24rpx;
|
||||
height: 72rpx;
|
||||
background: rgba(0,91,162,0.1);
|
||||
border-radius: 12rpx;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!--pages/AddTherapeuticRegimen/index.wxml-->
|
||||
<!-- pages/AddTherapeuticRegimen/index.wxml -->
|
||||
<view class="therapeuticRegimen">
|
||||
<view class="improt-file">
|
||||
<view wx:if="{{!imageFile}}" class="upload-flow" bind:tap="handleUpload">
|
||||
@ -6,15 +6,16 @@
|
||||
<view>拍照导入</view>
|
||||
</view>
|
||||
<view wx:else class="report-image" data-mode="imageFile" bind:tap="handleImagePreview">
|
||||
<image class="image" src="{{imageFile}}" mode=""></image>
|
||||
|
||||
<view class="delete-btn" catchtap="handleDelete">
|
||||
<text class="iconfont icon-x"></text>
|
||||
</view>
|
||||
<image class="image" src="{{imageFile}}" mode=""></image>
|
||||
<view class="delete-btn" catchtap="handleDelete">
|
||||
<text class="iconfont icon-x"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therapeuticRegimen-item">
|
||||
<view class="title">用药周期</view>
|
||||
<view class="title">
|
||||
<text class="title-text">用药周期</text>
|
||||
</view>
|
||||
<view>
|
||||
<t-row gutter="12">
|
||||
<t-col span="12">
|
||||
@ -22,9 +23,7 @@
|
||||
<t-input placeholder="开始时间" bindtap="showPicker" value="{{start_date}}" data-mode="start_date" borderless="{{true}}" />
|
||||
<text class="tip">—</text>
|
||||
</view>
|
||||
|
||||
</t-col>
|
||||
|
||||
<t-col span="12">
|
||||
<view class="input-example">
|
||||
<t-input placeholder="结束时间" bindtap="showPicker" value="{{end_date}}" data-mode="end_date" borderless="{{true}}" />
|
||||
@ -35,42 +34,23 @@
|
||||
</view>
|
||||
<view class="yp-info" wx:for="{{detail}}" wx:key="index">
|
||||
<view class="title">
|
||||
<text>药品信息</text>
|
||||
<text class="title-text">药品信息</text>
|
||||
<text class="iconfont icon-shanchu1" wx:if="{{detail.length > 1}}" data-index="{{index}}" bindtap="deleteItem"></text>
|
||||
</view>
|
||||
|
||||
<view class="yp-item">
|
||||
<t-input bind:change="onInput" data-index="{{index}}" data-mode="name" label="药品名称" placeholder="请输入" align="right" value="{{item.name}}" />
|
||||
<t-input bind:change="onInput" data-index="{{index}}" data-mode="dose" label="单次用药剂量" placeholder="请输入" align="right" value="{{item.dose}}" />
|
||||
<!-- <t-input bind:change="onInput" data-index="{{index}}" data-mode="frequency" label="单次频次(每日次数)" placeholder="请输入" align="right" value="{{item.frequency}}" /> -->
|
||||
<t-cell class="{{item.frequency ? 'active':''}}" title="单次频次(每日次数)" arrow bind:click="showSelect" data-index="{{index}}" data-mode="frequency" data-list="{{frequencyList}}" note="{{item.frequency ? (frequencyList[item.frequency - 1].label) : '请选择'}}">
|
||||
<t-cell class="info-edit__cell" title="药品名称">
|
||||
<t-input bind:change="onInput" data-index="{{index}}" data-mode="name" align="right" borderless placeholder="请输入" slot="note" value="{{item.name}}" />
|
||||
</t-cell>
|
||||
<!-- <t-cell label="药品名称">
|
||||
<t-input bind:change="onInput" data-index="{{index}}" data-mode="name" placeholder="请输入" align="right" value="{{item.name}}" />
|
||||
|
||||
<view class="day-time" wx:if="{{item.frequency}}">
|
||||
<t-row gutter="12">
|
||||
<t-col span="8">
|
||||
<view class="day-time-item" bindtap="showPickertime" data-mode="morning" >
|
||||
{{reminder.morning}}
|
||||
<text class="iconfont icon-bianji"></text>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="8" wx:if="{{item.frequency >= 2}}">
|
||||
<view class="day-time-item" bindtap="showPickertime" data-mode="noon">
|
||||
{{reminder.noon}}
|
||||
<text class="iconfont icon-bianji"></text>
|
||||
</view>
|
||||
|
||||
</t-col>
|
||||
<t-col span="8" wx:if="{{item.frequency == 3}}">
|
||||
<view class="day-time-item" bindtap="showPickertime" data-mode="evening">
|
||||
{{reminder.evening}}
|
||||
<text class="iconfont icon-bianji"></text>
|
||||
</view>
|
||||
|
||||
</t-col>
|
||||
</t-row>
|
||||
</view>
|
||||
|
||||
</t-cell> -->
|
||||
<t-cell class="info-edit__cell" title="单次用药剂量">
|
||||
<t-input bind:change="onInput" data-index="{{index}}" data-mode="dose" align="right" borderless placeholder="请输入" slot="note" value="{{item.dose}}" />
|
||||
</t-cell>
|
||||
<!-- <t-input bind:change="onInput" data-index="{{index}}" data-mode="dose" label="单次用药剂量" placeholder="请输入" align="right" value="{{item.dose}}" /> -->
|
||||
<!-- <t-input bind:change="onInput" data-index="{{index}}" data-mode="frequency" label="单次频次(每日次数)" placeholder="请输入" align="right" value="{{item.frequency}}" /> -->
|
||||
<t-cell class="{{item.frequency ? 'active':''}}" title="单次频次(每日次数)" arrow bind:click="showSelect" data-index="{{index}}" data-mode="frequency" data-list="{{frequencyList}}" note="{{item.frequency ? (frequencyList[item.frequency - 1].label) : '请选择'}}"></t-cell>
|
||||
<view class="administration-time">
|
||||
<view>饭前/饭后</view>
|
||||
<view class="radio-group">
|
||||
@ -81,52 +61,47 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="add-btn-yp" wx:if="{{index == detail.length - 1}}" bindtap="addItem"><text class="iconfont icon-jiahao"></text>添加用药</view>
|
||||
<view class="add-btn-yp" wx:if="{{index == detail.length - 1}}" bindtap="addItem">
|
||||
<text class="iconfont icon-jiahao"></text>
|
||||
添加用药
|
||||
</view>
|
||||
<!-- <t-button class="add-btn" theme="primary" content="" block bindtap="addItem">+添加用药</t-button> -->
|
||||
</view>
|
||||
|
||||
<view class="day-time">
|
||||
<view class="day-title">
|
||||
用药提醒
|
||||
</view>
|
||||
<t-row gutter="12">
|
||||
<t-col span="8">
|
||||
<text>早</text>
|
||||
<view class="day-time-item" bindtap="showPickertime" data-mode="morning">
|
||||
{{reminder.morning}}
|
||||
<text class="iconfont icon-bianji"></text>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="8">
|
||||
<text>中</text>
|
||||
<view class="day-time-item" bindtap="showPickertime" data-mode="noon">
|
||||
{{reminder.noon}}
|
||||
<text class="iconfont icon-bianji"></text>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="8">
|
||||
<text>晚</text>
|
||||
<view class="day-time-item" bindtap="showPickertime" data-mode="evening">
|
||||
{{reminder.evening}}
|
||||
<text class="iconfont icon-bianji"></text>
|
||||
</view>
|
||||
</t-col>
|
||||
</t-row>
|
||||
</view>
|
||||
<t-button class="add-btn" theme="primary" content="" block bind:tap="saveData">保存</t-button>
|
||||
<t-date-time-picker
|
||||
auto-close
|
||||
bind:cancel="hidePicker"
|
||||
bind:change="onPickerChange"
|
||||
cancelBtn="取消"
|
||||
confirmBtn="确认"
|
||||
data-mode="birth"
|
||||
defaultValue="{{timeData}}"
|
||||
end="{{birthEnd}}"
|
||||
filter="{{birthFilter}}"
|
||||
format="YYYY-MM-DD"
|
||||
mode="date"
|
||||
popup-props="{{ { usingCustomNavbar: true } }}"
|
||||
start="{{birthStart}}"
|
||||
title="选择日期" value="{{timeData}}" visible="{{birthVisible}}" />
|
||||
|
||||
<t-date-time-picker auto-close bind:cancel="hidePicker" bind:change="onPickerChange" cancelBtn="取消" confirmBtn="确认" data-mode="birth" defaultValue="{{timeData}}" end="{{birthEnd}}" filter="{{birthFilter}}" format="YYYY-MM-DD" mode="date" popup-props="{{ { usingCustomNavbar: true } }}" start="{{birthStart}}" title="选择日期" value="{{timeData}}" visible="{{birthVisible}}" />
|
||||
<!-- 时分 -->
|
||||
<t-date-time-picker
|
||||
title="选择时间"
|
||||
visible="{{minuteVisible}}"
|
||||
mode="{{['null', 'minute']}}"
|
||||
start="{{startMinute}}"
|
||||
value="{{minute}}"
|
||||
defaultValue="{{timeData2}}"
|
||||
format="HH:mm"
|
||||
bindchange="onConfirm"
|
||||
bindpick="onColumnChange"
|
||||
bindcancel="hidePickerMinute" />
|
||||
|
||||
<t-date-time-picker title="选择时间" visible="{{minuteVisible}}" mode="{{['null', 'minute']}}" start="{{startMinute}}" value="{{minute}}" defaultValue="{{timeData2}}" format="HH:mm" bindchange="onConfirm" bindpick="onColumnChange" bindcancel="hidePickerMinute" />
|
||||
<!-- 下拉选择 -->
|
||||
<t-picker
|
||||
visible="{{selectVisible}}"
|
||||
value="{{selectValue}}"
|
||||
default-value="{{selectValue}}"
|
||||
cancelBtn="取消"
|
||||
confirmBtn="确认"
|
||||
bindchange="onSelectChange"
|
||||
bindcancel="onPickerCancel"
|
||||
>
|
||||
<t-picker-item options="{{frequencyList}}"></t-picker-item>
|
||||
</t-picker>
|
||||
|
||||
<t-image-viewer usingCustomNavbar deleteBtn="{{false}}" closeBtn="{{true}}" showIndex="{{false}}" initial-index="{{imageIndex}}" visible="{{imageVisible}}" images="{{imageList}}" bind:change="onChange" bind:delete="onDelete" bind:close="onClose"></t-image-viewer>
|
||||
<t-picker visible="{{selectVisible}}" value="{{selectValue}}" default-value="{{selectValue}}" cancelBtn="取消" confirmBtn="确认" bindchange="onSelectChange" bindcancel="onPickerCancel">
|
||||
<t-picker-item options="{{frequencyList}}"></t-picker-item>
|
||||
</t-picker>
|
||||
<t-image-viewer usingCustomNavbar deleteBtn="{{false}}" closeBtn="{{true}}" showIndex="{{false}}" initial-index="{{imageIndex}}" visible="{{imageVisible}}" images="{{imageList}}" bind:change="onChange" bind:delete="onDelete" bind:close="onClose"></t-image-viewer>
|
||||
</view>
|
||||
@ -6,7 +6,13 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
articles:[]
|
||||
title: '',
|
||||
articles: [],
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
hasMore: true,
|
||||
loading: false,
|
||||
searchKeyword: ''
|
||||
},
|
||||
|
||||
// Helper function to strip HTML tags and convert to plain text
|
||||
@ -15,17 +21,70 @@ Page({
|
||||
return html.replace(/<[^>]*>/g, '');
|
||||
},
|
||||
|
||||
async getList(){
|
||||
const res = await request('patient/articles', 'get', { title: '', page: 1, page_size: 10 });
|
||||
// Convert rich text content to plain text for each article
|
||||
const articlesWithPlainText = res.list.map(article => ({
|
||||
...article,
|
||||
contentText: this.stripHtml(article.content)
|
||||
}));
|
||||
// 搜索输入处理
|
||||
onSearchInput(e) {
|
||||
this.setData({
|
||||
articles: articlesWithPlainText
|
||||
})
|
||||
searchKeyword: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
// 执行搜索
|
||||
async onSearch() {
|
||||
this.setData({
|
||||
page: 1,
|
||||
articles: [],
|
||||
hasMore: true
|
||||
});
|
||||
await this.getList();
|
||||
},
|
||||
|
||||
// 获取文章列表
|
||||
async getList(){
|
||||
if (this.data.loading || !this.data.hasMore) return;
|
||||
|
||||
this.setData({ loading: true });
|
||||
|
||||
try {
|
||||
const res = await request('patient/articles', 'get', {
|
||||
title: this.data.searchKeyword,
|
||||
page: this.data.page,
|
||||
page_size: this.data.page_size
|
||||
});
|
||||
|
||||
// Convert rich text content to plain text for each article
|
||||
const articlesWithPlainText = res.list.map(article => ({
|
||||
...article,
|
||||
contentText: this.stripHtml(article.content)
|
||||
}));
|
||||
|
||||
// 如果是第一页,直接替换;否则追加
|
||||
const newArticles = this.data.page === 1 ? articlesWithPlainText : [...this.data.articles, ...articlesWithPlainText];
|
||||
|
||||
this.setData({
|
||||
articles: newArticles,
|
||||
hasMore: res.list.length === this.data.page_size,
|
||||
loading: false
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('获取文章列表失败:', error);
|
||||
this.setData({ loading: false });
|
||||
wx.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 加载更多数据
|
||||
async loadMore() {
|
||||
if (this.data.hasMore && !this.data.loading) {
|
||||
this.setData({
|
||||
page: this.data.page + 1
|
||||
});
|
||||
await this.getList();
|
||||
}
|
||||
},
|
||||
|
||||
async preview(e){
|
||||
console.log(e.currentTarget.dataset.index)
|
||||
const index = e.currentTarget.dataset.index
|
||||
@ -34,6 +93,7 @@ Page({
|
||||
url: '/pages/article/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
@ -73,14 +133,21 @@ Page({
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
this.setData({
|
||||
page: 1,
|
||||
articles: [],
|
||||
hasMore: true
|
||||
});
|
||||
this.getList().then(() => {
|
||||
wx.stopPullDownRefresh();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
this.loadMore();
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true,
|
||||
"backgroundTextStyle": "dark"
|
||||
}
|
||||
@ -45,31 +45,24 @@
|
||||
.box_3 {
|
||||
background-color: rgba(255,255,255,1.000000);
|
||||
border-radius: 40rpx;
|
||||
align-self: center;
|
||||
margin-top: 36rpx;
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 10rpx 10rpx 10rpx 24rpx;
|
||||
}
|
||||
.text_2 {
|
||||
overflow-wrap: break-word;
|
||||
color: rgba(153,153,153,1);
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
letter-spacing: 0rpx;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
line-height: 28rpx;
|
||||
margin-top: 16rpx;
|
||||
height: 60rpx;
|
||||
width: 86%;
|
||||
}
|
||||
.image-wrapper_1 {
|
||||
background: url(https://lanhu-oss-2537-2.lanhuapp.com/SketchPngeb1bdfed45398833c1be38e3d13139b3b54af3b3409a3daffb97ec58f9bb7445) 100% no-repeat;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 14rpx 30rpx 14rpx 30rpx;
|
||||
background: linear-gradient( 270deg, #EBF5FE 0%, #D1E4F2 100%);
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.thumbnail_1 {
|
||||
width: 32rpx;
|
||||
@ -184,3 +177,43 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
// 加载状态和分页提示样式
|
||||
.loading-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
color: rgba(96,98,102,1);
|
||||
font-size: 28rpx;
|
||||
font-family: PingFangSC-Regular;
|
||||
}
|
||||
|
||||
.no-more-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
.no-more-text {
|
||||
color: rgba(96,98,102,1);
|
||||
font-size: 28rpx;
|
||||
font-family: PingFangSC-Regular;
|
||||
}
|
||||
|
||||
.empty-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 100rpx 0;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
color: rgba(96,98,102,1);
|
||||
font-size: 28rpx;
|
||||
font-family: PingFangSC-Regular;
|
||||
}
|
||||
@ -1,15 +1,19 @@
|
||||
<view class="page">
|
||||
<image src="../../assets/images/my/my-top-bg.png" class="image_3" mode="widthFix"></image>
|
||||
<image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/my/my-top-bg.png" class="image_3" mode="widthFix"></image>
|
||||
<t-navbar
|
||||
t-class-placeholder="t-navbar-placeholder"
|
||||
t-class-content="t-navbar-content"
|
||||
class="block"
|
||||
title="健康教育"
|
||||
left-arrow
|
||||
bind:go-back="handleBack"
|
||||
/>
|
||||
<view class="box_1">
|
||||
<image src="https://lanhu-oss-2537-2.lanhuapp.com/SketchPngc7eafd88f05e3acc51a4c7ba25ac5d8858a9aaac00d7c68d603489d8e173d890" class="image_1"></image>
|
||||
<view class="box_2">
|
||||
<text class="iconfont icon-fanhui image_2"></text>
|
||||
<text lines="1" class="text_1">健康教育</text>
|
||||
</view>
|
||||
|
||||
<view class="box_3">
|
||||
<text lines="1" class="text_2">请输入搜索关键词</text>
|
||||
<view class="image-wrapper_1">
|
||||
<image src="https://lanhu-oss-2537-2.lanhuapp.com/SketchPng33ce9f3cededd2f9cdbc22dc9b0d16282ea0042c9dbcf67e8f364971c4b93af2" class="thumbnail_1"></image>
|
||||
<input class="text_2" value="{{searchKeyword}}" placeholder="请输入搜索关键词" bindinput="onSearchInput" bindconfirm="onSearch"></input>
|
||||
<view class="image-wrapper_1" bindtap="onSearch">
|
||||
<text class="iconfont icon-sousuo thumbnail_1"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box_5" wx:for="{{articles}}" wx:key="id" bind:tap="preview" data-index="{{index}}">
|
||||
@ -19,6 +23,17 @@
|
||||
<view class="box_7"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加载状态和分页提示 -->
|
||||
<view class="loading-container" wx:if="{{loading}}">
|
||||
<text class="loading-text">加载中...</text>
|
||||
</view>
|
||||
<view class="no-more-container" wx:if="{{!hasMore && articles.length > 0}}">
|
||||
<text class="no-more-text">没有更多数据了</text>
|
||||
</view>
|
||||
<view class="empty-container" wx:if="{{!loading && articles.length === 0}}">
|
||||
<text class="empty-text">暂无相关文章</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -1,44 +0,0 @@
|
||||
/* pages/clockIn/index.wxss */
|
||||
.clockin{
|
||||
padding: 36rpx;
|
||||
padding-bottom: 120rpx;
|
||||
.new-time{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.clockin-item{
|
||||
margin-top: 36rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 28rpx;
|
||||
.t-button{
|
||||
}
|
||||
.item-top{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
.active{
|
||||
color: var(--td-brand-color);
|
||||
}
|
||||
}
|
||||
.medicine-name{
|
||||
font-weight: bold;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.dose{
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
}
|
||||
.footer-example{
|
||||
position: fixed;
|
||||
bottom: 42rpx;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
color: var(--td-brand-color);
|
||||
font-size: 28rpx;
|
||||
line-height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
<!--pages/clockIn/index.wxml-->
|
||||
<view class="clockin">
|
||||
<view class="new-time">{{newTime}}</view>
|
||||
|
||||
<view class="clockin-item" wx:for="{{list}}">
|
||||
<view class="item-top">
|
||||
<text>{{item.medicine_time}}</text>
|
||||
<t-tag class="margin-16" variant="light" theme="success">已完成</t-tag>
|
||||
</view>
|
||||
<view wx:for="{{item.detail}}" wx:for-item="detail" class="item-bottom">
|
||||
|
||||
<view class="medicine-name">{{detail.name}}</view>
|
||||
<view class="dose">{{detail.dose}} {{detail.time}}</view>
|
||||
<t-button bindtap="clockIn" theme="primary" block>打卡</t-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer-example">
|
||||
<text bindtap="toRecord">历史服药记录 ></text>
|
||||
</view>
|
||||
@ -82,9 +82,26 @@
|
||||
box-sizing: border-box;
|
||||
border-radius: 24rpx;
|
||||
background: linear-gradient( 180deg, #EDF3F8 0%, #F7FAFC 100%);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.group-item{
|
||||
padding-bottom: 30rpx;
|
||||
position: relative;
|
||||
.after{
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: calc(100% - 40rpx);
|
||||
top: 34rpx;
|
||||
left: 10rpx;
|
||||
border-left: 2rpx dashed rgba(0,91,162,0.7);
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
.group-item:last-child{
|
||||
.after{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.section_2 {
|
||||
width: 112rpx;
|
||||
@ -97,7 +114,7 @@
|
||||
border-radius: 100%;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border: 2.5px solid rgba(142,181,213,1);
|
||||
border: 2.5px solid var(--td-brand-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 6rpx 0 2rpx 0;
|
||||
@ -105,7 +122,8 @@
|
||||
}
|
||||
.text_4 {
|
||||
overflow-wrap: break-word;
|
||||
color: rgba(144,147,153,1);
|
||||
color: var(--td-text-color);
|
||||
|
||||
font-size: 28rpx;
|
||||
font-family: Alibaba-PuHuiTi-M;
|
||||
font-weight: normal;
|
||||
@ -113,6 +131,15 @@
|
||||
white-space: nowrap;
|
||||
line-height: 28rpx;
|
||||
}
|
||||
.active{
|
||||
.group_4{
|
||||
border-color: rgba(142,181,213,1);
|
||||
|
||||
}
|
||||
.text_4{
|
||||
color: rgba(144,147,153,1);
|
||||
}
|
||||
}
|
||||
.section_3 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
@ -2,13 +2,14 @@
|
||||
|
||||
<view class="group_2">
|
||||
<view class="text-wrapper_1">
|
||||
<text lines="1" class="text_2">2025年3月1日</text>
|
||||
<text lines="1" class="text_3">历史服药记录</text>
|
||||
<text lines="1" class="text_2">{{list[0].medicine_date}}</text>
|
||||
<text lines="1" class="text_3" bind:tap="toRecord">历史服药记录</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group_3">
|
||||
<view class="group-item" wx:for="{{list}}">
|
||||
<view class="section_2">
|
||||
<view class="after"></view>
|
||||
<view class="{{item.status == 2 ? 'section_2 acitve' : 'section_2'}}">
|
||||
<view class="group_4"></view>
|
||||
<text lines="1" class="text_4">{{item.medicine_time}}</text>
|
||||
</view>
|
||||
@ -22,7 +23,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="box_1"></view>
|
||||
<text lines="1" class="text_7" wx:if="{{item.status == 2}}">未打卡</text>
|
||||
<text lines="1" class="text_7" wx:if="{{item.status == 2}}">已打卡</text>
|
||||
<view class="text-wrapper_3" wx:if="{{item.status == 1}}" data-id="{{item.id}}" data-status="{{item.status}}" bind:tap="medicineRecord">
|
||||
<text lines="1" class="text_14">打卡</text>
|
||||
</view>
|
||||
|
||||
@ -1,18 +1,25 @@
|
||||
// pages/forGetPassword/index.js
|
||||
import request from '~/api/request';
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
msg: ''
|
||||
},
|
||||
handleBack(){
|
||||
wx.navigateBack()
|
||||
},
|
||||
handleDocter(){
|
||||
console.log('联系医生')
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.setData({
|
||||
msg: options.msg
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
6
pages/diagnosticResults/index.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
129
pages/diagnosticResults/index.less
Normal file
@ -0,0 +1,129 @@
|
||||
/* pages/emergency/index.wxss */
|
||||
|
||||
.emergency{
|
||||
padding: 28rpx;
|
||||
|
||||
.image_3 {
|
||||
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
.image_2{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
.emergency-container{
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
.title{
|
||||
text-align: center;
|
||||
font-size: 48rpx;
|
||||
color: #005BA2;
|
||||
margin: 80rpx 0rpx 0rpx 0;
|
||||
font-weight: bold;
|
||||
image{
|
||||
width: 380rpx;
|
||||
height: 380rpx;
|
||||
}
|
||||
}
|
||||
.high-risk{
|
||||
color: #D00F16;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-top: -40rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
.msg-text{
|
||||
font-size: 30rpx;
|
||||
color: #606266;
|
||||
text-align: center;
|
||||
}
|
||||
.check-item{
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
margin-bottom: 32rpx;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
padding: 24rpx;
|
||||
position: relative;
|
||||
view{
|
||||
display: inline-block;
|
||||
|
||||
.name{
|
||||
display: block;
|
||||
font-size: 36rpx;
|
||||
color: var(--td-text-color);
|
||||
font-weight: bold;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.text{
|
||||
font-size: 30rpx;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
.block{
|
||||
padding-left: 100rpx;
|
||||
}
|
||||
|
||||
.icon-box{
|
||||
position: absolute;
|
||||
left: 38rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.check-box{
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
right: 28rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #606266;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.active{
|
||||
background: rgba(0,91,162,0.1);
|
||||
border: 2rpx solid var(--td-brand-color);
|
||||
.check-box{
|
||||
background-color: var(--td-brand-color);
|
||||
border-color: var(--td-brand-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn{
|
||||
width: 80%;
|
||||
margin-left: 10%;
|
||||
height: 96rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
.btn-1{
|
||||
background: linear-gradient( 270deg, #E23C3C 0%, #F17373 100%);
|
||||
|
||||
color: #fff;
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
.btn-2{
|
||||
color: #888888;
|
||||
background: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
34
pages/diagnosticResults/index.wxml
Normal file
@ -0,0 +1,34 @@
|
||||
<!--pages/emergency/index.wxml-->
|
||||
|
||||
|
||||
<view class="emergency">
|
||||
<t-navbar
|
||||
t-class-placeholder="t-navbar-placeholder"
|
||||
t-class-content="t-navbar-content"
|
||||
class="block"
|
||||
title="紧急通道"
|
||||
left-arrow
|
||||
bind:go-back="handleBack"
|
||||
/>
|
||||
<image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/diagnosticResults/bg.png" class="image_2"></image>
|
||||
<!-- <image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/my/my-top-bg.png" class="image_3"></image> -->
|
||||
<view class="emergency-container">
|
||||
|
||||
<view class="title">
|
||||
<image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/diagnosticResults/img1.png" />
|
||||
</view>
|
||||
<view class="high-risk">
|
||||
高危预警
|
||||
</view>
|
||||
<view class="msg-text">
|
||||
您的症状组合提示可能存在胆管炎风险
|
||||
</view>
|
||||
<!-- <view class="btn btn-1" bind:tap="handleDocter">
|
||||
<view>立即联系医生</view>
|
||||
</view>
|
||||
<view class="btn btn-2" bind:tap="handleBack">
|
||||
暂不处理
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// pages/emergency/index.js
|
||||
import request from '~/api/request';
|
||||
Page({
|
||||
|
||||
/**
|
||||
@ -7,55 +7,73 @@ Page({
|
||||
data: {
|
||||
visible: false,
|
||||
current: ['checkbox1', 'checkbox2'],
|
||||
options: [
|
||||
|
||||
{
|
||||
label: '发热',
|
||||
value: 'checkbox1',
|
||||
content: '体温≥38°',
|
||||
maxContentRow: 2,
|
||||
icon: "rectangle"
|
||||
},
|
||||
{
|
||||
label: '白色或陶土样大便',
|
||||
value: 'checkbox2',
|
||||
content: '排便颜色异常',
|
||||
maxContentRow: 2,
|
||||
// defaultChecked: ' default-checked',
|
||||
icon: "rectangle"
|
||||
},
|
||||
{
|
||||
label: '腹胀/食欲下降',
|
||||
value: 'checkbox3',
|
||||
content: '消化系统不适',
|
||||
maxContentRow: 2,
|
||||
icon: "rectangle"
|
||||
},
|
||||
{
|
||||
label: '消化道出血',
|
||||
value: 'checkbox4',
|
||||
content: '血便或黑便',
|
||||
maxContentRow: 2,
|
||||
icon: "rectangle"
|
||||
},
|
||||
],
|
||||
options: [],
|
||||
message: ''
|
||||
},
|
||||
|
||||
openFlow(){
|
||||
handleCheck(e) {
|
||||
const {
|
||||
index
|
||||
} = e.currentTarget.dataset
|
||||
this.setData({
|
||||
visible: true
|
||||
[`options[${index}].checked`]: !this.data.options[index].checked
|
||||
})
|
||||
},
|
||||
closeFlow(){
|
||||
async openFlow() {
|
||||
const list = this.data.options.filter(item => item.checked).map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
title: item.title,
|
||||
description: item.description
|
||||
}
|
||||
})
|
||||
|
||||
const res = await request('patient/symptom/submit', 'post', {
|
||||
detail: JSON.stringify(list),
|
||||
})
|
||||
wx.navigateTo({
|
||||
url: '/pages/diagnosticResults/index?msg=' + res.message
|
||||
})
|
||||
|
||||
},
|
||||
closeFlow() {
|
||||
this.setData({
|
||||
visible: false
|
||||
})
|
||||
},
|
||||
|
||||
async getList(){
|
||||
const res = await request('patient/symptoms', 'get')
|
||||
// const list = res.list.map((item, index) => {
|
||||
// let icon = ''
|
||||
// if(index == 0){
|
||||
// icon = 'iconfont icon-fare'
|
||||
// }
|
||||
// if(index == 1){
|
||||
// icon = 'iconfont icon-dabianhui'
|
||||
// }
|
||||
// if(index == 2){
|
||||
// icon = 'iconfont icon-xiaohuaneike'
|
||||
// }
|
||||
// if(index == 3){
|
||||
// icon = 'iconfont icon-dabianhong'
|
||||
// }
|
||||
// return {
|
||||
// ...item,
|
||||
// icon: icon,
|
||||
// checked: false
|
||||
// }
|
||||
|
||||
// })
|
||||
this.setData({
|
||||
options: res.list
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.getList()
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
"t-checkbox-group": "tdesign-miniprogram/checkbox-group/checkbox-group",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-popup": "tdesign-miniprogram/popup/popup",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar"
|
||||
},
|
||||
"navigationBarTitleText": "紧急通道"
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
@ -8,7 +8,86 @@
|
||||
margin-top: 28rpx;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
.image_3 {
|
||||
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
.emergency-container{
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
.title{
|
||||
text-align: center;
|
||||
font-size: 48rpx;
|
||||
color: #005BA2;
|
||||
margin: 80rpx 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
.check-item{
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
margin-bottom: 32rpx;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
padding: 24rpx;
|
||||
position: relative;
|
||||
view{
|
||||
display: inline-block;
|
||||
|
||||
.name{
|
||||
display: block;
|
||||
font-size: 36rpx;
|
||||
color: var(--td-text-color);
|
||||
font-weight: bold;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.text{
|
||||
font-size: 30rpx;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
.block{
|
||||
padding-left: 100rpx;
|
||||
}
|
||||
|
||||
.icon-box{
|
||||
position: absolute;
|
||||
left: 38rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
image{
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
.check-box{
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
right: 38rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #606266;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.active{
|
||||
background: rgba(0,91,162,0.1);
|
||||
border: 2rpx solid var(--td-brand-color);
|
||||
.check-box{
|
||||
background-color: var(--td-brand-color);
|
||||
border-color: var(--td-brand-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.t-overlay{
|
||||
|
||||
@ -1,11 +1,35 @@
|
||||
<!--pages/emergency/index.wxml-->
|
||||
<view class="emergency">
|
||||
|
||||
<view>症状自检</view>
|
||||
<view class="checkbox-group">
|
||||
<t-checkbox-group icon="rectangle" default-checked value="{{current}}" bind:change="handleGroupChange" options="{{options}}" />
|
||||
</view>
|
||||
<t-button bindtap="clockIn" theme="primary" block bindtap="openFlow">提交</t-button>
|
||||
|
||||
<view class="emergency">
|
||||
<t-navbar
|
||||
t-class-placeholder="t-navbar-placeholder"
|
||||
t-class-content="t-navbar-content"
|
||||
class="block"
|
||||
title="紧急通道"
|
||||
left-arrow
|
||||
bind:go-back="handleBack"
|
||||
/>
|
||||
<image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/my/my-top-bg.png" class="image_3"></image>
|
||||
<view class="emergency-container">
|
||||
|
||||
<view class="title">症状自检</view>
|
||||
<view class="checkbox-group">
|
||||
<view class="check-item {{item.checked ? 'active':''}}" wx:for="{{options}}" wx:key="index" data-index="{{index}}" bind:tap="handleCheck">
|
||||
<view class="icon-box">
|
||||
<image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/diagnosticResults/icon_{{index + 1}}.png"></image>
|
||||
</view>
|
||||
<view class="block">
|
||||
<view class="name">{{item.title}}</view>
|
||||
<view class="text">{{item.description}}</view>
|
||||
</view>
|
||||
<text class="check-box">
|
||||
<text class="iconfont icon-gouxuan1"></text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<t-button bindtap="clockIn" theme="primary" block bindtap="openFlow">提交</t-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<t-popup
|
||||
@ -19,7 +43,7 @@
|
||||
<t-icon name="error-triangle-filled" size="48rpx" />
|
||||
</view>
|
||||
<view class="block-tip">高危预警</view>
|
||||
<view class="block-desp">您的症状组合提示可能存在胆管炎风险</view>
|
||||
<view class="block-desp">{{message}}</view>
|
||||
<t-button class="block-btn" theme="danger" block>立即联系医生</t-button>
|
||||
<t-button block bind:tap="closeFlow">暂不处理</t-button>
|
||||
</view>
|
||||
|
||||
@ -10,16 +10,19 @@ Page({
|
||||
style: 'border: 2rpx solid #efefef;border-radius: 12rpx;',
|
||||
|
||||
form: {
|
||||
follow_name: '',
|
||||
liver_function_image:[],
|
||||
b_mode_image: [],
|
||||
blood_routine_image: [],
|
||||
coagulation_function_image: [],
|
||||
liver_function_image: [],
|
||||
mdt_image: [],
|
||||
nutritional_indicator_image: []
|
||||
},
|
||||
|
||||
|
||||
isName: true,
|
||||
isTime: true,
|
||||
isDoctor: true,
|
||||
isHeight: true,
|
||||
isWeight: true,
|
||||
|
||||
|
||||
|
||||
@ -119,10 +122,33 @@ Page({
|
||||
|
||||
},
|
||||
onInput(e) {
|
||||
const { key } = e.currentTarget.dataset;
|
||||
// this.setData({
|
||||
// ['form.key']: e.detail.value,
|
||||
// });
|
||||
const { key, tips } = e.currentTarget.dataset;
|
||||
|
||||
if(e.detail.value){
|
||||
this.setData({
|
||||
[tips]: true,
|
||||
[`form.${key}`]: e.detail.value
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
[tips]: false,
|
||||
[`form.${key}`]: e.detail.value
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
onInputTime(e){
|
||||
const { tips } = e.currentTarget.dataset;
|
||||
if(e.detail.value){
|
||||
this.setData({
|
||||
[tips]: true,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
[tips]: false,
|
||||
})
|
||||
}
|
||||
},
|
||||
showPicker(e) {
|
||||
const { mode } = e.currentTarget.dataset;
|
||||
@ -134,20 +160,26 @@ Page({
|
||||
|
||||
},
|
||||
onPickerChange(e) {
|
||||
console.log(e)
|
||||
this.setData({
|
||||
['form.follow_date']: e.detail.value
|
||||
})
|
||||
if(e.detail.value){
|
||||
this.setData({
|
||||
isTime: true,
|
||||
['form.follow_date']: e.detail.value
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
isTime: false,
|
||||
['form.follow_date']: e.detail.value
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
handleSuccess(e) {
|
||||
console.log(e.detail)
|
||||
const { files } = e.detail;
|
||||
this.setData({
|
||||
originFiles: files,
|
||||
});
|
||||
},
|
||||
handleRemove(e) {
|
||||
console.log(e.detail.file);
|
||||
const { index } = e.detail;
|
||||
const { originFiles } = this.data;
|
||||
originFiles.splice(index, 1);
|
||||
@ -158,20 +190,52 @@ Page({
|
||||
handleClick(e) {
|
||||
console.log(e.detail.file);
|
||||
},
|
||||
toQuestionnaire() {
|
||||
|
||||
planId:'',
|
||||
async toQuestionnaire() {
|
||||
let valid = true;
|
||||
// 必填项校验
|
||||
if(!this.data.form.follow_name){
|
||||
this.setData({ isName: false });
|
||||
valid = false;
|
||||
}
|
||||
if(!this.data.form.follow_date){
|
||||
this.setData({ isTime: false });
|
||||
valid = false;
|
||||
}
|
||||
if(!this.data.form.follow_hospital){
|
||||
this.setData({ isDoctor: false });
|
||||
valid = false;
|
||||
}
|
||||
if(!this.data.form.height){
|
||||
this.setData({ isHeight: false });
|
||||
valid = false;
|
||||
}
|
||||
if(!this.data.form.weight){
|
||||
this.setData({ isWeight: false });
|
||||
valid = false;
|
||||
}
|
||||
if(!valid) return
|
||||
const data = this.data.form
|
||||
data.liver_function_image = data.liver_function_image.length > 0 ? data.liver_function_image.join(',') : ''
|
||||
data.b_mode_image = data.b_mode_image.length > 0 ? data.b_mode_image.join(',') : '',
|
||||
data.blood_routine_image = data.blood_routine_image.length > 0 ? data.blood_routine_image.join(',') : '',
|
||||
data.coagulation_function_image = data.coagulation_function_image.length > 0 ? data.coagulation_function_image.join(',') : '',
|
||||
data.liver_function_image = data.liver_function_image.length > 0 ? data.liver_function_image.join(',') : '',
|
||||
data.mdt_image = data.mdt_image.length > 0 ? data.mdt_image.join(',') : '',
|
||||
data.nutritional_indicator_image = data.nutritional_indicator_image.length > 0 ? data.nutritional_indicator_image.join(',') : ''
|
||||
console.log(data)
|
||||
request('patient/follow_questionnaire', 'post', data)
|
||||
await request('patient/follow_questionnaire', 'post',{planId: this.planId, ...data})
|
||||
wx.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'success',
|
||||
duration: 2000,
|
||||
complete: () => {
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleChangeGroup(e) {
|
||||
console.log(e)
|
||||
const { mode } = e.currentTarget.dataset
|
||||
this.setData({
|
||||
[`form.${mode}`]: e.detail.value
|
||||
@ -186,7 +250,7 @@ Page({
|
||||
|
||||
|
||||
const formData = {
|
||||
key: file.name, //上传文件名称
|
||||
key: 'upload_file/' + file.name, //上传文件名称
|
||||
policy: res.policy, //表单域
|
||||
'x-oss-signature-version': res.x_oss_signature_version, //指定签名的版本和算法
|
||||
'x-oss-credential': res.x_oss_credential, //指明派生密钥的参数集
|
||||
@ -207,7 +271,7 @@ Page({
|
||||
success(res) {
|
||||
console.log('上传响应:', res);
|
||||
if (res.statusCode === 200) {
|
||||
callback(null, 'https://image-fudan.oss-cn-beijing.aliyuncs.com/'+ file.name); // 上传成功
|
||||
callback(null, 'https://image-fudan.oss-cn-beijing.aliyuncs.com/upload_file/'+ file.name); // 上传成功
|
||||
} else {
|
||||
console.error('上传失败,状态码:', res.statusCode);
|
||||
console.error('失败响应:', res);
|
||||
@ -302,7 +366,8 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
console.log(options)
|
||||
this.planId = options.planId
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
"t-row": "tdesign-miniprogram/row/row",
|
||||
"t-col": "tdesign-miniprogram/col/col",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-upload": "tdesign-miniprogram/upload/upload",
|
||||
"t-radio": "tdesign-miniprogram/radio/radio",
|
||||
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group",
|
||||
"t-image-viewer": "tdesign-miniprogram/image-viewer/image-viewer"
|
||||
|
||||
@ -10,10 +10,13 @@
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.custom-label {
|
||||
display: inline-flex;
|
||||
color: var(--td-text-color-primary);
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
margin: 0 8rpx 16rpx;
|
||||
}
|
||||
|
||||
.custom-label::after, .input-example__label::after {
|
||||
.custom-label::after {
|
||||
content: '*';
|
||||
color: red;
|
||||
font-size: 32rpx;
|
||||
|
||||
@ -3,54 +3,60 @@
|
||||
<view class="follow-item">
|
||||
<view>随访信息</view>
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">随访名称</view>
|
||||
<t-input placeholder="请输入" size="small" bind:tap="onInput" value="{{form.follow_name}}" data-key="follow_name" borderless="{{true}}" style="{{style}}" />
|
||||
<view class="custom-label">随访名称</view>
|
||||
<t-input placeholder="请输入" size="small" bind:change="onInput" value="{{form.follow_name}}" data-key="follow_name" borderless="{{true}}" style="{{style}}"
|
||||
data-tips="isName"
|
||||
status="error"
|
||||
tips="{{isName ? '':'请输入随访名称'}}" />
|
||||
</view>
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">随访日期</view>
|
||||
<t-input placeholder="请输入" bindtap="showPicker" size="small" borderless="{{true}}" style="{{style}}" data-mode="birth" suffixIcon="{{ { name: 'calendar-1'} }}" note="'请选择'" value="{{form.follow_date}}" />
|
||||
<view class="custom-label">随访日期</view>
|
||||
<t-input placeholder="请选择" bindtap="showPicker" size="small" borderless="{{true}}" style="{{style}}" data-mode="birth" suffixIcon="{{ { name: 'calendar-1'} }}" note="'请选择'" value="{{form.follow_date}}"
|
||||
data-tips="isTime"
|
||||
status="error"
|
||||
tips="{{isTime ? '':'请选择随访日期'}}" />
|
||||
</view>
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">随访医院</view>
|
||||
<t-input placeholder="请输入" size="small" bind:tap="onInput" value="{{form.follow_hospital}}" data-key="follow_hospital" borderless="{{true}}" style="{{style}}" />
|
||||
<view class="custom-label">随访医院</view>
|
||||
<t-input placeholder="请输入" size="small" bind:change="onInput" value="{{form.follow_hospital}}" data-key="follow_hospital" borderless="{{true}}" style="{{style}}"
|
||||
data-tips="isDoctor"
|
||||
status="error"
|
||||
tips="{{isDoctor ? '':'请输入随访医院'}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>生长指数</view>
|
||||
<t-row gutter="12">
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">身高(cm)</view>
|
||||
<t-input placeholder="请输入" size="small" bind:tap="onInput" value="{{form.height}}" data-key="height" borderless="{{true}}" style="{{style}}" />
|
||||
<view class="custom-label">身高(cm)</view>
|
||||
<t-input placeholder="请输入" size="small" bind:change="onInput" value="{{form.height}}" data-key="height" borderless="{{true}}" style="{{style}}"
|
||||
data-tips="isHeight"
|
||||
status="error"
|
||||
type="digit"
|
||||
tips="{{isHeight ? '':'请输入身高'}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">体重(kg)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.weight}}" data-key="weight" borderless="{{true}}" style="{{style}}" />
|
||||
<view class="custom-label">体重(kg)</view>
|
||||
<t-input placeholder="请输入" bind:change="onInput" value="{{form.weight}}" data-key="weight" borderless="{{true}}" style="{{style}}"
|
||||
data-tips="isWeight"
|
||||
status="error"
|
||||
type="digit"
|
||||
tips="{{isWeight ? '':'请输入体重'}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">头围(cm)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.head_circumference}}" data-key="head_circumference" borderless="{{true}}" style="{{style}}" />
|
||||
<view class="">头围(cm)</view>
|
||||
<t-input placeholder="请输入" bind:change="onInput" value="{{form.head_circumference}}" data-key="head_circumference" borderless="{{true}}" style="{{style}}"
|
||||
type="digit" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
<t-col span="12">
|
||||
<view class="dark">
|
||||
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">上臀围(cm)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.high_hip}}" data-key="high_hip" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input placeholder="请输入" bind:change="onInput" value="{{form.high_hip}}" data-key="high_hip" borderless="{{true}}" style="{{style}}"
|
||||
type="digit" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
</t-row>
|
||||
|
||||
</view>
|
||||
<view class="follow-item">
|
||||
<view>肝功能</view>
|
||||
@ -86,7 +92,8 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">总胆红素(µmol/L)</view>
|
||||
<t-input placeholder="请输入" size="small" bind:tap="onInput" value="{{form.total_bilirubin}}" data-key="total_bilirubin" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input placeholder="请输入" size="small" bind:change="onInput" value="{{form.total_bilirubin}}" data-key="total_bilirubin" borderless="{{true}}" style="{{style}}"
|
||||
type="digit" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -94,7 +101,8 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">直接胆红素(µmol/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.direct_bilirubin}}" data-key="direct_bilirubin" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input placeholder="请输入" bind:change="onInput" value="{{form.direct_bilirubin}}" data-key="direct_bilirubin" borderless="{{true}}" style="{{style}}"
|
||||
type="digit" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -102,7 +110,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">总胆汁酸(g/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.total_bile_acid}}" data-key="total_bile_acid" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.total_bile_acid}}" data-key="total_bile_acid" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -110,7 +118,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">白蛋白(g/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.albumin}}" data-key="albumin" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.albumin}}" data-key="albumin" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -118,7 +126,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">谷草(U/L)</view>
|
||||
<t-input placeholder="请输入" size="small" bind:tap="onInput" value="{{form.grain_grass}}" data-key="grain_grass" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" size="small" bind:change="onInput" value="{{form.grain_grass}}" data-key="grain_grass" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -126,7 +134,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">谷丙(U/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.gu_bing}}" data-key="gu_bing" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.gu_bing}}" data-key="gu_bing" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -134,7 +142,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">GGT(U/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.ggt}}" data-key="ggt" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.ggt}}" data-key="ggt" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -142,7 +150,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">ALP(U/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.alp}}" data-key="alp" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.alp}}" data-key="alp" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -181,7 +189,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">CRP(mg/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.crp}}" data-key="crp" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.crp}}" data-key="crp" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -189,7 +197,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">DDR</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.ddr}}" data-key="ddr" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.ddr}}" data-key="ddr" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -197,7 +205,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">INR</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.inr}}" data-key="inr" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.inr}}" data-key="inr" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -205,7 +213,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">PT(s)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.pt}}" data-key="pt" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.pt}}" data-key="pt" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -213,7 +221,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">PTA(%)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.pta}}" data-key="pta" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.pta}}" data-key="pta" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -221,7 +229,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">APTT(s)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.aptt}}" data-key="aptt" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.aptt}}" data-key="aptt" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -229,7 +237,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">TT(s)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.tt}}" data-key="tt" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.tt}}" data-key="tt" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -237,7 +245,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">FIB(g/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.fib}}" data-key="fib" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.fib}}" data-key="fib" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -245,7 +253,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">NPDP(mg/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.npdp}}" data-key="npdp" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.npdp}}" data-key="npdp" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -253,7 +261,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">MMP-7(ng/mL)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.mmp_7}}" data-key="mmp_7" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.mmp_7}}" data-key="mmp_7" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -292,7 +300,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">血小板(10^9/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.platelets}}" data-key="platelets" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.platelets}}" data-key="platelets" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -300,7 +308,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">血红蛋白(g/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.hemoglobin}}" data-key="hemoglobin" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.hemoglobin}}" data-key="hemoglobin" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -308,7 +316,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">白细胞(10^9/L)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.white_blood_cells}}" data-key="white_blood_cells" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.white_blood_cells}}" data-key="white_blood_cells" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -347,7 +355,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">25(OH)D3 (ng/ml)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.oh_d3}}" data-key="oh_d3" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.oh_d3}}" data-key="oh_d3" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -355,7 +363,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">25(OH)D2 (ng/ml)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.oh_d2}}" data-key="oh_d2" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.oh_d2}}" data-key="oh_d2" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -363,7 +371,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">25(OH)D (ng/ml)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.oh_d}}" data-key="oh_d" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.oh_d}}" data-key="oh_d" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -371,7 +379,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">维生素A (ng/ml)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.vitamin_a}}" data-key="vitamin_a" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.vitamin_a}}" data-key="vitamin_a" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -379,7 +387,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">维生素K (ng/ml)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.vitamin_k}}" data-key="vitamin_k" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.vitamin_k}}" data-key="vitamin_k" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -387,7 +395,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">维生素E (ng/ml)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.vitamin_e}}" data-key="vitamin_e" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.vitamin_e}}" data-key="vitamin_e" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -426,7 +434,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">肝肋下(mm)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.under_the_liver_rib}}" data-key="under_the_liver_rib" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.under_the_liver_rib}}" data-key="under_the_liver_rib" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -434,7 +442,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">肝剑突下(mm)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.under_the_xiphoid_liver}}" data-key="under_the_xiphoid_liver" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.under_the_xiphoid_liver}}" data-key="under_the_xiphoid_liver" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -442,7 +450,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">脾肋下(mm)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.spleen_rib_area}}" data-key="spleen_rib_area" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.spleen_rib_area}}" data-key="spleen_rib_area" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -450,7 +458,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">门静脉主干内径(mm)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.main_portal_vein}}" data-key="main_portal_vein" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input placeholder="请输入" bind:change="onInput" value="{{form.main_portal_vein}}" data-key="main_portal_vein" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -458,7 +466,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">肝回声</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.liver_echo}}" data-key="liver_echo" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.liver_echo}}" data-key="liver_echo" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -466,7 +474,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">胆囊大小(mm)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.gallbladder_size}}" data-key="gallbladder_size" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.gallbladder_size}}" data-key="gallbladder_size" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -474,7 +482,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">胆总管(mm)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.common_bile_duct}}" data-key="common_bile_duct" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.common_bile_duct}}" data-key="common_bile_duct" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -482,7 +490,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">纤维块大小(mm)</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.fiber_block_size}}" data-key="fiber_block_size" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.fiber_block_size}}" data-key="fiber_block_size" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -490,7 +498,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">门静脉流速</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.pvv}}" data-key="pvv" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.pvv}}" data-key="pvv" size="small" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -498,7 +506,7 @@
|
||||
<view class="dark">
|
||||
<view class="input-example">
|
||||
<view class="input-example__label">肝弹性值</view>
|
||||
<t-input placeholder="请输入" bind:tap="onInput" value="{{form.liver_elasticity_value}}" data-key="liver_elasticity_value" borderless="{{true}}" style="{{style}}" />
|
||||
<t-input type="digit" placeholder="请输入" bind:change="onInput" value="{{form.liver_elasticity_value}}" data-key="liver_elasticity_value" borderless="{{true}}" style="{{style}}" />
|
||||
</view>
|
||||
</view>
|
||||
</t-col>
|
||||
@ -556,6 +564,6 @@
|
||||
</view>
|
||||
</view>
|
||||
<t-button bindtap="clockIn" theme="primary" block bindtap="toQuestionnaire">提交</t-button>
|
||||
<t-date-time-picker auto-close bind:cancel="hidePicker" bind:change="onPickerChange" cancelBtn="取消" confirmBtn="确认" data-mode="birth" defaultValue="{{personInfo.birth}}" end="{{birthEnd}}" filter="{{birthFilter}}" format="YYYY-MM-DD" mode="date" popup-props="{{ { usingCustomNavbar: true } }}" start="{{birthStart}}" title="选择生日" value="{{personInfo.birth}}" visible="{{birthVisible}}" />
|
||||
<t-date-time-picker auto-close bind:cancel="hidePicker" bind:change="onPickerChange" cancelBtn="取消" confirmBtn="确认" data-mode="birth" defaultValue="{{personInfo.birth}}" end="{{birthEnd}}" filter="{{birthFilter}}" format="YYYY-MM-DD" mode="date" popup-props="{{ { usingCustomNavbar: true } }}" start="{{birthStart}}" title="选择期日" value="{{personInfo.birth}}" visible="{{birthVisible}}" />
|
||||
<t-image-viewer usingCustomNavbar deleteBtn="{{false}}" closeBtn="{{true}}" showIndex="{{true}}" initial-index="{{imageIndex}}" visible="{{imageVisible}}" images="{{imageList}}" bind:change="onChange" bind:delete="onDelete" bind:close="onClose"></t-image-viewer>
|
||||
</view>
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@ -1,95 +0,0 @@
|
||||
/* pages/forGetPassword/index.wxss */
|
||||
.login {
|
||||
&__title {
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
font-size: 56rpx;
|
||||
font-weight: 600;
|
||||
line-height: 72rpx;
|
||||
padding: 16rpx 32rpx 40rpx;
|
||||
}
|
||||
|
||||
&__input {
|
||||
.input-label {
|
||||
display: flex;
|
||||
padding-right: 32rpx;
|
||||
box-sizing: border-box;
|
||||
border-right: 1rpx solid #e7e7e7;
|
||||
}
|
||||
|
||||
.input-icon {
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&__tips {
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
font-size: 24rpx;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 40rpx;
|
||||
margin: 24rpx 32rpx 32rpx;
|
||||
}
|
||||
|
||||
&__button {
|
||||
margin: 0 32rpx;
|
||||
}
|
||||
|
||||
&__password--forget {
|
||||
display: flex;
|
||||
font-size: 24rpx;
|
||||
align-items: center;
|
||||
margin: 32rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
&__others {
|
||||
margin: 64rpx 32rpx auto 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
&-label {
|
||||
min-width: 96rpx;
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
&-buttons {
|
||||
flex: 1;
|
||||
margin-left: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
.button {
|
||||
margin: 0 !important;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: 32rpx !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 覆盖组件样式
|
||||
.radio-class {
|
||||
--td-radio-icon-size: 32rpx;
|
||||
--td-radio-label-line-height: 40rpx;
|
||||
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.radio-class-icon {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.radio-class-label {
|
||||
margin-left: 8rpx !important;
|
||||
font-size: 24rpx !important;
|
||||
line-height: 40rpx !important;
|
||||
}
|
||||
.login__button{
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
<!--pages/forGetPassword/index.wxml-->
|
||||
<t-navbar left-arrow />
|
||||
<view class="page login">
|
||||
<view class="login__content">
|
||||
<view class="login__input">
|
||||
|
||||
<view>
|
||||
<t-input value="{{phoneNumber}}" placeholder="请输入手机号" type="number" bindchange="onPhoneInput">
|
||||
<view slot="label" class="input-label">
|
||||
<t-icon name="mobile" size="40rpx" class="input-iconl"></t-icon>
|
||||
</view>
|
||||
|
||||
</t-input>
|
||||
<t-input value="{{code}}" placeholder="请输入验证码" type="number" bindchange="onCodeInput">
|
||||
|
||||
<view slot="label" class="input-label">
|
||||
<t-icon name="mail" size="40rpx" class="input-iconl"></t-icon>
|
||||
</view>
|
||||
<view slot="suffix" style="display: flex; align-items: center">
|
||||
<view class="suffix--line"></view>
|
||||
<view class="verify" aria-role="button" bindtap="getCode"> 发送验证码 </view>
|
||||
</view>
|
||||
</t-input>
|
||||
<t-input value="{{phoneNumber}}" placeholder="请设置6-20位密码" type="number" bindchange="onPhoneInput">
|
||||
<view slot="label" class="input-label">
|
||||
<t-icon name="git-repository-private" size="40rpx" class="input-iconl"></t-icon>
|
||||
</view>
|
||||
|
||||
</t-input>
|
||||
<t-input value="{{phoneNumber}}" placeholder="请重新输入密码" type="number" bindchange="onPhoneInput">
|
||||
<view slot="label" class="input-label">
|
||||
<t-icon name="git-repository-private" size="40rpx" class="input-iconl"></t-icon>
|
||||
</view>
|
||||
|
||||
</t-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="login__button">
|
||||
<t-button theme="primary" size="large" block disabled="{{!isSubmit}}" bindtap="login">
|
||||
确定
|
||||
</t-button>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
@ -1,130 +1,10 @@
|
||||
import * as echarts from '../../ec-canvas/echarts.min';
|
||||
import request from '~/api/request';
|
||||
|
||||
import { heightList, weightList } from '../../assets/js/heightWeight';
|
||||
|
||||
const app = getApp();
|
||||
|
||||
function initChart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
|
||||
var option = {
|
||||
title: {
|
||||
text: '',
|
||||
left: 'left',
|
||||
fontSize: 6
|
||||
},
|
||||
legend: {
|
||||
data: ['实际身高', '标准范围'],
|
||||
bottom: 0,
|
||||
left: 'center',
|
||||
z: 100
|
||||
},
|
||||
grid: {
|
||||
containLabel: true,
|
||||
top: '5%',
|
||||
left: '1%',
|
||||
right: '5%',
|
||||
bottom: '10%'
|
||||
},
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['出生', '1月', '2月', '3月', '4月', '5月'],
|
||||
},
|
||||
yAxis: {
|
||||
x: 'center',
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
type: 'dashed'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '实际身高',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: []
|
||||
}, {
|
||||
name: '标准范围',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: [120, 130, 140, 150, 160, 170]
|
||||
}]
|
||||
};
|
||||
|
||||
chart.setOption(option);
|
||||
return chart;
|
||||
}
|
||||
|
||||
function initChart2(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
|
||||
var option = {
|
||||
title: {
|
||||
text: '',
|
||||
left: 'left',
|
||||
fontSize: 12
|
||||
},
|
||||
legend: {
|
||||
data: ['实际体重', '标准范围'],
|
||||
bottom: 0,
|
||||
left: 'center',
|
||||
z: 100
|
||||
},
|
||||
grid: {
|
||||
containLabel: true,
|
||||
top: '5%',
|
||||
left: '1%',
|
||||
right: '5%',
|
||||
bottom: '10%'
|
||||
},
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['出生', '1月', '2月', '3月', '4月', '5月'],
|
||||
},
|
||||
yAxis: {
|
||||
x: 'center',
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
type: 'dashed'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '实际体重',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: []
|
||||
}, {
|
||||
name: '标准范围',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: [120, 130, 140, 150, 160, 170]
|
||||
}]
|
||||
};
|
||||
|
||||
chart.setOption(option);
|
||||
return chart;
|
||||
}
|
||||
|
||||
Page({
|
||||
onShareAppMessage: function (res) {
|
||||
@ -152,15 +32,26 @@ Page({
|
||||
heightChart: null,
|
||||
weightChart: null,
|
||||
carList: [],
|
||||
carLength: 0
|
||||
},
|
||||
carLength: 0,
|
||||
|
||||
},
|
||||
standardHeight:[],
|
||||
standardWeight:[],
|
||||
// Helper function to strip HTML tags and convert to plain text
|
||||
stripHtml(html) {
|
||||
if (!html) return '';
|
||||
return html.replace(/<[^>]*>/g, '');
|
||||
},
|
||||
|
||||
async getPersonalInfo() {
|
||||
const info = await request('patient/basic/0').then((res) => res);
|
||||
if(info.sex == 1){
|
||||
this.standardHeight = heightList.boy
|
||||
this.standardWeight = weightList.boy
|
||||
}else{
|
||||
this.standardHeight = heightList.girl
|
||||
this.standardWeight = weightList.girl
|
||||
}
|
||||
},
|
||||
async getSfList(){
|
||||
|
||||
this.followPlans()
|
||||
@ -211,7 +102,7 @@ Page({
|
||||
page: 1,
|
||||
page_size: 10
|
||||
})
|
||||
const carList = res3.list.map(item => {
|
||||
const carList = res3.list.slice(0, 3).map(item => {
|
||||
item.detail = JSON.parse(item.detail)
|
||||
return item
|
||||
})
|
||||
@ -244,180 +135,28 @@ Page({
|
||||
res.list.forEach(item => {
|
||||
heightData.push(item.height)
|
||||
weightData.push(item.weight)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
this.setData({
|
||||
heightData,
|
||||
weightData
|
||||
}, () => {
|
||||
this.initCharts();
|
||||
weightData,
|
||||
|
||||
});
|
||||
this.initHeightChart()
|
||||
},
|
||||
|
||||
initCharts() {
|
||||
// 初始化身高图表
|
||||
if (!this.heightChart) {
|
||||
const chart1 = this.selectComponent('#mychart-dom-height');
|
||||
if (chart1) {
|
||||
chart1.init((canvas, width, height, dpr) => {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
|
||||
const option = {
|
||||
title: {
|
||||
text: '',
|
||||
left: 'left',
|
||||
fontSize: 6
|
||||
},
|
||||
legend: {
|
||||
data: ['实际身高', '标准范围'],
|
||||
bottom: 0,
|
||||
left: 'center',
|
||||
z: 100
|
||||
},
|
||||
grid: {
|
||||
containLabel: true,
|
||||
top: '5%',
|
||||
left: '1%',
|
||||
right: '5%',
|
||||
bottom: '10%'
|
||||
},
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['出生', '1月', '2月', '3月', '4月', '5月'],
|
||||
},
|
||||
yAxis: {
|
||||
x: 'center',
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
type: 'dashed'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '实际身高',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: this.data.heightData
|
||||
}, {
|
||||
name: '标准范围',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: [120, 130, 140, 150, 160, 170]
|
||||
}]
|
||||
};
|
||||
|
||||
chart.setOption(option);
|
||||
this.heightChart = chart;
|
||||
return chart;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化体重图表
|
||||
if (!this.weightChart) {
|
||||
const chart2 = this.selectComponent('#mychart-dom-weight');
|
||||
if (chart2) {
|
||||
chart2.init((canvas, width, height, dpr) => {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
|
||||
const option = {
|
||||
title: {
|
||||
text: '',
|
||||
left: 'left',
|
||||
fontSize: 12
|
||||
},
|
||||
legend: {
|
||||
data: ['实际体重', '标准范围'],
|
||||
bottom: 0,
|
||||
left: 'center',
|
||||
z: 100
|
||||
},
|
||||
grid: {
|
||||
containLabel: true,
|
||||
top: '5%',
|
||||
left: '1%',
|
||||
right: '5%',
|
||||
bottom: '10%'
|
||||
},
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['出生', '1月', '2月', '3月', '4月', '5月'],
|
||||
},
|
||||
yAxis: {
|
||||
x: 'center',
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
type: 'dashed'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '实际体重',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: this.data.weightData
|
||||
}, {
|
||||
name: '标准范围',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: [120, 130, 140, 150, 160, 170]
|
||||
}]
|
||||
};
|
||||
|
||||
chart.setOption(option);
|
||||
this.weightChart = chart;
|
||||
return chart;
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(){
|
||||
this.getSfList()
|
||||
setTimeout(() => {
|
||||
this.getChartData().then(() => {
|
||||
if (this.data.activeIndex === 0) {
|
||||
this.initHeightChart();
|
||||
} else {
|
||||
this.initWeightChart();
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
this.getChartData()
|
||||
this.getPersonalInfo()
|
||||
},
|
||||
|
||||
onReady() {
|
||||
// setTimeout(() => {
|
||||
// this.getChartData().then(() => {
|
||||
// if (this.data.activeIndex === 0) {
|
||||
// this.initHeightChart();
|
||||
// } else {
|
||||
// this.initWeightChart();
|
||||
// }
|
||||
// });
|
||||
// }, 500);
|
||||
|
||||
},
|
||||
|
||||
changeChart(e) {
|
||||
@ -475,6 +214,11 @@ Page({
|
||||
|
||||
// 初始化身高图表
|
||||
initHeightChart() {
|
||||
const standardHeight = this.standardHeight
|
||||
const standardLower = standardHeight.map(item => item[0]);
|
||||
const standardUpper = standardHeight.map(item => item[1]);
|
||||
const standardRange = standardUpper.map((up, i) => up - standardLower[i]);
|
||||
|
||||
const chartComp = this.selectComponent('#mychart-dom-height');
|
||||
if (chartComp) {
|
||||
chartComp.init((canvas, width, height, dpr) => {
|
||||
@ -482,14 +226,44 @@ Page({
|
||||
canvas.setChart(chart);
|
||||
chart.setOption({
|
||||
title: { text: '', left: 'left', fontSize: 6 },
|
||||
legend: { data: ['实际身高', '标准范围'], bottom: 0, left: 'center', z: 100 },
|
||||
grid: { containLabel: true, top: '5%', left: '1%', right: '5%', bottom: '10%' },
|
||||
tooltip: { show: true, trigger: 'axis' },
|
||||
xAxis: { type: 'category', boundaryGap: false, data: ['出生', '1月', '2月', '3月', '4月', '5月'] },
|
||||
grid: { containLabel: true, top: '5%', left: '1%', right: '5%', bottom: '3%' },
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
formatter: function (params) {
|
||||
const param = params[0];
|
||||
return `${param.axisValue}\n${param.seriesName}: ${param.value} cm`;
|
||||
}
|
||||
},
|
||||
xAxis: { type: 'category', boundaryGap: false, data: ['出生', '1月', '2月', '3月', '4月', '5月', '6月'] },
|
||||
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } },
|
||||
series: [
|
||||
{ name: '实际身高', type: 'line', smooth: true, data: this.data.heightData },
|
||||
{ name: '标准范围', type: 'line', smooth: true, data: [120, 130, 140, 150, 160, 170] }
|
||||
{
|
||||
name: '实际身高',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: this.data.heightData
|
||||
},
|
||||
{
|
||||
name: '标准下界',
|
||||
type: 'line',
|
||||
symbol: 'none',
|
||||
data: standardLower,
|
||||
lineStyle: { opacity: 0 },
|
||||
stack: '标准范围',
|
||||
areaStyle: { opacity: 0 },
|
||||
tooltip: { show: false }
|
||||
},
|
||||
{
|
||||
name: '标准范围',
|
||||
type: 'line',
|
||||
symbol: 'none',
|
||||
data: standardRange,
|
||||
lineStyle: { opacity: 0 },
|
||||
stack: '标准范围',
|
||||
areaStyle: { color: 'rgba(135,206,250,0.3)' },
|
||||
tooltip: { show: false }
|
||||
}
|
||||
]
|
||||
});
|
||||
return chart;
|
||||
@ -499,21 +273,56 @@ Page({
|
||||
|
||||
// 初始化体重图表
|
||||
initWeightChart() {
|
||||
const standardWeight = this.standardWeight
|
||||
const standardLower = standardWeight.map(item => item[0]);
|
||||
const standardUpper = standardWeight.map(item => item[1]);
|
||||
const standardRange = standardUpper.map((up, i) => up - standardLower[i]);
|
||||
|
||||
const chartComp = this.selectComponent('#mychart-dom-weight');
|
||||
if (chartComp) {
|
||||
chartComp.init((canvas, width, height, dpr) => {
|
||||
const chart = echarts.init(canvas, null, { width, height, devicePixelRatio: dpr });
|
||||
canvas.setChart(chart);
|
||||
chart.setOption({
|
||||
title: { text: '', left: 'left', fontSize: 12 },
|
||||
legend: { data: ['实际体重', '标准范围'], bottom: 0, left: 'center', z: 100 },
|
||||
grid: { containLabel: true, top: '5%', left: '1%', right: '5%', bottom: '10%' },
|
||||
tooltip: { show: true, trigger: 'axis' },
|
||||
xAxis: { type: 'category', boundaryGap: false, data: ['出生', '1月', '2月', '3月', '4月', '5月'] },
|
||||
title: { text: '', left: 'left', fontSize: 6 },
|
||||
grid: { containLabel: true, top: '5%', left: '1%', right: '5%', bottom: '3%' },
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
formatter: function (params) {
|
||||
const param = params[0];
|
||||
return `${param.axisValue}\n${param.seriesName}: ${param.value} cm`;
|
||||
}
|
||||
},
|
||||
xAxis: { type: 'category', boundaryGap: false, data: ['出生', '1月', '2月', '3月', '4月', '5月', '6月'] },
|
||||
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } },
|
||||
series: [
|
||||
{ name: '实际体重', type: 'line', smooth: true, data: this.data.weightData },
|
||||
{ name: '标准范围', type: 'line', smooth: true, data: [120, 130, 140, 150, 160, 170] }
|
||||
{
|
||||
name: '实际体重',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: this.data.weightData
|
||||
},
|
||||
{
|
||||
name: '标准下界',
|
||||
type: 'line',
|
||||
symbol: 'none',
|
||||
data: standardLower,
|
||||
lineStyle: { opacity: 0 },
|
||||
stack: '标准范围',
|
||||
areaStyle: { opacity: 0 },
|
||||
tooltip: { show: false }
|
||||
},
|
||||
{
|
||||
name: '标准范围',
|
||||
type: 'line',
|
||||
symbol: 'none',
|
||||
data: standardRange,
|
||||
lineStyle: { opacity: 0 },
|
||||
stack: '标准范围',
|
||||
areaStyle: { color: 'rgba(135,206,250,0.3)' },
|
||||
tooltip: { show: false }
|
||||
}
|
||||
]
|
||||
});
|
||||
return chart;
|
||||
|
||||
@ -1,17 +1,11 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "首页",
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"t-tabs": "tdesign-miniprogram/tabs/tabs",
|
||||
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
|
||||
"t-swiper": "tdesign-miniprogram/swiper/swiper",
|
||||
"t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav",
|
||||
"t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh",
|
||||
"t-message": "tdesign-miniprogram/message/message",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"nav": "/components/nav",
|
||||
"card": "/components/card",
|
||||
"ec-canvas": "../../ec-canvas/ec-canvas"
|
||||
"ec-canvas": "../../ec-canvas/ec-canvas",
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar"
|
||||
}
|
||||
}
|
||||
|
||||