@ -1,74 +1,101 @@ |
|||
|
|||
// 通过患者ID查询患者详情
|
|||
export function upload(params){ |
|||
return uni.$u.http.post('/common/upload', params) |
|||
export function upload(params) { |
|||
return uni.$u.http.post("/common/upload", params); |
|||
} |
|||
|
|||
// 登录
|
|||
export function userlogin(params){ |
|||
return uni.$u.http.post('/login', params) |
|||
export function userlogin(params) { |
|||
return uni.$u.http.post("/login", params); |
|||
} |
|||
// 获取验证码
|
|||
export function getSmsCode(params){ |
|||
return uni.$u.http.get('/user/getSmsCode', params) |
|||
export function getSmsCode(params) { |
|||
return uni.$u.http.get("/user/getSmsCode", params); |
|||
} |
|||
// 用户用户信息
|
|||
export function userInfo(params){ |
|||
return uni.$u.http.get('/getInfo', params) |
|||
export function userInfo(params) { |
|||
return uni.$u.http.get("/getInfo", params); |
|||
} |
|||
// 患者列表
|
|||
export function patientQuery(params){ |
|||
return uni.$u.http.post('/patient/query', params) |
|||
export function patientQuery(params) { |
|||
return uni.$u.http.post("/patient/query", params); |
|||
} |
|||
// 查询统计数量
|
|||
export function queryNum(params){ |
|||
return uni.$u.http.post('/patient/queryNum', params) |
|||
export function queryNum(params) { |
|||
return uni.$u.http.post("/patient/queryNum", params); |
|||
} |
|||
// 新增患者
|
|||
export function queryAdd(params){ |
|||
return uni.$u.http.post('/patient/add', params) |
|||
export function queryAdd(params) { |
|||
return uni.$u.http.post("/patient/add", params); |
|||
} |
|||
// 新增患者
|
|||
export function queryUpd(params){ |
|||
return uni.$u.http.post('/patient/upd', params) |
|||
export function queryUpd(params) { |
|||
return uni.$u.http.post("/patient/upd", params); |
|||
} |
|||
// 通过患者ID查询患者详情
|
|||
export function queryById(params){ |
|||
return uni.$u.http.post('/patient/queryById', params) |
|||
export function queryById(params) { |
|||
return uni.$u.http.post("/patient/queryById", params); |
|||
} |
|||
// 通过患者ID获取测评ID
|
|||
export function patientRegist(params){ |
|||
return uni.$u.http.post('/patient/regist', params) |
|||
export function patientRegist(params) { |
|||
return uni.$u.http.post("/patient/regist", params); |
|||
} |
|||
// 评估结果查询
|
|||
export function pgQuery(params){ |
|||
return uni.$u.http.post('/evaluation/pg/query', params) |
|||
export function pgQuery(params) { |
|||
return uni.$u.http.post("/evaluation/pg/query", params); |
|||
} |
|||
// 评估信息提交
|
|||
export function pgSubmit(params){ |
|||
return uni.$u.http.post('/evaluation/pg/submit', params) |
|||
export function pgSubmit(params) { |
|||
return uni.$u.http.post("/evaluation/pg/submit", params); |
|||
} |
|||
// AD8结果查询
|
|||
export function ad8Query(params){ |
|||
return uni.$u.http.post('/evaluation/ad8/query', params) |
|||
export function ad8Query(params) { |
|||
return uni.$u.http.post("/evaluation/ad8/query", params); |
|||
} |
|||
// AD8信息提交
|
|||
export function ad8Submit(params){ |
|||
return uni.$u.http.post('/evaluation/ad8/submit', params) |
|||
export function ad8Submit(params) { |
|||
return uni.$u.http.post("/evaluation/ad8/submit", params); |
|||
} |
|||
// 登记详情接口
|
|||
export function detailSubmit(params){ |
|||
return uni.$u.http.post('/evaluation/detail/submit', params) |
|||
export function detailSubmit(params) { |
|||
return uni.$u.http.post("/evaluation/detail/submit", params); |
|||
} |
|||
// 登记详情接口
|
|||
export function detailQuery(params){ |
|||
return uni.$u.http.post('/evaluation/detail/query', params) |
|||
export function detailQuery(params) { |
|||
return uni.$u.http.post("/evaluation/detail/query", params); |
|||
} |
|||
// 提交签名
|
|||
export function complete(params){ |
|||
return uni.$u.http.post('/evaluation/complete', params) |
|||
export function complete(params) { |
|||
return uni.$u.http.post("/evaluation/complete", params); |
|||
} |
|||
// 查询签名
|
|||
export function completeById(params){ |
|||
return uni.$u.http.post('/evaluation/queryById', params) |
|||
} |
|||
export function completeById(params) { |
|||
return uni.$u.http.post("/evaluation/queryById", params); |
|||
} |
|||
|
|||
// ------ 智能家居 ------
|
|||
// 登录
|
|||
export function login(params) { |
|||
return uni.$u.http.post("/app/user/login", params); |
|||
} |
|||
// 根据项目key查找项目id
|
|||
export function queryProjectInfoByKey(params) { |
|||
return uni.$u.http.get( |
|||
`/app/device/queryProjectInfoByKey?projectKey=${params.projectKey}` |
|||
); |
|||
} |
|||
// 根据项目id查找设备列表
|
|||
export function deviceList(params) { |
|||
return uni.$u.http.get(`/app/device/list?projectId=${params.projectId}`); |
|||
} |
|||
// 获取设备信息
|
|||
export function attributes(params) { |
|||
return uni.$u.http.get(`/app/device/attributes?deviceId=${params.deviceId}`); |
|||
} |
|||
// 下发属性
|
|||
export function sendAttribute(params) { |
|||
return uni.$u.http.post("/app/device/sendAttribute", params); |
|||
} |
|||
// 下发命令
|
|||
export function sendCommand(params) { |
|||
return uni.$u.http.post("/app/device/sendCommand", params); |
|||
} |
|||
|
@ -1,3 +1,3 @@ |
|||
module.exports = { |
|||
baseUrl: 'http://116.204.98.79:40010/elderlyHealth/admin/' |
|||
} |
|||
baseUrl: "http://121.37.81.216/multimodal/", |
|||
}; |
|||
|
@ -0,0 +1,831 @@ |
|||
<template> |
|||
<view class="container" style="min-height:100vh"> |
|||
<view class="header" @click="handleBack"> |
|||
<image class="header-back-img" src="../../imgs/back.png"></image> |
|||
{{ registerType == 1 ? '失能老年人医养结合和健康服务登记' : '高龄老人医养结合服务登记'}} |
|||
<view></view> |
|||
</view> |
|||
<view class="view-step"> |
|||
<view> |
|||
<image src="../../imgs/icon_wanc.png" class="step-img"></image> |
|||
<p style="color:#3D3D3D">信息</p> |
|||
</view> |
|||
<h1></h1> |
|||
<view> |
|||
<image src="../../imgs/icon_wanc.png" class="step-img"></image> |
|||
<p style="color:#3D3D3D">评估</p> |
|||
</view> |
|||
<h1></h1> |
|||
<view> |
|||
<image src="../../imgs/icon_wanc.png" class="step-img"></image> |
|||
<p style="color:#3D3D3D">筛查</p> |
|||
</view> |
|||
<h1></h1> |
|||
<view> |
|||
<image src="../../imgs/icon_wanc.png" class="step-img"></image> |
|||
<p style="color:#3D3D3D;width: 40px;flex-shrink: 0;">高血压</p> |
|||
</view> |
|||
<h1></h1> |
|||
<view> |
|||
<image src="../../imgs/icon_moren.png" class="step-img"></image> |
|||
<p>登记</p> |
|||
</view> |
|||
<h1></h1> |
|||
<view> |
|||
<image src="../../imgs/icon_moren.png" class="step-img"></image> |
|||
<p>确认</p> |
|||
</view> |
|||
</view> |
|||
<view style="flex: 1; position: relative;margin-top: 20px;"> |
|||
<scroll-view class="view-scroll" scroll-y="true" :lower-threshold="50" scroll-with-animation > |
|||
<view class="view-modal"> |
|||
<view class="slot-content"> |
|||
<h1 class="view-modal-h1">血压分类与心血管危险分层</h1> |
|||
<!-- <p class="view-modal-p">AD8筛查,0~1分者为认知正常;>1存在认知障碍风险。</p> --> |
|||
<view class="view-modal-ul"> |
|||
<view class="view-modal-li" style="margin-bottom: 0;"> |
|||
<view class="modal-li-p" style="display: flex;justify-content: space-between;align-items: center;">性别 |
|||
<view class="modal-li-options"> |
|||
<u-radio-group v-model="form.sex" active-color="#ff981f"> |
|||
<view class="li-options-item" style="margin-right: 10px;margin-bottom: 0;" > |
|||
<u-radio |
|||
:wrap="true" |
|||
:label-disabled="false" |
|||
:disabled="true" |
|||
name="0" |
|||
label="男" |
|||
> |
|||
</u-radio> |
|||
</view> |
|||
<view class="li-options-item" style="margin-right: 10px;margin-bottom: 0;" > |
|||
<u-radio |
|||
:wrap="true" |
|||
:label-disabled="false" |
|||
:disabled="true" |
|||
name="1" |
|||
label="女" |
|||
> |
|||
</u-radio> |
|||
</view> |
|||
</u-radio-group> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
<view class="view-form-item"> |
|||
<view class="view-modal-li view-modal-li1" > |
|||
<view class="modal-li-options" style="margin-bottom: 14px;"> |
|||
<p class="modal-li-p" style="margin-bottom: 0;">年龄</p> |
|||
<view> |
|||
<u-input |
|||
class="form-item-input form-item-input_name" |
|||
placeholder="请填写" |
|||
v-model="form['DJ02_4']" |
|||
></u-input> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="view-modal-li" > |
|||
<p class="modal-li-p">基于诊室血压的血压分类和高血压分级</p> |
|||
<view class="modal-li-options"> |
|||
<u-radio-group |
|||
v-model="form.aaa" |
|||
placement="column" |
|||
active-color="#ff981f" |
|||
> |
|||
<view class="li-options-item" style="margin-right: 10px;" > |
|||
<u-radio |
|||
:customStyle="{marginBottom: '8px'}" |
|||
name="正常血压" |
|||
label="正常血压" |
|||
> |
|||
</u-radio> |
|||
</view> |
|||
<view class="li-options-item" style="margin-right: 10px;" > |
|||
<u-radio |
|||
:customStyle="{marginBottom: '8px'}" |
|||
name="正常高值" |
|||
label="正常高值" |
|||
> |
|||
</u-radio> |
|||
</view> |
|||
<view class="li-options-item" style="margin-right: 10px;" > |
|||
<u-radio |
|||
:customStyle="{marginBottom: '8px'}" |
|||
name="1级高血压" |
|||
label="1级高血压" |
|||
> |
|||
</u-radio> |
|||
</view> |
|||
<view class="li-options-item" style="margin-right: 10px;" > |
|||
<u-radio |
|||
:customStyle="{marginBottom: '8px'}" |
|||
name="2级高血压" |
|||
label="2级高血压" |
|||
> |
|||
</u-radio> |
|||
</view> |
|||
<view class="li-options-item" style="margin-right: 10px;" > |
|||
<u-radio |
|||
:customStyle="{marginBottom: '8px'}" |
|||
name="3级高血压" |
|||
label="3级高血压" |
|||
> |
|||
</u-radio> |
|||
</view> |
|||
<view class="li-options-item" style="margin-right: 10px;" > |
|||
<u-radio |
|||
:customStyle="{marginBottom: '8px'}" |
|||
name="单纯收缩期高血压" |
|||
label="单纯收缩期高血压" |
|||
> |
|||
</u-radio> |
|||
</view> |
|||
<view class="li-options-item" style="margin-right: 10px;" > |
|||
<u-radio |
|||
:customStyle="{marginBottom: '8px'}" |
|||
name="单纯舒张期高血压" |
|||
label="单纯舒张期高血压" |
|||
> |
|||
</u-radio> |
|||
</view> |
|||
</u-radio-group> |
|||
</view> |
|||
</view> |
|||
<view v-for="(i,ind) in testList"> |
|||
<h1 style="font-size: 22px;margin-bottom: 10px;" v-if="i.title">{{i.title}}</h1> |
|||
<view class="view-modal-li" v-for="(item,index) in i.list"> |
|||
<h3 style="font-size: 20px;margin-bottom: 10px;" v-if="item.title">{{item.title}}</h3> |
|||
<p class="modal-li-p" >{{item.name}}</p> |
|||
<view class="modal-li-options" v-if="item.type == 'checkbox'"> |
|||
<u-checkbox-group |
|||
v-model="form[item.code]" |
|||
placement="column" |
|||
active-color="#ff981f" |
|||
> |
|||
<view class="li-options-item" style="margin-right: 10px;" v-for="(row, index) in item.options" :key="index"> |
|||
<u-checkbox |
|||
:customStyle="{marginBottom: '8px'}" |
|||
:name="row.score" |
|||
:label="row.name" |
|||
> |
|||
</u-checkbox> |
|||
</view> |
|||
</u-checkbox-group> |
|||
</view> |
|||
<view class="modal-li-options" v-else> |
|||
<u-radio-group v-model="form[item.code]" active-color="#ff981f"> |
|||
<view class="li-options-item" style="margin-right: 10px;" v-for="(row, index) in item.options" :key="index"> |
|||
<u-radio |
|||
:wrap="true" |
|||
:label-disabled="false" |
|||
:disabled="row.disabled1" |
|||
@change="radioChange(item,row)" |
|||
:name="row.score" |
|||
:label="row.name" |
|||
> |
|||
<!-- <span>{{row.name}}</span> --> |
|||
</u-radio> |
|||
</view> |
|||
</u-radio-group> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
</view> |
|||
<view class="view-modal-but" @click="handleSubmit">下一步</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import {ad8Submit, ad8Query } from '@/common/api.js'; |
|||
export default { |
|||
data() { |
|||
return { |
|||
testList: [ |
|||
{ |
|||
title:'危险因素', |
|||
list:[ |
|||
{ |
|||
name: '1. 高血压(1-3级)', |
|||
code:'q222', |
|||
options:[{ |
|||
name:'1级', |
|||
disabled: false, |
|||
disabled1:true, |
|||
score: '1' |
|||
},{ |
|||
name:'2级', |
|||
disabled: false, |
|||
disabled1:true, |
|||
score: '2' |
|||
},{ |
|||
name:'3级', |
|||
disabled: false, |
|||
disabled1:true, |
|||
score: '3' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '2. 年龄', |
|||
code:'q333', |
|||
options:[{ |
|||
name:'男性>55岁', |
|||
disabled: false, |
|||
disabled1:true, |
|||
score: '1' |
|||
},{ |
|||
name:'女性>65岁', |
|||
disabled: false, |
|||
disabled1:true, |
|||
score: '2' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '3.吸烟或被动吸烟', |
|||
code:'q1', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '4. 糖耐量受损(2h血糖7.8~11.0mmol/L)和/或空腹血糖异常(6.1~6.9mmol/L)', |
|||
code:'q2', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '5. 血脂异常(总胆固醇≥5.2mmol/L或LDL-C≥3.4mmol/L或 HDL-C<1.0mmol/L)', |
|||
code:'q3', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '6. 早发心血管疾病家族史(一级亲属发病年龄<50岁)', |
|||
code:'q4', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '7. 腹型肥胖(腰围:男性≥90cm,女性≥85cm)或肥胖(体重指数≥28kg/m²)', |
|||
code:'q5', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '8. 高同型半胱氨酸血症', |
|||
code:'q6', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '9. 高尿酸血症(血尿酸:男性≥420μmol/L,女性≥360μmol/L)', |
|||
code:'q7', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '10. 心率增快(静息心率>80次/min)', |
|||
code:'q8', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
title:'靶器官损害', |
|||
list:[ |
|||
{ |
|||
name: '1. 左心室肥厚:心电图Sokolow-Lyon电压>3.8mV或Cornell乘积>244mV·ms,或超声心动图LVMI男≥109g/m²,女≥105g/m²', |
|||
code:'q9', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '2. 颈动脉超声IMT≥0.9mm或动脉粥样斑块', |
|||
code:'q10', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '3. cfPWV≥10m/s或baPWV≥18m/s', |
|||
code:'q11', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '4. ABI<0.9', |
|||
code:'q12', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '5. eGFR30~59mL/(min·1.73m²)或血清肌酐轻度升高(男性115~133μmol/L,女性107~124μmol/L)', |
|||
code:'q13', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '6. 微量白蛋白尿:尿白蛋白与肌酐比值30~300mg/g或白蛋白排泌率30~300mg/24h', |
|||
code:'q14', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
title:'临床并发症与合并症', |
|||
list:[ |
|||
{ |
|||
name: '1. 脑血管病', |
|||
code:'q15', |
|||
type:'checkbox', |
|||
options:[{ |
|||
name:'脑出血', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'缺血性脑卒中', |
|||
disabled: false, |
|||
score: '2' |
|||
},{ |
|||
name:'短暂性脑缺血发作', |
|||
disabled: false, |
|||
score: '3' |
|||
}] |
|||
}, |
|||
|
|||
{ |
|||
name: '2. 心脏疾病', |
|||
code:'q16', |
|||
type:'checkbox', |
|||
options:[{ |
|||
name:'心肌梗死史', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'心绞痛', |
|||
disabled: false, |
|||
score: '2' |
|||
},{ |
|||
name:'冠状动脉血运重建', |
|||
disabled: false, |
|||
score: '3' |
|||
},{ |
|||
name:'慢性心力衰竭', |
|||
disabled: false, |
|||
score: '4' |
|||
},{ |
|||
name:'房颤', |
|||
disabled: false, |
|||
score: '5' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '3. 肾脏疾病', |
|||
code:'q17', |
|||
type:'checkbox', |
|||
options:[{ |
|||
name:'糖尿病肾病', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'肾功能受损', |
|||
disabled: false, |
|||
score: '2' |
|||
},{ |
|||
name:'血肌酐升高', |
|||
disabled: false, |
|||
score: '0' |
|||
},{ |
|||
name:'蛋白尿', |
|||
disabled: false, |
|||
score: '3' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '4. 外周血管疾病', |
|||
code:'q18', |
|||
type:'radio', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
}, |
|||
{ |
|||
name: '5. 视网膜病变', |
|||
code:'q18', |
|||
type:'checkbox', |
|||
options:[{ |
|||
name:'眼底出血或渗出', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'视乳头水肿', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
},{ |
|||
name: '6. 糖尿病', |
|||
code:'q20', |
|||
type:'radio', |
|||
options:[{ |
|||
name:'是', |
|||
disabled: false, |
|||
score: '1' |
|||
},{ |
|||
name:'否', |
|||
disabled: false, |
|||
score: '0' |
|||
}] |
|||
} |
|||
], |
|||
} |
|||
], |
|||
form:{ |
|||
"evaId": "", |
|||
"reslut": "", |
|||
"q1":"", |
|||
"q2":"", |
|||
"q3":"", |
|||
"q4":"", |
|||
"q5":"", |
|||
"q6":"", |
|||
"q7":"", |
|||
"q8":"", |
|||
"q111":"3", |
|||
"q222":"1", |
|||
"q333":"1", |
|||
"score":"", |
|||
"sex":"0", |
|||
}, |
|||
evaId:"" |
|||
} |
|||
}, |
|||
methods: { |
|||
// 提交患者评估 |
|||
async handleSubmit() { |
|||
// 0~1分者为认知正常;>1存在认知障碍风险 |
|||
if (this.form.score <= 1) { |
|||
this.form.result = '认知正常'; |
|||
} else { |
|||
this.form.result = '存在认知障碍风险'; |
|||
} |
|||
// 以下为提交表单的伪代码,根据实际需求进行实现 |
|||
const res = await ad8Submit(this.form); |
|||
if (res.code == 200) { |
|||
uni.navigateTo({ url: `/pages/healthService/healthService4?evaId=${this.evaId}&djType=${this.registerType}` }); |
|||
} |
|||
}, |
|||
// 查询评价结果 |
|||
async getpgQuery(){ |
|||
const res = await ad8Query({evaId: this.evaId}) |
|||
if(res.code == 200){ |
|||
this.form = res.data || { |
|||
"evaId": this.evaId, |
|||
"reslut": "", |
|||
"q1":"", |
|||
"q2":"", |
|||
"q3":"", |
|||
"q4":"", |
|||
"q5":"", |
|||
"q6":"", |
|||
"q7":"", |
|||
"q8":"", |
|||
"score":"" |
|||
} |
|||
|
|||
} |
|||
}, |
|||
// 选中某个单选框时,由radio时触发 |
|||
radioChange(_item,row) { |
|||
this.form[_item.code] = row.score |
|||
let data = JSON.parse(JSON.stringify(this.form)) |
|||
let totalScore = 0; // 初始化总分为 0 |
|||
// 遍历 q1 到 q8,累加它们的值到总分中 |
|||
for (let i = 1; i <= 8; i++) { |
|||
const questionKey = `q${i}`; // 构建属性名,如 q1, q2, ... q8 |
|||
const questionValue = this.form[questionKey]; // 获取对应属性的值 |
|||
totalScore += questionValue - 0; |
|||
} |
|||
// 将计算后的总分存储到 form.score 中 |
|||
this.form.score = totalScore; |
|||
}, |
|||
handleChange(){ |
|||
console.log(1111) |
|||
}, |
|||
// 返回上一步 |
|||
handleBack(){ |
|||
uni.navigateBack({ |
|||
delta: 1, |
|||
}); |
|||
}, |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
async mounted (){ |
|||
}, |
|||
onLoad(data) { |
|||
this.evaId = data.evaId |
|||
this.registerType = data.djType |
|||
console.log('this.registerType',this.registerType) |
|||
this.getpgQuery() |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.view-modal-li1{ |
|||
|
|||
display: flex; |
|||
justify-content: space-between; |
|||
line-height: 52px; |
|||
.modal-li-p{ |
|||
font-size: 15px; |
|||
color: #3D3D3D; |
|||
margin-bottom: 0; |
|||
width: 100px; |
|||
} |
|||
.modal-li-options{ |
|||
margin-bottom: 0 !important; |
|||
} |
|||
view{ |
|||
flex:1; |
|||
display: flex; |
|||
} |
|||
span{ |
|||
font-size: 15px; |
|||
color: #3D3D3D; |
|||
} |
|||
} |
|||
.view-modal-but{ |
|||
height: 45px; |
|||
background: #FF981F; |
|||
border-radius: 23px; |
|||
font-size: 15px; |
|||
color: #FFFFFF; |
|||
line-height: 45px; |
|||
text-align: center; |
|||
margin-top: 14px; |
|||
font-size: 15px; |
|||
color: #FFFFFF; |
|||
} |
|||
.view-modal-ul{ |
|||
.view-modal-li{ |
|||
border-bottom: 1px solid #EDEDED; |
|||
margin-bottom: 14px; |
|||
//padding: 0 14px ; |
|||
// padding-bottom: 10px; |
|||
} |
|||
} |
|||
.li-options-item{ |
|||
margin-bottom: 10px; |
|||
// span{ |
|||
// font-size: 15px; |
|||
// color: #555555; |
|||
// } |
|||
} |
|||
.view-modal{ |
|||
padding: 14px; |
|||
background: #fff; |
|||
border-radius: 10px; |
|||
.view-modal-h1{ |
|||
font-size: 20px; |
|||
color: #3D3D3D; |
|||
text-align: center; |
|||
margin-bottom: 10px; |
|||
} |
|||
.modal-li-p{ |
|||
font-size: 17px; |
|||
color: #3D3D3D; |
|||
margin-bottom: 10px; |
|||
// font-weight: bold; |
|||
} |
|||
.view-modal-p{ |
|||
font-size: 14px; |
|||
color: #999999; |
|||
margin: 10px 0; |
|||
} |
|||
} |
|||
.view-form1{ |
|||
margin-top: 20px; |
|||
.view-form-li1{ |
|||
p{ |
|||
flex:1 |
|||
} |
|||
.form-li-right{ |
|||
view{ |
|||
width: 100%; |
|||
text-align: right; |
|||
color:#FF981F; |
|||
line-height: 52px; |
|||
|
|||
} |
|||
.li-right-unit{ |
|||
font-size: 16px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.view-form{ |
|||
padding: 14px; |
|||
background: #fff; |
|||
.view-form-title{ |
|||
font-size: 16px; |
|||
color:#FF981F; |
|||
margin-bottom: 10px; |
|||
} |
|||
.view-form-ul{ |
|||
.view-form-li{ |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
border-bottom: 1px solid #E2E2E2; |
|||
.form-li-right{ |
|||
flex: 1; |
|||
display: flex; |
|||
align-items: center; |
|||
.form-li-input{ |
|||
flex: 1; |
|||
border: none; |
|||
text-align: right; |
|||
height: 40px; |
|||
} |
|||
} |
|||
p{ |
|||
font-size: 18px; |
|||
width: 120px; |
|||
} |
|||
} |
|||
// .view-form-li:last-child{ |
|||
// border: none; |
|||
// } |
|||
} |
|||
} |
|||
.uploat_img{ |
|||
padding: 14px 0 0 22px; |
|||
background: #fff; |
|||
border-radius: 8px; |
|||
margin-bottom: 10px ; |
|||
.uploat_img-ul{ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
.uploat_img-li{ |
|||
width: 90px !important; |
|||
height: 90px !important; |
|||
border-radius: 10px !important; |
|||
border: 1px dashed #CACACA; |
|||
margin-right: 18px; |
|||
margin-bottom: 14px; |
|||
} |
|||
} |
|||
|
|||
p{ |
|||
font-size: 16px; |
|||
color:#FF981F; |
|||
margin-bottom: 10px; |
|||
} |
|||
} |
|||
|
|||
.header{ |
|||
font-size: 16px; |
|||
color: #3D3D3D; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
.header-back-img{ |
|||
width: 18px; |
|||
height: 18px; |
|||
} |
|||
view{ |
|||
width: 20px; |
|||
} |
|||
} |
|||
.container{ |
|||
display: flex; |
|||
flex-direction: column; |
|||
box-sizing: border-box; |
|||
padding: 46px 16px 20px 16px; |
|||
background: linear-gradient(130deg,#ffe8cc 8%,#fcfcfc,#fcfcfc,#fcfcfc); |
|||
} |
|||
</style> |
|||
<style> |
|||
.u-modal__button-group__wrapper{ |
|||
display: none !important; |
|||
} |
|||
.view-scroll { |
|||
height: 100%; |
|||
position: absolute; |
|||
} |
|||
.u-radio-group--row{ |
|||
flex-wrap: wrap; |
|||
} |
|||
|
|||
</style> |
After Width: | Height: | Size: 5.8 KiB |
@ -0,0 +1,102 @@ |
|||
<template> |
|||
<view class="container"> |
|||
<!-- 头部标题 --> |
|||
<!-- <view class="title">STM32智能AI家居系统</view> --> |
|||
<u-navbar class="navbar" title="阈值设定" fixed @leftClick="handleBack"> |
|||
</u-navbar> |
|||
<view class="view-data"> |
|||
<u--input |
|||
type="number" |
|||
placeholder="请输入内容" |
|||
border="surround" |
|||
v-model="value" |
|||
></u--input> |
|||
<view class="but-box"> |
|||
<u-button |
|||
@click="handleSubmit" |
|||
type="primary" |
|||
:plain="true" |
|||
text="确 认" |
|||
></u-button> |
|||
</view> |
|||
</view> |
|||
<u-toast ref="uToast"></u-toast> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { sendAttribute } from "@/common/api.js"; |
|||
export default { |
|||
data() { |
|||
return { |
|||
value: 30, |
|||
name: "", |
|||
deviceId: "", |
|||
}; |
|||
}, |
|||
methods: { |
|||
handleBack() { |
|||
console.log("返回"); |
|||
uni.navigateBack({ |
|||
delta: 1, |
|||
}); |
|||
}, |
|||
/** 下发属性 */ |
|||
async handleSubmit() { |
|||
const res = await sendAttribute({ |
|||
deviceId: this.deviceId, // 设备id |
|||
// 阈值JSON字符串 |
|||
attributeAndValues: [ |
|||
{ |
|||
attributeIdentifier: this.name, |
|||
attributeValue: this.value, |
|||
}, |
|||
], |
|||
}); |
|||
const { data, code } = res; |
|||
if (code == 200) { |
|||
// this.$modal.msgSuccess("操作成功"); |
|||
this.$refs.uToast.show({ |
|||
type: "success", |
|||
message: "操作成功", |
|||
}); |
|||
} |
|||
}, |
|||
}, |
|||
created() {}, |
|||
onShow() {}, |
|||
onLoad(options) { |
|||
console.log("options", options); |
|||
this.name = options.name; // 参数名称 |
|||
this.value = options.value; // 阈值 |
|||
this.deviceId = options.deviceId; // 设备id |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.but-box { |
|||
width: 50%; |
|||
margin: 0 auto; |
|||
margin-top: 50px; |
|||
} |
|||
.view-data { |
|||
padding: 14px; |
|||
margin-top: 44px; |
|||
border-radius: 10px; |
|||
background: #fff; |
|||
} |
|||
.container { |
|||
padding: 16px; |
|||
box-sizing: border-box; |
|||
min-height: 100vh; |
|||
background: #fcfcfc; |
|||
} |
|||
.title { |
|||
line-height: 40px; |
|||
font-size: 18px; |
|||
text-align: center; |
|||
background: #fff; |
|||
} |
|||
</style> |
|||
<style></style> |
After Width: | Height: | Size: 6.1 KiB |
@ -1,295 +1,537 @@ |
|||
<template> |
|||
<view class="container" style="height:100vh"> |
|||
<view> |
|||
<h1 class="header-h1">{{userInfo.nickName}}</h1> |
|||
<view style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 17px;"> |
|||
<h2 class="header-h2">老年健康与医养结合服务</h2> |
|||
<!-- <view class="view-export" @click="handleExport">导出</view> --> |
|||
</view> |
|||
|
|||
<view class="view-search"> |
|||
<image class="view-search-img" src="./icon_search.png"></image> |
|||
<u-input class='view-search-input' v-model="queryParam.param.name" placeholder="请输入首字母/姓名" /> |
|||
</view> |
|||
<!-- 类型查询条件 --> |
|||
<view class="type-search"> |
|||
<view :class="queryParam.param.type == 0 ? 'type-search-select':''" @click="handleType(0)">全部({{listNum.totality}}人)</view> |
|||
<view :class="queryParam.param.type == 1 ? 'type-search-select':''" @click="handleType(1)">失能老人({{listNum.disability}}人)</view> |
|||
<view :class="queryParam.param.type == 2 ? 'type-search-select':''" @click="handleType(2)">80岁及以上老人({{listNum.advancedAgeNum}}人)</view> |
|||
</view> |
|||
</view> |
|||
<!-- 列表 --> |
|||
<view style="flex: 1; position: relative;"> |
|||
<scroll-view scroll-y="true" :lower-threshold="50" scroll-with-animation @scrolltolower="scrolltolower"> |
|||
<view class="view-ul"> |
|||
<view class="view-li" v-for="(item,index) in listData" :key="index"> |
|||
<view class="view-li-left"> |
|||
<!-- 姓名,性别,年龄 --> |
|||
<view class="li-left-header"> |
|||
<h1>{{item.name}}</h1> |
|||
<p><span>{{!item.sex ? '男' : '女'}} </span> <b>|</b> <span> {{item.age}}岁</span></p> |
|||
</view> |
|||
<!-- 身份证手机号地址 --> |
|||
<view class="li-left-info"> |
|||
<view><image class="left-info-img" src="../../imgs/sfz.png"></image>{{item.idCard}} </view> |
|||
<view><image class="left-info-img" src="../../imgs/sjh.png"></image>{{item.phone}} </view> |
|||
<view style="margin-bottom: 0;"><image class="left-info-img" src="../../imgs/wz.png"></image>{{item.address}} </view> |
|||
</view> |
|||
</view> |
|||
<view class="view-li-iright"> |
|||
<view class="li-iright-but" :class="item.snStatus ? 'li-iright-sn':''" @click="handlePatientRegister(item,1)">失能登记</view> |
|||
<view class="li-iright-but" :class="item.gldjStatus ? 'li-iright-gl':''" @click="handlePatientRegister(item,2)" v-if="item.glFlag">高龄登记</view> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</scroll-view> |
|||
</view> |
|||
<!-- 新增按钮 --> |
|||
<view class="listadd" @click="handlePatientAdd"> |
|||
<image class="listadd-img" src="../../imgs/icon_tianjia.png"></image> |
|||
</view> |
|||
</view> |
|||
<view class="container"> |
|||
<!-- 头部标题 --> |
|||
<!-- <view class="title">STM32智能AI家居系统</view> --> |
|||
<u-navbar class="navbar" title="STM32智能AI家居系统" fixed> </u-navbar> |
|||
<!-- 显示数据部分:温度、湿度、Co2、Tvoc、烟雾浓度、光照强度、是否有人、声光报警状态 --> |
|||
<view class="view-data"> |
|||
<!-- 温度 --> |
|||
<view class="view-data-item"> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./wd.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text" |
|||
>{{ deviceInfo.temperature }}<span>°C</span> |
|||
</view> |
|||
</view> |
|||
<!-- 湿度 --> |
|||
<view class="view-data-item"> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./sd.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text" |
|||
>{{ deviceInfo.humidity }}<span>%RH</span> |
|||
</view> |
|||
</view> |
|||
<!-- Co2 --> |
|||
<view class="view-data-item"> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./CO2.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text" |
|||
>{{ deviceInfo.Co2 }}<span>ppm</span> |
|||
</view> |
|||
</view> |
|||
<!-- Tvoc --> |
|||
<view class="view-data-item"> |
|||
<view class="data-item-img-box"> |
|||
<image |
|||
class="data-item-img" |
|||
src="./tvoc-copy.png" |
|||
mode="widthFix" |
|||
></image> |
|||
</view> |
|||
<view class="data-item-text">27<span>ppb</span> </view> |
|||
</view> |
|||
<!-- 烟雾浓度 --> |
|||
<view class="view-data-item"> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./ywnd.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text">27<span>%LEL</span> </view> |
|||
</view> |
|||
<!-- 光照强度 --> |
|||
<view class="view-data-item"> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./gzqd.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text" |
|||
>{{ deviceInfo.light }}<span>Lux</span> |
|||
</view> |
|||
</view> |
|||
<!-- 是否有人 --> |
|||
<view class="view-data-item"> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./sfyr.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text">有人</view> |
|||
</view> |
|||
<!-- 声光报警状态 --> |
|||
<view class="view-data-item"> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./sgbj.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text" |
|||
>{{ deviceInfo.alarm == 1 ? "报警开启" : "报警关闭" }}<span></span> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- 控制部分 --> |
|||
<view class="control"> |
|||
<view class="view-data-item" style="width: 100%"> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./wd.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text"> |
|||
LED({{ deviceInfo.LED }}%) |
|||
<u-slider |
|||
style="width: 100%" |
|||
v-model="deviceInfo.LED" |
|||
min="0" |
|||
max="100" |
|||
:step="20" |
|||
@change="handleAttribute()" |
|||
></u-slider> |
|||
</view> |
|||
</view> |
|||
<view |
|||
class="view-data-item" |
|||
@click="handleCommand('statusMotor', 'curtain')" |
|||
:class="deviceInfo.curtain == 0 ? 'view-filter' : ''" |
|||
> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./sd.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text" |
|||
>窗帘 |
|||
<view>{{ deviceInfo.curtain == 0 ? "OFF" : "NO" }}</view> |
|||
</view> |
|||
</view> |
|||
<view |
|||
class="view-data-item" |
|||
@click="handleCommand('statusHumidifier', 'humidifier')" |
|||
:class="deviceInfo.humidifier == 0 ? 'view-filter' : ''" |
|||
> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./CO2.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text" |
|||
>加湿器 |
|||
<view>{{ deviceInfo.humidifier == 0 ? "OFF" : "NO" }}</view> |
|||
</view> |
|||
</view> |
|||
<view |
|||
class="view-data-item" |
|||
@click="handleCommand('statusFan', 'fan')" |
|||
:class="deviceInfo.fan == 0 ? 'view-filter' : ''" |
|||
> |
|||
<view class="data-item-img-box"> |
|||
<image |
|||
class="data-item-img" |
|||
src="./tvoc-copy.png" |
|||
mode="widthFix" |
|||
></image> |
|||
</view> |
|||
<view class="data-item-text" |
|||
>风扇 |
|||
<view>{{ deviceInfo.fan == 0 ? "OFF" : "NO" }}</view> |
|||
</view> |
|||
</view> |
|||
<view |
|||
class="view-data-item" |
|||
@click="handleCommand('statusAircleaner', 'airCleaner')" |
|||
:class="deviceInfo.airCleaner == 0 ? 'view-filter' : ''" |
|||
> |
|||
<view class="data-item-img-box"> |
|||
<image class="data-item-img" src="./ywnd.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="data-item-text" |
|||
>空气净化器 |
|||
<view>{{ deviceInfo.airCleaner == 0 ? "OFF" : "NO" }}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- 阈值设定部分 --> |
|||
<view class="threshold"> |
|||
<u-cell-group> |
|||
<u-cell |
|||
title="光照阈值" |
|||
:value="deviceInfo.lightThreshold" |
|||
isLink |
|||
@click="handleSettingThreshold('lightThreshold', 'lightThreshold')" |
|||
></u-cell> |
|||
<u-cell |
|||
title="湿度下限阈值" |
|||
:value="deviceInfo.humidityLowerThreshold" |
|||
isLink |
|||
@click=" |
|||
handleSettingThreshold('humiLowThreshold', 'humiLowThreshold') |
|||
" |
|||
></u-cell> |
|||
<u-cell |
|||
title="湿度上限阈值" |
|||
:value="deviceInfo.humidityUpperThreshold" |
|||
isLink |
|||
@click=" |
|||
handleSettingThreshold('humiHighThreshold', 'humiHighThreshold') |
|||
" |
|||
></u-cell> |
|||
<u-cell |
|||
title="空气质量阈值" |
|||
:value="deviceInfo.airQualityThreshold" |
|||
isLink |
|||
@click="handleSettingThreshold('tvocThreshold', 'tvocThreshold')" |
|||
></u-cell> |
|||
</u-cell-group> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import {userInfo,patientQuery,queryNum} from '@/common/api.js'; |
|||
export default { |
|||
data() { |
|||
return { |
|||
userInfo:{}, |
|||
listData:[ |
|||
// { |
|||
// name:'周忠林', |
|||
// sex:0, |
|||
// age:'82', |
|||
// idCard:'142734********0011', |
|||
// phone:'13704551289', |
|||
// address:'郑州市二七教苑小区', |
|||
// }, |
|||
], |
|||
queryParam: { |
|||
pageNum: 1, |
|||
pageSize: 20, |
|||
param: { |
|||
name: '', |
|||
type: 0, // 0全部,1失能老人 2 80岁及以上老人 |
|||
}, |
|||
}, |
|||
listNum:{} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 查询统计数量 |
|||
async getQueryNum(){ |
|||
const res = await queryNum() |
|||
if(res.code == 200){ |
|||
this.listNum = res.data |
|||
} |
|||
}, |
|||
// 获取用户信息 |
|||
async getUserInfo(){ |
|||
const res = await userInfo() |
|||
if(res.code == 200){ |
|||
this.userInfo = res.user |
|||
} |
|||
}, |
|||
// 导出 |
|||
handleExport(){}, |
|||
// 患者登记 |
|||
handlePatientRegister(_item,_type){ |
|||
uni.navigateTo({ url: `/pages/healthService/healthService?id=${_item.id}&type=${_type}` }); |
|||
}, |
|||
// 新增患者 |
|||
handlePatientAdd(){ |
|||
uni.navigateTo({ |
|||
url: '/pages/patientAdd/patientAdd' |
|||
}) |
|||
}, |
|||
// 类型查询 |
|||
handleType(_type){ |
|||
this.queryParam.param.type = _type |
|||
this.getList(true) |
|||
}, |
|||
// 列表数据 |
|||
async getList(_type) { |
|||
if (_type) { |
|||
this.listData = []; |
|||
} |
|||
const res = await patientQuery(this.queryParam) |
|||
if (res.code == 200) { |
|||
// 返回数据为空时pageNUm-1 |
|||
if (!res.data.list.length && this.queryParam.pageNum > 1) { |
|||
this.queryParam.pageNum--; |
|||
} |
|||
this.listData = [...this.listData, ...res.data.list]; |
|||
} |
|||
}, |
|||
// 触底加载 |
|||
scrolltolower() { |
|||
this.queryParam.pageNum++; |
|||
console.log(this.queryParam.pageNum) |
|||
this.getList() |
|||
}, |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
onShow() { |
|||
this.getUserInfo() |
|||
this.getList(true) |
|||
this.getQueryNum() |
|||
} |
|||
} |
|||
<script> |
|||
import { |
|||
login, |
|||
queryProjectInfoByKey, |
|||
deviceList, |
|||
attributes, |
|||
sendAttribute, |
|||
sendCommand, |
|||
} from "@/common/api.js"; |
|||
export default { |
|||
data() { |
|||
return { |
|||
value: 30, |
|||
deviceId: "", // 设备id |
|||
// 温度、湿度、Co2、Tvoc、烟雾浓度、光照强度、是否有人、声光报警状态 |
|||
deviceInfo: { |
|||
temperature: 27, // 温度 |
|||
humidity: 27, // 湿度 |
|||
co: 27, // CO |
|||
tvoc: 27, // Tvoc |
|||
smoke: 27, // 烟雾浓度 |
|||
light: 27, // 光照强度 |
|||
person: 27, // 是否有人 |
|||
alarm: 27, // 声光报警状态 |
|||
}, |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
// 跳转到阈值设定页面 |
|||
handleSettingThreshold(_name, _valueName) { |
|||
let value = this.deviceInfo[_valueName]; |
|||
uni.navigateTo({ |
|||
url: `/pages/index/details?name=${_name}&value=${value}&deviceId=${this.deviceId}`, |
|||
}); // 跳转到阈值设定页面 |
|||
}, |
|||
/** 下发属性 */ |
|||
async handleAttribute() { |
|||
const res = await sendAttribute({ |
|||
deviceId: this.deviceId, // 设备id |
|||
// 阈值JSON字符串 |
|||
attributeAndValues: [ |
|||
{ |
|||
attributeIdentifier: "statusLed", |
|||
attributeValue: this.deviceInfo.LED, |
|||
}, |
|||
], |
|||
}); |
|||
const { data, code } = res; |
|||
if (code == 200) { |
|||
this.getAttributes(this.deviceId); // 根据项目id查找设备列表 |
|||
// this.$refs.uToast.show({ |
|||
// type: "success", |
|||
// message: "操作成功", |
|||
// }); |
|||
} |
|||
}, |
|||
// 下发命令 |
|||
async handleCommand(_name, _valueName) { |
|||
this.deviceInfo[_valueName] = this.deviceInfo[_valueName] == 0 ? 1 : 0; |
|||
let commandParams = { [_name]: this.deviceInfo[_valueName] }; // 0 关闭 1 开启, |
|||
console.log("commandParams", commandParams); |
|||
const res = await sendCommand({ |
|||
commandId: "447242774207232", // 命令ID, |
|||
commandParams: JSON.stringify(commandParams), // 命令参数, |
|||
deviceId: this.deviceId, |
|||
}); |
|||
const { data, code } = res; |
|||
if (code == 200) { |
|||
this.getAttributes(this.deviceId); // 根据项目id查找设备列表 |
|||
} |
|||
}, |
|||
// 通过ID查询患者详情 |
|||
async handleLogin() { |
|||
this.fileList = []; |
|||
const res = await login({ |
|||
code: "3", |
|||
password: "admin123", |
|||
username: "yf_test", |
|||
}); |
|||
const { data, code } = res; |
|||
if (code == 200) { |
|||
uni.setStorageSync("userToken", data.token); |
|||
this.getqueryProjectInfoByKey(); |
|||
} |
|||
}, |
|||
// 通过ID查询患者详情 |
|||
async getqueryProjectInfoByKey() { |
|||
this.fileList = []; |
|||
const res = await queryProjectInfoByKey({ projectKey: "qKStHKKt" }); |
|||
const { data, code } = res; |
|||
if (code == 200) { |
|||
this.getDeviceList(data.id); // 根据项目id查找设备列表 |
|||
} |
|||
}, |
|||
// 根据项目id查找设备列表 |
|||
async getDeviceList(_id) { |
|||
const res = await deviceList({ projectId: _id }); |
|||
const { rows, code } = res; |
|||
if (code == 200) { |
|||
const w2Device = rows.find((device) => device.deviceName === "H1"); |
|||
this.deviceId = w2Device.id; |
|||
this.getAttributes(this.deviceId); // 根据设备id查找设备信息 |
|||
} |
|||
}, |
|||
|
|||
// 根据设备id查找设备信息 |
|||
async getAttributes(_id) { |
|||
const res = await attributes({ deviceId: _id }); |
|||
const { data, code } = res; |
|||
if (code == 200) { |
|||
this.loading = false; |
|||
let deviceAttributesList = data.deviceAttributesList; |
|||
// {id: 448053828969475, belongType: "1", attributeName: "C02", attributeType: "1",}, |
|||
// {id: 448053828969476, belongType: "1", attributeName: "CO", attributeType: "1",}, |
|||
// {id: 448053828969473, belongType: "1", attributeName: "湿度", attributeType: "1",}, |
|||
// {id: 448058657266432, belongType: "1", attributeName: "湿度上限阈值", attributeType: "2",}, |
|||
// {id: 448058581624832, belongType: "1", attributeName: "湿度下限阈值", attributeType: "2",}, |
|||
// {id: 448053828969477, belongType: "1", attributeName: "光照", attributeType: "1",}, |
|||
// {id: 448058556146688, belongType: "1", attributeName: "光照阈值", attributeType: "2",}, |
|||
// {id: 448053828969484, belongType: "1", attributeName: "空气净化器开关", attributeType: "1",}, |
|||
// {id: 448053828969478, belongType: "1", attributeName: "报警器", attributeType: "1",}, |
|||
// {id: 448053828969483, belongType: "1", attributeName: "除湿器开关", attributeType: "1",}, |
|||
// {id: 448053828969482, belongType: "1", attributeName: "加湿器开关", attributeType: "1",}, |
|||
// {id: 448053828969479, belongType: "1", attributeName: "红外", attributeType: "1",}, |
|||
// {id: 448053828969480, belongType: "1", attributeName: "LED", attributeType: "1",}, |
|||
// {id: 448053828969481, belongType: "1", attributeName: "窗帘开关", attributeType: "1",}, |
|||
// {id: 448053828969472, belongType: "1", attributeName: "温度", attributeType: "1",}, |
|||
// {id: 448053828969474, belongType: "1", attributeName: "空气质量", attributeType: "1",}, |
|||
// {id: 448058718225664, belongType: "1", attributeName: "空气质量阈值", attributeType: "2",}, |
|||
// ------ 显示 ------ |
|||
// 温度、湿度、Co2、Tvoc、烟雾浓度、光照强度、是否有人、声光报警状态 |
|||
// 温度 |
|||
let temperature = deviceAttributesList.find( |
|||
(row) => row.id === 448053828969472 |
|||
)?.attributeValue; |
|||
// 湿度 |
|||
let humidity = deviceAttributesList.find( |
|||
(row) => row.id === 448053828969473 |
|||
)?.attributeValue; |
|||
// Co2 |
|||
let Co2 = deviceAttributesList.find( |
|||
(row) => row.id === 448053828969475 |
|||
)?.attributeValue; |
|||
// Tvoc |
|||
|
|||
// 烟雾浓度 |
|||
|
|||
// 光照强度 |
|||
let light = deviceAttributesList.find( |
|||
(row) => row.id === 448053828969477 |
|||
)?.attributeValue; |
|||
// 是否有人 |
|||
|
|||
// 声光报警状态 |
|||
let alarm = deviceAttributesList.find( |
|||
(row) => row.id === 448053828969478 |
|||
)?.attributeValue; |
|||
// ------ 开关 ------ |
|||
// LED,窗帘开关,加湿器开关,风扇开关,空气净化器开关 |
|||
// LED |
|||
let LED = deviceAttributesList.find( |
|||
(row) => row.id === 448053828969480 |
|||
)?.attributeValue; |
|||
// 窗帘开关 |
|||
let curtain = deviceAttributesList.find( |
|||
(row) => row.id === 448053828969481 |
|||
)?.attributeValue; |
|||
// 加湿器开关 |
|||
let humidifier = deviceAttributesList.find( |
|||
(row) => row.id === 448053828969482 |
|||
)?.attributeValue; |
|||
// 风扇开关 |
|||
let fan = deviceAttributesList.find( |
|||
(row) => row.id === 448053828969483 |
|||
)?.attributeValue; |
|||
// 空气净化器开关 |
|||
let airCleaner = deviceAttributesList.find( |
|||
(row) => row.id === 448053828969484 |
|||
)?.attributeValue; |
|||
|
|||
// ------ 阈值 ------ |
|||
// 光照阈值,湿度下限阈值,湿度上限阈值,空气质量阈值 |
|||
// 光照阈值 |
|||
let lightThreshold = deviceAttributesList.find( |
|||
(row) => row.id === 448058556146688 |
|||
)?.attributeValue; |
|||
// 湿度下限阈值 |
|||
let humidityLowerThreshold = deviceAttributesList.find( |
|||
(row) => row.id === 448058581624832 |
|||
)?.attributeValue; |
|||
// 湿度上限阈值 |
|||
let humidityUpperThreshold = deviceAttributesList.find( |
|||
(row) => row.id === 448058657266432 |
|||
)?.attributeValue; |
|||
// 空气质量阈值 |
|||
let airQualityThreshold = deviceAttributesList.find( |
|||
(row) => row.id === 448058718225664 |
|||
)?.attributeValue; |
|||
this.deviceInfo = { |
|||
temperature, // 温度 |
|||
humidity, // 湿度 |
|||
Co2, // Co2 |
|||
light, // 光照强度 |
|||
alarm, // 声光报警状态 |
|||
LED, // LED |
|||
curtain, // 窗帘开关 |
|||
humidifier, // 加湿器开关 |
|||
fan, // 风扇开关 |
|||
airCleaner, // 空气净化器开关 |
|||
lightThreshold, // 光照阈值 |
|||
humidityLowerThreshold, // 湿度下限阈值 |
|||
humidityUpperThreshold, // 湿度上限阈值 |
|||
airQualityThreshold, // 空气质量阈值 |
|||
}; |
|||
} |
|||
}, |
|||
}, |
|||
created() { |
|||
this.handleLogin(); |
|||
}, |
|||
onShow() {}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.view-export{ |
|||
width: 44px; |
|||
height: 31px; |
|||
line-height: 31px; |
|||
font-size: 10px; |
|||
color: #FFFFFF; |
|||
background: #1B7FEB; |
|||
border-radius: 4px; |
|||
text-align: center; |
|||
} |
|||
.listadd{ |
|||
position: fixed; |
|||
right: 0px; |
|||
bottom: 20px; |
|||
width: 100px; |
|||
height: 100px; |
|||
.listadd-img{ |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
} |
|||
.view-li{ |
|||
padding: 12px; |
|||
border-radius: 8px 8px 8px 8px; |
|||
background: #FFFFFF; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
margin-bottom: 14px; |
|||
.view-li-iright{ |
|||
.li-iright-but{ |
|||
width: 84px; |
|||
height: 31px; |
|||
line-height: 31px; |
|||
text-align: center; |
|||
font-size: 12px; |
|||
border-radius: 15px; |
|||
margin-bottom: 15px; |
|||
border: 1px solid #999999; |
|||
} |
|||
.li-iright-sn{ |
|||
color: #1B7FEB; |
|||
background: rgba(27,127,235,0.08); |
|||
border: 1px solid #1B7FEB; |
|||
} |
|||
.li-iright-gl{ |
|||
color: #FF981F; |
|||
background: rgba(255,152,31,0.08); |
|||
border: 1px solid #FF981F; |
|||
} |
|||
} |
|||
|
|||
.view-li-left{ |
|||
flex:1; |
|||
.li-left-info{ |
|||
font-size: 12px; |
|||
color: #3D3D3D; |
|||
view{ |
|||
margin-bottom: 10px; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
.left-info-img{ |
|||
width: 20px; |
|||
height: 20px; |
|||
margin-right: 10px; |
|||
} |
|||
} |
|||
.li-left-header{ |
|||
display: flex; |
|||
align-items: flex-end; |
|||
margin-bottom: 12px; |
|||
h1{ |
|||
font-size: 15px; |
|||
color: #3D3D3D; |
|||
margin-right: 5px; |
|||
} |
|||
p{ |
|||
font-size: 12px; |
|||
color: #888888; |
|||
b{ |
|||
font-weight: 500; |
|||
margin: 0 5px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.type-search{ |
|||
background: #fcf2e6; |
|||
height: 32px; |
|||
line-height: 32px; |
|||
border-radius: 16px; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
margin-bottom: 16px; |
|||
view{ |
|||
padding: 0 10px; |
|||
font-size: 12px; |
|||
color: #3D3D3D; |
|||
|
|||
} |
|||
.type-search-select{ |
|||
background: #FF981F; |
|||
border-radius: 16px; |
|||
color: #fff; |
|||
} |
|||
|
|||
} |
|||
.view-search{ |
|||
height: 35px; |
|||
line-height: 35px; |
|||
border: 1px solid rgba(255,152,31,0.2); |
|||
background: #fff; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-bottom: 16px; |
|||
.view-search-img{ |
|||
width: 16px; |
|||
height: 16px; |
|||
margin-left:10px; |
|||
} |
|||
.view-search-input{ |
|||
border: none; |
|||
} |
|||
|
|||
} |
|||
.header-h1{ |
|||
font-size: 18px; |
|||
color: #3D3D3D; |
|||
margin-bottom: 29px; |
|||
} |
|||
.header-h2{ |
|||
font-size: 20px; |
|||
color: #3D3D3D; |
|||
} |
|||
.container{ |
|||
display: flex; |
|||
flex-direction: column; |
|||
box-sizing: border-box; |
|||
padding: 46px 16px 20px 16px; |
|||
background: linear-gradient(130deg,#ffe8cc 8%,#fcfcfc,#fcfcfc,#fcfcfc); |
|||
} |
|||
<style lang="scss" scoped> |
|||
.threshold { |
|||
margin-top: 16px; // 调整间距 |
|||
background: #fff; |
|||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
|||
border-radius: 10px; |
|||
} |
|||
.view-threshold { |
|||
margin-top: 16px; |
|||
.view-threshold-item { |
|||
margin-bottom: 6px; |
|||
.threshold-item-title { |
|||
font-size: 18px; |
|||
} |
|||
} |
|||
} |
|||
.view-filter { |
|||
filter: grayscale(100%); // 灰度 |
|||
} |
|||
.control { |
|||
margin-top: 16px; |
|||
display: flex; |
|||
grid-template-columns: repeat(2, 1fr); // 明确两列布局 |
|||
gap: 14px; // 统一间距 |
|||
flex-wrap: wrap; |
|||
justify-content: space-between; |
|||
.view-data-item { |
|||
width: 48%; |
|||
display: flex; |
|||
align-items: center; |
|||
box-sizing: border-box; |
|||
padding: 12px; |
|||
background: #fff; |
|||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
|||
border-radius: 10px; |
|||
|
|||
.data-item-img-box { |
|||
width: 38px; |
|||
height: 38px; |
|||
border-radius: 50%; |
|||
background: rgb(138 213 255 / 10%); |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
margin-right: 10px; |
|||
.data-item-img { |
|||
width: 22px; |
|||
height: 22px; |
|||
} |
|||
} |
|||
.data-item-text { |
|||
flex: 1; |
|||
color: #999; |
|||
font-size: 18px; |
|||
} |
|||
} |
|||
} |
|||
.view-data { |
|||
padding: 14px; |
|||
margin-top: 45px; |
|||
border-radius: 10px; |
|||
background: linear-gradient(130deg, #cff3ff, #7bacef); |
|||
display: grid; |
|||
grid-template-columns: repeat(2, 1fr); // 明确两列布局 |
|||
gap: 6px 14px; // 统一间距 |
|||
.view-data-item { |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 8px 0; |
|||
.data-item-img-box { |
|||
width: 38px; |
|||
height: 38px; |
|||
border-radius: 50%; |
|||
background: #fff; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
margin-right: 14px; |
|||
.data-item-img { |
|||
width: 22px; |
|||
height: 22px; |
|||
margin: 10rx; |
|||
} |
|||
} |
|||
.data-item-text { |
|||
color: #3d7ccd; |
|||
font-size: 28px; |
|||
span { |
|||
font-size: 16px; |
|||
font-weight: normal; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.container { |
|||
padding: 16px; |
|||
box-sizing: border-box; |
|||
min-height: 100vh; |
|||
background: #fcfcfc; |
|||
} |
|||
.title { |
|||
line-height: 40px; |
|||
font-size: 18px; |
|||
text-align: center; |
|||
background: #fff; |
|||
} |
|||
</style> |
|||
<style> |
|||
scroll-view { |
|||
height: 100%; |
|||
position: absolute; |
|||
} |
|||
</style> |
|||
/deep/ uni-slider { |
|||
margin: 0; |
|||
} |
|||
|
|||
/deep/ uni-slider .uni-slider-handle-wrapper { |
|||
height: 10px; |
|||
} |
|||
.navbar /deep/ .u-navbar__content__left { |
|||
display: none !important; |
|||
} |
|||
scroll-view { |
|||
height: 100%; |
|||
position: absolute; |
|||
} |
|||
</style> |
|||
|
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 963 B |
@ -1 +1 @@ |
|||
https://app.liuyingyong.cn/build/download/a94b5860-7eec-11ef-9ea0-a7ec3065f928 |
|||
https://app.liuyingyong.cn/build/download/079ccb20-877c-11ef-a502-956739106ca5 |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 4.8 KiB |
@ -1 +1 @@ |
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FBDBEC9","name":"老年健康","version":{"name":"1.0.0.1","code":1},"description":"多平台快速开发的UI框架","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Webview-x5":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"optimization":{"subPackages":true},"safearea":{"bottom":{"offset":"none"}},"usingComponents":true,"nvueCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"google":{"abiFilters":["armeabi-v7a","arm64-v8a"],"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNIFBDBEC9","aliasname":"","password":"","keystore":"html5plus://test","custompermissions":true},"apple":{"dSYMs":false,"idfa":false,"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.29","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html","adid":"128096300305"}} |
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FBDBEC9","name":"老年健康","version":{"name":"1.0.0.2","code":1},"description":"多平台快速开发的UI框架","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Webview-x5":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"optimization":{"subPackages":true},"safearea":{"bottom":{"offset":"none"}},"usingComponents":true,"nvueCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"google":{"abiFilters":["armeabi-v7a","arm64-v8a"],"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNIFBDBEC9","aliasname":"","password":"","keystore":"html5plus://test","custompermissions":true},"apple":{"dSYMs":false,"idfa":false,"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.29","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html","adid":"128096300305"}} |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 4.8 KiB |
@ -1 +1 @@ |
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FBDBEC9","name":"老年健康","version":{"name":"1.0.0.1","code":1},"description":"多平台快速开发的UI框架","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Webview-x5":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"optimization":{"subPackages":true},"safearea":{"bottom":{"offset":"none"}},"usingComponents":true,"nvueCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"abiFilters":["armeabi-v7a","arm64-v8a"]},"apple":{"idfa":false,"dSYMs":false},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.29","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}} |
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FBDBEC9","name":"老年健康","version":{"name":"1.0.0.2","code":1},"description":"多平台快速开发的UI框架","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Webview-x5":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"optimization":{"subPackages":true},"safearea":{"bottom":{"offset":"none"}},"usingComponents":true,"nvueCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"abiFilters":["armeabi-v7a","arm64-v8a"]},"apple":{"idfa":false,"dSYMs":false},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.29","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}} |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 4.8 KiB |
@ -0,0 +1,5 @@ |
|||
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><link rel="shortcut icon" type=image/x-icon href=https://cdn.uviewui.com/uview/common/favicon.webp><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>老年健康</title><script src=/static/common/js/touch-emulator.js></script><script>TouchEmulator();</script><style>::-webkit-scrollbar{ |
|||
display: none; |
|||
}</style><script>document.addEventListener('DOMContentLoaded', function() { |
|||
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px' |
|||
})</script><link rel=stylesheet href=/elderlyHealth/client/static/index.css></head><body><noscript><strong>本站点必须要开启JavaScript才能运行</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/elderlyHealth/client/static/js/chunk-vendors.bf77a967.js></script><script src=/elderlyHealth/client/static/js/index.1cf01358.js></script></body></html> |
@ -0,0 +1,363 @@ |
|||
(function (window, document, exportName, undefined) { |
|||
"use strict"; |
|||
|
|||
var isMultiTouch = false; |
|||
var multiTouchStartPos; |
|||
var eventTarget; |
|||
var touchElements = {}; |
|||
|
|||
// polyfills
|
|||
if (!document.createTouch) { |
|||
document.createTouch = function (view, target, identifier, pageX, pageY, screenX, screenY, clientX, clientY) { |
|||
// auto set
|
|||
if (clientX == undefined || clientY == undefined) { |
|||
clientX = pageX - window.pageXOffset; |
|||
clientY = pageY - window.pageYOffset; |
|||
} |
|||
|
|||
return new Touch(target, identifier, { |
|||
pageX: pageX, |
|||
pageY: pageY, |
|||
screenX: screenX, |
|||
screenY: screenY, |
|||
clientX: clientX, |
|||
clientY: clientY |
|||
}); |
|||
}; |
|||
} |
|||
|
|||
if (!document.createTouchList) { |
|||
document.createTouchList = function () { |
|||
var touchList = new TouchList(); |
|||
for (var i = 0; i < arguments.length; i++) { |
|||
touchList[i] = arguments[i]; |
|||
} |
|||
touchList.length = arguments.length; |
|||
return touchList; |
|||
}; |
|||
} |
|||
|
|||
/** |
|||
* create an touch point |
|||
* @constructor |
|||
* @param target |
|||
* @param identifier |
|||
* @param pos |
|||
* @param deltaX |
|||
* @param deltaY |
|||
* @returns {Object} touchPoint |
|||
*/ |
|||
function Touch(target, identifier, pos, deltaX, deltaY) { |
|||
deltaX = deltaX || 0; |
|||
deltaY = deltaY || 0; |
|||
|
|||
this.identifier = identifier; |
|||
this.target = target; |
|||
this.clientX = pos.clientX + deltaX; |
|||
this.clientY = pos.clientY + deltaY; |
|||
this.screenX = pos.screenX + deltaX; |
|||
this.screenY = pos.screenY + deltaY; |
|||
this.pageX = pos.pageX + deltaX; |
|||
this.pageY = pos.pageY + deltaY; |
|||
} |
|||
|
|||
/** |
|||
* create empty touchlist with the methods |
|||
* @constructor |
|||
* @returns touchList |
|||
*/ |
|||
function TouchList() { |
|||
var touchList = []; |
|||
|
|||
touchList.item = function (index) { |
|||
return this[index] || null; |
|||
}; |
|||
|
|||
// specified by Mozilla
|
|||
touchList.identifiedTouch = function (id) { |
|||
return this[id + 1] || null; |
|||
}; |
|||
|
|||
return touchList; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* Simple trick to fake touch event support |
|||
* this is enough for most libraries like Modernizr and Hammer |
|||
*/ |
|||
function fakeTouchSupport() { |
|||
var objs = [window, document.documentElement]; |
|||
var props = ['ontouchstart', 'ontouchmove', 'ontouchcancel', 'ontouchend']; |
|||
|
|||
for (var o = 0; o < objs.length; o++) { |
|||
for (var p = 0; p < props.length; p++) { |
|||
if (objs[o] && objs[o][props[p]] == undefined) { |
|||
objs[o][props[p]] = null; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* we don't have to emulate on a touch device |
|||
* @returns {boolean} |
|||
*/ |
|||
function hasTouchSupport() { |
|||
return ("ontouchstart" in window) || // touch events
|
|||
(window.Modernizr && window.Modernizr.touch) || // modernizr
|
|||
(navigator.msMaxTouchPoints || navigator.maxTouchPoints) > 2; // pointer events
|
|||
} |
|||
|
|||
/** |
|||
* disable mouseevents on the page |
|||
* @param ev |
|||
*/ |
|||
function preventMouseEvents(ev) { |
|||
// 注释启用默认事件
|
|||
// ev.preventDefault();
|
|||
// ev.stopPropagation();
|
|||
} |
|||
|
|||
/** |
|||
* only trigger touches when the left mousebutton has been pressed |
|||
* @param touchType |
|||
* @returns {Function} |
|||
*/ |
|||
function onMouse(touchType) { |
|||
return function (ev) { |
|||
// prevent mouse events
|
|||
preventMouseEvents(ev); |
|||
|
|||
if (ev.which !== 1) { |
|||
return; |
|||
} |
|||
|
|||
// The EventTarget on which the touch point started when it was first placed on the surface,
|
|||
// even if the touch point has since moved outside the interactive area of that element.
|
|||
// also, when the target doesnt exist anymore, we update it
|
|||
if (ev.type == 'mousedown' || !eventTarget || (eventTarget && !eventTarget.dispatchEvent)) { |
|||
eventTarget = ev.target; |
|||
} |
|||
|
|||
// shiftKey has been lost, so trigger a touchend
|
|||
if (isMultiTouch && !ev.shiftKey) { |
|||
triggerTouch('touchend', ev); |
|||
isMultiTouch = false; |
|||
} |
|||
|
|||
triggerTouch(touchType, ev); |
|||
|
|||
// we're entering the multi-touch mode!
|
|||
if (!isMultiTouch && ev.shiftKey) { |
|||
isMultiTouch = true; |
|||
multiTouchStartPos = { |
|||
pageX: ev.pageX, |
|||
pageY: ev.pageY, |
|||
clientX: ev.clientX, |
|||
clientY: ev.clientY, |
|||
screenX: ev.screenX, |
|||
screenY: ev.screenY |
|||
}; |
|||
triggerTouch('touchstart', ev); |
|||
} |
|||
|
|||
// reset
|
|||
if (ev.type == 'mouseup') { |
|||
multiTouchStartPos = null; |
|||
isMultiTouch = false; |
|||
eventTarget = null; |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* trigger a touch event |
|||
* @param eventName |
|||
* @param mouseEv |
|||
*/ |
|||
function triggerTouch(eventName, mouseEv) { |
|||
var touchEvent = document.createEvent('Event'); |
|||
touchEvent.initEvent(eventName, true, true); |
|||
|
|||
touchEvent.altKey = mouseEv.altKey; |
|||
touchEvent.ctrlKey = mouseEv.ctrlKey; |
|||
touchEvent.metaKey = mouseEv.metaKey; |
|||
touchEvent.shiftKey = mouseEv.shiftKey; |
|||
|
|||
touchEvent.touches = getActiveTouches(mouseEv, eventName); |
|||
touchEvent.targetTouches = getActiveTouches(mouseEv, eventName); |
|||
touchEvent.changedTouches = getChangedTouches(mouseEv, eventName); |
|||
|
|||
eventTarget.dispatchEvent(touchEvent); |
|||
} |
|||
|
|||
/** |
|||
* create a touchList based on the mouse event |
|||
* @param mouseEv |
|||
* @returns {TouchList} |
|||
*/ |
|||
function createTouchList(mouseEv) { |
|||
var touchList = new TouchList(); |
|||
|
|||
if (isMultiTouch) { |
|||
var f = TouchEmulator.multiTouchOffset; |
|||
var deltaX = multiTouchStartPos.pageX - mouseEv.pageX; |
|||
var deltaY = multiTouchStartPos.pageY - mouseEv.pageY; |
|||
|
|||
touchList.push(new Touch(eventTarget, 1, multiTouchStartPos, (deltaX * -1) - f, (deltaY * -1) + f)); |
|||
touchList.push(new Touch(eventTarget, 2, multiTouchStartPos, deltaX + f, deltaY - f)); |
|||
} else { |
|||
touchList.push(new Touch(eventTarget, 1, mouseEv, 0, 0)); |
|||
} |
|||
|
|||
return touchList; |
|||
} |
|||
|
|||
/** |
|||
* receive all active touches |
|||
* @param mouseEv |
|||
* @returns {TouchList} |
|||
*/ |
|||
function getActiveTouches(mouseEv, eventName) { |
|||
// empty list
|
|||
if (mouseEv.type == 'mouseup') { |
|||
return new TouchList(); |
|||
} |
|||
|
|||
var touchList = createTouchList(mouseEv); |
|||
if (isMultiTouch && mouseEv.type != 'mouseup' && eventName == 'touchend') { |
|||
touchList.splice(1, 1); |
|||
} |
|||
return touchList; |
|||
} |
|||
|
|||
/** |
|||
* receive a filtered set of touches with only the changed pointers |
|||
* @param mouseEv |
|||
* @param eventName |
|||
* @returns {TouchList} |
|||
*/ |
|||
function getChangedTouches(mouseEv, eventName) { |
|||
var touchList = createTouchList(mouseEv); |
|||
|
|||
// we only want to return the added/removed item on multitouch
|
|||
// which is the second pointer, so remove the first pointer from the touchList
|
|||
//
|
|||
// but when the mouseEv.type is mouseup, we want to send all touches because then
|
|||
// no new input will be possible
|
|||
if (isMultiTouch && mouseEv.type != 'mouseup' && |
|||
(eventName == 'touchstart' || eventName == 'touchend')) { |
|||
touchList.splice(0, 1); |
|||
} |
|||
|
|||
return touchList; |
|||
} |
|||
|
|||
/** |
|||
* show the touchpoints on the screen |
|||
*/ |
|||
function showTouches(ev) { |
|||
var touch, i, el, styles; |
|||
|
|||
// first all visible touches
|
|||
for (i = 0; i < ev.touches.length; i++) { |
|||
touch = ev.touches[i]; |
|||
el = touchElements[touch.identifier]; |
|||
if (!el) { |
|||
el = touchElements[touch.identifier] = document.createElement("div"); |
|||
document.body.appendChild(el); |
|||
} |
|||
|
|||
styles = TouchEmulator.template(touch); |
|||
for (var prop in styles) { |
|||
el.style[prop] = styles[prop]; |
|||
} |
|||
} |
|||
|
|||
// remove all ended touches
|
|||
if (ev.type == 'touchend' || ev.type == 'touchcancel') { |
|||
for (i = 0; i < ev.changedTouches.length; i++) { |
|||
touch = ev.changedTouches[i]; |
|||
el = touchElements[touch.identifier]; |
|||
if (el) { |
|||
el.parentNode.removeChild(el); |
|||
delete touchElements[touch.identifier]; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* TouchEmulator initializer |
|||
*/ |
|||
function TouchEmulator() { |
|||
if (hasTouchSupport()) { |
|||
return; |
|||
} |
|||
|
|||
fakeTouchSupport(); |
|||
|
|||
window.addEventListener("mousedown", onMouse('touchstart'), true); |
|||
window.addEventListener("mousemove", onMouse('touchmove'), true); |
|||
window.addEventListener("mouseup", onMouse('touchend'), true); |
|||
|
|||
window.addEventListener("mouseenter", preventMouseEvents, true); |
|||
window.addEventListener("mouseleave", preventMouseEvents, true); |
|||
window.addEventListener("mouseout", preventMouseEvents, true); |
|||
window.addEventListener("mouseover", preventMouseEvents, true); |
|||
|
|||
// it uses itself!
|
|||
window.addEventListener("touchstart", showTouches, true); |
|||
window.addEventListener("touchmove", showTouches, true); |
|||
window.addEventListener("touchend", showTouches, true); |
|||
window.addEventListener("touchcancel", showTouches, true); |
|||
} |
|||
|
|||
// start distance when entering the multitouch mode
|
|||
TouchEmulator.multiTouchOffset = 75; |
|||
|
|||
/** |
|||
* css template for the touch rendering |
|||
* @param touch |
|||
* @returns object |
|||
*/ |
|||
TouchEmulator.template = function (touch) { |
|||
var size = 0; |
|||
var transform = 'translate(' + (touch.clientX - (size / 2)) + 'px, ' + (touch.clientY - (size / 2)) + 'px)'; |
|||
return { |
|||
position: 'fixed', |
|||
left: 0, |
|||
top: 0, |
|||
background: '#fff', |
|||
border: 'solid 1px #999', |
|||
opacity: .6, |
|||
borderRadius: '100%', |
|||
height: size + 'px', |
|||
width: size + 'px', |
|||
padding: 0, |
|||
margin: 0, |
|||
display: 'block', |
|||
overflow: 'hidden', |
|||
pointerEvents: 'none', |
|||
webkitUserSelect: 'none', |
|||
mozUserSelect: 'none', |
|||
userSelect: 'none', |
|||
webkitTransform: transform, |
|||
mozTransform: transform, |
|||
transform: transform, |
|||
zIndex: 100 |
|||
} |
|||
}; |
|||
|
|||
// export
|
|||
if (typeof define == "function" && define.amd) { |
|||
define(function () { |
|||
return TouchEmulator; |
|||
}); |
|||
} else if (typeof module != "undefined" && module.exports) { |
|||
module.exports = TouchEmulator; |
|||
} else { |
|||
window[exportName] = TouchEmulator; |
|||
} |
|||
})(window, document, "TouchEmulator"); |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1005 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 934 B |
@ -1 +1 @@ |
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FBDBEC9","name":"老年健康","version":{"name":"1.0.0.1","code":1},"description":"多平台快速开发的UI框架","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Webview-x5":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"optimization":{"subPackages":true},"safearea":{"bottom":{"offset":"none"}},"usingComponents":true,"nvueCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"abiFilters":["armeabi-v7a","arm64-v8a"]},"apple":{"idfa":false,"dSYMs":false},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.29","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}} |
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FBDBEC9","name":"老年健康","version":{"name":"1.0.0.2","code":1},"description":"多平台快速开发的UI框架","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Webview-x5":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"optimization":{"subPackages":true},"safearea":{"bottom":{"offset":"none"}},"usingComponents":true,"nvueCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"abiFilters":["armeabi-v7a","arm64-v8a"]},"apple":{"idfa":false,"dSYMs":false},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.29","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}} |
@ -1,30 +1,42 @@ |
|||
/** |
|||
* 响应拦截 |
|||
* @param {Object} http |
|||
* @param {Object} http |
|||
*/ |
|||
module.exports = (vm) => { |
|||
uni.$u.http.interceptors.response.use((response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/ |
|||
// console.log('response',response)
|
|||
const data = response.data |
|||
// 自定义参数
|
|||
const custom = response.config?.custom |
|||
if (data.code == 200) { // 服务端返回的状态码不等于200,则reject()
|
|||
|
|||
} |
|||
if (data.code == 401) { // 服务端返回的状态码不等于200,则reject()
|
|||
uni.$u.toast('登录失效,请重新登录') |
|||
uni.removeStorageSync('userToken') |
|||
setTimeout(() => { |
|||
uni.reLaunch({ |
|||
url: '/pages/login/login', |
|||
}); |
|||
}, 100); |
|||
} |
|||
if (data.code == 500) { // 服务端返回的状态码不等于200,则reject()
|
|||
uni.$u.toast(data.msg || '') |
|||
} |
|||
return data || {} |
|||
}, (response) => { /* 对响应错误做点什么 (statusCode !== 200)*/ |
|||
return Promise.reject(response) |
|||
}) |
|||
} |
|||
uni.$u.http.interceptors.response.use( |
|||
(response) => { |
|||
/* 对响应成功做点什么 可使用async await 做异步操作*/ |
|||
// console.log('response',response)
|
|||
const data = response.data; |
|||
// 自定义参数
|
|||
const custom = response.config?.custom; |
|||
if (data.code == 200) { |
|||
// 服务端返回的状态码不等于200,则reject()
|
|||
} |
|||
if (data.code == 401) { |
|||
// 服务端返回的状态码不等于200,则reject()
|
|||
uni.$u.toast("登录失效,请重新登录"); |
|||
uni.removeStorageSync("userToken"); |
|||
setTimeout(() => { |
|||
uni.reLaunch({ |
|||
url: "/pages/login/login", |
|||
}); |
|||
}, 100); |
|||
} |
|||
if (data.code == 500) { |
|||
// 服务端返回的状态码不等于200,则reject()
|
|||
uni.$u.toast(data.msg || ""); |
|||
} |
|||
uni.hideLoading(); |
|||
return data || {}; |
|||
}, |
|||
(response) => { |
|||
uni.$u.toast("请求错误"); |
|||
setTimeout(() => { |
|||
uni.hideLoading(); |
|||
}, 1000); |
|||
/* 对响应错误做点什么 (statusCode !== 200)*/ |
|||
return Promise.reject(response); |
|||
} |
|||
); |
|||
}; |
|||
|