|
@@ -1,4 +1,5 @@
|
|
|
var tcm = require('../../../../utils/tcm.js')
|
|
var tcm = require('../../../../utils/tcm.js')
|
|
|
|
|
+var compliance = require('../../../../utils/compliance.js')
|
|
|
|
|
|
|
|
var EXAMPLE_IMAGES = {
|
|
var EXAMPLE_IMAGES = {
|
|
|
tongue: 'https://cfohow.hiwavo.com/fohow-app/xcx/tcm/sheup.png',
|
|
tongue: 'https://cfohow.hiwavo.com/fohow-app/xcx/tcm/sheup.png',
|
|
@@ -33,7 +34,7 @@ var USER_OPTION_LABELS = {
|
|
|
it_programmer: 'IT/程序员',
|
|
it_programmer: 'IT/程序员',
|
|
|
driver: '司机(出租车/货运/公交等)',
|
|
driver: '司机(出租车/货运/公交等)',
|
|
|
teacher: '教师/培训师',
|
|
teacher: '教师/培训师',
|
|
|
- medical_staff: '医护人员',
|
|
|
|
|
|
|
+ medical_staff: '健康护理人员',
|
|
|
service_industry: '服务行业(餐饮/零售/酒店等)',
|
|
service_industry: '服务行业(餐饮/零售/酒店等)',
|
|
|
heavy_labor: '重体力劳动(建筑/搬运/制造等)',
|
|
heavy_labor: '重体力劳动(建筑/搬运/制造等)',
|
|
|
outdoor_worker: '户外工作者(农业/快递/外卖等)',
|
|
outdoor_worker: '户外工作者(农业/快递/外卖等)',
|
|
@@ -67,7 +68,7 @@ Page({
|
|
|
{
|
|
{
|
|
|
key: 'tongue',
|
|
key: 'tongue',
|
|
|
title: '舌面',
|
|
title: '舌面',
|
|
|
- desc: '请伸出舌头,拍摄舌面正面照,需清晰展示舌苔颜色和纹理',
|
|
|
|
|
|
|
+ desc: '请伸出舌头,拍摄舌面正面照,需清晰展示舌面颜色和纹理',
|
|
|
required: true,
|
|
required: true,
|
|
|
localPath: '',
|
|
localPath: '',
|
|
|
url: '',
|
|
url: '',
|
|
@@ -76,7 +77,7 @@ Page({
|
|
|
{
|
|
{
|
|
|
key: 'tongueBottom',
|
|
key: 'tongueBottom',
|
|
|
title: '舌下',
|
|
title: '舌下',
|
|
|
- desc: '请翘起舌头,拍摄舌底照片,需清晰展示舌下络脉',
|
|
|
|
|
|
|
+ desc: '请翘起舌头,拍摄舌底照片,需清晰展示舌下纹理',
|
|
|
required: true,
|
|
required: true,
|
|
|
localPath: '',
|
|
localPath: '',
|
|
|
url: '',
|
|
url: '',
|
|
@@ -85,7 +86,7 @@ Page({
|
|
|
{
|
|
{
|
|
|
key: 'face',
|
|
key: 'face',
|
|
|
title: '面部',
|
|
title: '面部',
|
|
|
- desc: '请正对镜头拍摄面部照片,需清晰展示面部整体气色',
|
|
|
|
|
|
|
+ desc: '请正对镜头拍摄面部照片,需清晰展示面部整体状态',
|
|
|
required: true,
|
|
required: true,
|
|
|
localPath: '',
|
|
localPath: '',
|
|
|
url: '',
|
|
url: '',
|
|
@@ -264,8 +265,8 @@ Page({
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
wx.showModal({
|
|
wx.showModal({
|
|
|
- title: '删除检测人',
|
|
|
|
|
- content: '确认删除“' + user.nickName + '”吗?删除后该成员的康养检测入口将不可用。',
|
|
|
|
|
|
|
+ title: '删除成员',
|
|
|
|
|
+ content: '确认删除“' + user.nickName + '”吗?删除后该成员的康养评估入口将不可用。',
|
|
|
confirmColor: '#e35b4e',
|
|
confirmColor: '#e35b4e',
|
|
|
success: function (res) {
|
|
success: function (res) {
|
|
|
if (!res.confirm) {
|
|
if (!res.confirm) {
|
|
@@ -296,7 +297,7 @@ Page({
|
|
|
viewRecords: function () {
|
|
viewRecords: function () {
|
|
|
if (!this.data.currentUser || !this.data.currentUser.ID) {
|
|
if (!this.data.currentUser || !this.data.currentUser.ID) {
|
|
|
wx.showToast({
|
|
wx.showToast({
|
|
|
- title: '请先选择检测人',
|
|
|
|
|
|
|
+ title: '请先选择成员',
|
|
|
icon: 'none'
|
|
icon: 'none'
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
@@ -422,7 +423,7 @@ Page({
|
|
|
goQuestionsStep: function () {
|
|
goQuestionsStep: function () {
|
|
|
if (!this.data.currentUser || !this.data.currentUser.ID) {
|
|
if (!this.data.currentUser || !this.data.currentUser.ID) {
|
|
|
wx.showToast({
|
|
wx.showToast({
|
|
|
- title: '请先选择检测人',
|
|
|
|
|
|
|
+ title: '请先选择成员',
|
|
|
icon: 'none'
|
|
icon: 'none'
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
@@ -465,8 +466,8 @@ Page({
|
|
|
var item = list[i]
|
|
var item = list[i]
|
|
|
nextList.push({
|
|
nextList.push({
|
|
|
key: item.key || '',
|
|
key: item.key || '',
|
|
|
- title: item.title || '',
|
|
|
|
|
- hint: item.hint || '',
|
|
|
|
|
|
|
+ title: compliance.sanitizeText(item.title || ''),
|
|
|
|
|
+ hint: compliance.sanitizeText(item.hint || ''),
|
|
|
required: item.required === true,
|
|
required: item.required === true,
|
|
|
multiSelect: item.multiSelect === true,
|
|
multiSelect: item.multiSelect === true,
|
|
|
exclusivePairs: item.exclusivePairs || [],
|
|
exclusivePairs: item.exclusivePairs || [],
|
|
@@ -475,10 +476,10 @@ Page({
|
|
|
options: (item.options || []).map(function (opt) {
|
|
options: (item.options || []).map(function (opt) {
|
|
|
return {
|
|
return {
|
|
|
value: opt.value || '',
|
|
value: opt.value || '',
|
|
|
- label: opt.label || '',
|
|
|
|
|
|
|
+ label: compliance.sanitizeText(opt.label || ''),
|
|
|
isCustom: opt.isCustom === true,
|
|
isCustom: opt.isCustom === true,
|
|
|
- placeholder: opt.placeholder || '',
|
|
|
|
|
- description: opt.description || '',
|
|
|
|
|
|
|
+ placeholder: compliance.sanitizeText(opt.placeholder || ''),
|
|
|
|
|
+ description: compliance.sanitizeText(opt.description || ''),
|
|
|
isExclusive: opt.isExclusive === true,
|
|
isExclusive: opt.isExclusive === true,
|
|
|
selected: false,
|
|
selected: false,
|
|
|
disabled: false
|
|
disabled: false
|
|
@@ -496,7 +497,7 @@ Page({
|
|
|
loadingQuestions: false
|
|
loadingQuestions: false
|
|
|
})
|
|
})
|
|
|
wx.showToast({
|
|
wx.showToast({
|
|
|
- title: '问诊题目加载失败',
|
|
|
|
|
|
|
+ title: '健康问答题目加载失败',
|
|
|
icon: 'none'
|
|
icon: 'none'
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
@@ -672,8 +673,8 @@ Page({
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
wx.showModal({
|
|
wx.showModal({
|
|
|
- title: 'AI 健康分析知情同意',
|
|
|
|
|
- content: '本功能使用人工智能技术对舌象、面部与问诊信息进行分析,结果仅供健康参考,不构成医疗诊断或治疗建议。',
|
|
|
|
|
|
|
+ title: 'AI 健康评估知情同意',
|
|
|
|
|
+ content: '本功能使用人工智能技术对舌象、面部与健康问答信息进行分析,结果仅供健康参考,不构成专业建议。',
|
|
|
confirmText: '继续提交',
|
|
confirmText: '继续提交',
|
|
|
confirmColor: '#eab86a',
|
|
confirmColor: '#eab86a',
|
|
|
success: function (res) {
|
|
success: function (res) {
|
|
@@ -708,7 +709,7 @@ Page({
|
|
|
questionAnswers[question.key] = selectedValues
|
|
questionAnswers[question.key] = selectedValues
|
|
|
}
|
|
}
|
|
|
if (question.customText) {
|
|
if (question.customText) {
|
|
|
- customAnswers[question.key] = question.customText
|
|
|
|
|
|
|
+ customAnswers[question.key] = compliance.sanitizeText(question.customText)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -722,7 +723,7 @@ Page({
|
|
|
questionAnswers: questionAnswers,
|
|
questionAnswers: questionAnswers,
|
|
|
customAnswers: customAnswers,
|
|
customAnswers: customAnswers,
|
|
|
observationImages: observationImages,
|
|
observationImages: observationImages,
|
|
|
- extraNote: that.data.extraNote || '',
|
|
|
|
|
|
|
+ extraNote: compliance.sanitizeText(that.data.extraNote || ''),
|
|
|
additionalText: ''
|
|
additionalText: ''
|
|
|
}).then(function (data) {
|
|
}).then(function (data) {
|
|
|
wx.showToast({
|
|
wx.showToast({
|